@mohasinac/appkit 3.0.3 → 3.0.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 (267) hide show
  1. package/dist/_internal/client/features/filters/filter-load-options.js +11 -1
  2. package/dist/_internal/client/features/layout/filterNavItems.js +0 -1
  3. package/dist/_internal/client/features/layout/index.js +0 -1
  4. package/dist/_internal/client/features/maintenance/views/MaintenanceDashboardView.js +0 -1
  5. package/dist/_internal/client/features/maintenance/views/ServerErrorDetailView.js +0 -1
  6. package/dist/_internal/server/features/checkout/actions.js +9 -9
  7. package/dist/_internal/server/jobs/core/cleanupRtdbEvents.js +1 -1
  8. package/dist/_internal/shared/listing-types/action-tracker.js +1 -1
  9. package/dist/client/api/ApiError.d.ts +10 -4
  10. package/dist/client/api/surface-error.js +0 -1
  11. package/dist/client.d.ts +4 -0
  12. package/dist/client.js +2 -0
  13. package/dist/core/hooks/useSyncManager.js +4 -4
  14. package/dist/features/_guide-cls.d.ts +1 -1
  15. package/dist/features/_guide-cls.js +1 -1
  16. package/dist/features/about/components/AboutView.js +1 -4
  17. package/dist/features/about/components/FAQPageView.js +1 -1
  18. package/dist/features/about/components/FeesView.js +1 -1
  19. package/dist/features/about/components/HelpPageView.js +1 -1
  20. package/dist/features/about/components/HowOrdersWorkView.js +1 -1
  21. package/dist/features/about/components/PublicProfileView.js +6 -6
  22. package/dist/features/about/components/TrackOrderView.js +1 -1
  23. package/dist/features/account/components/AddressBook.js +1 -1
  24. package/dist/features/account/components/AddressForm.js +10 -2
  25. package/dist/features/account/components/AddressesIndexListing.js +1 -1
  26. package/dist/features/account/components/BuyerAccountGuideView.js +1 -1
  27. package/dist/features/account/components/BuyerAuctionsGuideView.js +1 -1
  28. package/dist/features/account/components/BuyerOrdersGuideView.js +1 -1
  29. package/dist/features/account/components/BuyerShoppingGuideView.js +1 -1
  30. package/dist/features/account/components/ChatWindow.js +1 -1
  31. package/dist/features/account/components/MessagesView.js +1 -1
  32. package/dist/features/account/components/NotificationBell.js +25 -10
  33. package/dist/features/account/components/NotificationPreferencesPanel.js +2 -2
  34. package/dist/features/account/components/UserOffersPanel.js +1 -0
  35. package/dist/features/account/components/UserSidebar.js +1 -6
  36. package/dist/features/account/components/UserSupportView.js +1 -1
  37. package/dist/features/admin/components/AdminAnalyticsGuideView.js +2 -2
  38. package/dist/features/admin/components/AdminBlogEditorView.js +1 -1
  39. package/dist/features/admin/components/AdminBundlesView.js +1 -1
  40. package/dist/features/admin/components/AdminCarouselEditorView.js +1 -1
  41. package/dist/features/admin/components/AdminCatalogGuideView.js +2 -2
  42. package/dist/features/admin/components/AdminContentGuideView.js +2 -2
  43. package/dist/features/admin/components/AdminEmployeeEditorView.js +2 -2
  44. package/dist/features/admin/components/AdminGuideHubView.js +1 -5
  45. package/dist/features/admin/components/AdminMediaView.js +1 -1
  46. package/dist/features/admin/components/AdminNavigationView.js +1 -1
  47. package/dist/features/admin/components/AdminOrdersGuideView.js +3 -3
  48. package/dist/features/admin/components/AdminPayoutsView.js +1 -4
  49. package/dist/features/admin/components/AdminSidebar.js +1 -6
  50. package/dist/features/admin/components/AdminSiteConfigGuideView.js +1 -1
  51. package/dist/features/admin/components/AdminSiteSettingsView.js +9 -1
  52. package/dist/features/admin/components/AdminStoreEditorView.js +1 -1
  53. package/dist/features/admin/components/AdminStoresGuideView.js +2 -2
  54. package/dist/features/admin/components/AdminSupportTicketDetailView.js +7 -7
  55. package/dist/features/admin/components/AdminTeamGuideView.js +2 -2
  56. package/dist/features/admin/components/AdminTrustGuideView.js +3 -3
  57. package/dist/features/admin/components/AdminUsersGuideView.js +3 -3
  58. package/dist/features/admin/components/DashboardStats.js +6 -5
  59. package/dist/features/admin/components/DataTable.js +2 -2
  60. package/dist/features/admin/components/analytics/AdminAnalyticsCharts.js +4 -6
  61. package/dist/features/admin/components/analytics/AdminStatCard.js +4 -3
  62. package/dist/features/admin/components/analytics/AdminTopProductsTable.js +1 -1
  63. package/dist/features/auctions/components/AuctionBidsTable.js +1 -1
  64. package/dist/features/auctions/components/AuctionDetailPageView.js +1 -1
  65. package/dist/features/auctions/components/MarketplaceAuctionCard.js +3 -3
  66. package/dist/features/auth/components/ForgotPasswordView.js +19 -8
  67. package/dist/features/auth/components/LoginForm.js +10 -2
  68. package/dist/features/auth/components/RegisterForm.js +10 -2
  69. package/dist/features/auth/components/ResetPasswordView.js +19 -8
  70. package/dist/features/auth/components/SocialAuthButtons.js +1 -1
  71. package/dist/features/before-after/components/BeforeAfterSlider.js +1 -1
  72. package/dist/features/blog/api/[slug]/route.js +1 -1
  73. package/dist/features/blog/components/BlogFeaturedCard.js +1 -1
  74. package/dist/features/blog/components/BlogListView.js +1 -1
  75. package/dist/features/blog/components/BlogPostView.js +1 -1
  76. package/dist/features/blog/schemas/index.d.ts +2 -2
  77. package/dist/features/cart/components/CartDrawer.js +2 -2
  78. package/dist/features/cart/components/CartView.js +1 -1
  79. package/dist/features/cart/components/CheckoutView.js +1 -1
  80. package/dist/features/categories/components/BrandDetailPageView.js +2 -1
  81. package/dist/features/categories/components/BundleDetailView.js +1 -1
  82. package/dist/features/categories/components/BundleItemsPicker.js +1 -1
  83. package/dist/features/categories/components/CategoryBundlesListing.js +3 -1
  84. package/dist/features/categories/components/CategoryDetailPageView.js +1 -1
  85. package/dist/features/categories/components/CategoryGrid.js +2 -1
  86. package/dist/features/categories/components/CategoryTableColumns.js +5 -2
  87. package/dist/features/categories/components/CategoryTree.js +3 -2
  88. package/dist/features/categories/components/ConcernCard.js +1 -1
  89. package/dist/features/categories/schemas/index.d.ts +2 -2
  90. package/dist/features/checkout/components/CheckoutStepper.js +1 -1
  91. package/dist/features/collections/components/CollectionCard.js +1 -1
  92. package/dist/features/contact/components/ContactPageView.js +27 -27
  93. package/dist/features/contact/email.js +4 -4
  94. package/dist/features/copilot/components/AdminCopilotView.js +3 -3
  95. package/dist/features/email/primitives.d.ts +4 -0
  96. package/dist/features/email/primitives.js +4 -0
  97. package/dist/features/events/components/EventCard.js +2 -2
  98. package/dist/features/events/components/EventOfferCard.js +1 -1
  99. package/dist/features/events/components/EventRaffleEntryForm.js +1 -1
  100. package/dist/features/events/components/EventRaffleWinnerView.js +2 -2
  101. package/dist/features/events/components/EventSaleBanner.js +0 -1
  102. package/dist/features/events/schemas/index.d.ts +2 -2
  103. package/dist/features/faq/components/ContactCTA.js +1 -1
  104. package/dist/features/faq/components/FAQAccordion.js +2 -2
  105. package/dist/features/faq/components/FAQCategorySidebar.js +2 -2
  106. package/dist/features/faq/components/FAQHelpfulButtons.js +2 -2
  107. package/dist/features/faq/components/RelatedFAQs.js +1 -1
  108. package/dist/features/faq/schemas/index.d.ts +2 -2
  109. package/dist/features/filters/AsyncFacetSection.js +3 -3
  110. package/dist/features/filters/FilterFacetSection.js +6 -6
  111. package/dist/features/filters/RangeFilter.js +2 -2
  112. package/dist/features/filters/SwitchFilter.js +1 -1
  113. package/dist/features/forms/Checkbox.js +1 -1
  114. package/dist/features/forms/Slider.js +7 -2
  115. package/dist/features/forms/utils.d.ts +2 -2
  116. package/dist/features/forms/utils.js +2 -2
  117. package/dist/features/history/hooks/useHistory.js +1 -1
  118. package/dist/features/homepage/components/AdSlot.js +3 -3
  119. package/dist/features/homepage/components/AdvertisementBanner.js +5 -4
  120. package/dist/features/homepage/components/BeforeAfterCard.js +9 -1
  121. package/dist/features/homepage/components/CharacterHotspot.js +42 -49
  122. package/dist/features/homepage/components/CharacterHotspotForm.js +18 -20
  123. package/dist/features/homepage/components/CollectionCardsSection.js +2 -2
  124. package/dist/features/homepage/components/CustomCardsSection.js +3 -6
  125. package/dist/features/homepage/components/CustomerReviewsSection.js +1 -1
  126. package/dist/features/homepage/components/FAQSection.js +2 -2
  127. package/dist/features/homepage/components/FeaturedResultsSection.js +1 -1
  128. package/dist/features/homepage/components/GoogleReviewsSection.js +4 -4
  129. package/dist/features/homepage/components/HeroBanner.js +12 -63
  130. package/dist/features/homepage/components/HeroCarousel.js +6 -6
  131. package/dist/features/homepage/components/HeroSection.js +1 -1
  132. package/dist/features/homepage/components/HowItWorksInfoView.js +1 -1
  133. package/dist/features/homepage/components/HowItWorksSection.js +5 -3
  134. package/dist/features/homepage/components/NewsletterBanner.js +3 -7
  135. package/dist/features/homepage/components/PromoGrid.js +2 -26
  136. package/dist/features/homepage/components/SectionCarousel.js +1 -1
  137. package/dist/features/homepage/components/SecurityHighlightsSection.js +6 -3
  138. package/dist/features/homepage/components/ShopByCategorySection.js +3 -3
  139. package/dist/features/homepage/components/SiteFeaturesSection.js +1 -1
  140. package/dist/features/homepage/components/SocialPostCard.js +2 -3
  141. package/dist/features/homepage/components/StatsCounterSection.js +6 -3
  142. package/dist/features/homepage/components/TestimonialsCarousel.js +2 -25
  143. package/dist/features/homepage/components/TrustBadges.js +1 -9
  144. package/dist/features/homepage/components/TrustFeaturesSection.js +6 -3
  145. package/dist/features/homepage/components/TrustIndicatorsSection.js +1 -1
  146. package/dist/features/homepage/components/WelcomeSection.js +2 -2
  147. package/dist/features/homepage/components/WhatsAppCommunitySection.js +1 -1
  148. package/dist/features/homepage/lib/franchise-colors.d.ts +7 -0
  149. package/dist/features/homepage/lib/franchise-colors.js +7 -0
  150. package/dist/features/homepage/lib/live-stats.js +5 -5
  151. package/dist/features/layout/AppLayoutShell.js +7 -9
  152. package/dist/features/layout/BottomNavbar.js +1 -2
  153. package/dist/features/messages/hooks/useConversation.js +2 -1
  154. package/dist/features/messages/hooks/useConversations.js +1 -0
  155. package/dist/features/orders/components/OrdersList.js +1 -1
  156. package/dist/features/orders/components/RefundHistoryTable.d.ts +6 -0
  157. package/dist/features/orders/components/RefundHistoryTable.js +3 -2
  158. package/dist/features/pre-orders/components/MarketplacePreorderCard.js +2 -2
  159. package/dist/features/pre-orders/components/PreOrderBadge.js +1 -1
  160. package/dist/features/pre-orders/components/PreOrderDetailPageView.js +2 -1
  161. package/dist/features/products/components/CompareOverlay.js +11 -8
  162. package/dist/features/products/components/CustomSectionTabContent.js +1 -1
  163. package/dist/features/products/components/FeatureBadge.js +11 -1
  164. package/dist/features/products/components/GroupSettingsPanel.js +2 -2
  165. package/dist/features/products/components/MarketplaceBundleCard.js +1 -1
  166. package/dist/features/products/components/MarketplacePrizeDrawCard.js +2 -2
  167. package/dist/features/products/components/PrizeDrawItemsEditor.js +1 -1
  168. package/dist/features/products/components/PrizeDrawsIndexListing.js +1 -1
  169. package/dist/features/products/components/ProductCardMetadataSection.js +0 -1
  170. package/dist/features/products/components/ProductDetailPageView.js +1 -1
  171. package/dist/features/products/components/ProductFeatureBadges.js +1 -1
  172. package/dist/features/products/components/ProductGalleryClient.js +1 -1
  173. package/dist/features/products/components/ProductGrid.js +7 -7
  174. package/dist/features/products/components/ShareButton.js +1 -1
  175. package/dist/features/products/components/ShowGroupSection.js +7 -5
  176. package/dist/features/products/components/SublistingCarouselSection.js +2 -2
  177. package/dist/features/products/schemas/index.d.ts +2 -2
  178. package/dist/features/promotions/components/CouponCard.js +2 -2
  179. package/dist/features/promotions/schemas/index.d.ts +2 -2
  180. package/dist/features/reviews/components/ReviewDetailShell.js +3 -3
  181. package/dist/features/reviews/components/ReviewModal.js +2 -4
  182. package/dist/features/reviews/components/ReviewSummary.js +3 -2
  183. package/dist/features/reviews/components/ReviewsList.js +1 -1
  184. package/dist/features/scams/actions/scam-actions.js +1 -1
  185. package/dist/features/scams/components/ScamProfileView.js +1 -1
  186. package/dist/features/search/components/Search.js +2 -2
  187. package/dist/features/search/components/SearchFiltersRow.js +1 -1
  188. package/dist/features/search/schemas/index.d.ts +1 -1
  189. package/dist/features/seller/components/PhysicalLocationModal.js +2 -3
  190. package/dist/features/seller/components/SellerAddressesView.js +2 -1
  191. package/dist/features/seller/components/SellerAnalyticsAlertsView.js +1 -1
  192. package/dist/features/seller/components/SellerBidsView.js +1 -1
  193. package/dist/features/seller/components/SellerCouponEditorView.js +1 -1
  194. package/dist/features/seller/components/SellerGoogleReviewsView.js +1 -1
  195. package/dist/features/seller/components/SellerLiveView.js +1 -1
  196. package/dist/features/seller/components/SellerOffersPanel.js +1 -0
  197. package/dist/features/seller/components/SellerOrdersView.js +1 -1
  198. package/dist/features/seller/components/SellerPayoutMethodsView.js +8 -2
  199. package/dist/features/seller/components/SellerPayoutRequestView.js +1 -1
  200. package/dist/features/seller/components/SellerPayoutSettingsView.js +1 -1
  201. package/dist/features/seller/components/SellerProductShell.js +2 -2
  202. package/dist/features/seller/components/SellerProductsCards.js +1 -1
  203. package/dist/features/seller/components/SellerProductsView.js +1 -1
  204. package/dist/features/seller/components/SellerReviewsView.js +2 -1
  205. package/dist/features/seller/components/SellerShippingConfigsView.js +9 -3
  206. package/dist/features/seller/components/SellerShippingView.js +1 -1
  207. package/dist/features/seller/components/SellerSidebar.js +3 -8
  208. package/dist/features/seller/components/SellerStoreCategoriesView.js +11 -3
  209. package/dist/features/seller/components/SellerTemplatesView.js +8 -2
  210. package/dist/features/seller/components/analytics/SellerRevenueChart.js +1 -1
  211. package/dist/features/seller/components/analytics/SellerTopProducts.js +1 -1
  212. package/dist/features/seller/schemas/index.d.ts +2 -2
  213. package/dist/features/shell/FormShell.js +2 -2
  214. package/dist/features/shell/QuickFormDrawer.js +1 -1
  215. package/dist/features/site-settings/components/NavPermissionsManager.js +1 -1
  216. package/dist/features/stores/components/StoreCapabilitiesGuideView.js +1 -1
  217. package/dist/features/stores/components/StoreGuideHubView.js +2 -9
  218. package/dist/features/stores/components/StoreHeader.js +1 -1
  219. package/dist/features/stores/components/StoreListingsGuideView.js +4 -4
  220. package/dist/features/stores/components/StoreOrdersGuideView.js +2 -2
  221. package/dist/features/stores/components/StoresIndexListing.js +1 -1
  222. package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +2 -2
  223. package/dist/features/wishlist/components/WishlistPage.js +1 -1
  224. package/dist/features/wishlist/components/WishlistToggleButton.js +3 -3
  225. package/dist/features/wishlist/hooks/useWishlistCount.js +1 -1
  226. package/dist/http/ApiClient.d.ts +1 -0
  227. package/dist/http/ApiClient.js +20 -0
  228. package/dist/monitoring/error-tracking.d.ts +0 -3
  229. package/dist/monitoring/error-tracking.js +1 -1
  230. package/dist/monitoring/server-logger.js +3 -3
  231. package/dist/next/components/GlobalError.js +1 -1
  232. package/dist/react/ErrorBoundary.js +1 -1
  233. package/dist/styles.css +45 -7
  234. package/dist/tailwind-utilities.css +1 -1
  235. package/dist/tokens/themes/default-light.js +3 -0
  236. package/dist/tokens/tokens.css +43 -6
  237. package/dist/ui/components/Anchor.d.ts +8 -1
  238. package/dist/ui/components/Anchor.js +16 -2
  239. package/dist/ui/components/Button.d.ts +5 -2
  240. package/dist/ui/components/Button.js +5 -2
  241. package/dist/ui/components/Details.d.ts +33 -2
  242. package/dist/ui/components/Details.js +73 -4
  243. package/dist/ui/components/Div.d.ts +3 -0
  244. package/dist/ui/components/Div.js +12 -1
  245. package/dist/ui/components/DynamicBgDiv.d.ts +13 -0
  246. package/dist/ui/components/DynamicBgDiv.js +18 -0
  247. package/dist/ui/components/Form.d.ts +3 -19
  248. package/dist/ui/components/Form.js +8 -1
  249. package/dist/ui/components/Layout.d.ts +12 -1
  250. package/dist/ui/components/Layout.js +9 -1
  251. package/dist/ui/components/Progress.d.ts +1 -1
  252. package/dist/ui/components/Progress.js +1 -0
  253. package/dist/ui/components/Progress.style.css +1 -0
  254. package/dist/ui/components/ProgressBarFill.d.ts +6 -0
  255. package/dist/ui/components/ProgressBarFill.js +11 -0
  256. package/dist/ui/components/Semantic.d.ts +26 -7
  257. package/dist/ui/components/Semantic.js +33 -8
  258. package/dist/ui/components/TextLink.d.ts +36 -1
  259. package/dist/ui/components/TextLink.js +30 -2
  260. package/dist/ui/components/Typography.d.ts +26 -6
  261. package/dist/ui/components/Typography.js +37 -13
  262. package/dist/ui/components/VacationBanner.js +0 -1
  263. package/dist/ui/components/surface-tokens.d.ts +12 -2
  264. package/dist/ui/components/surface-tokens.js +19 -1
  265. package/dist/ui/rich-text/RichText.js +1 -1
  266. package/dist/validation/schemas.d.ts +1 -1
  267. package/package.json +1 -1
@@ -71,9 +71,15 @@ export function SellerPayoutMethodsView({ onCreateClick, onEditClick, onDelete,
71
71
  })),
72
72
  });
73
73
  const handleDelete = useCallback(async (id) => {
74
- await performDelete(id);
74
+ try {
75
+ await performDelete(id);
76
+ }
77
+ catch (err) {
78
+ void normalizeError(err);
79
+ showToast(err instanceof Error ? err.message : "Failed to delete payout method", "error");
80
+ }
75
81
  setDeleteTargetId(null);
76
- }, [performDelete]);
82
+ }, [performDelete, showToast]);
77
83
  const handleSetDefault = useCallback(async (id) => {
78
84
  setSettingDefaultId(id);
79
85
  try {
@@ -28,7 +28,7 @@ export function SellerPayoutRequestView({ payoutsApiBase = "/api/store/payouts",
28
28
  setSummary(payoutsJson?.data?.summary ?? null);
29
29
  setPayoutDetails(settingsJson?.data?.payoutDetails ?? null);
30
30
  })
31
- .catch(() => { })
31
+ .catch(console.error)
32
32
  .finally(() => setLoading(false));
33
33
  }, [payoutsApiBase, payoutSettingsApiBase]);
34
34
  const handleRequest = async () => {
@@ -53,7 +53,7 @@ export function SellerPayoutSettingsView({ apiBase = "/api/store/payout-settings
53
53
  : "",
54
54
  });
55
55
  })
56
- .catch(() => { })
56
+ .catch(console.error)
57
57
  .finally(() => setLoading(false));
58
58
  }, [apiBase]);
59
59
  const update = useCallback((partial) => {
@@ -175,7 +175,7 @@ export function SellerProductShell({ mode, listingType = "standard", initialValu
175
175
  autoSaveTimer.current = setTimeout(() => {
176
176
  const result = onSaveRef.current(draftRef.current);
177
177
  if (result && typeof result.catch === "function")
178
- result.catch(() => { });
178
+ result.catch(console.error);
179
179
  }, 2000);
180
180
  return () => { if (autoSaveTimer.current)
181
181
  clearTimeout(autoSaveTimer.current); };
@@ -343,7 +343,7 @@ export function SellerProductShell({ mode, listingType = "standard", initialValu
343
343
  }) }) }) }));
344
344
  }
345
345
  if (mode === "create") {
346
- return (_jsx(FormShell, { isOpen: true, onClose: handleDiscard, title: title, breadcrumb: breadcrumb, isDirty: isDirty, isLoading: isLoading, previewSlot: previewSlot, splitPreview: !!previewSlot, renderBottomBar: () => (_jsxs(Div, { className: "flex-shrink-0 border-t border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)]", children: [_jsx(StepFormActions, { currentStep: currentStep, totalSteps: steps.length, onNext: () => void handleNext(), onPrev: currentStep > 0 ? () => setCurrentStep((c) => c - 1) : undefined, completeLabel: `Publish ${listingTypeLabel}`, isLoading: isLoading && currentStep === steps.length - 1, disabled: isLoading }), currentStep === 0 && (_jsx(Div, { paddingX: "x-5", padding: "b-sm", children: _jsx(Button, { variant: "ghost", size: "sm", onClick: () => void handleSave(), disabled: isLoading || !draft.title?.trim(), children: "Save as draft & finish later" }) })), stepError && (_jsx(Text, { className: "px-5 pb-3 text-[var(--appkit-color-error)]", size: "sm", children: stepError }))] })), children: _jsx(FormShellProvider, { isDirty: isDirty, values: draft, children: _jsx(StepForm, { steps: steps, values: draft, onChange: update, onComplete: handlePublish, completeLabel: `Publish ${listingTypeLabel}`, currentStep: currentStep, onStepChange: setCurrentStep, isLoading: isLoading, hideActions: true, stepErrors: stepValidationErrors }) }) }));
346
+ return (_jsx(FormShell, { isOpen: true, onClose: handleDiscard, title: title, breadcrumb: breadcrumb, isDirty: isDirty, isLoading: isLoading, previewSlot: previewSlot, splitPreview: !!previewSlot, renderBottomBar: () => (_jsxs(Div, { className: "flex-shrink-0 border-t border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)]", children: [_jsx(StepFormActions, { currentStep: currentStep, totalSteps: steps.length, onNext: () => void handleNext(), onPrev: currentStep > 0 ? () => setCurrentStep((c) => c - 1) : undefined, completeLabel: `Publish ${listingTypeLabel}`, isLoading: isLoading && currentStep === steps.length - 1, disabled: isLoading }), currentStep === 0 && (_jsx(Div, { paddingX: "x-5", padding: "b-sm", children: _jsx(Button, { variant: "ghost", size: "sm", onClick: () => void handleSave(), disabled: isLoading || !draft.title?.trim(), children: "Save as draft & finish later" }) })), stepError && (_jsx(Text, { className: "text-[var(--appkit-color-error)] px-[1.25rem] pb-[0.75rem]", size: "sm", children: stepError }))] })), children: _jsx(FormShellProvider, { isDirty: isDirty, values: draft, children: _jsx(StepForm, { steps: steps, values: draft, onChange: update, onComplete: handlePublish, completeLabel: `Publish ${listingTypeLabel}`, currentStep: currentStep, onStepChange: setCurrentStep, isLoading: isLoading, hideActions: true, stepErrors: stepValidationErrors }) }) }));
347
347
  }
348
348
  // Edit mode — FormShell with section nav + full form
349
349
  const editSections = [
@@ -25,6 +25,6 @@ export function SellerProductsCards({ view, rows, isLoading, listingKind, select
25
25
  return (_jsxs(Container, { ...containerProps, children: [rows.length === 0 && !isLoading && (_jsx(Text, { className: "text-[var(--appkit-color-text-muted)] col-span-full", size: "sm", children: listingKind !== "all" ? `No ${listingKind} listings found` : "No products listed yet" })), rows.map((row) => {
26
26
  const isSelected = selectedIds.has(row.id);
27
27
  const href = buildHref(row);
28
- return view === "grid" ? (_jsxs(Div, { className: "group relative bg-[var(--appkit-color-surface)] overflow-hidden hover:shadow-md transition-shadow", rounded: "xl", border: isSelected ? "strong" : "default", children: [_jsx(Div, { className: "absolute top-2 left-2 z-10", children: _jsx("input", { type: "checkbox", checked: isSelected, onChange: () => toggle(row.id), className: "h-4 w-4 rounded border-[var(--appkit-color-border)]", onClick: (e) => e.stopPropagation(), "aria-label": "Select" }) }), _jsxs(TextLink, { href: href, className: "block", children: [_jsx(Div, { className: "w-full aspect-square", children: _jsx(MediaImage, { src: row.imageUrl, alt: row.primary, size: "card" }) }), _jsxs(Stack, { className: `${__P.p3}`, gap: "xs", children: [_jsx(Text, { className: "line-clamp-1", size: "sm", weight: "medium", children: row.primary }), _jsxs(Row, { gap: "sm", children: [_jsx(Badge, { variant: LISTING_BADGE_VARIANT[row.listingKind] ?? "default", children: row.listingKind }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)] line-clamp-1", size: "xs", children: row.secondary })] })] })] }), _jsxs(Row, { className: "border-t border-[var(--appkit-color-border)]", justify: "end", gap: "xs", padding: "xs", children: [_jsx(Button, { variant: "ghost", size: "sm", onClick: (e) => { e.stopPropagation(); onEdit(row); }, "aria-label": "Edit", children: ROW_ACTION_META[ROW_ACTION_ID.EDIT].label }), _jsx(Button, { variant: "ghost", size: "sm", onClick: (e) => { e.stopPropagation(); onDuplicate(row); }, "aria-label": "Duplicate", children: ROW_ACTION_META[ROW_ACTION_ID.DUPLICATE].label }), onDelete && (_jsx(Button, { variant: "ghost", size: "sm", onClick: (e) => { e.stopPropagation(); onDelete(row); }, "aria-label": "Delete", children: ROW_ACTION_META[ROW_ACTION_ID.DELETE].label }))] })] }, row.id)) : (_jsxs(Row, { className: "bg-[var(--appkit-color-surface)] hover:bg-[var(--appkit-color-surface-raised)]", align: "center", gap: "3", rounded: "lg", padding: "inlineSm", border: isSelected ? "strong" : "default", children: [_jsx("input", { type: "checkbox", checked: isSelected, onChange: () => toggle(row.id), className: "h-4 w-4 rounded border-[var(--appkit-color-border)]", "aria-label": "Select" }), _jsx(Div, { className: `w-12 h-12 ${__O.hidden}`, rounded: "default", children: _jsx(MediaImage, { src: row.imageUrl, alt: row.primary, size: "thumbnail" }) }), _jsxs(TextLink, { href: href, className: "flex-1 min-w-0", children: [_jsx(Text, { className: "line-clamp-1", size: "sm", weight: "medium", children: row.primary }), _jsxs(Row, { gap: "sm", children: [_jsx(Badge, { variant: LISTING_BADGE_VARIANT[row.listingKind] ?? "default", children: row.listingKind }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)] line-clamp-1", size: "xs", children: row.secondary })] })] }), _jsxs(Row, { className: "flex-shrink-0", gap: "xs", children: [_jsx(Button, { variant: "ghost", size: "sm", onClick: () => onEdit(row), "aria-label": "Edit", children: ROW_ACTION_META[ROW_ACTION_ID.EDIT].label }), _jsx(Button, { variant: "ghost", size: "sm", onClick: () => onDuplicate(row), "aria-label": "Duplicate", children: ROW_ACTION_META[ROW_ACTION_ID.DUPLICATE].label }), onDelete && (_jsx(Button, { variant: "ghost", size: "sm", onClick: () => onDelete(row), "aria-label": "Delete", children: ROW_ACTION_META[ROW_ACTION_ID.DELETE].label }))] })] }, row.id));
28
+ return view === "grid" ? (_jsxs(Div, { className: "group relative bg-[var(--appkit-color-surface)] overflow-hidden", shadow: "hover-md", rounded: "xl", border: isSelected ? "strong" : "default", children: [_jsx(Div, { className: "absolute top-2 left-2 z-10", children: _jsx("input", { type: "checkbox", checked: isSelected, onChange: () => toggle(row.id), className: "h-4 w-4 rounded border-[var(--appkit-color-border)]", onClick: (e) => e.stopPropagation(), "aria-label": "Select" }) }), _jsxs(TextLink, { href: href, className: "block", children: [_jsx(Div, { className: "w-full aspect-square", children: _jsx(MediaImage, { src: row.imageUrl, alt: row.primary, size: "card" }) }), _jsxs(Stack, { className: `${__P.p3}`, gap: "xs", children: [_jsx(Text, { className: "line-clamp-1", size: "sm", weight: "medium", children: row.primary }), _jsxs(Row, { gap: "sm", children: [_jsx(Badge, { variant: LISTING_BADGE_VARIANT[row.listingKind] ?? "default", children: row.listingKind }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)] line-clamp-1", size: "xs", children: row.secondary })] })] })] }), _jsxs(Row, { className: "border-t border-[var(--appkit-color-border)]", justify: "end", gap: "xs", padding: "xs", children: [_jsx(Button, { variant: "ghost", size: "sm", onClick: (e) => { e.stopPropagation(); onEdit(row); }, "aria-label": "Edit", children: ROW_ACTION_META[ROW_ACTION_ID.EDIT].label }), _jsx(Button, { variant: "ghost", size: "sm", onClick: (e) => { e.stopPropagation(); onDuplicate(row); }, "aria-label": "Duplicate", children: ROW_ACTION_META[ROW_ACTION_ID.DUPLICATE].label }), onDelete && (_jsx(Button, { variant: "ghost", size: "sm", onClick: (e) => { e.stopPropagation(); onDelete(row); }, "aria-label": "Delete", children: ROW_ACTION_META[ROW_ACTION_ID.DELETE].label }))] })] }, row.id)) : (_jsxs(Row, { className: "bg-[var(--appkit-color-surface)] hover:bg-[var(--appkit-color-surface-raised)]", align: "center", gap: "3", rounded: "lg", padding: "inlineSm", border: isSelected ? "strong" : "default", children: [_jsx("input", { type: "checkbox", checked: isSelected, onChange: () => toggle(row.id), className: "h-4 w-4 rounded border-[var(--appkit-color-border)]", "aria-label": "Select" }), _jsx(Div, { className: `w-12 h-12 ${__O.hidden}`, rounded: "default", children: _jsx(MediaImage, { src: row.imageUrl, alt: row.primary, size: "thumbnail" }) }), _jsxs(TextLink, { href: href, className: "flex-1 min-w-0", children: [_jsx(Text, { className: "line-clamp-1", size: "sm", weight: "medium", children: row.primary }), _jsxs(Row, { gap: "sm", children: [_jsx(Badge, { variant: LISTING_BADGE_VARIANT[row.listingKind] ?? "default", children: row.listingKind }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)] line-clamp-1", size: "xs", children: row.secondary })] })] }), _jsxs(Row, { className: "flex-shrink-0", gap: "xs", children: [_jsx(Button, { variant: "ghost", size: "sm", onClick: () => onEdit(row), "aria-label": "Edit", children: ROW_ACTION_META[ROW_ACTION_ID.EDIT].label }), _jsx(Button, { variant: "ghost", size: "sm", onClick: () => onDuplicate(row), "aria-label": "Duplicate", children: ROW_ACTION_META[ROW_ACTION_ID.DUPLICATE].label }), onDelete && (_jsx(Button, { variant: "ghost", size: "sm", onClick: () => onDelete(row), "aria-label": "Delete", children: ROW_ACTION_META[ROW_ACTION_ID.DELETE].label }))] })] }, row.id));
29
29
  })] }));
30
30
  }
@@ -295,7 +295,7 @@ export function SellerProductsView({ onDeleteProduct, onCreateClick, children, .
295
295
  useBottomActions(selection.selectedCount > 0 ? { bulk: { selectedCount: selection.selectedCount, onClearSelection: selection.clearSelection, actions: bulkActions } } : {});
296
296
  return (_jsxs(_Fragment, { children: [_jsxs(Div, { className: "min-h-screen", children: [_jsx(ListingToolbar, { filterCount: activeFilterCount, onFiltersClick: openFilters, searchValue: searchInput, searchPlaceholder: "Search products by name\u2026", onSearchChange: setSearchInput, onSearchCommit: commitSearch, sortValue: table.get("sort") || DEFAULT_SORT, sortOptions: SORT_OPTIONS, onSortChange: (v) => { table.set("sort", v); }, showTableView: true, view: view, onViewChange: (v) => setView(v), onResetAll: resetAll, hasActiveState: hasActiveState, toggles: [
297
297
  { label: "Show sold", active: showSold, onChange: (next) => table.set("showSold", next ? "true" : "") },
298
- ], extra: onCreateClick ? (_jsx(Button, { variant: "primary", size: "sm", onClick: onCreateClick, children: "+ New Listing" })) : null }), _jsx(TypeDropdown, { active: listingKind, onChange: handleKindChange }), totalPages > 1 && (_jsx(Row, { className: "sticky z-10 bg-[var(--appkit-color-surface)]/95 backdrop-blur-sm border-b border-[var(--appkit-color-border)] py-1.5", padding: "x-sm", justify: "center", style: { top: "calc(var(--header-height, 0px) + 44px)" }, children: _jsx(Pagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), selection.selectedIds.length > 0 && (_jsx(Div, { paddingX: "x-sm-lg-md", className: "sticky z-20 bg-[var(--appkit-color-surface)]/95 backdrop-blur-sm border-b border-[var(--appkit-color-border)]", padding: "y-xs", style: { top: "calc(var(--header-height, 0px) + 88px)" }, children: _jsx(BulkActionBar, { selectedCount: selection.selectedIds.length, onClearSelection: selection.clearSelection, actions: bulkActions }) })), _jsxs(Div, { paddingX: "x-sm-lg-md", padding: "y-md", children: [errorMessage && (_jsx(Alert, { variant: "error", className: "mb-4", children: errorMessage })), view !== "table" && (_jsx(SellerProductsCards, { view: view, rows: visibleRows, isLoading: isLoading, listingKind: listingKind, selectedIds: selection.selectedIdSet, toggle: selection.toggle, onEdit: handleEdit, onDuplicate: (row) => void handleDuplicate(row), onDelete: onDeleteProduct ? (row) => void handleDelete(row) : undefined })), view === "table" && (_jsx(DataTable, { columns: PRODUCT_COLUMNS, rows: visibleRows, isLoading: isLoading, emptyLabel: listingKind !== "all"
298
+ ], extra: onCreateClick ? (_jsx(Button, { variant: "primary", size: "sm", onClick: onCreateClick, children: "+ New Listing" })) : null }), _jsx(TypeDropdown, { active: listingKind, onChange: handleKindChange }), totalPages > 1 && (_jsx(Row, { className: "sticky top-[calc(var(--header-height,0px)+44px)] z-10 bg-[var(--appkit-color-surface)]/95 backdrop-blur-sm border-b border-[var(--appkit-color-border)] py-[0.375rem]", padding: "x-sm", justify: "center", children: _jsx(Pagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), selection.selectedIds.length > 0 && (_jsx(Div, { paddingX: "x-sm-lg-md", className: "sticky top-[calc(var(--header-height,0px)+88px)] z-20 bg-[var(--appkit-color-surface)]/95 backdrop-blur-sm border-b border-[var(--appkit-color-border)]", padding: "y-xs", children: _jsx(BulkActionBar, { selectedCount: selection.selectedIds.length, onClearSelection: selection.clearSelection, actions: bulkActions }) })), _jsxs(Div, { paddingX: "x-sm-lg-md", padding: "y-md", children: [errorMessage && (_jsx(Alert, { variant: "error", className: "mb-4", children: errorMessage })), view !== "table" && (_jsx(SellerProductsCards, { view: view, rows: visibleRows, isLoading: isLoading, listingKind: listingKind, selectedIds: selection.selectedIdSet, toggle: selection.toggle, onEdit: handleEdit, onDuplicate: (row) => void handleDuplicate(row), onDelete: onDeleteProduct ? (row) => void handleDelete(row) : undefined })), view === "table" && (_jsx(DataTable, { columns: PRODUCT_COLUMNS, rows: visibleRows, isLoading: isLoading, emptyLabel: listingKind !== "all"
299
299
  ? `No ${listingKind} listings found`
300
300
  : "No products listed yet", selectedIds: selection.selectedIdSet, onToggleSelect: selection.toggle, onToggleSelectAll: () => selection.toggleAll(), getRowHref: (row) =>
301
301
  // S-STORE-2-D — row click → public detail/preview, not edit.
@@ -110,6 +110,7 @@ export function SellerReviewsView({ reviewsApiBase = "/api/store/reviews", reply
110
110
  setMeta(json?.data?.meta ?? null);
111
111
  }
112
112
  catch (err) {
113
+ // toast-intentionally-silent: data load, error surfaced via error state
113
114
  void normalizeError(err);
114
115
  setError(err.message);
115
116
  }
@@ -174,6 +175,6 @@ export function SellerReviewsView({ reviewsApiBase = "/api/store/reviews", reply
174
175
  label: "Reply to selected",
175
176
  onClick: () => setBulkReplyOpen(true),
176
177
  },
177
- ] })), loading ? (_jsx(Div, { className: "text-center", padding: "y-xl", children: _jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", children: "Loading reviews\u2026" }) })) : reviews.length === 0 ? (_jsx(Div, { className: "text-center", padding: "y-3xl", children: _jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", children: "No reviews found." }) })) : (_jsx(Stack, { gap: "md", children: reviews.map((review) => (_jsx(Div, { className: "border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)]", rounded: "lg", padding: "md", children: _jsxs(Row, { align: "start", justify: "between", gap: "3", wrap: true, children: [_jsxs(Row, { align: "start", className: "flex-1 min-w-0", gap: "3", children: [_jsx(Checkbox, { checked: selectedIds.has(review.id), onChange: () => toggleSelected(review.id), "aria-label": "Select review" }), _jsxs(Div, { className: "flex-1 min-w-0", children: [_jsx(Text, { className: "truncate", weight: "medium", children: review.productTitle }), _jsxs(Row, { className: "mt-1", align: "center", gap: "sm", wrap: true, children: [_jsx(Stars, { rating: review.rating }), _jsxs(Text, { className: "text-[var(--appkit-color-text-muted)]", size: "sm", children: ["by ", review.userName] }), review.verified && _jsx(Badge, { variant: "success", children: "Verified" }), statusBadge(review.status), _jsx(Badge, { variant: review.sellerReply ? "success" : "warning", children: review.sellerReply ? "Store replied" : "Awaiting store reply" })] }), review.title && _jsx(Text, { className: "mt-2", weight: "medium", children: review.title }), _jsx(Text, { className: "mt-1 text-[var(--appkit-color-text-secondary)] line-clamp-3", size: "sm", children: review.comment }), review.sellerReply && (_jsxs(Div, { className: "mt-2 pl-3 border-l-2 border-[var(--appkit-color-primary)]", children: [_jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", size: "xs", children: "Store reply:" }), _jsx(Text, { size: "sm", children: review.sellerReply })] }))] })] }), _jsxs(Row, { className: "flex-shrink-0", gap: "sm", children: [_jsx(Button, { variant: "outline", size: "sm", onClick: () => openReply(review), children: review.sellerReply ? "Edit Reply" : ACTIONS.STORE["reply-review"].label }), _jsx(Button, { variant: "ghost", size: "sm", onClick: () => setContestTarget(review), children: ACTIONS.STORE["contest-review"].label }), _jsx(Button, { variant: "ghost", size: "sm", onClick: () => setFeedbackTarget(review), children: ACTIONS.STORE["buyer-feedback"].label })] })] }) }, review.id))) })), meta && meta.totalPages > 1 && (_jsxs(Row, { align: "center", justify: "center", gap: "sm", children: [_jsx(Button, { variant: "outline", size: "sm", onClick: () => setPage((p) => Math.max(1, p - 1)), disabled: page <= 1 || loading, children: "Previous" }), _jsxs(Text, { size: "sm", children: ["Page ", meta.page, " of ", meta.totalPages] }), _jsx(Button, { variant: "outline", size: "sm", onClick: () => setPage((p) => p + 1), disabled: !meta.hasMore || loading, children: "Next" })] }))] }, "reviews"),
178
+ ] })), loading ? (_jsx(Div, { className: "text-center", padding: "y-xl", children: _jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", children: "Loading reviews\u2026" }) })) : reviews.length === 0 ? (_jsx(Div, { className: "text-center", padding: "y-3xl", children: _jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", children: "No reviews found." }) })) : (_jsx(Stack, { gap: "md", children: reviews.map((review) => (_jsx(Div, { className: "border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)]", rounded: "lg", padding: "md", children: _jsxs(Row, { align: "start", justify: "between", gap: "3", wrap: true, children: [_jsxs(Row, { align: "start", className: "flex-1 min-w-0", gap: "3", children: [_jsx(Checkbox, { checked: selectedIds.has(review.id), onChange: () => toggleSelected(review.id), "aria-label": "Select review" }), _jsxs(Div, { className: "flex-1 min-w-0", children: [_jsx(Text, { className: "truncate", weight: "medium", children: review.productTitle }), _jsxs(Row, { className: "mt-1", align: "center", gap: "sm", wrap: true, children: [_jsx(Stars, { rating: review.rating }), _jsxs(Text, { className: "text-[var(--appkit-color-text-muted)]", size: "sm", children: ["by ", review.userName] }), review.verified && _jsx(Badge, { variant: "success", children: "Verified" }), statusBadge(review.status), _jsx(Badge, { variant: review.sellerReply ? "success" : "warning", children: review.sellerReply ? "Store replied" : "Awaiting store reply" })] }), review.title && _jsx(Text, { className: "mt-2", weight: "medium", children: review.title }), _jsx(Text, { className: "mt-1 text-[var(--appkit-color-text-secondary)] line-clamp-3", size: "sm", children: review.comment }), review.sellerReply && (_jsxs(Div, { className: "mt-2 pl-[0.75rem] border-l-2 border-[var(--appkit-color-primary)]", children: [_jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", size: "xs", children: "Store reply:" }), _jsx(Text, { size: "sm", children: review.sellerReply })] }))] })] }), _jsxs(Row, { className: "flex-shrink-0", gap: "sm", children: [_jsx(Button, { variant: "outline", size: "sm", onClick: () => openReply(review), children: review.sellerReply ? "Edit Reply" : ACTIONS.STORE["reply-review"].label }), _jsx(Button, { variant: "ghost", size: "sm", onClick: () => setContestTarget(review), children: ACTIONS.STORE["contest-review"].label }), _jsx(Button, { variant: "ghost", size: "sm", onClick: () => setFeedbackTarget(review), children: ACTIONS.STORE["buyer-feedback"].label })] })] }) }, review.id))) })), meta && meta.totalPages > 1 && (_jsxs(Row, { align: "center", justify: "center", gap: "sm", children: [_jsx(Button, { variant: "outline", size: "sm", onClick: () => setPage((p) => Math.max(1, p - 1)), disabled: page <= 1 || loading, children: "Previous" }), _jsxs(Text, { size: "sm", children: ["Page ", meta.page, " of ", meta.totalPages] }), _jsx(Button, { variant: "outline", size: "sm", onClick: () => setPage((p) => p + 1), disabled: !meta.hasMore || loading, children: "Next" })] }))] }, "reviews"),
178
179
  ] }), _jsx(SideDrawer, { isOpen: !!replyTarget, onClose: () => setReplyTarget(null), title: replyTarget?.sellerReply ? "Edit Reply" : "Reply to Review", mode: "create", children: _jsxs(Stack, { gap: "md", className: `${__P.p4}`, children: [replyTarget && (_jsxs(Div, { className: `${__P.p3} bg-[var(--appkit-color-surface-muted)]`, rounded: "default", children: [_jsx(Stars, { rating: replyTarget.rating }), _jsx(Text, { className: "mt-1", size: "sm", children: replyTarget.comment })] })), replyError && _jsx(Alert, { variant: "error", children: replyError }), _jsxs(Div, { children: [_jsx(Text, { className: "mb-1.5", size: "sm", weight: "medium", children: "Store reply" }), _jsx("textarea", { className: "w-full rounded-md border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface-input)] p-2.5 text-sm resize-none focus:outline-none focus:ring-2 focus:ring-[var(--appkit-color-primary)]", rows: 5, value: replyText, onChange: (e) => setReplyText(e.target.value), maxLength: 1000, placeholder: "Write your response to this review\u2026" }), _jsxs(Text, { className: "text-[var(--appkit-color-text-muted)] mt-1", size: "xs", align: "end", children: [replyText.length, "/1000"] })] }), _jsxs(Row, { justify: "end", gap: "sm", children: [_jsx(Button, { variant: "outline", onClick: () => setReplyTarget(null), disabled: replySaving, children: "Cancel" }), _jsx(Button, { variant: "primary", onClick: handleReplySave, disabled: replySaving || !replyText.trim(), isLoading: replySaving, children: replyTarget?.sellerReply ? "Update Reply" : "Post Reply" })] })] }) }), _jsx(Modal, { isOpen: bulkReplyOpen, onClose: () => setBulkReplyOpen(false), title: `Bulk reply to ${selectedIds.size} review${selectedIds.size === 1 ? "" : "s"}`, actions: _jsxs(Row, { gap: "sm", children: [_jsx(Button, { variant: "ghost", onClick: () => setBulkReplyOpen(false), disabled: bulkSaving, children: "Cancel" }), _jsx(Button, { variant: "primary", onClick: () => void submitBulkReply(), disabled: !bulkReplyText.trim() || bulkSaving, isLoading: bulkSaving, children: "Send reply" })] }), children: _jsxs(Stack, { gap: "md", padding: "2xs", children: [_jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", size: "sm", children: "The same reply will be posted on all selected reviews." }), _jsx(Textarea, { value: bulkReplyText, onChange: (e) => setBulkReplyText(e.target.value), rows: 5, placeholder: "Thanks for your review\u2026", label: "Reply" })] }) }), _jsx(Modal, { isOpen: !!contestTarget, onClose: () => setContestTarget(null), title: "Contest this review", actions: _jsxs(Row, { gap: "sm", children: [_jsx(Button, { variant: "ghost", onClick: () => setContestTarget(null), children: "Cancel" }), _jsx(Button, { variant: "primary", onClick: () => void submitContest(), disabled: !contestReason.trim(), children: "Submit" })] }), children: _jsxs(Stack, { gap: "md", padding: "2xs", children: [_jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", size: "sm", children: "Flag this review for admin investigation. Provide a clear reason \u2014 fake, abusive, off-topic, etc." }), _jsx(Textarea, { value: contestReason, onChange: (e) => setContestReason(e.target.value), rows: 4, label: "Reason" })] }) }), _jsx(Modal, { isOpen: !!feedbackTarget, onClose: () => setFeedbackTarget(null), title: "Send feedback to buyer", actions: _jsxs(Row, { gap: "sm", children: [_jsx(Button, { variant: "ghost", onClick: () => setFeedbackTarget(null), children: "Cancel" }), _jsx(Button, { variant: "primary", onClick: () => void submitFeedback(), disabled: !feedbackText.trim(), children: "Send" })] }), children: _jsxs(Stack, { gap: "md", padding: "2xs", children: [_jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", size: "sm", children: "Private message sent to the buyer's notification inbox. Does not appear on the public review." }), _jsx(Textarea, { value: feedbackText, onChange: (e) => setFeedbackText(e.target.value), rows: 4, label: "Feedback" })] }) })] }));
179
180
  }
@@ -23,7 +23,7 @@ const COLUMNS = [
23
23
  {
24
24
  key: "label",
25
25
  header: "Name",
26
- render: (row) => (_jsxs(Div, { children: [_jsx(Text, { size: "sm", weight: "medium", children: row.label }), row.isDefault && (_jsx(Span, { layout: "inline-flex", color: "success", surface: "success-surface", size: "xs", weight: "medium", className: "mt-0.5 px-1.5 py-px", rounded: "full", children: "Default" }))] })),
26
+ render: (row) => (_jsxs(Div, { children: [_jsx(Text, { size: "sm", weight: "medium", children: row.label }), row.isDefault && (_jsx(Span, { layout: "inline-flex", color: "success", surface: "success-surface", size: "xs", weight: "medium", className: "mt-[0.125rem] px-[0.375rem] py-[1px]", rounded: "full", children: "Default" }))] })),
27
27
  },
28
28
  {
29
29
  key: "method",
@@ -80,9 +80,15 @@ export function SellerShippingConfigsView({ onCreateClick, onEditClick, onDelete
80
80
  })),
81
81
  });
82
82
  const handleDelete = useCallback(async (id) => {
83
- await performDelete(id);
83
+ try {
84
+ await performDelete(id);
85
+ }
86
+ catch (err) {
87
+ void normalizeError(err);
88
+ showToast(err instanceof Error ? err.message : "Failed to delete shipping config", "error");
89
+ }
84
90
  setDeleteTargetId(null);
85
- }, [performDelete]);
91
+ }, [performDelete, showToast]);
86
92
  const handleSetDefault = useCallback(async (id) => {
87
93
  setSettingDefaultId(id);
88
94
  try {
@@ -45,7 +45,7 @@ export function SellerShippingView({ apiBase = "/api/store/shipping" }) {
45
45
  : "",
46
46
  });
47
47
  })
48
- .catch(() => { })
48
+ .catch(console.error)
49
49
  .finally(() => setLoading(false));
50
50
  }, [apiBase]);
51
51
  const update = useCallback((partial) => {
@@ -25,7 +25,7 @@ function NavLink({ item, isActive, onClick }) {
25
25
  : "text-zinc-500 dark:text-zinc-400 hover:bg-zinc-50 dark:hover:bg-slate-800/60 hover:text-zinc-800 dark:hover:text-zinc-200"}`, children: [item.icon && _jsx(Span, { size: "base", className: "shrink-0 opacity-60", children: item.icon }), _jsx(Span, { className: "flex-1 truncate", children: item.label }), item.badge != null && item.badge > 0 && (_jsx(Span, { weight: "bold", className: CLS_NAV_BADGE, children: item.badge }))] }));
26
26
  }
27
27
  function FlatContent({ items, activeHref, storeName, storeLogoURL, onItemClick, }) {
28
- return (_jsxs(_Fragment, { children: [storeName && (_jsxs(Row, { border: "bottom-subtle", gap: "3", padding: "inline", children: [storeLogoURL ? (_jsx(Div, { role: "img", "aria-label": storeName, className: CLS_STORE_AVATAR, style: { backgroundImage: `url(${storeLogoURL})` } })) : (_jsx(Div, { className: CLS_STORE_FALLBACK, children: storeName[0]?.toUpperCase() })), _jsx(Text, { className: CLS_STORE_NAME, children: storeName })] })), _jsx(Nav, { "aria-label": "Store navigation", padding: "y-sm", children: _jsx(Ul, { paddingX: "x-sm", spacing: "2xs", children: items.map((item) => {
28
+ return (_jsxs(_Fragment, { children: [storeName && (_jsxs(Row, { border: "bottom-subtle", gap: "3", padding: "inline", children: [storeLogoURL ? (_jsx("img", { src: storeLogoURL, alt: storeName, className: `${CLS_STORE_AVATAR} object-cover` })) : (_jsx(Div, { className: CLS_STORE_FALLBACK, children: storeName[0]?.toUpperCase() })), _jsx(Text, { className: CLS_STORE_NAME, children: storeName })] })), _jsx(Nav, { "aria-label": "Store navigation", padding: "y-sm", children: _jsx(Ul, { paddingX: "x-sm", spacing: "2xs", children: items.map((item) => {
29
29
  const isActive = activeHref === item.href;
30
30
  return (_jsx(Li, { children: _jsx(NavLink, { item: item, isActive: isActive, onClick: onItemClick }) }, item.href));
31
31
  }) }) })] }));
@@ -36,7 +36,7 @@ function GroupsContent({ groups, activeHref, storeName, storeLogoURL, onItemClic
36
36
  g.defaultOpen ?? g.items.some((i) => activeHref === i.href),
37
37
  ])));
38
38
  const toggle = useCallback((title) => setOpenGroups((p) => ({ ...p, [title]: !p[title] })), []);
39
- return (_jsxs(_Fragment, { children: [storeName && (_jsxs(Row, { border: "bottom-subtle", gap: "3", padding: "inline", children: [storeLogoURL ? (_jsx(Div, { role: "img", "aria-label": storeName, className: CLS_STORE_AVATAR, style: { backgroundImage: `url(${storeLogoURL})` } })) : (_jsx(Div, { className: CLS_STORE_FALLBACK, children: storeName[0]?.toUpperCase() })), _jsx(Text, { className: CLS_STORE_NAME, children: storeName })] })), _jsx(Nav, { "aria-label": "Store navigation", padding: "y-xs", children: groups.map((group) => {
39
+ return (_jsxs(_Fragment, { children: [storeName && (_jsxs(Row, { border: "bottom-subtle", gap: "3", padding: "inline", children: [storeLogoURL ? (_jsx("img", { src: storeLogoURL, alt: storeName, className: `${CLS_STORE_AVATAR} object-cover` })) : (_jsx(Div, { className: CLS_STORE_FALLBACK, children: storeName[0]?.toUpperCase() })), _jsx(Text, { className: CLS_STORE_NAME, children: storeName })] })), _jsx(Nav, { "aria-label": "Store navigation", padding: "y-xs", children: groups.map((group) => {
40
40
  const isOpen = openGroups[group.title] ?? false;
41
41
  const hasActive = group.items.some((i) => activeHref === i.href);
42
42
  return (_jsxs(Div, { className: "mb-0.5", children: [_jsxs("button", { type: "button", onClick: () => toggle(group.title), className: `flex w-full items-center justify-between px-4 py-2 text-[0.6875rem] font-semibold uppercase tracking-widest transition-colors ${hasActive && !isOpen
@@ -59,12 +59,7 @@ export function StoreSidebar({ items, groups, activeHref, storeName, storeLogoUR
59
59
  const navContent = groups ? (_jsx(GroupsContent, { groups: groups, activeHref: activeHref, storeName: storeName, storeLogoURL: storeLogoURL, onItemClick: close })) : (_jsx(FlatContent, { items: items, activeHref: activeHref, storeName: storeName, storeLogoURL: storeLogoURL, onItemClick: close }));
60
60
  if (variant === "sidebar") {
61
61
  const handleToggle = onToggle ?? close;
62
- return (_jsxs(_Fragment, { children: [desktopOpen && (_jsx(Div, { surface: "overlay-xs", className: "hidden md:block fixed inset-0 backdrop-blur-[2px] z-30", onClick: handleToggle, "aria-hidden": "true" })), _jsxs(Div, { className: "hidden md:flex fixed left-0 z-40 transition-transform duration-300", style: {
63
- top: "var(--header-height, 3.5rem)",
64
- height: "calc(100vh - var(--header-height, 3.5rem))",
65
- width: "18rem",
66
- transform: desktopOpen ? "translateX(0)" : "translateX(calc(-100% + 1.25rem))",
67
- }, children: [_jsxs(Stack, { border: "default", surface: "sidePanel", className: `flex-1 border-r ${__O.hidden}`, shadow: "xl", children: [_jsx(Div, { border: "bottom-subtle", paddingY: "y-sm-tall", className: "shrink-0", padding: "x-md", children: _jsxs(Row, { className: "min-w-0", align: "center", gap: "3", children: [storeLogoURL ? (_jsx(Div, { role: "img", "aria-label": storeName, className: CLS_STORE_AVATAR, style: { backgroundImage: `url(${storeLogoURL})` } })) : (_jsx(Div, { className: CLS_STORE_FALLBACK, children: storeName?.[0]?.toUpperCase() })), _jsx(Text, { className: CLS_STORE_NAME, children: storeName || panelTitle })] }) }), _jsx(Div, { className: `flex-1 ${__O.yAuto}`, children: navContent })] }), _jsx(SidebarCollapseToggle, { expanded: desktopOpen, onToggle: handleToggle })] }), _jsx(Div, { className: "md:hidden", children: _jsx(BottomSheet, { open: mobileOpen, onClose: close, title: panelTitle, children: groups ? (_jsx(GroupsContent, { groups: groups, activeHref: activeHref, storeName: storeName, storeLogoURL: storeLogoURL, onItemClick: close })) : (_jsx(FlatContent, { items: items, activeHref: activeHref, storeName: storeName, storeLogoURL: storeLogoURL, onItemClick: close })) }) })] }));
62
+ return (_jsxs(_Fragment, { children: [desktopOpen && (_jsx(Div, { surface: "overlay-xs", className: "hidden md:block fixed inset-0 backdrop-blur-[2px] z-30", onClick: handleToggle, "aria-hidden": "true" })), _jsxs(Div, { className: `hidden md:flex fixed left-0 z-40 transition-transform duration-300 top-[var(--header-height,3.5rem)] h-[calc(100vh-var(--header-height,3.5rem))] w-[18rem] ${desktopOpen ? "translate-x-0" : "-translate-x-[calc(100%-1.25rem)]"}`, children: [_jsxs(Stack, { border: "default", surface: "sidePanel", className: `flex-1 border-r ${__O.hidden}`, shadow: "xl", children: [_jsx(Div, { border: "bottom-subtle", paddingY: "y-sm-tall", className: "shrink-0", padding: "x-md", children: _jsxs(Row, { className: "min-w-0", align: "center", gap: "3", children: [storeLogoURL ? (_jsx("img", { src: storeLogoURL, alt: storeName, className: `${CLS_STORE_AVATAR} object-cover` })) : (_jsx(Div, { className: CLS_STORE_FALLBACK, children: storeName?.[0]?.toUpperCase() })), _jsx(Text, { className: CLS_STORE_NAME, children: storeName || panelTitle })] }) }), _jsx(Div, { className: `flex-1 ${__O.yAuto}`, children: navContent })] }), _jsx(SidebarCollapseToggle, { expanded: desktopOpen, onToggle: handleToggle })] }), _jsx(Div, { className: "md:hidden", children: _jsx(BottomSheet, { open: mobileOpen, onClose: close, title: panelTitle, children: groups ? (_jsx(GroupsContent, { groups: groups, activeHref: activeHref, storeName: storeName, storeLogoURL: storeLogoURL, onItemClick: close })) : (_jsx(FlatContent, { items: items, activeHref: activeHref, storeName: storeName, storeLogoURL: storeLogoURL, onItemClick: close })) }) })] }));
68
63
  }
69
64
  return (_jsxs(_Fragment, { children: [mounted && mobileOpen &&
70
65
  createPortal(_jsx(DrawerPanel, { title: panelTitle, onClose: close, children: navContent }), document.body), _jsx(Div, { className: "md:hidden", children: _jsx(BottomSheet, { open: mobileOpen, onClose: close, title: panelTitle, children: groups ? (_jsx(GroupsContent, { groups: groups, activeHref: activeHref, storeName: storeName, storeLogoURL: storeLogoURL, onItemClick: close })) : (_jsx(FlatContent, { items: items, activeHref: activeHref, storeName: storeName, storeLogoURL: storeLogoURL, onItemClick: close })) }) })] }));
@@ -1,12 +1,13 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { normalizeError } from "../../../errors/normalize";
3
4
  import { Badge, Row, Span, Stack, sortBy } from "@mohasinac/appkit";
4
5
  import { useState, useCallback } from "react";
5
6
  import { useEntityDelete } from "../../../react/hooks/useEntityDelete";
6
7
  import { Plus } from "lucide-react";
7
8
  import { useUrlTable } from "../../../react/hooks/useUrlTable";
8
9
  import { useBulkSelection } from "../../../react/hooks/useBulkSelection";
9
- import { BulkActionBar, Button, ConfirmDeleteModal, DataTable, Div, ListingToolbar, Pagination, RowActionMenu, Text, } from "../../../ui";
10
+ import { BulkActionBar, Button, ConfirmDeleteModal, DataTable, Div, ListingToolbar, Pagination, RowActionMenu, Text, useToast, } from "../../../ui";
10
11
  import { useBottomActions } from "../../layout";
11
12
  import { SELLER_ENDPOINTS } from "../../../constants/api-endpoints";
12
13
  import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
@@ -40,6 +41,7 @@ const COLUMNS = [
40
41
  },
41
42
  ];
42
43
  export function SellerStoreCategoriesView({ onCreateClick, onEditClick, onDelete, onBulkDelete, onBulkActivate, onBulkDeactivate, }) {
44
+ const { showToast } = useToast();
43
45
  const table = useUrlTable({ defaults: { pageSize: String(PAGE_SIZE), sort: DEFAULT_SORT } });
44
46
  const [searchInput, setSearchInput] = useState(table.get(TABLE_KEYS.QUERY) || "");
45
47
  const [deleteTargetId, setDeleteTargetId] = useState(null);
@@ -77,9 +79,15 @@ export function SellerStoreCategoriesView({ onCreateClick, onEditClick, onDelete
77
79
  const handleDelete = useCallback(async (id) => {
78
80
  if (!onDelete)
79
81
  return;
80
- await performDelete(id);
82
+ try {
83
+ await performDelete(id);
84
+ }
85
+ catch (err) {
86
+ void normalizeError(err);
87
+ showToast(err instanceof Error ? err.message : "Failed to delete category", "error");
88
+ }
81
89
  setDeleteTargetId(null);
82
- }, [onDelete, performDelete]);
90
+ }, [onDelete, performDelete, showToast]);
83
91
  const bulkActions = [
84
92
  ...(onBulkDelete ? [buildBulkAction(ACTIONS.STORE["delete-listing"], async () => { await onBulkDelete(selection.selectedIds); selection.clearSelection(); refetch?.(); })] : []),
85
93
  ...(onBulkActivate ? [buildBulkAction(ACTIONS.ADMIN["activate-bundle"], async () => { await onBulkActivate(selection.selectedIds); selection.clearSelection(); refetch?.(); })] : []),
@@ -198,9 +198,15 @@ export function SellerTemplatesView({ onDelete, onBulkDelete, onDuplicate, }) {
198
198
  }
199
199
  }, [draft, drawerMode, editingId, closeDrawer, refetch, showToast]);
200
200
  const handleDelete = useCallback(async (id) => {
201
- await performDelete(id);
201
+ try {
202
+ await performDelete(id);
203
+ }
204
+ catch (err) {
205
+ void normalizeError(err);
206
+ showToast(err instanceof Error ? err.message : "Failed to delete template", "error");
207
+ }
202
208
  setDeleteTargetId(null);
203
- }, [performDelete]);
209
+ }, [performDelete, showToast]);
204
210
  const handleDuplicate = useCallback(async (row) => {
205
211
  setDuplicatingId(row.id);
206
212
  try {
@@ -13,7 +13,7 @@ const Tooltip = dynamic(() => import("recharts").then((m) => m.Tooltip), { ssr:
13
13
  const ResponsiveContainer = dynamic(() => import("recharts").then((m) => m.ResponsiveContainer), { ssr: false });
14
14
  export function SellerRevenueChart({ data, labels = {}, formatRevenue = (amount) => String(amount), className = "", }) {
15
15
  const hasRevenue = data.some((item) => item.revenue > 0);
16
- return (_jsxs(Div, { className: `border border-neutral-200 dark:border-neutral-800 sm:p-6 ${className}`, rounded: "xl", padding: "md", surface: "default", children: [labels.title && (_jsx(Heading, { level: 3, className: "mb-4", size: "base", weight: "semibold", children: labels.title })), hasRevenue ? (_jsx(Div, { className: "h-[300px]", children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", children: _jsxs(BarChart, { data: data, children: [_jsx(CartesianGrid, { strokeDasharray: "3 3", strokeOpacity: 0.3 }), _jsx(XAxis, { dataKey: "month", tick: { fontSize: 11, fill: "currentColor" }, tickLine: false, axisLine: false }), _jsx(YAxis, { tick: { fontSize: 11, fill: "currentColor" }, tickLine: false, axisLine: false, tickFormatter: (value) => formatRevenue(Number(value)) }), _jsx(Tooltip, { formatter: (value) => [
16
+ return (_jsxs(Div, { className: `border border-neutral-200 dark:border-neutral-800 sm:p-[1.5rem] ${className}`, rounded: "xl", padding: "md", surface: "default", children: [labels.title && (_jsx(Heading, { level: 3, className: "mb-4", size: "base", weight: "semibold", children: labels.title })), hasRevenue ? (_jsx(Div, { className: "h-[300px]", children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", children: _jsxs(BarChart, { data: data, children: [_jsx(CartesianGrid, { strokeDasharray: "3 3", strokeOpacity: 0.3 }), _jsx(XAxis, { dataKey: "month", tick: { fontSize: 11, fill: "currentColor" }, tickLine: false, axisLine: false }), _jsx(YAxis, { tick: { fontSize: 11, fill: "currentColor" }, tickLine: false, axisLine: false, tickFormatter: (value) => formatRevenue(Number(value)) }), _jsx(Tooltip, { formatter: (value) => [
17
17
  formatRevenue(Number(value)),
18
18
  labels.revenueLabel ?? "Revenue",
19
19
  ] }), _jsx(Bar, { dataKey: "revenue", fill: "var(--appkit-color-primary)", radius: [4, 4, 0, 0] })] }) }) })) : (_jsx(Text, { paddingY: "xl", color: "muted", size: "sm", align: "center", children: labels.noData ?? "No data available" }))] }));
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Div, Heading, Row, Span, Text } from "../../../../ui";
3
3
  export function SellerTopProducts({ products, labels = {}, formatRevenue = (amount) => String(amount), renderProductLink, renderEmptyAction, className = "", }) {
4
- return (_jsxs(Div, { className: `border border-neutral-200 dark:border-neutral-800 sm:p-6 ${className}`, rounded: "xl", padding: "md", surface: "default", children: [labels.title && (_jsx(Heading, { level: 3, className: "mb-4", size: "base", weight: "semibold", children: labels.title })), products.length > 0 ? (_jsx(Div, { className: "divide-y divide-neutral-100 dark:divide-neutral-800", children: products.map((product, index) => (_jsxs(Row, { align: "center", gap: "md", padding: "y-sm", children: [_jsxs(Span, { size: "sm", weight: "bold", className: "w-6", color: "muted", children: [index + 1, "."] }), _jsxs(Div, { className: "flex-1 min-w-0", children: [_jsx(Text, { className: "truncate", size: "sm", weight: "medium", children: product.title }), _jsxs(Text, { size: "xs", color: "muted", children: [product.orders, " ", labels.ordersLabel ?? "orders"] })] }), _jsxs(Div, { className: "text-right ml-2", children: [_jsx(Span, { size: "sm", weight: "semibold", className: "text-success", children: formatRevenue(product.revenue) }), renderProductLink?.(product)] })] }, product.productId))) })) : (_jsxs(Div, { className: "text-center", padding: "y-xl", children: [_jsx(Text, { size: "sm", weight: "medium", children: labels.noData ?? "No data available" }), labels.noDataDescription && (_jsx(Text, { className: "mt-1", color: "muted", size: "xs", children: labels.noDataDescription })), renderEmptyAction?.()] }))] }));
4
+ return (_jsxs(Div, { className: `border border-neutral-200 dark:border-neutral-800 sm:p-[1.5rem] ${className}`, rounded: "xl", padding: "md", surface: "default", children: [labels.title && (_jsx(Heading, { level: 3, className: "mb-4", size: "base", weight: "semibold", children: labels.title })), products.length > 0 ? (_jsx(Div, { className: "divide-y divide-neutral-100 dark:divide-neutral-800", children: products.map((product, index) => (_jsxs(Row, { align: "center", gap: "md", padding: "y-sm", children: [_jsxs(Span, { size: "sm", weight: "bold", className: "w-6", color: "muted", children: [index + 1, "."] }), _jsxs(Div, { className: "flex-1 min-w-0", children: [_jsx(Text, { className: "truncate", size: "sm", weight: "medium", children: product.title }), _jsxs(Text, { size: "xs", color: "muted", children: [product.orders, " ", labels.ordersLabel ?? "orders"] })] }), _jsxs(Div, { className: "text-right ml-2", children: [_jsx(Span, { size: "sm", weight: "semibold", className: "text-success", children: formatRevenue(product.revenue) }), renderProductLink?.(product)] })] }, product.productId))) })) : (_jsxs(Div, { className: "text-center", padding: "y-xl", children: [_jsx(Text, { size: "sm", weight: "medium", children: labels.noData ?? "No data available" }), labels.noDataDescription && (_jsx(Text, { className: "mt-1", color: "muted", size: "xs", children: labels.noDataDescription })), renderEmptyAction?.()] }))] }));
5
5
  }
@@ -212,15 +212,15 @@ export declare const sellerListParamsSchema: z.ZodObject<{
212
212
  status?: "pending" | "active" | "rejected" | "suspended" | undefined;
213
213
  sort?: string | undefined;
214
214
  category?: string | undefined;
215
- q?: string | undefined;
216
215
  page?: number | undefined;
216
+ q?: string | undefined;
217
217
  perPage?: number | undefined;
218
218
  }, {
219
219
  status?: "pending" | "active" | "rejected" | "suspended" | undefined;
220
220
  sort?: string | undefined;
221
221
  category?: string | undefined;
222
- q?: string | undefined;
223
222
  page?: number | undefined;
223
+ q?: string | undefined;
224
224
  perPage?: number | undefined;
225
225
  }>;
226
226
  export declare const payoutListParamsSchema: z.ZodObject<{
@@ -115,8 +115,8 @@ schema: _schema, isDirty = false, isLoading = false, sections, onSaveDraft, onPu
115
115
  };
116
116
  if (!isOpen)
117
117
  return null;
118
- return (_jsxs(_Fragment, { children: [_jsx(Div, { surface: "overlay-sm", className: "fixed inset-0 backdrop-blur-[2px]", style: { zIndex: "calc(var(--appkit-z-modal) - 1)" }, "aria-hidden": "true", onClick: attemptClose }), _jsxs(Div, { layout: "flex", ref: panelRef, role: "dialog", "aria-modal": "true", "aria-label": title, className: "fixed top-0 bottom-0 left-0 right-0 lg:left-[10%] lg:right-[10%] flex-col bg-[var(--appkit-color-surface)] shadow-2xl", style: { zIndex: "var(--appkit-z-modal)" }, children: [_jsxs(Row, { gap: "sm", paddingX: "x-5", className: "flex-shrink-0 sticky top-0 z-10 border-b border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)]", padding: "y-sm", children: [previewMode ? (_jsxs("button", { type: "button", onClick: () => setPreviewMode(false), "aria-label": "Back to edit", className: "rounded-lg p-1.5 text-[var(--appkit-color-text-muted)] hover:bg-[var(--appkit-color-border-subtle)] transition-colors flex-shrink-0 flex items-center gap-1.5 text-sm", children: [_jsx(ArrowLeft, { className: "w-4 h-4" }), _jsx(Span, { className: "hidden sm:inline", children: "Back to Edit" })] })) : (_jsx("button", { type: "button", onClick: attemptClose, "aria-label": "Close", className: "rounded-lg p-1.5 text-[var(--appkit-color-text-muted)] hover:bg-[var(--appkit-color-border-subtle)] transition-colors flex-shrink-0", children: _jsx(X, { className: "w-5 h-5" }) })), _jsxs(Div, { className: "flex-1 min-w-0", children: [breadcrumb && (_jsx(Text, { className: "text-[var(--appkit-color-text-muted)] truncate mb-0.5", size: "xs", children: breadcrumb })), _jsx(Text, { className: "text-[var(--appkit-color-text)] truncate", size: "sm", weight: "semibold", children: previewMode ? `Preview — ${title}` : title })] }), _jsx(Row, { gap: "xs", className: "flex-shrink-0", children: previewMode ? null : (_jsxs(_Fragment, { children: [previewSlot && (_jsxs("button", { type: "button", onClick: () => setPreviewMode(true), className: "flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-sm text-[var(--appkit-color-text-muted)] hover:bg-[var(--appkit-color-border-subtle)] transition-colors border border-[var(--appkit-color-border)]", children: [_jsx(Eye, { className: "w-4 h-4" }), _jsx(Span, { className: "hidden sm:inline", children: "Preview" })] })), onSaveDraft && (_jsx(Button, { variant: "outline", size: "sm", onClick: handleSaveDraft, disabled: isLoading || savingDraft || publishing, isLoading: savingDraft, children: saveLabel })), onPublish && (_jsx(Button, { variant: "primary", size: "sm", onClick: handlePublish, disabled: isLoading || savingDraft || publishing, isLoading: publishing, children: publishLabel }))] })) })] }), _jsxs(Div, { layout: "flex", className: `flex-1 ${__O.hidden}`, children: [sections && sections.length > 0 && !previewMode && (_jsx("nav", { "aria-label": "Form sections", className: "hidden lg:flex flex-col flex-shrink-0 w-48 border-r border-[var(--appkit-color-border)] py-4 px-3 gap-1 overflow-y-auto", children: sections.map((sec) => (_jsx("button", { type: "button", onClick: () => scrollToSection(sec.id), className: "text-left text-sm px-3 py-2 rounded-lg text-[var(--appkit-color-text-muted)] hover:text-[var(--appkit-color-text)] hover:bg-[var(--appkit-color-border-subtle)] transition-colors", children: sec.label }, sec.id))) })), sections && sections.length > 0 && !previewMode && (_jsx(Row, { gap: "px", className: `lg:hidden fixed top-[var(--form-shell-topbar-h,57px)] left-0 right-0 z-10 ${__O.xAuto} px-5 bg-[var(--appkit-color-surface)] border-b border-[var(--appkit-color-border)]`, padding: "y-xs", children: sections.map((sec) => (_jsx("button", { type: "button", onClick: () => scrollToSection(sec.id), className: "flex-shrink-0 text-xs px-3 py-1.5 rounded-full border border-[var(--appkit-color-border)] text-[var(--appkit-color-text-muted)] hover:border-[var(--appkit-color-primary)] hover:text-[var(--appkit-color-primary)] transition-colors whitespace-nowrap", children: sec.label }, sec.id))) })), _jsx(Div, { ref: bodyRef, className: classNames("flex-1 overflow-y-auto", sections && sections.length > 0 && !previewMode ? "pt-0 lg:pt-0" : ""), children: previewMode && previewSlot ? (_jsxs(_Fragment, { children: [_jsxs(Row, { textSize: "sm", gap: "xs", className: "sticky top-0 z-10 bg-[var(--appkit-color-warning-surface)] border-b border-[var(--appkit-color-warning)] text-[var(--appkit-color-warning-text,var(--appkit-color-warning))]", paddingY: "y-xs", paddingX: "x-md", children: [_jsx(Eye, { className: "w-4 h-4 flex-shrink-0" }), _jsx(Span, { children: "Preview \u2014 not visible to buyers until published" })] }), _jsx(Div, { padding: "y-md", children: previewSlot() })] })) : splitPreview && previewSlot ? (
118
+ return (_jsxs(_Fragment, { children: [_jsx(Div, { surface: "overlay-sm", className: "fixed inset-0 backdrop-blur-[2px]", style: { zIndex: "calc(var(--appkit-z-modal) - 1)" }, "aria-hidden": "true", onClick: attemptClose }), _jsxs(Div, { layout: "flex", ref: panelRef, role: "dialog", "aria-modal": "true", "aria-label": title, className: "fixed top-0 bottom-0 left-0 right-0 lg:left-[10%] lg:right-[10%] [flex-direction:column] bg-[var(--appkit-color-surface)]", shadow: "2xl", style: { zIndex: "var(--appkit-z-modal)" }, children: [_jsxs(Row, { gap: "sm", paddingX: "x-5", className: "flex-shrink-0 sticky top-0 z-10 border-b border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)]", padding: "y-sm", children: [previewMode ? (_jsxs("button", { type: "button", onClick: () => setPreviewMode(false), "aria-label": "Back to edit", className: "rounded-lg p-1.5 text-[var(--appkit-color-text-muted)] hover:bg-[var(--appkit-color-border-subtle)] transition-colors flex-shrink-0 flex items-center gap-1.5 text-sm", children: [_jsx(ArrowLeft, { className: "w-4 h-4" }), _jsx(Span, { className: "hidden sm:inline", children: "Back to Edit" })] })) : (_jsx("button", { type: "button", onClick: attemptClose, "aria-label": "Close", className: "rounded-lg p-1.5 text-[var(--appkit-color-text-muted)] hover:bg-[var(--appkit-color-border-subtle)] transition-colors flex-shrink-0", children: _jsx(X, { className: "w-5 h-5" }) })), _jsxs(Div, { className: "flex-1 min-w-0", children: [breadcrumb && (_jsx(Text, { className: "text-[var(--appkit-color-text-muted)] truncate mb-0.5", size: "xs", children: breadcrumb })), _jsx(Text, { className: "text-[var(--appkit-color-text)] truncate", size: "sm", weight: "semibold", children: previewMode ? `Preview — ${title}` : title })] }), _jsx(Row, { gap: "xs", className: "flex-shrink-0", children: previewMode ? null : (_jsxs(_Fragment, { children: [previewSlot && (_jsxs("button", { type: "button", onClick: () => setPreviewMode(true), className: "flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-sm text-[var(--appkit-color-text-muted)] hover:bg-[var(--appkit-color-border-subtle)] transition-colors border border-[var(--appkit-color-border)]", children: [_jsx(Eye, { className: "w-4 h-4" }), _jsx(Span, { className: "hidden sm:inline", children: "Preview" })] })), onSaveDraft && (_jsx(Button, { variant: "outline", size: "sm", onClick: handleSaveDraft, disabled: isLoading || savingDraft || publishing, isLoading: savingDraft, children: saveLabel })), onPublish && (_jsx(Button, { variant: "primary", size: "sm", onClick: handlePublish, disabled: isLoading || savingDraft || publishing, isLoading: publishing, children: publishLabel }))] })) })] }), _jsxs(Div, { layout: "flex", className: `flex-1 ${__O.hidden}`, children: [sections && sections.length > 0 && !previewMode && (_jsx("nav", { "aria-label": "Form sections", className: "hidden lg:flex flex-col flex-shrink-0 w-48 border-r border-[var(--appkit-color-border)] py-4 px-3 gap-1 overflow-y-auto", children: sections.map((sec) => (_jsx("button", { type: "button", onClick: () => scrollToSection(sec.id), className: "text-left text-sm px-3 py-2 rounded-lg text-[var(--appkit-color-text-muted)] hover:text-[var(--appkit-color-text)] hover:bg-[var(--appkit-color-border-subtle)] transition-colors", children: sec.label }, sec.id))) })), sections && sections.length > 0 && !previewMode && (_jsx(Row, { gap: "px", className: `lg:hidden fixed top-[var(--form-shell-topbar-h,57px)] left-0 right-0 z-10 ${__O.xAuto} px-[1.25rem] bg-[var(--appkit-color-surface)] border-b border-[var(--appkit-color-border)]`, padding: "y-xs", children: sections.map((sec) => (_jsx("button", { type: "button", onClick: () => scrollToSection(sec.id), className: "flex-shrink-0 text-xs px-3 py-1.5 rounded-full border border-[var(--appkit-color-border)] text-[var(--appkit-color-text-muted)] hover:border-[var(--appkit-color-primary)] hover:text-[var(--appkit-color-primary)] transition-colors whitespace-nowrap", children: sec.label }, sec.id))) })), _jsx(Div, { ref: bodyRef, className: classNames("flex-1 overflow-y-auto", sections && sections.length > 0 && !previewMode ? "pt-0 lg:pt-0" : ""), children: previewMode && previewSlot ? (_jsxs(_Fragment, { children: [_jsxs(Row, { textSize: "sm", gap: "xs", className: "sticky top-0 z-10 bg-[var(--appkit-color-warning-surface)] border-b border-[var(--appkit-color-warning)] text-[var(--appkit-color-warning-text,var(--appkit-color-warning))]", paddingY: "y-xs", paddingX: "x-md", children: [_jsx(Eye, { className: "w-4 h-4 flex-shrink-0" }), _jsx(Span, { children: "Preview \u2014 not visible to buyers until published" })] }), _jsx(Div, { padding: "y-md", children: previewSlot() })] })) : splitPreview && previewSlot ? (
119
119
  // S-STORE-3-D — desktop 60/40 split: form left, preview right.
120
120
  // Below `lg`, falls back to single-column form (preview-as-modal via existing toggle).
121
- _jsxs(Div, { className: "lg:grid lg:grid-cols-[3fr_2fr] lg:gap-6 lg:px-6 lg:py-6 lg:max-w-[1400px] lg:mx-auto", children: [_jsx(Div, { className: "max-w-3xl mx-auto px-5 sm:px-6 lg:max-w-none lg:px-0 lg:py-0", padding: "y-lg", children: children }), _jsxs(Div, { className: `hidden lg:block sticky lg:top-4 lg:self-start lg:max-h-[calc(100vh-6rem)] ${__O.yAuto} border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface-raised)] ${__P.p4}`, rounded: "lg", children: [_jsxs(Row, { textWeight: "semibold", textSize: "xs", gap: "xs", className: "mb-3 uppercase tracking-wide text-[var(--appkit-color-text-muted)]", children: [_jsx(Eye, { className: "w-3.5 h-3.5" }), _jsx(Span, { children: "Live preview" })] }), previewSlot()] })] })) : (_jsx(Div, { className: "max-w-3xl mx-auto px-5 sm:px-6", padding: "y-lg", children: children })) })] }), !previewMode && renderBottomBar ? (renderBottomBar()) : !previewMode && (onSaveDraft || onPublish) ? (_jsxs(Row, { justify: "between", paddingX: "x-5", className: "flex-shrink-0 sticky bottom-0 z-10 border-t border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)]", padding: "y-sm", children: [_jsx(Button, { variant: "ghost", size: "sm", onClick: attemptClose, disabled: isLoading, children: FORM_ACTION_META[FORM_ACTION_ID.DISCARD].label }), _jsxs(Row, { gap: "xs", children: [onSaveDraft && (_jsx(Button, { variant: "outline", size: "sm", onClick: handleSaveDraft, disabled: isLoading || savingDraft || publishing, isLoading: savingDraft, children: saveLabel })), onPublish && (_jsxs(Button, { variant: "primary", size: "sm", onClick: handlePublish, disabled: isLoading || savingDraft || publishing, isLoading: publishing, children: [publishLabel, " \u2192"] }))] })] })) : null] }), showUnsaved && (_jsxs(_Fragment, { children: [_jsx(Div, { surface: "overlay-lg", className: "fixed inset-0", style: { zIndex: "calc(var(--appkit-z-modal) + 5)" }, onClick: () => setShowUnsaved(false) }), _jsxs(Div, { className: "fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[90vw] max-w-sm bg-[var(--appkit-color-surface)] shadow-2xl", rounded: "xl", padding: "lg", style: { zIndex: "calc(var(--appkit-z-modal) + 5)" }, children: [_jsxs(Row, { gap: "sm", align: "start", className: "mb-4", children: [_jsx(Span, { layout: "flex-center", className: "flex-shrink-0 w-10 h-10 bg-[var(--appkit-color-warning-surface)]", rounded: "full", children: _jsx(AlertTriangle, { className: "w-5 h-5 text-[var(--appkit-color-warning)]" }) }), _jsxs(Stack, { gap: "xs", children: [_jsx(Text, { className: "text-[var(--appkit-color-text)]", weight: "semibold", children: "Unsaved changes" }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", size: "sm", children: "You have unsaved changes. Leave without saving?" })] })] }), _jsxs(Row, { gap: "xs", justify: "end", children: [_jsx(Button, { variant: "outline", size: "sm", onClick: () => setShowUnsaved(false), children: "Stay" }), _jsx(Button, { variant: "danger", size: "sm", onClick: () => { setShowUnsaved(false); onClose(); }, children: "Leave" })] })] })] }))] }));
121
+ _jsxs(Div, { className: "lg:grid lg:grid-cols-[3fr_2fr] lg:gap-[1.5rem] lg:px-[1.5rem] lg:py-[1.5rem] lg:max-w-[1400px] lg:mx-auto", children: [_jsx(Div, { className: "max-w-3xl mx-auto px-[1.25rem] sm:px-[1.5rem] lg:max-w-none lg:px-[0] lg:py-[0]", padding: "y-lg", children: children }), _jsxs(Div, { className: `hidden lg:block sticky lg:top-4 lg:self-start lg:max-h-[calc(100vh-6rem)] ${__O.yAuto} border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface-raised)] ${__P.p4}`, rounded: "lg", children: [_jsxs(Row, { textWeight: "semibold", textSize: "xs", gap: "xs", className: "mb-3 uppercase tracking-wide text-[var(--appkit-color-text-muted)]", children: [_jsx(Eye, { className: "w-3.5 h-3.5" }), _jsx(Span, { children: "Live preview" })] }), previewSlot()] })] })) : (_jsx(Div, { className: "max-w-3xl mx-auto px-[1.25rem] sm:px-[1.5rem]", padding: "y-lg", children: children })) })] }), !previewMode && renderBottomBar ? (renderBottomBar()) : !previewMode && (onSaveDraft || onPublish) ? (_jsxs(Row, { justify: "between", paddingX: "x-5", className: "flex-shrink-0 sticky bottom-0 z-10 border-t border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)]", padding: "y-sm", children: [_jsx(Button, { variant: "ghost", size: "sm", onClick: attemptClose, disabled: isLoading, children: FORM_ACTION_META[FORM_ACTION_ID.DISCARD].label }), _jsxs(Row, { gap: "xs", children: [onSaveDraft && (_jsx(Button, { variant: "outline", size: "sm", onClick: handleSaveDraft, disabled: isLoading || savingDraft || publishing, isLoading: savingDraft, children: saveLabel })), onPublish && (_jsxs(Button, { variant: "primary", size: "sm", onClick: handlePublish, disabled: isLoading || savingDraft || publishing, isLoading: publishing, children: [publishLabel, " \u2192"] }))] })] })) : null] }), showUnsaved && (_jsxs(_Fragment, { children: [_jsx(Div, { surface: "overlay-lg", className: "fixed inset-0", style: { zIndex: "calc(var(--appkit-z-modal) + 5)" }, onClick: () => setShowUnsaved(false) }), _jsxs(Div, { className: "fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[90vw] max-w-sm bg-[var(--appkit-color-surface)]", shadow: "2xl", rounded: "xl", padding: "lg", style: { zIndex: "calc(var(--appkit-z-modal) + 5)" }, children: [_jsxs(Row, { gap: "sm", align: "start", className: "mb-4", children: [_jsx(Span, { layout: "flex-center", className: "flex-shrink-0 w-10 h-10 bg-[var(--appkit-color-warning-surface)]", rounded: "full", children: _jsx(AlertTriangle, { className: "w-5 h-5 text-[var(--appkit-color-warning)]" }) }), _jsxs(Stack, { gap: "xs", children: [_jsx(Text, { className: "text-[var(--appkit-color-text)]", weight: "semibold", children: "Unsaved changes" }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", size: "sm", children: "You have unsaved changes. Leave without saving?" })] })] }), _jsxs(Row, { gap: "xs", justify: "end", children: [_jsx(Button, { variant: "outline", size: "sm", onClick: () => setShowUnsaved(false), children: "Stay" }), _jsx(Button, { variant: "danger", size: "sm", onClick: () => { setShowUnsaved(false); onClose(); }, children: "Leave" })] })] })] }))] }));
122
122
  }
@@ -121,7 +121,7 @@ export function QuickFormDrawer({ isOpen, onClose, title, fields, defaultValues,
121
121
  if (!isOpen)
122
122
  return null;
123
123
  const busy = submitting || isLoading;
124
- return (_jsxs(_Fragment, { children: [_jsx(Div, { surface: "overlay-xs", className: "fixed inset-0 backdrop-blur-[2px]", style: { zIndex: "calc(var(--appkit-z-modal) + 1)" }, "aria-hidden": "true", onClick: handleClose }), _jsxs("div", { ref: drawerRef, role: "dialog", "aria-modal": "true", "aria-label": title, className: "fixed inset-y-0 right-0 flex flex-col bg-[var(--appkit-color-surface)] shadow-2xl w-full lg:w-[40%]", style: { zIndex: "calc(var(--appkit-z-modal) + 2)" }, children: [_jsxs(Row, { className: "flex-shrink-0 border-b border-[var(--appkit-color-border)]", padding: "md", align: "center", gap: "3", children: [_jsx(Text, { className: "flex-1 text-[var(--appkit-color-text)]", size: "base", weight: "semibold", children: title }), _jsx("button", { type: "button", onClick: handleClose, "aria-label": "Close", className: "rounded-lg p-1.5 text-[var(--appkit-color-text-muted)] hover:bg-[var(--appkit-color-border-subtle)] transition-colors", children: _jsx(X, { className: "w-5 h-5" }) })] }), _jsxs("form", { className: "flex-1 overflow-y-auto px-4 py-5 space-y-4", onSubmit: handleSubmit, noValidate: true, children: [fields.map((field) => {
124
+ return (_jsxs(_Fragment, { children: [_jsx(Div, { surface: "overlay-xs", className: "fixed inset-0 backdrop-blur-[2px] [z-index:calc(var(--appkit-z-modal)+1)]", "aria-hidden": "true", onClick: handleClose }), _jsxs("div", { ref: drawerRef, role: "dialog", "aria-modal": "true", "aria-label": title, className: "fixed inset-y-0 right-0 flex flex-col bg-[var(--appkit-color-surface)] shadow-2xl w-full lg:w-[40%] [z-index:calc(var(--appkit-z-modal)+2)]", children: [_jsxs(Row, { className: "flex-shrink-0 border-b border-[var(--appkit-color-border)]", padding: "md", align: "center", gap: "3", children: [_jsx(Text, { className: "flex-1 text-[var(--appkit-color-text)]", size: "base", weight: "semibold", children: title }), _jsx("button", { type: "button", onClick: handleClose, "aria-label": "Close", className: "rounded-lg p-1.5 text-[var(--appkit-color-text-muted)] hover:bg-[var(--appkit-color-border-subtle)] transition-colors", children: _jsx(X, { className: "w-5 h-5" }) })] }), _jsxs("form", { className: "flex-1 overflow-y-auto px-4 py-5 space-y-4", onSubmit: handleSubmit, noValidate: true, children: [fields.map((field) => {
125
125
  const value = values[field.name];
126
126
  if (field.type === "toggle") {
127
127
  return (_jsxs(Stack, { gap: "xs", children: [_jsx(Toggle, { checked: !!value, onChange: (checked) => set(field.name, checked), label: field.label }), field.helperText && (_jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", size: "xs", children: field.helperText }))] }, field.name));
@@ -31,6 +31,6 @@ export function NavPermissionsManager({ initialConfig, navGroups, onUpdate, }) {
31
31
  return (_jsxs(Tr, { className: [
32
32
  idx % 2 === 0 ? "bg-white dark:bg-slate-900" : "bg-zinc-50/50 dark:bg-slate-800/50",
33
33
  !enabled ? "opacity-60" : "",
34
- ].join(" "), children: [_jsx(Td, { padding: "md", children: _jsxs(Div, { children: [_jsx(Text, { weight: "medium", color: "primary", children: item.label }), item.id && (_jsx(Text, { size: "xs", color: "faint", children: item.id }))] }) }), _jsx(Td, { padding: "md", children: _jsx(Code, { className: "text-zinc-500 dark:text-zinc-400", size: "xs", children: item.href }) }), _jsx(Td, { padding: "md", children: item.requiredPermission ? (_jsx(Code, { className: "bg-zinc-100 px-1.5 py-0.5 text-zinc-700 dark:bg-slate-700 dark:text-zinc-300", size: "xs", rounded: "default", children: item.requiredPermission })) : (_jsx(Text, { size: "xs", color: "faint", children: "\u2014" })) }), _jsx(Td, { className: "text-right", padding: "md", children: hasId ? (_jsx(Toggle, { checked: enabled, onChange: (v) => handleToggle(item.id, item.label, v), "aria-label": `Toggle ${item.label}` })) : (_jsx(Text, { className: "italic", size: "xs", color: "faint", children: "Legacy \u2014 always visible" })) })] }, item.href));
34
+ ].join(" "), children: [_jsx(Td, { padding: "md", children: _jsxs(Div, { children: [_jsx(Text, { weight: "medium", color: "primary", children: item.label }), item.id && (_jsx(Text, { size: "xs", color: "faint", children: item.id }))] }) }), _jsx(Td, { padding: "md", children: _jsx(Code, { color: "muted", size: "xs", children: item.href }) }), _jsx(Td, { padding: "md", children: item.requiredPermission ? (_jsx(Code, { className: "bg-[var(--appkit-color-surface-elevated)] text-[var(--appkit-color-text)]", padding: "sm", size: "xs", rounded: "default", children: item.requiredPermission })) : (_jsx(Text, { size: "xs", color: "faint", children: "\u2014" })) }), _jsx(Td, { className: "text-right", padding: "md", children: hasId ? (_jsx(Toggle, { checked: enabled, onChange: (v) => handleToggle(item.id, item.label, v), "aria-label": `Toggle ${item.label}` })) : (_jsx(Text, { className: "italic", size: "xs", color: "faint", children: "Legacy \u2014 always visible" })) })] }, item.href));
35
35
  }) })] }) })] }, group.groupLabel))) }));
36
36
  }
@@ -50,7 +50,7 @@ const CAPABILITY_GROUPS = [
50
50
  },
51
51
  ];
52
52
  function CapabilityTable() {
53
- return (_jsx(Stack, { gap: "lg", children: CAPABILITY_GROUPS.map(({ group, items }) => (_jsxs(Div, { children: [_jsx(Text, { className: "tracking-wide text-[var(--appkit-color-text-muted)] mb-2", size: "xs", weight: "semibold", transform: "uppercase", children: group }), _jsx(Div, { className: "overflow-x-auto -mx-6", children: _jsxs(Table, { className: "min-w-full", size: "sm", children: [_jsx(Thead, { children: _jsxs(Tr, { className: "border-b border-[var(--appkit-color-border)]", children: [_jsx(Th, { weight: "semibold", className: "text-left text-[var(--appkit-color-text)]", padding: "lg-tight", children: "Capability" }), _jsx(Th, { weight: "semibold", className: "text-left text-[var(--appkit-color-text)]", padding: "lg-tight", children: "What it unlocks" }), _jsx(Th, { weight: "semibold", className: "text-left text-[var(--appkit-color-text)] w-24", padding: "lg-tight", children: "Default" })] }) }), _jsx(Tbody, { className: "divide-y divide-[var(--appkit-color-border)]", children: items.map(({ cap, unlocks, defaultOn }) => (_jsxs(Tr, { children: [_jsx(Td, { size: "xs", className: "font-mono text-[var(--appkit-color-text)] align-top whitespace-nowrap", padding: "lg-tight", children: cap }), _jsx(Td, { className: "text-[var(--appkit-color-text-muted)] align-top", padding: "lg-tight", children: unlocks }), _jsx(Td, { className: "align-top", padding: "lg-tight", children: defaultOn ? (_jsx(Span, { className: "inline-block bg-[var(--appkit-color-success)]/10 text-[var(--appkit-color-success)]", size: "xs", weight: "medium", rounded: "full", padding: "pill-xs", children: "On" })) : (_jsx(Span, { className: "inline-block bg-[var(--appkit-color-border)] text-[var(--appkit-color-text-muted)]", size: "xs", weight: "medium", rounded: "full", padding: "pill-xs", children: "Off" })) })] }, cap))) })] }) })] }, group))) }));
53
+ return (_jsx(Stack, { gap: "lg", children: CAPABILITY_GROUPS.map(({ group, items }) => (_jsxs(Div, { children: [_jsx(Text, { className: "tracking-wide text-[var(--appkit-color-text-muted)] mb-2", size: "xs", weight: "semibold", transform: "uppercase", children: group }), _jsx(Div, { overflow: "x-auto", className: "-mx-6", children: _jsxs(Table, { className: "min-w-full", size: "sm", children: [_jsx(Thead, { children: _jsxs(Tr, { className: "border-b border-[var(--appkit-color-border)]", children: [_jsx(Th, { weight: "semibold", className: "text-left text-[var(--appkit-color-text)]", padding: "lg-tight", children: "Capability" }), _jsx(Th, { weight: "semibold", className: "text-left text-[var(--appkit-color-text)]", padding: "lg-tight", children: "What it unlocks" }), _jsx(Th, { weight: "semibold", className: "text-left text-[var(--appkit-color-text)] w-24", padding: "lg-tight", children: "Default" })] }) }), _jsx(Tbody, { className: "divide-y divide-[var(--appkit-color-border)]", children: items.map(({ cap, unlocks, defaultOn }) => (_jsxs(Tr, { children: [_jsx(Td, { size: "xs", className: "font-mono text-[var(--appkit-color-text)] align-top whitespace-nowrap", padding: "lg-tight", children: cap }), _jsx(Td, { className: "text-[var(--appkit-color-text-muted)] align-top", padding: "lg-tight", children: unlocks }), _jsx(Td, { className: "align-top", padding: "lg-tight", children: defaultOn ? (_jsx(Span, { className: "inline-block bg-[var(--appkit-color-success)]/10 text-[var(--appkit-color-success)]", size: "xs", weight: "medium", rounded: "full", padding: "pill-xs", children: "On" })) : (_jsx(Span, { className: "inline-block bg-[var(--appkit-color-border)] text-[var(--appkit-color-text-muted)]", size: "xs", weight: "medium", rounded: "full", padding: "pill-xs", children: "Off" })) })] }, cap))) })] }) })] }, group))) }));
54
54
  }
55
55
  // -- Section 3: Locked feature guide ------------------------------------------
56
56
  const LOCKED_FEATURES = [
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Package, ShoppingBag, Wallet, Settings, Shield, Headphones, CheckCircle2, Circle, BookOpen, } from "lucide-react";
3
- import { Div, Heading, Row, Section, Stack, Text } from "../../../ui";
3
+ import { Div, Heading, Progress, Row, Section, Stack, Text } from "../../../ui";
4
4
  import { ROUTES } from "../../../next/routing/route-map";
5
5
  const CLS_CHECK_ICON = "w-5 h-5 flex-shrink-0 text-emerald-500";
6
6
  const CLS_SUCCESS_BOX = "rounded-xl border border-emerald-200 bg-emerald-50 dark:bg-emerald-950/30 dark:border-emerald-800 px-5 py-4";
@@ -77,14 +77,7 @@ export function StoreGuideHubView({ store }) {
77
77
  const storeName = store?.storeName ?? "Your Store";
78
78
  const steps = buildChecklist(store);
79
79
  const completedCount = steps.filter((s) => s.done).length;
80
- return (_jsxs(Stack, { gap: "xl", padding: "b-2xl", children: [_jsx(Section, { className: "overflow-hidden border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)]", rounded: "2xl", shadow: "sm", children: _jsxs(Div, { paddingX: "x-md-xl", paddingY: "y-xl", style: {
81
- background: "linear-gradient(135deg,var(--appkit-color-primary-700) 0%,var(--appkit-color-cobalt) 60%,var(--appkit-color-secondary-400) 100%)",
82
- }, children: [_jsxs(Row, { className: "mb-3", align: "center", gap: "3", children: [_jsx(Row, { className: "flex-shrink-0 w-10 h-10", surface: "default", align: "center", justify: "center", rounded: "xl", children: _jsx(BookOpen, { className: "w-5 h-5 text-white" }) }), _jsx(Text, { color: "inverse", className: "/80 tracking-widest", size: "sm", weight: "semibold", transform: "uppercase", children: "Seller Guide" })] }), _jsx(Heading, { color: "inverse", level: 1, className: "mb-2", mdSize: "3xl", size: "2xl", weight: "bold", children: storeName }), _jsx(Text, { color: "inverse", className: "/80", size: "base", children: "Everything you need to know about selling on LetItRip." })] }) }), _jsxs(Div, { layout: "grid", gap: "8", className: "grid-cols-1 lg:grid-cols-3", children: [_jsxs(Stack, { className: "lg:col-span-2", gap: "md", children: [_jsx(Heading, { level: 2, className: "text-[var(--appkit-color-text)]", size: "lg", weight: "semibold", children: "Guides" }), _jsx(Div, { layout: "grid", gap: "4", className: "grid-cols-1 sm:grid-cols-2", children: GUIDE_CARDS.map(({ Icon, title, description, href }) => (_jsxs("a", { href: href, className: "group flex flex-col gap-3 rounded-xl border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)] p-5 hover:border-[var(--appkit-color-primary)] hover:shadow-md transition-all", children: [_jsxs(Row, { align: "center", gap: "3", children: [_jsx(Row, { className: "flex-shrink-0 w-9 h-9", align: "center", justify: "center", rounded: "lg", style: {
83
- background: "linear-gradient(135deg,var(--appkit-color-primary-700) 0%,var(--appkit-color-cobalt) 100%)",
84
- }, children: _jsx(Icon, { className: "w-4 h-4 text-white" }) }), _jsx(Text, { className: "text-[var(--appkit-color-text)] group-hover:text-[var(--appkit-color-primary)] transition-colors", weight: "semibold", children: title })] }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)] leading-relaxed", size: "sm", children: description }), _jsx(Text, { className: "text-[var(--appkit-color-primary)] mt-auto", size: "xs", weight: "medium", children: "Read guide \u2192" })] }, title))) })] }), _jsxs(Stack, { gap: "md", children: [_jsx(Heading, { level: 2, className: "text-[var(--appkit-color-text)]", size: "lg", weight: "semibold", children: "Getting started" }), _jsxs(Div, { className: "border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)] overflow-hidden", rounded: "xl", children: [_jsxs(Div, { className: "px-5 pt-5 border-b border-[var(--appkit-color-border)]", padding: "b-md", children: [_jsxs(Row, { className: "mb-2", align: "center", justify: "between", children: [_jsxs(Text, { className: "text-[var(--appkit-color-text)]", size: "sm", weight: "medium", children: [completedCount, " of ", steps.length, " complete"] }), _jsxs(Text, { className: "text-[var(--appkit-color-text-muted)]", size: "xs", children: [Math.round((completedCount / steps.length) * 100), "%"] })] }), _jsx(Div, { className: "h-1.5 bg-[var(--appkit-color-border)]", rounded: "full", children: _jsx(Div, { className: "h-full transition-all", rounded: "full", style: {
85
- width: `${Math.round((completedCount / steps.length) * 100)}%`,
86
- background: "linear-gradient(90deg,var(--appkit-color-primary-700),var(--appkit-color-cobalt))",
87
- } }) })] }), _jsx(Div, { className: "divide-y divide-[var(--appkit-color-border)]", children: steps.map(({ label, done, href }) => (_jsxs("a", { href: done ? "#" : href, "aria-disabled": done, className: `flex items-center gap-3 px-5 py-3.5 text-sm transition-colors ${done
80
+ return (_jsxs(Stack, { gap: "xl", padding: "b-2xl", children: [_jsx(Section, { overflow: "hidden", className: "border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)]", rounded: "2xl", shadow: "sm", children: _jsxs(Div, { paddingX: "x-md-xl", paddingY: "y-xl", className: "[background:linear-gradient(135deg,var(--appkit-color-primary-700)_0%,var(--appkit-color-cobalt)_60%,var(--appkit-color-secondary-400)_100%)]", children: [_jsxs(Row, { className: "mb-3", align: "center", gap: "3", children: [_jsx(Row, { className: "flex-shrink-0 w-10 h-10", surface: "default", align: "center", justify: "center", rounded: "xl", children: _jsx(BookOpen, { className: "w-5 h-5 text-white" }) }), _jsx(Text, { color: "inverse", className: "/80 tracking-widest", size: "sm", weight: "semibold", transform: "uppercase", children: "Seller Guide" })] }), _jsx(Heading, { color: "inverse", level: 1, className: "mb-2", mdSize: "3xl", size: "2xl", weight: "bold", children: storeName }), _jsx(Text, { color: "inverse", className: "/80", size: "base", children: "Everything you need to know about selling on LetItRip." })] }) }), _jsxs(Div, { layout: "grid", gap: "8", className: "grid-cols-1 lg:grid-cols-3", children: [_jsxs(Stack, { className: "lg:col-span-2", gap: "md", children: [_jsx(Heading, { level: 2, className: "text-[var(--appkit-color-text)]", size: "lg", weight: "semibold", children: "Guides" }), _jsx(Div, { layout: "grid", gap: "4", className: "grid-cols-1 sm:grid-cols-2", children: GUIDE_CARDS.map(({ Icon, title, description, href }) => (_jsxs("a", { href: href, className: "group flex flex-col gap-3 rounded-xl border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)] p-5 hover:border-[var(--appkit-color-primary)] hover:shadow-md transition-all", children: [_jsxs(Row, { align: "center", gap: "3", children: [_jsx(Row, { className: "flex-shrink-0 w-9 h-9 [background:linear-gradient(135deg,var(--appkit-color-primary-700)_0%,var(--appkit-color-cobalt)_100%)]", align: "center", justify: "center", rounded: "lg", children: _jsx(Icon, { className: "w-4 h-4 text-white" }) }), _jsx(Text, { className: "text-[var(--appkit-color-text)] group-hover:text-[var(--appkit-color-primary)] transition-colors", weight: "semibold", children: title })] }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)] leading-relaxed", size: "sm", children: description }), _jsx(Text, { className: "text-[var(--appkit-color-primary)] mt-auto", size: "xs", weight: "medium", children: "Read guide \u2192" })] }, title))) })] }), _jsxs(Stack, { gap: "md", children: [_jsx(Heading, { level: 2, className: "text-[var(--appkit-color-text)]", size: "lg", weight: "semibold", children: "Getting started" }), _jsxs(Div, { overflow: "hidden", className: "border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)]", rounded: "xl", children: [_jsxs(Div, { className: "px-[1.25rem] pt-[1.25rem] border-b border-[var(--appkit-color-border)]", padding: "b-md", children: [_jsxs(Row, { className: "mb-2", align: "center", justify: "between", children: [_jsxs(Text, { className: "text-[var(--appkit-color-text)]", size: "sm", weight: "medium", children: [completedCount, " of ", steps.length, " complete"] }), _jsxs(Text, { className: "text-[var(--appkit-color-text-muted)]", size: "xs", children: [Math.round((completedCount / steps.length) * 100), "%"] })] }), _jsx(Progress, { value: completedCount, max: steps.length, size: "sm", variant: "gradient" })] }), _jsx(Div, { className: "divide-y divide-[var(--appkit-color-border)]", children: steps.map(({ label, done, href }) => (_jsxs("a", { href: done ? "#" : href, "aria-disabled": done, className: `flex items-center gap-3 px-5 py-3.5 text-sm transition-colors ${done
88
81
  ? "cursor-default"
89
82
  : "hover:bg-[var(--appkit-color-border)]/30"}`, children: [done ? (_jsx(CheckCircle2, { className: CLS_CHECK_ICON })) : (_jsx(Circle, { className: "w-5 h-5 flex-shrink-0 text-[var(--appkit-color-text-muted)]" })), _jsx(Text, { className: `leading-snug ${done
90
83
  ? "line-through text-[var(--appkit-color-text-muted)]"
@@ -11,7 +11,7 @@ const CLS_STARS = "inline-flex items-center gap-1 text-warning";
11
11
  const CLS_FOLLOW_BTN = "rounded-lg border border-warning px-4 py-2 text-sm font-medium text-warning hover:bg-warning-surface transition-colors";
12
12
  const CLS_WARN_BANNER = "mt-3 rounded-lg bg-warning-surface dark:bg-warning-surface border border-warning dark:border-warning px-3 py-2 text-sm text-warning dark:text-warning";
13
13
  export function StoreHeader({ store, labels = {}, onFollow, className = "", }) {
14
- return (_jsxs(Section, { surface: "default", border: "bottom", className: className, children: [store.storeBannerURL && (_jsx(Div, { className: `h-40 md:h-56 ${__O.hidden} bg-gray-100 dark:bg-slate-800`, children: _jsx(Div, { role: "img", "aria-label": `${store.storeName} banner`, className: "h-full w-full bg-center bg-cover", style: { backgroundImage: `url(${store.storeBannerURL})` } }) })), _jsxs(Div, { paddingX: "x-page", className: "max-w-7xl mx-auto", padding: "y-md", children: [_jsxs(Row, { align: "end", gap: "md", children: [store.storeLogoURL ? (_jsx(Div, { role: "img", "aria-label": store.storeName, className: "-mt-8 h-16 w-16 border-2 border-white bg-center bg-cover", rounded: "xl", shadow: "sm", style: { backgroundImage: `url(${store.storeLogoURL})` } })) : (_jsx(Div, { className: CLS_AVATAR, children: store.storeName[0]?.toUpperCase() })), _jsxs(Div, { className: "flex-1 min-w-0", children: [_jsxs(Row, { className: "mb-0.5", align: "center", gap: "sm", wrap: true, children: [_jsx(Heading, { level: 1, className: "text-gray-900", size: "xl", weight: "bold", children: store.storeName }), store.averageRating != null && store.averageRating > 0 && (_jsxs(Span, { size: "sm", weight: "medium", className: CLS_STARS, children: ["\u2605 ", store.averageRating.toFixed(1)] }))] }), _jsxs(Row, { textSize: "xs", className: "text-gray-500 mb-0.5", gap: "3", children: [store.category && _jsx(Span, { transform: "capitalize", children: store.category }), store.totalProducts != null && store.totalProducts > 0 && (_jsxs(Span, { children: [store.totalProducts, " ", labels.products ?? "products"] })), store.totalReviews != null && store.totalReviews > 0 && (_jsxs(Span, { children: [store.totalReviews, " ", labels.reviews ?? "reviews"] })), store.itemsSold != null && store.itemsSold > 0 && (_jsxs(Span, { children: [store.itemsSold, " ", labels.sold ?? "sold"] }))] }), store.storeDescription && (_jsx(RichText, { html: normalizeRichTextHtml(store.storeDescription), copyableCode: true, className: "mt-0.5" }))] }), _jsxs(Row, { gap: "sm", align: "center", className: "shrink-0", children: [_jsx(ShareButton, { title: store.storeName }), onFollow && (_jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: () => onFollow(store.storeSlug), className: CLS_FOLLOW_BTN, children: labels.follow ?? "Follow" }))] })] }), store.isVacationMode && (_jsx(Text, { className: CLS_WARN_BANNER, children: store.vacationMessage ??
14
+ return (_jsxs(Section, { surface: "default", border: "bottom", className: className, children: [store.storeBannerURL && (_jsx(Div, { className: `h-40 md:h-56 ${__O.hidden} bg-gray-100 dark:bg-neutral-800`, children: _jsx("img", { src: store.storeBannerURL, alt: `${store.storeName} banner`, className: "h-full w-full object-cover" }) })), _jsxs(Div, { paddingX: "x-page", className: "max-w-7xl mx-auto", padding: "y-md", children: [_jsxs(Row, { align: "end", gap: "md", children: [store.storeLogoURL ? (_jsx(Div, { className: "-mt-8 h-16 w-16 border-2 border-white", rounded: "xl", shadow: "sm", overflow: "hidden", children: _jsx("img", { src: store.storeLogoURL, alt: store.storeName, className: "w-full h-full object-cover" }) })) : (_jsx(Div, { className: CLS_AVATAR, children: store.storeName[0]?.toUpperCase() })), _jsxs(Div, { className: "flex-1 min-w-0", children: [_jsxs(Row, { className: "mb-0.5", align: "center", gap: "sm", wrap: true, children: [_jsx(Heading, { level: 1, className: "text-gray-900", size: "xl", weight: "bold", children: store.storeName }), store.averageRating != null && store.averageRating > 0 && (_jsxs(Span, { size: "sm", weight: "medium", className: CLS_STARS, children: ["\u2605 ", store.averageRating.toFixed(1)] }))] }), _jsxs(Row, { textSize: "xs", className: "text-gray-500 mb-0.5", gap: "3", children: [store.category && _jsx(Span, { transform: "capitalize", children: store.category }), store.totalProducts != null && store.totalProducts > 0 && (_jsxs(Span, { children: [store.totalProducts, " ", labels.products ?? "products"] })), store.totalReviews != null && store.totalReviews > 0 && (_jsxs(Span, { children: [store.totalReviews, " ", labels.reviews ?? "reviews"] })), store.itemsSold != null && store.itemsSold > 0 && (_jsxs(Span, { children: [store.itemsSold, " ", labels.sold ?? "sold"] }))] }), store.storeDescription && (_jsx(RichText, { html: normalizeRichTextHtml(store.storeDescription), copyableCode: true, className: "mt-0.5" }))] }), _jsxs(Row, { gap: "sm", align: "center", className: "shrink-0", children: [_jsx(ShareButton, { title: store.storeName }), onFollow && (_jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: () => onFollow(store.storeSlug), className: CLS_FOLLOW_BTN, children: labels.follow ?? "Follow" }))] })] }), store.isVacationMode && (_jsx(Text, { className: CLS_WARN_BANNER, children: store.vacationMessage ??
15
15
  labels.vacationMode ??
16
16
  "Store is on vacation mode" })), _jsx(Div, { className: "mt-3", children: _jsx(StoreScopedSearch, { storeId: store.storeSlug, storeName: store.storeName }) })] })] }));
17
17
  }
@@ -41,7 +41,7 @@ function ListingTypesTable() {
41
41
  { label: "Required fields", keys: ["requiredFields"] },
42
42
  { label: "Ideal use case", keys: ["idealUseCase"] },
43
43
  ];
44
- return (_jsx(Div, { className: "overflow-x-auto -mx-6", children: _jsxs(Table, { className: "min-w-full", size: "sm", children: [_jsx(Thead, { children: _jsx(Tr, { className: "border-b border-[var(--appkit-color-border)]", children: HEADERS.map((h) => (_jsx(Th, { weight: "semibold", padding: "lg-3", className: "text-left text-[var(--appkit-color-text)]", children: h }, h))) }) }), _jsx(Tbody, { className: "divide-y divide-[var(--appkit-color-border)]", children: ROWS.map(({ label, keys }) => (_jsxs(Tr, { children: [_jsx(Td, { weight: "medium", padding: "lg-3", className: "text-[var(--appkit-color-text-muted)] whitespace-nowrap", children: label }), LISTING_TYPES.map((t) => (_jsx(Td, { padding: "lg-3", className: "text-[var(--appkit-color-text)] align-top", children: t[keys[0]] }, t.type)))] }, label))) })] }) }));
44
+ return (_jsx(Div, { overflow: "x-auto", className: "-mx-6", children: _jsxs(Table, { className: "min-w-full", size: "sm", children: [_jsx(Thead, { children: _jsx(Tr, { className: "border-b border-[var(--appkit-color-border)]", children: HEADERS.map((h) => (_jsx(Th, { weight: "semibold", padding: "lg-3", className: "text-left text-[var(--appkit-color-text)]", children: h }, h))) }) }), _jsx(Tbody, { className: "divide-y divide-[var(--appkit-color-border)]", children: ROWS.map(({ label, keys }) => (_jsxs(Tr, { children: [_jsx(Td, { weight: "medium", padding: "lg-3", className: "text-[var(--appkit-color-text-muted)] whitespace-nowrap", children: label }), LISTING_TYPES.map((t) => (_jsx(Td, { padding: "lg-3", className: "text-[var(--appkit-color-text)] align-top", children: t[keys[0]] }, t.type)))] }, label))) })] }) }));
45
45
  }
46
46
  // -- Section 2: Standard product walkthrough -----------------------------------
47
47
  const STANDARD_STEPS = [
@@ -88,11 +88,11 @@ const STANDARD_STEPS = [
88
88
  },
89
89
  ];
90
90
  function StandardWalkthrough() {
91
- return (_jsx(Stack, { gap: "5", children: STANDARD_STEPS.map(({ step, items }) => (_jsxs(Div, { children: [_jsx(Text, { className: "mb-2 text-[var(--appkit-color-text)]", weight: "semibold", children: step }), _jsx(Ul, { className: "space-y-1.5", indent: "lg", children: items.map((item) => (_jsx(Li, { textSize: "sm", color: "muted", className: LIST_DISC, children: item }, item))) })] }, step))) }));
91
+ return (_jsx(Stack, { gap: "5", children: STANDARD_STEPS.map(({ step, items }) => (_jsxs(Div, { children: [_jsx(Text, { className: "mb-2 text-[var(--appkit-color-text)]", weight: "semibold", children: step }), _jsx(Ul, { className: "space-y-[0.375rem]", indent: "lg", children: items.map((item) => (_jsx(Li, { textSize: "sm", color: "muted", className: LIST_DISC, children: item }, item))) })] }, step))) }));
92
92
  }
93
93
  // -- Section 3: Auction walkthrough --------------------------------------------
94
94
  function AuctionWalkthrough() {
95
- return (_jsxs(Stack, { textSize: "sm", className: "text-[var(--appkit-color-text-muted)]", gap: "md", children: [_jsxs(Div, { children: [_jsx(Text, { className: SUBHEADING, children: "Reserve price vs starting bid" }), _jsxs(Text, { className: "leading-relaxed", children: ["The ", _jsx(Span, { weight: "bold", children: "starting bid" }), " is the minimum first bid a buyer can place. The ", _jsx(Span, { weight: "bold", children: "reserve price" }), " is the minimum price you are willing to accept \u2014 if bidding does not reach the reserve, you are not obligated to sell. The reserve is hidden from buyers."] })] }), _jsxs(Div, { children: [_jsx(Text, { className: SUBHEADING, children: "Bid increment" }), _jsx(Div, { className: "overflow-x-auto", children: _jsxs(Table, { className: "min-w-[320px]", size: "sm", children: [_jsx(Thead, { children: _jsxs(Tr, { className: "border-b border-[var(--appkit-color-border)]", children: [_jsx(Th, { weight: "semibold", align: "left", paddingSide: "pr-md", className: "text-[var(--appkit-color-text)]", padding: "xs-tall", children: "Current high bid" }), _jsx(Th, { weight: "semibold", align: "left", className: "text-[var(--appkit-color-text)]", padding: "xs-tall", children: "Minimum increment" })] }) }), _jsx(Tbody, { className: "divide-y divide-[var(--appkit-color-border)]", children: [
95
+ return (_jsxs(Stack, { textSize: "sm", className: "text-[var(--appkit-color-text-muted)]", gap: "md", children: [_jsxs(Div, { children: [_jsx(Text, { className: SUBHEADING, children: "Reserve price vs starting bid" }), _jsxs(Text, { className: "leading-relaxed", children: ["The ", _jsx(Span, { weight: "bold", children: "starting bid" }), " is the minimum first bid a buyer can place. The ", _jsx(Span, { weight: "bold", children: "reserve price" }), " is the minimum price you are willing to accept \u2014 if bidding does not reach the reserve, you are not obligated to sell. The reserve is hidden from buyers."] })] }), _jsxs(Div, { children: [_jsx(Text, { className: SUBHEADING, children: "Bid increment" }), _jsx(Div, { overflow: "x-auto", children: _jsxs(Table, { className: "min-w-[320px]", size: "sm", children: [_jsx(Thead, { children: _jsxs(Tr, { className: "border-b border-[var(--appkit-color-border)]", children: [_jsx(Th, { weight: "semibold", align: "left", paddingSide: "pr-md", className: "text-[var(--appkit-color-text)]", padding: "xs-tall", children: "Current high bid" }), _jsx(Th, { weight: "semibold", align: "left", className: "text-[var(--appkit-color-text)]", padding: "xs-tall", children: "Minimum increment" })] }) }), _jsx(Tbody, { className: "divide-y divide-[var(--appkit-color-border)]", children: [
96
96
  ["₹0 – ₹499", "₹10"],
97
97
  ["₹500 – ₹1,999", "₹25"],
98
98
  ["₹2,000 – ₹9,999", "₹100"],
@@ -121,7 +121,7 @@ const STATUS_NOTES = [
121
121
  { status: "SOLD", note: "Auction only — marked when the winning bid is confirmed paid." },
122
122
  ];
123
123
  function StatusLifecycle() {
124
- return (_jsxs(Stack, { gap: "md", children: [_jsx(Div, { textSize: "xs", className: "border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface-subtle,var(--appkit-color-border))/20] font-mono text-[var(--appkit-color-text-muted)] overflow-x-auto whitespace-pre", rounded: "lg", padding: "md", children: STATUS_LIFECYCLE }), _jsx(Stack, { gap: "sm", children: STATUS_NOTES.map(({ status, note }) => (_jsxs(Row, { textSize: "sm", gap: "3", children: [_jsx(Text, { className: "shrink-0 font-mono text-[var(--appkit-color-text)] w-24", weight: "semibold", children: status }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", children: note })] }, status))) }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", size: "sm", children: "Live auctions with at least one bid cannot be taken to ARCHIVED until the auction ends." })] }));
124
+ return (_jsxs(Stack, { gap: "md", children: [_jsx(Div, { textSize: "xs", overflow: "x-auto", className: "border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface-subtle,var(--appkit-color-border))/20] font-mono text-[var(--appkit-color-text-muted)] whitespace-pre", rounded: "lg", padding: "md", children: STATUS_LIFECYCLE }), _jsx(Stack, { gap: "sm", children: STATUS_NOTES.map(({ status, note }) => (_jsxs(Row, { textSize: "sm", gap: "3", children: [_jsx(Text, { className: "shrink-0 font-mono text-[var(--appkit-color-text)] w-24", weight: "semibold", children: status }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", children: note })] }, status))) }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", size: "sm", children: "Live auctions with at least one bid cannot be taken to ARCHIVED until the auction ends." })] }));
125
125
  }
126
126
  // -- Section 6: Media guide ----------------------------------------------------
127
127
  const MEDIA_TIPS = [