@mohasinac/appkit 2.8.3 → 2.8.5

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 (249) hide show
  1. package/dist/_internal/client/features/layout/SidebarCollapseToggle.js +2 -0
  2. package/dist/_internal/shared/listing-types/action-tracker.js +0 -2
  3. package/dist/client.d.ts +2 -0
  4. package/dist/client.js +2 -0
  5. package/dist/core/hooks/useSiteSettings.d.ts +1 -1
  6. package/dist/core/unit-of-work.js +0 -1
  7. package/dist/features/account/components/NotificationBell.js +1 -0
  8. package/dist/features/account/components/UserOffersPanel.js +1 -0
  9. package/dist/features/account/components/UserSidebar.js +3 -1
  10. package/dist/features/account/hooks/useAccount.d.ts +2 -2
  11. package/dist/features/account/hooks/useAddressSelector.d.ts +1 -1
  12. package/dist/features/account/hooks/useAddresses.d.ts +2 -2
  13. package/dist/features/account/hooks/useNotifications.d.ts +1 -1
  14. package/dist/features/account/hooks/useProfile.d.ts +1 -1
  15. package/dist/features/account/hooks/usePublicProfile.d.ts +2 -2
  16. package/dist/features/admin/components/AdminAllEventEntriesView.js +5 -3
  17. package/dist/features/admin/components/AdminBidsView.js +6 -4
  18. package/dist/features/admin/components/AdminBlogView.js +6 -4
  19. package/dist/features/admin/components/AdminBrandsView.js +8 -6
  20. package/dist/features/admin/components/AdminBundlesView.js +10 -8
  21. package/dist/features/admin/components/AdminCarouselEditorView.js +3 -1
  22. package/dist/features/admin/components/AdminCartsView.js +6 -4
  23. package/dist/features/admin/components/AdminCategoriesView.js +7 -5
  24. package/dist/features/admin/components/AdminClassifiedView.js +4 -3
  25. package/dist/features/admin/components/AdminContactView.js +6 -4
  26. package/dist/features/admin/components/AdminCouponsView.js +6 -4
  27. package/dist/features/admin/components/AdminDigitalCodesView.js +4 -3
  28. package/dist/features/admin/components/AdminFaqsView.js +5 -3
  29. package/dist/features/admin/components/AdminFeaturesView.js +5 -4
  30. package/dist/features/admin/components/AdminGroupedListingsView.js +4 -3
  31. package/dist/features/admin/components/AdminHistoryView.js +4 -3
  32. package/dist/features/admin/components/AdminLiveView.js +4 -3
  33. package/dist/features/admin/components/AdminNewsletterView.js +5 -3
  34. package/dist/features/admin/components/AdminNotificationsView.js +6 -4
  35. package/dist/features/admin/components/AdminOrdersView.js +6 -4
  36. package/dist/features/admin/components/AdminPayoutsView.js +7 -5
  37. package/dist/features/admin/components/AdminPrizeDrawsView.js +6 -4
  38. package/dist/features/admin/components/AdminProductsView.js +7 -5
  39. package/dist/features/admin/components/AdminReturnRequestsView.js +4 -3
  40. package/dist/features/admin/components/AdminReviewsView.js +8 -6
  41. package/dist/features/admin/components/AdminScammersView.js +8 -6
  42. package/dist/features/admin/components/AdminSessionsView.js +6 -4
  43. package/dist/features/admin/components/AdminSidebar.js +3 -1
  44. package/dist/features/admin/components/AdminSiteSettingsView.js +3 -1
  45. package/dist/features/admin/components/AdminStoreAddressesView.js +2 -1
  46. package/dist/features/admin/components/AdminStoresView.js +6 -4
  47. package/dist/features/admin/components/AdminSublistingCategoriesView.js +6 -5
  48. package/dist/features/admin/components/AdminSupportTicketDetailView.js +0 -3
  49. package/dist/features/admin/components/AdminSupportTicketsView.js +8 -6
  50. package/dist/features/admin/components/AdminTeamView.js +6 -4
  51. package/dist/features/admin/components/AdminUsersView.js +6 -4
  52. package/dist/features/admin/components/AdminWishlistsView.js +4 -3
  53. package/dist/features/admin/components/DashboardStats.js +5 -1
  54. package/dist/features/admin/components/analytics/AdminAnalyticsCharts.js +3 -1
  55. package/dist/features/admin/components/analytics/AdminStatCard.js +5 -1
  56. package/dist/features/admin/constants/filter-tabs.d.ts +1 -1
  57. package/dist/features/admin/constants/filter-tabs.js +0 -11
  58. package/dist/features/admin/hooks/useAdmin.d.ts +1 -1
  59. package/dist/features/admin/hooks/useAdminSectionsListing.d.ts +1 -1
  60. package/dist/features/admin/hooks/useChat.d.ts +1 -1
  61. package/dist/features/admin/hooks/useChat.js +1 -0
  62. package/dist/features/admin/types/index.d.ts +1 -1
  63. package/dist/features/auctions/actions/bid-actions.js +4 -2
  64. package/dist/features/auctions/components/AuctionBidsTable.js +5 -1
  65. package/dist/features/auctions/components/AuctionsListView.js +7 -6
  66. package/dist/features/auctions/hooks/useAuctions.d.ts +8 -8
  67. package/dist/features/auth/hooks/useAuth.d.ts +2 -2
  68. package/dist/features/auth/hooks/useAuth.js +1 -0
  69. package/dist/features/blog/actions/blog-actions.js +3 -2
  70. package/dist/features/blog/components/BlogFeaturedCard.js +3 -1
  71. package/dist/features/blog/components/BlogListView.js +5 -1
  72. package/dist/features/blog/components/BlogPostView.js +3 -1
  73. package/dist/features/cart/components/CartDrawer.js +3 -1
  74. package/dist/features/cart/hooks/useCart.d.ts +1 -1
  75. package/dist/features/cart/hooks/useCartQuery.d.ts +1 -1
  76. package/dist/features/cart/hooks/useCheckoutReadQueries.d.ts +2 -2
  77. package/dist/features/cart/hooks/useOrder.d.ts +2 -2
  78. package/dist/features/categories/components/BrandDetailPageView.js +15 -9
  79. package/dist/features/categories/components/CategoriesIndexListing.js +1 -1
  80. package/dist/features/categories/components/CategoriesIndexPageView.js +5 -4
  81. package/dist/features/categories/components/CategoryBundlesListing.js +5 -4
  82. package/dist/features/categories/components/CategoryDetailPageView.js +15 -11
  83. package/dist/features/categories/components/CategoryFilters.d.ts +12 -12
  84. package/dist/features/categories/components/CategoryFilters.js +13 -12
  85. package/dist/features/categories/components/CategoryGrid.js +5 -1
  86. package/dist/features/categories/components/CategoryTableColumns.js +6 -2
  87. package/dist/features/categories/components/CategoryTree.d.ts +1 -1
  88. package/dist/features/categories/components/CategoryTree.js +4 -2
  89. package/dist/features/categories/components/ConcernCard.js +3 -1
  90. package/dist/features/categories/hooks/useCategories.d.ts +3 -3
  91. package/dist/features/categories/hooks/useCategorySelector.d.ts +3 -3
  92. package/dist/features/categories/hooks/useCategoryTree.d.ts +1 -1
  93. package/dist/features/categories/schemas/firestore.d.ts +2 -2
  94. package/dist/features/checkout/actions/checkout-actions.d.ts +1 -1
  95. package/dist/features/checkout/actions/checkout-actions.js +1 -1
  96. package/dist/features/checkout/hooks/useCheckoutApi.d.ts +2 -2
  97. package/dist/features/classified/components/ClassifiedListView.js +6 -5
  98. package/dist/features/collections/components/CollectionCard.js +3 -1
  99. package/dist/features/collections/hooks/useCollections.d.ts +2 -2
  100. package/dist/features/cron/jobs/auction-expiry.job.d.ts +2 -2
  101. package/dist/features/cron/jobs/auction-expiry.job.js +2 -1
  102. package/dist/features/cron/jobs/preorder-reminder.job.d.ts +1 -1
  103. package/dist/features/cron/jobs/preorder-reminder.job.js +2 -1
  104. package/dist/features/digital-codes/components/DigitalCodesListView.js +4 -3
  105. package/dist/features/events/actions/event-actions.js +6 -4
  106. package/dist/features/events/components/AdminEventEditorView.js +1 -1
  107. package/dist/features/events/components/AdminEventsView.js +7 -5
  108. package/dist/features/events/components/EventCard.js +3 -1
  109. package/dist/features/events/components/EventFilters.d.ts +4 -4
  110. package/dist/features/events/components/EventFilters.js +2 -2
  111. package/dist/features/events/components/EventRafflesSection.js +4 -2
  112. package/dist/features/events/hooks/useEvent.d.ts +3 -3
  113. package/dist/features/events/hooks/useEvents.d.ts +1 -1
  114. package/dist/features/faq/actions/faq-actions.js +4 -2
  115. package/dist/features/faq/components/FAQPageContent.js +2 -1
  116. package/dist/features/faq/hooks/useFAQs.d.ts +1 -1
  117. package/dist/features/faq/hooks/useFaqList.d.ts +15 -15
  118. package/dist/features/forms/Slider.js +3 -1
  119. package/dist/features/history/hooks/useHistory.js +1 -0
  120. package/dist/features/homepage/components/AdSlot.js +6 -2
  121. package/dist/features/homepage/components/AdvertisementBanner.js +3 -1
  122. package/dist/features/homepage/components/BeforeAfterCard.js +5 -1
  123. package/dist/features/homepage/components/CustomCardsSection.js +5 -1
  124. package/dist/features/homepage/components/HowItWorksSection.js +3 -1
  125. package/dist/features/homepage/components/MarketplaceHomepageView.js +4 -2
  126. package/dist/features/homepage/components/NewsletterBanner.js +6 -2
  127. package/dist/features/homepage/components/SecurityHighlightsSection.js +3 -1
  128. package/dist/features/homepage/components/StatsCounterSection.js +3 -1
  129. package/dist/features/homepage/components/TrustFeaturesSection.js +3 -1
  130. package/dist/features/homepage/hooks/useBlogArticles.d.ts +1 -1
  131. package/dist/features/homepage/hooks/useFeaturedAuctions.d.ts +1 -1
  132. package/dist/features/homepage/hooks/useFeaturedPreOrders.d.ts +1 -1
  133. package/dist/features/homepage/hooks/useFeaturedProducts.d.ts +1 -1
  134. package/dist/features/homepage/hooks/useFeaturedStores.d.ts +1 -1
  135. package/dist/features/homepage/hooks/useHeroCarousel.d.ts +1 -1
  136. package/dist/features/homepage/hooks/useHomepageEvents.d.ts +1 -1
  137. package/dist/features/homepage/hooks/useHomepageReviews.d.ts +1 -1
  138. package/dist/features/homepage/hooks/useHomepageSections.d.ts +1 -1
  139. package/dist/features/homepage/hooks/useTopBrands.d.ts +1 -1
  140. package/dist/features/homepage/hooks/useTopCategories.d.ts +1 -1
  141. package/dist/features/layout/AppLayoutShell.js +3 -1
  142. package/dist/features/layout/BottomActions.js +0 -27
  143. package/dist/features/layout/BottomActionsContext.d.ts +0 -36
  144. package/dist/features/layout/BottomActionsContext.js +1 -39
  145. package/dist/features/layout/BottomNavbar.js +1 -1
  146. package/dist/features/live/components/LiveItemsListView.js +6 -5
  147. package/dist/features/loyalty/hooks/useLoyaltyBalance.d.ts +1 -1
  148. package/dist/features/media/MediaLightbox.js +9 -3
  149. package/dist/features/media/modals/ImageEditor.js +6 -2
  150. package/dist/features/media/upload/MediaUploadField.js +1 -1
  151. package/dist/features/messages/hooks/useConversation.js +2 -0
  152. package/dist/features/messages/hooks/useConversations.js +1 -0
  153. package/dist/features/orders/components/OrdersList.js +3 -1
  154. package/dist/features/orders/hooks/useOrders.d.ts +2 -2
  155. package/dist/features/payments/hooks/usePayments.d.ts +1 -1
  156. package/dist/features/pre-orders/components/PreOrderDetailPageView.js +1 -1
  157. package/dist/features/pre-orders/components/PreOrdersListView.js +5 -4
  158. package/dist/features/pre-orders/hooks/usePreOrders.d.ts +2 -2
  159. package/dist/features/products/actions/product-actions.js +17 -15
  160. package/dist/features/products/columns/index.d.ts +1 -1
  161. package/dist/features/products/columns/index.js +1 -1
  162. package/dist/features/products/components/CompareOverlay.js +5 -1
  163. package/dist/features/products/components/FeatureBadge.js +3 -1
  164. package/dist/features/products/components/MarketplacePrizeDrawCard.js +1 -1
  165. package/dist/features/products/components/PrizeDrawCollage.js +0 -14
  166. package/dist/features/products/components/PrizeDrawsListingView.js +5 -4
  167. package/dist/features/products/components/PrizeDrawsSection.js +4 -2
  168. package/dist/features/products/components/ProductGrid.js +3 -1
  169. package/dist/features/products/constants/sieve.d.ts +2 -2
  170. package/dist/features/products/constants/sieve.js +2 -2
  171. package/dist/features/products/hooks/useProductDetail.d.ts +1 -1
  172. package/dist/features/products/hooks/useRelatedProducts.d.ts +1 -1
  173. package/dist/features/products/hooks/useRelatedProducts.js +5 -4
  174. package/dist/features/promotions/hooks/usePromotions.d.ts +2 -2
  175. package/dist/features/reviews/actions/review-actions.js +2 -1
  176. package/dist/features/reviews/components/ReviewDetailShell.js +8 -2
  177. package/dist/features/reviews/components/ReviewModal.js +5 -1
  178. package/dist/features/reviews/components/ReviewSummary.js +3 -1
  179. package/dist/features/reviews/components/ReviewsIndexPageView.js +7 -6
  180. package/dist/features/reviews/components/ReviewsList.js +5 -1
  181. package/dist/features/reviews/hooks/useReviews.d.ts +2 -2
  182. package/dist/features/scams/actions/scam-actions.js +3 -2
  183. package/dist/features/scams/components/ScamRegistryView.js +5 -4
  184. package/dist/features/search/actions/search-actions.js +7 -6
  185. package/dist/features/search/components/Search.js +3 -1
  186. package/dist/features/search/hooks/useSearch.d.ts +2 -2
  187. package/dist/features/seller/components/CouponInlineSelect.js +2 -1
  188. package/dist/features/seller/components/PhysicalLocationModal.js +1 -1
  189. package/dist/features/seller/components/SellerAddressesView.js +2 -1
  190. package/dist/features/seller/components/SellerAuctionsView.js +7 -5
  191. package/dist/features/seller/components/SellerBidsView.js +8 -4
  192. package/dist/features/seller/components/SellerBundlesView.js +7 -6
  193. package/dist/features/seller/components/SellerClassifiedView.js +6 -5
  194. package/dist/features/seller/components/SellerCouponEditorView.js +3 -1
  195. package/dist/features/seller/components/SellerCouponsView.js +6 -4
  196. package/dist/features/seller/components/SellerDigitalCodesView.js +5 -4
  197. package/dist/features/seller/components/SellerGroupedListingsView.js +5 -4
  198. package/dist/features/seller/components/SellerLiveView.js +6 -5
  199. package/dist/features/seller/components/SellerOffersPanel.js +1 -0
  200. package/dist/features/seller/components/SellerOffersView.js +6 -4
  201. package/dist/features/seller/components/SellerOrdersView.js +5 -3
  202. package/dist/features/seller/components/SellerPayoutMethodsView.js +4 -2
  203. package/dist/features/seller/components/SellerPayoutsView.js +6 -4
  204. package/dist/features/seller/components/SellerPreOrdersView.js +6 -4
  205. package/dist/features/seller/components/SellerPrizeDrawsView.js +6 -4
  206. package/dist/features/seller/components/SellerProductsView.js +14 -8
  207. package/dist/features/seller/components/SellerReviewsView.js +1 -0
  208. package/dist/features/seller/components/SellerShippingConfigsView.js +4 -2
  209. package/dist/features/seller/components/SellerSidebar.js +12 -4
  210. package/dist/features/seller/components/SellerStoreCategoriesView.js +5 -3
  211. package/dist/features/seller/components/SellerTemplatesView.js +5 -3
  212. package/dist/features/seller/components/SublistingInlineSelect.js +2 -1
  213. package/dist/features/seller/hooks/useSellerPayouts.d.ts +3 -3
  214. package/dist/features/seller/hooks/useSellerStore.d.ts +6 -6
  215. package/dist/features/seller/hooks/useSellerStorefront.d.ts +2 -2
  216. package/dist/features/shell/FormShell.js +10 -2
  217. package/dist/features/shell/QuickFormDrawer.js +5 -2
  218. package/dist/features/stores/actions/store-query-actions.js +3 -2
  219. package/dist/features/stores/components/StoreAuctionsPageView.js +4 -2
  220. package/dist/features/stores/components/StoreDetailLayoutView.d.ts +1 -1
  221. package/dist/features/stores/components/StoreDetailLayoutView.js +7 -6
  222. package/dist/features/stores/components/StoreHeader.js +5 -1
  223. package/dist/features/stores/components/StorePreOrdersPageView.js +4 -2
  224. package/dist/features/stores/components/StorePrizeDrawsPageView.js +4 -2
  225. package/dist/features/stores/components/StoreProductsPageView.js +2 -1
  226. package/dist/features/stores/components/StoreProductsView.js +5 -4
  227. package/dist/features/stores/components/StoresIndexListing.js +4 -3
  228. package/dist/features/stores/hooks/useStoreAddressSelector.d.ts +1 -1
  229. package/dist/features/stores/hooks/useStores.d.ts +6 -6
  230. package/dist/features/wishlist/components/WishlistPage.js +3 -1
  231. package/dist/features/wishlist/components/WishlistView.js +4 -3
  232. package/dist/features/wishlist/hooks/useUserWishlist.d.ts +15 -15
  233. package/dist/features/wishlist/hooks/useWishlist.d.ts +1 -1
  234. package/dist/features/wishlist/hooks/useWishlistWithGuest.d.ts +1 -1
  235. package/dist/providers/db-firebase/admin.js +0 -1
  236. package/dist/ui/DataTable.js +6 -2
  237. package/dist/ui/components/AvatarDisplay.js +3 -1
  238. package/dist/ui/components/BackgroundRenderer.js +4 -2
  239. package/dist/ui/components/Card.js +6 -2
  240. package/dist/ui/components/ImageGallery.js +3 -1
  241. package/dist/ui/components/ImageLightbox.js +3 -1
  242. package/dist/ui/components/PasswordStrengthIndicator.js +3 -1
  243. package/dist/ui/components/Progress.js +6 -2
  244. package/dist/ui/components/RowActionMenu.js +3 -1
  245. package/dist/ui/components/SiteLogo.js +7 -1
  246. package/dist/ui/components/Skeleton.js +3 -1
  247. package/dist/ui/components/Slider.js +3 -1
  248. package/dist/ui/components/TabStrip.js +3 -1
  249. package/package.json +1 -1
@@ -1,4 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { sieveFilter, SIEVE_OP } from "@mohasinac/appkit";
3
+ import { sortBy } from "@mohasinac/appkit";
2
4
  import { Main } from "../../../ui";
3
5
  import { carouselRepository, faqsRepository, siteSettingsRepository } from "../../../repositories";
4
6
  import { fetchLiveStats } from "../lib/live-stats";
@@ -78,9 +80,9 @@ export async function MarketplaceHomepageView({ adSlots, newsletterFormSlot, onB
78
80
  activeTypes.has("categories") ? listTopLevelCategories(12).catch(() => null) : null,
79
81
  activeTypes.has("brands") ? listBrandCategories(12).catch(() => null) : null,
80
82
  activeTypes.has("featured-bundles") ? listFeaturedBundles(8).catch(() => null) : null,
81
- activeTypes.has("stores") ? listStores({ pageSize: 8, sorts: "-averageRating" }).catch(() => null) : null,
83
+ activeTypes.has("stores") ? listStores({ pageSize: 8, sorts: sortBy("averageRating", "DESC") }).catch(() => null) : null,
82
84
  activeTypes.has("blog-articles") ? getFeaturedBlogPosts(6).catch(() => null) : null,
83
- activeTypes.has("events") ? listPublicEvents({ filters: "status==active", pageSize: 6 }).catch(() => null) : null,
85
+ activeTypes.has("events") ? listPublicEvents({ filters: sieveFilter("status", SIEVE_OP.EQ, "active"), pageSize: 6 }).catch(() => null) : null,
84
86
  ]);
85
87
  // ProductDocument / BlogDocument / EventDocument have Date fields and extra Firestore-only
86
88
  // fields absent from the corresponding *Item types. The casts below are safe: section
@@ -26,9 +26,13 @@ export function NewsletterBanner({ onSubscribe, eyebrow = "STAY CONNECTED", head
26
26
  setLoading(false);
27
27
  }
28
28
  }
29
- return (_jsxs(Section, { className: "relative overflow-hidden py-24", style: {
29
+ return (_jsxs(Section, { className: "relative overflow-hidden py-24",
30
+ // audit-inline-style-ok: dynamic CSS
31
+ style: {
30
32
  background: "var(--newsletter-bg, linear-gradient(135deg, var(--color-primary, #1e40af) 0%, var(--color-secondary, #7c3aed) 100%))",
31
- }, children: [_jsx(Div, { className: "pointer-events-none absolute -top-20 -right-20 h-60 w-60 rounded-full border border-white/[0.06]" }), _jsx(Div, { className: "pointer-events-none absolute -bottom-16 -left-16 h-48 w-48 rounded-full border border-dashed border-white/[0.08]" }), _jsxs(Div, { className: "relative mx-auto max-w-2xl px-4 text-center sm:px-6", children: [_jsx(Span, { size: "xs", weight: "semibold", className: "mb-4 inline-flex rounded-full border border-white/20 px-3 py-1 uppercase tracking-widest text-white/70", children: eyebrow }), _jsx(Heading, { level: 2, className: "text-3xl font-bold text-white sm:text-4xl", children: heading }), _jsx(Text, { className: "mt-4 text-white/60", children: subheading }), success ? (_jsx(Text, { className: "mt-8 rounded-xl border border-white/20 bg-white/10 px-6 py-4 text-sm font-semibold text-white", children: successMessage })) : (_jsxs("form", { onSubmit: handleSubmit, className: "mt-8 flex gap-3", children: [_jsx(Input, { type: "email", value: email, onChange: (e) => setEmail(e.target.value), placeholder: placeholder, required: true, className: "flex-1 rounded-xl border border-white/20 bg-white/10 px-4 py-3 text-sm text-white placeholder:text-white/40 outline-none focus:border-white/40" }), _jsx(Button, { type: "submit", disabled: loading, variant: "primary", className: "shrink-0 rounded-xl px-5 py-3 text-sm font-bold transition-opacity disabled:opacity-60", style: {
33
+ }, children: [_jsx(Div, { className: "pointer-events-none absolute -top-20 -right-20 h-60 w-60 rounded-full border border-white/[0.06]" }), _jsx(Div, { className: "pointer-events-none absolute -bottom-16 -left-16 h-48 w-48 rounded-full border border-dashed border-white/[0.08]" }), _jsxs(Div, { className: "relative mx-auto max-w-2xl px-4 text-center sm:px-6", children: [_jsx(Span, { size: "xs", weight: "semibold", className: "mb-4 inline-flex rounded-full border border-white/20 px-3 py-1 uppercase tracking-widest text-white/70", children: eyebrow }), _jsx(Heading, { level: 2, className: "text-3xl font-bold text-white sm:text-4xl", children: heading }), _jsx(Text, { className: "mt-4 text-white/60", children: subheading }), success ? (_jsx(Text, { className: "mt-8 rounded-xl border border-white/20 bg-white/10 px-6 py-4 text-sm font-semibold text-white", children: successMessage })) : (_jsxs("form", { onSubmit: handleSubmit, className: "mt-8 flex gap-3", children: [_jsx(Input, { type: "email", value: email, onChange: (e) => setEmail(e.target.value), placeholder: placeholder, required: true, className: "flex-1 rounded-xl border border-white/20 bg-white/10 px-4 py-3 text-sm text-white placeholder:text-white/40 outline-none focus:border-white/40" }), _jsx(Button, { type: "submit", disabled: loading, variant: "primary", className: "shrink-0 rounded-xl px-5 py-3 text-sm font-bold transition-opacity disabled:opacity-60",
34
+ // audit-inline-style-ok: dynamic CSS
35
+ style: {
32
36
  background: "var(--color-yellow, #FFE500)",
33
37
  color: "#0D0D0D",
34
38
  }, children: loading ? "…" : ctaLabel })] })), error && (_jsx(Text, { className: CLS_ERROR_TEXT, children: errorMessage })), _jsx(Text, { className: "mt-4 text-xs text-white/40", children: "No spam, ever. Unsubscribe anytime." })] })] }));
@@ -12,7 +12,9 @@ function SecurityCard({ item, visible, delay, }) {
12
12
  "rounded-xl border p-5 transition-all duration-500",
13
13
  colorClass,
14
14
  visible ? "opacity-100 translate-y-0" : "opacity-0 translate-y-4",
15
- ].join(" "), style: { transitionDelay: `${delay}ms` }, "data-section": "securityhighlightssection-div-357", children: [item.renderIcon && (_jsx(Div, { className: "w-10 h-10 rounded-lg bg-white/60 dark:bg-white/10 flex items-center justify-center mb-3", children: _jsx("span", { className: iconColorClass, "aria-hidden": "true", children: item.renderIcon({ className: "w-6 h-6" }) }) })), _jsx(Text, { className: "font-semibold mb-1", children: item.title }), _jsx(Text, { variant: "secondary", className: "text-sm leading-relaxed", children: item.description })] }));
15
+ ].join(" "),
16
+ // audit-inline-style-ok: computed timing
17
+ style: { transitionDelay: `${delay}ms` }, "data-section": "securityhighlightssection-div-357", children: [item.renderIcon && (_jsx(Div, { className: "w-10 h-10 rounded-lg bg-white/60 dark:bg-white/10 flex items-center justify-center mb-3", children: _jsx("span", { className: iconColorClass, "aria-hidden": "true", children: item.renderIcon({ className: "w-6 h-6" }) }) })), _jsx(Text, { className: "font-semibold mb-1", children: item.title }), _jsx(Text, { variant: "secondary", className: "text-sm leading-relaxed", children: item.description })] }));
16
18
  }
17
19
  // --- Section -----------------------------------------------------------------
18
20
  export function SecurityHighlightsSection({ title, subtitle, pillLabel, items, learnMoreHref, learnMoreLabel = "Learn more →", className = "", }) {
@@ -9,7 +9,9 @@ function StatCard({ stat, visible, delay, isLast, }) {
9
9
  "transition-all duration-700",
10
10
  visible ? "translate-y-0 opacity-100" : "translate-y-6 opacity-0",
11
11
  !isLast ? "border-r border-zinc-200 dark:border-slate-700" : "",
12
- ].join(" "), style: { transitionDelay: `${delay}ms` }, children: [stat.renderIcon && (_jsx(Div, { className: "mb-4 flex h-14 w-14 items-center justify-center rounded-2xl bg-primary-50 dark:bg-primary-950/40 border border-primary-100 dark:border-primary-900/30", children: stat.renderIcon({ className: "w-7 h-7" }) })), _jsx(Heading, { level: 2, variant: "none", className: "mb-1 font-display text-4xl font-black bg-gradient-to-r from-primary to-secondary dark:from-primary dark:to-cobalt-400 bg-clip-text text-transparent md:text-5xl", children: stat.value }), _jsx(Text, { variant: "none", className: "text-xs uppercase tracking-widest text-zinc-500 dark:text-zinc-400 font-medium", children: stat.label })] }));
12
+ ].join(" "),
13
+ // audit-inline-style-ok: computed timing
14
+ style: { transitionDelay: `${delay}ms` }, children: [stat.renderIcon && (_jsx(Div, { className: "mb-4 flex h-14 w-14 items-center justify-center rounded-2xl bg-primary-50 dark:bg-primary-950/40 border border-primary-100 dark:border-primary-900/30", children: stat.renderIcon({ className: "w-7 h-7" }) })), _jsx(Heading, { level: 2, variant: "none", className: "mb-1 font-display text-4xl font-black bg-gradient-to-r from-primary to-secondary dark:from-primary dark:to-cobalt-400 bg-clip-text text-transparent md:text-5xl", children: stat.value }), _jsx(Text, { variant: "none", className: "text-xs uppercase tracking-widest text-zinc-500 dark:text-zinc-400 font-medium", children: stat.label })] }));
13
15
  }
14
16
  // --- Sectmon -----------------------------------------------------------------
15
17
  export function StatsCounterSection({ stats, className = "", }) {
@@ -9,7 +9,9 @@ function TrustFeatureCard({ item, visible, delay, }) {
9
9
  "flex flex-col items-center text-center p-4",
10
10
  "transition-all duration-500",
11
11
  visible ? "opacity-100 translate-y-0" : "opacity-0 translate-y-4",
12
- ].join(" "), style: { transitionDelay: `${delay}ms` }, "data-section": "trustfeaturessection-div-373", children: [_jsx(Div, { className: "flex h-14 w-14 items-center justify-center rounded-2xl bg-primary-50 dark:bg-primary-950/40 border border-primary-100 dark:border-primary-900/30 flex-shrink-0", children: item.renderIcon ? (item.renderIcon({ className: "w-7 h-7" })) : (_jsx(Span, { className: "text-primary-600 dark:text-secondary-400 text-2xl", "aria-hidden": "true", children: "\u2713" })) }), _jsx(Heading, { level: 3, className: "mt-3 mb-1 text-sm font-bold tracking-wide uppercase text-zinc-900 dark:text-zinc-100", children: item.title }), _jsx(Text, { className: "text-xs leading-relaxed text-zinc-500 dark:text-zinc-400", children: item.description })] }));
12
+ ].join(" "),
13
+ // audit-inline-style-ok: computed timing
14
+ style: { transitionDelay: `${delay}ms` }, "data-section": "trustfeaturessection-div-373", children: [_jsx(Div, { className: "flex h-14 w-14 items-center justify-center rounded-2xl bg-primary-50 dark:bg-primary-950/40 border border-primary-100 dark:border-primary-900/30 flex-shrink-0", children: item.renderIcon ? (item.renderIcon({ className: "w-7 h-7" })) : (_jsx(Span, { className: "text-primary-600 dark:text-secondary-400 text-2xl", "aria-hidden": "true", children: "\u2713" })) }), _jsx(Heading, { level: 3, className: "mt-3 mb-1 text-sm font-bold tracking-wide uppercase text-zinc-900 dark:text-zinc-100", children: item.title }), _jsx(Text, { className: "text-xs leading-relaxed text-zinc-500 dark:text-zinc-400", children: item.description })] }));
13
15
  }
14
16
  // --- Single strip-variant item -----------------------------------------------
15
17
  function TrustStripItem({ item }) {
@@ -10,4 +10,4 @@ export interface BlogListResult {
10
10
  export declare function useBlogArticles(options?: {
11
11
  endpoint?: string;
12
12
  initialPosts?: BlogListResult["posts"];
13
- }): import("@tanstack/react-query").UseQueryResult<NoInfer<BlogListResult>, Error>;
13
+ }): import("@tanstack/react-query").UseQueryResult<BlogListResult, Error>;
@@ -2,4 +2,4 @@ import type { ProductItem } from "@mohasinac/appkit/features/products";
2
2
  export declare function useFeaturedAuctions(options?: {
3
3
  filterByBrand?: string;
4
4
  initialData?: ProductItem[];
5
- }): import("@tanstack/react-query").UseQueryResult<NoInfer<ProductItem[]>, Error>;
5
+ }): import("@tanstack/react-query").UseQueryResult<ProductItem[], Error>;
@@ -2,4 +2,4 @@ import type { ProductItem } from "@mohasinac/appkit/features/products";
2
2
  export declare function useFeaturedPreOrders(options?: {
3
3
  filterByBrand?: string;
4
4
  initialData?: ProductItem[];
5
- }): import("@tanstack/react-query").UseQueryResult<NoInfer<ProductItem[]>, Error>;
5
+ }): import("@tanstack/react-query").UseQueryResult<ProductItem[], Error>;
@@ -2,4 +2,4 @@ import type { ProductListResponse } from "../../products/types";
2
2
  export declare function useFeaturedProducts(options?: {
3
3
  initialData?: ProductListResponse;
4
4
  filterByBrand?: string;
5
- }): import("@tanstack/react-query").UseQueryResult<NoInfer<ProductListResponse>, Error>;
5
+ }): import("@tanstack/react-query").UseQueryResult<ProductListResponse, Error>;
@@ -1,4 +1,4 @@
1
1
  import type { StoreListItem } from "../../stores/types";
2
2
  export declare function useFeaturedStores(limit?: number, options?: {
3
3
  initialData?: StoreListItem[];
4
- }): import("@tanstack/react-query").UseQueryResult<NoInfer<StoreListItem[]>, Error>;
4
+ }): import("@tanstack/react-query").UseQueryResult<StoreListItem[], Error>;
@@ -6,4 +6,4 @@ import type { CarouselSlide } from "../types/index";
6
6
  */
7
7
  export declare function useHeroCarousel(options?: {
8
8
  initialData?: CarouselSlide[];
9
- }): import("@tanstack/react-query").UseQueryResult<NoInfer<CarouselSlide[]>, Error>;
9
+ }): import("@tanstack/react-query").UseQueryResult<CarouselSlide[], Error>;
@@ -5,4 +5,4 @@ export interface HomepageEventsListResponse {
5
5
  }
6
6
  export declare function useHomepageEvents(limit?: number, options?: {
7
7
  initialData?: EventItem[];
8
- }): import("@tanstack/react-query").UseQueryResult<NoInfer<EventItem[]>, Error>;
8
+ }): import("@tanstack/react-query").UseQueryResult<EventItem[], Error>;
@@ -4,4 +4,4 @@ export interface UseHomepageReviewsOptions {
4
4
  initialData?: Review[];
5
5
  staleTime?: number;
6
6
  }
7
- export declare function useHomepageReviews(options?: UseHomepageReviewsOptions): import("@tanstack/react-query").UseQueryResult<NoInfer<Review[]>, Error>;
7
+ export declare function useHomepageReviews(options?: UseHomepageReviewsOptions): import("@tanstack/react-query").UseQueryResult<Review[], Error>;
@@ -1,2 +1,2 @@
1
1
  import type { HomepageSectionDocument } from "../schemas";
2
- export declare function useHomepageSections(params?: string): import("@tanstack/react-query").UseQueryResult<NoInfer<HomepageSectionDocument[]>, Error>;
2
+ export declare function useHomepageSections(params?: string): import("@tanstack/react-query").UseQueryResult<HomepageSectionDocument[], Error>;
@@ -1,4 +1,4 @@
1
1
  import type { CategoryItem } from "../../categories/types";
2
2
  export declare function useTopBrands(limit?: number, options?: {
3
3
  initialData?: CategoryItem[];
4
- }): import("@tanstack/react-query").UseQueryResult<NoInfer<CategoryItem[]>, Error>;
4
+ }): import("@tanstack/react-query").UseQueryResult<CategoryItem[], Error>;
@@ -1,4 +1,4 @@
1
1
  import type { CategoryItem } from "../../categories/types";
2
2
  export declare function useTopCategories(limit?: number, options?: {
3
3
  initialData?: CategoryItem[];
4
- }): import("@tanstack/react-query").UseQueryResult<NoInfer<CategoryItem[]>, Error>;
4
+ }): import("@tanstack/react-query").UseQueryResult<CategoryItem[], Error>;
@@ -57,7 +57,9 @@ function SidebarUserHeader({ user, onClose, }) {
57
57
  }
58
58
  : user.photoURL
59
59
  ? { url: user.photoURL, position: { x: 50, y: 50 }, zoom: 1 }
60
- : null, size: "md", alt: user.displayName || "User", displayName: user.displayName, email: user.email }), user.role && user.role !== "user" && (_jsx(Div, { className: "absolute -bottom-0.5 -right-0.5 flex items-center justify-center w-4 h-4 rounded-full border-2 border-white dark:border-slate-900 text-white text-[9px] font-bold leading-none select-none", style: { background: ROLE_DOT_COLORS[user.role] ?? "#6b7280" }, title: user.role.charAt(0).toUpperCase() + user.role.slice(1), "aria-label": user.role, children: user.role.charAt(0).toUpperCase() }))] }), _jsxs(Div, { className: "flex-1 min-w-0", children: [_jsx(Text, { className: "text-sm font-medium text-zinc-900 dark:text-zinc-100 truncate", children: user.displayName || "User" }), _jsx(Text, { className: "text-xs text-zinc-500 dark:text-zinc-400 truncate", children: user.email || "" })] })] }), _jsx("button", { type: "button", "aria-label": "Close menu", onClick: onClose, className: "flex-shrink-0 rounded-full p-2 text-zinc-600 hover:bg-zinc-200 hover:text-zinc-900 dark:text-zinc-300 dark:hover:bg-slate-800 dark:hover:text-zinc-100 transition-all hover:rotate-90", children: _jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) })] }));
60
+ : null, size: "md", alt: user.displayName || "User", displayName: user.displayName, email: user.email }), user.role && user.role !== "user" && (_jsx(Div, { className: "absolute -bottom-0.5 -right-0.5 flex items-center justify-center w-4 h-4 rounded-full border-2 border-white dark:border-slate-900 text-white text-[9px] font-bold leading-none select-none",
61
+ // audit-inline-style-ok: runtime brand gradient
62
+ style: { background: ROLE_DOT_COLORS[user.role] ?? "#6b7280" }, title: user.role.charAt(0).toUpperCase() + user.role.slice(1), "aria-label": user.role, children: user.role.charAt(0).toUpperCase() }))] }), _jsxs(Div, { className: "flex-1 min-w-0", children: [_jsx(Text, { className: "text-sm font-medium text-zinc-900 dark:text-zinc-100 truncate", children: user.displayName || "User" }), _jsx(Text, { className: "text-xs text-zinc-500 dark:text-zinc-400 truncate", children: user.email || "" })] })] }), _jsx("button", { type: "button", "aria-label": "Close menu", onClick: onClose, className: "flex-shrink-0 rounded-full p-2 text-zinc-600 hover:bg-zinc-200 hover:text-zinc-900 dark:text-zinc-300 dark:hover:bg-slate-800 dark:hover:text-zinc-100 transition-all hover:rotate-90", children: _jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) })] }));
61
63
  }
62
64
  /** Sidebar header when no user is logged in — title + close button. */
63
65
  function SidebarGuestHeader({ sidebarTitle, onClose, }) {
@@ -1,32 +1,5 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- /**
4
- * BottomActions Component
5
- *
6
- * A fixed-bottom mobile action bar rendered **above** BottomNavbar (bottom-14).
7
- * Reads from `BottomActionsContext` — features register their actions via the
8
- * `useBottomActions` hook; this component just renders whatever is registered.
9
- *
10
- * Two modes:
11
- * - **Page mode** — shows registered page-level actions inline (Add to Cart,
12
- * Buy Now, Place Bid, Proceed to Checkout, etc.) with an optional info label.
13
- * - **Bulk mode** — activates when `bulk.selectedCount > 0`; shows:
14
- * • Selection count pill on the left (tap to deselect all)
15
- * • An upward-opening type-picker dropdown (middle, flex-1) — tap to
16
- * choose WHICH action to run; the chosen label is always visible.
17
- * • An "Apply" submit button on the right — executes the selected action,
18
- * styled with the selected action's variant (danger = red, etc.).
19
- *
20
- * Layout rules:
21
- * - Hidden on lg+ screens (`lg:hidden`) — desktop shows inline action panels.
22
- * - The bar slides up with a 300 ms ease-out transition; `pointer-events-none`
23
- * while off-screen.
24
- *
25
- * @component
26
- * @example
27
- * // Automatically rendered by LayoutClient — no manual usage required.
28
- * // Features use `useBottomActions` to register their actions.
29
- */
30
3
  import { useState, useRef, useEffect } from "react";
31
4
  import { X, ChevronUp, ChevronDown, Check } from "lucide-react";
32
5
  import { useBottomActionsContext } from "./BottomActionsContext";
@@ -1,39 +1,3 @@
1
- /**
2
- * BottomActionsContext
3
- *
4
- * Provides a context for registering page-level mobile action bars.
5
- * Features call `useBottomActions` to push actions; the `<BottomActions>`
6
- * layout component reads this context and renders the bar above BottomNavbar.
7
- *
8
- * Supports two modes:
9
- * - Page mode: primary page actions (Add to Cart, Buy Now, Place Bid, etc.)
10
- * - Bulk mode: activated when `bulk.selectedCount > 0` — shows selection
11
- * count + custom bulk action buttons (Delete, Archive, Export, etc.)
12
- *
13
- * @example — product detail page
14
- * ```tsx
15
- * useBottomActions({
16
- * actions: [
17
- * { id: "wishlist", icon: <Heart className="w-4 h-4" />, label: t("wishlist"), variant: "ghost", grow: false, onClick: handleWishlist },
18
- * { id: "cart", label: t("addToCart"), variant: "outline", onClick: handleAddToCart },
19
- * { id: "buy", label: t("buyNow"), variant: "primary", onClick: handleBuyNow },
20
- * ],
21
- * });
22
- * ```
23
- *
24
- * @example — admin listing with bulk select
25
- * ```tsx
26
- * useBottomActions({
27
- * bulk: {
28
- * selectedCount: selectedIds.length,
29
- * onClearSelection: () => setSelectedIds([]),
30
- * actions: [
31
- * { id: "delete", label: t("bulkDelete", { count: selectedIds.length }), variant: "danger", onClick: handleBulkDelete },
32
- * ],
33
- * },
34
- * });
35
- * ```
36
- */
37
1
  import React from "react";
38
2
  import type { ButtonProps } from "../../ui";
39
3
  export interface BottomAction {
@@ -1,41 +1,5 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- /**
4
- * BottomActionsContext
5
- *
6
- * Provides a context for registering page-level mobile action bars.
7
- * Features call `useBottomActions` to push actions; the `<BottomActions>`
8
- * layout component reads this context and renders the bar above BottomNavbar.
9
- *
10
- * Supports two modes:
11
- * - Page mode: primary page actions (Add to Cart, Buy Now, Place Bid, etc.)
12
- * - Bulk mode: activated when `bulk.selectedCount > 0` — shows selection
13
- * count + custom bulk action buttons (Delete, Archive, Export, etc.)
14
- *
15
- * @example — product detail page
16
- * ```tsx
17
- * useBottomActions({
18
- * actions: [
19
- * { id: "wishlist", icon: <Heart className="w-4 h-4" />, label: t("wishlist"), variant: "ghost", grow: false, onClick: handleWishlist },
20
- * { id: "cart", label: t("addToCart"), variant: "outline", onClick: handleAddToCart },
21
- * { id: "buy", label: t("buyNow"), variant: "primary", onClick: handleBuyNow },
22
- * ],
23
- * });
24
- * ```
25
- *
26
- * @example — admin listing with bulk select
27
- * ```tsx
28
- * useBottomActions({
29
- * bulk: {
30
- * selectedCount: selectedIds.length,
31
- * onClearSelection: () => setSelectedIds([]),
32
- * actions: [
33
- * { id: "delete", label: t("bulkDelete", { count: selectedIds.length }), variant: "danger", onClick: handleBulkDelete },
34
- * ],
35
- * },
36
- * });
37
- * ```
38
- */
39
3
  import { createContext, useCallback, useContext, useMemo, useRef, useState, } from "react";
40
4
  const EMPTY = { actions: [] };
41
5
  const BottomActionsContext = createContext(null);
@@ -99,9 +63,7 @@ export function BottomActionsProvider({ children, }) {
99
63
  bulkClearRef,
100
64
  setInfoLabel,
101
65
  clearAll,
102
- }),
103
- // eslint-disable-next-line react-hooks/exhaustive-deps
104
- [state, setActions, setBulkConfig, setInfoLabel, clearAll]);
66
+ }), [state, setActions, setBulkConfig, setInfoLabel, clearAll]);
105
67
  return (_jsx(BottomActionsContext.Provider, { value: value, children: children }));
106
68
  }
107
69
  // --- Hook ---------------------------------------------------------------------
@@ -27,6 +27,6 @@ export function BottomNavbar({ user, homeHref, shopHref, cartHref, profileHref,
27
27
  return (_jsxs(BottomNavLayout, { ariaLabel: labels.mobileNav, children: [visibleItems.map((item) => (_jsx(Li, { className: "flex-1", children: _jsx(NavItem, { href: item.href, label: item.label, icon: item.icon ?? defaultIcon, isActive: pathname === item.href || (item.href !== "/" && pathname.startsWith(item.href + "/")), variant: "vertical", activeClassName: activeClassName, inactiveClassName: inactiveClassName, iconClassName: iconClassName, labelClassName: labelClassName }) }, item.key))), _jsx(Li, { className: "flex-1", children: _jsxs("button", { type: "button", onClick: onMoreToggle, className: `${slotClassName} ${inactiveClassName}`, "aria-label": labels.more, children: [_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 12h16M4 18h16" }) }), _jsx(Span, { className: labelClassName, children: labels.more })] }) })] }));
28
28
  }
29
29
  const itemStyle = { width: "20%" };
30
- return (_jsxs(BottomNavLayout, { ariaLabel: labels.mobileNav, children: [_jsx(Li, { className: "flex-1", style: itemStyle, children: _jsx(NavItem, { href: homeHref, label: labels.home, icon: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" }) }), isActive: pathname === homeHref, variant: "vertical", activeClassName: activeClassName, inactiveClassName: inactiveClassName, iconClassName: iconClassName, labelClassName: labelClassName }) }), _jsx(Li, { className: "flex-1", style: itemStyle, children: _jsx(NavItem, { href: shopHref, label: labels.products, icon: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z" }) }), isActive: pathname === shopHref, variant: "vertical", activeClassName: activeClassName, inactiveClassName: inactiveClassName, iconClassName: iconClassName, labelClassName: labelClassName }) }), _jsx(Li, { className: "flex-1", style: itemStyle, children: _jsxs("button", { type: "button", onClick: onSearchToggle, className: `${slotClassName} ${inactiveClassName}`, "aria-label": labels.search, children: [_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" }) }), _jsx(Span, { className: labelClassName, children: labels.search })] }) }), _jsx(Li, { className: "flex-1", style: itemStyle, children: _jsxs(TextLink, { href: cartHref, variant: "none", className: `${slotClassName} ${pathname === cartHref ? activeClassName : inactiveClassName}`, "aria-label": labels.cart, children: [_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z" }) }), _jsx(Span, { className: labelClassName, children: labels.cart })] }) }), _jsx(Li, { className: "flex-1", style: itemStyle, children: user ? (_jsxs(TextLink, { href: profileHref, variant: "none", className: `${slotClassName} ${pathname === profileHref ? activeClassName : inactiveClassName}`, "aria-label": labels.profile, children: [_jsx(AvatarDisplay, { cropData: user.avatarMetadata ||
30
+ return (_jsxs(BottomNavLayout, { ariaLabel: labels.mobileNav, children: ["// audit-inline-style-ok: pass-through style prop", _jsx(Li, { className: "flex-1", style: itemStyle, children: _jsx(NavItem, { href: homeHref, label: labels.home, icon: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" }) }), isActive: pathname === homeHref, variant: "vertical", activeClassName: activeClassName, inactiveClassName: inactiveClassName, iconClassName: iconClassName, labelClassName: labelClassName }) }), "// audit-inline-style-ok: pass-through style prop", _jsx(Li, { className: "flex-1", style: itemStyle, children: _jsx(NavItem, { href: shopHref, label: labels.products, icon: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M16 11V7a4 4 0 00-8 0v4M5 9h14l1 12H4L5 9z" }) }), isActive: pathname === shopHref, variant: "vertical", activeClassName: activeClassName, inactiveClassName: inactiveClassName, iconClassName: iconClassName, labelClassName: labelClassName }) }), "// audit-inline-style-ok: pass-through style prop", _jsx(Li, { className: "flex-1", style: itemStyle, children: _jsxs("button", { type: "button", onClick: onSearchToggle, className: `${slotClassName} ${inactiveClassName}`, "aria-label": labels.search, children: [_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" }) }), _jsx(Span, { className: labelClassName, children: labels.search })] }) }), "// audit-inline-style-ok: pass-through style prop", _jsx(Li, { className: "flex-1", style: itemStyle, children: _jsxs(TextLink, { href: cartHref, variant: "none", className: `${slotClassName} ${pathname === cartHref ? activeClassName : inactiveClassName}`, "aria-label": labels.cart, children: [_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z" }) }), _jsx(Span, { className: labelClassName, children: labels.cart })] }) }), "// audit-inline-style-ok: pass-through style prop", _jsx(Li, { className: "flex-1", style: itemStyle, children: user ? (_jsxs(TextLink, { href: profileHref, variant: "none", className: `${slotClassName} ${pathname === profileHref ? activeClassName : inactiveClassName}`, "aria-label": labels.profile, children: [_jsx(AvatarDisplay, { cropData: user.avatarMetadata ||
31
31
  (user.photoURL ? { url: user.photoURL, position: { x: 50, y: 50 }, zoom: 1 } : null), size: "sm", alt: user.displayName || "User", displayName: user.displayName, email: user.email }), user.role && (_jsx(Span, { className: `text-[7px] font-semibold uppercase leading-none ${getRoleBadgeClass ? getRoleBadgeClass(user.role) : "text-zinc-500 dark:text-slate-400"}`, children: user.role }))] })) : (_jsx(NavItem, { href: loginHref, label: labels.profile, icon: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-5 w-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z" }) }), isActive: pathname === loginHref, variant: "vertical", activeClassName: activeClassName, inactiveClassName: inactiveClassName, iconClassName: iconClassName, labelClassName: labelClassName })) })] }));
32
32
  }
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { sieveFilter, SIEVE_OP } from "@mohasinac/appkit";
2
3
  import { productRepository } from "../../../repositories";
3
4
  import { Container, Heading, Main, Section } from "../../../ui";
4
5
  import { AdSlot } from "../../homepage/components/AdSlot";
@@ -16,18 +17,18 @@ function buildLiveFilters(params) {
16
17
  const minPrice = sp(params, "minPrice");
17
18
  const maxPrice = sp(params, "maxPrice");
18
19
  if (minPrice)
19
- parts.push(`price>=${minPrice}`);
20
+ parts.push(sieveFilter("price", SIEVE_OP.GTE, minPrice));
20
21
  if (maxPrice)
21
- parts.push(`price<=${maxPrice}`);
22
+ parts.push(sieveFilter("price", SIEVE_OP.LTE, maxPrice));
22
23
  const species = sp(params, "species");
23
24
  if (species)
24
- parts.push(`liveSpecies==${species}`);
25
+ parts.push(sieveFilter("liveSpecies", SIEVE_OP.EQ, species));
25
26
  const liveSex = sp(params, "liveSex");
26
27
  if (liveSex)
27
- parts.push(`liveSex==${liveSex}`);
28
+ parts.push(sieveFilter("liveSex", SIEVE_OP.EQ, liveSex));
28
29
  const transport = sp(params, "liveTransportMethod");
29
30
  if (transport)
30
- parts.push(`liveTransportMethod==${transport}`);
31
+ parts.push(sieveFilter("liveTransportMethod", SIEVE_OP.EQ, transport));
31
32
  return parts.join(",");
32
33
  }
33
34
  export async function LiveItemsListView({ searchParams = {} }) {
@@ -1,4 +1,4 @@
1
1
  import type { LoyaltyBalance } from "../types";
2
2
  export declare function useLoyaltyBalance(uid: string | undefined, opts?: {
3
3
  endpoint?: string;
4
- }): import("@tanstack/react-query").UseQueryResult<NoInfer<LoyaltyBalance | null>, Error>;
4
+ }): import("@tanstack/react-query").UseQueryResult<LoyaltyBalance | null, Error>;
@@ -31,7 +31,9 @@ function LightboxControlsBar({ items, index, zoom, isFullscreen, L, goPrev, goNe
31
31
  return (_jsxs(Div, { className: "flex items-center justify-center gap-1.5 px-4 py-3 bg-black/85 backdrop-blur-sm shrink-0 border-t border-white/10 flex-wrap", children: [items.length > 1 && (_jsx(IconBtn, { onClick: (e) => { e.stopPropagation(); goPrev(); }, ariaLabel: L.prevImage, children: _jsx(ChevronLeft, { className: "w-7 h-7" }) })), _jsx(IconBtn, { onClick: zoomOut, disabled: zoom <= MIN_ZOOM, ariaLabel: L.zoomOut, children: _jsx(ZoomOut, { className: "w-7 h-7" }) }), _jsxs(Span, { size: "xs", className: "text-white/70 w-14 text-center tabular-nums", children: [Math.round(zoom * 100), "%"] }), _jsx(IconBtn, { onClick: zoomIn, disabled: zoom >= MAX_ZOOM, ariaLabel: L.zoomIn, children: _jsx(ZoomIn, { className: "w-7 h-7" }) }), zoom > 1 && (_jsx(IconBtn, { onClick: resetZoom, ariaLabel: L.resetZoom, children: _jsx(RotateCcw, { className: "w-7 h-7" }) })), _jsx(Span, { className: "w-px h-6 bg-white/15 mx-1 shrink-0", "aria-hidden": "true" }), _jsxs(Span, { size: "xs", className: "text-white/60 w-12 text-center tabular-nums", children: [index + 1, " / ", items.length] }), _jsx(Span, { className: "w-px h-6 bg-white/15 mx-1 shrink-0", "aria-hidden": "true" }), _jsx(IconBtn, { onClick: toggleFullscreen, ariaLabel: isFullscreen ? L.exitFullscreen : L.enterFullscreen, children: isFullscreen ? _jsx(Minimize, { className: "w-6 h-6" }) : _jsx(Maximize, { className: "w-6 h-6" }) }), _jsx(IconBtn, { onClick: onClose, ariaLabel: L.close, className: CLS_CLOSE_HOVER, children: _jsx(X, { className: "w-7 h-7" }) }), items.length > 1 && (_jsx(IconBtn, { onClick: (e) => { e.stopPropagation(); goNext(); }, ariaLabel: L.nextImage, children: _jsx(ChevronRight, { className: "w-7 h-7" }) }))] }));
32
32
  }
33
33
  function LightboxThumbnailStrip({ items, index, onSelect, resetZoom, L, }) {
34
- return (_jsx(Div, { className: "flex gap-2 px-4 py-3 bg-black/70 backdrop-blur-sm overflow-x-auto shrink-0 justify-center", style: { paddingBottom: "calc(0.75rem + env(safe-area-inset-bottom, 0px))" }, children: items.map((item, i) => (_jsx(Button, { type: "button", onClick: () => { onSelect(i); resetZoom(); }, "aria-label": L.imageThumbnail(i + 1), "aria-current": i === index ? "true" : undefined, className: cn("relative shrink-0 w-14 h-14 p-0 overflow-hidden rounded-lg border-2 transition-all active:scale-95", i === index ? "border-white opacity-100" : "border-transparent opacity-40 hover:opacity-75"), children: _jsx(MediaImage, { src: item.src, alt: item.alt, size: "thumbnail" }) }, i))) }));
34
+ return (_jsx(Div, { className: "flex gap-2 px-4 py-3 bg-black/70 backdrop-blur-sm overflow-x-auto shrink-0 justify-center",
35
+ // audit-inline-style-ok: safe-area inset
36
+ style: { paddingBottom: "calc(0.75rem + env(safe-area-inset-bottom, 0px))" }, children: items.map((item, i) => (_jsx(Button, { type: "button", onClick: () => { onSelect(i); resetZoom(); }, "aria-label": L.imageThumbnail(i + 1), "aria-current": i === index ? "true" : undefined, className: cn("relative shrink-0 w-14 h-14 p-0 overflow-hidden rounded-lg border-2 transition-all active:scale-95", i === index ? "border-white opacity-100" : "border-transparent opacity-40 hover:opacity-75"), children: _jsx(MediaImage, { src: item.src, alt: item.alt, size: "thumbnail" }) }, i))) }));
35
37
  }
36
38
  // --- MediaLightbox ------------------------------------------------------------
37
39
  export function MediaLightbox({ items, initialIndex = 0, isOpen, onClose, labels, }) {
@@ -223,13 +225,17 @@ export function MediaLightbox({ items, initialIndex = 0, isOpen, onClose, labels
223
225
  if (!isOpen || items.length === 0)
224
226
  return null;
225
227
  const current = items[index];
226
- return (_jsxs(Div, { ref: containerRef, className: "fixed inset-0 z-[var(--appkit-z-tooltip)] bg-black/95 flex flex-col", role: "dialog", "aria-modal": "true", "aria-label": L.lightboxTitle, children: [_jsx(Div, { ref: imageAreaRef, className: "flex-1 relative overflow-hidden select-none", onMouseDown: handleMouseDown, onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, onMouseLeave: handleMouseUp, onTouchStart: handleTouchStart, onTouchMove: handleTouchMove, onTouchEnd: handleTouchEnd, style: {
228
+ return (_jsxs(Div, { ref: containerRef, className: "fixed inset-0 z-[var(--appkit-z-tooltip)] bg-black/95 flex flex-col", role: "dialog", "aria-modal": "true", "aria-label": L.lightboxTitle, children: [_jsx(Div, { ref: imageAreaRef, className: "flex-1 relative overflow-hidden select-none", onMouseDown: handleMouseDown, onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, onMouseLeave: handleMouseUp, onTouchStart: handleTouchStart, onTouchMove: handleTouchMove, onTouchEnd: handleTouchEnd,
229
+ // audit-inline-style-ok: dynamic CSS
230
+ style: {
227
231
  cursor: zoom > 1 ? (isDragging ? "grabbing" : "grab") : "default",
228
232
  touchAction: "none",
229
233
  }, onClick: (e) => {
230
234
  if (e.target === e.currentTarget)
231
235
  onClose();
232
- }, children: _jsx(Div, { className: "absolute inset-0", style: {
236
+ }, children: _jsx(Div, { className: "absolute inset-0",
237
+ // audit-inline-style-ok: dynamic CSS
238
+ style: {
233
239
  transform: `translate(${offset.x}px, ${offset.y}px) scale(${zoom})`,
234
240
  transformOrigin: "center center",
235
241
  transition: isDragging ? "none" : "transform 0.2s ease",
@@ -10,9 +10,10 @@ import { useState, useRef, useCallback } from "react";
10
10
  import { useTranslations } from "next-intl";
11
11
  import { Cropper } from "react-advanced-cropper";
12
12
  import "react-advanced-cropper/dist/style.css";
13
- import { Button, Div, Modal, Row, Text } from "../../../ui";
13
+ import { Button, Div, Modal, Row, Text, useToast } from "../../../ui";
14
14
  export function ImageEditor({ isOpen, imageUrl, onClose, onSave, aspectRatio, outputFormat = "image/webp", outputQuality = 0.9, maxOutputWidth = 2048, }) {
15
15
  const t = useTranslations("mediaEditor");
16
+ const { showToast } = useToast();
16
17
  const cropperRef = useRef(null);
17
18
  const [rotation, setRotation] = useState(0);
18
19
  const [saving, setSaving] = useState(false);
@@ -59,10 +60,13 @@ export function ImageEditor({ isOpen, imageUrl, onClose, onSave, aspectRatio, ou
59
60
  const file = new File([blob], `cropped.${ext}`, { type: outputFormat });
60
61
  onSave(file);
61
62
  }
63
+ catch (err) {
64
+ showToast(err instanceof Error ? err.message : "Failed to save image.", "error");
65
+ }
62
66
  finally {
63
67
  setSaving(false);
64
68
  }
65
- }, [maxOutputWidth, outputFormat, outputQuality, onSave]);
69
+ }, [maxOutputWidth, outputFormat, outputQuality, onSave, showToast]);
66
70
  return (_jsx(Modal, { isOpen: isOpen, onClose: onClose, title: t("cropTitle"), size: "lg", children: _jsxs(Div, { className: "space-y-3", children: [_jsx(Text, { variant: "secondary", size: "xs", children: t("cropInstruction") }), _jsx(Div, { className: "relative w-full max-h-[400px] overflow-hidden rounded-lg bg-zinc-100 dark:bg-slate-800", children: _jsx(Cropper, { ref: cropperRef, src: imageUrl, stencilProps: aspectRatio ? { aspectRatio } : undefined, className: "max-h-[400px]" }) }), _jsxs(Row, { gap: "sm", justify: "center", className: "flex-wrap", children: [_jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: () => handleRotate(-90), "aria-label": t("cropRotateLeft"), children: _jsxs("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", "aria-hidden": "true", children: [_jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 10h10a4 4 0 014 4v0a4 4 0 01-4 4H3" }), _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M7 6l-4 4 4 4" })] }) }), _jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: () => handleRotate(90), "aria-label": t("cropRotateRight"), children: _jsxs("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", "aria-hidden": "true", children: [_jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M21 10H11a4 4 0 00-4 4v0a4 4 0 004 4h10" }), _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M17 6l4 4-4 4" })] }) }), _jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: handleFlipH, "aria-label": t("cropFlipH"), children: _jsx("svg", { className: "w-4 h-4", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M7 16V4l-4 4m0 4l4 4M17 16V4l4 4m0 4l-4 4M12 2v20" }) }) }), _jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: handleFlipV, "aria-label": t("cropFlipV"), children: _jsx("svg", { className: "w-4 h-4 rotate-90", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M7 16V4l-4 4m0 4l4 4M17 16V4l4 4m0 4l-4 4M12 2v20" }) }) }), _jsx(Button, { type: "button", variant: "ghost", size: "sm", onClick: handleReset, children: t("cropReset") }), _jsxs(Text, { size: "xs", variant: "secondary", className: "ml-auto", children: [rotation, "\u00B0"] })] }), !aspectRatio && (_jsx(Row, { gap: "sm", justify: "center", className: "flex-wrap", children: [
67
71
  { label: "Free", ratio: undefined },
68
72
  { label: "1:1", ratio: 1 },
@@ -81,7 +81,7 @@ function ExternalUrlTabPanel({ extInput, setExtInput, extError, setExtError, onA
81
81
  return (_jsxs(Div, { className: "space-y-2", children: [_jsxs(Row, { gap: "sm", children: [_jsx("input", { type: "url", value: extInput, onChange: (e) => { setExtInput(e.target.value); setExtError(""); }, placeholder: "https://example.com/image.jpg", className: "appkit-input flex-1" }), _jsx(Button, { type: "button", variant: "primary", size: "sm", onClick: onApply, children: "Apply" })] }), extError && _jsx(Alert, { variant: "error", children: extError }), _jsx(Text, { size: "xs", variant: "secondary", children: "External URLs are stored as-is and are not watermarked." })] }));
82
82
  }
83
83
  function MediaPreviewPanel({ value, label, disabled, enableTrim, enableThumbnail, onEditVideo, onRemove, tUpload, tMediaEditor, }) {
84
- return (_jsxs(Div, { className: `rounded-lg border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 ${__P.p3}`, children: [isVideo(value) ? (_jsxs(Div, { className: "space-y-2", children: [_jsx(Div, { className: `relative aspect-video ${__O.hidden} rounded-lg`, children: _jsx(MediaVideo, { src: value, alt: label, controls: true, objectFit: "contain" }) }), _jsx(Text, { size: "xs", variant: "secondary", children: "Video uploaded successfully. Large videos may take longer to process." })] })) : isImage(value) ? (_jsx(Div, { className: `relative aspect-video ${__O.hidden} rounded-lg`, children: _jsx(MediaImage, { src: value, alt: label, size: "card", objectFit: "contain" }) })) : isPdf(value) ? (_jsxs(Div, { className: "space-y-2", children: [_jsx(Div, { className: `relative w-full ${__O.hidden} rounded-lg border border-zinc-200 dark:border-zinc-700`, style: { height: 280 }, children: _jsx("iframe", { src: value, title: filenameFromUrl(value), className: "w-full h-full border-0" }) }), _jsxs(Row, { gap: "md", align: "center", children: [_jsx(Div, { "aria-hidden": true, className: CLS_PDF_BADGE, children: _jsx(Span, { size: "xs", weight: "bold", children: "PDF" }) }), _jsx("a", { href: value, target: "_blank", rel: "noopener noreferrer", className: CLS_PDF_NAME, children: filenameFromUrl(value) })] })] })) : (_jsx("a", { href: value, target: "_blank", rel: "noopener noreferrer", className: CLS_PDF_LINK, children: filenameFromUrl(value) })), !disabled && (_jsxs(Row, { wrap: true, gap: "sm", className: "mt-2", children: [isVideo(value) && (enableTrim || enableThumbnail) && (_jsx(Button, { type: "button", onClick: () => onEditVideo(value), variant: "secondary", size: "sm", children: tMediaEditor("editVideo") })), _jsx(Button, { type: "button", onClick: onRemove, variant: "danger", size: "sm", children: tUpload("remove") })] }))] }));
84
+ return (_jsxs(Div, { className: `rounded-lg border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-900 ${__P.p3}`, children: [isVideo(value) ? (_jsxs(Div, { className: "space-y-2", children: [_jsx(Div, { className: `relative aspect-video ${__O.hidden} rounded-lg`, children: _jsx(MediaVideo, { src: value, alt: label, controls: true, objectFit: "contain" }) }), _jsx(Text, { size: "xs", variant: "secondary", children: "Video uploaded successfully. Large videos may take longer to process." })] })) : isImage(value) ? (_jsx(Div, { className: `relative aspect-video ${__O.hidden} rounded-lg`, children: _jsx(MediaImage, { src: value, alt: label, size: "card", objectFit: "contain" }) })) : isPdf(value) ? (_jsxs(Div, { className: "space-y-2", children: ["// audit-inline-style-ok: dynamic CSS", _jsx(Div, { className: `relative w-full ${__O.hidden} rounded-lg border border-zinc-200 dark:border-zinc-700`, style: { height: 280 }, children: _jsx("iframe", { src: value, title: filenameFromUrl(value), className: "w-full h-full border-0" }) }), _jsxs(Row, { gap: "md", align: "center", children: [_jsx(Div, { "aria-hidden": true, className: CLS_PDF_BADGE, children: _jsx(Span, { size: "xs", weight: "bold", children: "PDF" }) }), _jsx("a", { href: value, target: "_blank", rel: "noopener noreferrer", className: CLS_PDF_NAME, children: filenameFromUrl(value) })] })] })) : (_jsx("a", { href: value, target: "_blank", rel: "noopener noreferrer", className: CLS_PDF_LINK, children: filenameFromUrl(value) })), !disabled && (_jsxs(Row, { wrap: true, gap: "sm", className: "mt-2", children: [isVideo(value) && (enableTrim || enableThumbnail) && (_jsx(Button, { type: "button", onClick: () => onEditVideo(value), variant: "secondary", size: "sm", children: tMediaEditor("editVideo") })), _jsx(Button, { type: "button", onClick: onRemove, variant: "danger", size: "sm", children: tUpload("remove") })] }))] }));
85
85
  }
86
86
  export function MediaUploadField({ label, value, onChange, onChangeField, onUpload,
87
87
  // SB-UNI-Z5 2026-05-13 — `kind` derives accept/maxSizeMB when not set
@@ -40,6 +40,7 @@ export function useConversation(conversationId) {
40
40
  const [error, setError] = useState(null);
41
41
  const [isConnected, setIsConnected] = useState(false);
42
42
  const refetch = useCallback(async () => {
43
+ // toast-intentionally-silent — error stored in setError() for UI inline render
43
44
  if (!conversationId) {
44
45
  setConversation(null);
45
46
  return;
@@ -100,6 +101,7 @@ export function useConversation(conversationId) {
100
101
  await refetch();
101
102
  }, [conversationId, refetch]);
102
103
  const markRead = useCallback(async () => {
104
+ // toast-intentionally-silent — best-effort background op
103
105
  if (!conversationId)
104
106
  return;
105
107
  try {
@@ -20,6 +20,7 @@ export function useConversations(userId) {
20
20
  const [isLoading, setIsLoading] = useState(false);
21
21
  const [error, setError] = useState(null);
22
22
  const refetch = useCallback(async () => {
23
+ // toast-intentionally-silent — error stored in setError() for UI inline render
23
24
  if (!userId) {
24
25
  setConversations([]);
25
26
  return;
@@ -35,7 +35,9 @@ export function OrderCard({ order, onClick, labels = {} }) {
35
35
  .sort()[0];
36
36
  return (_jsxs(Div, { role: onClick ? "button" : undefined, tabIndex: onClick ? 0 : undefined, onKeyDown: onClick
37
37
  ? (e) => (e.key === "Enter" || e.key === " ") && onClick(order)
38
- : undefined, onClick: onClick ? () => onClick(order) : undefined, className: `rounded-xl border border-neutral-200 dark:border-slate-700 bg-white dark:bg-slate-900 p-5 ${onClick ? "cursor-pointer transition hover:shadow-md" : ""}`, children: [_jsxs(Row, { wrap: true, align: "start", justify: "between", gap: "3", children: [_jsxs(Div, { children: [_jsxs(Text, { className: "text-xs text-neutral-500 dark:text-zinc-400", children: ["Order #", order.id.slice(-8).toUpperCase()] }), date && (_jsx(Text, { className: "mt-0.5 text-xs text-zinc-400 dark:text-zinc-400", children: date }))] }), _jsx(Span, { size: "xs", weight: "semibold", className: `rounded-full px-3 py-1 capitalize ${statusColor}`, children: labels[order.orderStatus] ?? order.orderStatus.replace(/_/g, " ") })] }), revealsRemaining > 0 && (_jsxs(Row, { gap: "sm", className: "mt-2", children: [_jsxs(Span, { size: "xs", weight: "semibold", className: CLS_PRIZE_BADGE, children: [revealsRemaining, " ", revealsRemaining === 1 ? "reveal" : "reveals", " pending"] }), earliestDeadline && (_jsxs(Span, { size: "xs", className: "text-zinc-500 dark:text-zinc-400", children: ["before ", new Date(earliestDeadline).toLocaleDateString(getDefaultLocale(), { month: "short", day: "numeric" })] }))] })), _jsxs(Row, { wrap: true, gap: "3", className: "mt-4", children: [order.items.slice(0, 3).map((item, i) => (_jsxs(Row, { className: "gap-2", children: [item.image && (_jsx(Div, { role: "img", "aria-label": item.title, className: "h-10 w-10 rounded-lg bg-center bg-cover", style: { backgroundImage: `url(${item.image})` } })), _jsxs(Div, { children: [_jsx(Text, { className: `text-sm font-medium text-neutral-900 dark:text-zinc-100 ${THEME_CONSTANTS.utilities.textClamp1}`, children: item.title }), _jsxs(Text, { className: "text-xs text-zinc-400 dark:text-zinc-400", children: ["\u00D7", item.quantity] })] })] }, i))), order.items.length > 3 && (_jsxs(Span, { size: "xs", className: "self-center text-zinc-400 dark:text-zinc-400", children: ["+", order.items.length - 3, " more"] }))] }), _jsxs(Row, { justify: "between", className: "mt-4 border-t border-neutral-100 dark:border-slate-700 pt-3", children: [_jsxs(Span, { size: "sm", className: "text-neutral-500 dark:text-zinc-400", children: [order.currency ?? "", " Total"] }), _jsx(Span, { weight: "semibold", className: "text-neutral-900 dark:text-zinc-100", children: formatCurrency(order.total, order.currency) })] })] }));
38
+ : undefined, onClick: onClick ? () => onClick(order) : undefined, className: `rounded-xl border border-neutral-200 dark:border-slate-700 bg-white dark:bg-slate-900 p-5 ${onClick ? "cursor-pointer transition hover:shadow-md" : ""}`, children: [_jsxs(Row, { wrap: true, align: "start", justify: "between", gap: "3", children: [_jsxs(Div, { children: [_jsxs(Text, { className: "text-xs text-neutral-500 dark:text-zinc-400", children: ["Order #", order.id.slice(-8).toUpperCase()] }), date && (_jsx(Text, { className: "mt-0.5 text-xs text-zinc-400 dark:text-zinc-400", children: date }))] }), _jsx(Span, { size: "xs", weight: "semibold", className: `rounded-full px-3 py-1 capitalize ${statusColor}`, children: labels[order.orderStatus] ?? order.orderStatus.replace(/_/g, " ") })] }), revealsRemaining > 0 && (_jsxs(Row, { gap: "sm", className: "mt-2", children: [_jsxs(Span, { size: "xs", weight: "semibold", className: CLS_PRIZE_BADGE, children: [revealsRemaining, " ", revealsRemaining === 1 ? "reveal" : "reveals", " pending"] }), earliestDeadline && (_jsxs(Span, { size: "xs", className: "text-zinc-500 dark:text-zinc-400", children: ["before ", new Date(earliestDeadline).toLocaleDateString(getDefaultLocale(), { month: "short", day: "numeric" })] }))] })), _jsxs(Row, { wrap: true, gap: "3", className: "mt-4", children: [order.items.slice(0, 3).map((item, i) => (_jsxs(Row, { className: "gap-2", children: [item.image && (_jsx(Div, { role: "img", "aria-label": item.title, className: "h-10 w-10 rounded-lg bg-center bg-cover",
39
+ // audit-inline-style-ok: dynamic image URL
40
+ style: { backgroundImage: `url(${item.image})` } })), _jsxs(Div, { children: [_jsx(Text, { className: `text-sm font-medium text-neutral-900 dark:text-zinc-100 ${THEME_CONSTANTS.utilities.textClamp1}`, children: item.title }), _jsxs(Text, { className: "text-xs text-zinc-400 dark:text-zinc-400", children: ["\u00D7", item.quantity] })] })] }, i))), order.items.length > 3 && (_jsxs(Span, { size: "xs", className: "self-center text-zinc-400 dark:text-zinc-400", children: ["+", order.items.length - 3, " more"] }))] }), _jsxs(Row, { justify: "between", className: "mt-4 border-t border-neutral-100 dark:border-slate-700 pt-3", children: [_jsxs(Span, { size: "sm", className: "text-neutral-500 dark:text-zinc-400", children: [order.currency ?? "", " Total"] }), _jsx(Span, { weight: "semibold", className: "text-neutral-900 dark:text-zinc-100", children: formatCurrency(order.total, order.currency) })] })] }));
39
41
  }
40
42
  export function OrdersList({ orders, isLoading, onOrderClick, totalPages = 1, currentPage = 1, onPageChange, emptyLabel = "No orders found", }) {
41
43
  if (isLoading) {
@@ -17,7 +17,7 @@ export declare function useOrder(id: string, opts?: {
17
17
  enabled?: boolean;
18
18
  endpoint?: string;
19
19
  }): {
20
- order: NoInfer<Order> | undefined;
20
+ order: Order | undefined;
21
21
  isLoading: boolean;
22
22
  error: Error | null;
23
23
  };
@@ -25,7 +25,7 @@ export declare function useTrackOrder(trackingId: string | null | undefined, opt
25
25
  enabled?: boolean;
26
26
  endpoint?: string;
27
27
  }): {
28
- trackingInfo: NonNullable<NoInfer<TrackingInfo | null>> | null;
28
+ trackingInfo: TrackingInfo | null;
29
29
  isLoading: boolean;
30
30
  error: Error | null;
31
31
  };
@@ -4,7 +4,7 @@ export declare function usePaymentSettings(opts?: {
4
4
  enabled?: boolean;
5
5
  endpoint?: string;
6
6
  }): {
7
- settings: NoInfer<PaymentSettings> | undefined;
7
+ settings: PaymentSettings | undefined;
8
8
  isLoading: boolean;
9
9
  error: Error | null;
10
10
  };
@@ -58,7 +58,7 @@ function PreOrderInfoSection({ title, productionStatus, maxPerUser, deliveryDate
58
58
  } }), (categoryName || category || brand) && (_jsxs(Row, { gap: "sm", wrap: true, children: [category && (_jsx(Link, { href: String(ROUTES.PUBLIC.CATEGORY_DETAIL(category)), className: "inline-flex items-center rounded-full border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800/50 px-2.5 py-1 text-xs font-medium text-zinc-600 dark:text-zinc-300 transition-colors hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700 dark:hover:border-primary-700/60 dark:hover:bg-primary-900/20 dark:hover:text-primary-400", children: categoryName || category })), !category && categoryName && (_jsx(Span, { size: "xs", weight: "medium", className: "inline-flex items-center rounded-full border border-zinc-100 dark:border-zinc-800 bg-zinc-50 dark:bg-zinc-800/50 px-2.5 py-1 text-zinc-500 dark:text-zinc-400", children: categoryName })), brand && brandSlug && (_jsx(Link, { href: String(ROUTES.PUBLIC.BRAND_DETAIL(brandSlug)), className: "inline-flex items-center rounded-full border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800/50 px-2.5 py-1 text-xs font-medium text-zinc-600 dark:text-zinc-300 transition-colors hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700 dark:hover:border-primary-700/60 dark:hover:bg-primary-900/20 dark:hover:text-primary-400", children: brand })), brand && !brandSlug && (_jsx(Span, { size: "xs", weight: "medium", className: "inline-flex items-center rounded-full border border-zinc-100 dark:border-zinc-800 bg-zinc-50 dark:bg-zinc-800/50 px-2.5 py-1 text-zinc-500 dark:text-zinc-400", children: brand }))] })), productFeatures && features.length > 0 && (_jsx(FeatureBadgeList, { productFeatureIds: features, features: productFeatures })), !productFeatures && features.length > 0 && (_jsxs(Div, { className: "rounded-xl border border-zinc-100 dark:border-zinc-800 bg-zinc-50 dark:bg-zinc-900/60 px-4 py-3", children: [_jsx(Text, { className: "mb-2 text-xs font-semibold uppercase tracking-wide text-zinc-500 dark:text-zinc-400", children: "About this product" }), _jsx(Ul, { className: "space-y-1.5", children: features.map((f, i) => (_jsxs(Li, { className: "flex items-start gap-2 text-sm text-zinc-700 dark:text-zinc-300", children: [_jsx(Span, { className: "mt-0.5 flex-shrink-0 text-primary-500", children: "\u2022" }), f] }, i))) })] })), descriptionHtml && (_jsx(RichText, { html: descriptionHtml, proseClass: "prose prose-sm max-w-none dark:prose-invert prose-p:my-0", className: "text-sm leading-relaxed text-zinc-600 dark:text-zinc-400 line-clamp-4" })), safeSeller && (_jsx(Div, { className: `rounded-xl border border-zinc-100 dark:border-zinc-800 bg-zinc-50 dark:bg-zinc-900/60 ${__P.p3}`, children: _jsxs(Row, { justify: "between", align: "center", children: [_jsxs(Div, { children: [_jsx(Text, { className: "text-[10px] uppercase tracking-wide text-zinc-400 dark:text-zinc-400 mb-0.5", children: "Sold by" }), _jsx(Text, { className: "text-sm font-semibold text-zinc-800 dark:text-zinc-200", children: safeSeller })] }), storeHref && (_jsx(Link, { href: storeHref, className: "shrink-0 rounded-lg bg-primary/10 dark:bg-primary/20 px-3 py-1.5 text-xs font-semibold text-primary-700 dark:text-primary-300 hover:bg-primary/20 dark:hover:bg-primary/30 transition-colors", children: "Visit Store \u2192" }))] }) }))] }));
59
59
  }
60
60
  function PreOrderBuyBarPanel({ reserveTarget, reservedCount, progressPct, productId, price, currency, depositAmount, depositPercent, isCancellable, tags, onReserveNow, }) {
61
- return (_jsxs(Div, { id: "pre-order-buy-bar", className: `rounded-xl border border-zinc-100 dark:border-zinc-800 bg-zinc-50 dark:bg-zinc-900/60 ${__P.p5} space-y-4`, children: [reserveTarget > 0 && (_jsxs(Div, { className: "space-y-2", children: [_jsxs(Row, { justify: "between", align: "center", children: [_jsxs(Text, { className: "text-xs text-zinc-500 dark:text-zinc-400", children: [reservedCount, " of ", reserveTarget, " reserved"] }), _jsxs(Span, { size: "xs", weight: "semibold", className: "text-primary-600 dark:text-primary-400", children: [progressPct, "%"] })] }), _jsx(Div, { className: `h-2 w-full ${__O.hidden} rounded-full bg-zinc-200 dark:bg-zinc-700`, children: _jsx(Div, { className: "h-full rounded-full bg-primary transition-all", style: { width: `${progressPct}%` } }) })] })), onReserveNow ? (_jsx(PreOrderActionsClient, { productId: productId, price: price, currency: currency, depositAmount: depositAmount, depositPercent: depositPercent, isCancellable: isCancellable, tags: tags, onReserveNow: onReserveNow })) : (_jsxs(_Fragment, { children: [price !== null && (_jsxs(Div, { children: [_jsx(Text, { className: "text-2xl font-bold text-zinc-900 dark:text-zinc-50", children: formatCurrency(price, currency) }), depositAmount !== null && (_jsxs(Text, { className: "mt-0.5 text-xs text-zinc-500 dark:text-zinc-400", children: ["Reserve with ", formatCurrency(depositAmount, currency), depositPercent !== null ? ` (${depositPercent}% deposit)` : ""] }))] })), _jsxs(Stack, { gap: "sm", children: [_jsx(Button, { variant: "primary", size: "md", className: "w-full", children: "Reserve Now" }), isCancellable && (_jsx(Text, { className: "text-center text-xs text-zinc-500 dark:text-zinc-400", children: "\u2713 Free cancellation before production" }))] }), tags.length > 0 && (_jsx(Div, { className: "border-t border-zinc-200 dark:border-zinc-700 pt-4", children: _jsx(Row, { wrap: true, gap: "xs", children: tags.map((tag) => (_jsx(Span, { size: "xs", className: "rounded-full bg-zinc-100 dark:bg-zinc-800 px-2.5 py-1 text-zinc-600 dark:text-zinc-300", children: tag }, tag))) }) })), _jsx(Div, { className: "border-t border-zinc-200 dark:border-zinc-700 pt-4", children: _jsx(Row, { wrap: true, gap: "sm", justify: "center", className: "text-center", children: [
61
+ return (_jsxs(Div, { id: "pre-order-buy-bar", className: `rounded-xl border border-zinc-100 dark:border-zinc-800 bg-zinc-50 dark:bg-zinc-900/60 ${__P.p5} space-y-4`, children: [reserveTarget > 0 && (_jsxs(Div, { className: "space-y-2", children: [_jsxs(Row, { justify: "between", align: "center", children: [_jsxs(Text, { className: "text-xs text-zinc-500 dark:text-zinc-400", children: [reservedCount, " of ", reserveTarget, " reserved"] }), _jsxs(Span, { size: "xs", weight: "semibold", className: "text-primary-600 dark:text-primary-400", children: [progressPct, "%"] })] }), _jsxs(Div, { className: `h-2 w-full ${__O.hidden} rounded-full bg-zinc-200 dark:bg-zinc-700`, children: ["// audit-inline-style-ok: computed percentage", _jsx(Div, { className: "h-full rounded-full bg-primary transition-all", style: { width: `${progressPct}%` } })] })] })), onReserveNow ? (_jsx(PreOrderActionsClient, { productId: productId, price: price, currency: currency, depositAmount: depositAmount, depositPercent: depositPercent, isCancellable: isCancellable, tags: tags, onReserveNow: onReserveNow })) : (_jsxs(_Fragment, { children: [price !== null && (_jsxs(Div, { children: [_jsx(Text, { className: "text-2xl font-bold text-zinc-900 dark:text-zinc-50", children: formatCurrency(price, currency) }), depositAmount !== null && (_jsxs(Text, { className: "mt-0.5 text-xs text-zinc-500 dark:text-zinc-400", children: ["Reserve with ", formatCurrency(depositAmount, currency), depositPercent !== null ? ` (${depositPercent}% deposit)` : ""] }))] })), _jsxs(Stack, { gap: "sm", children: [_jsx(Button, { variant: "primary", size: "md", className: "w-full", children: "Reserve Now" }), isCancellable && (_jsx(Text, { className: "text-center text-xs text-zinc-500 dark:text-zinc-400", children: "\u2713 Free cancellation before production" }))] }), tags.length > 0 && (_jsx(Div, { className: "border-t border-zinc-200 dark:border-zinc-700 pt-4", children: _jsx(Row, { wrap: true, gap: "xs", children: tags.map((tag) => (_jsx(Span, { size: "xs", className: "rounded-full bg-zinc-100 dark:bg-zinc-800 px-2.5 py-1 text-zinc-600 dark:text-zinc-300", children: tag }, tag))) }) })), _jsx(Div, { className: "border-t border-zinc-200 dark:border-zinc-700 pt-4", children: _jsx(Row, { wrap: true, gap: "sm", justify: "center", className: "text-center", children: [
62
62
  { icon: "🔒", label: "Secure\nPayment" },
63
63
  { icon: "📅", label: "Guaranteed\nDelivery" },
64
64
  { icon: "↩", label: "Free\nCancellation" },