@mohasinac/appkit 2.7.59 → 2.8.0

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 (311) hide show
  1. package/dist/_internal/client/features/filters/filter-load-options.d.ts +4 -5
  2. package/dist/_internal/server/features/auctions/og.js +8 -32
  3. package/dist/_internal/server/features/blog/og.js +10 -49
  4. package/dist/_internal/server/features/checkout/actions.js +6 -0
  5. package/dist/_internal/server/features/classified/og.js +9 -51
  6. package/dist/_internal/server/features/digital-code/actions.d.ts +11 -0
  7. package/dist/_internal/server/features/digital-code/actions.js +30 -0
  8. package/dist/_internal/server/features/digital-code/index.d.ts +1 -0
  9. package/dist/_internal/server/features/digital-code/index.js +1 -0
  10. package/dist/_internal/server/features/digital-code/og.js +9 -51
  11. package/dist/_internal/server/features/events/og.js +10 -49
  12. package/dist/_internal/server/features/item-requests/data.d.ts +17 -0
  13. package/dist/_internal/server/features/item-requests/data.js +20 -0
  14. package/dist/_internal/server/features/item-requests/index.d.ts +2 -0
  15. package/dist/_internal/server/features/item-requests/index.js +2 -0
  16. package/dist/_internal/server/features/item-requests/og.d.ts +40 -0
  17. package/dist/_internal/server/features/item-requests/og.js +136 -0
  18. package/dist/_internal/server/features/live/actions.d.ts +5 -0
  19. package/dist/_internal/server/features/live/actions.js +24 -0
  20. package/dist/_internal/server/features/live/index.d.ts +1 -0
  21. package/dist/_internal/server/features/live/index.js +1 -0
  22. package/dist/_internal/server/features/live/og.js +9 -51
  23. package/dist/_internal/server/features/media/contextGuards.js +19 -8
  24. package/dist/_internal/server/features/pre-orders/og.js +8 -32
  25. package/dist/_internal/server/features/prize-draws/data.d.ts +17 -0
  26. package/dist/_internal/server/features/prize-draws/data.js +20 -0
  27. package/dist/_internal/server/features/prize-draws/index.d.ts +2 -0
  28. package/dist/_internal/server/features/prize-draws/index.js +2 -0
  29. package/dist/_internal/server/features/prize-draws/og.d.ts +30 -0
  30. package/dist/_internal/server/features/prize-draws/og.js +50 -0
  31. package/dist/_internal/server/features/products/og.js +8 -33
  32. package/dist/_internal/server/features/seo/og-layout.d.ts +42 -0
  33. package/dist/_internal/server/features/seo/og-layout.js +69 -0
  34. package/dist/_internal/server/features/stores/og.js +8 -41
  35. package/dist/_internal/server/features/sublisting-categories/og.js +11 -42
  36. package/dist/client.d.ts +10 -6
  37. package/dist/client.js +7 -3
  38. package/dist/constants/index.d.ts +4 -0
  39. package/dist/constants/index.js +2 -0
  40. package/dist/constants/notification-types.d.ts +20 -0
  41. package/dist/constants/notification-types.js +37 -0
  42. package/dist/constants/pagination-presets.d.ts +39 -0
  43. package/dist/constants/pagination-presets.js +38 -0
  44. package/dist/errors/messages.d.ts +0 -4
  45. package/dist/errors/messages.js +0 -4
  46. package/dist/features/account/components/UserOffersPanel.js +1 -1
  47. package/dist/features/account/components/UserSupportView.d.ts +1 -2
  48. package/dist/features/account/components/UserSupportView.js +9 -1
  49. package/dist/features/admin/actions/admin-actions.js +16 -1
  50. package/dist/features/admin/components/AdminAllEventEntriesView.d.ts +2 -3
  51. package/dist/features/admin/components/AdminAllEventEntriesView.js +50 -83
  52. package/dist/features/admin/components/AdminBidsView.d.ts +2 -3
  53. package/dist/features/admin/components/AdminBidsView.js +64 -98
  54. package/dist/features/admin/components/AdminBlogView.d.ts +3 -7
  55. package/dist/features/admin/components/AdminBlogView.js +53 -83
  56. package/dist/features/admin/components/AdminBrandsView.d.ts +2 -3
  57. package/dist/features/admin/components/AdminBrandsView.js +84 -83
  58. package/dist/features/admin/components/AdminBundlesView.js +82 -125
  59. package/dist/features/admin/components/AdminCarouselView.d.ts +2 -2
  60. package/dist/features/admin/components/AdminCarouselView.js +17 -52
  61. package/dist/features/admin/components/AdminCartsView.d.ts +2 -3
  62. package/dist/features/admin/components/AdminCartsView.js +39 -88
  63. package/dist/features/admin/components/AdminCategoriesView.d.ts +3 -3
  64. package/dist/features/admin/components/AdminCategoriesView.js +98 -92
  65. package/dist/features/admin/components/AdminCategoryEditorView.js +2 -2
  66. package/dist/features/admin/components/AdminClassifiedView.d.ts +3 -0
  67. package/dist/features/admin/components/AdminClassifiedView.js +44 -0
  68. package/dist/features/admin/components/AdminContactView.d.ts +2 -2
  69. package/dist/features/admin/components/AdminContactView.js +104 -111
  70. package/dist/features/admin/components/AdminCouponsView.d.ts +3 -6
  71. package/dist/features/admin/components/AdminCouponsView.js +66 -86
  72. package/dist/features/admin/components/AdminDigitalCodesView.d.ts +3 -0
  73. package/dist/features/admin/components/AdminDigitalCodesView.js +51 -0
  74. package/dist/features/admin/components/AdminFaqsView.d.ts +4 -4
  75. package/dist/features/admin/components/AdminFaqsView.js +77 -33
  76. package/dist/features/admin/components/AdminFeaturesView.d.ts +2 -3
  77. package/dist/features/admin/components/AdminFeaturesView.js +57 -70
  78. package/dist/features/admin/components/AdminGroupedListingsView.d.ts +3 -0
  79. package/dist/features/admin/components/AdminGroupedListingsView.js +43 -0
  80. package/dist/features/admin/components/AdminHistoryView.d.ts +2 -3
  81. package/dist/features/admin/components/AdminHistoryView.js +35 -52
  82. package/dist/features/admin/components/AdminListingScaffold.d.ts +2 -2
  83. package/dist/features/admin/components/AdminListingScaffold.js +3 -3
  84. package/dist/features/admin/components/AdminLiveView.d.ts +3 -0
  85. package/dist/features/admin/components/AdminLiveView.js +50 -0
  86. package/dist/features/admin/components/AdminNewsletterView.d.ts +2 -2
  87. package/dist/features/admin/components/AdminNewsletterView.js +67 -97
  88. package/dist/features/admin/components/AdminNotificationsView.d.ts +2 -3
  89. package/dist/features/admin/components/AdminNotificationsView.js +67 -93
  90. package/dist/features/admin/components/AdminOrderEditorView.js +10 -10
  91. package/dist/features/admin/components/AdminOrdersView.d.ts +2 -3
  92. package/dist/features/admin/components/AdminOrdersView.js +93 -107
  93. package/dist/features/admin/components/AdminPayoutsView.d.ts +2 -3
  94. package/dist/features/admin/components/AdminPayoutsView.js +51 -91
  95. package/dist/features/admin/components/AdminPrizeDrawsView.d.ts +2 -3
  96. package/dist/features/admin/components/AdminPrizeDrawsView.js +39 -76
  97. package/dist/features/admin/components/AdminProductEditorView.js +3 -3
  98. package/dist/features/admin/components/AdminProductsView.d.ts +4 -4
  99. package/dist/features/admin/components/AdminProductsView.js +167 -163
  100. package/dist/features/admin/components/AdminReturnRequestsView.d.ts +1 -1
  101. package/dist/features/admin/components/AdminReturnRequestsView.js +64 -66
  102. package/dist/features/admin/components/AdminReviewsView.d.ts +3 -7
  103. package/dist/features/admin/components/AdminReviewsView.js +94 -110
  104. package/dist/features/admin/components/AdminScammersView.d.ts +2 -3
  105. package/dist/features/admin/components/AdminScammersView.js +53 -97
  106. package/dist/features/admin/components/AdminSectionsView.js +1 -1
  107. package/dist/features/admin/components/AdminSessionsView.d.ts +2 -3
  108. package/dist/features/admin/components/AdminSessionsView.js +62 -89
  109. package/dist/features/admin/components/AdminStoreAddressesView.d.ts +1 -1
  110. package/dist/features/admin/components/AdminStoreAddressesView.js +39 -53
  111. package/dist/features/admin/components/AdminStoreEditorView.js +21 -8
  112. package/dist/features/admin/components/AdminStoresView.d.ts +2 -3
  113. package/dist/features/admin/components/AdminStoresView.js +67 -99
  114. package/dist/features/admin/components/AdminSublistingCategoriesView.d.ts +1 -1
  115. package/dist/features/admin/components/AdminSublistingCategoriesView.js +28 -44
  116. package/dist/features/admin/components/AdminSupportTicketDetailView.d.ts +10 -1
  117. package/dist/features/admin/components/AdminSupportTicketDetailView.js +191 -5
  118. package/dist/features/admin/components/AdminSupportTicketsView.d.ts +2 -3
  119. package/dist/features/admin/components/AdminSupportTicketsView.js +65 -96
  120. package/dist/features/admin/components/AdminTeamView.d.ts +2 -2
  121. package/dist/features/admin/components/AdminTeamView.js +40 -74
  122. package/dist/features/admin/components/AdminUserEditorView.d.ts +11 -1
  123. package/dist/features/admin/components/AdminUserEditorView.js +80 -6
  124. package/dist/features/admin/components/AdminUsersView.d.ts +2 -3
  125. package/dist/features/admin/components/AdminUsersView.js +108 -100
  126. package/dist/features/admin/components/AdminViewCards.d.ts +1 -1
  127. package/dist/features/admin/components/AdminWishlistsView.d.ts +2 -3
  128. package/dist/features/admin/components/AdminWishlistsView.js +36 -62
  129. package/dist/features/admin/components/DataListingView.d.ts +122 -0
  130. package/dist/features/admin/components/DataListingView.js +66 -0
  131. package/dist/features/admin/components/index.d.ts +10 -4
  132. package/dist/features/admin/components/index.js +6 -2
  133. package/dist/features/admin/constants/filter-tabs.d.ts +23 -17
  134. package/dist/features/admin/constants/filter-tabs.js +21 -17
  135. package/dist/features/admin/hooks/useAdminListing.d.ts +1 -0
  136. package/dist/features/admin/hooks/useAdminListing.js +1 -1
  137. package/dist/features/admin/schemas/firestore.js +6 -7
  138. package/dist/features/auctions/server.d.ts +0 -1
  139. package/dist/features/auctions/server.js +0 -1
  140. package/dist/features/auth/actions/realtime-token-actions.js +1 -1
  141. package/dist/features/auth/repository/user.repository.js +1 -1
  142. package/dist/features/cart/repository/cart.repository.d.ts +4 -1
  143. package/dist/features/cart/repository/cart.repository.js +12 -0
  144. package/dist/features/checkout/hooks/useCheckoutApi.d.ts +0 -2
  145. package/dist/features/checkout/index.d.ts +1 -1
  146. package/dist/features/events/components/AdminEventsView.d.ts +3 -3
  147. package/dist/features/events/components/AdminEventsView.js +50 -86
  148. package/dist/features/events/components/EventOfferCard.d.ts +19 -0
  149. package/dist/features/events/components/EventOfferCard.js +29 -0
  150. package/dist/features/events/components/EventRaffleEntryForm.d.ts +25 -0
  151. package/dist/features/events/components/EventRaffleEntryForm.js +37 -0
  152. package/dist/features/events/components/EventRafflesSection.d.ts +1 -4
  153. package/dist/features/events/components/EventRafflesSection.js +17 -6
  154. package/dist/features/events/components/EventSaleBanner.d.ts +21 -0
  155. package/dist/features/events/components/EventSaleBanner.js +18 -0
  156. package/dist/features/events/components/index.d.ts +6 -0
  157. package/dist/features/events/components/index.js +4 -0
  158. package/dist/features/events/repository/event-entry.repository.d.ts +5 -0
  159. package/dist/features/events/repository/event-entry.repository.js +7 -0
  160. package/dist/features/filters/AsyncFacetSection.d.ts +1 -1
  161. package/dist/features/homepage/components/FAQSection.d.ts +0 -5
  162. package/dist/features/homepage/lib/live-stats.js +1 -1
  163. package/dist/features/homepage/schemas/firestore.d.ts +0 -2
  164. package/dist/features/layout/index.d.ts +0 -2
  165. package/dist/features/layout/index.js +0 -1
  166. package/dist/features/pre-orders/server.d.ts +0 -1
  167. package/dist/features/pre-orders/server.js +0 -1
  168. package/dist/features/products/components/GroupSettingsPanel.js +2 -2
  169. package/dist/features/products/components/PrizeDrawItemsEditor.js +2 -2
  170. package/dist/features/products/components/PrizeDrawsSection.d.ts +1 -4
  171. package/dist/features/products/components/PrizeDrawsSection.js +17 -6
  172. package/dist/features/products/components/PrizeRevealModal.js +1 -1
  173. package/dist/features/products/components/ProductCardMetadataSection.d.ts +11 -0
  174. package/dist/features/products/components/ProductCardMetadataSection.js +25 -0
  175. package/dist/features/products/components/ProductDetailPageView.js +3 -1
  176. package/dist/features/products/components/ProductFeaturesSelector.js +1 -1
  177. package/dist/features/products/components/ProductGradingTab.d.ts +13 -0
  178. package/dist/features/products/components/ProductGradingTab.js +25 -0
  179. package/dist/features/products/components/ProductGrid.js +14 -2
  180. package/dist/features/products/components/ProductTabsShell.d.ts +5 -1
  181. package/dist/features/products/components/ProductTabsShell.js +6 -1
  182. package/dist/features/products/components/index.d.ts +4 -0
  183. package/dist/features/products/components/index.js +3 -0
  184. package/dist/features/products/constants/action-defs.d.ts +5 -0
  185. package/dist/features/products/constants/action-defs.js +52 -32
  186. package/dist/features/products/constants/sieve.d.ts +24 -4
  187. package/dist/features/products/constants/sieve.js +20 -11
  188. package/dist/features/products/schemas/firestore.d.ts +17 -0
  189. package/dist/features/products/schemas/product-features.validators.d.ts +2 -2
  190. package/dist/features/products/schemas/product-templates.d.ts +2 -4
  191. package/dist/features/products/types/index.d.ts +4 -0
  192. package/dist/features/promotions/server.d.ts +0 -1
  193. package/dist/features/promotions/server.js +0 -1
  194. package/dist/features/search/api/route.js +44 -1
  195. package/dist/features/search/components/Search.js +2 -0
  196. package/dist/features/search/hooks/useNavSuggestions.d.ts +5 -1
  197. package/dist/features/search/hooks/useNavSuggestions.js +31 -4
  198. package/dist/features/seller/components/BrandInlineSelect.js +2 -2
  199. package/dist/features/seller/components/CategoryInlineSelect.js +2 -2
  200. package/dist/features/seller/components/SellerAddressesView.js +1 -1
  201. package/dist/features/seller/components/SellerAuctionsView.d.ts +3 -3
  202. package/dist/features/seller/components/SellerAuctionsView.js +60 -90
  203. package/dist/features/seller/components/SellerBidsView.js +1 -1
  204. package/dist/features/seller/components/SellerBundlesView.js +64 -89
  205. package/dist/features/seller/components/SellerClassifiedView.js +67 -90
  206. package/dist/features/seller/components/SellerCouponEditorView.js +1 -1
  207. package/dist/features/seller/components/SellerCouponsView.d.ts +2 -2
  208. package/dist/features/seller/components/SellerCouponsView.js +45 -84
  209. package/dist/features/seller/components/SellerDigitalCodesView.js +63 -88
  210. package/dist/features/seller/components/SellerGroupedListingsView.js +33 -49
  211. package/dist/features/seller/components/SellerLiveView.js +63 -84
  212. package/dist/features/seller/components/SellerOffersPanel.js +1 -1
  213. package/dist/features/seller/components/SellerOffersView.d.ts +2 -2
  214. package/dist/features/seller/components/SellerOffersView.js +37 -69
  215. package/dist/features/seller/components/SellerOrdersView.d.ts +2 -2
  216. package/dist/features/seller/components/SellerOrdersView.js +4 -4
  217. package/dist/features/seller/components/SellerPayoutMethodsView.js +1 -1
  218. package/dist/features/seller/components/SellerPayoutsView.d.ts +2 -2
  219. package/dist/features/seller/components/SellerPayoutsView.js +34 -68
  220. package/dist/features/seller/components/SellerPreOrdersView.d.ts +2 -2
  221. package/dist/features/seller/components/SellerPreOrdersView.js +49 -82
  222. package/dist/features/seller/components/SellerPrizeDrawsView.d.ts +2 -2
  223. package/dist/features/seller/components/SellerPrizeDrawsView.js +49 -82
  224. package/dist/features/seller/components/SellerProductShell.d.ts +1 -1
  225. package/dist/features/seller/components/SellerProductsView.d.ts +2 -2
  226. package/dist/features/seller/components/SellerProductsView.js +15 -10
  227. package/dist/features/seller/components/SellerShippingConfigsView.js +1 -1
  228. package/dist/features/seller/components/SellerSidebar.d.ts +0 -4
  229. package/dist/features/seller/components/SellerSidebar.js +0 -2
  230. package/dist/features/seller/components/SellerStoreCategoriesView.js +1 -1
  231. package/dist/features/seller/components/SellerTemplatesView.js +2 -2
  232. package/dist/features/seller/components/SellersListView.d.ts +1 -2
  233. package/dist/features/seller/components/analytics/SellerAnalyticsStats.d.ts +5 -0
  234. package/dist/features/seller/components/analytics/SellerAnalyticsStats.js +2 -8
  235. package/dist/features/seller/components/index.d.ts +0 -3
  236. package/dist/features/seller/components/index.js +0 -2
  237. package/dist/features/seller/server.d.ts +0 -1
  238. package/dist/features/seller/server.js +0 -1
  239. package/dist/features/shell/FormShell.d.ts +1 -1
  240. package/dist/features/shell/FormShell.js +4 -1
  241. package/dist/features/shell/field-groups/ImageFieldGroup.d.ts +18 -0
  242. package/dist/features/shell/field-groups/ImageFieldGroup.js +15 -0
  243. package/dist/features/shell/field-groups/SeoFieldGroup.d.ts +22 -0
  244. package/dist/features/shell/field-groups/SeoFieldGroup.js +16 -0
  245. package/dist/features/shell/field-groups/StatusFieldGroup.d.ts +35 -0
  246. package/dist/features/shell/field-groups/StatusFieldGroup.js +16 -0
  247. package/dist/features/shell/field-groups/TitleDescriptionGroup.d.ts +40 -0
  248. package/dist/features/shell/field-groups/TitleDescriptionGroup.js +16 -0
  249. package/dist/features/shell/field-groups/index.d.ts +13 -0
  250. package/dist/features/shell/field-groups/index.js +9 -0
  251. package/dist/features/shell/index.d.ts +2 -0
  252. package/dist/features/shell/index.js +1 -0
  253. package/dist/features/stores/components/StoreCapabilitiesGuideView.d.ts +1 -2
  254. package/dist/features/stores/components/StoreFinanceGuideView.d.ts +1 -2
  255. package/dist/features/stores/components/StoreHeader.js +2 -1
  256. package/dist/features/stores/components/StoreListingsGuideView.d.ts +1 -2
  257. package/dist/features/stores/components/StoreOrdersGuideView.d.ts +1 -2
  258. package/dist/features/stores/components/StoreScopedSearch.d.ts +16 -0
  259. package/dist/features/stores/components/StoreScopedSearch.js +27 -0
  260. package/dist/features/stores/components/StoreSettingsGuideView.d.ts +1 -2
  261. package/dist/features/stores/server.d.ts +0 -1
  262. package/dist/features/stores/server.js +0 -1
  263. package/dist/features/support/schemas/firestore.d.ts +22 -1
  264. package/dist/features/support/schemas/firestore.js +10 -0
  265. package/dist/features/wishlist/server.d.ts +0 -1
  266. package/dist/features/wishlist/server.js +0 -1
  267. package/dist/index.d.ts +9 -27
  268. package/dist/index.js +14 -50
  269. package/dist/next/routing/route-map.d.ts +8 -0
  270. package/dist/next/routing/route-map.js +4 -0
  271. package/dist/react/hooks/useListingTypeFlags.d.ts +32 -0
  272. package/dist/react/hooks/useListingTypeFlags.js +19 -0
  273. package/dist/security/index.d.ts +1 -1
  274. package/dist/security/index.js +1 -1
  275. package/dist/security/pii-redact.d.ts +8 -0
  276. package/dist/security/pii-redact.js +10 -1
  277. package/dist/seed/grouped-listings-seed-data.d.ts +4 -0
  278. package/dist/seed/products-preorders-seed-data.d.ts +4 -0
  279. package/dist/seed/products-prize-draws-seed-data.js +3 -0
  280. package/dist/seed/site-settings-seed-data.js +5 -5
  281. package/dist/seed/sub-listings-seed-data.d.ts +4 -0
  282. package/dist/server.d.ts +2 -0
  283. package/dist/server.js +4 -0
  284. package/dist/styles.css +54 -395
  285. package/dist/tailwind-utilities.css +1 -1
  286. package/dist/ui/components/BaseListingCard.d.ts +10 -0
  287. package/dist/ui/components/BaseListingCard.js +17 -1
  288. package/dist/ui/components/DetailPageGallery.d.ts +32 -0
  289. package/dist/ui/components/DetailPageGallery.js +47 -0
  290. package/dist/ui/components/DetailPageHero.d.ts +30 -0
  291. package/dist/ui/components/DetailPageHero.js +22 -0
  292. package/dist/ui/components/DetailPageTabs.d.ts +34 -0
  293. package/dist/ui/components/DetailPageTabs.js +38 -0
  294. package/dist/ui/components/HorizontalScroller.style.css +15 -2
  295. package/dist/ui/components/ListingLayout.d.ts +11 -2
  296. package/dist/ui/components/ListingLayout.js +12 -6
  297. package/dist/ui/components/PaginatedSelect.d.ts +66 -0
  298. package/dist/ui/components/PaginatedSelect.js +201 -0
  299. package/dist/ui/components/PaginatedSelect.style.css +254 -0
  300. package/dist/ui/components/Semantic.d.ts +0 -4
  301. package/dist/ui/components/Semantic.js +0 -2
  302. package/dist/ui/components/SettingsSection.d.ts +47 -0
  303. package/dist/ui/components/SettingsSection.js +38 -0
  304. package/dist/ui/components/index.style.css +1 -4
  305. package/dist/ui/index.d.ts +12 -14
  306. package/dist/ui/index.js +6 -7
  307. package/dist/utils/id-generators.d.ts +1 -18
  308. package/dist/utils/id-generators.js +51 -18
  309. package/dist/validation/schemas.d.ts +25 -0
  310. package/dist/validation/schemas.js +28 -0
  311. package/package.json +1 -1
package/dist/ui/index.js CHANGED
@@ -6,7 +6,7 @@ export { FieldSelect } from "./forms";
6
6
  export { FieldCheckbox } from "./forms";
7
7
  // --- Column utilities ---------------------------------------------------------
8
8
  export { buildColumns, createColumnBuilder, renderBoolean, renderCurrency, renderCurrencyCompact, renderCount, renderNullable, renderRating, } from "./columns";
9
- export { Section, Article, Main, Aside, Nav, BlockHeader, BlockFooter, Header, Footer, Ul, Ol, Li, Table, Thead, Tbody, Tr, Th, Td, Code, Pre, Blockquote, Figure, Figcaption, Dl, Dt, Dd, } from "./components/Semantic";
9
+ export { Section, Article, Main, Aside, Nav, BlockHeader, BlockFooter, Ul, Ol, Li, Table, Thead, Tbody, Tr, Th, Td, Code, Pre, Blockquote, Figure, Figcaption, Dl, Dt, Dd, } from "./components/Semantic";
10
10
  export { Div } from "./components/Div";
11
11
  export { Heading, Text, Label, Caption, Span } from "./components/Typography";
12
12
  // --- Filter chip group (SB10-C completion, S8 2026-05-13) --------------------
@@ -58,9 +58,12 @@ export { SummaryCard } from "./components/SummaryCard";
58
58
  export { CountdownDisplay } from "./components/CountdownDisplay";
59
59
  export { ItemRow } from "./components/ItemRow";
60
60
  export { HorizontalScroller } from "./components/HorizontalScroller";
61
- export { SectionTabs } from "./components/SectionTabs";
62
61
  export { TabStrip } from "./components/TabStrip";
63
62
  export { FormGrid, FormField as FormGridField } from "./components/FormGrid";
63
+ export { SettingsSection, ToggleRow } from "./components/SettingsSection";
64
+ export { DetailPageHero } from "./components/DetailPageHero";
65
+ export { DetailPageGallery } from "./components/DetailPageGallery";
66
+ export { DetailPageTabs } from "./components/DetailPageTabs";
64
67
  export { FormField } from "./components/FormField";
65
68
  export { DescriptionField } from "./components/DescriptionField";
66
69
  export { Card, CardHeader, CardBody, CardFooter } from "./components/Card";
@@ -68,9 +71,7 @@ export { EmptyState } from "./components/EmptyState";
68
71
  export { Avatar, AvatarGroup } from "./components/Avatar";
69
72
  export { Dropdown, DropdownTrigger, DropdownMenu, DropdownItem, DropdownSeparator, } from "./components/Dropdown";
70
73
  export { Menu, MenuTrigger, MenuContent, MenuItem, MenuSeparator, } from "./components/Menu";
71
- export { DynamicSelect } from "./components/DynamicSelect";
72
- export { InlineCreateSelect } from "./components/InlineCreateSelect";
73
- export { PaginatedMultiSelect } from "./components/PaginatedMultiSelect";
74
+ export { PaginatedSelect } from "./components/PaginatedSelect";
74
75
  export { RoleBadge } from "./components/RoleBadge";
75
76
  export { SkipToMain } from "./components/SkipToMain";
76
77
  export { NavigationLoader } from "./components/NavigationLoader";
@@ -79,7 +80,6 @@ export { FilterDrawer } from "./components/FilterDrawer";
79
80
  export { RowActionMenu } from "./components/RowActionMenu";
80
81
  export { PasswordStrengthIndicator } from "./components/PasswordStrengthIndicator";
81
82
  export { AvatarDisplay } from "./components/AvatarDisplay";
82
- export { DashboardStatsCard } from "./components/DashboardStatsCard";
83
83
  export { ActiveFilterChips } from "./components/ActiveFilterChips";
84
84
  export { SortDropdown } from "./components/SortDropdown";
85
85
  export { ListingFilterDrawer } from "./components/ListingFilterDrawer";
@@ -96,7 +96,6 @@ export { RichText } from "./rich-text/RichText";
96
96
  export { RichTextRenderer } from "./rich-text/RichTextRenderer";
97
97
  export { RichTextEditor } from "./components/RichTextEditor";
98
98
  export { ListingLayout } from "./components/ListingLayout";
99
- export { ListingViewShell } from "./components/ListingViewShell";
100
99
  export { SlottedListingView } from "./components/SlottedListingView";
101
100
  export { DetailViewShell } from "./components/DetailViewShell";
102
101
  export { StackedViewShell } from "./components/StackedViewShell";
@@ -115,7 +115,6 @@ export interface GenerateProductImageFilenameInput {
115
115
  index?: number;
116
116
  ext?: string;
117
117
  }
118
- export declare function generateProductImageFilename(input: GenerateProductImageFilenameInput): string;
119
118
  export interface GenerateProductVideoFilenameInput {
120
119
  name: string;
121
120
  category: string;
@@ -123,7 +122,6 @@ export interface GenerateProductVideoFilenameInput {
123
122
  index?: number;
124
123
  ext?: string;
125
124
  }
126
- export declare function generateProductVideoFilename(input: GenerateProductVideoFilenameInput): string;
127
125
  export interface GenerateAuctionImageFilenameInput {
128
126
  name: string;
129
127
  category: string;
@@ -131,7 +129,6 @@ export interface GenerateAuctionImageFilenameInput {
131
129
  index?: number;
132
130
  ext?: string;
133
131
  }
134
- export declare function generateAuctionImageFilename(input: GenerateAuctionImageFilenameInput): string;
135
132
  export interface GeneratePreOrderImageFilenameInput {
136
133
  name: string;
137
134
  category: string;
@@ -139,49 +136,34 @@ export interface GeneratePreOrderImageFilenameInput {
139
136
  index?: number;
140
137
  ext?: string;
141
138
  }
142
- export declare function generatePreOrderImageFilename(input: GeneratePreOrderImageFilenameInput): string;
143
139
  export interface GenerateReviewImageFilenameInput {
144
140
  productId: string;
145
141
  index?: number;
146
142
  ext?: string;
147
143
  }
148
- export declare function generateReviewImageFilename(input: GenerateReviewImageFilenameInput): string;
149
144
  export interface GenerateReviewVideoFilenameInput {
150
145
  productId: string;
151
146
  ext?: string;
152
147
  }
153
- export declare function generateReviewVideoFilename(input: GenerateReviewVideoFilenameInput): string;
154
- export declare function generateStoreLogoFilename(storeName: string, ext?: string): string;
155
- export declare function generateStoreBannerFilename(storeName: string, ext?: string): string;
156
- export declare function generateBrandLogoFilename(brandName: string, ext?: string): string;
157
- export declare function generateBrandBannerFilename(brandName: string, ext?: string): string;
158
148
  export interface GenerateBlogImageFilenameInput {
159
149
  title: string;
160
150
  category: string;
161
151
  index?: number;
162
152
  ext?: string;
163
153
  }
164
- export declare function generateBlogImageFilename(input: GenerateBlogImageFilenameInput): string;
165
154
  export interface GenerateEventImageFilenameInput {
166
155
  title: string;
167
156
  index?: number;
168
157
  ext?: string;
169
158
  }
170
- export declare function generateEventImageFilename(input: GenerateEventImageFilenameInput): string;
171
159
  export interface GenerateRichTextImageFilenameInput {
172
160
  entity: string;
173
161
  name: string;
174
162
  index?: number;
175
163
  ext?: string;
176
164
  }
177
- export declare function generateRichTextImageFilename(input: GenerateRichTextImageFilenameInput): string;
178
- export declare function generateCategoryImageFilename(categoryName: string, ext?: string): string;
179
- export declare function generateUserAvatarFilename(firstName: string, lastName: string, ext?: string): string;
180
- export declare function generateCarouselImageFilename(title: string, ext?: string): string;
181
165
  export declare function generateCroppedImageFilename(originalFilenameOrPath: string, ext?: string): string;
182
166
  export declare function generateTrimmedVideoFilename(originalFilenameOrPath: string, ext?: string): string;
183
- export declare function generateInvoiceFilename(orderId: string, date?: Date): string;
184
- export declare function generatePayoutDocFilename(sellerName: string, date?: Date): string;
185
167
  export type MediaFilenameContext = ({
186
168
  type: "product-image";
187
169
  } & GenerateProductImageFilenameInput) | ({
@@ -262,3 +244,4 @@ export type MediaFilenameContext = ({
262
244
  date?: Date;
263
245
  };
264
246
  export declare function generateMediaFilename(ctx: MediaFilenameContext): string;
247
+ export declare function validateMediaFilename(filename: string): boolean;
@@ -199,7 +199,7 @@ function basenameStem(filenameOrPath) {
199
199
  const dotIndex = filename.lastIndexOf(".");
200
200
  return dotIndex > 0 ? filename.slice(0, dotIndex) : filename;
201
201
  }
202
- export function generateProductImageFilename(input) {
202
+ function generateProductImageFilename(input) {
203
203
  const name = slugify(input.name).substring(0, 40).replace(/-+$/, "");
204
204
  const category = slugify(input.category).substring(0, 20).replace(/-+$/, "");
205
205
  const store = slugify(input.store).substring(0, 20).replace(/-+$/, "");
@@ -207,7 +207,7 @@ export function generateProductImageFilename(input) {
207
207
  const ext = (input.ext ?? "webp").replace(/^\./, "");
208
208
  return `product-${name}-${category}-${store}-image-${n}.${ext}`;
209
209
  }
210
- export function generateProductVideoFilename(input) {
210
+ function generateProductVideoFilename(input) {
211
211
  const name = slugify(input.name).substring(0, 40).replace(/-+$/, "");
212
212
  const category = slugify(input.category).substring(0, 20).replace(/-+$/, "");
213
213
  const store = slugify(input.store).substring(0, 20).replace(/-+$/, "");
@@ -215,7 +215,7 @@ export function generateProductVideoFilename(input) {
215
215
  const ext = (input.ext ?? "mp4").replace(/^\./, "");
216
216
  return `product-${name}-${category}-${store}-video-${n}.${ext}`;
217
217
  }
218
- export function generateAuctionImageFilename(input) {
218
+ function generateAuctionImageFilename(input) {
219
219
  const name = slugify(input.name).substring(0, 40).replace(/-+$/, "");
220
220
  const category = slugify(input.category).substring(0, 20).replace(/-+$/, "");
221
221
  const store = slugify(input.store).substring(0, 20).replace(/-+$/, "");
@@ -223,7 +223,7 @@ export function generateAuctionImageFilename(input) {
223
223
  const ext = (input.ext ?? "webp").replace(/^\./, "");
224
224
  return `auction-${name}-${category}-${store}-image-${n}.${ext}`;
225
225
  }
226
- export function generatePreOrderImageFilename(input) {
226
+ function generatePreOrderImageFilename(input) {
227
227
  const name = slugify(input.name).substring(0, 40).replace(/-+$/, "");
228
228
  const category = slugify(input.category).substring(0, 20).replace(/-+$/, "");
229
229
  const store = slugify(input.store).substring(0, 20).replace(/-+$/, "");
@@ -231,63 +231,63 @@ export function generatePreOrderImageFilename(input) {
231
231
  const ext = (input.ext ?? "webp").replace(/^\./, "");
232
232
  return `preorder-${name}-${category}-${store}-image-${n}.${ext}`;
233
233
  }
234
- export function generateReviewImageFilename(input) {
234
+ function generateReviewImageFilename(input) {
235
235
  const product = slugify(input.productId).substring(0, 40).replace(/-+$/, "");
236
236
  const n = input.index ?? 1;
237
237
  const ext = (input.ext ?? "webp").replace(/^\./, "");
238
238
  return `review-${product}-image-${n}.${ext}`;
239
239
  }
240
- export function generateReviewVideoFilename(input) {
240
+ function generateReviewVideoFilename(input) {
241
241
  const product = slugify(input.productId).substring(0, 40).replace(/-+$/, "");
242
242
  const ext = (input.ext ?? "mp4").replace(/^\./, "");
243
243
  return `review-${product}-video-1.${ext}`;
244
244
  }
245
- export function generateStoreLogoFilename(storeName, ext = "webp") {
245
+ function generateStoreLogoFilename(storeName, ext = "webp") {
246
246
  const store = slugify(storeName).substring(0, 40).replace(/-+$/, "");
247
247
  return `store-${store}-logo.${ext.replace(/^\./, "")}`;
248
248
  }
249
- export function generateStoreBannerFilename(storeName, ext = "webp") {
249
+ function generateStoreBannerFilename(storeName, ext = "webp") {
250
250
  const store = slugify(storeName).substring(0, 40).replace(/-+$/, "");
251
251
  return `store-${store}-banner.${ext.replace(/^\./, "")}`;
252
252
  }
253
- export function generateBrandLogoFilename(brandName, ext = "webp") {
253
+ function generateBrandLogoFilename(brandName, ext = "webp") {
254
254
  const brand = slugify(brandName).substring(0, 40).replace(/-+$/, "");
255
255
  return `brand-${brand}-logo.${ext.replace(/^\./, "")}`;
256
256
  }
257
- export function generateBrandBannerFilename(brandName, ext = "webp") {
257
+ function generateBrandBannerFilename(brandName, ext = "webp") {
258
258
  const brand = slugify(brandName).substring(0, 40).replace(/-+$/, "");
259
259
  return `brand-${brand}-banner.${ext.replace(/^\./, "")}`;
260
260
  }
261
- export function generateBlogImageFilename(input) {
261
+ function generateBlogImageFilename(input) {
262
262
  const title = slugify(input.title).substring(0, 40).replace(/-+$/, "");
263
263
  const category = slugify(input.category).substring(0, 20).replace(/-+$/, "");
264
264
  const n = input.index ?? 1;
265
265
  const ext = (input.ext ?? "webp").replace(/^\./, "");
266
266
  return `blog-${title}-${category}-image-${n}.${ext}`;
267
267
  }
268
- export function generateEventImageFilename(input) {
268
+ function generateEventImageFilename(input) {
269
269
  const title = slugify(input.title).substring(0, 50).replace(/-+$/, "");
270
270
  const n = input.index ?? 1;
271
271
  const ext = (input.ext ?? "webp").replace(/^\./, "");
272
272
  return `event-${title}-image-${n}.${ext}`;
273
273
  }
274
- export function generateRichTextImageFilename(input) {
274
+ function generateRichTextImageFilename(input) {
275
275
  const entity = slugify(input.entity).substring(0, 24).replace(/-+$/, "");
276
276
  const name = slugify(input.name).substring(0, 40).replace(/-+$/, "");
277
277
  const n = input.index ?? 1;
278
278
  const ext = (input.ext ?? "webp").replace(/^\./, "");
279
279
  return `rich-text-${entity}-${name}-image-${n}.${ext}`;
280
280
  }
281
- export function generateCategoryImageFilename(categoryName, ext = "webp") {
281
+ function generateCategoryImageFilename(categoryName, ext = "webp") {
282
282
  const name = slugify(categoryName).substring(0, 40).replace(/-+$/, "");
283
283
  return `category-${name}-image.${ext.replace(/^\./, "")}`;
284
284
  }
285
- export function generateUserAvatarFilename(firstName, lastName, ext = "webp") {
285
+ function generateUserAvatarFilename(firstName, lastName, ext = "webp") {
286
286
  const first = slugify(firstName).substring(0, 20).replace(/-+$/, "");
287
287
  const last = slugify(lastName).substring(0, 20).replace(/-+$/, "");
288
288
  return `user-${first}-${last}-avatar.${ext.replace(/^\./, "")}`;
289
289
  }
290
- export function generateCarouselImageFilename(title, ext = "webp") {
290
+ function generateCarouselImageFilename(title, ext = "webp") {
291
291
  const slug = slugify(title).substring(0, 40).replace(/-+$/, "");
292
292
  return `carousel-${slug}-image.${ext.replace(/^\./, "")}`;
293
293
  }
@@ -305,13 +305,13 @@ export function generateTrimmedVideoFilename(originalFilenameOrPath, ext) {
305
305
  : "mp4";
306
306
  return `${stem}-trimmed.${(ext ?? originalExt).replace(/^\./, "")}`;
307
307
  }
308
- export function generateInvoiceFilename(orderId, date = new Date()) {
308
+ function generateInvoiceFilename(orderId, date = new Date()) {
309
309
  const y = date.getFullYear();
310
310
  const m = String(date.getMonth() + 1).padStart(2, "0");
311
311
  const d = String(date.getDate()).padStart(2, "0");
312
312
  return `invoice-${orderId}-${y}${m}${d}.pdf`;
313
313
  }
314
- export function generatePayoutDocFilename(sellerName, date = new Date()) {
314
+ function generatePayoutDocFilename(sellerName, date = new Date()) {
315
315
  const seller = slugify(sellerName).substring(0, 30).replace(/-+$/, "");
316
316
  const y = date.getFullYear();
317
317
  const m = String(date.getMonth() + 1).padStart(2, "0");
@@ -386,3 +386,36 @@ export function generateMediaFilename(ctx) {
386
386
  }
387
387
  }
388
388
  }
389
+ /**
390
+ * W1-51 — validate that a filename matches the canonical pattern produced
391
+ * by {@link generateMediaFilename}. Called from /api/media/sign before a
392
+ * signed-URL is issued so malformed names can never enter storage.
393
+ *
394
+ * Pattern: `<prefix>-<slug parts>-<YYYYMMDD>(-<N>)?(-<rand>)?\.<ext>` where
395
+ * the prefix is one of the known media type tokens.
396
+ *
397
+ * Returns true when the filename is acceptable.
398
+ */
399
+ const MEDIA_FILENAME_PREFIXES = [
400
+ "product-image", "product-video",
401
+ "review-image", "review-video",
402
+ "auction-image", "preorder-image",
403
+ "store-logo", "store-banner",
404
+ "brand-logo", "brand-banner",
405
+ "blog-image", "blog-cover", "blog-content-image", "blog-additional-image",
406
+ "event-image", "event-cover", "event-winner-image", "event-additional-image",
407
+ "rich-text-image",
408
+ "category-image",
409
+ "user-avatar",
410
+ "carousel-image",
411
+ "invoice", "payout-doc",
412
+ "shipping-proof", "refund-proof",
413
+ ];
414
+ const MEDIA_FILENAME_REGEX = new RegExp(`^(?:${MEDIA_FILENAME_PREFIXES.join("|")})-[a-z0-9]([a-z0-9-]*[a-z0-9])?(?:-\\d+)?\\.[a-z0-9]+$`);
415
+ export function validateMediaFilename(filename) {
416
+ if (!filename || filename.length > 256)
417
+ return false;
418
+ if (filename.includes("..") || filename.includes("/") || filename.includes("\\"))
419
+ return false;
420
+ return MEDIA_FILENAME_REGEX.test(filename);
421
+ }
@@ -24,6 +24,31 @@ export declare const urlSchema: z.ZodString;
24
24
  export declare const APPROVED_MEDIA_DOMAINS: string[];
25
25
  export declare const mediaUrlSchema: z.ZodEffects<z.ZodString, string, string>;
26
26
  export declare const dateStringSchema: z.ZodString;
27
+ /** Monetary value in paise — non-negative integer. Use for `price`, `mrp`, `discount`, etc. */
28
+ export declare const priceSchema: z.ZodNumber;
29
+ /** Discount percentage — 0–100. */
30
+ export declare const discountPercentSchema: z.ZodNumber;
31
+ /** Bounded image-array schema factory — caps gallery length. */
32
+ export declare const imageArraySchema: (max: number) => z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
33
+ /** Slug regex factory. Pass the `<prefix>-` token (e.g. `"product-"`) to enforce prefix discipline. */
34
+ export declare const createSlugValidator: (prefix?: string) => z.ZodString;
35
+ /** A Firestore Timestamp converted to JS Date — accepts string or Date instances. */
36
+ export declare const timestampSchema: z.ZodUnion<[z.ZodString, z.ZodDate]>;
37
+ /** Standard `createdAt`/`updatedAt` block — fold into doc schemas with `.merge(timestampsSchema)`. */
38
+ export declare const timestampsSchema: z.ZodObject<{
39
+ createdAt: z.ZodUnion<[z.ZodString, z.ZodDate]>;
40
+ updatedAt: z.ZodUnion<[z.ZodString, z.ZodDate]>;
41
+ }, "strip", z.ZodTypeAny, {
42
+ createdAt: string | Date;
43
+ updatedAt: string | Date;
44
+ }, {
45
+ createdAt: string | Date;
46
+ updatedAt: string | Date;
47
+ }>;
48
+ /** Non-empty trimmed string with a length cap. */
49
+ export declare const nonEmptyString: (max?: number) => z.ZodString;
50
+ /** Optional rich-text body — uses the HTML schema (plain length cap). */
51
+ export declare const richTextBodySchema: (max?: number) => z.ZodString;
27
52
  export declare const passwordSchema: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
28
53
  export declare const phoneSchema: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
29
54
  export declare const emailSchema: z.ZodString;
@@ -34,6 +34,34 @@ export const mediaUrlSchema = z
34
34
  }, { message: "Image or video URL must be hosted on an approved CDN domain" });
35
35
  export const dateStringSchema = z.string().datetime();
36
36
  // ============================================
37
+ // SHARED PRIMITIVES (W2-4 — 2026-05-23)
38
+ // Use these instead of redefining the same validators in feature schemas.
39
+ // ============================================
40
+ /** Monetary value in paise — non-negative integer. Use for `price`, `mrp`, `discount`, etc. */
41
+ export const priceSchema = z.number().int().min(0, "Price must be non-negative (paise)");
42
+ /** Discount percentage — 0–100. */
43
+ export const discountPercentSchema = z.number().min(0).max(100);
44
+ /** Bounded image-array schema factory — caps gallery length. */
45
+ export const imageArraySchema = (max) => z.array(mediaUrlSchema).max(max, `At most ${max} images allowed`);
46
+ /** Slug regex factory. Pass the `<prefix>-` token (e.g. `"product-"`) to enforce prefix discipline. */
47
+ export const createSlugValidator = (prefix) => prefix
48
+ ? z
49
+ .string()
50
+ .min(prefix.length + 1)
51
+ .regex(new RegExp(`^${prefix}[a-z0-9-]+$`), `Slug must start with "${prefix}"`)
52
+ : z.string().min(1).regex(/^[a-z0-9-]+$/, "Slug may only contain lowercase letters, numbers and hyphens");
53
+ /** A Firestore Timestamp converted to JS Date — accepts string or Date instances. */
54
+ export const timestampSchema = z.union([z.string().datetime(), z.date()]);
55
+ /** Standard `createdAt`/`updatedAt` block — fold into doc schemas with `.merge(timestampsSchema)`. */
56
+ export const timestampsSchema = z.object({
57
+ createdAt: timestampSchema,
58
+ updatedAt: timestampSchema,
59
+ });
60
+ /** Non-empty trimmed string with a length cap. */
61
+ export const nonEmptyString = (max = 255) => z.string().trim().min(1, "Required").max(max, `Must be at most ${max} characters`);
62
+ /** Optional rich-text body — uses the HTML schema (plain length cap). */
63
+ export const richTextBodySchema = (max = 50000) => z.string().trim().max(max, `Body must be at most ${max} characters`);
64
+ // ============================================
37
65
  // AUTH / USER SCHEMAS
38
66
  // ============================================
39
67
  export const passwordSchema = z
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mohasinac/appkit",
3
- "version": "2.7.59",
3
+ "version": "2.8.0",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"