@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
@@ -55,7 +55,7 @@ const STATUS_ROWS = [
55
55
  },
56
56
  ];
57
57
  function OrderLifecycle() {
58
- return (_jsxs(Stack, { gap: "md", children: [_jsx(Div, { textSize: "xs", className: "border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface-subtle,var(--appkit-color-border))/20] font-mono text-[var(--appkit-color-text-muted)] overflow-x-auto whitespace-pre", rounded: "lg", padding: "md", children: STATUS_LIFECYCLE }), _jsx(Stack, { gap: "sm", children: STATUS_ROWS.map(({ status, meaning, action }) => (_jsxs(Div, { textSize: "sm", className: "border border-[var(--appkit-color-border)]", rounded: "lg", padding: "sm", children: [_jsxs(Row, { className: "mb-1", align: "center", gap: "sm", children: [_jsx(Text, { className: "font-mono text-[var(--appkit-color-text)] w-28 shrink-0", weight: "semibold", children: status }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", children: meaning })] }), _jsxs(Text, { className: "pl-30 text-[var(--appkit-color-text-muted)] italic", size: "xs", children: ["\u2192 ", action] })] }, status))) })] }));
58
+ return (_jsxs(Stack, { gap: "md", children: [_jsx(Div, { textSize: "xs", overflow: "x-auto", className: "border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface-subtle,var(--appkit-color-border))/20] font-mono text-[var(--appkit-color-text-muted)] whitespace-pre", rounded: "lg", padding: "md", children: STATUS_LIFECYCLE }), _jsx(Stack, { gap: "sm", children: STATUS_ROWS.map(({ status, meaning, action }) => (_jsxs(Div, { textSize: "sm", className: "border border-[var(--appkit-color-border)]", rounded: "lg", padding: "sm", children: [_jsxs(Row, { className: "mb-1", align: "center", gap: "sm", children: [_jsx(Text, { className: "font-mono text-[var(--appkit-color-text)] w-28 shrink-0", weight: "semibold", children: status }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", children: meaning })] }), _jsxs(Text, { className: "pl-[7.5rem] text-[var(--appkit-color-text-muted)] italic", size: "xs", children: ["\u2192 ", action] })] }, status))) })] }));
59
59
  }
60
60
  // -- Section 2: Processing an order -------------------------------------------
61
61
  const PROCESSING_STEPS = [
@@ -81,7 +81,7 @@ const CARRIERS = [
81
81
  { name: "Shadowfax", sla: "1–3 business days — good for urban same-day" },
82
82
  ];
83
83
  function CarriersSection() {
84
- return (_jsxs(Stack, { gap: "3", children: [_jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", size: "sm", children: "Any carrier is accepted \u2014 enter the tracking number manually in the order detail. Buyers receive the tracking number as entered; they look it up on the carrier's website." }), _jsx(Div, { className: "overflow-x-auto -mx-6", children: _jsxs(Table, { className: "min-w-full", size: "sm", children: [_jsx(Thead, { children: _jsxs(Tr, { className: "border-b border-[var(--appkit-color-border)]", children: [_jsx(Th, { weight: "semibold", padding: "lg-3", className: "text-left text-[var(--appkit-color-text)]", children: "Carrier" }), _jsx(Th, { weight: "semibold", padding: "lg-3", className: "text-left text-[var(--appkit-color-text)]", children: "Typical SLA" })] }) }), _jsx(Tbody, { className: "divide-y divide-[var(--appkit-color-border)]", children: CARRIERS.map(({ name, sla }) => (_jsxs(Tr, { children: [_jsx(Td, { weight: "medium", padding: "lg-3", className: "text-[var(--appkit-color-text)]", children: name }), _jsx(Td, { padding: "lg-3", className: "text-[var(--appkit-color-text-muted)]", children: sla })] }, name))) })] }) }), _jsx(Alert, { variant: "info", title: "Tip: insurance for high-value shipments", children: "For items above \u20B95,000, consider using a carrier that offers shipment insurance (Blue Dart, Delhivery Premium). Document the item with photos before sealing the package \u2014 this is your evidence if a damage claim arises." })] }));
84
+ return (_jsxs(Stack, { gap: "3", children: [_jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", size: "sm", children: "Any carrier is accepted \u2014 enter the tracking number manually in the order detail. Buyers receive the tracking number as entered; they look it up on the carrier's website." }), _jsx(Div, { overflow: "x-auto", className: "-mx-6", children: _jsxs(Table, { className: "min-w-full", size: "sm", children: [_jsx(Thead, { children: _jsxs(Tr, { className: "border-b border-[var(--appkit-color-border)]", children: [_jsx(Th, { weight: "semibold", padding: "lg-3", className: "text-left text-[var(--appkit-color-text)]", children: "Carrier" }), _jsx(Th, { weight: "semibold", padding: "lg-3", className: "text-left text-[var(--appkit-color-text)]", children: "Typical SLA" })] }) }), _jsx(Tbody, { className: "divide-y divide-[var(--appkit-color-border)]", children: CARRIERS.map(({ name, sla }) => (_jsxs(Tr, { children: [_jsx(Td, { weight: "medium", padding: "lg-3", className: "text-[var(--appkit-color-text)]", children: name }), _jsx(Td, { padding: "lg-3", className: "text-[var(--appkit-color-text-muted)]", children: sla })] }, name))) })] }) }), _jsx(Alert, { variant: "info", title: "Tip: insurance for high-value shipments", children: "For items above \u20B95,000, consider using a carrier that offers shipment insurance (Blue Dart, Delhivery Premium). Document the item with photos before sealing the package \u2014 this is your evidence if a damage claim arises." })] }));
85
85
  }
86
86
  // -- Section 4: Cancellations -------------------------------------------------
87
87
  function CancellationsSection() {
@@ -135,7 +135,7 @@ export function StoresIndexListing({ initialData }) {
135
135
  disabled: selection.selectedCount !== 1,
136
136
  onClick: () => { selection.clearSelection(); },
137
137
  },
138
- ] }), totalPages > 1 && (_jsx(Row, { border: "bottom", className: "sticky top-[calc(var(--header-height,0px)+44px)] z-10 backdrop-blur-sm", surface: "default", padding: "toolbar", justify: "center", children: _jsx(Pagination, { currentPage: table.getNumber("page", 1), totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), _jsx(Div, { padding: "y-lg", children: isLoading ? (_jsx(Div, { layout: "grid", gap: "6", className: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3", children: Array.from({ length: 6 }).map((_, i) => (_jsxs(Div, { className: `${__O.hidden} animate-pulse`, border: "subtle", rounded: "xl", children: [_jsx(Div, { className: "aspect-video", surface: "subtle" }), _jsxs(Div, { className: `${__P.p4} space-y-2.5`, children: [_jsx(Row, { align: "center", gap: "sm", children: _jsx(Div, { className: "h-10 w-10", surface: "subtle", rounded: "lg" }) }), _jsx(Div, { className: "h-4 w-2/3", surface: "subtle", rounded: "default" }), _jsx(Div, { className: "h-3 w-full", surface: "subtle", rounded: "default" }), _jsx(Div, { className: "h-3 w-1/2", surface: "subtle", rounded: "default" })] })] }, i))) })) : stores.length === 0 ? (_jsx(Text, { paddingY: "4xl", color: "muted", size: "sm", align: "center", children: "No stores found." })) : view === "list" ? (_jsx(Stack, { className: "divide-y divide-zinc-100 dark:divide-zinc-800", border: "subtle", rounded: "xl", children: stores.map((store) => {
138
+ ] }), totalPages > 1 && (_jsx(Row, { border: "bottom", className: "sticky top-[calc(var(--header-height,0px)+44px)] z-10 backdrop-blur-sm", surface: "default", padding: "toolbar", justify: "center", children: _jsx(Pagination, { currentPage: table.getNumber("page", 1), totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), _jsx(Div, { padding: "y-lg", children: isLoading ? (_jsx(Div, { layout: "grid", gap: "6", className: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3", children: Array.from({ length: 6 }).map((_, i) => (_jsxs(Div, { className: `${__O.hidden} animate-pulse`, border: "subtle", rounded: "xl", children: [_jsx(Div, { className: "aspect-video", surface: "subtle" }), _jsxs(Div, { className: `${__P.p4} space-y-[0.625rem]`, children: [_jsx(Row, { align: "center", gap: "sm", children: _jsx(Div, { className: "h-10 w-10", surface: "subtle", rounded: "lg" }) }), _jsx(Div, { className: "h-4 w-2/3", surface: "subtle", rounded: "default" }), _jsx(Div, { className: "h-3 w-full", surface: "subtle", rounded: "default" }), _jsx(Div, { className: "h-3 w-1/2", surface: "subtle", rounded: "default" })] })] }, i))) })) : stores.length === 0 ? (_jsx(Text, { paddingY: "4xl", color: "muted", size: "sm", align: "center", children: "No stores found." })) : view === "list" ? (_jsx(Stack, { className: "divide-y divide-zinc-100 dark:divide-zinc-800", border: "subtle", rounded: "xl", children: stores.map((store) => {
139
139
  const storeKey = store.storeSlug ?? store.id;
140
140
  return (_jsx(InteractiveStoreCard, { store: store, href: String(ROUTES.PUBLIC.STORE_DETAIL(storeKey)), selectable: selection.isSelecting, isSelected: selection.isSelected(store.id ?? store.storeSlug), onSelect: (id, sel) => { void sel; selection.toggle(id); } }, storeKey));
141
141
  }) })) : (_jsx(Div, { layout: "grid", gap: "6", className: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3", children: stores.map((store) => {
@@ -158,7 +158,7 @@ export function SellerWhatsAppSettingsView({ hasCapability }) {
158
158
  : step.checkKey === "connected"
159
159
  ? cfg?.connected === true
160
160
  : Boolean(cfg?.[step.checkKey]);
161
- return (_jsxs(Row, { gap: "sm", align: "start", children: [_jsx(Row, { textWeight: "bold", textSize: "xs", className: `flex-shrink-0 w-6 h-6 mt-0.5 ${done ? "bg-[var(--appkit-color-success)] text-white" : "bg-zinc-200 dark:bg-zinc-700 text-zinc-600 dark:text-zinc-300"}`, align: "center", justify: "center", rounded: "full", children: done ? "✓" : step.n }), _jsxs(Div, { children: [_jsx(Text, { size: "sm", weight: "medium", color: "primary", children: step.title }), _jsx(Text, { className: "mt-0.5", color: "muted", size: "xs", children: step.body })] })] }, step.n));
161
+ return (_jsxs(Row, { gap: "sm", align: "start", children: [_jsx(Row, { textWeight: "bold", textSize: "xs", className: `flex-shrink-0 w-6 h-6 mt-0.5 ${done ? "bg-[var(--appkit-color-success)] text-white" : "bg-[var(--appkit-color-surface-elevated)] text-[var(--appkit-color-text-muted)] dark:text-[var(--appkit-color-text-faint)]"}`, align: "center", justify: "center", rounded: "full", children: done ? "✓" : step.n }), _jsxs(Div, { children: [_jsx(Text, { size: "sm", weight: "medium", color: "primary", children: step.title }), _jsx(Text, { className: "mt-0.5", color: "muted", size: "xs", children: step.body })] })] }, step.n));
162
162
  }) })] }), _jsxs(Section, { className: CLS_SECTION_CARD, children: [_jsxs(Row, { justify: "between", align: "center", className: "mb-4", children: [_jsx(Heading, { level: 2, size: "sm", weight: "semibold", color: "primary", children: "Connection" }), isLoading ? null : cfg?.connected ? (_jsx(Badge, { variant: "success", children: "Connected" })) : (_jsx(Badge, { variant: "default", children: "Not configured" }))] }), _jsxs(Form, { onSubmit: (e) => {
163
163
  e.preventDefault();
164
164
  saveMutation.mutate();
@@ -168,7 +168,7 @@ export function SellerWhatsAppSettingsView({ hasCapability }) {
168
168
  additionalItemCount: 2,
169
169
  totalAmount: 450000,
170
170
  orderId: "order-3-20260510-a1b2c3",
171
- }) })] }), _jsxs(Section, { className: CLS_SECTION_CARD, children: [_jsx(Heading, { level: 2, className: "mb-2", color: "primary", size: "sm", weight: "semibold", children: "Catalog Preview" }), _jsx(Text, { className: "mb-4", color: "muted", size: "xs", children: "This is how your products appear in the WhatsApp Catalog when a buyer taps \"View Catalog\" in the chat. Only published standard products are included." }), _jsxs(Div, { className: `${__O.hidden} bg-[#ECE5DD] dark:bg-zinc-800 ${__P.p3}`, rounded: "xl", border: "default", children: [_jsxs(Row, { gap: "sm", align: "center", className: "mb-3", children: [_jsx(Row, { className: "w-8 h-8 bg-[#25D366]", align: "center", justify: "center", rounded: "full", children: _jsx(Text, { color: "inverse", size: "xs", weight: "bold", children: "W" }) }), _jsxs(Div, { children: [_jsx(Text, { size: "xs", weight: "semibold", color: "primary", children: cfg?.connected ? "Your Store" : "Store Name" }), _jsx(Text, { className: "text-[10px]", color: "muted", children: "WhatsApp Business" })] })] }), _jsx(Div, { layout: "grid", gap: "2", className: "grid-cols-2", children: SAMPLE_CATALOG_ITEMS.map((item) => (_jsxs(Div, { surface: "card", className: `${__O.hidden}`, children: [_jsx(Row, { className: "aspect-square", surface: "subtle", align: "center", justify: "center", children: _jsx(Text, { size: "2xl", children: item.emoji }) }), _jsxs(Div, { padding: "xs", children: [_jsx(Text, { className: "line-clamp-2 leading-tight", color: "primary", size: "xs", weight: "medium", children: item.name }), _jsx(Text, { className: "text-[#25D366] mt-0.5", size: "xs", weight: "semibold", children: item.price })] })] }, item.id))) }), _jsx(Div, { className: "mt-3 text-center", children: _jsx(Text, { className: "text-[10px]", color: "muted", children: cfg?.lastSyncCount
171
+ }) })] }), _jsxs(Section, { className: CLS_SECTION_CARD, children: [_jsx(Heading, { level: 2, className: "mb-2", color: "primary", size: "sm", weight: "semibold", children: "Catalog Preview" }), _jsx(Text, { className: "mb-4", color: "muted", size: "xs", children: "This is how your products appear in the WhatsApp Catalog when a buyer taps \"View Catalog\" in the chat. Only published standard products are included." }), _jsxs(Div, { className: `${__O.hidden} bg-[var(--appkit-color-whatsapp-bg)] dark:bg-neutral-800 ${__P.p3}`, rounded: "xl", border: "default", children: [_jsxs(Row, { gap: "sm", align: "center", className: "mb-3", children: [_jsx(Row, { className: "w-8 h-8 bg-[var(--appkit-color-whatsapp)]", align: "center", justify: "center", rounded: "full", children: _jsx(Text, { color: "inverse", size: "xs", weight: "bold", children: "W" }) }), _jsxs(Div, { children: [_jsx(Text, { size: "xs", weight: "semibold", color: "primary", children: cfg?.connected ? "Your Store" : "Store Name" }), _jsx(Text, { className: "text-[10px]", color: "muted", children: "WhatsApp Business" })] })] }), _jsx(Div, { layout: "grid", gap: "2", className: "grid-cols-2", children: SAMPLE_CATALOG_ITEMS.map((item) => (_jsxs(Div, { surface: "card", className: `${__O.hidden}`, children: [_jsx(Row, { className: "aspect-square", surface: "subtle", align: "center", justify: "center", children: _jsx(Text, { size: "2xl", children: item.emoji }) }), _jsxs(Div, { padding: "xs", children: [_jsx(Text, { className: "line-clamp-2 leading-tight", color: "primary", size: "xs", weight: "medium", children: item.name }), _jsx(Text, { className: "text-[var(--appkit-color-whatsapp)] mt-0.5", size: "xs", weight: "semibold", children: item.price })] })] }, item.id))) }), _jsx(Div, { className: "mt-3 text-center", children: _jsx(Text, { className: "text-[10px]", color: "muted", children: cfg?.lastSyncCount
172
172
  ? `${cfg.lastSyncCount} products synced to catalog`
173
173
  : "Sync your products to populate the catalog" }) })] }), !cfg?.connected && (_jsx(Text, { className: "text-warning mt-2", size: "xs", children: "Connect your WhatsApp Business account above to enable the catalog." }))] })] }));
174
174
  }
@@ -5,7 +5,7 @@ const CLS_REMOVE_BTN = "self-start text-zinc-400 dark:text-zinc-400 transition h
5
5
  export function WishlistCard({ item, onRemove, onProductClick, }) {
6
6
  return (_jsxs(Div, { layout: "flex", gap: "4", surface: "card", padding: "sm", children: [_jsx(Div, { role: onProductClick ? "button" : undefined, tabIndex: onProductClick ? 0 : undefined, onClick: onProductClick ? () => onProductClick(item) : undefined, onKeyDown: onProductClick
7
7
  ? (e) => e.key === "Enter" && onProductClick(item)
8
- : undefined, className: `h-20 w-20 flex-shrink-0 overflow-hidden bg-neutral-100 dark:bg-slate-800 ${onProductClick ? "cursor-pointer" : ""}`, rounded: "lg", children: item.productImage && (_jsx(Div, { role: "img", "aria-label": item.productTitle ?? "", className: "h-full w-full bg-center bg-cover", style: { backgroundImage: `url(${item.productImage})` } })) }), _jsxs(Stack, { justify: "between", className: "flex-1", children: [_jsx(Text, { truncate: 2, weight: "medium", color: "primary", children: item.productTitle }), item.productPrice !== undefined && (_jsx(Text, { className: "text-neutral-900 dark:text-neutral-100", size: "sm", weight: "semibold", children: formatCurrency(item.productPrice, item.productCurrency) }))] }), onRemove && (_jsx(Button, { type: "button", variant: "ghost", size: "sm", onClick: () => onRemove(item.id), "aria-label": "Remove from wishlist", className: CLS_REMOVE_BTN, children: "\u2715" }))] }));
8
+ : undefined, className: `h-20 w-20 flex-shrink-0 overflow-hidden bg-neutral-100 dark:bg-slate-800 ${onProductClick ? "cursor-pointer" : ""}`, rounded: "lg", children: item.productImage && (_jsx("img", { src: item.productImage, alt: item.productTitle ?? "", className: "h-full w-full object-cover" })) }), _jsxs(Stack, { justify: "between", className: "flex-1", children: [_jsx(Text, { truncate: 2, weight: "medium", color: "primary", children: item.productTitle }), item.productPrice !== undefined && (_jsx(Text, { className: "text-neutral-900 dark:text-neutral-100", size: "sm", weight: "semibold", children: formatCurrency(item.productPrice, item.productCurrency) }))] }), onRemove && (_jsx(Button, { type: "button", variant: "ghost", size: "sm", onClick: () => onRemove(item.id), "aria-label": "Remove from wishlist", className: CLS_REMOVE_BTN, children: "\u2715" }))] }));
9
9
  }
10
10
  export function WishlistPage({ items, isLoading, onRemove, onProductClick, emptyLabel = "Your wishlist is empty", }) {
11
11
  if (isLoading) {
@@ -23,12 +23,12 @@ export function WishlistToggleButton({ inWishlist, isLoading = false, onToggle,
23
23
  }
24
24
  }
25
25
  }
26
- return (_jsxs(_Fragment, { children: [_jsx(LoginRequiredModal, { isOpen: showLoginModal, onClose: () => setShowLoginModal(false), message: "You need to be signed in to save items to your wishlist. Please log in or create an account." }), _jsx(Button, { type: "button", onClick: handleClick, disabled: isLoading, "aria-label": label, title: label, className: `
27
- flex items-center justify-center rounded-full
26
+ return (_jsxs(_Fragment, { children: [_jsx(LoginRequiredModal, { isOpen: showLoginModal, onClose: () => setShowLoginModal(false), message: "You need to be signed in to save items to your wishlist. Please log in or create an account." }), _jsx(Button, { type: "button", onClick: handleClick, disabled: isLoading, "aria-label": label, title: label, rounded: "full", className: `
27
+ flex items-[center] justify-[center]
28
28
  transition-all duration-150
29
29
  ${inWishlist
30
30
  ? "bg-error-surface text-error hover:bg-error-surface"
31
- : "bg-white/80 text-zinc-400 hover:text-error"}
31
+ : "bg-[rgba(255,255,255,0.8)] text-[var(--appkit-color-text-faint)] hover:text-error"}
32
32
  ${sizeClasses[size]}
33
33
  ${isLoading ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
34
34
  ${className}
@@ -77,7 +77,7 @@ export function useWishlistCount(userId) {
77
77
  });
78
78
  }
79
79
  })
80
- .catch(() => { })
80
+ .catch(console.error)
81
81
  .finally(finish);
82
82
  }, [userId, queryClient]);
83
83
  // Refetch when the user lands on /wishlist or /cart so the badge matches
@@ -54,6 +54,7 @@ export declare class ApiClient {
54
54
  put<T = JsonValue>(endpoint: string, data?: unknown, config?: RequestConfig): Promise<T>;
55
55
  patch<T = JsonValue>(endpoint: string, data?: unknown, config?: RequestConfig): Promise<T>;
56
56
  delete<T = JsonValue>(endpoint: string, config?: RequestConfig): Promise<T>;
57
+ blob(endpoint: string, config?: RequestConfig): Promise<Blob>;
57
58
  upload<T = JsonValue>(endpoint: string, formData: FormData, config?: RequestConfig): Promise<T>;
58
59
  }
59
60
  /** Default singleton instance — reads NEXT_PUBLIC_APP_URL from env */
@@ -132,6 +132,26 @@ export class ApiClient {
132
132
  async delete(endpoint, config) {
133
133
  return this.request(endpoint, { ...config, method: "DELETE" });
134
134
  }
135
+ async blob(endpoint, config) {
136
+ const { params, timeout = this.defaultTimeout, headers: customHeaders, ...fetchConfig } = config ?? {};
137
+ const url = this.buildURL(endpoint, params);
138
+ const headers = await this.getHeaders("GET", customHeaders);
139
+ const controller = new AbortController();
140
+ const timeoutId = setTimeout(() => controller.abort(), timeout);
141
+ try {
142
+ const response = await fetch(url, { ...fetchConfig, headers, signal: controller.signal, credentials: "include" });
143
+ clearTimeout(timeoutId);
144
+ if (!response.ok)
145
+ throw new ApiClientError(`Download failed with status ${response.status}`, response.status);
146
+ return response.blob();
147
+ }
148
+ catch (error) {
149
+ clearTimeout(timeoutId);
150
+ if (error instanceof ApiClientError)
151
+ throw error;
152
+ throw new ApiClientError(error instanceof Error ? error.message : "Download failed", 0);
153
+ }
154
+ }
135
155
  async upload(endpoint, formData, config) {
136
156
  const { headers, ...restConfig } = config ?? {};
137
157
  const uploadHeaders = await this.getHeaders("POST", headers);
@@ -38,9 +38,6 @@ export interface TrackedError {
38
38
  timestamp: string;
39
39
  }
40
40
  export type ErrorTrackerFn = (error: Error | string, category: ErrorCategory, severity: ErrorSeverity, context?: ErrorContext) => void;
41
- declare global {
42
- var __mohasinac_error_tracker__: ErrorTrackerFn | undefined;
43
- }
44
41
  /** Override the default console-based tracker with a custom implementation. */
45
42
  export declare function setErrorTracker(fn: ErrorTrackerFn): void;
46
43
  export declare function trackError(error: Error | string, category?: ErrorCategory, severity?: ErrorSeverity, context?: ErrorContext): void;
@@ -24,7 +24,7 @@ export var ErrorCategory;
24
24
  })(ErrorCategory || (ErrorCategory = {}));
25
25
  const TRACKER_KEY = "__mohasinac_error_tracker__";
26
26
  function getTracker() {
27
- return (globalThis.__mohasinac_error_tracker__ ??
27
+ return (globalThis[TRACKER_KEY] ??
28
28
  ((error, category, severity, context) => {
29
29
  const msg = error instanceof Error ? error.message : error;
30
30
  console.error(`[${severity.toUpperCase()}][${category}] ${msg}`, context);
@@ -150,7 +150,7 @@ export const serverLogger = {
150
150
  };
151
151
  console.info(`[INFO] ${message}`, sanitized);
152
152
  if (isFileLoggingEnabled)
153
- writeLog(entry).catch(() => { });
153
+ writeLog(entry).catch((err) => { process.stderr.write(String(err) + "\n"); });
154
154
  },
155
155
  warn(message, data) {
156
156
  const sanitized = data ? redactPii(normalizeLogData(data)) : undefined;
@@ -162,7 +162,7 @@ export const serverLogger = {
162
162
  };
163
163
  console.warn(`[WARN] ${message}`, sanitized);
164
164
  if (isFileLoggingEnabled)
165
- writeLog(entry).catch(() => { });
165
+ writeLog(entry).catch((err) => { process.stderr.write(String(err) + "\n"); });
166
166
  },
167
167
  error(message, data) {
168
168
  const sanitized = data ? redactPii(normalizeLogData(data)) : undefined;
@@ -174,7 +174,7 @@ export const serverLogger = {
174
174
  };
175
175
  console.error(`[ERROR] ${message}`, sanitized);
176
176
  if (isFileLoggingEnabled)
177
- writeLog(entry).catch(() => { });
177
+ writeLog(entry).catch((err) => { process.stderr.write(String(err) + "\n"); });
178
178
  },
179
179
  };
180
180
  /** Pull the commonly needed headers from a NextRequest in one call. */
@@ -34,7 +34,7 @@ export function GlobalError({ error, reset }) {
34
34
  }, children: [_jsx(Heading, { level: 1, style: { fontSize: "2rem", marginBottom: "0.5rem" }, children: "Something went wrong" }), _jsx(Text, { style: { opacity: 0.7, marginBottom: "1.5rem" }, children: "A critical error occurred. We're working on it." }), process.env.NODE_ENV === "development" && (_jsxs(Pre, { style: {
35
35
  fontSize: "0.75rem",
36
36
  padding: "1rem",
37
- background: "#f3f4f6",
37
+ background: "var(--appkit-color-zinc-100)",
38
38
  borderRadius: "0.5rem",
39
39
  textAlign: "left",
40
40
  maxWidth: "40rem",
@@ -24,7 +24,7 @@ function DefaultFallback({ error, onReset, }) {
24
24
  }, "data-section": "errorboundary-div-446", children: [_jsx(Heading, { level: 1, style: { fontSize: "1.5rem", marginBottom: "0.5rem" }, children: "Something went wrong" }), _jsx(Text, { style: { marginBottom: "1.5rem", opacity: 0.7 }, children: "An unexpected error occurred. Please try again." }), process.env.NODE_ENV === "development" && error && (_jsx("pre", { style: {
25
25
  fontSize: "0.75rem",
26
26
  padding: "1rem",
27
- background: "#f3f4f6",
27
+ background: "var(--appkit-color-zinc-100)",
28
28
  borderRadius: "0.5rem",
29
29
  textAlign: "left",
30
30
  maxWidth: "40rem",