@burdenoff/microfe-store 2026.525.3 → 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 (69) 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/components/index.js +0 -3
  69. package/dist/components/marketplace/ProductCard.js +0 -2
@@ -1,11 +1,11 @@
1
1
  import { useStore as e } from "../providers/StoreProvider.js";
2
- import { useEffect as t, useState as n } from "react";
3
- import { ArrowLeft as r, Pencil as i, Plus as a, RefreshCw as o, Store as s, Trash2 as c } from "lucide-react";
4
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
5
- import { useNavigate as d } from "react-router-dom";
6
- import { graphqlFetch as f } from "@burdenoff/fe-libs/shared/graphql";
2
+ import { useCallback as t, useEffect as n, useState as r } from "react";
3
+ import { ArrowLeft as i, Pencil as a, Plus as o, RefreshCw as s, Store as c, Trash2 as l } from "lucide-react";
4
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
5
+ import { useNavigate as f } from "react-router-dom";
6
+ import { graphqlFetch as p } from "@burdenoff/fe-libs/shared/graphql";
7
7
  //#region src/pages/AdminStoresPage.tsx
8
- var p = "\n query AdminStores {\n stores {\n id\n slug\n name\n type\n tenantId\n isPublic\n requiresApproval\n allowUnverifiedPublishers\n currency\n logoUrl\n description\n createdAt\n }\n }\n", m = "\n mutation CreateStore($input: CreateStoreInput!) {\n createStore(input: $input) {\n id\n slug\n name\n type\n }\n }\n", h = "\n mutation UpdateStore($id: ID!, $input: UpdateStoreInput!) {\n updateStore(id: $id, input: $input) {\n id\n name\n isPublic\n requiresApproval\n }\n }\n", g = "\n mutation DeleteStore($id: ID!) {\n deleteStore(id: $id)\n }\n", _ = {
8
+ var m = "\n query AdminStores {\n stores {\n id\n slug\n name\n type\n tenantId\n isPublic\n requiresApproval\n allowUnverifiedPublishers\n currency\n logoUrl\n description\n createdAt\n }\n }\n", h = "\n mutation CreateStore($input: CreateStoreInput!) {\n createStore(input: $input) {\n id\n slug\n name\n type\n }\n }\n", g = "\n mutation UpdateStore($id: ID!, $input: UpdateStoreInput!) {\n updateStore(id: $id, input: $input) {\n id\n name\n isPublic\n requiresApproval\n }\n }\n", _ = "\n mutation DeleteStore($id: ID!) {\n deleteStore(id: $id)\n }\n", v = {
9
9
  slug: "",
10
10
  name: "",
11
11
  type: "PRIVATE",
@@ -15,30 +15,30 @@ var p = "\n query AdminStores {\n stores {\n id\n slug\n name
15
15
  allowUnverifiedPublishers: !0,
16
16
  currency: "USD",
17
17
  description: ""
18
- }, v = () => {
19
- let v = d(), { authToken: y, basePath: b } = e(), [x, S] = n([]), [C, w] = n(!1), [T, E] = n(null), [D, O] = n(!1), [k, A] = n(_), [j, M] = n(null), N = async () => {
20
- w(!0), E(null);
18
+ }, y = () => {
19
+ let y = f(), { authToken: b, basePath: x } = e(), [S, C] = r([]), [w, T] = r(!1), [E, D] = r(null), [O, k] = r(!1), [A, j] = r(v), [M, N] = r(null), P = t(async () => {
20
+ T(!0), D(null);
21
21
  try {
22
- let e = await f({
22
+ let e = await p({
23
23
  gateway: "global",
24
- query: p,
25
- authToken: y || void 0
24
+ query: m,
25
+ authToken: b || void 0
26
26
  });
27
27
  if (e.errors?.length) throw Error(e.errors[0]?.message ?? "Failed to load stores");
28
- S(e.data?.stores ?? []);
28
+ C(e.data?.stores ?? []);
29
29
  } catch (e) {
30
- E(e instanceof Error ? e.message : "Failed to load stores");
30
+ D(e instanceof Error ? e.message : "Failed to load stores");
31
31
  } finally {
32
- w(!1);
32
+ T(!1);
33
33
  }
34
- };
35
- t(() => {
36
- N();
37
- }, []);
38
- let P = () => {
39
- M(null), A(_), O(!0);
40
- }, F = (e) => {
41
- M(e.id), A({
34
+ }, [b]);
35
+ n(() => {
36
+ P();
37
+ }, [P]);
38
+ let F = () => {
39
+ N(null), j(v), k(!0);
40
+ }, I = (e) => {
41
+ N(e.id), j({
42
42
  slug: e.slug,
43
43
  name: e.name,
44
44
  type: e.type,
@@ -48,152 +48,154 @@ var p = "\n query AdminStores {\n stores {\n id\n slug\n name
48
48
  allowUnverifiedPublishers: e.allowUnverifiedPublishers,
49
49
  currency: e.currency,
50
50
  description: e.description ?? ""
51
- }), O(!0);
52
- }, I = async () => {
53
- if (!k.slug.trim() || !k.name.trim()) {
54
- E("Slug and name are required");
51
+ }), k(!0);
52
+ }, L = async () => {
53
+ if (!A.slug.trim() || !A.name.trim()) {
54
+ D("Slug and name are required");
55
55
  return;
56
56
  }
57
- E(null);
57
+ D(null);
58
58
  try {
59
- j ? await f({
59
+ M ? await p({
60
60
  gateway: "global",
61
- query: h,
61
+ query: g,
62
62
  variables: {
63
- id: j,
63
+ id: M,
64
64
  input: {
65
- name: k.name,
66
- isPublic: k.isPublic,
67
- requiresApproval: k.requiresApproval,
68
- allowUnverifiedPublishers: k.allowUnverifiedPublishers,
69
- currency: k.currency,
70
- description: k.description || null
65
+ name: A.name,
66
+ isPublic: A.isPublic,
67
+ requiresApproval: A.requiresApproval,
68
+ allowUnverifiedPublishers: A.allowUnverifiedPublishers,
69
+ currency: A.currency,
70
+ description: A.description || null
71
71
  }
72
72
  },
73
- authToken: y || void 0
74
- }) : await f({
73
+ authToken: b || void 0
74
+ }) : await p({
75
75
  gateway: "global",
76
- query: m,
76
+ query: h,
77
77
  variables: { input: {
78
- slug: k.slug,
79
- name: k.name,
80
- type: k.type,
81
- tenantId: k.tenantId || null,
82
- isPublic: k.isPublic,
83
- requiresApproval: k.requiresApproval,
84
- allowUnverifiedPublishers: k.allowUnverifiedPublishers,
85
- currency: k.currency,
86
- description: k.description || null
78
+ slug: A.slug,
79
+ name: A.name,
80
+ type: A.type,
81
+ tenantId: A.tenantId || null,
82
+ isPublic: A.isPublic,
83
+ requiresApproval: A.requiresApproval,
84
+ allowUnverifiedPublishers: A.allowUnverifiedPublishers,
85
+ currency: A.currency,
86
+ description: A.description || null
87
87
  } },
88
- authToken: y || void 0
89
- }), O(!1), M(null), A(_), await N();
88
+ authToken: b || void 0
89
+ }), k(!1), N(null), j(v), await P();
90
90
  } catch (e) {
91
- E(e instanceof Error ? e.message : "Save failed");
91
+ D(e instanceof Error ? e.message : "Save failed");
92
92
  }
93
- }, L = async (e) => {
93
+ }, R = async (e) => {
94
94
  if (confirm("Delete this store? This is a soft delete.")) try {
95
- await f({
95
+ await p({
96
96
  gateway: "global",
97
- query: g,
97
+ query: _,
98
98
  variables: { id: e },
99
- authToken: y || void 0
100
- }), await N();
99
+ authToken: b || void 0
100
+ }), await P();
101
101
  } catch (e) {
102
- E(e instanceof Error ? e.message : "Delete failed");
102
+ D(e instanceof Error ? e.message : "Delete failed");
103
103
  }
104
104
  };
105
- return /* @__PURE__ */ u("div", {
105
+ return /* @__PURE__ */ d("div", {
106
106
  className: "min-h-screen bg-surface-default",
107
- children: [/* @__PURE__ */ l("header", {
107
+ children: [/* @__PURE__ */ u("header", {
108
108
  className: "border-b border-border-default bg-surface-raised",
109
- children: /* @__PURE__ */ l("div", {
109
+ children: /* @__PURE__ */ u("div", {
110
110
  className: "mx-auto max-w-7xl px-6 py-4",
111
- children: /* @__PURE__ */ u("div", {
111
+ children: /* @__PURE__ */ d("div", {
112
112
  className: "flex items-center justify-between",
113
- children: [/* @__PURE__ */ u("div", {
113
+ children: [/* @__PURE__ */ d("div", {
114
114
  className: "flex items-center gap-3",
115
- children: [/* @__PURE__ */ u("button", {
115
+ children: [/* @__PURE__ */ d("button", {
116
116
  type: "button",
117
- onClick: () => v(`${b}/dashboard`),
117
+ onClick: () => y(`${x}/dashboard`),
118
118
  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",
119
- children: [/* @__PURE__ */ l(r, { className: "h-4 w-4" }), "Back"]
120
- }), /* @__PURE__ */ u("div", {
119
+ children: [/* @__PURE__ */ u(i, { className: "size-4" }), "Back"]
120
+ }), /* @__PURE__ */ d("div", {
121
121
  className: "flex items-center gap-2",
122
122
  children: [
123
- /* @__PURE__ */ l(s, { className: "h-5 w-5 text-text-primary" }),
124
- /* @__PURE__ */ l("h1", {
123
+ /* @__PURE__ */ u(c, { className: "size-5 text-text-primary" }),
124
+ /* @__PURE__ */ u("h1", {
125
125
  className: "text-xl font-semibold text-text-primary",
126
126
  children: "Store registry"
127
127
  }),
128
- /* @__PURE__ */ l("span", {
128
+ /* @__PURE__ */ u("span", {
129
129
  className: "rounded-full bg-surface-accent-muted px-2 py-0.5 text-xs font-medium text-text-accent",
130
- children: x.length
130
+ children: S.length
131
131
  })
132
132
  ]
133
133
  })]
134
- }), /* @__PURE__ */ u("div", {
134
+ }), /* @__PURE__ */ d("div", {
135
135
  className: "flex gap-2",
136
- children: [/* @__PURE__ */ u("button", {
136
+ children: [/* @__PURE__ */ d("button", {
137
137
  type: "button",
138
- onClick: () => void N(),
138
+ onClick: () => void P(),
139
139
  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",
140
- disabled: C,
141
- children: [/* @__PURE__ */ l(o, { className: `h-4 w-4 ${C ? "animate-spin" : ""}` }), "Refresh"]
142
- }), /* @__PURE__ */ u("button", {
140
+ disabled: w,
141
+ children: [/* @__PURE__ */ u(s, { className: `size-4 ${w ? "animate-spin" : ""}` }), "Refresh"]
142
+ }), /* @__PURE__ */ d("button", {
143
143
  type: "button",
144
- onClick: P,
144
+ onClick: F,
145
145
  className: "inline-flex items-center gap-2 rounded-md bg-surface-accent px-3 py-1.5 text-sm font-medium text-text-on-accent hover:bg-surface-accent-hover",
146
- children: [/* @__PURE__ */ l(a, { className: "h-4 w-4" }), "Create store"]
146
+ children: [/* @__PURE__ */ u(o, { className: "size-4" }), "Create store"]
147
147
  })]
148
148
  })]
149
149
  })
150
150
  })
151
- }), /* @__PURE__ */ u("main", {
152
- className: "mx-auto max-w-7xl px-6 py-6",
151
+ }), /* @__PURE__ */ d("main", {
152
+ className: "mx-auto max-w-7xl p-6",
153
153
  children: [
154
- T && /* @__PURE__ */ l("div", {
154
+ E && /* @__PURE__ */ u("div", {
155
155
  role: "alert",
156
156
  className: "mb-4 rounded-md border border-border-danger bg-surface-danger-muted px-4 py-3 text-sm text-text-danger",
157
- children: T
157
+ children: E
158
158
  }),
159
- D && /* @__PURE__ */ u("div", {
159
+ O && /* @__PURE__ */ d("div", {
160
160
  className: "mb-6 rounded-lg border border-border-default bg-surface-raised p-4",
161
161
  children: [
162
- /* @__PURE__ */ l("h2", {
162
+ /* @__PURE__ */ u("h2", {
163
163
  className: "mb-3 text-sm font-semibold text-text-primary",
164
- children: j ? "Edit store" : "Create store"
164
+ children: M ? "Edit store" : "Create store"
165
165
  }),
166
- /* @__PURE__ */ u("div", {
166
+ /* @__PURE__ */ d("div", {
167
167
  className: "grid grid-cols-1 gap-3 md:grid-cols-2",
168
168
  children: [
169
- /* @__PURE__ */ u("label", {
169
+ /* @__PURE__ */ d("label", {
170
170
  className: "block",
171
- children: [/* @__PURE__ */ l("span", {
171
+ children: [/* @__PURE__ */ u("span", {
172
172
  className: "text-xs text-text-secondary",
173
173
  children: "Slug"
174
- }), /* @__PURE__ */ l("input", {
174
+ }), /* @__PURE__ */ u("input", {
175
175
  type: "text",
176
- value: k.slug,
177
- onChange: (e) => A({
178
- ...k,
176
+ "aria-label": "Slug",
177
+ value: A.slug,
178
+ onChange: (e) => j({
179
+ ...A,
179
180
  slug: e.target.value
180
181
  }),
181
- disabled: !!j,
182
+ disabled: !!M,
182
183
  required: !0,
183
184
  "aria-required": "true",
184
185
  className: "mt-1 w-full rounded-md border border-border-default bg-surface-default px-3 py-1.5 text-sm text-text-primary disabled:opacity-60"
185
186
  })]
186
187
  }),
187
- /* @__PURE__ */ u("label", {
188
+ /* @__PURE__ */ d("label", {
188
189
  className: "block",
189
- children: [/* @__PURE__ */ l("span", {
190
+ children: [/* @__PURE__ */ u("span", {
190
191
  className: "text-xs text-text-secondary",
191
192
  children: "Name"
192
- }), /* @__PURE__ */ l("input", {
193
+ }), /* @__PURE__ */ u("input", {
193
194
  type: "text",
194
- value: k.name,
195
- onChange: (e) => A({
196
- ...k,
195
+ "aria-label": "Name",
196
+ value: A.name,
197
+ onChange: (e) => j({
198
+ ...A,
197
199
  name: e.target.value
198
200
  }),
199
201
  required: !0,
@@ -201,230 +203,236 @@ var p = "\n query AdminStores {\n stores {\n id\n slug\n name
201
203
  className: "mt-1 w-full rounded-md border border-border-default bg-surface-default px-3 py-1.5 text-sm text-text-primary"
202
204
  })]
203
205
  }),
204
- /* @__PURE__ */ u("label", {
206
+ /* @__PURE__ */ d("label", {
205
207
  className: "block",
206
- children: [/* @__PURE__ */ l("span", {
208
+ children: [/* @__PURE__ */ u("span", {
207
209
  className: "text-xs text-text-secondary",
208
210
  children: "Type"
209
- }), /* @__PURE__ */ u("select", {
210
- value: k.type,
211
- onChange: (e) => A({
212
- ...k,
211
+ }), /* @__PURE__ */ d("select", {
212
+ "aria-label": "Store type",
213
+ value: A.type,
214
+ onChange: (e) => j({
215
+ ...A,
213
216
  type: e.target.value
214
217
  }),
215
- disabled: !!j,
218
+ disabled: !!M,
216
219
  className: "mt-1 w-full rounded-md border border-border-default bg-surface-default px-3 py-1.5 text-sm text-text-primary disabled:opacity-60",
217
220
  children: [
218
- /* @__PURE__ */ l("option", {
221
+ /* @__PURE__ */ u("option", {
219
222
  value: "PUBLIC",
220
223
  children: "Public"
221
224
  }),
222
- /* @__PURE__ */ l("option", {
225
+ /* @__PURE__ */ u("option", {
223
226
  value: "PRIVATE",
224
227
  children: "Private (opt-in)"
225
228
  }),
226
- /* @__PURE__ */ l("option", {
229
+ /* @__PURE__ */ u("option", {
227
230
  value: "ENTERPRISE",
228
231
  children: "Enterprise (tenant-scoped)"
229
232
  })
230
233
  ]
231
234
  })]
232
235
  }),
233
- /* @__PURE__ */ u("label", {
236
+ /* @__PURE__ */ d("label", {
234
237
  className: "block",
235
- children: [/* @__PURE__ */ l("span", {
238
+ children: [/* @__PURE__ */ u("span", {
236
239
  className: "text-xs text-text-secondary",
237
240
  children: "Currency"
238
- }), /* @__PURE__ */ l("input", {
241
+ }), /* @__PURE__ */ u("input", {
239
242
  type: "text",
240
- value: k.currency,
241
- onChange: (e) => A({
242
- ...k,
243
+ "aria-label": "Currency",
244
+ value: A.currency,
245
+ onChange: (e) => j({
246
+ ...A,
243
247
  currency: e.target.value
244
248
  }),
245
249
  className: "mt-1 w-full rounded-md border border-border-default bg-surface-default px-3 py-1.5 text-sm text-text-primary"
246
250
  })]
247
251
  }),
248
- k.type !== "PUBLIC" && /* @__PURE__ */ u("label", {
252
+ A.type !== "PUBLIC" && /* @__PURE__ */ d("label", {
249
253
  className: "block md:col-span-2",
250
- children: [/* @__PURE__ */ l("span", {
254
+ children: [/* @__PURE__ */ u("span", {
251
255
  className: "text-xs text-text-secondary",
252
256
  children: "Tenant ID (optional)"
253
- }), /* @__PURE__ */ l("input", {
257
+ }), /* @__PURE__ */ u("input", {
254
258
  type: "text",
255
- value: k.tenantId,
256
- onChange: (e) => A({
257
- ...k,
259
+ "aria-label": "Tenant ID",
260
+ value: A.tenantId,
261
+ onChange: (e) => j({
262
+ ...A,
258
263
  tenantId: e.target.value
259
264
  }),
260
- disabled: !!j,
265
+ disabled: !!M,
261
266
  className: "mt-1 w-full rounded-md border border-border-default bg-surface-default px-3 py-1.5 text-sm text-text-primary disabled:opacity-60"
262
267
  })]
263
268
  }),
264
- /* @__PURE__ */ u("label", {
269
+ /* @__PURE__ */ d("label", {
265
270
  className: "block md:col-span-2",
266
- children: [/* @__PURE__ */ l("span", {
271
+ children: [/* @__PURE__ */ u("span", {
267
272
  className: "text-xs text-text-secondary",
268
273
  children: "Description"
269
- }), /* @__PURE__ */ l("textarea", {
270
- value: k.description,
271
- onChange: (e) => A({
272
- ...k,
274
+ }), /* @__PURE__ */ u("textarea", {
275
+ "aria-label": "Description",
276
+ value: A.description,
277
+ onChange: (e) => j({
278
+ ...A,
273
279
  description: e.target.value
274
280
  }),
275
281
  rows: 2,
276
282
  className: "mt-1 w-full rounded-md border border-border-default bg-surface-default px-3 py-1.5 text-sm text-text-primary"
277
283
  })]
278
284
  }),
279
- /* @__PURE__ */ u("label", {
285
+ /* @__PURE__ */ d("label", {
280
286
  className: "flex items-center gap-2",
281
- children: [/* @__PURE__ */ l("input", {
287
+ children: [/* @__PURE__ */ u("input", {
282
288
  type: "checkbox",
283
- checked: k.isPublic,
284
- onChange: (e) => A({
285
- ...k,
289
+ "aria-label": "Publicly visible",
290
+ checked: A.isPublic,
291
+ onChange: (e) => j({
292
+ ...A,
286
293
  isPublic: e.target.checked
287
294
  })
288
- }), /* @__PURE__ */ l("span", {
295
+ }), /* @__PURE__ */ u("span", {
289
296
  className: "text-sm text-text-primary",
290
297
  children: "Publicly visible"
291
298
  })]
292
299
  }),
293
- /* @__PURE__ */ u("label", {
300
+ /* @__PURE__ */ d("label", {
294
301
  className: "flex items-center gap-2",
295
- children: [/* @__PURE__ */ l("input", {
302
+ children: [/* @__PURE__ */ u("input", {
296
303
  type: "checkbox",
297
- checked: k.requiresApproval,
298
- onChange: (e) => A({
299
- ...k,
304
+ "aria-label": "Requires admin approval",
305
+ checked: A.requiresApproval,
306
+ onChange: (e) => j({
307
+ ...A,
300
308
  requiresApproval: e.target.checked
301
309
  })
302
- }), /* @__PURE__ */ l("span", {
310
+ }), /* @__PURE__ */ u("span", {
303
311
  className: "text-sm text-text-primary",
304
312
  children: "Requires admin approval"
305
313
  })]
306
314
  }),
307
- /* @__PURE__ */ u("label", {
315
+ /* @__PURE__ */ d("label", {
308
316
  className: "flex items-center gap-2 md:col-span-2",
309
- children: [/* @__PURE__ */ l("input", {
317
+ children: [/* @__PURE__ */ u("input", {
310
318
  type: "checkbox",
311
- checked: k.allowUnverifiedPublishers,
312
- onChange: (e) => A({
313
- ...k,
319
+ "aria-label": "Allow unverified publishers to submit",
320
+ checked: A.allowUnverifiedPublishers,
321
+ onChange: (e) => j({
322
+ ...A,
314
323
  allowUnverifiedPublishers: e.target.checked
315
324
  })
316
- }), /* @__PURE__ */ l("span", {
325
+ }), /* @__PURE__ */ u("span", {
317
326
  className: "text-sm text-text-primary",
318
327
  children: "Allow unverified publishers to submit"
319
328
  })]
320
329
  })
321
330
  ]
322
331
  }),
323
- /* @__PURE__ */ u("div", {
332
+ /* @__PURE__ */ d("div", {
324
333
  className: "mt-4 flex justify-end gap-2",
325
- children: [/* @__PURE__ */ l("button", {
334
+ children: [/* @__PURE__ */ u("button", {
326
335
  type: "button",
327
336
  onClick: () => {
328
- O(!1), M(null), A(_);
337
+ k(!1), N(null), j(v);
329
338
  },
330
339
  className: "rounded-md border border-border-default bg-surface-default px-3 py-1.5 text-sm text-text-primary hover:bg-surface-hover",
331
340
  children: "Cancel"
332
- }), /* @__PURE__ */ l("button", {
341
+ }), /* @__PURE__ */ u("button", {
333
342
  type: "button",
334
- onClick: () => void I(),
343
+ onClick: () => void L(),
335
344
  className: "rounded-md bg-surface-accent px-3 py-1.5 text-sm font-medium text-text-on-accent hover:bg-surface-accent-hover",
336
- children: j ? "Save changes" : "Create"
345
+ children: M ? "Save changes" : "Create"
337
346
  })]
338
347
  })
339
348
  ]
340
349
  }),
341
- C && x.length === 0 ? /* @__PURE__ */ l("div", {
342
- role: "status",
343
- className: "py-16 text-center text-text-secondary",
350
+ w && S.length === 0 ? /* @__PURE__ */ u("output", {
351
+ className: "block py-16 text-center text-text-secondary",
344
352
  children: "Loading stores…"
345
- }) : x.length === 0 ? /* @__PURE__ */ l("div", {
353
+ }) : S.length === 0 ? /* @__PURE__ */ u("div", {
346
354
  className: "py-16 text-center text-text-secondary",
347
355
  children: "No stores yet."
348
- }) : /* @__PURE__ */ l("div", {
356
+ }) : /* @__PURE__ */ u("div", {
349
357
  className: "overflow-hidden rounded-lg border border-border-default",
350
- children: /* @__PURE__ */ u("table", {
358
+ children: /* @__PURE__ */ d("table", {
351
359
  className: "w-full text-sm",
352
- children: [/* @__PURE__ */ l("thead", {
360
+ children: [/* @__PURE__ */ u("thead", {
353
361
  className: "bg-surface-muted text-left text-xs uppercase tracking-wide text-text-secondary",
354
- children: /* @__PURE__ */ u("tr", { children: [
355
- /* @__PURE__ */ l("th", {
362
+ children: /* @__PURE__ */ d("tr", { children: [
363
+ /* @__PURE__ */ u("th", {
356
364
  className: "px-4 py-2",
357
365
  children: "Slug"
358
366
  }),
359
- /* @__PURE__ */ l("th", {
367
+ /* @__PURE__ */ u("th", {
360
368
  className: "px-4 py-2",
361
369
  children: "Name"
362
370
  }),
363
- /* @__PURE__ */ l("th", {
371
+ /* @__PURE__ */ u("th", {
364
372
  className: "px-4 py-2",
365
373
  children: "Type"
366
374
  }),
367
- /* @__PURE__ */ l("th", {
375
+ /* @__PURE__ */ u("th", {
368
376
  className: "px-4 py-2",
369
377
  children: "Public"
370
378
  }),
371
- /* @__PURE__ */ l("th", {
379
+ /* @__PURE__ */ u("th", {
372
380
  className: "px-4 py-2",
373
381
  children: "Approval"
374
382
  }),
375
- /* @__PURE__ */ l("th", {
383
+ /* @__PURE__ */ u("th", {
376
384
  className: "px-4 py-2",
377
385
  children: "Currency"
378
386
  }),
379
- /* @__PURE__ */ l("th", {
387
+ /* @__PURE__ */ u("th", {
380
388
  className: "px-4 py-2 text-right",
381
389
  children: "Actions"
382
390
  })
383
391
  ] })
384
- }), /* @__PURE__ */ l("tbody", {
392
+ }), /* @__PURE__ */ u("tbody", {
385
393
  className: "divide-y divide-border-default bg-surface-raised",
386
- children: x.map((e) => /* @__PURE__ */ u("tr", {
394
+ children: S.map((e) => /* @__PURE__ */ d("tr", {
387
395
  className: "text-text-primary",
388
396
  children: [
389
- /* @__PURE__ */ l("td", {
397
+ /* @__PURE__ */ u("td", {
390
398
  className: "px-4 py-2 font-mono text-xs",
391
399
  children: e.slug
392
400
  }),
393
- /* @__PURE__ */ l("td", {
401
+ /* @__PURE__ */ u("td", {
394
402
  className: "px-4 py-2",
395
403
  children: e.name
396
404
  }),
397
- /* @__PURE__ */ l("td", {
405
+ /* @__PURE__ */ u("td", {
398
406
  className: "px-4 py-2",
399
- children: /* @__PURE__ */ l("span", {
407
+ children: /* @__PURE__ */ u("span", {
400
408
  className: "rounded-full bg-surface-accent-muted px-2 py-0.5 text-xs font-medium text-text-accent",
401
409
  children: e.type
402
410
  })
403
411
  }),
404
- /* @__PURE__ */ l("td", {
412
+ /* @__PURE__ */ u("td", {
405
413
  className: "px-4 py-2 text-xs",
406
414
  children: e.isPublic ? "Yes" : "No"
407
415
  }),
408
- /* @__PURE__ */ l("td", {
416
+ /* @__PURE__ */ u("td", {
409
417
  className: "px-4 py-2 text-xs",
410
418
  children: e.requiresApproval ? "Required" : "Auto-publish"
411
419
  }),
412
- /* @__PURE__ */ l("td", {
420
+ /* @__PURE__ */ u("td", {
413
421
  className: "px-4 py-2 text-xs",
414
422
  children: e.currency
415
423
  }),
416
- /* @__PURE__ */ u("td", {
424
+ /* @__PURE__ */ d("td", {
417
425
  className: "px-4 py-2 text-right",
418
- children: [/* @__PURE__ */ u("button", {
426
+ children: [/* @__PURE__ */ d("button", {
419
427
  type: "button",
420
- onClick: () => F(e),
428
+ onClick: () => I(e),
421
429
  className: "inline-flex items-center gap-1 rounded-md border border-border-default px-2 py-1 text-xs text-text-primary hover:bg-surface-hover",
422
- children: [/* @__PURE__ */ l(i, { className: "h-3 w-3" }), "Edit"]
423
- }), e.id !== "store_public_default" && /* @__PURE__ */ u("button", {
430
+ children: [/* @__PURE__ */ u(a, { className: "size-3" }), "Edit"]
431
+ }), e.id !== "store_public_default" && /* @__PURE__ */ d("button", {
424
432
  type: "button",
425
- onClick: () => void L(e.id),
433
+ onClick: () => void R(e.id),
426
434
  className: "ml-2 inline-flex items-center gap-1 rounded-md border border-border-danger px-2 py-1 text-xs text-text-danger hover:bg-surface-danger-muted",
427
- children: [/* @__PURE__ */ l(c, { className: "h-3 w-3" }), "Delete"]
435
+ children: [/* @__PURE__ */ u(l, { className: "size-3" }), "Delete"]
428
436
  })]
429
437
  })
430
438
  ]
@@ -437,6 +445,6 @@ var p = "\n query AdminStores {\n stores {\n id\n slug\n name
437
445
  });
438
446
  };
439
447
  //#endregion
440
- export { v as AdminStoresPage };
448
+ export { y as AdminStoresPage };
441
449
 
442
450
  //# sourceMappingURL=AdminStoresPage.js.map