@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,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { sieveFilter, sieveAnd, SIEVE_OP } from "@mohasinac/appkit";
2
3
  import { productRepository } from "../../../repositories";
3
4
  import { parseListingSearchParams } from "../../../utils/listing-params";
4
5
  import { getStoreBySlug } from "./StoreDetailLayoutView";
@@ -18,7 +19,7 @@ export async function StoreProductsPageView({ storeSlug, searchParams, }) {
18
19
  const pageSize = std.pageSize ?? DEFAULT_PAGE_SIZE;
19
20
  const result = await productRepository
20
21
  .list({
21
- filters: `storeId==${storeId},status==published,listingType==standard`,
22
+ filters: sieveAnd(sieveFilter("storeId", SIEVE_OP.EQ, storeId), sieveFilter("status", SIEVE_OP.EQ, "published"), sieveFilter("listingType", SIEVE_OP.EQ, "standard")),
22
23
  sorts,
23
24
  page,
24
25
  pageSize,
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { sortBy } from "@mohasinac/appkit";
3
4
  import { useState } from "react";
4
5
  import { Div, Heading, Input, Select, SlottedListingView } from "../../../ui";
5
6
  export function StoreProductsView({ storeSlug, labels = {}, renderProducts, renderSearch, renderSort, renderFilters, renderActiveFilters, renderViewToggle, renderPagination, items = [], total = 0, isLoading = false, className = "", }) {
@@ -8,9 +9,9 @@ export function StoreProductsView({ storeSlug, labels = {}, renderProducts, rend
8
9
  const [viewMode, setViewMode] = useState("grid");
9
10
  void storeSlug;
10
11
  return (_jsx(Div, { className: `py-4 ${className}`, children: _jsx(SlottedListingView, { portal: "public", inlineToolbar: true, className: "space-y-4", renderHeader: () => labels.title ? (_jsx(Heading, { level: 2, className: "mb-1 text-xl font-semibold", children: labels.title })) : null, renderSearch: () => renderSearch?.(search, setSearch) ?? (_jsx(Input, { value: search, onChange: (event) => setSearch(event.target.value), placeholder: "Search store products", className: "max-w-sm" })), renderSort: () => renderSort?.(sort, setSort) ?? (_jsx(Select, { value: sort, onValueChange: setSort, options: [
11
- { value: "-createdAt", label: "Newest" },
12
- { value: "createdAt", label: "Oldest" },
13
- { value: "price", label: "Price: Low to High" },
14
- { value: "-price", label: "Price: High to Low" },
12
+ { value: sortBy("createdAt", "DESC"), label: "Newest" },
13
+ { value: sortBy("createdAt", "ASC"), label: "Oldest" },
14
+ { value: sortBy("price", "ASC"), label: "Price: Low to High" },
15
+ { value: sortBy("price", "DESC"), label: "Price: High to Low" },
15
16
  ], className: "min-w-44" })), renderFilters: renderFilters, renderActiveFilters: renderActiveFilters, renderBulkActions: () => renderViewToggle?.(viewMode, setViewMode) ?? null, renderTable: () => renderProducts(items, isLoading), renderPagination: () => renderPagination?.(total) ?? null, total: total, isLoading: isLoading }) }));
16
17
  }
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { sieveFilter, SIEVE_OP } from "@mohasinac/appkit";
3
4
  import { useState, useCallback, useMemo } from "react";
4
5
  import { useUrlTable } from "../../../react/hooks/useUrlTable";
5
6
  import { useStores } from "../hooks/useStores";
@@ -103,12 +104,12 @@ export function StoresIndexListing({ initialData }) {
103
104
  if (ratingRaw) {
104
105
  const ratings = ratingRaw.split("|").filter(Boolean);
105
106
  if (ratings.length === 1)
106
- filterParts.push(`averageRating>=${ratings[0]}`);
107
+ filterParts.push(sieveFilter("averageRating", SIEVE_OP.GTE, ratings[0]));
107
108
  }
108
109
  if (minProductCount)
109
- filterParts.push(`stats.totalProducts>=${minProductCount}`);
110
+ filterParts.push(sieveFilter("stats.totalProducts", SIEVE_OP.GTE, minProductCount));
110
111
  if (maxProductCount)
111
- filterParts.push(`stats.totalProducts<=${maxProductCount}`);
112
+ filterParts.push(sieveFilter("stats.totalProducts", SIEVE_OP.LTE, maxProductCount));
112
113
  if (featured === "true")
113
114
  filterParts.push("isFeatured==true");
114
115
  const { stores, totalPages, isLoading } = useStores({
@@ -16,7 +16,7 @@ export declare function useStoreAddressSelector(options?: {
16
16
  }): {
17
17
  addresses: SavedAddress[];
18
18
  isLoading: boolean;
19
- refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<SavedAddress[]>, Error>>;
19
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<SavedAddress[], Error>>;
20
20
  createAddress: import("@tanstack/react-query").UseMutateFunction<CreateAddressApiResponse, Error, AddressFormData, unknown>;
21
21
  isSaving: boolean;
22
22
  };
@@ -12,16 +12,16 @@ export declare function useStores(params?: StoreListParams, opts?: UseStoresOpti
12
12
  hasMore: boolean;
13
13
  isLoading: false;
14
14
  error: string | null;
15
- refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<StoreListResponse>, Error>>;
15
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<StoreListResponse, Error>>;
16
16
  };
17
17
  export declare function useStoreBySlug(storeSlug: string, opts?: {
18
18
  enabled?: boolean;
19
19
  endpoint?: string;
20
20
  }): {
21
- store: NonNullable<NoInfer<StoreDetail | null>> | null;
21
+ store: StoreDetail | null;
22
22
  isLoading: boolean;
23
23
  error: string | null;
24
- refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<StoreDetail | null>, Error>>;
24
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<StoreDetail | null, Error>>;
25
25
  };
26
26
  export declare function useStoreProducts(storeSlug: string, params?: string, opts?: {
27
27
  enabled?: boolean;
@@ -32,7 +32,7 @@ export declare function useStoreProducts(storeSlug: string, params?: string, opt
32
32
  totalPages: number;
33
33
  isLoading: boolean;
34
34
  error: string | null;
35
- refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<StoreProductsResponse>, Error>>;
35
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<StoreProductsResponse, Error>>;
36
36
  };
37
37
  export declare function useStoreAuctions(storeSlug: string, params?: string, opts?: {
38
38
  enabled?: boolean;
@@ -43,7 +43,7 @@ export declare function useStoreAuctions(storeSlug: string, params?: string, opt
43
43
  totalPages: number;
44
44
  isLoading: boolean;
45
45
  error: string | null;
46
- refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<StoreAuctionsResponse>, Error>>;
46
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<StoreAuctionsResponse, Error>>;
47
47
  };
48
48
  export declare function useStoreReviews(storeSlug: string, params?: {
49
49
  rating?: number;
@@ -66,6 +66,6 @@ export declare function useStoreReviews(storeSlug: string, params?: {
66
66
  ratingDistribution: Record<number, number>;
67
67
  isLoading: boolean;
68
68
  error: string | null;
69
- refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<StoreReviewsData>, Error>>;
69
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<StoreReviewsData, Error>>;
70
70
  };
71
71
  export {};
@@ -6,7 +6,9 @@ const CLS_REMOVE_BTN = "self-start text-zinc-400 dark:text-zinc-400 transition h
6
6
  export function WishlistCard({ item, onRemove, onProductClick, }) {
7
7
  return (_jsxs(Div, { surface: "card", padding: "sm", className: "flex gap-4", children: [_jsx(Div, { role: onProductClick ? "button" : undefined, tabIndex: onProductClick ? 0 : undefined, onClick: onProductClick ? () => onProductClick(item) : undefined, onKeyDown: onProductClick
8
8
  ? (e) => e.key === "Enter" && onProductClick(item)
9
- : undefined, className: `h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-neutral-100 dark:bg-slate-800 ${onProductClick ? "cursor-pointer" : ""}`, 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(Div, { className: "flex flex-1 flex-col justify-between", children: [_jsx(Text, { className: `font-medium text-neutral-900 dark:text-zinc-100 ${THEME_CONSTANTS.utilities.textClamp2}`, children: item.productTitle }), item.productPrice !== undefined && (_jsx(Text, { className: "text-sm font-semibold text-neutral-900 dark:text-zinc-100", 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
+ : undefined, className: `h-20 w-20 flex-shrink-0 overflow-hidden rounded-lg bg-neutral-100 dark:bg-slate-800 ${onProductClick ? "cursor-pointer" : ""}`, children: item.productImage && (_jsx(Div, { role: "img", "aria-label": item.productTitle ?? "", className: "h-full w-full bg-center bg-cover",
10
+ // audit-inline-style-ok: dynamic image URL
11
+ style: { backgroundImage: `url(${item.productImage})` } })) }), _jsxs(Div, { className: "flex flex-1 flex-col justify-between", children: [_jsx(Text, { className: `font-medium text-neutral-900 dark:text-zinc-100 ${THEME_CONSTANTS.utilities.textClamp2}`, children: item.productTitle }), item.productPrice !== undefined && (_jsx(Text, { className: "text-sm font-semibold text-neutral-900 dark:text-zinc-100", 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" }))] }));
10
12
  }
11
13
  export function WishlistPage({ items, isLoading, onRemove, onProductClick, emptyLabel = "Your wishlist is empty", }) {
12
14
  if (isLoading) {
@@ -1,14 +1,15 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { sortBy } from "@mohasinac/appkit";
3
4
  import React from "react";
4
5
  import { Div, Heading, Row, Text } from "../../../ui";
5
6
  import { useUrlTable } from "../../../react/hooks/useUrlTable";
6
7
  import { useWishlist } from "../hooks/useWishlist";
7
8
  const WISHLIST_SORT_OPTIONS = [
8
- { value: "-addedAt", label: "Newest first" },
9
+ { value: sortBy("addedAt", "DESC"), label: "Newest first" },
9
10
  { value: "addedAt", label: "Oldest first" },
10
- { value: "-price", label: "Price: high → low" },
11
- { value: "price", label: "Price: low → high" },
11
+ { value: sortBy("price", "DESC"), label: "Price: high → low" },
12
+ { value: sortBy("price", "ASC"), label: "Price: low → high" },
12
13
  ];
13
14
  export function WishlistView({ userId, initialData, labels = {}, renderTabs, renderSearch, renderSort, renderViewToggle, renderProducts, renderTabPlaceholder, renderBulkActions, renderPagination, className = "", }) {
14
15
  const table = useUrlTable({ defaults: { sort: "-addedAt", view: "card" } });
@@ -17,7 +17,7 @@ interface UseUserWishlistOptions<TProduct> {
17
17
  }
18
18
  export declare function useUserWishlist<TProduct = unknown>(options?: UseUserWishlistOptions<TProduct>): {
19
19
  total: number;
20
- data: NoInfer<UserWishlistResponse<TProduct>>;
20
+ data: UserWishlistResponse<TProduct>;
21
21
  error: Error;
22
22
  isError: true;
23
23
  isPending: false;
@@ -40,12 +40,12 @@ export declare function useUserWishlist<TProduct = unknown>(options?: UseUserWis
40
40
  isRefetching: boolean;
41
41
  isStale: boolean;
42
42
  isEnabled: boolean;
43
- refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<UserWishlistResponse<TProduct>>, Error>>;
43
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<UserWishlistResponse<TProduct>, Error>>;
44
44
  fetchStatus: import("@tanstack/query-core").FetchStatus;
45
- promise: Promise<NoInfer<UserWishlistResponse<TProduct>>>;
45
+ promise: Promise<UserWishlistResponse<TProduct>>;
46
46
  } | {
47
47
  total: number;
48
- data: NoInfer<UserWishlistResponse<TProduct>>;
48
+ data: UserWishlistResponse<TProduct>;
49
49
  error: null;
50
50
  isError: false;
51
51
  isPending: false;
@@ -68,9 +68,9 @@ export declare function useUserWishlist<TProduct = unknown>(options?: UseUserWis
68
68
  isRefetching: boolean;
69
69
  isStale: boolean;
70
70
  isEnabled: boolean;
71
- refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<UserWishlistResponse<TProduct>>, Error>>;
71
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<UserWishlistResponse<TProduct>, Error>>;
72
72
  fetchStatus: import("@tanstack/query-core").FetchStatus;
73
- promise: Promise<NoInfer<UserWishlistResponse<TProduct>>>;
73
+ promise: Promise<UserWishlistResponse<TProduct>>;
74
74
  } | {
75
75
  total: number;
76
76
  data: undefined;
@@ -96,9 +96,9 @@ export declare function useUserWishlist<TProduct = unknown>(options?: UseUserWis
96
96
  isRefetching: boolean;
97
97
  isStale: boolean;
98
98
  isEnabled: boolean;
99
- refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<UserWishlistResponse<TProduct>>, Error>>;
99
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<UserWishlistResponse<TProduct>, Error>>;
100
100
  fetchStatus: import("@tanstack/query-core").FetchStatus;
101
- promise: Promise<NoInfer<UserWishlistResponse<TProduct>>>;
101
+ promise: Promise<UserWishlistResponse<TProduct>>;
102
102
  } | {
103
103
  total: number;
104
104
  data: undefined;
@@ -124,9 +124,9 @@ export declare function useUserWishlist<TProduct = unknown>(options?: UseUserWis
124
124
  isRefetching: boolean;
125
125
  isStale: boolean;
126
126
  isEnabled: boolean;
127
- refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<UserWishlistResponse<TProduct>>, Error>>;
127
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<UserWishlistResponse<TProduct>, Error>>;
128
128
  fetchStatus: import("@tanstack/query-core").FetchStatus;
129
- promise: Promise<NoInfer<UserWishlistResponse<TProduct>>>;
129
+ promise: Promise<UserWishlistResponse<TProduct>>;
130
130
  } | {
131
131
  total: number;
132
132
  data: undefined;
@@ -152,12 +152,12 @@ export declare function useUserWishlist<TProduct = unknown>(options?: UseUserWis
152
152
  isRefetching: boolean;
153
153
  isStale: boolean;
154
154
  isEnabled: boolean;
155
- refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<UserWishlistResponse<TProduct>>, Error>>;
155
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<UserWishlistResponse<TProduct>, Error>>;
156
156
  fetchStatus: import("@tanstack/query-core").FetchStatus;
157
- promise: Promise<NoInfer<UserWishlistResponse<TProduct>>>;
157
+ promise: Promise<UserWishlistResponse<TProduct>>;
158
158
  } | {
159
159
  total: number;
160
- data: NoInfer<UserWishlistResponse<TProduct>>;
160
+ data: UserWishlistResponse<TProduct>;
161
161
  isError: false;
162
162
  error: null;
163
163
  isPending: false;
@@ -180,8 +180,8 @@ export declare function useUserWishlist<TProduct = unknown>(options?: UseUserWis
180
180
  isRefetching: boolean;
181
181
  isStale: boolean;
182
182
  isEnabled: boolean;
183
- refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<UserWishlistResponse<TProduct>>, Error>>;
183
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<UserWishlistResponse<TProduct>, Error>>;
184
184
  fetchStatus: import("@tanstack/query-core").FetchStatus;
185
- promise: Promise<NoInfer<UserWishlistResponse<TProduct>>>;
185
+ promise: Promise<UserWishlistResponse<TProduct>>;
186
186
  };
187
187
  export {};
@@ -11,6 +11,6 @@ export declare function useWishlist(userId: string, opts?: UseWishlistOptions):
11
11
  isWishlisted: (productId: string) => boolean;
12
12
  isLoading: boolean;
13
13
  error: Error | null;
14
- refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<WishlistResponse>, Error>>;
14
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<WishlistResponse, Error>>;
15
15
  };
16
16
  export {};
@@ -17,7 +17,7 @@ export declare function useWishlistWithGuest(userId: string | null | undefined,
17
17
  isWishlisted: (productId: string) => boolean;
18
18
  isLoading: boolean;
19
19
  error: Error | null;
20
- refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<WishlistResponse>, Error>>;
20
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<WishlistResponse, Error>>;
21
21
  isGuest: boolean;
22
22
  guestWishlist?: undefined;
23
23
  } | {
@@ -8,7 +8,6 @@ function nodeCwd() { return module.require("process").cwd(); }
8
8
  // Lazy loaders — prevents webpack from bundling firebase-admin into browser chunks.
9
9
  // (module as any).require() is used because webpack's static analysis does NOT trace
10
10
  // module.require() calls, unlike calls to the literal `require` or aliased `require`.
11
- /* eslint-disable @typescript-eslint/no-require-imports */
12
11
  /* eslint-disable @typescript-eslint/no-explicit-any */
13
12
  function loadApp() {
14
13
  return module.require("firebase-admin/app");
@@ -134,7 +134,9 @@ pageSize: pageSizeProp, stickyHeader: stickyHeaderProp, striped: stripedProp, sh
134
134
  ? "ascending"
135
135
  : "descending"
136
136
  : "none"
137
- : undefined, className: `appkit-data-table__th ${col.sortable ? "appkit-data-table__th--sortable" : ""}`, style: { width: col.width }, onClick: () => col.sortable && handleSort(col.key), children: _jsxs(Row, { gap: "sm", children: [col.header, col.sortable && (_jsx(Span, { className: "text-zinc-400 dark:text-zinc-400", "aria-hidden": "true", children: sortKey === col.key ? (sortDirection === "asc" ? ("↑") : ("↓")) : (_jsx(Span, { className: "opacity-30", children: "\u2195" })) }))] }) }, col.key))), actions && (_jsx("th", { scope: "col", className: "appkit-data-table__th appkit-data-table__td--actions", children: labelActions }))] }) }), _jsx("tbody", { className: "appkit-data-table__tbody divide-y divide-zinc-200 dark:divide-slate-700", children: paginatedData.map((item, index) => (_jsxs("tr", { className: [
137
+ : undefined, className: `appkit-data-table__th ${col.sortable ? "appkit-data-table__th--sortable" : ""}`,
138
+ // audit-inline-style-ok: dynamic CSS
139
+ style: { width: col.width }, onClick: () => col.sortable && handleSort(col.key), children: _jsxs(Row, { gap: "sm", children: [col.header, col.sortable && (_jsx(Span, { className: "text-zinc-400 dark:text-zinc-400", "aria-hidden": "true", children: sortKey === col.key ? (sortDirection === "asc" ? ("↑") : ("↓")) : (_jsx(Span, { className: "opacity-30", children: "\u2195" })) }))] }) }, col.key))), actions && (_jsx("th", { scope: "col", className: "appkit-data-table__th appkit-data-table__td--actions", children: labelActions }))] }) }), _jsx("tbody", { className: "appkit-data-table__tbody divide-y divide-zinc-200 dark:divide-slate-700", children: paginatedData.map((item, index) => (_jsxs("tr", { className: [
138
140
  "appkit-data-table__row",
139
141
  striped && index % 2 === 1
140
142
  ? "appkit-data-table__row--striped"
@@ -159,7 +161,9 @@ function DataTableTableView({ columns, paginatedData, keyExtractor, selectable,
159
161
  ? sortKey === col.key
160
162
  ? sortDirection === "asc" ? "ascending" : "descending"
161
163
  : "none"
162
- : undefined, className: `appkit-data-table__th ${col.sortable ? "appkit-data-table__th--sortable" : ""}`, style: { width: col.width }, onClick: () => col.sortable && onSort(col.key), children: _jsxs(Row, { gap: "sm", children: [col.header, col.sortable && (_jsx(Span, { className: "text-zinc-400 dark:text-zinc-400", "aria-hidden": "true", children: sortKey === col.key ? (sortDirection === "asc" ? "↑" : "↓") : _jsx(Span, { className: "opacity-30", children: "\u2195" }) }))] }) }, col.key))), actions && (_jsx("th", { scope: "col", className: "appkit-data-table__th appkit-data-table__td--actions", children: labelActions }))] }) }), _jsx("tbody", { className: "appkit-data-table__tbody divide-y divide-zinc-200 dark:divide-slate-700", children: paginatedData.map((item, index) => (_jsxs("tr", { className: [
164
+ : undefined, className: `appkit-data-table__th ${col.sortable ? "appkit-data-table__th--sortable" : ""}`,
165
+ // audit-inline-style-ok: dynamic CSS
166
+ style: { width: col.width }, onClick: () => col.sortable && onSort(col.key), children: _jsxs(Row, { gap: "sm", children: [col.header, col.sortable && (_jsx(Span, { className: "text-zinc-400 dark:text-zinc-400", "aria-hidden": "true", children: sortKey === col.key ? (sortDirection === "asc" ? "↑" : "↓") : _jsx(Span, { className: "opacity-30", children: "\u2195" }) }))] }) }, col.key))), actions && (_jsx("th", { scope: "col", className: "appkit-data-table__th appkit-data-table__td--actions", children: labelActions }))] }) }), _jsx("tbody", { className: "appkit-data-table__tbody divide-y divide-zinc-200 dark:divide-slate-700", children: paginatedData.map((item, index) => (_jsxs("tr", { className: [
163
167
  "appkit-data-table__row",
164
168
  striped && index % 2 === 1 ? "appkit-data-table__row--striped" : "",
165
169
  onRowClick ? "appkit-data-table__row--clickable" : "",
@@ -44,7 +44,9 @@ export function AvatarDisplay({ cropData, size = "md", className = "", alt = "Pr
44
44
  className,
45
45
  ]
46
46
  .filter(Boolean)
47
- .join(" "), "data-section": "avatardisplay-div-455", children: _jsx("div", { className: UI_AVATAR_DISPLAY.imageInner, style: {
47
+ .join(" "), "data-section": "avatardisplay-div-455", children: _jsx("div", { className: UI_AVATAR_DISPLAY.imageInner,
48
+ // audit-inline-style-ok: dynamic CSS
49
+ style: {
48
50
  backgroundImage: `url(${cropData.url})`,
49
51
  backgroundSize: "cover",
50
52
  width: `${(cropData.zoom || 1) * 100}%`,
@@ -36,7 +36,9 @@ export function BackgroundRenderer({ mode, lightMode, darkMode, }) {
36
36
  opacity: config.overlay.opacity,
37
37
  }
38
38
  : { display: "none" };
39
- return (_jsxs(_Fragment, { children: [_jsx("div", { className: "appkit-bg-renderer", style: getBackgroundStyle(), "data-section": "backgroundrenderer-div-456", children: config.type === "video" && (_jsxs("video", { ref: videoRef, autoPlay: true, loop: true, muted: true, playsInline: true, onLoadedData: () => setIsVideoLoaded(true), className: `appkit-bg-renderer__video ${isVideoLoaded
39
+ return (_jsxs(_Fragment, { children: ["// audit-inline-style-ok: computed style fn", _jsx("div", { className: "appkit-bg-renderer", style: getBackgroundStyle(), "data-section": "backgroundrenderer-div-456", children: config.type === "video" && (_jsxs("video", { ref: videoRef, autoPlay: true, loop: true, muted: true, playsInline: true, onLoadedData: () => setIsVideoLoaded(true), className: `appkit-bg-renderer__video ${isVideoLoaded
40
40
  ? "appkit-bg-renderer__video--loaded"
41
- : "appkit-bg-renderer__video--loading"}`, children: [_jsx("source", { src: config.value, type: "video/mp4" }), "Your browser does not support the video tag."] })) }), _jsx("div", { className: "appkit-bg-renderer__overlay", style: overlayStyle })] }));
41
+ : "appkit-bg-renderer__video--loading"}`, children: [_jsx("source", { src: config.value, type: "video/mp4" }), "Your browser does not support the video tag."] })) })
42
+ // audit-inline-style-ok: pass-through style prop
43
+ , "// audit-inline-style-ok: pass-through style prop", _jsx("div", { className: "appkit-bg-renderer__overlay", style: overlayStyle })] }));
42
44
  }
@@ -53,9 +53,13 @@ export function Card({ children, variant = "flat", padding = "md", hover = false
53
53
  const whileTap = animate === "pressScale" || animate === "both"
54
54
  ? { scale: 0.97 }
55
55
  : undefined;
56
- return (_jsx(motion.div, { className: cls, style: style, onClick: onClick, whileHover: whileHover, whileTap: whileTap, transition: SPRING_SNAPPY, "data-section": "card-div-463", children: children }));
56
+ return (_jsx(motion.div, { className: cls,
57
+ // audit-inline-style-ok: pass-through style prop
58
+ style: style, onClick: onClick, whileHover: whileHover, whileTap: whileTap, transition: SPRING_SNAPPY, "data-section": "card-div-463", children: children }));
57
59
  }
58
- return (_jsx("div", { className: cls, style: style, onClick: onClick, "data-section": "card-div-463", children: children }));
60
+ return (_jsx("div", { className: cls,
61
+ // audit-inline-style-ok: pass-through style prop
62
+ style: style, onClick: onClick, "data-section": "card-div-463", children: children }));
59
63
  }
60
64
  export function CardHeader({ children, className = "" }) {
61
65
  return (_jsx("div", { className: ["appkit-card__header", className].filter(Boolean).join(" "), "data-section": "card-div-464", children: children }));
@@ -91,7 +91,9 @@ export default function ImageGallery({ images, initialIndex = 0, showThumbnails
91
91
  if (images.length === 0) {
92
92
  return (_jsx("div", { className: `appkit-image-gallery ${flex.center} p-8 ${themed.bgTertiary} rounded-lg ${className}`, "data-section": "imagegallery-div-515", children: _jsx(Text, { className: themed.textMuted, children: "No images to display" }) }));
93
93
  }
94
- return (_jsxs("div", { className: `appkit-image-gallery ${className}`, "data-section": "imagegallery-div-516", children: [_jsxs("div", { ref: imageContainerRef, className: `appkit-image-gallery__viewport ${themed.bgSecondary}`, "data-section": "imagegallery-div-517", children: [_jsxs("div", { className: "appkit-image-gallery__image-frame", "data-section": "imagegallery-div-518", children: [_jsx("div", { role: "img", "aria-label": currentImage.alt, className: "appkit-image-gallery__image", style: {
94
+ return (_jsxs("div", { className: `appkit-image-gallery ${className}`, "data-section": "imagegallery-div-516", children: [_jsxs("div", { ref: imageContainerRef, className: `appkit-image-gallery__viewport ${themed.bgSecondary}`, "data-section": "imagegallery-div-517", children: [_jsxs("div", { className: "appkit-image-gallery__image-frame", "data-section": "imagegallery-div-518", children: [_jsx("div", { role: "img", "aria-label": currentImage.alt, className: "appkit-image-gallery__image",
95
+ // audit-inline-style-ok: dynamic CSS
96
+ style: {
95
97
  backgroundImage: `url(${currentImage.src})`,
96
98
  transform: `scale(${scale})`,
97
99
  cursor: allowZoom
@@ -89,7 +89,9 @@ export function ImageLightbox({ images, activeIndex, onClose, onNavigate, showTh
89
89
  const image = images[currentIndex];
90
90
  const hasMultiple = images.length > 1;
91
91
  const iconBtnClass = "w-10 h-10 p-0 !min-h-0 rounded-full bg-white/15 hover:bg-white/30 text-white flex items-center justify-center";
92
- return createPortal(_jsxs("div", { ref: overlayRef, tabIndex: -1, className: "appkit-lightbox", role: "dialog", "aria-modal": "true", "aria-label": "Image lightbox", onKeyDown: handleKeyDown, onWheel: handleWheel, children: [_jsxs("div", { className: "absolute top-0 left-0 right-0 z-10 flex items-center justify-between px-4 py-3 bg-gradient-to-b from-black/60 to-transparent", children: [_jsx(Span, { size: "sm", weight: "medium", className: "text-white/70", children: hasMultiple ? `${currentIndex + 1} / ${images.length}` : "" }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Button, { variant: "ghost", size: "sm", type: "button", onClick: () => adjustZoom(-ZOOM_STEP), className: iconBtnClass, "aria-label": "Zoom out", disabled: zoom <= MIN_ZOOM, children: _jsx(ZoomOut, { className: "w-4 h-4" }) }), _jsxs("button", { type: "button", onClick: () => { setZoom(100); setRotation(0); }, className: "text-white/70 hover:text-white text-xs font-mono min-w-[3rem] text-center", "aria-label": "Reset zoom", children: [zoom, "%"] }), _jsx(Button, { variant: "ghost", size: "sm", type: "button", onClick: () => adjustZoom(ZOOM_STEP), className: iconBtnClass, "aria-label": "Zoom in", disabled: zoom >= MAX_ZOOM, children: _jsx(ZoomIn, { className: "w-4 h-4" }) }), _jsx(Button, { variant: "ghost", size: "sm", type: "button", onClick: () => setRotation((r) => (r + 90) % 360), className: iconBtnClass, "aria-label": "Rotate 90\u00B0", children: _jsx(RotateCw, { className: "w-4 h-4" }) }), _jsx(Button, { variant: "ghost", size: "sm", type: "button", onClick: () => { setZoom(100); setRotation(0); }, className: iconBtnClass, "aria-label": "Reset", children: _jsx(Maximize2, { className: "w-4 h-4" }) }), _jsx(Button, { variant: "ghost", size: "sm", type: "button", onClick: onClose, className: CLS_CLOSE_BTN, "aria-label": "Close lightbox", children: _jsx(X, { className: "w-5 h-5" }) })] })] }), hasMultiple && (_jsx(Button, { variant: "ghost", size: "sm", type: "button", onClick: () => navigate(-1), className: "absolute left-4 top-1/2 -translate-y-1/2 w-12 h-12 p-0 !min-h-0 rounded-full bg-white/15 hover:bg-white/30 text-white z-10 flex items-center justify-center", "aria-label": "Previous image", children: _jsx(ChevronLeft, { className: "w-7 h-7" }) })), _jsxs("div", { className: "appkit-lightbox__image-wrap", style: { cursor: zoom > 100 ? "grab" : "default" }, children: [_jsx("img", { src: image.src, alt: image.alt ?? "", className: "appkit-lightbox__img", draggable: false, style: {
92
+ return createPortal(_jsxs("div", { ref: overlayRef, tabIndex: -1, className: "appkit-lightbox", role: "dialog", "aria-modal": "true", "aria-label": "Image lightbox", onKeyDown: handleKeyDown, onWheel: handleWheel, children: [_jsxs("div", { className: "absolute top-0 left-0 right-0 z-10 flex items-center justify-between px-4 py-3 bg-gradient-to-b from-black/60 to-transparent", children: [_jsx(Span, { size: "sm", weight: "medium", className: "text-white/70", children: hasMultiple ? `${currentIndex + 1} / ${images.length}` : "" }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Button, { variant: "ghost", size: "sm", type: "button", onClick: () => adjustZoom(-ZOOM_STEP), className: iconBtnClass, "aria-label": "Zoom out", disabled: zoom <= MIN_ZOOM, children: _jsx(ZoomOut, { className: "w-4 h-4" }) }), _jsxs("button", { type: "button", onClick: () => { setZoom(100); setRotation(0); }, className: "text-white/70 hover:text-white text-xs font-mono min-w-[3rem] text-center", "aria-label": "Reset zoom", children: [zoom, "%"] }), _jsx(Button, { variant: "ghost", size: "sm", type: "button", onClick: () => adjustZoom(ZOOM_STEP), className: iconBtnClass, "aria-label": "Zoom in", disabled: zoom >= MAX_ZOOM, children: _jsx(ZoomIn, { className: "w-4 h-4" }) }), _jsx(Button, { variant: "ghost", size: "sm", type: "button", onClick: () => setRotation((r) => (r + 90) % 360), className: iconBtnClass, "aria-label": "Rotate 90\u00B0", children: _jsx(RotateCw, { className: "w-4 h-4" }) }), _jsx(Button, { variant: "ghost", size: "sm", type: "button", onClick: () => { setZoom(100); setRotation(0); }, className: iconBtnClass, "aria-label": "Reset", children: _jsx(Maximize2, { className: "w-4 h-4" }) }), _jsx(Button, { variant: "ghost", size: "sm", type: "button", onClick: onClose, className: CLS_CLOSE_BTN, "aria-label": "Close lightbox", children: _jsx(X, { className: "w-5 h-5" }) })] })] }), hasMultiple && (_jsx(Button, { variant: "ghost", size: "sm", type: "button", onClick: () => navigate(-1), className: "absolute left-4 top-1/2 -translate-y-1/2 w-12 h-12 p-0 !min-h-0 rounded-full bg-white/15 hover:bg-white/30 text-white z-10 flex items-center justify-center", "aria-label": "Previous image", children: _jsx(ChevronLeft, { className: "w-7 h-7" }) })), "// audit-inline-style-ok: dynamic CSS", _jsxs("div", { className: "appkit-lightbox__image-wrap", style: { cursor: zoom > 100 ? "grab" : "default" }, children: [_jsx("img", { src: image.src, alt: image.alt ?? "", className: "appkit-lightbox__img", draggable: false,
93
+ // audit-inline-style-ok: dynamic CSS
94
+ style: {
93
95
  transform: `scale(${zoom / 100}) rotate(${rotation}deg)`,
94
96
  transition: "transform 0.2s ease",
95
97
  } }), image.badge && (_jsx(Div, { className: "absolute left-3 top-3 rounded bg-black/70 px-2 py-1 text-xs font-semibold text-white pointer-events-none", children: image.badge }))] }), (image.caption || image.sub) && (_jsxs("div", { className: "flex-shrink-0 text-center px-8 pb-2", children: [image.caption && (_jsx(Text, { size: "sm", variant: "secondary", className: "!text-white/80", children: image.caption })), image.sub && (_jsx(Text, { size: "sm", variant: "secondary", className: "!text-white/50", children: image.sub }))] })), showThumbnails && images.length > 1 && (_jsx("div", { className: "flex-shrink-0 flex gap-2 overflow-x-auto px-4 pb-3 justify-center", children: images.map((thumb, i) => (_jsx("button", { type: "button", onClick: () => {
@@ -30,5 +30,7 @@ export function PasswordStrengthIndicator({ password, minLength = 8, showRequire
30
30
  : strength <= 75
31
31
  ? "bg-yellow-500"
32
32
  : "bg-green-500";
33
- return (_jsxs("div", { className: "appkit-password-strength", "aria-live": "polite", "aria-atomic": "true", "data-section": "passwordstrengthindicator-div-567", children: [_jsxs(Row, { gap: "sm", className: "mb-2", children: [_jsx("div", { className: "appkit-password-strength__track", "data-section": "passwordstrengthindicator-div-568", children: _jsx("div", { className: `appkit-password-strength__fill ${strengthColor}`, style: { width: `${strength}%` }, role: "progressbar", "aria-valuenow": Math.round(strength), "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": `Password strength: ${strengthLabel}` }) }), _jsx(Span, { className: "appkit-password-strength__label", children: strengthLabel })] }), showRequirements ? (_jsx(Ul, { className: "appkit-password-strength__requirements", children: requirements.map((req) => (_jsxs(Li, { className: `appkit-password-strength__requirement ${req.met ? "appkit-password-strength__requirement--met" : ""}`, children: [_jsx(Span, { className: "sr-only", children: req.met ? "Met: " : "Not met: " }), req.label] }, req.label))) })) : null] }));
33
+ return (_jsxs("div", { className: "appkit-password-strength", "aria-live": "polite", "aria-atomic": "true", "data-section": "passwordstrengthindicator-div-567", children: [_jsxs(Row, { gap: "sm", className: "mb-2", children: [_jsx("div", { className: "appkit-password-strength__track", "data-section": "passwordstrengthindicator-div-568", children: _jsx("div", { className: `appkit-password-strength__fill ${strengthColor}`,
34
+ // audit-inline-style-ok: computed percentage
35
+ style: { width: `${strength}%` }, role: "progressbar", "aria-valuenow": Math.round(strength), "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": `Password strength: ${strengthLabel}` }) }), _jsx(Span, { className: "appkit-password-strength__label", children: strengthLabel })] }), showRequirements ? (_jsx(Ul, { className: "appkit-password-strength__requirements", children: requirements.map((req) => (_jsxs(Li, { className: `appkit-password-strength__requirement ${req.met ? "appkit-password-strength__requirement--met" : ""}`, children: [_jsx(Span, { className: "sr-only", children: req.met ? "Met: " : "Not met: " }), req.label] }, req.label))) })) : null] }));
34
36
  }
@@ -13,7 +13,9 @@ export function Progress({ value, max = 100, variant = "primary", size = "md", l
13
13
  warning: "appkit-progress__bar--warning",
14
14
  error: "appkit-progress__bar--error",
15
15
  };
16
- return (_jsxs("div", { className: `appkit-progress ${className}`, "data-section": "progress-div-569", children: [(label || showValue) && (_jsxs("div", { className: "appkit-progress__meta", "data-section": "progress-div-570", children: [label && _jsx(Span, { className: "appkit-progress__label", children: label }), showValue && (_jsxs(Span, { className: "appkit-progress__value", children: [Math.round(percentage), "%"] }))] })), _jsx("div", { className: `appkit-progress__track ${sizeClasses[size]}`, role: "progressbar", "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": max, "aria-label": label || `Progress: ${Math.round(percentage)}%`, "data-section": "progress-div-571", children: _jsx("div", { className: `appkit-progress__bar ${variantClasses[variant]}`, style: { width: `${percentage}%` } }) })] }));
16
+ return (_jsxs("div", { className: `appkit-progress ${className}`, "data-section": "progress-div-569", children: [(label || showValue) && (_jsxs("div", { className: "appkit-progress__meta", "data-section": "progress-div-570", children: [label && _jsx(Span, { className: "appkit-progress__label", children: label }), showValue && (_jsxs(Span, { className: "appkit-progress__value", children: [Math.round(percentage), "%"] }))] })), _jsx("div", { className: `appkit-progress__track ${sizeClasses[size]}`, role: "progressbar", "aria-valuenow": value, "aria-valuemin": 0, "aria-valuemax": max, "aria-label": label || `Progress: ${Math.round(percentage)}%`, "data-section": "progress-div-571", children: _jsx("div", { className: `appkit-progress__bar ${variantClasses[variant]}`,
17
+ // audit-inline-style-ok: computed percentage
18
+ style: { width: `${percentage}%` } }) })] }));
17
19
  }
18
20
  export function IndeterminateProgress({ variant = "primary", size = "md", label, className = "", }) {
19
21
  const sizeClasses = {
@@ -27,5 +29,7 @@ export function IndeterminateProgress({ variant = "primary", size = "md", label,
27
29
  warning: "appkit-progress__bar--warning",
28
30
  error: "appkit-progress__bar--error",
29
31
  };
30
- return (_jsxs("div", { className: `appkit-progress ${className}`, "data-section": "progress-div-572", children: [label && (_jsx(Span, { className: "appkit-progress__label appkit-progress__label--block", children: label })), _jsx("div", { className: `appkit-progress__track appkit-progress__track--indeterminate ${sizeClasses[size]}`, role: "progressbar", "aria-label": label || "Loading...", "data-section": "progress-div-573", children: _jsx("div", { className: `appkit-progress__bar appkit-progress__bar--indeterminate ${variantClasses[variant]}`, style: { width: "40%" } }) })] }));
32
+ return (_jsxs("div", { className: `appkit-progress ${className}`, "data-section": "progress-div-572", children: [label && (_jsx(Span, { className: "appkit-progress__label appkit-progress__label--block", children: label })), _jsx("div", { className: `appkit-progress__track appkit-progress__track--indeterminate ${sizeClasses[size]}`, role: "progressbar", "aria-label": label || "Loading...", "data-section": "progress-div-573", children: _jsx("div", { className: `appkit-progress__bar appkit-progress__bar--indeterminate ${variantClasses[variant]}`,
33
+ // audit-inline-style-ok: dynamic CSS
34
+ style: { width: "40%" } }) })] }));
31
35
  }
@@ -38,7 +38,9 @@ export function RowActionMenu({ actions, align = "right", }) {
38
38
  setOpen((v) => !v);
39
39
  }, [open, align]);
40
40
  const dropdown = open && pos && mounted
41
- ? createPortal(_jsx("div", { ref: dropdownRef, role: "menu", className: "appkit-row-action-menu__dropdown", style: {
41
+ ? createPortal(_jsx("div", { ref: dropdownRef, role: "menu", className: "appkit-row-action-menu__dropdown",
42
+ // audit-inline-style-ok: dynamic CSS
43
+ style: {
42
44
  position: "fixed",
43
45
  zIndex: "var(--appkit-z-modal)",
44
46
  top: pos.top,
@@ -14,5 +14,11 @@ export function SiteLogo({ className = "h-7", title = "LetItRip.in", variant = "
14
14
  _jsx("img", { src: src, alt: title, "data-testid": "site-logo", className: `block w-auto object-contain ${className}` }));
15
15
  }
16
16
  const fill = variant === "gradient" ? `url(#${GRADIENT_ID})` : "currentColor";
17
- return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 214 56", role: "img", "aria-label": title, "data-testid": "site-logo", className: `block w-auto ${className}`, children: [_jsx("title", { children: title }), variant === "gradient" && (_jsx("defs", { children: _jsxs("linearGradient", { id: GRADIENT_ID, x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [_jsx("stop", { offset: "0%", style: { stopColor: "var(--appkit-color-primary-700, #1343de)" } }), _jsx("stop", { offset: "55%", style: { stopColor: "var(--appkit-color-cobalt, #3570fc)" } }), _jsx("stop", { offset: "100%", style: { stopColor: "var(--appkit-color-secondary-400, #84e122)" } })] }) })), _jsx("text", { x: "0", y: "44", fontFamily: "ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif", fontWeight: "800", fontSize: "44", letterSpacing: "-1.5", fill: fill, children: "LetItRip" }), _jsx("rect", { x: "169", y: "5", width: "43", height: "21", rx: "10.5", fill: fill, opacity: "0.12" }), _jsx("text", { x: "174", y: "21", fontFamily: "ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif", fontWeight: "700", fontSize: "15", letterSpacing: "0.2", fill: fill, children: ".in" })] }));
17
+ return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 214 56", role: "img", "aria-label": title, "data-testid": "site-logo", className: `block w-auto ${className}`, children: [_jsx("title", { children: title }), variant === "gradient" && (_jsx("defs", { children: _jsxs("linearGradient", { id: GRADIENT_ID, x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [_jsx("stop", { offset: "0%",
18
+ // audit-inline-style-ok: SVG gradient stop
19
+ style: { stopColor: "var(--appkit-color-primary-700, #1343de)" } }), _jsx("stop", { offset: "55%",
20
+ // audit-inline-style-ok: SVG gradient stop
21
+ style: { stopColor: "var(--appkit-color-cobalt, #3570fc)" } }), _jsx("stop", { offset: "100%",
22
+ // audit-inline-style-ok: SVG gradient stop
23
+ style: { stopColor: "var(--appkit-color-secondary-400, #84e122)" } })] }) })), _jsx("text", { x: "0", y: "44", fontFamily: "ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif", fontWeight: "800", fontSize: "44", letterSpacing: "-1.5", fill: fill, children: "LetItRip" }), _jsx("rect", { x: "169", y: "5", width: "43", height: "21", rx: "10.5", fill: fill, opacity: "0.12" }), _jsx("text", { x: "174", y: "21", fontFamily: "ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif", fontWeight: "700", fontSize: "15", letterSpacing: "0.2", fill: fill, children: ".in" })] }));
18
24
  }
@@ -17,5 +17,7 @@ export function Skeleton({ variant = "text", width, height, className = "", anim
17
17
  width: width ?? defaultSize.width,
18
18
  height: height ?? defaultSize.height,
19
19
  };
20
- return (_jsx("div", { className: `appkit-skeleton ${variantClass} ${animationClass} ${className}`, style: style, role: "status", "aria-label": "Loading", "data-section": "skeleton-div-606", children: _jsx("span", { className: "appkit-sr-only", children: "Loading..." }) }));
20
+ return (_jsx("div", { className: `appkit-skeleton ${variantClass} ${animationClass} ${className}`,
21
+ // audit-inline-style-ok: pass-through style prop
22
+ style: style, role: "status", "aria-label": "Loading", "data-section": "skeleton-div-606", children: _jsx("span", { className: "appkit-sr-only", children: "Loading..." }) }));
21
23
  }
@@ -30,7 +30,9 @@ export function Slider({ value: controlledValue, defaultValue = 0, min = 0, max
30
30
  ].join(" "), "data-section": "slider-div-610", children: _jsx("div", { className: [
31
31
  "h-full rounded-full bg-lime-600 dark:bg-pink-500",
32
32
  SIZE_CLASSES[size],
33
- ].join(" "), style: { width: `${Math.max(0, Math.min(100, percentage))}%` } }) }), _jsx("input", { id: inputId, type: "range", min: min, max: max, step: step, value: value, disabled: disabled, onChange: handleChange, onMouseUp: handleChangeEnd, onTouchEnd: handleChangeEnd, className: [
33
+ ].join(" "),
34
+ // audit-inline-style-ok: computed percentage
35
+ style: { width: `${Math.max(0, Math.min(100, percentage))}%` } }) }), _jsx("input", { id: inputId, type: "range", min: min, max: max, step: step, value: value, disabled: disabled, onChange: handleChange, onMouseUp: handleChangeEnd, onTouchEnd: handleChangeEnd, className: [
34
36
  "appkit-slider relative z-10 bg-transparent",
35
37
  disabled ? "appkit-slider--disabled" : "cursor-pointer",
36
38
  SIZE_CLASSES[size],
@@ -42,7 +42,9 @@ export function TabStrip({ tabs, activeKey, onChange, minTabWidth = FLUID_GRID_M
42
42
  }
43
43
  }, [activeKey, scrollOffset, visibleCount, tabs, setScrollOffset]);
44
44
  const visible = tabs.slice(scrollOffset, scrollOffset + visibleCount);
45
- return (_jsxs("div", { ref: containerRef, role: "tablist", className: ["appkit-tab-strip", className ?? ""].join(" ").trim(), children: [hasOverflow && (_jsx("button", { type: "button", onClick: scrollLeft, disabled: !canScrollLeft, "aria-label": "Previous tabs", className: "appkit-tab-strip__arrow", children: "\u2039" })), visible.map((tab) => (_jsxs("button", { type: "button", role: "tab", "aria-selected": tab.key === activeKey, "aria-disabled": tab.disabled, onClick: () => !tab.disabled && onChange(tab.key), style: { minWidth: `${minTabWidth}px` }, className: [
45
+ return (_jsxs("div", { ref: containerRef, role: "tablist", className: ["appkit-tab-strip", className ?? ""].join(" ").trim(), children: [hasOverflow && (_jsx("button", { type: "button", onClick: scrollLeft, disabled: !canScrollLeft, "aria-label": "Previous tabs", className: "appkit-tab-strip__arrow", children: "\u2039" })), visible.map((tab) => (_jsxs("button", { type: "button", role: "tab", "aria-selected": tab.key === activeKey, "aria-disabled": tab.disabled, onClick: () => !tab.disabled && onChange(tab.key),
46
+ // audit-inline-style-ok: computed pixel offset
47
+ style: { minWidth: `${minTabWidth}px` }, className: [
46
48
  "appkit-tab-strip__tab",
47
49
  tab.key === activeKey
48
50
  ? "appkit-tab-strip__tab--active"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mohasinac/appkit",
3
- "version": "2.8.3",
3
+ "version": "2.8.5",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"