@mohasinac/appkit 2.6.3 → 2.6.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 (615) hide show
  1. package/dist/_internal/server/features/account/data.js +2 -2
  2. package/dist/_internal/server/features/bundles/data.d.ts +26 -6
  3. package/dist/_internal/server/features/bundles/data.js +41 -6
  4. package/dist/_internal/server/features/bundles/index.d.ts +3 -2
  5. package/dist/_internal/server/features/bundles/index.js +4 -2
  6. package/dist/_internal/server/features/bundles/metadata.d.ts +20 -0
  7. package/dist/_internal/server/features/bundles/metadata.js +46 -0
  8. package/dist/_internal/server/features/bundles/og.d.ts +38 -0
  9. package/dist/_internal/server/features/bundles/og.js +122 -0
  10. package/dist/_internal/server/features/checkout/actions.js +192 -133
  11. package/dist/_internal/server/features/checkout/bundle-expansion.d.ts +57 -0
  12. package/dist/_internal/server/features/checkout/bundle-expansion.js +70 -0
  13. package/dist/_internal/server/features/checkout/prize-bundle-gates.d.ts +5 -15
  14. package/dist/_internal/server/features/checkout/prize-bundle-gates.js +5 -21
  15. package/dist/_internal/server/features/media/contextGuards.js +15 -1
  16. package/dist/_internal/server/features/payouts/actions.d.ts +19 -0
  17. package/dist/_internal/server/features/payouts/actions.js +38 -0
  18. package/dist/_internal/server/features/products/data.js +1 -2
  19. package/dist/_internal/server/features/raffle/actions.d.ts +11 -0
  20. package/dist/_internal/server/features/raffle/actions.js +31 -0
  21. package/dist/_internal/server/features/refunds/actions.d.ts +31 -0
  22. package/dist/_internal/server/features/refunds/actions.js +77 -0
  23. package/dist/_internal/server/jobs/core/adminAnalytics.d.ts +28 -0
  24. package/dist/_internal/server/jobs/core/adminAnalytics.js +98 -0
  25. package/dist/_internal/server/jobs/core/assignSpinPrize.d.ts +19 -0
  26. package/dist/_internal/server/jobs/core/assignSpinPrize.js +81 -0
  27. package/dist/_internal/server/jobs/core/auctionSettlement.d.ts +2 -0
  28. package/dist/_internal/server/jobs/core/auctionSettlement.js +70 -0
  29. package/dist/_internal/server/jobs/core/autoPayoutEligibility.d.ts +2 -0
  30. package/dist/_internal/server/jobs/core/autoPayoutEligibility.js +109 -0
  31. package/dist/_internal/server/jobs/core/bundleStockSync.d.ts +10 -0
  32. package/dist/_internal/server/jobs/core/bundleStockSync.js +71 -0
  33. package/dist/_internal/server/jobs/core/cartPrune.d.ts +2 -0
  34. package/dist/_internal/server/jobs/core/cartPrune.js +13 -0
  35. package/dist/_internal/server/jobs/core/cleanupRtdbEvents.d.ts +2 -0
  36. package/dist/_internal/server/jobs/core/cleanupRtdbEvents.js +45 -0
  37. package/dist/_internal/server/jobs/core/countersReconcile.d.ts +2 -0
  38. package/dist/_internal/server/jobs/core/countersReconcile.js +107 -0
  39. package/dist/_internal/server/jobs/core/couponExpiry.d.ts +2 -0
  40. package/dist/_internal/server/jobs/core/couponExpiry.js +13 -0
  41. package/dist/_internal/server/jobs/core/dailyDataCleanup.d.ts +2 -0
  42. package/dist/_internal/server/jobs/core/dailyDataCleanup.js +20 -0
  43. package/dist/_internal/server/jobs/core/index.d.ts +44 -0
  44. package/dist/_internal/server/jobs/core/index.js +47 -0
  45. package/dist/_internal/server/jobs/core/listingProcessor.d.ts +30 -0
  46. package/dist/_internal/server/jobs/core/listingProcessor.js +138 -0
  47. package/dist/_internal/server/jobs/core/mediaTmpCleanup.d.ts +14 -0
  48. package/dist/_internal/server/jobs/core/mediaTmpCleanup.js +68 -0
  49. package/dist/_internal/server/jobs/core/notificationPrune.d.ts +2 -0
  50. package/dist/_internal/server/jobs/core/notificationPrune.js +13 -0
  51. package/dist/_internal/server/jobs/core/offerExpiry.d.ts +2 -0
  52. package/dist/_internal/server/jobs/core/offerExpiry.js +50 -0
  53. package/dist/_internal/server/jobs/core/onBidPlaced.d.ts +15 -0
  54. package/dist/_internal/server/jobs/core/onBidPlaced.js +59 -0
  55. package/dist/_internal/server/jobs/core/onCategoryWrite.d.ts +14 -0
  56. package/dist/_internal/server/jobs/core/onCategoryWrite.js +134 -0
  57. package/dist/_internal/server/jobs/core/onOrderCreate.d.ts +18 -0
  58. package/dist/_internal/server/jobs/core/onOrderCreate.js +78 -0
  59. package/dist/_internal/server/jobs/core/onOrderStatusChange.d.ts +19 -0
  60. package/dist/_internal/server/jobs/core/onOrderStatusChange.js +139 -0
  61. package/dist/_internal/server/jobs/core/onProductStockChange.d.ts +23 -0
  62. package/dist/_internal/server/jobs/core/onProductStockChange.js +130 -0
  63. package/dist/_internal/server/jobs/core/onProductWrite.d.ts +12 -0
  64. package/dist/_internal/server/jobs/core/onProductWrite.js +94 -0
  65. package/dist/_internal/server/jobs/core/onReviewWrite.d.ts +7 -0
  66. package/dist/_internal/server/jobs/core/onReviewWrite.js +49 -0
  67. package/dist/_internal/server/jobs/core/onStoreWrite.d.ts +12 -0
  68. package/dist/_internal/server/jobs/core/onStoreWrite.js +7 -0
  69. package/dist/_internal/server/jobs/core/payoutBatch.d.ts +8 -0
  70. package/dist/_internal/server/jobs/core/payoutBatch.js +102 -0
  71. package/dist/_internal/server/jobs/core/pendingOrderTimeout.d.ts +2 -0
  72. package/dist/_internal/server/jobs/core/pendingOrderTimeout.js +27 -0
  73. package/dist/_internal/server/jobs/core/positionsReconcile.d.ts +7 -0
  74. package/dist/_internal/server/jobs/core/positionsReconcile.js +87 -0
  75. package/dist/_internal/server/jobs/core/prizeRevealClose.d.ts +2 -0
  76. package/dist/_internal/server/jobs/core/prizeRevealClose.js +22 -0
  77. package/dist/_internal/server/jobs/core/prizeRevealExpiry.d.ts +2 -0
  78. package/dist/_internal/server/jobs/core/prizeRevealExpiry.js +50 -0
  79. package/dist/_internal/server/jobs/core/prizeRevealOpen.d.ts +2 -0
  80. package/dist/_internal/server/jobs/core/prizeRevealOpen.js +56 -0
  81. package/dist/_internal/server/jobs/core/prizeRevealReminder.d.ts +2 -0
  82. package/dist/_internal/server/jobs/core/prizeRevealReminder.js +38 -0
  83. package/dist/_internal/server/jobs/core/productStatsSync.d.ts +8 -0
  84. package/dist/_internal/server/jobs/core/productStatsSync.js +36 -0
  85. package/dist/_internal/server/jobs/core/promotions.d.ts +12 -0
  86. package/dist/_internal/server/jobs/core/promotions.js +43 -0
  87. package/dist/_internal/server/jobs/core/storeAnalytics.d.ts +30 -0
  88. package/dist/_internal/server/jobs/core/storeAnalytics.js +109 -0
  89. package/dist/_internal/server/jobs/core/triggerEventRaffle.d.ts +19 -0
  90. package/dist/_internal/server/jobs/core/triggerEventRaffle.js +86 -0
  91. package/dist/_internal/server/jobs/core/weeklyPayoutEligibility.d.ts +6 -0
  92. package/dist/_internal/server/jobs/core/weeklyPayoutEligibility.js +85 -0
  93. package/dist/_internal/server/jobs/handlers/adminAnalytics.d.ts +2 -26
  94. package/dist/_internal/server/jobs/handlers/adminAnalytics.js +2 -98
  95. package/dist/_internal/server/jobs/handlers/assignSpinPrize.d.ts +1 -22
  96. package/dist/_internal/server/jobs/handlers/assignSpinPrize.js +2 -86
  97. package/dist/_internal/server/jobs/handlers/auctionSettlement.js +2 -70
  98. package/dist/_internal/server/jobs/handlers/autoPayoutEligibility.js +2 -110
  99. package/dist/_internal/server/jobs/handlers/bundleStockSync.d.ts +0 -16
  100. package/dist/_internal/server/jobs/handlers/bundleStockSync.js +2 -80
  101. package/dist/_internal/server/jobs/handlers/cartPrune.js +2 -13
  102. package/dist/_internal/server/jobs/handlers/cleanupRtdbEvents.js +2 -45
  103. package/dist/_internal/server/jobs/handlers/countersReconcile.js +2 -109
  104. package/dist/_internal/server/jobs/handlers/couponExpiry.js +2 -13
  105. package/dist/_internal/server/jobs/handlers/dailyDataCleanup.js +2 -20
  106. package/dist/_internal/server/jobs/handlers/listingProcessor.d.ts +3 -28
  107. package/dist/_internal/server/jobs/handlers/listingProcessor.js +3 -138
  108. package/dist/_internal/server/jobs/handlers/mediaTmpCleanup.d.ts +0 -12
  109. package/dist/_internal/server/jobs/handlers/mediaTmpCleanup.js +2 -69
  110. package/dist/_internal/server/jobs/handlers/notificationPrune.js +2 -13
  111. package/dist/_internal/server/jobs/handlers/offerExpiry.js +2 -50
  112. package/dist/_internal/server/jobs/handlers/onBidPlaced.d.ts +1 -10
  113. package/dist/_internal/server/jobs/handlers/onBidPlaced.js +2 -56
  114. package/dist/_internal/server/jobs/handlers/onCategoryWrite.d.ts +1 -8
  115. package/dist/_internal/server/jobs/handlers/onCategoryWrite.js +6 -134
  116. package/dist/_internal/server/jobs/handlers/onOrderCreate.d.ts +1 -12
  117. package/dist/_internal/server/jobs/handlers/onOrderCreate.js +2 -76
  118. package/dist/_internal/server/jobs/handlers/onOrderStatusChange.d.ts +1 -12
  119. package/dist/_internal/server/jobs/handlers/onOrderStatusChange.js +2 -139
  120. package/dist/_internal/server/jobs/handlers/onProductStockChange.d.ts +0 -13
  121. package/dist/_internal/server/jobs/handlers/onProductStockChange.js +7 -134
  122. package/dist/_internal/server/jobs/handlers/onProductWrite.d.ts +1 -6
  123. package/dist/_internal/server/jobs/handlers/onProductWrite.js +6 -106
  124. package/dist/_internal/server/jobs/handlers/onReviewWrite.js +2 -49
  125. package/dist/_internal/server/jobs/handlers/onStoreWrite.d.ts +1 -8
  126. package/dist/_internal/server/jobs/handlers/onStoreWrite.js +7 -8
  127. package/dist/_internal/server/jobs/handlers/payoutBatch.d.ts +0 -9
  128. package/dist/_internal/server/jobs/handlers/payoutBatch.js +2 -104
  129. package/dist/_internal/server/jobs/handlers/pendingOrderTimeout.d.ts +0 -6
  130. package/dist/_internal/server/jobs/handlers/pendingOrderTimeout.js +2 -33
  131. package/dist/_internal/server/jobs/handlers/positionsReconcile.d.ts +0 -5
  132. package/dist/_internal/server/jobs/handlers/positionsReconcile.js +2 -87
  133. package/dist/_internal/server/jobs/handlers/prizeRevealClose.d.ts +0 -7
  134. package/dist/_internal/server/jobs/handlers/prizeRevealClose.js +2 -29
  135. package/dist/_internal/server/jobs/handlers/prizeRevealExpiry.d.ts +0 -8
  136. package/dist/_internal/server/jobs/handlers/prizeRevealExpiry.js +2 -58
  137. package/dist/_internal/server/jobs/handlers/prizeRevealOpen.d.ts +0 -8
  138. package/dist/_internal/server/jobs/handlers/prizeRevealOpen.js +2 -65
  139. package/dist/_internal/server/jobs/handlers/prizeRevealReminder.d.ts +0 -7
  140. package/dist/_internal/server/jobs/handlers/prizeRevealReminder.js +2 -45
  141. package/dist/_internal/server/jobs/handlers/productStatsSync.d.ts +0 -6
  142. package/dist/_internal/server/jobs/handlers/productStatsSync.js +2 -36
  143. package/dist/_internal/server/jobs/handlers/promotions.d.ts +2 -10
  144. package/dist/_internal/server/jobs/handlers/promotions.js +2 -43
  145. package/dist/_internal/server/jobs/handlers/storeAnalytics.d.ts +2 -28
  146. package/dist/_internal/server/jobs/handlers/storeAnalytics.js +2 -109
  147. package/dist/_internal/server/jobs/handlers/triggerEventRaffle.d.ts +1 -28
  148. package/dist/_internal/server/jobs/handlers/triggerEventRaffle.js +2 -94
  149. package/dist/_internal/server/jobs/handlers/weeklyPayoutEligibility.d.ts +0 -6
  150. package/dist/_internal/server/jobs/handlers/weeklyPayoutEligibility.js +2 -87
  151. package/dist/_internal/server/jobs/index.d.ts +1 -0
  152. package/dist/_internal/server/jobs/index.js +1 -0
  153. package/dist/_internal/server/jobs/runtime/adapters/firebase.js +21 -0
  154. package/dist/_internal/shared/actions/action-registry.d.ts +84 -0
  155. package/dist/_internal/shared/actions/action-registry.js +160 -0
  156. package/dist/_internal/shared/checkout/rules/_defaults.d.ts +3 -0
  157. package/dist/_internal/shared/checkout/rules/_defaults.js +22 -0
  158. package/dist/_internal/shared/checkout/rules/_limits.d.ts +19 -0
  159. package/dist/_internal/shared/checkout/rules/_limits.js +19 -0
  160. package/dist/_internal/shared/checkout/rules/_registry.d.ts +44 -0
  161. package/dist/_internal/shared/checkout/rules/_registry.js +87 -0
  162. package/dist/_internal/shared/checkout/rules/auction.rule.d.ts +2 -0
  163. package/dist/_internal/shared/checkout/rules/auction.rule.js +10 -0
  164. package/dist/_internal/shared/checkout/rules/bundle.rule.d.ts +11 -0
  165. package/dist/_internal/shared/checkout/rules/bundle.rule.js +6 -0
  166. package/dist/_internal/shared/checkout/rules/classified.rule.d.ts +9 -0
  167. package/dist/_internal/shared/checkout/rules/classified.rule.js +9 -0
  168. package/dist/_internal/shared/checkout/rules/digital-code.rule.d.ts +8 -0
  169. package/dist/_internal/shared/checkout/rules/digital-code.rule.js +6 -0
  170. package/dist/_internal/shared/checkout/rules/index.d.ts +12 -0
  171. package/dist/_internal/shared/checkout/rules/index.js +12 -0
  172. package/dist/_internal/shared/checkout/rules/live.rule.d.ts +10 -0
  173. package/dist/_internal/shared/checkout/rules/live.rule.js +6 -0
  174. package/dist/_internal/shared/checkout/rules/offer.rule.d.ts +2 -0
  175. package/dist/_internal/shared/checkout/rules/offer.rule.js +9 -0
  176. package/dist/_internal/shared/checkout/rules/preorder.rule.d.ts +2 -0
  177. package/dist/_internal/shared/checkout/rules/preorder.rule.js +28 -0
  178. package/dist/_internal/shared/checkout/rules/prize-draw.rule.d.ts +2 -0
  179. package/dist/_internal/shared/checkout/rules/prize-draw.rule.js +65 -0
  180. package/dist/_internal/shared/checkout/rules/standard.rule.d.ts +2 -0
  181. package/dist/_internal/shared/checkout/rules/standard.rule.js +5 -0
  182. package/dist/_internal/shared/checkout/rules/types.d.ts +125 -0
  183. package/dist/_internal/shared/checkout/rules/types.js +13 -0
  184. package/dist/_internal/shared/features/cart/schema.d.ts +6 -6
  185. package/dist/_internal/shared/features/categories/bundle-copy.d.ts +123 -0
  186. package/dist/_internal/shared/features/categories/bundle-copy.js +134 -0
  187. package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +318 -0
  188. package/dist/_internal/shared/features/categories/bundle-schemas.js +55 -0
  189. package/dist/_internal/shared/features/events/schema.d.ts +4 -4
  190. package/dist/_internal/shared/features/orders/refund-copy.d.ts +36 -0
  191. package/dist/_internal/shared/features/orders/refund-copy.js +40 -0
  192. package/dist/_internal/shared/features/orders/schema.d.ts +4 -4
  193. package/dist/_internal/shared/features/products/schema.d.ts +8 -8
  194. package/dist/_internal/shared/listing-types/_registry.d.ts +27 -0
  195. package/dist/_internal/shared/listing-types/_registry.js +8 -0
  196. package/dist/_internal/shared/listing-types/action-tracker.d.ts +41 -0
  197. package/dist/_internal/shared/listing-types/action-tracker.js +70 -0
  198. package/dist/_internal/shared/listing-types/capabilities.js +25 -0
  199. package/dist/_internal/shared/listing-types/cart-shipping.d.ts +37 -0
  200. package/dist/_internal/shared/listing-types/cart-shipping.js +46 -0
  201. package/dist/_internal/shared/listing-types/classified/config.d.ts +7 -0
  202. package/dist/_internal/shared/listing-types/classified/config.js +8 -0
  203. package/dist/_internal/shared/listing-types/classified/ctas.d.ts +1 -0
  204. package/dist/_internal/shared/listing-types/classified/ctas.js +3 -0
  205. package/dist/_internal/shared/listing-types/classified/og.d.ts +1 -0
  206. package/dist/_internal/shared/listing-types/classified/og.js +1 -0
  207. package/dist/_internal/shared/listing-types/classified/schema.d.ts +1 -0
  208. package/dist/_internal/shared/listing-types/classified/schema.js +1 -0
  209. package/dist/_internal/shared/listing-types/classified/seed-factory.d.ts +1 -0
  210. package/dist/_internal/shared/listing-types/classified/seed-factory.js +1 -0
  211. package/dist/_internal/shared/listing-types/digital-code/config.d.ts +7 -0
  212. package/dist/_internal/shared/listing-types/digital-code/config.js +8 -0
  213. package/dist/_internal/shared/listing-types/digital-code/ctas.d.ts +1 -0
  214. package/dist/_internal/shared/listing-types/digital-code/ctas.js +3 -0
  215. package/dist/_internal/shared/listing-types/digital-code/og.d.ts +1 -0
  216. package/dist/_internal/shared/listing-types/digital-code/og.js +1 -0
  217. package/dist/_internal/shared/listing-types/digital-code/schema.d.ts +1 -0
  218. package/dist/_internal/shared/listing-types/digital-code/schema.js +1 -0
  219. package/dist/_internal/shared/listing-types/digital-code/seed-factory.d.ts +1 -0
  220. package/dist/_internal/shared/listing-types/digital-code/seed-factory.js +1 -0
  221. package/dist/_internal/shared/listing-types/feature-flags.d.ts +34 -0
  222. package/dist/_internal/shared/listing-types/feature-flags.js +45 -0
  223. package/dist/_internal/shared/listing-types/live/config.d.ts +7 -0
  224. package/dist/_internal/shared/listing-types/live/config.js +8 -0
  225. package/dist/_internal/shared/listing-types/live/ctas.d.ts +1 -0
  226. package/dist/_internal/shared/listing-types/live/ctas.js +3 -0
  227. package/dist/_internal/shared/listing-types/live/og.d.ts +1 -0
  228. package/dist/_internal/shared/listing-types/live/og.js +1 -0
  229. package/dist/_internal/shared/listing-types/live/schema.d.ts +1 -0
  230. package/dist/_internal/shared/listing-types/live/schema.js +1 -0
  231. package/dist/_internal/shared/listing-types/live/seed-factory.d.ts +1 -0
  232. package/dist/_internal/shared/listing-types/live/seed-factory.js +1 -0
  233. package/dist/_internal/shared/media/limits.js +8 -0
  234. package/dist/client.d.ts +10 -5
  235. package/dist/client.js +16 -3
  236. package/dist/configs/next.js +7 -0
  237. package/dist/constants/api-endpoints.d.ts +6 -0
  238. package/dist/constants/api-endpoints.js +4 -0
  239. package/dist/core/hooks/useSyncManager.js +13 -1
  240. package/dist/core/unit-of-work.d.ts +1 -1
  241. package/dist/core/unit-of-work.js +2 -2
  242. package/dist/features/account/actions/address-actions.d.ts +1 -1
  243. package/dist/features/account/actions/address-actions.js +15 -7
  244. package/dist/features/account/schemas/firestore.d.ts +8 -43
  245. package/dist/features/account/schemas/firestore.js +8 -54
  246. package/dist/features/account/schemas/index.d.ts +6 -6
  247. package/dist/features/account/server.d.ts +1 -1
  248. package/dist/features/account/server.js +3 -1
  249. package/dist/features/addresses/index.d.ts +2 -0
  250. package/dist/features/addresses/index.js +2 -0
  251. package/dist/features/addresses/repository/addresses.repository.d.ts +29 -0
  252. package/dist/features/addresses/repository/addresses.repository.js +157 -0
  253. package/dist/features/addresses/schemas/firestore.d.ts +53 -0
  254. package/dist/features/addresses/schemas/firestore.js +68 -0
  255. package/dist/features/{bundles → addresses}/schemas/index.d.ts +0 -1
  256. package/dist/features/{bundles → addresses}/schemas/index.js +0 -1
  257. package/dist/features/addresses/server.d.ts +2 -0
  258. package/dist/features/addresses/server.js +2 -0
  259. package/dist/features/admin/components/AdminAllEventEntriesView.js +4 -3
  260. package/dist/features/admin/components/AdminBidsView.js +4 -3
  261. package/dist/features/admin/components/AdminBlogView.js +8 -3
  262. package/dist/features/admin/components/AdminBundleEditorView.d.ts +9 -0
  263. package/dist/features/admin/components/AdminBundleEditorView.js +209 -0
  264. package/dist/features/admin/components/AdminBundlesView.d.ts +9 -0
  265. package/dist/features/admin/components/AdminBundlesView.js +59 -0
  266. package/dist/features/admin/components/AdminCartsView.js +13 -3
  267. package/dist/features/admin/components/AdminContactView.js +4 -3
  268. package/dist/features/admin/components/AdminCouponsView.js +32 -13
  269. package/dist/features/admin/components/AdminNewsletterView.js +4 -3
  270. package/dist/features/admin/components/AdminOrdersView.js +15 -7
  271. package/dist/features/admin/components/AdminPayoutsView.js +4 -3
  272. package/dist/features/admin/components/AdminPrizeDrawsView.d.ts +4 -0
  273. package/dist/features/admin/components/AdminPrizeDrawsView.js +135 -0
  274. package/dist/features/admin/components/AdminProductsView.js +6 -5
  275. package/dist/features/admin/components/AdminReviewsView.js +5 -4
  276. package/dist/features/admin/components/AdminStoresView.js +4 -3
  277. package/dist/features/admin/components/AdminUsersView.js +15 -5
  278. package/dist/features/admin/components/AdminWishlistsView.js +10 -1
  279. package/dist/features/admin/components/DataTable.d.ts +5 -1
  280. package/dist/features/admin/components/DataTable.js +24 -20
  281. package/dist/features/admin/components/index.d.ts +6 -0
  282. package/dist/features/admin/components/index.js +5 -0
  283. package/dist/features/admin/constants/filter-tabs.d.ts +435 -0
  284. package/dist/features/admin/constants/filter-tabs.js +216 -0
  285. package/dist/features/admin/hooks/useAdminListingData.d.ts +1 -0
  286. package/dist/features/admin/hooks/useAdminListingData.js +1 -0
  287. package/dist/features/admin/schemas/firestore.d.ts +15 -0
  288. package/dist/features/admin/schemas/firestore.js +18 -0
  289. package/dist/features/admin/types/product.types.d.ts +2 -2
  290. package/dist/features/auctions/components/AuctionCard.d.ts +4 -1
  291. package/dist/features/auctions/components/AuctionCard.js +5 -3
  292. package/dist/features/auctions/components/AuctionDetailPageView.js +1 -1
  293. package/dist/features/auctions/components/MarketplaceAuctionCard.d.ts +2 -2
  294. package/dist/features/auctions/components/PlaceBidFormClient.js +12 -2
  295. package/dist/features/auctions/schemas/index.d.ts +2 -2
  296. package/dist/features/auth/index.d.ts +1 -0
  297. package/dist/features/auth/index.js +1 -0
  298. package/dist/features/auth/role-predicates.d.ts +16 -0
  299. package/dist/features/auth/role-predicates.js +15 -0
  300. package/dist/features/blog/components/BlogFeaturedCard.d.ts +4 -1
  301. package/dist/features/blog/components/BlogFeaturedCard.js +5 -3
  302. package/dist/features/cart/actions/cart-actions.d.ts +1 -0
  303. package/dist/features/cart/actions/cart-actions.js +16 -0
  304. package/dist/features/cart/components/CartView.d.ts +19 -1
  305. package/dist/features/cart/components/CartView.js +2 -2
  306. package/dist/features/cart/components/ShippingPicker.d.ts +13 -0
  307. package/dist/features/cart/components/ShippingPicker.js +48 -0
  308. package/dist/features/cart/components/index.d.ts +3 -1
  309. package/dist/features/cart/components/index.js +1 -0
  310. package/dist/features/cart/hooks/useCartCount.js +7 -1
  311. package/dist/features/cart/repository/cart.repository.d.ts +1 -0
  312. package/dist/features/cart/repository/cart.repository.js +35 -0
  313. package/dist/features/cart/schemas/firestore.d.ts +27 -2
  314. package/dist/features/categories/components/BundleAddToCartCta.d.ts +16 -0
  315. package/dist/features/categories/components/BundleAddToCartCta.js +54 -0
  316. package/dist/features/categories/components/BundleBuyNowCta.d.ts +8 -0
  317. package/dist/features/categories/components/BundleBuyNowCta.js +37 -0
  318. package/dist/features/categories/components/BundleDetailView.d.ts +22 -0
  319. package/dist/features/categories/components/BundleDetailView.js +31 -0
  320. package/dist/features/categories/components/BundleDynamicRuleEditor.d.ts +18 -0
  321. package/dist/features/categories/components/BundleDynamicRuleEditor.js +60 -0
  322. package/dist/features/categories/components/BundleItemsPicker.d.ts +26 -0
  323. package/dist/features/categories/components/BundleItemsPicker.js +135 -0
  324. package/dist/features/categories/components/BundlesListView.d.ts +13 -0
  325. package/dist/features/categories/components/BundlesListView.js +27 -0
  326. package/dist/features/categories/components/index.d.ts +12 -0
  327. package/dist/features/categories/components/index.js +9 -0
  328. package/dist/features/checkout/actions/checkout-actions.js +10 -3
  329. package/dist/features/events/components/AdminEventEditorView.js +108 -2
  330. package/dist/features/events/components/AdminEventsView.js +16 -4
  331. package/dist/features/events/components/EventCard.d.ts +4 -1
  332. package/dist/features/events/components/EventCard.js +7 -3
  333. package/dist/features/events/components/EventRaffleWinnerView.d.ts +21 -0
  334. package/dist/features/events/components/EventRaffleWinnerView.js +18 -0
  335. package/dist/features/events/components/SpinWheelView.d.ts +27 -0
  336. package/dist/features/events/components/SpinWheelView.js +64 -0
  337. package/dist/features/events/components/index.d.ts +4 -0
  338. package/dist/features/events/components/index.js +2 -0
  339. package/dist/features/events/schemas/firestore.d.ts +27 -1
  340. package/dist/features/events/schemas/firestore.js +7 -0
  341. package/dist/features/events/types/index.d.ts +27 -1
  342. package/dist/features/homepage/components/FeaturedBundlesSection.d.ts +16 -0
  343. package/dist/features/homepage/components/FeaturedBundlesSection.js +24 -0
  344. package/dist/features/homepage/components/MarketplaceHomepageView.js +4 -1
  345. package/dist/features/homepage/components/WhatsAppCommunitySection.js +2 -2
  346. package/dist/features/homepage/lib/section-renderer.d.ts +2 -0
  347. package/dist/features/homepage/lib/section-renderer.js +5 -5
  348. package/dist/features/layout/NavbarLayout.d.ts +3 -1
  349. package/dist/features/layout/NavbarLayout.js +32 -3
  350. package/dist/features/layout/TitleBarLayout.d.ts +6 -3
  351. package/dist/features/layout/TitleBarLayout.js +22 -7
  352. package/dist/features/media/upload/MediaUploadField.d.ts +15 -1
  353. package/dist/features/media/upload/MediaUploadField.js +22 -1
  354. package/dist/features/orders/components/MarketplaceOrderCard.js +4 -2
  355. package/dist/features/orders/components/OrderSiblingPayments.d.ts +8 -0
  356. package/dist/features/orders/components/OrderSiblingPayments.js +16 -0
  357. package/dist/features/orders/components/RefundHistoryTable.d.ts +6 -0
  358. package/dist/features/orders/components/RefundHistoryTable.js +23 -0
  359. package/dist/features/orders/components/RefundRequestView.d.ts +8 -0
  360. package/dist/features/orders/components/RefundRequestView.js +42 -0
  361. package/dist/features/orders/components/index.d.ts +6 -0
  362. package/dist/features/orders/components/index.js +3 -0
  363. package/dist/features/orders/index.d.ts +1 -0
  364. package/dist/features/orders/index.js +2 -0
  365. package/dist/features/orders/repository/orders.repository.d.ts +20 -1
  366. package/dist/features/orders/repository/orders.repository.js +30 -1
  367. package/dist/features/orders/schemas/firestore.d.ts +63 -13
  368. package/dist/features/orders/schemas/firestore.js +5 -5
  369. package/dist/features/orders/schemas/index.d.ts +4 -4
  370. package/dist/features/orders/types/index.d.ts +12 -2
  371. package/dist/features/orders/utils/bundle-grouping.d.ts +48 -0
  372. package/dist/features/orders/utils/bundle-grouping.js +54 -0
  373. package/dist/features/orders/utils/order-splitter.d.ts +9 -10
  374. package/dist/features/orders/utils/order-splitter.js +24 -30
  375. package/dist/features/payments/repository/payout.repository.d.ts +17 -1
  376. package/dist/features/payments/repository/payout.repository.js +47 -0
  377. package/dist/features/payments/schemas/firestore.d.ts +26 -0
  378. package/dist/features/pre-orders/components/PreorderCard.d.ts +4 -1
  379. package/dist/features/pre-orders/components/PreorderCard.js +8 -6
  380. package/dist/features/products/actions/product-actions.d.ts +1 -1
  381. package/dist/features/products/actions/product-actions.js +1 -1
  382. package/dist/features/products/components/CompareOverlay.d.ts +2 -2
  383. package/dist/features/products/components/CompareOverlay.js +4 -4
  384. package/dist/features/products/components/InteractiveProductCard.js +7 -12
  385. package/dist/features/products/components/NonRefundableConsentModal.d.ts +1 -1
  386. package/dist/features/products/components/NonRefundableConsentModal.js +0 -10
  387. package/dist/features/products/components/ProductGrid.js +28 -12
  388. package/dist/features/products/components/ShowGroupSection.js +3 -3
  389. package/dist/features/products/components/SublistingCarouselSection.js +2 -2
  390. package/dist/features/products/components/index.d.ts +0 -4
  391. package/dist/features/products/components/index.js +5 -2
  392. package/dist/features/products/index.d.ts +1 -1
  393. package/dist/features/products/index.js +3 -1
  394. package/dist/features/products/repository/products.repository.js +4 -0
  395. package/dist/features/products/schemas/catalog-product.d.ts +70 -0
  396. package/dist/features/products/schemas/catalog-product.js +50 -0
  397. package/dist/features/products/schemas/firestore.d.ts +110 -2
  398. package/dist/features/products/schemas/firestore.js +30 -0
  399. package/dist/features/products/schemas/index.d.ts +8 -8
  400. package/dist/features/products/types/index.d.ts +1 -1
  401. package/dist/features/products/utils/listing-type.d.ts +9 -0
  402. package/dist/features/products/utils/listing-type.js +4 -0
  403. package/dist/features/promotions/actions/coupon-actions.d.ts +2 -2
  404. package/dist/features/promotions/actions/coupon-actions.js +1 -1
  405. package/dist/features/promotions/components/CouponCard.d.ts +28 -10
  406. package/dist/features/promotions/components/CouponCard.js +116 -14
  407. package/dist/features/promotions/hooks/useCouponValidate.d.ts +1 -1
  408. package/dist/features/promotions/repository/coupons.repository.d.ts +1 -1
  409. package/dist/features/reviews/schemas/index.d.ts +2 -2
  410. package/dist/features/search/schemas/index.d.ts +2 -2
  411. package/dist/features/search/types/index.d.ts +2 -2
  412. package/dist/features/seller/components/SellerAuctionsView.js +4 -5
  413. package/dist/features/seller/components/SellerBidsView.js +5 -13
  414. package/dist/features/seller/components/SellerCouponsView.js +31 -67
  415. package/dist/features/seller/components/SellerOffersView.js +4 -5
  416. package/dist/features/seller/components/SellerOrdersView.js +4 -5
  417. package/dist/features/seller/components/SellerPayoutsView.js +4 -5
  418. package/dist/features/seller/components/SellerPreOrdersView.d.ts +4 -0
  419. package/dist/features/seller/components/SellerPreOrdersView.js +141 -0
  420. package/dist/features/seller/components/SellerPrizeDrawsView.d.ts +4 -0
  421. package/dist/features/seller/components/SellerPrizeDrawsView.js +138 -0
  422. package/dist/features/seller/components/SellerProductsView.js +4 -8
  423. package/dist/features/seller/components/index.d.ts +4 -0
  424. package/dist/features/seller/components/index.js +2 -0
  425. package/dist/features/seller/schemas/index.d.ts +2 -2
  426. package/dist/features/stores/actions/store-address-actions.d.ts +10 -6
  427. package/dist/features/stores/actions/store-address-actions.js +8 -7
  428. package/dist/features/stores/components/InteractiveStoreCard.js +3 -10
  429. package/dist/features/stores/components/StoreDetailLayoutView.js +20 -5
  430. package/dist/features/stores/schemas/firestore.d.ts +45 -38
  431. package/dist/features/stores/schemas/firestore.js +2 -49
  432. package/dist/features/stores/server.d.ts +0 -1
  433. package/dist/features/stores/server.js +2 -1
  434. package/dist/features/wishlist/hooks/useWishlistCount.d.ts +7 -9
  435. package/dist/features/wishlist/hooks/useWishlistCount.js +67 -86
  436. package/dist/features/wishlist/types/index.d.ts +1 -1
  437. package/dist/index.d.ts +56 -9
  438. package/dist/index.js +66 -11
  439. package/dist/next/routing/route-map.d.ts +6 -0
  440. package/dist/next/routing/route-map.js +4 -0
  441. package/dist/providers/db-firebase/admin.d.ts +6 -2
  442. package/dist/providers/db-firebase/admin.js +23 -0
  443. package/dist/repositories/index.d.ts +1 -2
  444. package/dist/repositories/index.js +5 -2
  445. package/dist/security/authorization.d.ts +2 -1
  446. package/dist/security/authorization.js +3 -2
  447. package/dist/seed/actions/demo-seed-actions.d.ts +1 -1
  448. package/dist/seed/bids-seed-data.d.ts +2 -2
  449. package/dist/seed/bids-seed-data.js +77 -2
  450. package/dist/seed/cart-seed-data.d.ts +10 -10
  451. package/dist/seed/cart-seed-data.js +15 -15
  452. package/dist/seed/events-seed-data.js +77 -0
  453. package/dist/seed/manifest.js +16 -8
  454. package/dist/seed/orders-seed-data.js +41 -2
  455. package/dist/seed/payouts-seed-data.js +18 -2
  456. package/dist/seed/stores-seed-data.js +55 -0
  457. package/dist/server-entry.d.ts +1 -0
  458. package/dist/server-entry.js +2 -0
  459. package/dist/server.d.ts +4 -0
  460. package/dist/server.js +8 -0
  461. package/dist/tailwind-utilities.css +1 -1
  462. package/dist/ui/components/FilterChipGroup.d.ts +39 -0
  463. package/dist/ui/components/FilterChipGroup.js +15 -0
  464. package/dist/ui/components/HorizontalScroller.js +32 -7
  465. package/dist/ui/components/HorizontalScroller.style.css +6 -0
  466. package/dist/ui/components/SiteLogo.js +1 -1
  467. package/dist/ui/index.d.ts +2 -0
  468. package/dist/ui/index.js +2 -0
  469. package/dist/utils/id-generators.d.ts +11 -0
  470. package/dist/utils/id-generators.js +16 -0
  471. package/package.json +1 -1
  472. package/dist/_internal/shared/features/bundles/config.d.ts +0 -6
  473. package/dist/_internal/shared/features/bundles/config.js +0 -6
  474. package/dist/_internal/shared/schema-versions.d.ts +0 -76
  475. package/dist/_internal/shared/schema-versions.js +0 -82
  476. package/dist/features/account/migrations.d.ts +0 -2
  477. package/dist/features/account/migrations.js +0 -10
  478. package/dist/features/admin/migrations.d.ts +0 -2
  479. package/dist/features/admin/migrations.js +0 -10
  480. package/dist/features/auctions/migrations.d.ts +0 -2
  481. package/dist/features/auctions/migrations.js +0 -10
  482. package/dist/features/auth/migrations.d.ts +0 -2
  483. package/dist/features/auth/migrations.js +0 -10
  484. package/dist/features/blog/migrations.d.ts +0 -2
  485. package/dist/features/blog/migrations.js +0 -10
  486. package/dist/features/brands/actions/brand-actions.d.ts +0 -2
  487. package/dist/features/brands/actions/brand-actions.js +0 -5
  488. package/dist/features/brands/index.d.ts +0 -3
  489. package/dist/features/brands/index.js +0 -3
  490. package/dist/features/brands/migrations.d.ts +0 -2
  491. package/dist/features/brands/migrations.js +0 -10
  492. package/dist/features/brands/repository/brands.repository.d.ts +0 -13
  493. package/dist/features/brands/repository/brands.repository.js +0 -60
  494. package/dist/features/brands/schemas/index.d.ts +0 -33
  495. package/dist/features/brands/schemas/index.js +0 -15
  496. package/dist/features/brands/server.d.ts +0 -7
  497. package/dist/features/brands/server.js +0 -7
  498. package/dist/features/bundles/components/AdminBundleEditorView.d.ts +0 -8
  499. package/dist/features/bundles/components/AdminBundleEditorView.js +0 -7
  500. package/dist/features/bundles/components/BundleDetailPageView.d.ts +0 -9
  501. package/dist/features/bundles/components/BundleDetailPageView.js +0 -45
  502. package/dist/features/bundles/components/BundleForm.d.ts +0 -12
  503. package/dist/features/bundles/components/BundleForm.js +0 -126
  504. package/dist/features/bundles/components/BundleItemsPicker.d.ts +0 -9
  505. package/dist/features/bundles/components/BundleItemsPicker.js +0 -77
  506. package/dist/features/bundles/components/BundlesByCategoryListing.d.ts +0 -6
  507. package/dist/features/bundles/components/BundlesByCategoryListing.js +0 -50
  508. package/dist/features/bundles/components/BundlesListingView.d.ts +0 -17
  509. package/dist/features/bundles/components/BundlesListingView.js +0 -50
  510. package/dist/features/bundles/components/FeaturedBundlesSection.d.ts +0 -5
  511. package/dist/features/bundles/components/FeaturedBundlesSection.js +0 -55
  512. package/dist/features/bundles/components/SellerBundleCreateView.d.ts +0 -8
  513. package/dist/features/bundles/components/SellerBundleCreateView.js +0 -7
  514. package/dist/features/bundles/components/SellerBundleEditView.d.ts +0 -9
  515. package/dist/features/bundles/components/SellerBundleEditView.js +0 -7
  516. package/dist/features/bundles/components/index.d.ts +0 -18
  517. package/dist/features/bundles/components/index.js +0 -9
  518. package/dist/features/bundles/constants/index.d.ts +0 -32
  519. package/dist/features/bundles/constants/index.js +0 -35
  520. package/dist/features/bundles/index.d.ts +0 -2
  521. package/dist/features/bundles/index.js +0 -2
  522. package/dist/features/bundles/migrations.d.ts +0 -2
  523. package/dist/features/bundles/migrations.js +0 -10
  524. package/dist/features/bundles/repository/bundles.repository.d.ts +0 -36
  525. package/dist/features/bundles/repository/bundles.repository.js +0 -148
  526. package/dist/features/bundles/repository/index.d.ts +0 -1
  527. package/dist/features/bundles/repository/index.js +0 -1
  528. package/dist/features/bundles/schemas/firestore.d.ts +0 -88
  529. package/dist/features/bundles/schemas/firestore.js +0 -29
  530. package/dist/features/bundles/schemas/zod.d.ts +0 -377
  531. package/dist/features/bundles/schemas/zod.js +0 -71
  532. package/dist/features/cart/migrations.d.ts +0 -2
  533. package/dist/features/cart/migrations.js +0 -10
  534. package/dist/features/categories/migrations.d.ts +0 -2
  535. package/dist/features/categories/migrations.js +0 -10
  536. package/dist/features/events/migrations.d.ts +0 -2
  537. package/dist/features/events/migrations.js +0 -10
  538. package/dist/features/faq/migrations.d.ts +0 -2
  539. package/dist/features/faq/migrations.js +0 -10
  540. package/dist/features/grouped/migrations.d.ts +0 -2
  541. package/dist/features/grouped/migrations.js +0 -10
  542. package/dist/features/history/migrations.d.ts +0 -2
  543. package/dist/features/history/migrations.js +0 -10
  544. package/dist/features/messages/migrations.d.ts +0 -2
  545. package/dist/features/messages/migrations.js +0 -10
  546. package/dist/features/orders/migrations.d.ts +0 -2
  547. package/dist/features/orders/migrations.js +0 -10
  548. package/dist/features/payments/migrations.d.ts +0 -2
  549. package/dist/features/payments/migrations.js +0 -10
  550. package/dist/features/products/migrations.d.ts +0 -2
  551. package/dist/features/products/migrations.js +0 -10
  552. package/dist/features/products/repository/sublisting-categories.repository.d.ts +0 -16
  553. package/dist/features/products/repository/sublisting-categories.repository.js +0 -126
  554. package/dist/features/products/schemas/sublisting-categories.d.ts +0 -45
  555. package/dist/features/products/schemas/sublisting-categories.js +0 -16
  556. package/dist/features/promotions/migrations.d.ts +0 -2
  557. package/dist/features/promotions/migrations.js +0 -10
  558. package/dist/features/reviews/migrations.d.ts +0 -2
  559. package/dist/features/reviews/migrations.js +0 -10
  560. package/dist/features/scams/migrations.d.ts +0 -2
  561. package/dist/features/scams/migrations.js +0 -10
  562. package/dist/features/seller/migrations.d.ts +0 -2
  563. package/dist/features/seller/migrations.js +0 -10
  564. package/dist/features/stores/migrations.d.ts +0 -2
  565. package/dist/features/stores/migrations.js +0 -10
  566. package/dist/features/sublisting/migrations.d.ts +0 -2
  567. package/dist/features/sublisting/migrations.js +0 -10
  568. package/dist/features/sublisting/schemas/firestore.d.ts +0 -32
  569. package/dist/features/sublisting/schemas/firestore.js +0 -19
  570. package/dist/features/support/migrations.d.ts +0 -2
  571. package/dist/features/support/migrations.js +0 -10
  572. package/dist/features/wishlist/migrations.d.ts +0 -2
  573. package/dist/features/wishlist/migrations.js +0 -10
  574. package/dist/seed/_bundle-constants.d.ts +0 -14
  575. package/dist/seed/_bundle-constants.js +0 -14
  576. package/dist/seed/anime-figures-seed-data.d.ts +0 -8
  577. package/dist/seed/anime-figures-seed-data.js +0 -1033
  578. package/dist/seed/beyblade-seed-data.d.ts +0 -7
  579. package/dist/seed/beyblade-seed-data.js +0 -1129
  580. package/dist/seed/brands-seed-data.d.ts +0 -7
  581. package/dist/seed/brands-seed-data.js +0 -410
  582. package/dist/seed/bundles-seed-data.d.ts +0 -13
  583. package/dist/seed/bundles-seed-data.js +0 -229
  584. package/dist/seed/cosplay-accessories-seed-data.d.ts +0 -8
  585. package/dist/seed/cosplay-accessories-seed-data.js +0 -647
  586. package/dist/seed/hot-wheels-seed-data.d.ts +0 -7
  587. package/dist/seed/hot-wheels-seed-data.js +0 -1612
  588. package/dist/seed/letitrip-official-seed-data.d.ts +0 -8
  589. package/dist/seed/letitrip-official-seed-data.js +0 -399
  590. package/dist/seed/pokemon-carousel-slides-seed-data.d.ts +0 -8
  591. package/dist/seed/pokemon-carousel-slides-seed-data.js +0 -322
  592. package/dist/seed/pokemon-categories-seed-data.d.ts +0 -24
  593. package/dist/seed/pokemon-categories-seed-data.js +0 -547
  594. package/dist/seed/pokemon-coupons-seed-data.d.ts +0 -6
  595. package/dist/seed/pokemon-coupons-seed-data.js +0 -465
  596. package/dist/seed/pokemon-homepage-sections-seed-data.d.ts +0 -7
  597. package/dist/seed/pokemon-homepage-sections-seed-data.js +0 -241
  598. package/dist/seed/pokemon-products-seed-data.d.ts +0 -9
  599. package/dist/seed/pokemon-products-seed-data.js +0 -1791
  600. package/dist/seed/pokemon-seed-bundle.d.ts +0 -47
  601. package/dist/seed/pokemon-seed-bundle.js +0 -71
  602. package/dist/seed/pokemon-stores-seed-data.d.ts +0 -6
  603. package/dist/seed/pokemon-stores-seed-data.js +0 -179
  604. package/dist/seed/pokemon-users-seed-data.d.ts +0 -6
  605. package/dist/seed/pokemon-users-seed-data.js +0 -521
  606. package/dist/seed/products-seed-data.d.ts +0 -6
  607. package/dist/seed/products-seed-data.js +0 -2530
  608. package/dist/seed/retro-gaming-seed-data.d.ts +0 -8
  609. package/dist/seed/retro-gaming-seed-data.js +0 -801
  610. package/dist/seed/server.d.ts +0 -2
  611. package/dist/seed/server.js +0 -7
  612. package/dist/seed/sublisting-categories-seed-data.d.ts +0 -7
  613. package/dist/seed/sublisting-categories-seed-data.js +0 -159
  614. package/dist/seed/transformers-seed-data.d.ts +0 -7
  615. package/dist/seed/transformers-seed-data.js +0 -530
@@ -2,7 +2,7 @@
2
2
  * Events Firestore Document Types & Constants
3
3
  */
4
4
  import type { MediaField } from "../../media/types";
5
- import type { EventType, EventStatus, EntryReviewStatus, SaleConfig, OfferConfig, PollConfig, SurveyConfig, FeedbackConfig } from "../types";
5
+ import type { EventType, EventStatus, EntryReviewStatus, SaleConfig, OfferConfig, PollConfig, SurveyConfig, FeedbackConfig, RaffleType, SpinPrize } from "../types";
6
6
  export declare const EVENTS_COLLECTION: "events";
7
7
  export declare const EVENT_ENTRIES_COLLECTION: "eventEntries";
8
8
  export interface EventDocument {
@@ -25,6 +25,21 @@ export interface EventDocument {
25
25
  pollConfig?: PollConfig;
26
26
  surveyConfig?: SurveyConfig;
27
27
  feedbackConfig?: FeedbackConfig;
28
+ hasRaffle?: boolean;
29
+ raffleType?: RaffleType;
30
+ raffleTopN?: number;
31
+ rafflePrize?: string;
32
+ rafflePrizeCouponId?: string;
33
+ raffleGithubFunctionUrl?: string;
34
+ raffleWinnerUserId?: string;
35
+ raffleWinnerDisplayName?: string;
36
+ raffleWinnerEntryId?: string;
37
+ raffleTriggeredAt?: Date;
38
+ raffleEntryCount?: number;
39
+ spinPrizes?: SpinPrize[];
40
+ spinMaxPerUser?: number;
41
+ spinWindowStart?: Date;
42
+ spinWindowEnd?: Date;
28
43
  stats: {
29
44
  totalEntries: number;
30
45
  approvedEntries: number;
@@ -48,6 +63,11 @@ export interface EventEntryDocument {
48
63
  reviewedAt?: Date;
49
64
  reviewNote?: string;
50
65
  points?: number;
66
+ raffleEligible?: boolean;
67
+ spinUsed?: boolean;
68
+ spinPrizeId?: string;
69
+ spinPrizeCouponCode?: string | null;
70
+ spinWonAt?: Date;
51
71
  ipAddress?: string;
52
72
  submittedAt: Date;
53
73
  }
@@ -82,6 +102,8 @@ export declare const EVENT_FIELDS: {
82
102
  readonly POLL: EventType;
83
103
  readonly SURVEY: EventType;
84
104
  readonly FEEDBACK: EventType;
105
+ readonly RAFFLE: EventType;
106
+ readonly SPIN_WHEEL: EventType;
85
107
  };
86
108
  readonly STATS: {
87
109
  readonly TOTAL_ENTRIES: "stats.totalEntries";
@@ -113,4 +135,8 @@ export declare const eventQueryHelpers: {
113
135
  readonly byStatus: (status: EventStatus) => readonly ["status", "==", EventStatus];
114
136
  readonly upcoming: (date: Date) => readonly ["startsAt", ">", Date];
115
137
  readonly past: (date: Date) => readonly ["endsAt", "<", Date];
138
+ readonly raffles: () => readonly ["type", "==", EventType];
139
+ readonly spinWheels: () => readonly ["type", "==", EventType];
140
+ readonly withRaffle: () => readonly ["hasRaffle", "==", true];
141
+ readonly raffleNotYetDrawn: () => readonly ["raffleWinnerUserId", "==", null];
116
142
  };
@@ -46,6 +46,8 @@ export const EVENT_FIELDS = {
46
46
  POLL: "poll",
47
47
  SURVEY: "survey",
48
48
  FEEDBACK: "feedback",
49
+ RAFFLE: "raffle",
50
+ SPIN_WHEEL: "spin_wheel",
49
51
  },
50
52
  STATS: {
51
53
  TOTAL_ENTRIES: "stats.totalEntries",
@@ -74,4 +76,9 @@ export const eventQueryHelpers = {
74
76
  byStatus: (status) => ["status", "==", status],
75
77
  upcoming: (date) => ["startsAt", ">", date],
76
78
  past: (date) => ["endsAt", "<", date],
79
+ // SB9 raffle/spin helpers
80
+ raffles: () => ["type", "==", "raffle"],
81
+ spinWheels: () => ["type", "==", "spin_wheel"],
82
+ withRaffle: () => ["hasRaffle", "==", true],
83
+ raffleNotYetDrawn: () => ["raffleWinnerUserId", "==", null],
77
84
  };
@@ -1,5 +1,13 @@
1
1
  import type { MediaField } from "../../media/types/index";
2
- export type EventType = "sale" | "offer" | "poll" | "survey" | "feedback";
2
+ export type EventType = "sale" | "offer" | "poll" | "survey" | "feedback" | "raffle" | "spin_wheel";
3
+ export type RaffleType = "top_n_scorers" | "top_n_participants" | "open_raffle" | "spin_wheel";
4
+ export interface SpinPrize {
5
+ id: string;
6
+ label: string;
7
+ couponId?: string;
8
+ weight: number;
9
+ isActive: boolean;
10
+ }
3
11
  export type EventStatus = "draft" | "active" | "paused" | "ended";
4
12
  export type EntryReviewStatus = "pending" | "approved" | "flagged";
5
13
  export type PollResultsVisibility = "always" | "after_vote" | "after_end";
@@ -72,6 +80,20 @@ export interface EventItem {
72
80
  pollConfig?: PollConfig;
73
81
  surveyConfig?: SurveyConfig;
74
82
  feedbackConfig?: FeedbackConfig;
83
+ hasRaffle?: boolean;
84
+ raffleType?: RaffleType;
85
+ raffleTopN?: number;
86
+ rafflePrize?: string;
87
+ rafflePrizeCouponId?: string;
88
+ raffleGithubFunctionUrl?: string;
89
+ raffleWinnerUserId?: string;
90
+ raffleWinnerDisplayName?: string;
91
+ raffleTriggeredAt?: string;
92
+ raffleEntryCount?: number;
93
+ spinPrizes?: SpinPrize[];
94
+ spinMaxPerUser?: number;
95
+ spinWindowStart?: string;
96
+ spinWindowEnd?: string;
75
97
  stats: {
76
98
  totalEntries: number;
77
99
  approvedEntries: number;
@@ -95,6 +117,10 @@ export interface EventEntryItem {
95
117
  reviewedAt?: string;
96
118
  reviewNote?: string;
97
119
  points?: number;
120
+ raffleEligible?: boolean;
121
+ spinUsed?: boolean;
122
+ spinPrizeId?: string;
123
+ spinWonAt?: string;
98
124
  submittedAt: string;
99
125
  }
100
126
  export interface LeaderboardEntry {
@@ -0,0 +1,16 @@
1
+ /**
2
+ * FeaturedBundlesSection — S-SBUNI-3 2026-05-13 rebuild.
3
+ *
4
+ * Rebuilt after SB-UNI-V deletion. Renders a horizontal grid of bundle
5
+ * cards driven by `initialItems` (CategoryDocument with categoryType:"bundle").
6
+ * Server-friendly — no data fetching here; the renderer passes pre-fetched
7
+ * items from `MarketplaceHomepageView.sectionData.bundles`.
8
+ */
9
+ import type { CategoryDocument } from "../../categories/schemas";
10
+ export interface FeaturedBundlesSectionProps {
11
+ title?: string;
12
+ description?: string;
13
+ initialItems?: CategoryDocument[];
14
+ className?: string;
15
+ }
16
+ export declare function FeaturedBundlesSection({ title, description, initialItems, className, }: FeaturedBundlesSectionProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import Link from "next/link";
3
+ import { Badge, Div, Heading, Row, Section, Stack, Text } from "../../../ui";
4
+ import { ROUTES } from "../../../next/routing/route-map";
5
+ import { formatCurrency } from "../../../utils/number.formatter";
6
+ import { BUNDLE_COPY, BUNDLE_STOCK_VARIANT, } from "../../../_internal/shared/features/categories/bundle-copy";
7
+ const PLACEHOLDER_EMOJI = "📦";
8
+ export function FeaturedBundlesSection({ title = BUNDLE_COPY.featuredDefaultTitle, description, initialItems = [], className = "", }) {
9
+ const items = initialItems.filter((c) => c.categoryType === "bundle");
10
+ return (_jsx(Section, { className: `py-10 ${className}`, children: _jsxs(Stack, { gap: "md", children: [_jsxs(Row, { gap: "sm", align: "center", justify: "between", className: "flex-wrap", children: [_jsxs(Stack, { gap: "xs", children: [_jsx(Heading, { level: 2, className: "text-2xl font-semibold text-zinc-900 dark:text-zinc-100", children: title }), description && (_jsx(Text, { size: "sm", color: "muted", children: description }))] }), _jsx(Link, { href: String(ROUTES.PUBLIC.BUNDLES ?? "/bundles"), className: "text-sm font-medium text-[var(--appkit-color-primary)] hover:underline", children: BUNDLE_COPY.featured.viewAll })] }), items.length === 0 ? (_jsx(Div, { className: "rounded-xl border border-dashed border-zinc-200 py-12 text-center dark:border-zinc-700", children: _jsx(Text, { color: "muted", children: BUNDLE_COPY.featured.empty }) })) : (_jsx(Div, { className: "grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4", children: items.map((bundle) => (_jsx(FeaturedBundleCard, { bundle: bundle }, bundle.id))) }))] }) }));
11
+ }
12
+ function FeaturedBundleCard({ bundle }) {
13
+ const stock = bundle.bundleStockStatus ?? "in_stock";
14
+ const memberCount = bundle.bundleProductIds?.length ?? 0;
15
+ const cover = bundle.display?.coverImage;
16
+ const href = String(ROUTES.PUBLIC.BUNDLE_DETAIL?.(bundle.slug) ?? "#");
17
+ return (_jsxs(Link, { href: href, className: "group rounded-xl border border-zinc-200 bg-white p-3 transition-colors hover:border-zinc-300 dark:border-zinc-800 dark:bg-zinc-900 dark:hover:border-zinc-700", children: [_jsx(Div, { className: "mb-2 aspect-square overflow-hidden rounded-lg bg-zinc-100 dark:bg-zinc-800", children: cover ? (
18
+ // eslint-disable-next-line @next/next/no-img-element, lir/no-raw-media-elements
19
+ _jsx("img", { src: cover, alt: bundle.name, className: "h-full w-full object-cover transition-transform group-hover:scale-105", loading: "lazy" })) : (_jsx(Div, { className: "flex h-full w-full items-center justify-center text-3xl", children: PLACEHOLDER_EMOJI })) }), _jsx(Text, { className: "line-clamp-2 text-sm font-semibold", children: bundle.name }), _jsxs(Row, { gap: "sm", align: "center", className: "mt-1 flex-wrap", children: [_jsx(Text, { size: "sm", weight: "bold", children: bundle.bundlePriceInPaise
20
+ ? formatCurrency(bundle.bundlePriceInPaise / 100, "INR")
21
+ : BUNDLE_COPY.featured.priceFallback }), _jsxs(Text, { size: "xs", color: "muted", children: ["\u00B7 ", BUNDLE_COPY.featured.itemCount(memberCount)] }), stock !== "in_stock" && (_jsx(Badge, { variant: BUNDLE_STOCK_VARIANT[stock], children: stock === "partial"
22
+ ? BUNDLE_COPY.stockBadge.listVariantPartial
23
+ : BUNDLE_COPY.stockBadge.listVariantOutOfStock }))] })] }));
24
+ }
@@ -6,6 +6,7 @@ import { renderSection, AnnouncementBar } from "../lib/section-renderer";
6
6
  import { homepageSectionsRepository } from "../repository/homepage-sections.repository";
7
7
  import { getFeaturedProducts, getFeaturedAuctions, getFeaturedPreOrders } from "../../products/actions/product-actions";
8
8
  import { listTopLevelCategories, listBrandCategories } from "../../categories/actions/category-actions";
9
+ import { listFeaturedBundles } from "../../../_internal/server/features/bundles/data";
9
10
  import { listStores } from "../../stores/actions/store-query-actions";
10
11
  import { getFeaturedBlogPosts } from "../../blog/actions/blog-actions";
11
12
  import { listPublicEvents } from "../../events/actions/event-actions";
@@ -70,12 +71,13 @@ export async function MarketplaceHomepageView({ adSlots, newsletterFormSlot, } =
70
71
  }));
71
72
  // Determine which data-driven section types are active so we only fetch what's needed
72
73
  const activeTypes = new Set(orderedSections.map((s) => s.type));
73
- const [productsResult, auctionsResult, preOrdersResult, categoriesResult, brandsResult, storesResult, blogResult, eventsResult,] = await Promise.all([
74
+ const [productsResult, auctionsResult, preOrdersResult, categoriesResult, brandsResult, bundlesResult, storesResult, blogResult, eventsResult,] = await Promise.all([
74
75
  activeTypes.has("products") ? getFeaturedProducts(12).catch(() => null) : null,
75
76
  activeTypes.has("auctions") ? getFeaturedAuctions(12).catch(() => null) : null,
76
77
  activeTypes.has("pre-orders") ? getFeaturedPreOrders(12).catch(() => null) : null,
77
78
  activeTypes.has("categories") ? listTopLevelCategories(12).catch(() => null) : null,
78
79
  activeTypes.has("brands") ? listBrandCategories(12).catch(() => null) : null,
80
+ activeTypes.has("featured-bundles") ? listFeaturedBundles(8).catch(() => null) : null,
79
81
  activeTypes.has("stores") ? listStores({ pageSize: 8, sorts: "-averageRating" }).catch(() => null) : null,
80
82
  activeTypes.has("blog-articles") ? getFeaturedBlogPosts(6).catch(() => null) : null,
81
83
  activeTypes.has("events") ? listPublicEvents({ filters: "status==active", pageSize: 6 }).catch(() => null) : null,
@@ -99,6 +101,7 @@ export async function MarketplaceHomepageView({ adSlots, newsletterFormSlot, } =
99
101
  brands: brandsResult?.length
100
102
  ? brandsResult
101
103
  : undefined,
104
+ bundles: bundlesResult?.length ? bundlesResult : undefined,
102
105
  stores: storesResult?.items?.length
103
106
  ? storesResult.items
104
107
  : undefined,
@@ -8,7 +8,7 @@ import { getDefaultLocale } from "../../../core/baseline-resolver";
8
8
  export function WhatsAppCommunitySection({ title, descriptionHtml, memberCount, memberCountLabel = "members", testimonial, benefits = [], buttonText = "Join our WhatsApp community", groupLink, isLoading = false, className = "", }) {
9
9
  const { themed, flex } = THEME_CONSTANTS;
10
10
  if (isLoading) {
11
- return (_jsx(Section, { className: `py-16 px-4 sm:px-8 ${themed.bgSecondary} ${className}`, children: _jsx("div", { className: "w-full max-w-4xl mx-auto", children: _jsx("div", { className: "h-72 bg-zinc-200 dark:bg-slate-700 rounded-2xl animate-pulse" }) }) }));
11
+ return (_jsx(Section, { className: `py-16 px-4 sm:px-8 ${themed.bgSecondary} ${className}`, children: _jsx("div", { className: "w-full max-w-7xl mx-auto", children: _jsx("div", { className: "h-72 bg-zinc-200 dark:bg-slate-700 rounded-2xl animate-pulse" }) }) }));
12
12
  }
13
13
  if (!title && !groupLink)
14
14
  return null;
@@ -16,5 +16,5 @@ export function WhatsAppCommunitySection({ title, descriptionHtml, memberCount,
16
16
  if (groupLink)
17
17
  window.open(groupLink, "_blank");
18
18
  };
19
- return (_jsx(Section, { className: `py-16 px-4 sm:px-8 ${themed.bgSecondary} ${className}`, children: _jsx("div", { className: "w-full max-w-4xl mx-auto", "data-section": "whatsappcommunitysection-div-391", children: _jsxs("div", { className: "relative rounded-2xl overflow-hidden bg-gradient-to-br from-primary via-cobalt to-primary/80 dark:from-primary/90 dark:via-cobalt/90 dark:to-primary/70 text-white shadow-xl", "data-section": "whatsappcommunitysection-div-392", children: [_jsx("div", { className: "absolute inset-0 opacity-[0.06] pointer-events-none bg-[repeating-linear-gradient(45deg,white_0,white_1px,transparent_0,transparent_50%)] bg-[size:10px_10px]", "aria-hidden": true }), _jsxs("div", { className: "relative z-10 px-6 py-10 sm:px-10 sm:py-12", "data-section": "whatsappcommunitysection-div-394", children: [_jsxs("div", { className: `${flex.between} flex-wrap gap-4 mb-8`, "data-section": "whatsappcommunitysection-div-top", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("div", { className: "w-12 h-12 rounded-xl bg-[#25D366] flex items-center justify-center shadow-lg flex-shrink-0", children: _jsx("svg", { className: "w-7 h-7 text-white", fill: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { d: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z" }) }) }), _jsx(Span, { className: "text-white/80 text-sm font-medium tracking-wide uppercase", children: "WhatsApp Community" })] }), memberCount && (_jsxs("div", { className: "flex items-center gap-2 bg-white/15 backdrop-blur-sm rounded-full px-4 py-1.5", children: [_jsx(Users, { className: "w-4 h-4 text-white/80" }), _jsxs(Span, { className: "text-white text-sm font-semibold", children: [memberCount.toLocaleString(getDefaultLocale()), "+ ", memberCountLabel] })] }))] }), _jsx(Heading, { level: 2, className: "text-white text-2xl sm:text-3xl font-bold mb-3 leading-tight", children: title }), descriptionHtml && (_jsx(RichText, { html: descriptionHtml, proseClass: "prose prose-sm max-w-none prose-invert", className: "text-white/80 text-base mb-6 max-w-2xl leading-relaxed" })), benefits.length > 0 && (_jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3 mb-8 max-w-2xl", "data-section": "whatsappcommunitysection-div-benefits", children: benefits.slice(0, 4).map((benefit, i) => (_jsxs("div", { className: "flex items-start gap-2.5", children: [_jsx("span", { className: "mt-0.5 flex-shrink-0 w-5 h-5 rounded-full bg-white/20 flex items-center justify-center", children: _jsx("svg", { className: "w-3 h-3 text-white", fill: "currentColor", viewBox: "0 0 20 20", "aria-hidden": "true", children: _jsx("path", { fillRule: "evenodd", d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", clipRule: "evenodd" }) }) }), _jsx(Span, { className: "text-white/90 text-sm leading-snug", children: benefit })] }, i))) })), testimonial && (_jsx("blockquote", { className: "border-l-2 border-white/30 pl-4 mb-8 max-w-xl", children: _jsxs(Text, { variant: "none", className: "text-white/75 text-sm italic leading-relaxed", children: ["\u201C", testimonial, "\u201D"] }) })), groupLink && (_jsxs(Button, { variant: "primary", size: "lg", onClick: handleJoin, "aria-label": buttonText, className: "!bg-[#25D366] hover:!bg-[#1ebe5d] !text-white !border-0 shadow-lg font-semibold gap-2.5", children: [_jsx("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { d: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z" }) }), buttonText] }))] })] }) }) }));
19
+ return (_jsx(Section, { className: `py-16 px-4 sm:px-8 ${themed.bgSecondary} ${className}`, children: _jsx("div", { className: "w-full max-w-7xl mx-auto", "data-section": "whatsappcommunitysection-div-391", children: _jsxs("div", { className: "relative rounded-2xl overflow-hidden bg-gradient-to-br from-primary via-cobalt to-primary/80 dark:from-primary/90 dark:via-cobalt/90 dark:to-primary/70 text-white shadow-xl", "data-section": "whatsappcommunitysection-div-392", children: [_jsx("div", { className: "absolute inset-0 opacity-[0.06] pointer-events-none bg-[repeating-linear-gradient(45deg,white_0,white_1px,transparent_0,transparent_50%)] bg-[size:10px_10px]", "aria-hidden": true }), _jsxs("div", { className: "relative z-10 px-6 py-10 sm:px-10 sm:py-12", "data-section": "whatsappcommunitysection-div-394", children: [_jsxs("div", { className: `${flex.between} flex-wrap gap-4 mb-8`, "data-section": "whatsappcommunitysection-div-top", children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx("div", { className: "w-12 h-12 rounded-xl bg-[#25D366] flex items-center justify-center shadow-lg flex-shrink-0", children: _jsx("svg", { className: "w-7 h-7 text-white", fill: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { d: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z" }) }) }), _jsx(Span, { className: "text-white/80 text-sm font-medium tracking-wide uppercase", children: "WhatsApp Community" })] }), memberCount && (_jsxs("div", { className: "flex items-center gap-2 bg-white/15 backdrop-blur-sm rounded-full px-4 py-1.5", children: [_jsx(Users, { className: "w-4 h-4 text-white/80" }), _jsxs(Span, { className: "text-white text-sm font-semibold", children: [memberCount.toLocaleString(getDefaultLocale()), "+ ", memberCountLabel] })] }))] }), _jsx(Heading, { level: 2, className: "text-white text-2xl sm:text-3xl font-bold mb-3 leading-tight", children: title }), descriptionHtml && (_jsx(RichText, { html: descriptionHtml, proseClass: "prose prose-sm max-w-none prose-invert", className: "text-white/80 text-base mb-6 max-w-2xl leading-relaxed" })), benefits.length > 0 && (_jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3 mb-8 max-w-2xl", "data-section": "whatsappcommunitysection-div-benefits", children: benefits.slice(0, 4).map((benefit, i) => (_jsxs("div", { className: "flex items-start gap-2.5", children: [_jsx("span", { className: "mt-0.5 flex-shrink-0 w-5 h-5 rounded-full bg-white/20 flex items-center justify-center", children: _jsx("svg", { className: "w-3 h-3 text-white", fill: "currentColor", viewBox: "0 0 20 20", "aria-hidden": "true", children: _jsx("path", { fillRule: "evenodd", d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z", clipRule: "evenodd" }) }) }), _jsx(Span, { className: "text-white/90 text-sm leading-snug", children: benefit })] }, i))) })), testimonial && (_jsx("blockquote", { className: "border-l-2 border-white/30 pl-4 mb-8 max-w-xl", children: _jsxs(Text, { variant: "none", className: "text-white/75 text-sm italic leading-relaxed", children: ["\u201C", testimonial, "\u201D"] }) })), groupLink && (_jsxs(Button, { variant: "primary", size: "lg", onClick: handleJoin, "aria-label": buttonText, className: "!bg-[#25D366] hover:!bg-[#1ebe5d] !text-white !border-0 shadow-lg font-semibold gap-2.5", children: [_jsx("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { d: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z" }) }), buttonText] }))] })] }) }) }));
20
20
  }
@@ -8,6 +8,7 @@ import type { StoreListItem } from "../../stores/types";
8
8
  import type { CategoryItem } from "../../categories/types";
9
9
  import type { BlogPost } from "../../blog/types";
10
10
  import type { EventItem } from "../../events/types";
11
+ import type { CategoryDocument } from "../../categories/schemas";
11
12
  export interface SectionData {
12
13
  products?: ProductItem[];
13
14
  auctions?: ProductItem[];
@@ -15,6 +16,7 @@ export interface SectionData {
15
16
  stores?: StoreListItem[];
16
17
  categories?: CategoryItem[];
17
18
  brands?: CategoryItem[];
19
+ bundles?: CategoryDocument[];
18
20
  blog?: BlogPost[];
19
21
  events?: EventItem[];
20
22
  }
@@ -25,8 +25,9 @@ import { BrandsSection } from "../components/BrandsSection";
25
25
  import { SocialFeedSection } from "../components/SocialFeedSection";
26
26
  import { CustomCardsSection } from "../components/CustomCardsSection";
27
27
  import { GoogleReviewsSection } from "../components/GoogleReviewsSection";
28
- // SB-UNI-V — FeaturedBundlesSection deleted; bundle homepage section to be
29
- // rebuilt against categoryType:"bundle" queries in a follow-up cohort.
28
+ // S-SBUNI-3 2026-05-13 — FeaturedBundlesSection rebuilt against
29
+ // categoryType:"bundle" rows on the categories collection.
30
+ import { FeaturedBundlesSection } from "../components/FeaturedBundlesSection";
30
31
  import { PrizeDrawsSection } from "../../products/components/PrizeDrawsSection";
31
32
  import { EventRafflesSection } from "../../events/components/EventRafflesSection";
32
33
  import { CollectionCardsSection } from "../components/CollectionCardsSection";
@@ -175,9 +176,8 @@ function renderSectionElement(section, newsletterFormSlot, faqItems, slides, liv
175
176
  return (_jsx(GoogleReviewsSection, { placeId: cfg?.placeId ?? "", maxReviews: cfg?.maxReviews ?? 6, minRating: cfg?.minRating ?? 0, layout: cfg?.layout ?? "grid", showRating: cfg?.showRating ?? true, showDate: cfg?.showDate ?? true, linkToGoogleMaps: cfg?.linkToGoogleMaps ?? true, googleMapsUrl: cfg?.googleMapsUrl }));
176
177
  }
177
178
  case "featured-bundles": {
178
- // SB-UNI-V FeaturedBundlesSection deleted with features/bundles/. The
179
- // category-based replacement lands in a follow-up.
180
- return null;
179
+ const cfg = config;
180
+ return (_jsx(FeaturedBundlesSection, { title: cleanTitle(cfg?.title) || "Curated Bundles", initialItems: sectionData.bundles }));
181
181
  }
182
182
  case "prize-draws": {
183
183
  const cfg = config;
@@ -24,6 +24,8 @@ export interface NavbarLayoutProps {
24
24
  * NavbarLayout — generic horizontal navigation bar shell.
25
25
  *
26
26
  * Zero domain imports. Receives all navigation items and the current
27
- * active href as props. Hidden on mobile (visible md+).
27
+ * active href as props. Hidden on mobile (visible lg+).
28
+ *
29
+ * When items overflow the container, left/right scroll arrows appear automatically.
28
30
  */
29
31
  export declare function NavbarLayout({ items, activeHref, id, ariaLabel, inline, renderItem, rightSlot, }: NavbarLayoutProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,6 @@
1
+ "use client";
1
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useRef, useState, useEffect, useCallback } from "react";
2
4
  import Link from "next/link";
3
5
  import { Div, Li, Nav, Span, Ul } from "../../ui";
4
6
  function DefaultNavItem({ item, isActive, }) {
@@ -7,17 +9,44 @@ function DefaultNavItem({ item, isActive, }) {
7
9
  : isActive
8
10
  ? "bg-primary-50 dark:bg-secondary-900/30 text-primary-800 dark:text-secondary-200 font-semibold px-3 border-b-2 border-primary-500 dark:border-secondary-400 rounded-none pb-[6px] transition-colors duration-150"
9
11
  : "text-zinc-700 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-slate-800 hover:text-zinc-950 dark:hover:text-white transition-colors duration-150 px-3";
10
- return (_jsxs(Link, { href: item.href, "aria-current": isActive ? "page" : undefined, className: `flex items-center gap-1.5 py-2 text-sm rounded-lg font-medium transition-colors duration-150 ${activeClasses}`, children: [item.icon, _jsx(Span, { children: item.label })] }));
12
+ return (_jsxs(Link, { href: item.href, "aria-current": isActive ? "page" : undefined, className: `flex items-center gap-1.5 py-2 text-sm rounded-lg font-medium transition-colors duration-150 whitespace-nowrap ${activeClasses}`, children: [item.icon, _jsx(Span, { children: item.label })] }));
11
13
  }
14
+ const chevronBtn = "absolute top-0 bottom-0 z-10 flex items-center justify-center w-8 bg-gradient-to-r from-white/95 dark:from-slate-950/95 to-transparent text-zinc-500 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-white transition-colors";
12
15
  /**
13
16
  * NavbarLayout — generic horizontal navigation bar shell.
14
17
  *
15
18
  * Zero domain imports. Receives all navigation items and the current
16
- * active href as props. Hidden on mobile (visible md+).
19
+ * active href as props. Hidden on mobile (visible lg+).
20
+ *
21
+ * When items overflow the container, left/right scroll arrows appear automatically.
17
22
  */
18
23
  export function NavbarLayout({ items, activeHref, id = "main-navbar", ariaLabel = "Main navigation", inline = false, renderItem, rightSlot, }) {
24
+ const scrollRef = useRef(null);
25
+ const [canScrollLeft, setCanScrollLeft] = useState(false);
26
+ const [canScrollRight, setCanScrollRight] = useState(false);
27
+ const updateArrows = useCallback(() => {
28
+ const el = scrollRef.current;
29
+ if (!el)
30
+ return;
31
+ setCanScrollLeft(el.scrollLeft > 4);
32
+ setCanScrollRight(el.scrollLeft + el.clientWidth < el.scrollWidth - 4);
33
+ }, []);
34
+ useEffect(() => {
35
+ const el = scrollRef.current;
36
+ if (!el)
37
+ return;
38
+ updateArrows();
39
+ el.addEventListener("scroll", updateArrows, { passive: true });
40
+ const ro = new ResizeObserver(updateArrows);
41
+ ro.observe(el);
42
+ return () => {
43
+ el.removeEventListener("scroll", updateArrows);
44
+ ro.disconnect();
45
+ };
46
+ }, [updateArrows, items]);
47
+ const scroll = (dir) => scrollRef.current?.scrollBy({ left: dir === "left" ? -240 : 240, behavior: "smooth" });
19
48
  if (inline) {
20
49
  return (_jsx(Ul, { "aria-label": ariaLabel, className: "hidden xl:flex items-center gap-0.5 xl:gap-1", children: items.map((item) => (_jsx(Li, { children: renderItem ? (renderItem(item, activeHref === item.href)) : (_jsx(DefaultNavItem, { item: item, isActive: activeHref === item.href })) }, item.href))) }));
21
50
  }
22
- return (_jsx(Nav, { id: id, "aria-label": ariaLabel, className: "hidden lg:block bg-white/95 dark:bg-slate-950/95 backdrop-blur-md border-b border-zinc-100 dark:border-slate-800", children: _jsxs(Div, { className: "container mx-auto px-4 sm:px-6 lg:px-8 max-w-[1920px] flex items-center h-10", children: [_jsx(Ul, { className: "flex items-center gap-0.5 lg:gap-1 flex-1", children: items.map((item) => (_jsx(Li, { children: renderItem ? (renderItem(item, activeHref === item.href)) : (_jsx(DefaultNavItem, { item: item, isActive: activeHref === item.href })) }, item.href))) }), rightSlot && _jsx(Div, { className: "shrink-0 ml-2", children: rightSlot })] }) }));
51
+ return (_jsx(Nav, { id: id, "aria-label": ariaLabel, className: "hidden lg:block bg-white/95 dark:bg-slate-950/95 backdrop-blur-md border-b border-zinc-100 dark:border-slate-800", children: _jsxs(Div, { className: "container mx-auto px-4 sm:px-6 lg:px-8 max-w-[1920px] flex items-center h-10", children: [_jsxs(Div, { className: "relative flex-1 overflow-hidden", children: [canScrollLeft && (_jsx("button", { type: "button", onClick: () => scroll("left"), "aria-label": "Scroll navigation left", className: `${chevronBtn} left-0 bg-gradient-to-r`, children: _jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) }) })), _jsx("ul", { ref: scrollRef, className: "flex items-center gap-0.5 lg:gap-1 overflow-x-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: items.map((item) => (_jsx("li", { className: "shrink-0", children: renderItem ? (renderItem(item, activeHref === item.href)) : (_jsx(DefaultNavItem, { item: item, isActive: activeHref === item.href })) }, item.href))) }), canScrollRight && (_jsx("button", { type: "button", onClick: () => scroll("right"), "aria-label": "Scroll navigation right", className: `${chevronBtn} right-0 bg-gradient-to-l`, children: _jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) }) }))] }), rightSlot && _jsx(Div, { className: "shrink-0 ml-2", children: rightSlot })] }) }));
23
52
  }
@@ -26,7 +26,7 @@ export interface TitleBarLayoutProps {
26
26
  cartCount?: number;
27
27
  profileHref?: string;
28
28
  user?: TitleBarUser | null;
29
- /** Slot rendered between the search button and profile link (e.g. NotificationBell). */
29
+ /** Slot rendered beside the profile link (e.g. NotificationBell). */
30
30
  notificationSlot?: React.ReactNode;
31
31
  /** Optional dev-only action slot rendered in the right-side action group. */
32
32
  devSlot?: React.ReactNode;
@@ -48,7 +48,10 @@ export interface TitleBarLayoutProps {
48
48
  /**
49
49
  * TitleBarLayout — generic top sticky title-bar shell.
50
50
  *
51
+ * Layout:
52
+ * TB1 (h-14, all screens): logo | navSlot? | [secondary actions lg+] | search | deals | theme | hamburger
53
+ * TB2 (h-10, below lg only): wishlist | cart | profile — mirrors what TB1 hides below lg
54
+ *
51
55
  * Receives all domain data as props — zero domain imports.
52
- * Domain shell reads useAuth() and SITE_CONFIG and passes values in.
53
56
  */
54
- export declare function TitleBarLayout({ onToggleSidebar, sidebarOpen, onSearchToggle, searchOpen, brandName, brandShortName, siteLogoUrl, logoHref, promotionsHref, compareHref, wishlistHref, wishlistCount, cartHref, cartCount, profileHref, user, notificationSlot, devSlot, navSlot, promoStripText, isDark, onToggleTheme, hasDashboardNav, onToggleDashboardNav, hideSidebarToggle, id, className, }: TitleBarLayoutProps): import("react/jsx-runtime").JSX.Element;
57
+ export declare function TitleBarLayout({ onToggleSidebar, sidebarOpen, onSearchToggle, searchOpen: _searchOpen, brandName, brandShortName: _brandShortName, siteLogoUrl, logoHref, promotionsHref, compareHref, wishlistHref, wishlistCount, cartHref, cartCount, profileHref, user, notificationSlot, devSlot, navSlot, promoStripText, isDark, onToggleTheme, hasDashboardNav: _hasDashboardNav, onToggleDashboardNav: _onToggleDashboardNav, hideSidebarToggle, id, className, }: TitleBarLayoutProps): import("react/jsx-runtime").JSX.Element;
@@ -2,16 +2,31 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import Image from "next/image";
3
3
  import Link from "next/link";
4
4
  import { BlockHeader, Button, Div, Row, SiteLogo, Span } from "../../ui";
5
+ /** Shared icon-button class for all action buttons in the title bar. */
6
+ const iconBtn = "flex items-center justify-center w-9 h-9 rounded-lg text-zinc-600 dark:text-zinc-400 hover:bg-primary-50 hover:text-primary-700 dark:hover:bg-slate-800 dark:hover:text-secondary-400 transition-colors";
7
+ /** Badge counter class for wishlist/cart counts. */
8
+ const countBadge = "absolute -top-0.5 -right-0.5 flex items-center justify-center w-4 h-4 rounded-full bg-red-500 text-white text-[10px] font-bold leading-none";
5
9
  /**
6
10
  * TitleBarLayout — generic top sticky title-bar shell.
7
11
  *
12
+ * Layout:
13
+ * TB1 (h-14, all screens): logo | navSlot? | [secondary actions lg+] | search | deals | theme | hamburger
14
+ * TB2 (h-10, below lg only): wishlist | cart | profile — mirrors what TB1 hides below lg
15
+ *
8
16
  * Receives all domain data as props — zero domain imports.
9
- * Domain shell reads useAuth() and SITE_CONFIG and passes values in.
10
17
  */
11
- export function TitleBarLayout({ onToggleSidebar, sidebarOpen, onSearchToggle, searchOpen, brandName, brandShortName, siteLogoUrl, logoHref, promotionsHref, compareHref, wishlistHref, wishlistCount = 0, cartHref, cartCount = 0, profileHref, user, notificationSlot, devSlot, navSlot, promoStripText, isDark = false, onToggleTheme, hasDashboardNav = false, onToggleDashboardNav, hideSidebarToggle = false, id = "titlebar", className = "", }) {
12
- void searchOpen;
13
- void brandShortName;
14
- return (_jsxs(BlockHeader, { id: id, className: `sticky top-0 z-50 bg-white/95 dark:bg-slate-950/95 backdrop-blur-md border-b border-zinc-100 dark:border-slate-800 shadow-sm ${className}`, children: [promoStripText && (_jsx(Div, { className: "bg-gradient-to-r from-primary-700 to-secondary-600 dark:from-primary-700 dark:to-cobalt-700 text-white text-xs py-1 text-center font-medium", children: promoStripText })), _jsx(Div, { className: "container mx-auto px-4 sm:px-6 lg:px-8 max-w-[1920px]", children: _jsxs(Row, { justify: "between", gap: "none", className: "h-14", children: [_jsx(Row, { gap: "3", children: _jsx(Link, { href: logoHref, "aria-label": brandName, className: "flex items-center transition-opacity hover:opacity-80", children: _jsx(SiteLogo, { title: brandName, src: siteLogoUrl, className: "h-7 md:h-9 lg:h-10" }) }) }), navSlot && _jsx(Div, { className: "hidden md:flex", children: navSlot }), _jsxs(Row, { gap: "xs", children: [promotionsHref && (_jsxs(Link, { href: promotionsHref, "aria-label": "Today's deals", className: "hidden lg:flex items-center gap-1 px-3 py-1 rounded-full text-xs font-bold bg-primary-100 text-primary-700 dark:bg-secondary-900/40 dark:text-secondary-400 hover:bg-primary-200 dark:hover:bg-secondary-900/60 transition-colors border border-primary-200/60 dark:border-secondary-700/40", children: [_jsx("svg", { className: "w-3 h-3", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: _jsx("path", { d: "M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.37.86.58 1.41.58.55 0 1.05-.21 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z" }) }), "Today's Deals"] })), compareHref && (_jsx(Link, { href: compareHref, "aria-label": "Compare items", className: "hidden lg:flex items-center justify-center w-9 h-9 rounded-lg text-zinc-600 dark:text-zinc-400 hover:bg-primary-50 hover:text-primary-700 dark:hover:bg-slate-800 dark:hover:text-secondary-400 transition-colors", children: _jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" }) }) })), _jsx(Button, { type: "button", variant: "ghost", size: "sm", "aria-label": "Search", onClick: onSearchToggle, className: "flex items-center justify-center w-9 h-9 rounded-lg text-zinc-600 dark:text-zinc-400 hover:bg-primary-50 hover:text-primary-700 dark:hover:bg-slate-800 dark:hover:text-secondary-400 transition-colors", children: _jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M21 21l-4.35-4.35M17 11A6 6 0 1 1 5 11a6 6 0 0 1 12 0z" }) }) }), notificationSlot, devSlot, onToggleTheme && (_jsx(Button, { type: "button", variant: "ghost", size: "sm", "aria-label": isDark ? "Switch to light mode" : "Switch to dark mode", onClick: onToggleTheme, className: "flex items-center justify-center w-9 h-9 rounded-lg text-zinc-600 dark:text-zinc-400 hover:bg-primary-50 hover:text-primary-700 dark:hover:bg-slate-800 dark:hover:text-secondary-400 transition-colors", children: isDark ? (_jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 3v1m0 16v1m8.66-9h-1M4.34 12h-1m15.07-6.07-.71.71M6.34 17.66l-.71.71m12.73 0-.71-.71M6.34 6.34l-.71-.71M12 5a7 7 0 1 0 0 14A7 7 0 0 0 12 5z" }) })) : (_jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M21 12.79A9 9 0 1 1 11.21 3a7 7 0 1 0 9.79 9.79z" }) })) })), wishlistHref && (_jsxs(Link, { href: wishlistHref, "aria-label": `Wishlist${wishlistCount > 0 ? `, ${wishlistCount} items` : ""}`, className: "relative flex items-center justify-center w-9 h-9 rounded-lg text-zinc-600 dark:text-zinc-400 hover:bg-primary-50 hover:text-primary-700 dark:hover:bg-slate-800 dark:hover:text-secondary-400 transition-colors", children: [_jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4.318 6.318a4.5 4.5 0 0 0 0 6.364L12 20.364l7.682-7.682a4.5 4.5 0 0 0-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 0 0-6.364 0z" }) }), wishlistCount > 0 && (_jsx(Span, { className: "absolute -top-0.5 -right-0.5 flex items-center justify-center w-4 h-4 rounded-full bg-red-500 text-white text-[10px] font-bold leading-none", children: wishlistCount > 9 ? "9+" : wishlistCount }))] })), cartHref && (_jsxs(Link, { href: cartHref, "aria-label": `Cart${cartCount > 0 ? `, ${cartCount} items` : ""}`, className: "relative flex items-center justify-center w-9 h-9 rounded-lg text-zinc-600 dark:text-zinc-400 hover:bg-primary-50 hover:text-primary-700 dark:hover:bg-slate-800 dark:hover:text-secondary-400 transition-colors", children: [_jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M2.25 3h1.386c.51 0 .955.343 1.087.835l.383 1.437M7.5 14.25a3 3 0 0 0-3 3h15.75m-12.75-3h11.218c1.121-2.3 2.1-4.684 2.924-7.138a60.114 60.114 0 0 0-16.536-1.84M7.5 14.25 5.106 5.272M6 20.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm12.75 0a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0z" }) }), cartCount > 0 && (_jsx(Span, { className: "absolute -top-0.5 -right-0.5 flex items-center justify-center w-4 h-4 rounded-full bg-red-500 text-white text-[10px] font-bold leading-none", children: cartCount > 9 ? "9+" : cartCount }))] })), !hideSidebarToggle && (_jsx(Button, { type: "button", variant: "ghost", size: "sm", "aria-label": sidebarOpen ? "Close menu" : "Open menu", "aria-expanded": sidebarOpen, "aria-controls": "secondary-sidebar", onClick: onToggleSidebar, className: "flex items-center justify-center w-9 h-9 rounded-lg text-zinc-600 dark:text-zinc-400 hover:bg-primary-50 hover:text-primary-700 dark:hover:bg-slate-800 dark:hover:text-secondary-400 transition-colors", children: _jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: sidebarOpen ? (_jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" })) : (_jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 12h16M4 18h16" })) }) })), profileHref && (_jsx(Link, { href: profileHref, "aria-label": user
15
- ? `Profile ${user.displayName ?? user.email}`
16
- : "Sign in", className: "flex items-center justify-center w-9 h-9 rounded-lg text-zinc-600 dark:text-zinc-400 hover:bg-primary-50 hover:text-primary-700 dark:hover:bg-slate-800 dark:hover:text-secondary-400 transition-colors", children: user?.photoURL ? (_jsx(Image, { src: user.photoURL, alt: user.displayName ?? "Profile", width: 28, height: 28, className: "w-7 h-7 rounded-full object-cover" })) : (_jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0zM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632z" }) })) }))] })] }) })] }));
18
+ export function TitleBarLayout({ onToggleSidebar, sidebarOpen, onSearchToggle, searchOpen: _searchOpen, brandName, brandShortName: _brandShortName, siteLogoUrl, logoHref, promotionsHref, compareHref, wishlistHref, wishlistCount = 0, cartHref, cartCount = 0, profileHref, user, notificationSlot, devSlot, navSlot, promoStripText, isDark = false, onToggleTheme, hasDashboardNav: _hasDashboardNav, onToggleDashboardNav: _onToggleDashboardNav, hideSidebarToggle = false, id = "titlebar", className = "", }) {
19
+ // ── Element builders ────────────────────────────────────────────────────────
20
+ const promotionsEl = promotionsHref ? (_jsxs(Link, { href: promotionsHref, "aria-label": "Today's deals", className: "flex items-center gap-1 px-3 py-1 rounded-full text-xs font-bold bg-primary-100 text-primary-700 dark:bg-secondary-900/40 dark:text-secondary-400 hover:bg-primary-200 dark:hover:bg-secondary-900/60 transition-colors border border-primary-200/60 dark:border-secondary-700/40", children: [_jsx("svg", { className: "w-3 h-3", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: _jsx("path", { d: "M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.37.86.58 1.41.58.55 0 1.05-.21 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z" }) }), _jsx(Span, { className: "hidden sm:inline", children: "Today's Deals" })] })) : null;
21
+ const themeBtn = onToggleTheme ? (_jsx(Button, { type: "button", variant: "ghost", size: "sm", "aria-label": isDark ? "Switch to light mode" : "Switch to dark mode", onClick: onToggleTheme, className: iconBtn, children: isDark ? (_jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 3v1m0 16v1m8.66-9h-1M4.34 12h-1m15.07-6.07-.71.71M6.34 17.66l-.71.71m12.73 0-.71-.71M6.34 6.34l-.71-.71M12 5a7 7 0 1 0 0 14A7 7 0 0 0 12 5z" }) })) : (_jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M21 12.79A9 9 0 1 1 11.21 3a7 7 0 1 0 9.79 9.79z" }) })) })) : null;
22
+ const hamburgerBtn = !hideSidebarToggle ? (_jsx(Button, { type: "button", variant: "ghost", size: "sm", "aria-label": sidebarOpen ? "Close menu" : "Open menu", "aria-expanded": sidebarOpen, "aria-controls": "secondary-sidebar", onClick: onToggleSidebar, className: iconBtn, children: _jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: sidebarOpen ? (_jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" })) : (_jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 12h16M4 18h16" })) }) })) : null;
23
+ // Compare is always lg+ (desktop-only feature, less critical on mobile)
24
+ const compareEl = compareHref ? (_jsx(Link, { href: compareHref, "aria-label": "Compare items", className: `${iconBtn} hidden lg:flex`, children: _jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" }) }) })) : null;
25
+ const searchBtn = (_jsx(Button, { type: "button", variant: "ghost", size: "sm", "aria-label": "Search", onClick: onSearchToggle, className: iconBtn, children: _jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M21 21l-4.35-4.35M17 11A6 6 0 1 1 5 11a6 6 0 0 1 12 0z" }) }) }));
26
+ const wishlistEl = wishlistHref ? (_jsxs(Link, { href: wishlistHref, "aria-label": `Wishlist${wishlistCount > 0 ? `, ${wishlistCount} items` : ""}`, className: `relative ${iconBtn}`, children: [_jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4.318 6.318a4.5 4.5 0 0 0 0 6.364L12 20.364l7.682-7.682a4.5 4.5 0 0 0-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 0 0-6.364 0z" }) }), wishlistCount > 0 && (_jsx(Span, { className: countBadge, children: wishlistCount > 9 ? "9+" : wishlistCount }))] })) : null;
27
+ const cartEl = cartHref ? (_jsxs(Link, { href: cartHref, "aria-label": `Cart${cartCount > 0 ? `, ${cartCount} items` : ""}`, className: `relative ${iconBtn}`, children: [_jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M2.25 3h1.386c.51 0 .955.343 1.087.835l.383 1.437M7.5 14.25a3 3 0 0 0-3 3h15.75m-12.75-3h11.218c1.121-2.3 2.1-4.684 2.924-7.138a60.114 60.114 0 0 0-16.536-1.84M7.5 14.25 5.106 5.272M6 20.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm12.75 0a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0z" }) }), cartCount > 0 && (_jsx(Span, { className: countBadge, children: cartCount > 9 ? "9+" : cartCount }))] })) : null;
28
+ const profileEl = profileHref ? (_jsx(Link, { href: profileHref, "aria-label": user ? `Profile — ${user.displayName ?? user.email}` : "Sign in", className: iconBtn, children: user?.photoURL ? (_jsx(Image, { src: user.photoURL, alt: user.displayName ?? "Profile", width: 28, height: 28, className: "w-7 h-7 rounded-full object-cover" })) : (_jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0zM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632z" }) })) })) : null;
29
+ const hasTb2 = !!(wishlistEl || cartEl || profileEl);
30
+ // ── Render ───────────────────────────────────────────────────────────────────
31
+ return (_jsxs(BlockHeader, { id: id, className: `sticky top-0 z-50 bg-white/95 dark:bg-slate-950/95 backdrop-blur-md border-b border-zinc-100 dark:border-slate-800 shadow-sm ${className}`, children: [promoStripText && (_jsx(Div, { className: "bg-gradient-to-r from-primary-700 to-secondary-600 dark:from-primary-700 dark:to-cobalt-700 text-white text-xs py-1 text-center font-medium", children: promoStripText })), _jsxs(Div, { className: "container mx-auto px-4 sm:px-6 lg:px-8 max-w-[1920px]", children: [_jsxs(Row, { justify: "between", gap: "none", className: "h-14", children: [_jsx(Row, { gap: "3", children: _jsx(Link, { href: logoHref, "aria-label": brandName, className: "flex items-center transition-opacity hover:opacity-80", children: _jsx(SiteLogo, { title: brandName, src: siteLogoUrl, className: "h-7 md:h-9 lg:h-10" }) }) }), navSlot && _jsx(Div, { className: "hidden md:flex", children: navSlot }), _jsxs(Row, { gap: "xs", children: [devSlot, compareEl, notificationSlot, wishlistEl && _jsx(Div, { className: "hidden lg:flex", children: wishlistEl }), cartEl && _jsx(Div, { className: "hidden lg:flex", children: cartEl }), profileEl && _jsx(Div, { className: "hidden lg:flex", children: profileEl }), searchBtn, promotionsEl, themeBtn, hamburgerBtn] })] }), hasTb2 && (_jsxs(Row, { as: "nav", "aria-label": "Account actions", justify: "end", gap: "xs", className: "flex lg:hidden h-10 border-t border-zinc-100 dark:border-slate-800 px-1", children: [wishlistEl, cartEl, profileEl] }))] })] }));
17
32
  }
@@ -1,4 +1,11 @@
1
1
  import { type MediaField } from "../types/index";
2
+ /**
3
+ * SB-UNI-Z5 2026-05-13 — `kind` prop UX sugar. When set, the component
4
+ * auto-derives `accept` + `maxSizeMB` from the canonical media-limits
5
+ * registry so callers don't have to remember the MIME list per type.
6
+ * Explicit `accept` / `maxSizeMB` props still win when provided.
7
+ */
8
+ export type MediaUploadFieldKind = "image" | "video" | "pdf" | "auto";
2
9
  export interface MediaUploadFieldProps {
3
10
  label: string;
4
11
  value: string;
@@ -7,6 +14,13 @@ export interface MediaUploadFieldProps {
7
14
  onUpload: (file: File) => Promise<string>;
8
15
  accept?: string;
9
16
  maxSizeMB?: number;
17
+ /**
18
+ * SB-UNI-Z5 2026-05-13 — derives `accept` + `maxSizeMB` defaults when
19
+ * those props aren't explicitly set. Useful so per-context fields
20
+ * (avatar = "image", product video = "video", etc.) don't have to
21
+ * duplicate the MIME list. Explicit `accept` / `maxSizeMB` override.
22
+ */
23
+ kind?: MediaUploadFieldKind;
10
24
  disabled?: boolean;
11
25
  helperText?: string;
12
26
  captureSource?: "file-only" | "camera-only" | "both";
@@ -32,4 +46,4 @@ export interface MediaUploadFieldProps {
32
46
  */
33
47
  isPersisted?: boolean;
34
48
  }
35
- export declare function MediaUploadField({ label, value, onChange, onChangeField, onUpload, accept, maxSizeMB, disabled, helperText, captureSource, captureMode, enableTrim, enableThumbnail, onThumbnailChange, showYoutube, showExternal, onAbort, onStagedUrlsChange, isPersisted, }: MediaUploadFieldProps): import("react/jsx-runtime").JSX.Element;
49
+ export declare function MediaUploadField({ label, value, onChange, onChangeField, onUpload, kind, accept: acceptProp, maxSizeMB: maxSizeMBProp, disabled, helperText, captureSource, captureMode, enableTrim, enableThumbnail, onThumbnailChange, showYoutube, showExternal, onAbort, onStagedUrlsChange, isPersisted, }: MediaUploadFieldProps): import("react/jsx-runtime").JSX.Element;
@@ -16,6 +16,15 @@ import { VideoTrimModal } from "../modals/VideoTrimModal";
16
16
  import { VideoThumbnailSelector } from "../modals/VideoThumbnailSelector";
17
17
  import CameraCapture from "./CameraCapture";
18
18
  import { inferMediaTypeFromMime } from "../types/index";
19
+ const KIND_DEFAULTS = {
20
+ image: { accept: "image/*", maxSizeMB: 25 },
21
+ video: { accept: "video/*", maxSizeMB: 200 },
22
+ pdf: { accept: "application/pdf", maxSizeMB: 10 },
23
+ };
24
+ const AUTO_KIND_DEFAULTS = {
25
+ accept: "image/*,video/*,application/pdf",
26
+ maxSizeMB: 200,
27
+ };
19
28
  function isVideo(url) {
20
29
  return /\.(mp4|webm|ogg|mov|avi)(\?|$)/i.test(url);
21
30
  }
@@ -55,7 +64,11 @@ function extractYouTubeId(input) {
55
64
  return null;
56
65
  }
57
66
  }
58
- export function MediaUploadField({ label, value, onChange, onChangeField, onUpload, accept = "*", maxSizeMB = 50, disabled = false, helperText, captureSource = "both", captureMode = "photo", enableTrim = true, enableThumbnail = true, onThumbnailChange, showYoutube = false, showExternal = false, onAbort, onStagedUrlsChange, isPersisted = false, }) {
67
+ export function MediaUploadField({ label, value, onChange, onChangeField, onUpload,
68
+ // SB-UNI-Z5 2026-05-13 — `kind` derives accept/maxSizeMB when not set
69
+ // explicitly; explicit props still win. "*" + 50 stay as the floor for
70
+ // back-compat with callers that pass neither.
71
+ kind, accept: acceptProp, maxSizeMB: maxSizeMBProp, disabled = false, helperText, captureSource = "both", captureMode = "photo", enableTrim = true, enableThumbnail = true, onThumbnailChange, showYoutube = false, showExternal = false, onAbort, onStagedUrlsChange, isPersisted = false, }) {
59
72
  const [isLoading, setIsLoading] = useState(false);
60
73
  const [error, setError] = useState(null);
61
74
  const [pendingVideoUrl, setPendingVideoUrl] = useState(null);
@@ -71,6 +84,14 @@ export function MediaUploadField({ label, value, onChange, onChangeField, onUplo
71
84
  // PDF mode: derived from the `accept` prop. Hides camera capture + alternate
72
85
  // URL tabs (YouTube/External never make sense for invoice/payout-doc fields)
73
86
  // and trim/thumbnail flow.
87
+ // SB-UNI-Z5 2026-05-13 — fold `kind` defaults under explicit props.
88
+ const kindDefaults = kind === "auto"
89
+ ? AUTO_KIND_DEFAULTS
90
+ : kind
91
+ ? KIND_DEFAULTS[kind]
92
+ : null;
93
+ const accept = acceptProp ?? kindDefaults?.accept ?? "*";
94
+ const maxSizeMB = maxSizeMBProp ?? kindDefaults?.maxSizeMB ?? 50;
74
95
  const pdfMode = isPdfAccept(accept);
75
96
  function handleYtApply() {
76
97
  const id = extractYouTubeId(ytInput);
@@ -2,9 +2,10 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useCallback } from "react";
4
4
  import { Package } from "lucide-react";
5
- import { Button, Caption, Span, StatusBadge, Text, TextLink, } from "../../../ui";
5
+ import { BaseListingCard, Caption, Span, StatusBadge, Text, TextLink, Button, } from "../../../ui";
6
6
  import { formatCurrency, formatDate } from "../../../utils";
7
7
  import { OrderStatusValues } from "../schemas";
8
+ import { useLongPress } from "../../../react/hooks/useLongPress";
8
9
  const STATUS_MAP = {
9
10
  pending: "pending",
10
11
  confirmed: "info",
@@ -43,9 +44,10 @@ export function MarketplaceOrderCard({ order, links, labels, className = "", var
43
44
  event.stopPropagation();
44
45
  onSelect?.(orderId, !isSelected);
45
46
  }, [orderId, isSelected, onSelect]);
47
+ const longPress = useLongPress(() => onSelect?.(orderId, !isSelected));
46
48
  const isListVariant = variant === "list";
47
49
  const itemCount = order.items?.length ?? 0;
48
- return (_jsxs("div", { className: `relative overflow-hidden rounded-xl border border-zinc-200 bg-white transition-all duration-200 hover:shadow-md dark:border-slate-800 dark:bg-slate-900 ${isSelected ? "ring-2 ring-primary-500 dark:ring-primary-400" : ""} ${className}`, "data-section": "marketplaceordercard-div-411", children: [selectable && (_jsx(Button, { variant: "ghost", "aria-label": isSelected ? "Deselect order" : "Select order", "aria-pressed": isSelected, onClick: handleSelect, className: `absolute top-3 left-3 z-10 h-6 w-6 cursor-pointer rounded-md border-2 p-0 shadow-md transition-colors ${isSelected ? "border-primary bg-primary" : "border-zinc-400 bg-white/95 hover:border-primary dark:border-slate-500 dark:bg-slate-800/95"}`, children: isSelected && (_jsx("svg", { className: "h-3.5 w-3.5 text-white", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 3, children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }) })) })), _jsxs("div", { className: `flex gap-4 p-4 ${isListVariant ? "flex-row items-center justify-between" : "flex-col"}`, "data-section": "marketplaceordercard-div-412", children: [_jsxs("div", { className: `flex items-start gap-3 ${selectable ? "pl-8" : ""} ${isListVariant ? "min-w-0 flex-1" : ""}`, "data-section": "marketplaceordercard-div-413", children: [_jsx("div", { className: "flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-lg bg-zinc-100 dark:bg-slate-800", "data-section": "marketplaceordercard-div-414", children: _jsx(Package, { className: "h-5 w-5 text-zinc-500 dark:text-slate-400" }) }), _jsxs("div", { className: "min-w-0 space-y-1", "data-section": "marketplaceordercard-div-415", children: [_jsx(TextLink, { href: detailHref, className: "leading-tight", children: _jsx(Text, { weight: "semibold", className: "truncate", children: order.productTitle ?? shortId }) }), _jsxs(Caption, { className: "font-mono text-xs", children: [mergedLabels.orderNumber, " ", shortId] }), _jsxs(Caption, { className: "text-xs", children: [mergedLabels.placedOn, " ", formatDate(order.orderDate)] }), itemCount > 1 && (_jsxs(Caption, { className: "text-xs", children: [mergedLabels.items, ": ", _jsx(Span, { weight: "medium", children: itemCount })] }))] })] }), _jsxs("div", { className: `flex ${isListVariant ? "flex-shrink-0 items-center gap-4" : "flex-col gap-3"}`, "data-section": "marketplaceordercard-div-416", children: [_jsxs("div", { className: `flex ${isListVariant ? "items-center gap-4" : "flex-wrap items-center justify-between gap-3"}`, "data-section": "marketplaceordercard-div-417", children: [_jsx(StatusBadge, { status: status, label: statusLabel }), _jsx(Text, { weight: "semibold", className: "tabular-nums", children: formatCurrency(order.totalPrice, order.currency) })] }), _jsxs("div", { className: "flex flex-wrap items-center gap-2", "data-section": "marketplaceordercard-div-418", children: [(isShipped || isDelivered) &&
50
+ return (_jsxs("div", { className: `group relative overflow-hidden rounded-xl border border-zinc-200 bg-white transition-all duration-200 hover:shadow-md dark:border-slate-800 dark:bg-slate-900 ${isSelected ? "ring-2 ring-primary-500 dark:ring-primary-400" : ""} ${className}`, onMouseDown: onSelect && !isSelected ? longPress.onMouseDown : undefined, onMouseUp: onSelect && !isSelected ? longPress.onMouseUp : undefined, onMouseLeave: onSelect && !isSelected ? longPress.onMouseLeave : undefined, onTouchStart: onSelect && !isSelected ? longPress.onTouchStart : undefined, onTouchEnd: onSelect && !isSelected ? longPress.onTouchEnd : undefined, "data-section": "marketplaceordercard-div-411", children: [onSelect && (_jsx(BaseListingCard.Checkbox, { selected: isSelected, onSelect: handleSelect, label: isSelected ? "Deselect order" : "Select order", position: "top-2 left-2", className: selectable || isSelected ? "opacity-100" : "opacity-0 group-hover:opacity-100 transition-opacity" })), _jsxs("div", { className: `flex gap-4 p-4 ${isListVariant ? "flex-row items-center justify-between" : "flex-col"}`, "data-section": "marketplaceordercard-div-412", children: [_jsxs("div", { className: `flex items-start gap-3 ${selectable ? "pl-8" : ""} ${isListVariant ? "min-w-0 flex-1" : ""}`, "data-section": "marketplaceordercard-div-413", children: [_jsx("div", { className: "flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-lg bg-zinc-100 dark:bg-slate-800", "data-section": "marketplaceordercard-div-414", children: _jsx(Package, { className: "h-5 w-5 text-zinc-500 dark:text-slate-400" }) }), _jsxs("div", { className: "min-w-0 space-y-1", "data-section": "marketplaceordercard-div-415", children: [_jsx(TextLink, { href: detailHref, className: "leading-tight", children: _jsx(Text, { weight: "semibold", className: "truncate", children: order.productTitle ?? shortId }) }), _jsxs(Caption, { className: "font-mono text-xs", children: [mergedLabels.orderNumber, " ", shortId] }), _jsxs(Caption, { className: "text-xs", children: [mergedLabels.placedOn, " ", formatDate(order.orderDate)] }), itemCount > 1 && (_jsxs(Caption, { className: "text-xs", children: [mergedLabels.items, ": ", _jsx(Span, { weight: "medium", children: itemCount })] }))] })] }), _jsxs("div", { className: `flex ${isListVariant ? "flex-shrink-0 items-center gap-4" : "flex-col gap-3"}`, "data-section": "marketplaceordercard-div-416", children: [_jsxs("div", { className: `flex ${isListVariant ? "items-center gap-4" : "flex-wrap items-center justify-between gap-3"}`, "data-section": "marketplaceordercard-div-417", children: [_jsx(StatusBadge, { status: status, label: statusLabel }), _jsx(Text, { weight: "semibold", className: "tabular-nums", children: formatCurrency(order.totalPrice, order.currency) })] }), _jsxs("div", { className: "flex flex-wrap items-center gap-2", "data-section": "marketplaceordercard-div-418", children: [(isShipped || isDelivered) &&
49
51
  trackHref &&
50
52
  order.trackingNumber && (_jsx(Button, { variant: "ghost", size: "sm", className: "min-w-0 flex-1 px-2 text-xs", onClick: () => navigate(trackHref), children: mergedLabels.trackOrder })), isDelivered && reviewHref && (_jsx(Button, { variant: "outline", size: "sm", className: "min-w-0 flex-1 px-2 text-xs", onClick: () => navigate(reviewHref), children: mergedLabels.writeReview })), _jsx(Button, { variant: "secondary", size: "sm", className: "min-w-0 flex-1 px-2 text-xs", onClick: () => navigate(detailHref), children: mergedLabels.viewOrder })] })] })] })] }));
51
53
  }
@@ -0,0 +1,8 @@
1
+ import type { OrderDocument } from "../schemas";
2
+ export interface OrderSiblingPaymentsProps {
3
+ siblings: OrderDocument[];
4
+ /** The current order's id — excluded from the sibling list. */
5
+ currentOrderId: string;
6
+ className?: string;
7
+ }
8
+ export declare function OrderSiblingPayments({ siblings, currentOrderId, className, }: OrderSiblingPaymentsProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,16 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import Link from "next/link";
4
+ import { Div, Heading, Row, Stack, Text } from "../../../ui";
5
+ import { ROUTES } from "../../../next/routing/route-map";
6
+ import { REFUND_COPY } from "../../../_internal/shared/features/orders/refund-copy";
7
+ import { formatCurrency } from "../../../utils/number.formatter";
8
+ export function OrderSiblingPayments({ siblings, currentOrderId, className = "", }) {
9
+ const others = siblings.filter((o) => o.id !== currentOrderId);
10
+ if (others.length === 0)
11
+ return null;
12
+ return (_jsxs(Div, { className: `rounded-xl border border-zinc-200 bg-zinc-50 p-4 dark:border-zinc-800 dark:bg-zinc-900 ${className}`, children: [_jsx(Heading, { level: 3, className: "mb-3 text-sm font-semibold text-zinc-700 dark:text-zinc-300", children: REFUND_COPY.siblingPayments.heading(others.length) }), _jsx(Stack, { gap: "xs", children: others.map((o) => {
13
+ const href = String(ROUTES.USER.ORDER_DETAIL(o.id));
14
+ return (_jsxs(Row, { justify: "between", align: "center", gap: "sm", children: [_jsx(Link, { href: href, className: "text-sm font-medium text-[color:var(--appkit-color-primary)] hover:underline", children: o.id }), _jsxs(Row, { gap: "sm", align: "center", children: [_jsx(Text, { size: "xs", color: "muted", className: "capitalize", children: o.status }), _jsx(Text, { size: "xs", weight: "semibold", children: formatCurrency(o.totalPrice / 100, o.currency ?? "INR") })] })] }, o.id));
15
+ }) })] }));
16
+ }