@mohasinac/appkit 3.0.2 → 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 (268) 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.d.ts +1 -0
  94. package/dist/features/contact/email.js +17 -5
  95. package/dist/features/copilot/components/AdminCopilotView.js +3 -3
  96. package/dist/features/email/primitives.d.ts +4 -0
  97. package/dist/features/email/primitives.js +4 -0
  98. package/dist/features/events/components/EventCard.js +2 -2
  99. package/dist/features/events/components/EventOfferCard.js +1 -1
  100. package/dist/features/events/components/EventRaffleEntryForm.js +1 -1
  101. package/dist/features/events/components/EventRaffleWinnerView.js +2 -2
  102. package/dist/features/events/components/EventSaleBanner.js +0 -1
  103. package/dist/features/events/schemas/index.d.ts +2 -2
  104. package/dist/features/faq/components/ContactCTA.js +1 -1
  105. package/dist/features/faq/components/FAQAccordion.js +2 -2
  106. package/dist/features/faq/components/FAQCategorySidebar.js +2 -2
  107. package/dist/features/faq/components/FAQHelpfulButtons.js +2 -2
  108. package/dist/features/faq/components/RelatedFAQs.js +1 -1
  109. package/dist/features/faq/schemas/index.d.ts +2 -2
  110. package/dist/features/filters/AsyncFacetSection.js +3 -3
  111. package/dist/features/filters/FilterFacetSection.js +6 -6
  112. package/dist/features/filters/RangeFilter.js +2 -2
  113. package/dist/features/filters/SwitchFilter.js +1 -1
  114. package/dist/features/forms/Checkbox.js +1 -1
  115. package/dist/features/forms/Slider.js +7 -2
  116. package/dist/features/forms/utils.d.ts +2 -2
  117. package/dist/features/forms/utils.js +2 -2
  118. package/dist/features/history/hooks/useHistory.js +1 -1
  119. package/dist/features/homepage/components/AdSlot.js +3 -3
  120. package/dist/features/homepage/components/AdvertisementBanner.js +5 -4
  121. package/dist/features/homepage/components/BeforeAfterCard.js +9 -1
  122. package/dist/features/homepage/components/CharacterHotspot.js +42 -49
  123. package/dist/features/homepage/components/CharacterHotspotForm.js +18 -20
  124. package/dist/features/homepage/components/CollectionCardsSection.js +2 -2
  125. package/dist/features/homepage/components/CustomCardsSection.js +3 -6
  126. package/dist/features/homepage/components/CustomerReviewsSection.js +1 -1
  127. package/dist/features/homepage/components/FAQSection.js +2 -2
  128. package/dist/features/homepage/components/FeaturedResultsSection.js +1 -1
  129. package/dist/features/homepage/components/GoogleReviewsSection.js +4 -4
  130. package/dist/features/homepage/components/HeroBanner.js +12 -63
  131. package/dist/features/homepage/components/HeroCarousel.js +6 -6
  132. package/dist/features/homepage/components/HeroSection.js +1 -1
  133. package/dist/features/homepage/components/HowItWorksInfoView.js +1 -1
  134. package/dist/features/homepage/components/HowItWorksSection.js +5 -3
  135. package/dist/features/homepage/components/NewsletterBanner.js +3 -7
  136. package/dist/features/homepage/components/PromoGrid.js +2 -26
  137. package/dist/features/homepage/components/SectionCarousel.js +1 -1
  138. package/dist/features/homepage/components/SecurityHighlightsSection.js +6 -3
  139. package/dist/features/homepage/components/ShopByCategorySection.js +3 -3
  140. package/dist/features/homepage/components/SiteFeaturesSection.js +1 -1
  141. package/dist/features/homepage/components/SocialPostCard.js +2 -3
  142. package/dist/features/homepage/components/StatsCounterSection.js +6 -3
  143. package/dist/features/homepage/components/TestimonialsCarousel.js +2 -25
  144. package/dist/features/homepage/components/TrustBadges.js +1 -9
  145. package/dist/features/homepage/components/TrustFeaturesSection.js +6 -3
  146. package/dist/features/homepage/components/TrustIndicatorsSection.js +1 -1
  147. package/dist/features/homepage/components/WelcomeSection.js +2 -2
  148. package/dist/features/homepage/components/WhatsAppCommunitySection.js +1 -1
  149. package/dist/features/homepage/lib/franchise-colors.d.ts +7 -0
  150. package/dist/features/homepage/lib/franchise-colors.js +7 -0
  151. package/dist/features/homepage/lib/live-stats.js +5 -5
  152. package/dist/features/layout/AppLayoutShell.js +7 -9
  153. package/dist/features/layout/BottomNavbar.js +1 -2
  154. package/dist/features/messages/hooks/useConversation.js +2 -1
  155. package/dist/features/messages/hooks/useConversations.js +1 -0
  156. package/dist/features/orders/components/OrdersList.js +1 -1
  157. package/dist/features/orders/components/RefundHistoryTable.d.ts +6 -0
  158. package/dist/features/orders/components/RefundHistoryTable.js +3 -2
  159. package/dist/features/pre-orders/components/MarketplacePreorderCard.js +2 -2
  160. package/dist/features/pre-orders/components/PreOrderBadge.js +1 -1
  161. package/dist/features/pre-orders/components/PreOrderDetailPageView.js +2 -1
  162. package/dist/features/products/components/CompareOverlay.js +11 -8
  163. package/dist/features/products/components/CustomSectionTabContent.js +1 -1
  164. package/dist/features/products/components/FeatureBadge.js +11 -1
  165. package/dist/features/products/components/GroupSettingsPanel.js +2 -2
  166. package/dist/features/products/components/MarketplaceBundleCard.js +1 -1
  167. package/dist/features/products/components/MarketplacePrizeDrawCard.js +2 -2
  168. package/dist/features/products/components/PrizeDrawItemsEditor.js +1 -1
  169. package/dist/features/products/components/PrizeDrawsIndexListing.js +1 -1
  170. package/dist/features/products/components/ProductCardMetadataSection.js +0 -1
  171. package/dist/features/products/components/ProductDetailPageView.js +1 -1
  172. package/dist/features/products/components/ProductFeatureBadges.js +1 -1
  173. package/dist/features/products/components/ProductGalleryClient.js +1 -1
  174. package/dist/features/products/components/ProductGrid.js +7 -7
  175. package/dist/features/products/components/ShareButton.js +1 -1
  176. package/dist/features/products/components/ShowGroupSection.js +7 -5
  177. package/dist/features/products/components/SublistingCarouselSection.js +2 -2
  178. package/dist/features/products/schemas/index.d.ts +2 -2
  179. package/dist/features/promotions/components/CouponCard.js +2 -2
  180. package/dist/features/promotions/schemas/index.d.ts +2 -2
  181. package/dist/features/reviews/components/ReviewDetailShell.js +3 -3
  182. package/dist/features/reviews/components/ReviewModal.js +2 -4
  183. package/dist/features/reviews/components/ReviewSummary.js +3 -2
  184. package/dist/features/reviews/components/ReviewsList.js +1 -1
  185. package/dist/features/scams/actions/scam-actions.js +1 -1
  186. package/dist/features/scams/components/ScamProfileView.js +1 -1
  187. package/dist/features/search/components/Search.js +2 -2
  188. package/dist/features/search/components/SearchFiltersRow.js +1 -1
  189. package/dist/features/search/schemas/index.d.ts +1 -1
  190. package/dist/features/seller/components/PhysicalLocationModal.js +2 -3
  191. package/dist/features/seller/components/SellerAddressesView.js +2 -1
  192. package/dist/features/seller/components/SellerAnalyticsAlertsView.js +1 -1
  193. package/dist/features/seller/components/SellerBidsView.js +1 -1
  194. package/dist/features/seller/components/SellerCouponEditorView.js +1 -1
  195. package/dist/features/seller/components/SellerGoogleReviewsView.js +1 -1
  196. package/dist/features/seller/components/SellerLiveView.js +1 -1
  197. package/dist/features/seller/components/SellerOffersPanel.js +1 -0
  198. package/dist/features/seller/components/SellerOrdersView.js +1 -1
  199. package/dist/features/seller/components/SellerPayoutMethodsView.js +8 -2
  200. package/dist/features/seller/components/SellerPayoutRequestView.js +1 -1
  201. package/dist/features/seller/components/SellerPayoutSettingsView.js +1 -1
  202. package/dist/features/seller/components/SellerProductShell.js +2 -2
  203. package/dist/features/seller/components/SellerProductsCards.js +1 -1
  204. package/dist/features/seller/components/SellerProductsView.js +1 -1
  205. package/dist/features/seller/components/SellerReviewsView.js +2 -1
  206. package/dist/features/seller/components/SellerShippingConfigsView.js +9 -3
  207. package/dist/features/seller/components/SellerShippingView.js +1 -1
  208. package/dist/features/seller/components/SellerSidebar.js +3 -8
  209. package/dist/features/seller/components/SellerStoreCategoriesView.js +11 -3
  210. package/dist/features/seller/components/SellerTemplatesView.js +8 -2
  211. package/dist/features/seller/components/analytics/SellerRevenueChart.js +1 -1
  212. package/dist/features/seller/components/analytics/SellerTopProducts.js +1 -1
  213. package/dist/features/seller/schemas/index.d.ts +2 -2
  214. package/dist/features/shell/FormShell.js +2 -2
  215. package/dist/features/shell/QuickFormDrawer.js +1 -1
  216. package/dist/features/site-settings/components/NavPermissionsManager.js +1 -1
  217. package/dist/features/stores/components/StoreCapabilitiesGuideView.js +1 -1
  218. package/dist/features/stores/components/StoreGuideHubView.js +2 -9
  219. package/dist/features/stores/components/StoreHeader.js +1 -1
  220. package/dist/features/stores/components/StoreListingsGuideView.js +4 -4
  221. package/dist/features/stores/components/StoreOrdersGuideView.js +2 -2
  222. package/dist/features/stores/components/StoresIndexListing.js +1 -1
  223. package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +2 -2
  224. package/dist/features/wishlist/components/WishlistPage.js +1 -1
  225. package/dist/features/wishlist/components/WishlistToggleButton.js +3 -3
  226. package/dist/features/wishlist/hooks/useWishlistCount.js +1 -1
  227. package/dist/http/ApiClient.d.ts +1 -0
  228. package/dist/http/ApiClient.js +20 -0
  229. package/dist/monitoring/error-tracking.d.ts +0 -3
  230. package/dist/monitoring/error-tracking.js +1 -1
  231. package/dist/monitoring/server-logger.js +3 -3
  232. package/dist/next/components/GlobalError.js +1 -1
  233. package/dist/react/ErrorBoundary.js +1 -1
  234. package/dist/styles.css +45 -7
  235. package/dist/tailwind-utilities.css +1 -1
  236. package/dist/tokens/themes/default-light.js +3 -0
  237. package/dist/tokens/tokens.css +43 -6
  238. package/dist/ui/components/Anchor.d.ts +8 -1
  239. package/dist/ui/components/Anchor.js +16 -2
  240. package/dist/ui/components/Button.d.ts +5 -2
  241. package/dist/ui/components/Button.js +5 -2
  242. package/dist/ui/components/Details.d.ts +33 -2
  243. package/dist/ui/components/Details.js +73 -4
  244. package/dist/ui/components/Div.d.ts +3 -0
  245. package/dist/ui/components/Div.js +12 -1
  246. package/dist/ui/components/DynamicBgDiv.d.ts +13 -0
  247. package/dist/ui/components/DynamicBgDiv.js +18 -0
  248. package/dist/ui/components/Form.d.ts +3 -19
  249. package/dist/ui/components/Form.js +8 -1
  250. package/dist/ui/components/Layout.d.ts +12 -1
  251. package/dist/ui/components/Layout.js +9 -1
  252. package/dist/ui/components/Progress.d.ts +1 -1
  253. package/dist/ui/components/Progress.js +1 -0
  254. package/dist/ui/components/Progress.style.css +1 -0
  255. package/dist/ui/components/ProgressBarFill.d.ts +6 -0
  256. package/dist/ui/components/ProgressBarFill.js +11 -0
  257. package/dist/ui/components/Semantic.d.ts +26 -7
  258. package/dist/ui/components/Semantic.js +33 -8
  259. package/dist/ui/components/TextLink.d.ts +36 -1
  260. package/dist/ui/components/TextLink.js +30 -2
  261. package/dist/ui/components/Typography.d.ts +26 -6
  262. package/dist/ui/components/Typography.js +37 -13
  263. package/dist/ui/components/VacationBanner.js +0 -1
  264. package/dist/ui/components/surface-tokens.d.ts +12 -2
  265. package/dist/ui/components/surface-tokens.js +19 -1
  266. package/dist/ui/rich-text/RichText.js +1 -1
  267. package/dist/validation/schemas.d.ts +1 -1
  268. package/package.json +1 -1
@@ -1,4 +1,14 @@
1
- "use client";
1
+ /**
2
+ * filter-load-options.ts
3
+ *
4
+ * Factory functions that return `loadOptions(query, page)` callbacks for use
5
+ * with AsyncFacetSection and PaginatedSelect. Each factory hits a paginated API
6
+ * endpoint and maps the response to { items: PaginatedSelectOption[], hasMore: boolean }.
7
+ *
8
+ * Usage:
9
+ * const load = makeCategoryLoadOptions();
10
+ * <AsyncFacetSection loadOptions={load} ... />
11
+ */
2
12
  const PAGE_SIZE = 25;
3
13
  function buildUrl(base, q, page, extra) {
4
14
  const params = new URLSearchParams({
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  /**
3
2
  * Filters nav items by:
4
3
  * 1. siteSettings.navConfig[item.id].enabled (admin toggle)
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  /** Layout feature — client islands barrel. */
3
2
  export { DashboardLayoutClient } from "./DashboardLayoutClient";
4
3
  export { RoleGuard } from "./RoleGuard";
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
2
  import { Anchor, Div, Heading, Li, Nav, Section, Span, Text, Ul } from "@mohasinac/appkit";
4
3
  const card = {
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
2
  import { Anchor, Div, Heading, Li, Pre, Section, Text, Ul } from "@mohasinac/appkit";
4
3
  function fmt(t) {
@@ -258,7 +258,7 @@ export async function createCheckoutOrderAction(input) {
258
258
  if (!addressId) {
259
259
  failedCheckoutRepository
260
260
  .logCheckout(uid, "address_not_found", "Address required for physical cart", { addressId: "", paymentMethod })
261
- .catch(() => { });
261
+ .catch(console.error);
262
262
  throw new NotFoundError(ERROR_MESSAGES.CHECKOUT.ADDRESS_REQUIRED);
263
263
  }
264
264
  const addressDoc = await unitOfWork.addresses.findById(addressId);
@@ -269,7 +269,7 @@ export async function createCheckoutOrderAction(input) {
269
269
  if (!resolvedAddress) {
270
270
  failedCheckoutRepository
271
271
  .logCheckout(uid, "address_not_found", "Address not found", { addressId, paymentMethod })
272
- .catch(() => { });
272
+ .catch(console.error);
273
273
  throw new NotFoundError(ERROR_MESSAGES.CHECKOUT.ADDRESS_REQUIRED);
274
274
  }
275
275
  shippingAddress = formatShippingAddress(resolvedAddress);
@@ -408,7 +408,7 @@ export async function createCheckoutOrderAction(input) {
408
408
  addressId,
409
409
  paymentMethod,
410
410
  })
411
- .catch(() => { });
411
+ .catch(console.error);
412
412
  throw err;
413
413
  }
414
414
  const { available, unavailable, emailOtpUsed } = stockResult;
@@ -419,7 +419,7 @@ export async function createCheckoutOrderAction(input) {
419
419
  paymentMethod,
420
420
  cartItemCount: cartItems.length,
421
421
  })
422
- .catch(() => { });
422
+ .catch(console.error);
423
423
  throw new ValidationError(ERROR_MESSAGES.CHECKOUT.INSUFFICIENT_STOCK);
424
424
  }
425
425
  const appliedCoupons = cart.appliedCoupons ?? [];
@@ -663,7 +663,7 @@ export async function verifyAndPlaceRazorpayOrderAction(input) {
663
663
  gatewayPaymentId: razorpay_payment_id,
664
664
  addressId,
665
665
  })
666
- .catch(() => { });
666
+ .catch(console.error);
667
667
  throw new ValidationError(ERROR_MESSAGES.CHECKOUT.PAYMENT_FAILED);
668
668
  }
669
669
  const cart = await unitOfWork.carts.getOrCreate(uid);
@@ -705,7 +705,7 @@ export async function verifyAndPlaceRazorpayOrderAction(input) {
705
705
  gatewayPaymentId: razorpay_payment_id,
706
706
  addressId,
707
707
  })
708
- .catch(() => { });
708
+ .catch(console.error);
709
709
  throw new ApiError(403, "Order verification required. Please complete OTP verification and retry.");
710
710
  }
711
711
  }
@@ -756,7 +756,7 @@ export async function verifyAndPlaceRazorpayOrderAction(input) {
756
756
  gatewayPaymentId: razorpay_payment_id,
757
757
  addressId,
758
758
  })
759
- .catch(() => { });
759
+ .catch(console.error);
760
760
  throw new ValidationError(exists
761
761
  ? ERROR_MESSAGES.CHECKOUT.INSUFFICIENT_STOCK
762
762
  : ERROR_MESSAGES.CHECKOUT.PRODUCT_UNAVAILABLE);
@@ -784,7 +784,7 @@ export async function verifyAndPlaceRazorpayOrderAction(input) {
784
784
  amountRs: paidAmountRs,
785
785
  addressId,
786
786
  })
787
- .catch(() => { });
787
+ .catch(console.error);
788
788
  throw new ValidationError(ERROR_MESSAGES.CHECKOUT.PAYMENT_FAILED);
789
789
  }
790
790
  }
@@ -990,7 +990,7 @@ export async function verifyAndPlaceRazorpayOrderAction(input) {
990
990
  });
991
991
  if (!isDigitalCartRazorpay && addressId) {
992
992
  const otpRefForDelete = consentOtpRef(db, uid, addressId);
993
- otpRefForDelete.delete().catch(() => { });
993
+ otpRefForDelete.delete().catch(console.error);
994
994
  }
995
995
  if (emailsToSend.length > 0) {
996
996
  Promise.all(emailsToSend.map((e) => sendOrderConfirmationEmail(e))).catch((err) => serverLogger.error("Order confirmation email error:", err));
@@ -17,7 +17,7 @@ export async function runCleanupRtdbEvents(ctx) {
17
17
  if (staleAuthIds.length > 0) {
18
18
  await Promise.all(staleAuthIds.flatMap((id) => [
19
19
  rtdb.ref(`auth_events/${id}`).remove(),
20
- auth.deleteUser(`auth_event_${id}`).catch(() => { }),
20
+ auth.deleteUser(`auth_event_${id}`).catch(console.error),
21
21
  ]));
22
22
  ctx.logger.info("Auth events removed", { count: staleAuthIds.length });
23
23
  }
@@ -32,7 +32,7 @@ export const actionTracker = {
32
32
  const result = currentSink(event);
33
33
  // Swallow promise rejections so the caller path is never affected.
34
34
  if (result && typeof result.catch === "function") {
35
- result.catch(() => { });
35
+ result.catch(console.error);
36
36
  }
37
37
  }
38
38
  catch {
@@ -3,16 +3,22 @@
3
3
  * server's stable `code`, the HTTP status, and any Zod issues so wrappers
4
4
  * can route the failure (toast vs inline field error vs error boundary).
5
5
  */
6
+ /** Serialised Zod-issue shape as it arrives over the wire from the server. */
7
+ export interface ApiIssue {
8
+ message: string;
9
+ path?: (string | number)[];
10
+ code?: string;
11
+ }
6
12
  export declare class ApiError extends Error {
7
13
  readonly code: string;
8
14
  readonly status: number;
9
- readonly issues?: unknown[];
15
+ readonly issues?: ApiIssue[];
10
16
  readonly requestId?: string;
11
- readonly cause?: unknown;
17
+ readonly cause?: Error;
12
18
  constructor(code: string, message: string, status: number, options?: {
13
- issues?: unknown[];
19
+ issues?: ApiIssue[];
14
20
  requestId?: string;
15
- cause?: unknown;
21
+ cause?: Error;
16
22
  });
17
23
  }
18
24
  export declare function isApiError(err: unknown): err is ApiError;
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  import { isApiError } from "./ApiError";
3
2
  import { getErrorDisplay } from "../../errors/error-display-map";
4
3
  export function surfaceError(err, opts) {
package/dist/client.d.ts CHANGED
@@ -90,6 +90,10 @@ export { SORT_DIR, sortBy } from "./constants/sort";
90
90
  export { SIEVE_OP, sieveFilter, sieveAnd, sieveMultiEq } from "./utils/sieve-builder";
91
91
  export { Container, Grid, Row, Stack } from "./ui/components/Layout";
92
92
  export { Div } from "./ui/components/Div";
93
+ export { DynamicBgDiv } from "./ui/components/DynamicBgDiv";
94
+ export type { DynamicBgDivProps } from "./ui/components/DynamicBgDiv";
95
+ export { ProgressBarFill } from "./ui/components/ProgressBarFill";
96
+ export type { ProgressBarFillProps } from "./ui/components/ProgressBarFill";
93
97
  export { Main, Section, Nav, Ul, Ol, Li, Table, Thead, Tbody, Tr, Th, Td, Code, Pre, Blockquote } from "./ui/components/Semantic";
94
98
  export { Badge } from "./ui/components/Badge";
95
99
  export { Button } from "./ui/components/Button";
package/dist/client.js CHANGED
@@ -155,6 +155,8 @@ export { SORT_DIR, sortBy } from "./constants/sort";
155
155
  export { SIEVE_OP, sieveFilter, sieveAnd, sieveMultiEq } from "./utils/sieve-builder";
156
156
  export { Container, Grid, Row, Stack } from "./ui/components/Layout";
157
157
  export { Div } from "./ui/components/Div";
158
+ export { DynamicBgDiv } from "./ui/components/DynamicBgDiv";
159
+ export { ProgressBarFill } from "./ui/components/ProgressBarFill";
158
160
  export { Main, Section, Nav, Ul, Ol, Li, Table, Thead, Tbody, Tr, Th, Td, Code, Pre, Blockquote } from "./ui/components/Semantic";
159
161
  export { Badge } from "./ui/components/Badge";
160
162
  export { Button } from "./ui/components/Button";
@@ -30,12 +30,12 @@ async function replayCartOps() {
30
30
  productId: op.productId,
31
31
  quantity: op.quantity ?? 1,
32
32
  })
33
- .catch(() => { });
33
+ .catch(console.error);
34
34
  }
35
35
  else if (op.op === "remove") {
36
36
  await apiClient
37
37
  .delete(`/api/cart/${op.productId}`)
38
- .catch(() => { });
38
+ .catch(console.error);
39
39
  }
40
40
  }
41
41
  clearCartOps();
@@ -50,12 +50,12 @@ async function replayWishlistOps() {
50
50
  if (op.op === "add") {
51
51
  await apiClient
52
52
  .post("/api/user/wishlist", { productId: op.itemId })
53
- .catch(() => { });
53
+ .catch(console.error);
54
54
  }
55
55
  else if (op.op === "remove") {
56
56
  await apiClient
57
57
  .delete(`/api/user/wishlist/${op.itemId}`)
58
- .catch(() => { });
58
+ .catch(console.error);
59
59
  }
60
60
  }
61
61
  clearWishlistOps();
@@ -9,5 +9,5 @@ export declare const GC: {
9
9
  textMuted: string;
10
10
  textStrong: string;
11
11
  code: string;
12
- pageHeaderGradient: string;
12
+ iconBg: string;
13
13
  };
@@ -10,5 +10,5 @@ export const GC = {
10
10
  textMuted: "text-sm text-[var(--appkit-color-text-muted)]",
11
11
  textStrong: "text-[var(--appkit-color-text)]",
12
12
  code: "text-xs bg-[var(--appkit-color-border)] px-1 py-0.5 rounded",
13
- pageHeaderGradient: "linear-gradient(135deg,var(--appkit-color-primary-700) 0%,var(--appkit-color-cobalt) 100%)",
13
+ iconBg: "[background:linear-gradient(135deg,var(--appkit-color-primary-700)_0%,var(--appkit-color-cobalt)_100%)]",
14
14
  };
@@ -1,8 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Card, Div, Heading, Row, Section, Span, Stack, Text } from "../../../ui";
3
- const __P = {
4
- p8: "p-8",
5
- };
6
3
  export function AboutView({ labels = {}, howItems = [], valueItems = [], milestones = [], ctaBannerClass = "", renderCtaButtons, }) {
7
- return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [_jsx(Section, { color: "inverse", tone: "accent-banner", className: "md:py-20 lg:py-24", padding: "y-4xl", children: _jsxs(Div, { paddingX: "x-page", className: "max-w-4xl mx-auto text-center", children: [_jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-6", mdSize: "5xl", size: "4xl", weight: "bold", children: labels.title }), _jsx(Text, { color: "inverse", variant: "none", className: "/80 max-w-2xl mx-auto", size: "xl", children: labels.subtitle })] }) }), _jsxs(Div, { paddingX: "x-page", className: "max-w-5xl mx-auto md:py-20 space-y-16 md:space-y-20", padding: "y-4xl", children: [_jsxs(Section, { className: "text-center max-w-3xl mx-auto", children: [_jsx(Heading, { level: 2, className: "mb-4", children: labels.missionTitle }), _jsx(Text, { size: "lg", variant: "secondary", className: "leading-relaxed", children: labels.missionText })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-12", align: "center", children: labels.howItWorksTitle }), _jsx(Div, { className: "grid md:grid-cols-3 gap-6 md:gap-8", children: howItems.map(({ title, text, icon, tone }) => (_jsxs(Card, { variant: `gradient-${tone ?? "indigo"}`, padding: "md", spacing: "sm", children: [_jsx(Div, { className: "text-4xl", children: icon }), _jsx(Heading, { level: 3, children: title }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: text })] }, title))) })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-12", align: "center", children: labels.valuesTitle }), _jsx(Div, { className: "grid md:grid-cols-3 gap-5 md:gap-6", children: valueItems.map(({ title, text, icon }) => (_jsxs("div", { className: "bg-white dark:bg-slate-800 rounded-xl p-6 space-y-3 border border-neutral-200 dark:border-slate-700", children: [_jsx(Div, { className: "text-3xl", children: icon }), _jsx(Heading, { level: 3, children: title }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: text })] }, title))) })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-10", align: "center", children: labels.milestonesTitle }), _jsx(Stack, { className: "relative border-l-2 border-primary/30 pl-8 max-w-2xl mx-auto", gap: "xl", children: milestones.map(({ year, text }) => (_jsxs(Div, { className: "relative", children: [_jsx(Div, { className: "absolute -left-10 top-1 w-4 h-4 bg-primary border-2 border-white", rounded: "full" }), _jsx(Span, { size: "xs", weight: "bold", className: "text-primary tracking-wide", transform: "uppercase", children: year }), _jsx(Text, { className: "mt-1", children: text })] }, year))) })] }), _jsxs(Section, { color: "inverse", tone: "accent-banner", className: `text-center ${ctaBannerClass} ${__P.p8} md:p-12`, rounded: "2xl", children: [_jsx(Heading, { color: "inverse", level: 2, variant: "none", className: "mb-8", size: "3xl", weight: "bold", children: labels.ctaTitle }), renderCtaButtons ? (renderCtaButtons()) : (_jsx(Row, { justify: "center", gap: "3", wrap: true, children: _jsxs(Span, { color: "inverse", size: "sm", className: "/70", children: [labels.ctaSell, " \u00B7 ", labels.ctaShop] }) }))] })] })] }));
4
+ return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [_jsx(Section, { color: "inverse", tone: "accent-banner", padding: "y-4xl", children: _jsxs(Div, { paddingX: "x-page", className: "max-w-4xl mx-auto text-center", children: [_jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-6", mdSize: "5xl", size: "4xl", weight: "bold", children: labels.title }), _jsx(Text, { color: "inverse", variant: "none", className: "/80 max-w-2xl mx-auto", size: "xl", children: labels.subtitle })] }) }), _jsxs(Div, { paddingX: "x-page", className: "max-w-5xl mx-auto", padding: "y-4xl", children: [_jsxs(Section, { className: "text-center max-w-3xl mx-auto", children: [_jsx(Heading, { level: 2, className: "mb-4", children: labels.missionTitle }), _jsx(Text, { size: "lg", variant: "secondary", className: "leading-relaxed", children: labels.missionText })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-12", align: "center", children: labels.howItWorksTitle }), _jsx(Div, { className: "grid md:grid-cols-3", gap: "6", children: howItems.map(({ title, text, icon, tone }) => (_jsxs(Card, { variant: `gradient-${tone ?? "indigo"}`, padding: "md", spacing: "sm", children: [_jsx(Div, { children: _jsx(Span, { size: "4xl", children: icon }) }), _jsx(Heading, { level: 3, children: title }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: text })] }, title))) })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-12", align: "center", children: labels.valuesTitle }), _jsx(Div, { className: "grid md:grid-cols-3", gap: "5", children: valueItems.map(({ title, text, icon }) => (_jsxs("div", { className: "bg-white dark:bg-slate-800 rounded-xl p-6 space-y-3 border border-neutral-200 dark:border-slate-700", children: [_jsx(Div, { children: _jsx(Span, { size: "3xl", children: icon }) }), _jsx(Heading, { level: 3, children: title }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: text })] }, title))) })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-10", align: "center", children: labels.milestonesTitle }), _jsx(Stack, { className: "relative border-l-2 border-primary/30 max-w-2xl mx-auto pl-[2rem]", gap: "xl", children: milestones.map(({ year, text }) => (_jsxs(Div, { className: "relative", children: [_jsx(Div, { className: "absolute -left-10 top-1 w-4 h-4 bg-primary border-2 border-white", rounded: "full" }), _jsx(Span, { size: "xs", weight: "bold", className: "text-primary tracking-wide", transform: "uppercase", children: year }), _jsx(Text, { className: "mt-1", children: text })] }, year))) })] }), _jsxs(Section, { color: "inverse", tone: "accent-banner", className: `text-center ${ctaBannerClass}`, padding: "xl", rounded: "2xl", children: [_jsx(Heading, { color: "inverse", level: 2, variant: "none", className: "mb-8", size: "3xl", weight: "bold", children: labels.ctaTitle }), renderCtaButtons ? (renderCtaButtons()) : (_jsx(Row, { justify: "center", gap: "3", wrap: true, children: _jsxs(Span, { color: "inverse", size: "sm", className: "/70", children: [labels.ctaSell, " \u00B7 ", labels.ctaShop] }) }))] })] })] }));
8
5
  }
@@ -20,5 +20,5 @@ export async function FAQPageView({ category, } = {}) {
20
20
  ? allItems.filter((item) => item.category === category)
21
21
  : allItems;
22
22
  const activeCategory = categories.find((c) => c.slug === category);
23
- return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [_jsx(Section, { color: "inverse", tone: "accent-banner", padding: "banner", children: _jsxs(Container, { size: "md", className: "text-center", children: [_jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-3", children: activeCategory ? activeCategory.label : t("title") }), _jsx(Text, { color: "inverse", variant: "none", className: "/80 max-w-2xl mx-auto", children: t("subtitle") })] }) }), _jsx(Container, { size: "md", padding: "content-banner", children: _jsxs(Stack, { direction: "md-row", gap: "xl", children: [categories.length > 0 && (_jsxs(Aside, { className: "md:w-56 flex-shrink-0", children: [_jsx(Heading, { level: 3, className: "uppercase tracking-wide mb-3", color: "muted", size: "sm", weight: "semibold", children: t("categoriesLabel") }), _jsxs(Nav, { "aria-label": "FAQ categories", spacing: "xs", children: [_jsxs(TextLink, { rounded: "lg", href: String(ROUTES.PUBLIC.FAQS), className: `flex items-center justify-between px-3 py-2 transition-colors ${!category ? "bg-primary/10 text-primary font-semibold" : "hover:bg-neutral-100 dark:bg-neutral-800 dark:hover:bg-neutral-800"}`, size: "sm", children: [_jsxs(Span, { className: `${flex.row} gap-2`, children: [_jsx(HelpCircle, { className: "w-4 h-4" }), t("allCategories")] }), _jsx(ChevronRight, { className: "w-3.5 h-3.5 opacity-50" })] }), categories.map((cat) => (_jsxs(TextLink, { rounded: "lg", href: String(ROUTES.PUBLIC.FAQ_CATEGORY(cat.slug)), className: `flex items-center justify-between px-3 py-2 transition-colors ${category === cat.slug ? "bg-primary/10 text-primary font-semibold" : "hover:bg-neutral-100 dark:bg-neutral-800 dark:hover:bg-neutral-800"}`, size: "sm", children: [_jsxs(Span, { className: `${flex.row} gap-2`, children: [_jsx(Span, { children: cat.icon }), cat.label] }), _jsx(ChevronRight, { className: "w-3.5 h-3.5 opacity-50" })] }, cat.slug)))] })] })), _jsxs(Div, { className: "flex-1 min-w-0", children: [visibleItems.length === 0 ? (_jsxs(Section, { className: `text-center`, border: "default", surface: "subtle", rounded: "2xl", padding: "y-4xl", children: [_jsx(HelpCircle, { className: "w-10 h-10 mx-auto mb-3 text-zinc-300 dark:text-zinc-600 dark:text-zinc-400" }), _jsx(Heading, { level: 3, className: "mb-2", size: "base", children: t("emptyTitle") }), _jsx(Text, { variant: "secondary", size: "sm", children: t("emptyText") })] })) : (_jsx(Stack, { gap: "sm", children: visibleItems.map((item, i) => (_jsxs(Details, { tone: "card", className: "group overflow-hidden", children: [_jsxs(Summary, { className: `flex items-center justify-between px-5 py-4 cursor-pointer list-none select-none font-medium text-sm hover:bg-neutral-50 dark:hover:bg-neutral-800/50 transition-colors`, children: [_jsx(Span, { children: item.question }), _jsx(ChevronRight, { className: "w-4 h-4 flex-shrink-0 ml-3 transition-transform group-open:rotate-90" })] }), _jsx(Div, { className: "pb-5 pt-1", padding: "x-md", children: _jsx(RichTextRenderer, { html: item.answer, proseClass: "prose prose-sm max-w-none dark:prose-invert" }) })] }, i))) })), _jsxs(Section, { className: `mt-10 text-center`, border: "default", surface: "subtle", rounded: "2xl", padding: "lg", children: [_jsx(Heading, { level: 3, className: "mb-2", size: "base", children: t("stillNeedHelpTitle") }), _jsx(Text, { variant: "secondary", className: "mb-4", size: "sm", children: t("stillNeedHelpText") }), _jsxs(Row, { align: "center", justify: "center", gap: "md", wrap: true, children: [_jsx(TextLink, { href: String(ROUTES.PUBLIC.HELP), children: t("helpCenter") }), _jsx(TextLink, { href: String(ROUTES.PUBLIC.CONTACT), variant: "muted", children: t("contactUs") })] })] })] })] }) })] }));
23
+ return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [_jsx(Section, { color: "inverse", tone: "accent-banner", padding: "banner", children: _jsxs(Container, { size: "md", className: "text-center", children: [_jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-3", children: activeCategory ? activeCategory.label : t("title") }), _jsx(Text, { color: "inverse", variant: "none", className: "/80 max-w-2xl mx-auto", children: t("subtitle") })] }) }), _jsx(Container, { size: "md", padding: "content-banner", children: _jsxs(Stack, { direction: "md-row", gap: "xl", children: [categories.length > 0 && (_jsxs(Aside, { className: "md:w-56 flex-shrink-0", children: [_jsx(Heading, { level: 3, className: "uppercase tracking-wide mb-3", color: "muted", size: "sm", weight: "semibold", children: t("categoriesLabel") }), _jsxs(Nav, { "aria-label": "FAQ categories", spacing: "xs", children: [_jsxs(TextLink, { rounded: "lg", href: String(ROUTES.PUBLIC.FAQS), paddingX: "sm", paddingY: "xs", layout: "flex", align: "center", justify: "between", weight: !category ? "semibold" : undefined, className: `transition-colors ${!category ? "bg-primary/10 text-primary" : "hover:bg-neutral-100 dark:bg-neutral-800 dark:hover:bg-neutral-800"}`, size: "sm", children: [_jsxs(Span, { className: `${flex.row}`, gap: "md", children: [_jsx(HelpCircle, { className: "w-4 h-4" }), t("allCategories")] }), _jsx(ChevronRight, { className: "w-3.5 h-3.5 opacity-50" })] }), categories.map((cat) => (_jsxs(TextLink, { rounded: "lg", href: String(ROUTES.PUBLIC.FAQ_CATEGORY(cat.slug)), paddingX: "sm", paddingY: "xs", layout: "flex", align: "center", justify: "between", weight: category === cat.slug ? "semibold" : undefined, className: `transition-colors ${category === cat.slug ? "bg-primary/10 text-primary" : "hover:bg-neutral-100 dark:bg-neutral-800 dark:hover:bg-neutral-800"}`, size: "sm", children: [_jsxs(Span, { className: `${flex.row}`, gap: "md", children: [_jsx(Span, { children: cat.icon }), cat.label] }), _jsx(ChevronRight, { className: "w-3.5 h-3.5 opacity-50" })] }, cat.slug)))] })] })), _jsxs(Div, { className: "flex-1 min-w-0", children: [visibleItems.length === 0 ? (_jsxs(Section, { className: `text-center`, border: "default", surface: "subtle", rounded: "2xl", padding: "y-4xl", children: [_jsx(HelpCircle, { className: "w-10 h-10 mx-auto mb-3 text-zinc-300 dark:text-zinc-600 dark:text-zinc-400" }), _jsx(Heading, { level: 3, className: "mb-2", size: "base", children: t("emptyTitle") }), _jsx(Text, { variant: "secondary", size: "sm", children: t("emptyText") })] })) : (_jsx(Stack, { gap: "sm", children: visibleItems.map((item, i) => (_jsxs(Details, { tone: "card", className: "group overflow-hidden", children: [_jsxs(Summary, { paddingX: "x-5", paddingY: "y-md", size: "sm", weight: "medium", layout: "flex", align: "center", justify: "between", className: "hover:bg-neutral-50 dark:hover:bg-neutral-800/50 transition-colors", children: [_jsx(Span, { children: item.question }), _jsx(ChevronRight, { className: "w-4 h-4 flex-shrink-0 ml-3 transition-transform group-open:rotate-90" })] }), _jsx(Div, { padding: "x-md", paddingY: "b-md-lg", className: "pt-[0.25rem]", children: _jsx(RichTextRenderer, { html: item.answer, proseClass: "prose prose-sm max-w-none dark:prose-invert" }) })] }, i))) })), _jsxs(Section, { className: `mt-10 text-center`, border: "default", surface: "subtle", rounded: "2xl", padding: "lg", children: [_jsx(Heading, { level: 3, className: "mb-2", size: "base", children: t("stillNeedHelpTitle") }), _jsx(Text, { variant: "secondary", className: "mb-4", size: "sm", children: t("stillNeedHelpText") }), _jsxs(Row, { align: "center", justify: "center", gap: "md", wrap: true, children: [_jsx(TextLink, { href: String(ROUTES.PUBLIC.HELP), children: t("helpCenter") }), _jsx(TextLink, { href: String(ROUTES.PUBLIC.CONTACT), variant: "muted", children: t("contactUs") })] })] })] })] }) })] }));
24
24
  }
@@ -68,7 +68,7 @@ function renderFeeTableSection(t, themed, rows) {
68
68
  return (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-6", children: t("tableTitle") }), _jsx(Div, { className: `${__O.xAuto}`, border: "default", rounded: "xl", children: _jsxs(Table, { size: "sm", children: [_jsx(Thead, { className: themed.bgSecondary, children: _jsxs(Tr, { children: [_jsx(Th, { className: "text-left", padding: "md", weight: "semibold", children: t("colFeeType") }), _jsx(Th, { className: "text-left", padding: "md", weight: "semibold", children: t("colRate") }), _jsx(Th, { className: "text-left", padding: "md", weight: "semibold", children: t("colPaidBy") }), _jsx(Th, { className: "text-left hidden md:table-cell", padding: "md", weight: "semibold", children: t("colNote") })] }) }), _jsx(Tbody, { className: "divide-y divide-neutral-100 dark:divide-neutral-800", children: rows.map((row) => (_jsxs(Tr, { className: `${themed.bgPrimary} hover:bg-neutral-50 dark:hover:bg-neutral-800/50`, children: [_jsx(Td, { weight: "medium", padding: "md", children: row.category }), _jsx(Td, { className: CLS_RATE_CELL, children: row.rate }), _jsx(Td, { padding: "md", children: _jsx(Caption, { children: row.who }) }), _jsx(Td, { className: "text-neutral-500 dark:text-neutral-400 hidden md:table-cell", padding: "md", size: "xs", children: row.note })] }, row.category))) })] }) }), _jsx(Caption, { className: "mt-3 block", color: "muted", children: t("tableNote") })] }));
69
69
  }
70
70
  function renderPayoutExampleSection(t, themed, rows) {
71
- return (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-3", children: t("payoutExampleTitle") }), _jsx(Text, { variant: "secondary", className: "mb-6", children: t("payoutExampleSubtitle") }), _jsxs(Div, { className: `${__P.p5} max-w-sm`, border: "default", surface: "muted", rounded: "xl", children: [_jsx(Heading, { level: 3, className: "mb-4", size: "base", children: t("payoutExampleProduct") }), _jsx(Stack, { gap: "sm", children: rows.map((row, i) => (_jsxs(Row, { textWeight: "bold", textSize: "sm", className: `${row.highlight ? "border-t border-neutral-200 dark:border-neutral-700 pt-2 mt-2 " : ""}`, justify: "between", children: [_jsx(Text, { className: row.highlight ? "font-bold" : "text-neutral-600 dark:text-neutral-400", children: row.label }), _jsx(Text, { className: row.highlight ? CLS_HIGHLIGHT : "", children: row.example })] }, i))) })] })] }));
71
+ return (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-3", children: t("payoutExampleTitle") }), _jsx(Text, { variant: "secondary", className: "mb-6", children: t("payoutExampleSubtitle") }), _jsxs(Div, { className: `${__P.p5} max-w-sm`, border: "default", surface: "muted", rounded: "xl", children: [_jsx(Heading, { level: 3, className: "mb-4", size: "base", children: t("payoutExampleProduct") }), _jsx(Stack, { gap: "sm", children: rows.map((row, i) => (_jsxs(Row, { textWeight: "bold", textSize: "sm", className: `${row.highlight ? "border-t border-neutral-200 dark:border-neutral-700 mt-2" : ""}`, paddingY: row.highlight ? "t-xs" : undefined, justify: "between", children: [_jsx(Text, { className: row.highlight ? "font-bold" : "text-neutral-600 dark:text-neutral-400", children: row.label }), _jsx(Text, { className: row.highlight ? CLS_HIGHLIGHT : "", children: row.example })] }, i))) })] })] }));
72
72
  }
73
73
  function renderDisclaimerSection(t, themed) {
74
74
  return (_jsxs(Section, { className: `${__P.p5}`, border: "default", surface: "subtle", rounded: "xl", children: [_jsx(Heading, { level: 3, className: "mb-2", size: "base", children: t("disclaimerTitle") }), _jsx(Caption, { className: "leading-relaxed", children: t("disclaimerText") })] }));
@@ -67,7 +67,7 @@ export async function HelpPageView({} = {}) {
67
67
  return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [_jsx(Section, { color: "inverse", tone: "accent-banner", padding: "banner", children: _jsxs(Div, { className: `${page.container.md} text-center`, children: [_jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-4", children: t("title") }), _jsx(Text, { color: "inverse", variant: "none", className: "/80 max-w-2xl mx-auto", children: t("subtitle") })] }) }), _jsxs(Stack, { gap: "14", className: `${page.container.md}`, padding: "content-banner", children: [renderTopicsGrid(t, flex, TOPICS), renderScamAwarenessAlert(t), renderTrackOrderSection(t), renderContactCtaSection(t)] })] }));
68
68
  }
69
69
  function renderTopicsGrid(t, flex, topics) {
70
- return (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-6", align: "center", children: t("browseTopics") }), _jsx(Div, { layout: "grid", gap: "4", className: "sm:grid-cols-2 lg:grid-cols-3", children: topics.map(({ icon: Icon, title, desc, href, color, iconColor }) => (_jsxs(TextLink, { rounded: "xl", href: href, className: `group border p-5 transition-shadow hover:shadow-md ${color} no-underline`, children: [_jsx(Row, { align: "center", justify: "center", className: `w-10 h-10 mb-3`, surface: "default", rounded: "lg", children: _jsx(Icon, { className: `w-5 h-5 ${iconColor}` }) }), _jsxs(Div, { layout: "flex", justify: "between", align: "start", className: flex.row, children: [_jsxs(Div, { children: [_jsx(Text, { className: "mb-1", weight: "semibold", children: title }), _jsx(Text, { variant: "secondary", className: "leading-relaxed", size: "sm", children: desc })] }), _jsx(ChevronRight, { className: "w-4 h-4 mt-1 flex-shrink-0 opacity-40 group-hover:opacity-80 transition-opacity" })] })] }, href))) })] }));
70
+ return (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-6", align: "center", children: t("browseTopics") }), _jsx(Div, { layout: "grid", gap: "4", className: "sm:grid-cols-2 lg:grid-cols-3", children: topics.map(({ icon: Icon, title, desc, href, color, iconColor }) => (_jsxs(TextLink, { rounded: "xl", href: href, shadow: "hover-md", className: `group border p-[1.25rem] transition ${color} no-underline`, children: [_jsx(Row, { align: "center", justify: "center", className: `w-10 h-10 mb-3`, surface: "default", rounded: "lg", children: _jsx(Icon, { className: `w-5 h-5 ${iconColor}` }) }), _jsxs(Div, { layout: "flex", justify: "between", align: "start", className: flex.row, children: [_jsxs(Div, { children: [_jsx(Text, { className: "mb-1", weight: "semibold", children: title }), _jsx(Text, { variant: "secondary", className: "leading-relaxed", size: "sm", children: desc })] }), _jsx(ChevronRight, { className: "w-4 h-4 mt-1 flex-shrink-0 opacity-40 group-hover:opacity-80 transition-opacity" })] })] }, href))) })] }));
71
71
  }
72
72
  function renderScamAwarenessAlert(t) {
73
73
  return (_jsxs(Alert, { variant: "warning", title: t("scamAwarenessTitle"), children: [t("scamAwarenessText"), " ", _jsx(TextLink, { href: String(ROUTES.PUBLIC.SCAMS), className: "underline", weight: "semibold", children: t("scamAwarenessCta") })] }));
@@ -134,7 +134,7 @@ export async function HowOrdersWorkView({} = {}) {
134
134
  return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [_jsx(Section, { color: "inverse", tone: "accent-banner", padding: "banner", children: _jsxs(Div, { className: `${page.container.md} text-center`, children: [_jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-4", children: t("title") }), _jsx(Text, { color: "inverse", variant: "none", className: "/80 max-w-2xl mx-auto", children: t("subtitle") })] }) }), _jsxs(Stack, { gap: "14", className: `${page.container.md}`, padding: "content-banner", children: [renderOrderStatusesSection(t, ORDER_STATUSES), _jsx(Section, { children: _jsx(FlowDiagram, { title: `📦 ${t("diagramTitle")}`, titleClass: "text-primary", connectorClass: "bg-primary/20 dark:bg-primary/30", steps: DIAGRAM_STEPS, centered: true }) }), renderOrderInfoCardsSection(INFO_CARDS), renderOrdersCtaSection(t)] })] }));
135
135
  }
136
136
  function renderOrderStatusesSection(t, statuses) {
137
- return (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-6", children: t("statusesTitle") }), _jsx(Stack, { gap: "3", children: statuses.map(({ status, icon, badge, desc }) => (_jsxs(Row, { className: `${__P.p4}`, border: "default", surface: "muted", align: "start", gap: "md", rounded: "xl", children: [_jsxs(Row, { align: "center", gap: "sm", className: "flex-shrink-0 pt-0.5", children: [_jsx(Span, { size: "xl", children: icon }), _jsx(Span, { size: "xs", weight: "semibold", className: `${badge}`, rounded: "full", padding: "pill-xs", children: status })] }), _jsx(Text, { variant: "secondary", className: "leading-relaxed", size: "sm", children: desc })] }, status))) })] }));
137
+ return (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-6", children: t("statusesTitle") }), _jsx(Stack, { gap: "3", children: statuses.map(({ status, icon, badge, desc }) => (_jsxs(Row, { className: `${__P.p4}`, border: "default", surface: "muted", align: "start", gap: "md", rounded: "xl", children: [_jsxs(Row, { align: "center", gap: "sm", className: "flex-shrink-0 pt-[0.125rem]", children: [_jsx(Span, { size: "xl", children: icon }), _jsx(Span, { size: "xs", weight: "semibold", className: `${badge}`, rounded: "full", padding: "pill-xs", children: status })] }), _jsx(Text, { variant: "secondary", className: "leading-relaxed", size: "sm", children: desc })] }, status))) })] }));
138
138
  }
139
139
  function renderOrderInfoCardsSection(cards) {
140
140
  return (_jsx(Section, { children: _jsx(Div, { layout: "grid", gap: "5", className: "md:grid-cols-2", children: cards.map(({ icon: Icon, title, text, color, iconColor }) => (_jsxs(Div, { className: `border ${__P.p5} ${color}`, rounded: "xl", children: [_jsx(Row, { align: "center", justify: "center", className: `w-10 h-10 mb-3`, surface: "default", rounded: "lg", children: _jsx(Icon, { className: `w-5 h-5 ${iconColor}` }) }), _jsx(Text, { className: "mb-1", weight: "semibold", children: title }), _jsx(Text, { variant: "secondary", className: "leading-relaxed", size: "sm", children: text })] }, title))) }) }));
@@ -92,7 +92,7 @@ export async function PublicProfileView({ userId, }) {
92
92
  const storeDescription = store?.storeDescription ?? pub?.storeDescription;
93
93
  const profileHeroCtx = { displayName, photoURL, memberSince, isSeller, storeSlug, flex, page };
94
94
  const statItems = buildProfileStatItems(t, { listingCount, reviewCount, itemsSold, auctionsWon, totalOrders, isSeller });
95
- return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [renderProfileHero(t, profileHeroCtx), _jsxs(Stack, { gap: "2xl", className: `${page.container.md} md:py-12`, padding: "y-2xl", children: [renderProfileStatsRow(flex, statItems), renderProfileBioSection(pub), renderStoreDescriptionSection(isSeller, storeSlug ?? null, storeDescription ?? null, storeName, t), renderProfileListingsSection(t, products, storeSlug ?? null), renderAuthoredReviewsSection(t, reviewsAuthored, displayName), isSeller && storeSlug && renderProfileReviewsSection(t, reviewsReceived, storeSlug), _jsx(Row, { justify: "center", padding: "t-xs", children: _jsxs(Link, { href: String(ROUTES.HOME), className: "text-sm text-zinc-400 dark:text-zinc-400 hover:text-neutral-600 dark:hover:text-zinc-300", children: ["\u2190 ", t("backHome")] }) })] })] }));
95
+ return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [renderProfileHero(t, profileHeroCtx), _jsxs(Stack, { gap: "2xl", className: `${page.container.md}`, paddingY: "y-3xl", children: [renderProfileStatsRow(flex, statItems), renderProfileBioSection(pub), renderStoreDescriptionSection(isSeller, storeSlug ?? null, storeDescription ?? null, storeName, t), renderProfileListingsSection(t, products, storeSlug ?? null), renderAuthoredReviewsSection(t, reviewsAuthored, displayName), isSeller && storeSlug && renderProfileReviewsSection(t, reviewsReceived, storeSlug), _jsx(Row, { justify: "center", padding: "t-xs", children: _jsxs(Link, { href: String(ROUTES.HOME), className: "text-sm text-zinc-400 dark:text-zinc-400 hover:text-neutral-600 dark:hover:text-zinc-300", children: ["\u2190 ", t("backHome")] }) })] })] }));
96
96
  }
97
97
  function buildProfileStatItems(t, ctx) {
98
98
  const { listingCount, reviewCount, itemsSold, auctionsWon, totalOrders, isSeller } = ctx;
@@ -112,7 +112,7 @@ function buildProfileStatItems(t, ctx) {
112
112
  }
113
113
  function renderProfileHero(t, ctx) {
114
114
  const { displayName, photoURL, memberSince, isSeller, storeSlug, flex, page } = ctx;
115
- return (_jsx(Section, { color: "inverse", tone: "accent-banner", className: "md:py-14", padding: "y-2xl", children: _jsx(Div, { className: `${page.container.md}`, children: _jsxs(Stack, { direction: "sm-row", className: "flex-wrap sm:items-end", align: "center", gap: "md", children: [_jsx(Row, { align: "center", justify: "center", className: `w-20 h-20 flex-shrink-0 ${__O.hidden}`, surface: "default", rounded: "full", children: photoURL ? _jsx(MediaImage, { src: photoURL, alt: displayName, size: "avatar", fallback: "\uD83D\uDC64" }) : _jsx(User, { className: "w-10 h-10 text-white/60" }) }), _jsxs(Stack, { gap: "xs", className: "text-center sm:text-left", children: [_jsxs(Row, { className: "sm:justify-start", justify: "center", gap: "xs", wrap: true, children: [_jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-0", children: displayName }), isSeller && _jsx(Span, { color: "inverse", size: "xs", weight: "semibold", className: "bg-white/20", padding: "pill-sm", rounded: "full", children: t("roleSeller") })] }), _jsx(Text, { color: "inverse", variant: "none", size: "sm", children: memberSince })] }), isSeller && storeSlug && (_jsx(Div, { className: "sm:ml-auto", children: _jsxs(Link, { href: String(ROUTES.PUBLIC.STORE_DETAIL(storeSlug)), className: "inline-flex items-center gap-1.5 rounded-full border border-white/30 bg-white/10 hover:bg-white/20 px-4 py-2 text-sm font-medium text-white transition-colors", children: [_jsx(ExternalLink, { className: "w-3.5 h-3.5" }), t("visitStore")] }) }))] }) }) }));
115
+ return (_jsx(Section, { color: "inverse", tone: "accent-banner", paddingY: "y-2-5xl", children: _jsx(Div, { className: `${page.container.md}`, children: _jsxs(Stack, { direction: "sm-row", wrap: true, align: "center", smAlign: "end", gap: "md", children: [_jsx(Row, { align: "center", justify: "center", className: `w-20 h-20 flex-shrink-0 ${__O.hidden}`, surface: "default", rounded: "full", children: photoURL ? _jsx(MediaImage, { src: photoURL, alt: displayName, size: "avatar", fallback: "\uD83D\uDC64" }) : _jsx(User, { className: "w-10 h-10 text-white/60" }) }), _jsxs(Stack, { gap: "xs", className: "text-center sm:text-left", children: [_jsxs(Row, { justify: "start", gap: "xs", wrap: true, children: [_jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-0", children: displayName }), isSeller && _jsx(Span, { color: "inverse", size: "xs", weight: "semibold", className: "bg-[white]/20", padding: "pill-sm", rounded: "full", children: t("roleSeller") })] }), _jsx(Text, { color: "inverse", variant: "none", size: "sm", children: memberSince })] }), isSeller && storeSlug && (_jsx(Div, { className: "sm:ml-auto", children: _jsxs(Link, { href: String(ROUTES.PUBLIC.STORE_DETAIL(storeSlug)), className: "inline-flex items-center gap-1.5 rounded-full border border-white/30 bg-white/10 hover:bg-white/20 px-4 py-2 text-sm font-medium text-white transition-colors", children: [_jsx(ExternalLink, { className: "w-3.5 h-3.5" }), t("visitStore")] }) }))] }) }) }));
116
116
  }
117
117
  function renderProfileStatsRow(flex, statItems) {
118
118
  return (_jsx(Grid, { gap: "md", className: "grid-cols-2 sm:grid-cols-4", children: statItems.map(({ icon: Icon, label, value }) => (_jsxs(Div, { rounded: "xl", className: `${__P.p4} text-center`, border: "default", surface: "muted", children: [_jsx(Row, { centered: true, className: `${flex.center} mb-1`, children: _jsx(Icon, { className: "w-4 h-4 text-neutral-400" }) }), _jsx(Text, { size: "lg", weight: "bold", children: value }), _jsx(Text, { variant: "secondary", size: "xs", children: label })] }, label))) }));
@@ -120,7 +120,7 @@ function renderProfileStatsRow(flex, statItems) {
120
120
  function renderProfileBioSection(pub) {
121
121
  if (!pub?.bio && !pub?.location && !pub?.website)
122
122
  return null;
123
- return (_jsx(Section, { children: _jsxs(Stack, { gap: "sm", className: `${__P.p6}`, border: "default", surface: "muted", rounded: "2xl", children: [pub.bio && _jsx(Text, { className: "leading-relaxed text-neutral-700", size: "sm", children: pub.bio }), _jsxs(Row, { gap: "md", wrap: true, children: [pub.location && _jsxs(Span, { layout: "flex", gap: "xs", size: "sm", className: "text-neutral-500 dark:text-neutral-400", children: [_jsx(MapPin, { className: "w-4 h-4" }), pub.location] }), pub.website && _jsxs(Anchor, { href: pub.website, className: "flex items-center gap-1.5", children: [_jsx(Globe, { className: "w-4 h-4" }), _jsx(Span, { size: "sm", children: pub.website.replace(/^https?:\/\//, "") })] })] })] }) }));
123
+ return (_jsx(Section, { children: _jsxs(Stack, { gap: "sm", className: `${__P.p6}`, border: "default", surface: "muted", rounded: "2xl", children: [pub.bio && _jsx(Text, { className: "leading-relaxed text-neutral-700", size: "sm", children: pub.bio }), _jsxs(Row, { gap: "md", wrap: true, children: [pub.location && _jsxs(Span, { layout: "flex", gap: "xs", size: "sm", className: "text-neutral-500 dark:text-neutral-400", children: [_jsx(MapPin, { className: "w-4 h-4" }), pub.location] }), pub.website && _jsxs(Anchor, { href: pub.website, layout: "inline-flex", className: "gap-[0.375rem]", children: [_jsx(Globe, { className: "w-4 h-4" }), _jsx(Span, { size: "sm", children: pub.website.replace(/^https?:\/\//, "") })] })] })] }) }));
124
124
  }
125
125
  function renderStoreDescriptionSection(isSeller, storeSlug, storeDescription, storeName, t) {
126
126
  if (!isSeller || !storeSlug || !storeDescription)
@@ -128,11 +128,11 @@ function renderStoreDescriptionSection(isSeller, storeSlug, storeDescription, st
128
128
  return (_jsx(Section, { children: _jsxs(Div, { rounded: "2xl", className: `${__P.p6}`, border: "default", surface: "subtle", children: [_jsx(Heading, { level: 3, className: "mb-2", children: storeName }), _jsx(Text, { variant: "secondary", className: "leading-relaxed", size: "sm", children: storeDescription }), _jsxs(Link, { href: String(ROUTES.PUBLIC.STORE_DETAIL(storeSlug)), className: "mt-3 inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline", children: [t("visitStore"), " \u2192"] })] }) }));
129
129
  }
130
130
  function renderProfileListingsSection(t, products, storeSlug) {
131
- return (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-4", children: t("listingsTitle") }), products.length === 0 ? (_jsxs(Div, { rounded: "2xl", className: `p-12 text-center`, border: "default", surface: "subtle", children: [_jsx(ShoppingBag, { className: CLS_EMPTY_ICON }), _jsx(Text, { variant: "secondary", size: "sm", children: t("noListings") })] })) : (_jsx(Grid, { gap: "md", className: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-4", children: products.slice(0, 8).map((p) => _jsx(ProductCard, { product: toProductItem(p), href: getProductHref(p) }, p.id)) })), products.length > 8 && storeSlug && (_jsx(Div, { className: "mt-4 text-center", children: _jsx(Link, { href: String(ROUTES.PUBLIC.STORE_PRODUCTS(storeSlug)), className: "text-sm font-medium text-primary hover:underline", children: t("viewAllListings", { count: products.length }) }) }))] }));
131
+ return (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-4", children: t("listingsTitle") }), products.length === 0 ? (_jsxs(Div, { rounded: "2xl", padding: "3xl", className: "text-center", border: "default", surface: "subtle", children: [_jsx(ShoppingBag, { className: CLS_EMPTY_ICON }), _jsx(Text, { variant: "secondary", size: "sm", children: t("noListings") })] })) : (_jsx(Grid, { gap: "md", className: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-4", children: products.slice(0, 8).map((p) => _jsx(ProductCard, { product: toProductItem(p), href: getProductHref(p) }, p.id)) })), products.length > 8 && storeSlug && (_jsx(Div, { className: "mt-4 text-center", children: _jsx(Link, { href: String(ROUTES.PUBLIC.STORE_PRODUCTS(storeSlug)), className: "text-sm font-medium text-primary hover:underline", children: t("viewAllListings", { count: products.length }) }) }))] }));
132
132
  }
133
133
  function renderProfileReviewsSection(t, reviews, storeSlug) {
134
- return (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-4", children: t("reviewsReceivedTitle") }), reviews.length === 0 ? (_jsxs(Div, { rounded: "2xl", className: `p-12 text-center`, border: "default", surface: "subtle", children: [_jsx(Star, { className: CLS_EMPTY_ICON }), _jsx(Text, { variant: "secondary", size: "sm", children: t("noReviewsReceived") })] })) : (_jsx(Grid, { gap: "md", className: "grid-cols-1 sm:grid-cols-2", children: reviews.slice(0, 6).map((review) => _jsx(ReviewCard, { review: review }, review.id)) })), reviews.length > 6 && storeSlug && (_jsx(Div, { className: "mt-4 text-center", children: _jsx(Link, { href: String(ROUTES.PUBLIC.STORE_REVIEWS(storeSlug)), className: "text-sm font-medium text-primary hover:underline", children: t("viewAllReviews", { count: reviews.length }) }) }))] }));
134
+ return (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-4", children: t("reviewsReceivedTitle") }), reviews.length === 0 ? (_jsxs(Div, { rounded: "2xl", padding: "3xl", className: "text-center", border: "default", surface: "subtle", children: [_jsx(Star, { className: CLS_EMPTY_ICON }), _jsx(Text, { variant: "secondary", size: "sm", children: t("noReviewsReceived") })] })) : (_jsx(Grid, { gap: "md", className: "grid-cols-1 sm:grid-cols-2", children: reviews.slice(0, 6).map((review) => _jsx(ReviewCard, { review: review }, review.id)) })), reviews.length > 6 && storeSlug && (_jsx(Div, { className: "mt-4 text-center", children: _jsx(Link, { href: String(ROUTES.PUBLIC.STORE_REVIEWS(storeSlug)), className: "text-sm font-medium text-primary hover:underline", children: t("viewAllReviews", { count: reviews.length }) }) }))] }));
135
135
  }
136
136
  function renderAuthoredReviewsSection(t, reviews, displayName) {
137
- return (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-4", children: t("reviewsAuthoredTitle", { name: displayName }) }), reviews.length === 0 ? (_jsxs(Div, { rounded: "2xl", className: `p-12 text-center`, border: "default", surface: "subtle", children: [_jsx(Star, { className: CLS_EMPTY_ICON }), _jsx(Text, { variant: "secondary", size: "sm", children: t("noReviewsAuthored", { name: displayName }) })] })) : (_jsx(Grid, { gap: "md", className: "grid-cols-1 sm:grid-cols-2", children: reviews.slice(0, 6).map((review) => _jsx(ReviewCard, { review: review }, review.id)) }))] }));
137
+ return (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-4", children: t("reviewsAuthoredTitle", { name: displayName }) }), reviews.length === 0 ? (_jsxs(Div, { rounded: "2xl", padding: "3xl", className: "text-center", border: "default", surface: "subtle", children: [_jsx(Star, { className: CLS_EMPTY_ICON }), _jsx(Text, { variant: "secondary", size: "sm", children: t("noReviewsAuthored", { name: displayName }) })] })) : (_jsx(Grid, { gap: "md", className: "grid-cols-1 sm:grid-cols-2", children: reviews.slice(0, 6).map((review) => _jsx(ReviewCard, { review: review }, review.id)) }))] }));
138
138
  }
@@ -47,5 +47,5 @@ export async function TrackOrderView({} = {}) {
47
47
  bg: "bg-emerald-100 dark:bg-emerald-900/40",
48
48
  },
49
49
  ];
50
- return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [_jsx(Section, { color: "inverse", tone: "accent-banner", padding: "banner", children: _jsxs(Div, { className: `${page.container.sm} text-center`, children: [_jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-4", children: t("title") }), _jsx(Text, { color: "inverse", variant: "none", className: "/80", children: t("subtitle") })] }) }), _jsxs(Div, { className: `${page.container.md} md:py-16 space-y-14 md:space-y-16`, padding: "y-2-5xl", children: [_jsxs(Section, { className: `text-center`, border: "default", surface: "subtle", rounded: "2xl", padding: "xl", children: [_jsx(Row, { align: "center", justify: "center", className: `w-16 h-16 bg-primary/10 dark:bg-primary/15 mx-auto mb-4`, rounded: "full", children: _jsx(ShoppingBag, { className: "w-8 h-8 text-primary" }) }), _jsx(Heading, { level: 2, className: "mb-3", children: t("signInPrompt") }), _jsxs(Stack, { direction: "sm-row", justify: "center", className: "mt-6", gap: "3", children: [_jsx(TextLink, { rounded: "lg", paddingX: "xl", paddingY: "md", href: String(ROUTES.AUTH.LOGIN), className: `inline-flex items-center gap-2 bg-primary hover:bg-primary/90 text-white transition-colors`, weight: "medium", children: t("signIn") }), _jsx(TextLink, { rounded: "lg", paddingX: "xl", paddingY: "md", href: String(ROUTES.USER.ORDERS), className: `inline-flex items-center gap-2 ${themed.bgPrimary} border ${themed.border} ${themed.textPrimary} hover:opacity-80 transition-opacity`, weight: "medium", children: t("viewOrders") })] })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-10", align: "center", children: t("howItWorksTitle") }), _jsx(Grid, { className: "grid-cols-1 sm:grid-cols-2 xl:grid-cols-4", gap: "lg", children: STEPS.map(({ icon: Icon, title, text, color, bg }, index) => (_jsxs("div", { className: `${themed.bgSecondary} rounded-xl border ${themed.border} p-6 relative`, children: [_jsx(Caption, { className: "absolute top-4 right-4", weight: "bold", children: String(index + 1).padStart(2, "0") }), _jsx(Row, { align: "center", justify: "center", className: `w-12 h-12 ${bg} mb-4`, rounded: "xl", children: _jsx(Icon, { className: `w-6 h-6 ${color}` }) }), _jsx(Heading, { level: 3, className: "mb-2", children: title }), _jsx(Text, { variant: "secondary", size: "sm", className: "leading-relaxed", children: text })] }, title))) })] }), _jsxs(Section, { layout: "flex-sm-row-between", gap: "md", border: "default", surface: "subtle", rounded: "xl", padding: "lg", children: [_jsxs(Div, { children: [_jsx(Heading, { level: 2, className: "mb-1", children: t("needHelpTitle") }), _jsx(Text, { variant: "secondary", size: "sm", children: t("needHelpText") })] }), _jsxs(Row, { gap: "3", className: "flex-shrink-0", children: [_jsx(TextLink, { href: String(ROUTES.PUBLIC.HELP), className: `${themed.textSecondary} hover:text-primary underline underline-offset-4 transition-colors`, size: "sm", children: t("helpCenter") }), _jsx(TextLink, { rounded: "lg", paddingX: "md", paddingY: "xs", href: String(ROUTES.PUBLIC.CONTACT), className: "bg-primary hover:bg-primary/90 text-white transition-colors", size: "sm", children: t("contactSupport") })] })] })] })] }));
50
+ return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [_jsx(Section, { color: "inverse", tone: "accent-banner", padding: "banner", children: _jsxs(Div, { className: `${page.container.sm} text-center`, children: [_jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-4", children: t("title") }), _jsx(Text, { color: "inverse", variant: "none", className: "/80", children: t("subtitle") })] }) }), _jsx(Div, { className: page.container.md, padding: "y-4xl", children: _jsxs(Stack, { gap: "hero", children: [_jsxs(Section, { className: `text-center`, border: "default", surface: "subtle", rounded: "2xl", padding: "xl", children: [_jsx(Row, { align: "center", justify: "center", className: `w-16 h-16 bg-primary/10 dark:bg-primary/15 mx-auto mb-4`, rounded: "full", children: _jsx(ShoppingBag, { className: "w-8 h-8 text-primary" }) }), _jsx(Heading, { level: 2, className: "mb-3", children: t("signInPrompt") }), _jsxs(Stack, { direction: "sm-row", justify: "center", className: "mt-6", gap: "3", children: [_jsx(TextLink, { rounded: "lg", paddingX: "xl", paddingY: "md", layout: "inline-flex", align: "center", justify: "center", gap: "sm", href: String(ROUTES.AUTH.LOGIN), className: `bg-primary hover:bg-primary/90 text-white transition-colors`, weight: "medium", children: t("signIn") }), _jsx(TextLink, { rounded: "lg", paddingX: "xl", paddingY: "md", layout: "inline-flex", align: "center", justify: "center", gap: "sm", href: String(ROUTES.USER.ORDERS), className: `${themed.bgPrimary} border ${themed.border} ${themed.textPrimary} hover:opacity-80 transition-opacity`, weight: "medium", children: t("viewOrders") })] })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-10", align: "center", children: t("howItWorksTitle") }), _jsx(Grid, { className: "grid-cols-1 sm:grid-cols-2 xl:grid-cols-4", gap: "lg", children: STEPS.map(({ icon: Icon, title, text, color, bg }, index) => (_jsxs("div", { className: `${themed.bgSecondary} rounded-xl border ${themed.border} p-6 relative`, children: [_jsx(Caption, { className: "absolute top-4 right-4", weight: "bold", children: String(index + 1).padStart(2, "0") }), _jsx(Row, { align: "center", justify: "center", className: `w-12 h-12 ${bg} mb-4`, rounded: "xl", children: _jsx(Icon, { className: `w-6 h-6 ${color}` }) }), _jsx(Heading, { level: 3, className: "mb-2", children: title }), _jsx(Text, { variant: "secondary", size: "sm", className: "leading-relaxed", children: text })] }, title))) })] }), _jsxs(Section, { layout: "flex-sm-row-between", gap: "md", border: "default", surface: "subtle", rounded: "xl", padding: "lg", children: [_jsxs(Div, { children: [_jsx(Heading, { level: 2, className: "mb-1", children: t("needHelpTitle") }), _jsx(Text, { variant: "secondary", size: "sm", children: t("needHelpText") })] }), _jsxs(Row, { gap: "3", className: "flex-shrink-0", children: [_jsx(TextLink, { href: String(ROUTES.PUBLIC.HELP), className: `${themed.textSecondary} hover:text-primary underline underline-offset-4 transition-colors`, size: "sm", children: t("helpCenter") }), _jsx(TextLink, { rounded: "lg", paddingX: "md", paddingY: "xs", href: String(ROUTES.PUBLIC.CONTACT), className: "bg-primary hover:bg-primary/90 text-white transition-colors", size: "sm", children: t("contactSupport") })] })] })] }) })] }));
51
51
  }
@@ -10,5 +10,5 @@ export function AddressCard({ address, onEdit, onDelete, onSetDefault, labels =
10
10
  return (_jsxs(Div, { surface: "card", padding: "sm", className: "relative", children: [address.isDefault && (_jsx(Span, { color: "success", surface: "success-surface", size: "xs", weight: "medium", className: "absolute right-3 top-3", rounded: "full", padding: "pill-xs", children: labels.defaultBadge ?? "Default" })), address.label && (_jsx(Text, { className: "mb-1 tracking-wide text-neutral-500 dark:text-neutral-400", size: "xs", weight: "semibold", transform: "uppercase", children: address.label })), _jsx(Text, { className: "text-neutral-900 dark:text-neutral-100", size: "sm", children: line1 }), line2 && _jsx(Text, { className: "text-neutral-900 dark:text-neutral-100", size: "sm", children: line2 }), _jsxs(Text, { className: "text-neutral-900 dark:text-neutral-100", size: "sm", children: [address.city, ", ", address.state, " ", address.postalCode] }), _jsx(Text, { className: "text-neutral-900 dark:text-neutral-100", size: "sm", children: address.country }), address.phone && (_jsx(Text, { className: "mt-1 text-neutral-500 dark:text-neutral-400", size: "sm", children: address.phone })), _jsxs(Div, { layout: "flex", gap: "1", className: "mt-3", children: [onEdit && (_jsx(Button, { onClick: () => onEdit(address), variant: "ghost", size: "sm", className: "text-xs font-medium text-primary hover:underline", children: labels.edit ?? "Edit" })), onDelete && (_jsx(Button, { onClick: () => onDelete(address.id), variant: "ghost", size: "sm", className: "text-xs font-medium text-error hover:underline", children: labels.delete ?? "Delete" })), !address.isDefault && onSetDefault && (_jsx(Button, { onClick: () => onSetDefault(address.id), variant: "outline", size: "sm", className: "ml-auto text-xs font-medium", children: labels.setDefault ?? "Set default" }))] })] }));
11
11
  }
12
12
  export function AddressBook({ addresses, onEdit, onDelete, onSetDefault, onAdd, emptyLabel = "No saved addresses", addLabel = "Add Address", }) {
13
- return (_jsxs(Stack, { gap: "md", children: [addresses.length === 0 && (_jsx(Text, { className: "text-neutral-500 dark:text-neutral-400", size: "sm", children: emptyLabel })), _jsx(Div, { layout: "grid", gap: "4", className: "sm:grid-cols-2", children: addresses.map((addr) => (_jsx(AddressCard, { address: addr, onEdit: onEdit, onDelete: onDelete, onSetDefault: onSetDefault }, addr.id))) }), onAdd && (_jsxs(Button, { rounded: "lg", onClick: onAdd, variant: "outline", paddingX: "md", paddingY: "md", textSize: "sm", weight: "medium", className: "mt-2 border border-dashed border-neutral-300 dark:border-slate-600 text-neutral-500 dark:text-zinc-400 transition hover:border-neutral-400 dark:hover:border-slate-500 hover:text-neutral-700 dark:hover:text-zinc-200", children: ["+ ", addLabel] }))] }));
13
+ return (_jsxs(Stack, { gap: "md", children: [addresses.length === 0 && (_jsx(Text, { className: "text-neutral-500 dark:text-neutral-400", size: "sm", children: emptyLabel })), _jsx(Div, { layout: "grid", gap: "4", className: "sm:grid-cols-2", children: addresses.map((addr) => (_jsx(AddressCard, { address: addr, onEdit: onEdit, onDelete: onDelete, onSetDefault: onSetDefault }, addr.id))) }), onAdd && (_jsxs(Button, { rounded: "lg", onClick: onAdd, variant: "outline", paddingX: "md", paddingY: "md", textSize: "sm", weight: "medium", className: "mt-2 border border-dashed border-neutral-300 dark:border-[var(--appkit-color-border)] text-neutral-500 dark:text-[var(--appkit-color-text-muted)] transition hover:border-neutral-400 dark:hover:border-[var(--appkit-color-border-subtle)] hover:text-neutral-700 dark:hover:text-[var(--appkit-color-text)]", children: ["+ ", addLabel] }))] }));
14
14
  }
@@ -1,7 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { normalizeError } from "../../../errors/normalize";
3
4
  import { useState } from "react";
4
- import { Button, Checkbox, FormField, FormGroup, Row } from "../../../ui";
5
+ import { Button, Checkbox, FormField, FormGroup, Row, useToast } from "../../../ui";
5
6
  import { Form } from "../../../ui/components/Form";
6
7
  const DEFAULT_LABELS = {
7
8
  label: "Address Label",
@@ -30,6 +31,7 @@ const DEFAULT_PLACEHOLDERS = {
30
31
  country: "Country",
31
32
  };
32
33
  export function AddressForm({ initialData, onSubmit, onCancel, isLoading = false, submitLabel, defaultCountry = "India", labels, placeholders, }) {
34
+ const { showToast } = useToast();
33
35
  const mergedLabels = { ...DEFAULT_LABELS, ...labels };
34
36
  const mergedPlaceholders = { ...DEFAULT_PLACEHOLDERS, ...placeholders };
35
37
  const effectiveSubmitLabel = submitLabel ?? mergedLabels.save;
@@ -67,6 +69,12 @@ export function AddressForm({ initialData, onSubmit, onCancel, isLoading = false
67
69
  Object.entries(errs).forEach(([k, v]) => setFieldError(k, v));
68
70
  return;
69
71
  }
70
- await onSubmit(formData);
72
+ try {
73
+ await onSubmit(formData);
74
+ }
75
+ catch (err) {
76
+ void normalizeError(err);
77
+ showToast(err instanceof Error ? err.message : "Failed to save address", "error");
78
+ }
71
79
  }, children: isLoading ? mergedLabels.loading : effectiveSubmitLabel })] })] })) }));
72
80
  }
@@ -74,5 +74,5 @@ export function AddressesIndexListing({ onAdd, onEdit, onDelete, }) {
74
74
  },
75
75
  });
76
76
  return (_jsxs(Stack, { gap: "md", children: [_jsx(ListingToolbar, { filterCount: activeFilterCount, onFiltersClick: openFilters, searchValue: searchInput, searchPlaceholder: "Search by address, postcode or label...", onSearchChange: setSearchInput, onSearchCommit: commitSearch, view: view, onViewChange: (v) => { if (v === "table")
77
- return; setView(v); }, onResetAll: resetAll, hasActiveState: hasActiveState }), _jsx(Div, { className: "sm:px-4", padding: "x-sm", children: isLoading ? (_jsx(Div, { layout: "grid", gap: "4", className: "sm:grid-cols-2", children: Array.from({ length: 4 }).map((_, i) => (_jsxs("div", { className: "rounded-xl border border-zinc-200 dark:border-slate-700 animate-pulse p-4 space-y-2", children: [_jsx(Div, { className: "h-4 w-1/3", surface: "subtle", rounded: "default" }), _jsx(Div, { className: "h-3 w-3/4", surface: "subtle", rounded: "default" }), _jsx(Div, { className: "h-3 w-1/2", surface: "subtle", rounded: "default" })] }, i))) })) : addresses.length === 0 ? (_jsx(Text, { paddingY: "xl", color: "muted", size: "sm", align: "center", children: table.get(TABLE_KEYS.QUERY) ? `No addresses matching "${table.get(TABLE_KEYS.QUERY)}"` : "No saved addresses." })) : (_jsx(AddressBook, { addresses: addresses, onEdit: onEdit, onDelete: onDelete, onAdd: onAdd })) }), _jsx(ListingFilterDrawer, { open: filterOpen, onClose: () => setFilterOpen(false), onApply: applyFilters, onClear: clearFilters, activeCount: activeFilterCount, children: _jsx(AddressFilters, { table: pendingTable }) })] }));
77
+ return; setView(v); }, onResetAll: resetAll, hasActiveState: hasActiveState }), _jsx(Div, { className: "sm:px-[1rem]", padding: "x-sm", children: isLoading ? (_jsx(Div, { layout: "grid", gap: "4", className: "sm:grid-cols-2", children: Array.from({ length: 4 }).map((_, i) => (_jsxs("div", { className: "rounded-xl border border-zinc-200 dark:border-slate-700 animate-pulse p-4 space-y-2", children: [_jsx(Div, { className: "h-4 w-1/3", surface: "subtle", rounded: "default" }), _jsx(Div, { className: "h-3 w-3/4", surface: "subtle", rounded: "default" }), _jsx(Div, { className: "h-3 w-1/2", surface: "subtle", rounded: "default" })] }, i))) })) : addresses.length === 0 ? (_jsx(Text, { paddingY: "xl", color: "muted", size: "sm", align: "center", children: table.get(TABLE_KEYS.QUERY) ? `No addresses matching "${table.get(TABLE_KEYS.QUERY)}"` : "No saved addresses." })) : (_jsx(AddressBook, { addresses: addresses, onEdit: onEdit, onDelete: onDelete, onAdd: onAdd })) }), _jsx(ListingFilterDrawer, { open: filterOpen, onClose: () => setFilterOpen(false), onApply: applyFilters, onClear: clearFilters, activeCount: activeFilterCount, children: _jsx(AddressFilters, { table: pendingTable }) })] }));
78
78
  }
@@ -35,5 +35,5 @@ const SECTIONS = [
35
35
  ];
36
36
  // ─── Component ────────────────────────────────────────────────────────────────
37
37
  export function BuyerAccountGuideView() {
38
- return (_jsxs(Stack, { className: "max-w-3xl mx-auto", padding: "b-2xl", gap: "xl", children: [_jsxs(Section, { children: [_jsxs(Row, { className: "mb-2", align: "center", gap: "3", children: [_jsx(Row, { className: "flex-shrink-0 w-10 h-10", align: "center", justify: "center", rounded: "xl", style: { background: GC.pageHeaderGradient }, children: _jsx(UserCheck, { className: "w-5 h-5 text-white" }) }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)] tracking-widest", size: "sm", weight: "semibold", transform: "uppercase", children: "Buyer Guide" })] }), _jsx(Heading, { level: 1, className: "text-[var(--appkit-color-text)] mb-2", mdSize: "3xl", size: "2xl", weight: "bold", children: "Account & Safety" }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", children: "Manage your LetItRip profile, stay safe from scams, and know how to report problems." })] }), SECTIONS.map(({ Icon, iconCls, title, content }) => (_jsxs(Section, { className: GC.sectionWrap, children: [_jsxs(Div, { className: GC.sectionHeader, children: [_jsx(Icon, { className: iconCls ?? GC.iconPrimary }), _jsx(Heading, { level: 2, className: GC.sectionTitle, children: title })] }), _jsx(Div, { className: GC.sectionBody, children: content })] }, title)))] }));
38
+ return (_jsxs(Stack, { className: "max-w-3xl mx-auto", padding: "b-2xl", gap: "xl", children: [_jsxs(Section, { children: [_jsxs(Row, { className: "mb-2", align: "center", gap: "3", children: [_jsx(Row, { className: `flex-shrink-0 w-10 h-10 ${GC.iconBg}`, align: "center", justify: "center", rounded: "xl", children: _jsx(UserCheck, { className: "w-5 h-5 text-white" }) }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)] tracking-widest", size: "sm", weight: "semibold", transform: "uppercase", children: "Buyer Guide" })] }), _jsx(Heading, { level: 1, className: "text-[var(--appkit-color-text)] mb-2", mdSize: "3xl", size: "2xl", weight: "bold", children: "Account & Safety" }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", children: "Manage your LetItRip profile, stay safe from scams, and know how to report problems." })] }), SECTIONS.map(({ Icon, iconCls, title, content }) => (_jsxs(Section, { className: GC.sectionWrap, children: [_jsxs(Div, { className: GC.sectionHeader, children: [_jsx(Icon, { className: iconCls ?? GC.iconPrimary }), _jsx(Heading, { level: 2, className: GC.sectionTitle, children: title })] }), _jsx(Div, { className: GC.sectionBody, children: content })] }, title)))] }));
39
39
  }
@@ -34,5 +34,5 @@ const SECTIONS = [
34
34
  ];
35
35
  // ─── Component ────────────────────────────────────────────────────────────────
36
36
  export function BuyerAuctionsGuideView() {
37
- return (_jsxs(Stack, { className: "max-w-3xl mx-auto", padding: "b-2xl", gap: "xl", children: [_jsxs(Section, { children: [_jsxs(Row, { className: "mb-2", align: "center", gap: "3", children: [_jsx(Row, { className: "flex-shrink-0 w-10 h-10", align: "center", justify: "center", rounded: "xl", style: { background: GC.pageHeaderGradient }, children: _jsx(Gavel, { className: "w-5 h-5 text-white" }) }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)] tracking-widest", size: "sm", weight: "semibold", transform: "uppercase", children: "Buyer Guide" })] }), _jsx(Heading, { level: 1, className: "text-[var(--appkit-color-text)] mb-2", mdSize: "3xl", size: "2xl", weight: "bold", children: "Auctions & Pre-orders" }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", children: "How bidding works, how to win, and everything you need to know about pre-orders on LetItRip." })] }), SECTIONS.map(({ Icon, iconCls, title, content }) => (_jsxs(Section, { className: GC.sectionWrap, children: [_jsxs(Div, { className: GC.sectionHeader, children: [_jsx(Icon, { className: iconCls ?? GC.iconPrimary }), _jsx(Heading, { level: 2, className: GC.sectionTitle, children: title })] }), _jsx(Div, { className: GC.sectionBody, children: content })] }, title)))] }));
37
+ return (_jsxs(Stack, { className: "max-w-3xl mx-auto", padding: "b-2xl", gap: "xl", children: [_jsxs(Section, { children: [_jsxs(Row, { className: "mb-2", align: "center", gap: "3", children: [_jsx(Row, { className: `flex-shrink-0 w-10 h-10 ${GC.iconBg}`, align: "center", justify: "center", rounded: "xl", children: _jsx(Gavel, { className: "w-5 h-5 text-white" }) }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)] tracking-widest", size: "sm", weight: "semibold", transform: "uppercase", children: "Buyer Guide" })] }), _jsx(Heading, { level: 1, className: "text-[var(--appkit-color-text)] mb-2", mdSize: "3xl", size: "2xl", weight: "bold", children: "Auctions & Pre-orders" }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", children: "How bidding works, how to win, and everything you need to know about pre-orders on LetItRip." })] }), SECTIONS.map(({ Icon, iconCls, title, content }) => (_jsxs(Section, { className: GC.sectionWrap, children: [_jsxs(Div, { className: GC.sectionHeader, children: [_jsx(Icon, { className: iconCls ?? GC.iconPrimary }), _jsx(Heading, { level: 2, className: GC.sectionTitle, children: title })] }), _jsx(Div, { className: GC.sectionBody, children: content })] }, title)))] }));
38
38
  }
@@ -44,5 +44,5 @@ const SECTIONS = [
44
44
  ];
45
45
  // ─── Component ────────────────────────────────────────────────────────────────
46
46
  export function BuyerOrdersGuideView() {
47
- return (_jsxs(Stack, { className: "max-w-3xl mx-auto", padding: "b-2xl", gap: "xl", children: [_jsxs(Section, { children: [_jsxs(Row, { className: "mb-2", align: "center", gap: "3", children: [_jsx(Row, { className: "flex-shrink-0 w-10 h-10", align: "center", justify: "center", rounded: "xl", style: { background: GC.pageHeaderGradient }, children: _jsx(PackageCheck, { className: "w-5 h-5 text-white" }) }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)] tracking-widest", size: "sm", weight: "semibold", transform: "uppercase", children: "Buyer Guide" })] }), _jsx(Heading, { level: 1, className: "text-[var(--appkit-color-text)] mb-2", mdSize: "3xl", size: "2xl", weight: "bold", children: "Orders, Returns & Support" }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", children: "From placing an order to getting a refund \u2014 everything you need to know about managing your orders on LetItRip." })] }), SECTIONS.map(({ Icon, iconCls, title, content }) => (_jsxs(Section, { className: GC.sectionWrap, children: [_jsxs(Div, { className: GC.sectionHeader, children: [_jsx(Icon, { className: iconCls ?? GC.iconPrimary }), _jsx(Heading, { level: 2, className: GC.sectionTitle, children: title })] }), _jsx(Div, { className: GC.sectionBody, children: content })] }, title)))] }));
47
+ return (_jsxs(Stack, { className: "max-w-3xl mx-auto", padding: "b-2xl", gap: "xl", children: [_jsxs(Section, { children: [_jsxs(Row, { className: "mb-2", align: "center", gap: "3", children: [_jsx(Row, { className: `flex-shrink-0 w-10 h-10 ${GC.iconBg}`, align: "center", justify: "center", rounded: "xl", children: _jsx(PackageCheck, { className: "w-5 h-5 text-white" }) }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)] tracking-widest", size: "sm", weight: "semibold", transform: "uppercase", children: "Buyer Guide" })] }), _jsx(Heading, { level: 1, className: "text-[var(--appkit-color-text)] mb-2", mdSize: "3xl", size: "2xl", weight: "bold", children: "Orders, Returns & Support" }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", children: "From placing an order to getting a refund \u2014 everything you need to know about managing your orders on LetItRip." })] }), SECTIONS.map(({ Icon, iconCls, title, content }) => (_jsxs(Section, { className: GC.sectionWrap, children: [_jsxs(Div, { className: GC.sectionHeader, children: [_jsx(Icon, { className: iconCls ?? GC.iconPrimary }), _jsx(Heading, { level: 2, className: GC.sectionTitle, children: title })] }), _jsx(Div, { className: GC.sectionBody, children: content })] }, title)))] }));
48
48
  }
@@ -34,5 +34,5 @@ const SECTIONS = [
34
34
  ];
35
35
  // ─── Component ────────────────────────────────────────────────────────────────
36
36
  export function BuyerShoppingGuideView() {
37
- return (_jsxs(Stack, { className: "max-w-3xl mx-auto", padding: "b-2xl", gap: "xl", children: [_jsxs(Section, { children: [_jsxs(Row, { className: "mb-2", align: "center", gap: "3", children: [_jsx(Row, { className: "flex-shrink-0 w-10 h-10", align: "center", justify: "center", rounded: "xl", style: { background: GC.pageHeaderGradient }, children: _jsx(ShoppingBag, { className: "w-5 h-5 text-white" }) }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)] tracking-widest", size: "sm", weight: "semibold", transform: "uppercase", children: "Buyer Guide" })] }), _jsx(Heading, { level: 1, className: "text-[var(--appkit-color-text)] mb-2", mdSize: "3xl", size: "2xl", weight: "bold", children: "Shopping & Checkout" }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", children: "Everything you need to know about finding, evaluating, and buying collectibles on LetItRip." })] }), SECTIONS.map(({ Icon, title, content }) => (_jsxs(Section, { className: GC.sectionWrap, children: [_jsxs(Div, { className: GC.sectionHeader, children: [_jsx(Icon, { className: GC.iconPrimary }), _jsx(Heading, { level: 2, className: GC.sectionTitle, children: title })] }), _jsx(Div, { className: GC.sectionBody, children: content })] }, title)))] }));
37
+ return (_jsxs(Stack, { className: "max-w-3xl mx-auto", padding: "b-2xl", gap: "xl", children: [_jsxs(Section, { children: [_jsxs(Row, { className: "mb-2", align: "center", gap: "3", children: [_jsx(Row, { className: `flex-shrink-0 w-10 h-10 ${GC.iconBg}`, align: "center", justify: "center", rounded: "xl", children: _jsx(ShoppingBag, { className: "w-5 h-5 text-white" }) }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)] tracking-widest", size: "sm", weight: "semibold", transform: "uppercase", children: "Buyer Guide" })] }), _jsx(Heading, { level: 1, className: "text-[var(--appkit-color-text)] mb-2", mdSize: "3xl", size: "2xl", weight: "bold", children: "Shopping & Checkout" }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", children: "Everything you need to know about finding, evaluating, and buying collectibles on LetItRip." })] }), SECTIONS.map(({ Icon, title, content }) => (_jsxs(Section, { className: GC.sectionWrap, children: [_jsxs(Div, { className: GC.sectionHeader, children: [_jsx(Icon, { className: GC.iconPrimary }), _jsx(Heading, { level: 2, className: GC.sectionTitle, children: title })] }), _jsx(Div, { className: GC.sectionBody, children: content })] }, title)))] }));
38
38
  }
@@ -2,5 +2,5 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Div, Heading, Row, Span } from "../../../ui";
3
3
  const CLS_DOT_ON = "bg-success-surface";
4
4
  export function ChatWindow({ labels = {}, isConnected = true, isLoading = false, error, renderLoadingIndicator, renderMessages, renderInput, className = "", }) {
5
- return (_jsxs(Div, { className: className, children: [_jsxs(Row, { justify: "between", className: "border-b border-neutral-200 dark:border-neutral-700 mb-3", padding: "b-sm", children: [_jsxs(Row, { gap: "xs", children: [labels.title && _jsx(Heading, { level: 4, children: labels.title }), _jsx(Span, { className: `w-2 h-2 ${isConnected ? CLS_DOT_ON : "bg-zinc-400"}`, rounded: "full", "aria-label": isConnected ? labels.connected : labels.disconnected })] }), isLoading && (renderLoadingIndicator?.() ?? null)] }), error ?? null, renderMessages(), renderInput()] }));
5
+ return (_jsxs(Div, { className: className, children: [_jsxs(Row, { justify: "between", className: "border-b border-neutral-200 dark:border-neutral-700 mb-3", padding: "b-sm", children: [_jsxs(Row, { gap: "xs", children: [labels.title && _jsx(Heading, { level: 4, children: labels.title }), _jsx(Span, { className: `w-2 h-2 ${isConnected ? CLS_DOT_ON : "bg-[var(--appkit-color-text-faint)]"}`, rounded: "full", "aria-label": isConnected ? labels.connected : labels.disconnected })] }), isLoading && (renderLoadingIndicator?.() ?? null)] }), error ?? null, renderMessages(), renderInput()] }));
6
6
  }
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Div, Heading, Span, Stack } from "../../../ui";
3
3
  export function MessagesView({ labels = {}, chatId, renderChatList, renderChatWindow, renderMobileBack, renderEmptyState, className = "", }) {
4
- return (_jsxs(Div, { layout: "grid", gap: "4", className: `grid-cols-1 md:grid-cols-[280px_1fr] xl:grid-cols-[320px_1fr] 2xl:grid-cols-[360px_1fr] h-full min-h-[600px] ${className}`, children: [_jsxs(Div, { className: chatId ? "hidden md:block" : "block", children: [labels.title && (_jsx(Heading, { level: 3, className: "mb-3", weight: "semibold", children: labels.title })), renderChatList?.()] }), chatId ? (_jsxs(Stack, { gap: "xs", children: [renderMobileBack?.(), renderChatWindow?.()] })) : (_jsx(Div, { className: "hidden md:flex items-center justify-center text-zinc-400 dark:text-zinc-400 border border-dashed border-neutral-200 dark:border-neutral-700", rounded: "xl", children: renderEmptyState?.() ?? (_jsx(Span, { children: labels.selectRoom ?? "Select a conversation" })) }))] }));
4
+ return (_jsxs(Div, { layout: "grid", gap: "4", className: `grid-cols-1 md:grid-cols-[280px_1fr] xl:grid-cols-[320px_1fr] 2xl:grid-cols-[360px_1fr] h-full min-h-[600px] ${className}`, children: [_jsxs(Div, { className: chatId ? "hidden md:block" : "block", children: [labels.title && (_jsx(Heading, { level: 3, className: "mb-3", weight: "semibold", children: labels.title })), renderChatList?.()] }), chatId ? (_jsxs(Stack, { gap: "xs", children: [renderMobileBack?.(), renderChatWindow?.()] })) : (_jsx(Div, { className: "hidden md:flex text-[var(--appkit-color-text-faint)] border border-dashed border-neutral-200 dark:border-neutral-700", align: "center", justify: "center", rounded: "xl", children: renderEmptyState?.() ?? (_jsx(Span, { children: labels.selectRoom ?? "Select a conversation" })) }))] }));
5
5
  }