@burdenoff/microfe-store 2026.625.2 → 2026.625.3

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