@burdenoff/microfe-store 2026.624.3 → 2026.624.4

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