@mohasinac/appkit 3.4.8 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (605) hide show
  1. package/dist/_internal/client/features/classified/ClassifiedDetailView.js +1 -1
  2. package/dist/_internal/client/features/digital-code/CodeRevealPanel.js +1 -1
  3. package/dist/_internal/client/features/digital-code/DigitalCodeDetailView.js +1 -1
  4. package/dist/_internal/client/features/filters/filter-load-options.js +10 -9
  5. package/dist/_internal/client/features/layout/DashboardLayoutClient.d.ts +6 -1
  6. package/dist/_internal/client/features/layout/DashboardLayoutClient.js +11 -4
  7. package/dist/_internal/client/features/live/LiveItemDetailView.js +2 -2
  8. package/dist/_internal/client/features/maintenance/views/AnalysisRunnerView.js +10 -3
  9. package/dist/_internal/client/features/maintenance/views/ServerErrorsListView.js +2 -2
  10. package/dist/_internal/client/scaffolds/DashboardScaffold.js +3 -1
  11. package/dist/_internal/server/features/checkout/actions.d.ts +16 -0
  12. package/dist/_internal/server/features/checkout/actions.js +149 -35
  13. package/dist/_internal/server/features/checkout/bundle-expansion.d.ts +31 -0
  14. package/dist/_internal/server/features/checkout/bundle-expansion.js +41 -0
  15. package/dist/_internal/server/features/lottery/actions.js +14 -4
  16. package/dist/_internal/server/features/maintenance/analyze.js +4 -2
  17. package/dist/_internal/server/features/orders/actions.js +9 -0
  18. package/dist/_internal/server/features/orders/adapters.js +19 -0
  19. package/dist/_internal/server/features/seo/robots.js +1 -1
  20. package/dist/_internal/server/functions/firestore.d.ts +47 -1
  21. package/dist/_internal/server/functions/firestore.js +56 -1
  22. package/dist/_internal/server/functions/scheduled.d.ts +2 -1
  23. package/dist/_internal/server/functions/scheduled.js +9 -1
  24. package/dist/_internal/server/jobs/core/catalogueImageStalenessReminder.d.ts +10 -0
  25. package/dist/_internal/server/jobs/core/catalogueImageStalenessReminder.js +49 -0
  26. package/dist/_internal/server/jobs/core/cleanupRtdbEvents.js +32 -0
  27. package/dist/_internal/server/jobs/core/hardBanCascade.d.ts +26 -0
  28. package/dist/_internal/server/jobs/core/hardBanCascade.js +179 -0
  29. package/dist/_internal/server/jobs/core/index.d.ts +4 -1
  30. package/dist/_internal/server/jobs/core/index.js +4 -1
  31. package/dist/_internal/server/jobs/core/jobRunners.d.ts +28 -0
  32. package/dist/_internal/server/jobs/core/jobRunners.js +37 -0
  33. package/dist/_internal/server/jobs/core/onCatalogueSubmittedForApproval.d.ts +15 -0
  34. package/dist/_internal/server/jobs/core/onCatalogueSubmittedForApproval.js +38 -0
  35. package/dist/_internal/server/jobs/core/onJobCreated.d.ts +22 -0
  36. package/dist/_internal/server/jobs/core/onJobCreated.js +59 -0
  37. package/dist/_internal/server/jobs/core/weeklyPayoutEligibility.d.ts +6 -1
  38. package/dist/_internal/server/jobs/core/weeklyPayoutEligibility.js +5 -2
  39. package/dist/_internal/server/jobs/handlers/catalogueImageStalenessReminder.d.ts +2 -0
  40. package/dist/_internal/server/jobs/handlers/catalogueImageStalenessReminder.js +2 -0
  41. package/dist/_internal/server/jobs/handlers/index.d.ts +6 -0
  42. package/dist/_internal/server/jobs/handlers/index.js +8 -0
  43. package/dist/_internal/server/jobs/handlers/onCatalogueSubmittedForApproval.d.ts +12 -0
  44. package/dist/_internal/server/jobs/handlers/onCatalogueSubmittedForApproval.js +20 -0
  45. package/dist/_internal/server/jobs/handlers/onJobCreated.d.ts +3 -0
  46. package/dist/_internal/server/jobs/handlers/onJobCreated.js +9 -0
  47. package/dist/_internal/server/jobs/handlers/onShipmentAllocationSync.d.ts +25 -0
  48. package/dist/_internal/server/jobs/handlers/onShipmentAllocationSync.js +71 -0
  49. package/dist/_internal/server/jobs/handlers/onShipmentDeleted.d.ts +14 -0
  50. package/dist/_internal/server/jobs/handlers/onShipmentDeleted.js +23 -0
  51. package/dist/_internal/server/jobs/handlers/onShipmentItemWrite.d.ts +17 -0
  52. package/dist/_internal/server/jobs/handlers/onShipmentItemWrite.js +26 -0
  53. package/dist/_internal/server/jobs/handlers/weeklyPayoutEligibility.js +3 -1
  54. package/dist/_internal/shared/actions/action-registry.d.ts +1 -1
  55. package/dist/_internal/shared/actions/action-registry.js +136 -0
  56. package/dist/_internal/shared/features/blog/schema.d.ts +8 -8
  57. package/dist/_internal/shared/features/brands/schema.d.ts +4 -4
  58. package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +8 -8
  59. package/dist/_internal/shared/features/events/schema.d.ts +4 -4
  60. package/dist/_internal/shared/features/products/schema.d.ts +8 -8
  61. package/dist/_internal/shared/features/promotions/schema.d.ts +4 -4
  62. package/dist/_internal/shared/features/reviews/schema.d.ts +4 -4
  63. package/dist/client/api/useFeatureFlags.d.ts +22 -0
  64. package/dist/client/api/useFeatureFlags.js +27 -0
  65. package/dist/client/observability/reportClientError.js +3 -2
  66. package/dist/client.d.ts +4 -2
  67. package/dist/client.js +2 -1
  68. package/dist/configs/next.js +1 -0
  69. package/dist/constants/api-endpoints.d.ts +279 -3
  70. package/dist/constants/api-endpoints.js +130 -2
  71. package/dist/core/hooks/useSyncManager.js +5 -4
  72. package/dist/errors/conflict-error.d.ts +4 -0
  73. package/dist/errors/conflict-error.js +6 -0
  74. package/dist/errors/index.d.ts +1 -0
  75. package/dist/errors/index.js +1 -0
  76. package/dist/features/about/components/FeesView.js +2 -2
  77. package/dist/features/about/components/HelpPageView.js +2 -2
  78. package/dist/features/about/components/HowAuctionsWorkView.js +2 -2
  79. package/dist/features/about/components/HowCheckoutWorksView.js +2 -2
  80. package/dist/features/about/components/HowEmiWorksView.js +2 -2
  81. package/dist/features/about/components/HowOffersWorkView.js +3 -3
  82. package/dist/features/about/components/HowOrdersWorkView.js +3 -3
  83. package/dist/features/about/components/HowPayoutsWorkView.js +2 -2
  84. package/dist/features/about/components/HowPreOrdersWorkView.js +2 -2
  85. package/dist/features/about/components/HowReviewsWorkView.js +2 -2
  86. package/dist/features/about/components/PublicProfileView.d.ts +8 -1
  87. package/dist/features/about/components/PublicProfileView.js +11 -9
  88. package/dist/features/about/components/SecurityPrivacyView.js +2 -2
  89. package/dist/features/about/components/UnauthorizedView.js +2 -2
  90. package/dist/features/account/components/AddressBook.js +1 -1
  91. package/dist/features/account/components/AddressesIndexListing.js +1 -1
  92. package/dist/features/account/components/NotificationBell.js +5 -5
  93. package/dist/features/account/components/NotificationPreferencesPanel.js +5 -2
  94. package/dist/features/account/components/UserOffersPanel.js +5 -4
  95. package/dist/features/account/components/UserSidebar.js +2 -2
  96. package/dist/features/account/components/UserSupportView.js +3 -3
  97. package/dist/features/account/schemas/index.d.ts +12 -12
  98. package/dist/features/addresses/schemas/index.d.ts +6 -6
  99. package/dist/features/admin/components/AdminAdEditorView.js +3 -3
  100. package/dist/features/admin/components/AdminAddressEditorView.js +3 -3
  101. package/dist/features/admin/components/AdminAdsView.js +3 -3
  102. package/dist/features/admin/components/AdminBlogEditorView.js +1 -1
  103. package/dist/features/admin/components/AdminBlogView.js +12 -15
  104. package/dist/features/admin/components/AdminBrandEditorView.js +1 -1
  105. package/dist/features/admin/components/AdminBrandsView.js +12 -13
  106. package/dist/features/admin/components/AdminBundleEditorView.js +5 -4
  107. package/dist/features/admin/components/AdminBundlesView.js +32 -23
  108. package/dist/features/admin/components/AdminCarouselEditorView.js +5 -5
  109. package/dist/features/admin/components/AdminCarouselView.js +2 -2
  110. package/dist/features/admin/components/AdminCatalogGuideView.js +1 -1
  111. package/dist/features/admin/components/AdminCategoriesView.js +12 -13
  112. package/dist/features/admin/components/AdminCategoryEditorView.js +2 -2
  113. package/dist/features/admin/components/AdminContactEditorView.js +2 -2
  114. package/dist/features/admin/components/AdminCouponEditorView.d.ts +10 -1
  115. package/dist/features/admin/components/AdminCouponEditorView.js +7 -2
  116. package/dist/features/admin/components/AdminCouponsView.js +32 -27
  117. package/dist/features/admin/components/AdminEmployeeEditorView.js +3 -3
  118. package/dist/features/admin/components/AdminFaqEditorView.js +1 -1
  119. package/dist/features/admin/components/AdminFaqsView.js +20 -20
  120. package/dist/features/admin/components/AdminFeatureEditorView.js +5 -5
  121. package/dist/features/admin/components/AdminFeaturesView.js +9 -10
  122. package/dist/features/admin/components/AdminFilterBar.js +1 -1
  123. package/dist/features/admin/components/AdminFulfillmentView.js +4 -4
  124. package/dist/features/admin/components/AdminGuideHubView.js +2 -2
  125. package/dist/features/admin/components/AdminMediaView.js +3 -2
  126. package/dist/features/admin/components/AdminNavigationView.js +1 -1
  127. package/dist/features/admin/components/AdminOrderEditorView.js +3 -3
  128. package/dist/features/admin/components/AdminOrdersView.js +21 -30
  129. package/dist/features/admin/components/AdminPageHeader.js +3 -3
  130. package/dist/features/admin/components/AdminPayoutsView.js +8 -8
  131. package/dist/features/admin/components/AdminPrizeDrawsView.js +8 -9
  132. package/dist/features/admin/components/AdminProductEditorView.d.ts +9 -1
  133. package/dist/features/admin/components/AdminProductEditorView.js +7 -4
  134. package/dist/features/admin/components/AdminProductsView.js +30 -41
  135. package/dist/features/admin/components/AdminReviewsView.js +14 -17
  136. package/dist/features/admin/components/AdminScammerEditorView.js +5 -5
  137. package/dist/features/admin/components/AdminSectionsView.js +3 -3
  138. package/dist/features/admin/components/AdminSessionsView.js +8 -10
  139. package/dist/features/admin/components/AdminSidebar.js +2 -2
  140. package/dist/features/admin/components/AdminSiteSettingsView.js +10 -3
  141. package/dist/features/admin/components/AdminStoreEditorView.js +4 -5
  142. package/dist/features/admin/components/AdminStoresView.js +18 -13
  143. package/dist/features/admin/components/AdminSupportTicketDetailView.js +7 -7
  144. package/dist/features/admin/components/AdminTeamView.js +9 -5
  145. package/dist/features/admin/components/AdminUsersView.js +19 -15
  146. package/dist/features/admin/components/AdminViewCards.js +5 -5
  147. package/dist/features/admin/components/DashboardStats.js +1 -1
  148. package/dist/features/admin/components/DataListingView.js +2 -2
  149. package/dist/features/admin/components/DataTable.js +2 -2
  150. package/dist/features/admin/components/DrawerFormFooter.js +1 -1
  151. package/dist/features/admin/components/analytics/AdminAnalyticsCharts.js +2 -2
  152. package/dist/features/admin/components/analytics/AdminStatCard.js +1 -1
  153. package/dist/features/admin/hooks/useAdminListing.d.ts +3 -2
  154. package/dist/features/admin/hooks/useAdminListing.js +8 -2
  155. package/dist/features/admin/permission-map.js +2 -0
  156. package/dist/features/admin/schemas/firestore.d.ts +7 -0
  157. package/dist/features/admin/schemas/firestore.js +4 -0
  158. package/dist/features/auctions/components/AuctionBidsTable.js +1 -1
  159. package/dist/features/auctions/components/AuctionDetailPageView.js +7 -7
  160. package/dist/features/auctions/components/MarketplaceAuctionCard.js +3 -3
  161. package/dist/features/auctions/components/MarketplaceAuctionGrid.js +4 -4
  162. package/dist/features/auctions/components/PlaceBidFormClient.js +1 -1
  163. package/dist/features/auctions/schemas/index.d.ts +16 -16
  164. package/dist/features/auth/permissions/constants.d.ts +1 -1
  165. package/dist/features/auth/permissions/constants.js +2 -0
  166. package/dist/features/auth/schemas/index.d.ts +6 -6
  167. package/dist/features/before-after/schemas/index.d.ts +3 -3
  168. package/dist/features/blog/actions/blog-actions.d.ts +32 -32
  169. package/dist/features/blog/components/BlogFeaturedCard.js +2 -2
  170. package/dist/features/blog/components/BlogIndexListing.js +2 -2
  171. package/dist/features/blog/components/BlogListView.js +4 -4
  172. package/dist/features/blog/components/BlogPostView.js +4 -4
  173. package/dist/features/blog/schemas/index.d.ts +77 -77
  174. package/dist/features/cart/components/CartDrawer.js +2 -2
  175. package/dist/features/catalogue/actions/approve-catalogue-listing.d.ts +12 -0
  176. package/dist/features/catalogue/actions/approve-catalogue-listing.js +50 -0
  177. package/dist/features/catalogue/actions/list-from-catalogue.d.ts +17 -0
  178. package/dist/features/catalogue/actions/list-from-catalogue.js +50 -0
  179. package/dist/features/catalogue/actions/submit-for-approval.d.ts +8 -0
  180. package/dist/features/catalogue/actions/submit-for-approval.js +30 -0
  181. package/dist/features/catalogue/components/AdminCatalogueApprovalsView.d.ts +2 -0
  182. package/dist/features/catalogue/components/AdminCatalogueApprovalsView.js +53 -0
  183. package/dist/features/catalogue/components/CatalogueItemEditorView.d.ts +7 -0
  184. package/dist/features/catalogue/components/CatalogueItemEditorView.js +79 -0
  185. package/dist/features/catalogue/components/PublicCatalogueView.d.ts +5 -0
  186. package/dist/features/catalogue/components/PublicCatalogueView.js +22 -0
  187. package/dist/features/catalogue/components/UserCatalogueView.d.ts +12 -0
  188. package/dist/features/catalogue/components/UserCatalogueView.js +51 -0
  189. package/dist/features/catalogue/index.d.ts +12 -0
  190. package/dist/features/catalogue/index.js +9 -0
  191. package/dist/features/catalogue/repository/catalogue.repository.d.ts +39 -0
  192. package/dist/features/catalogue/repository/catalogue.repository.js +68 -0
  193. package/dist/features/catalogue/schemas/firestore.d.ts +47 -0
  194. package/dist/features/catalogue/schemas/firestore.js +22 -0
  195. package/dist/features/catalogue/schemas/index.d.ts +2 -0
  196. package/dist/features/catalogue/schemas/index.js +2 -0
  197. package/dist/features/catalogue/schemas/validation.d.ts +71 -0
  198. package/dist/features/catalogue/schemas/validation.js +25 -0
  199. package/dist/features/catalogue/utils/freshness.d.ts +10 -0
  200. package/dist/features/catalogue/utils/freshness.js +15 -0
  201. package/dist/features/catalogue/utils/product-from-item.d.ts +15 -0
  202. package/dist/features/catalogue/utils/product-from-item.js +34 -0
  203. package/dist/features/categories/components/BrandDetailPageView.js +1 -1
  204. package/dist/features/categories/components/BrandDetailTabs.js +2 -2
  205. package/dist/features/categories/components/BundleCollage.js +2 -2
  206. package/dist/features/categories/components/BundleItemsPicker.js +3 -2
  207. package/dist/features/categories/components/CategoriesIndexListing.js +8 -6
  208. package/dist/features/categories/components/CategoryBundlesListing.js +10 -4
  209. package/dist/features/categories/components/CategoryDetailPageView.js +1 -1
  210. package/dist/features/categories/components/CategoryDetailTabs.js +2 -2
  211. package/dist/features/categories/components/CategoryGrid.js +3 -3
  212. package/dist/features/categories/components/CategoryProductsListing.js +1 -1
  213. package/dist/features/categories/components/CategorySortSelect.js +1 -1
  214. package/dist/features/categories/components/CategoryStoresListing.js +1 -1
  215. package/dist/features/categories/components/CategoryTableColumns.js +1 -1
  216. package/dist/features/categories/components/CategoryTree.js +2 -2
  217. package/dist/features/categories/components/ConcernCard.js +1 -1
  218. package/dist/features/categories/hooks/useCategories.js +1 -1
  219. package/dist/features/categories/schemas/index.d.ts +32 -32
  220. package/dist/features/classified/components/ClassifiedFilters.js +2 -2
  221. package/dist/features/classified/components/ClassifiedIndexListing.js +9 -3
  222. package/dist/features/collections/schemas/index.d.ts +2 -2
  223. package/dist/features/consultation/components/ConsultationForm.js +1 -1
  224. package/dist/features/consultation/schemas/index.d.ts +10 -10
  225. package/dist/features/contact/components/ContactForm.js +4 -4
  226. package/dist/features/contact/components/ContactInfoSidebar.js +1 -1
  227. package/dist/features/contact/components/ContactPageView.js +2 -1
  228. package/dist/features/copilot/components/AdminCopilotView.js +5 -4
  229. package/dist/features/corporate/schemas/index.d.ts +2 -2
  230. package/dist/features/digital-codes/components/DigitalCodesIndexListing.js +3 -3
  231. package/dist/features/events/components/AdminEventEditorView.js +4 -4
  232. package/dist/features/events/components/AdminEventEntriesView.js +2 -2
  233. package/dist/features/events/components/AdminEventsView.js +8 -8
  234. package/dist/features/events/components/EventBanner.js +1 -1
  235. package/dist/features/events/components/EventCard.js +3 -3
  236. package/dist/features/events/components/EventLeaderboard.js +1 -1
  237. package/dist/features/events/components/EventOfferCard.js +1 -1
  238. package/dist/features/events/components/EventPollWidget.js +6 -5
  239. package/dist/features/events/components/EventRaffleEntryForm.js +1 -1
  240. package/dist/features/events/components/EventRaffleWinnerView.js +5 -5
  241. package/dist/features/events/components/EventRafflesSection.js +1 -1
  242. package/dist/features/events/components/EventSaleBanner.js +1 -1
  243. package/dist/features/events/components/EventsIndexListing.js +4 -2
  244. package/dist/features/events/components/EventsListView.js +2 -2
  245. package/dist/features/events/components/SpinWheelView.js +11 -5
  246. package/dist/features/events/schemas/index.d.ts +100 -100
  247. package/dist/features/faq/actions/faq-actions.d.ts +6 -6
  248. package/dist/features/faq/components/ContactCTA.js +3 -3
  249. package/dist/features/faq/components/FAQCategorySidebar.js +2 -2
  250. package/dist/features/faq/components/FAQHelpfulButtons.js +3 -3
  251. package/dist/features/faq/schemas/index.d.ts +12 -12
  252. package/dist/features/filters/AsyncFacetSection.js +4 -4
  253. package/dist/features/filters/FilterFacetSection.js +8 -8
  254. package/dist/features/filters/RangeFilter.js +2 -2
  255. package/dist/features/filters/SwitchFilter.js +1 -1
  256. package/dist/features/forms/Checkbox.js +2 -8
  257. package/dist/features/forms/Input.js +2 -1
  258. package/dist/features/forms/Radio.js +3 -3
  259. package/dist/features/forms/Select.d.ts +1 -1
  260. package/dist/features/forms/Select.js +3 -2
  261. package/dist/features/forms/Slider.js +5 -11
  262. package/dist/features/forms/Textarea.js +2 -1
  263. package/dist/features/grouped/schemas/index.d.ts +6 -6
  264. package/dist/features/homepage/actions/homepage-section-actions.d.ts +4 -4
  265. package/dist/features/homepage/components/AdvertisementBanner.js +4 -4
  266. package/dist/features/homepage/components/AnnouncementBar.js +3 -3
  267. package/dist/features/homepage/components/BeforeAfterCard.js +1 -1
  268. package/dist/features/homepage/components/BrandsSection.js +9 -9
  269. package/dist/features/homepage/components/CTABannerSection.js +1 -1
  270. package/dist/features/homepage/components/CharacterHotspot.js +4 -4
  271. package/dist/features/homepage/components/CharacterHotspotForm.js +15 -13
  272. package/dist/features/homepage/components/CollectionCardsSection.js +1 -1
  273. package/dist/features/homepage/components/CustomCardsSection.js +6 -6
  274. package/dist/features/homepage/components/CustomerReviewsSection.js +2 -2
  275. package/dist/features/homepage/components/FAQSection.js +2 -2
  276. package/dist/features/homepage/components/FeaturedBundlesSection.js +3 -3
  277. package/dist/features/homepage/components/FeaturedResultsSection.js +2 -2
  278. package/dist/features/homepage/components/GoogleReviewsSection.js +6 -6
  279. package/dist/features/homepage/components/HeroBanner.js +1 -1
  280. package/dist/features/homepage/components/HeroCarousel.js +5 -4
  281. package/dist/features/homepage/components/HeroSection.js +1 -7
  282. package/dist/features/homepage/components/HomepageSkeleton.js +1 -1
  283. package/dist/features/homepage/components/HowItWorksInfoView.js +1 -1
  284. package/dist/features/homepage/components/HowItWorksSection.js +2 -2
  285. package/dist/features/homepage/components/NewsletterBanner.js +2 -2
  286. package/dist/features/homepage/components/NewsletterSection.js +1 -1
  287. package/dist/features/homepage/components/PromoGrid.js +1 -1
  288. package/dist/features/homepage/components/SectionCarousel.js +6 -6
  289. package/dist/features/homepage/components/SecurityHighlightsSection.js +2 -2
  290. package/dist/features/homepage/components/ShopByCategorySection.js +10 -10
  291. package/dist/features/homepage/components/SiteFeaturesSection.js +2 -2
  292. package/dist/features/homepage/components/SocialFeedSection.js +5 -5
  293. package/dist/features/homepage/components/SocialPostCard.js +1 -1
  294. package/dist/features/homepage/components/StatsCounterSection.js +1 -1
  295. package/dist/features/homepage/components/TestimonialsCarousel.js +1 -1
  296. package/dist/features/homepage/components/TrustBadges.js +1 -1
  297. package/dist/features/homepage/components/TrustFeaturesSection.js +2 -2
  298. package/dist/features/homepage/components/TrustIndicatorsSection.js +2 -2
  299. package/dist/features/homepage/components/WelcomeSection.js +2 -2
  300. package/dist/features/homepage/components/WhatsAppCommunitySection.js +1 -1
  301. package/dist/features/homepage/hooks/useActiveAd.js +2 -1
  302. package/dist/features/homepage/schemas/firestore.d.ts +10 -0
  303. package/dist/features/homepage/schemas/index.d.ts +116 -116
  304. package/dist/features/jobs/actions/enqueue-job.d.ts +24 -0
  305. package/dist/features/jobs/actions/enqueue-job.js +44 -0
  306. package/dist/features/jobs/repository/jobs.repository.d.ts +21 -0
  307. package/dist/features/jobs/repository/jobs.repository.js +48 -0
  308. package/dist/features/jobs/schemas/firestore.d.ts +54 -0
  309. package/dist/features/jobs/schemas/firestore.js +24 -0
  310. package/dist/features/layout/AppLayoutShell.js +17 -11
  311. package/dist/features/layout/AutoBreadcrumbs.js +1 -1
  312. package/dist/features/layout/BackToTop.js +2 -2
  313. package/dist/features/layout/BottomActions.js +7 -7
  314. package/dist/features/layout/BottomNavItem.js +2 -2
  315. package/dist/features/layout/BottomNavLayout.js +13 -4
  316. package/dist/features/layout/BottomNavbar.d.ts +9 -1
  317. package/dist/features/layout/BottomNavbar.js +12 -5
  318. package/dist/features/layout/BottomSheet.js +1 -1
  319. package/dist/features/layout/Breadcrumbs.js +1 -1
  320. package/dist/features/layout/FooterLayout.js +2 -2
  321. package/dist/features/layout/NavItem.js +3 -3
  322. package/dist/features/layout/NavbarLayout.js +6 -6
  323. package/dist/features/layout/SidebarLayout.d.ts +3 -0
  324. package/dist/features/layout/SidebarLayout.js +3 -3
  325. package/dist/features/layout/TitleBarLayout.js +4 -4
  326. package/dist/features/live/components/LiveItemFilters.js +2 -2
  327. package/dist/features/live/components/LiveItemsIndexListing.js +3 -3
  328. package/dist/features/lottery/types/index.d.ts +3 -1
  329. package/dist/features/lottery/types/index.js +16 -3
  330. package/dist/features/loyalty/components/CoinsDisplay.js +2 -2
  331. package/dist/features/media/MediaImage.d.ts +6 -1
  332. package/dist/features/media/MediaImage.js +10 -4
  333. package/dist/features/media/MediaLightbox.js +1 -1
  334. package/dist/features/media/MediaPickerModal.js +4 -3
  335. package/dist/features/media/MediaVideo.js +1 -1
  336. package/dist/features/media/modals/ImageCropModal.js +1 -1
  337. package/dist/features/media/modals/ImageEditor.js +1 -1
  338. package/dist/features/media/repository/media-assets.repository.d.ts +9 -0
  339. package/dist/features/media/types/index.d.ts +4 -4
  340. package/dist/features/media/upload/MediaUploadField.js +3 -3
  341. package/dist/features/media/upload/MediaUploadList.js +1 -1
  342. package/dist/features/messages/hooks/useConversation.js +4 -3
  343. package/dist/features/messages/hooks/useConversations.js +2 -1
  344. package/dist/features/messages/schemas/index.d.ts +6 -6
  345. package/dist/features/orders/components/MarketplaceOrderCard.js +1 -1
  346. package/dist/features/orders/components/OrderPaymentSummary.d.ts +16 -0
  347. package/dist/features/orders/components/OrderPaymentSummary.js +32 -0
  348. package/dist/features/orders/components/OrderSiblingPayments.js +1 -1
  349. package/dist/features/orders/components/OrdersList.d.ts +7 -2
  350. package/dist/features/orders/components/OrdersList.js +5 -5
  351. package/dist/features/orders/components/RefundHistoryTable.js +1 -1
  352. package/dist/features/orders/components/RefundRequestView.js +1 -1
  353. package/dist/features/orders/components/index.d.ts +2 -0
  354. package/dist/features/orders/components/index.js +1 -0
  355. package/dist/features/orders/repository/orders.repository.d.ts +8 -0
  356. package/dist/features/orders/repository/orders.repository.js +24 -0
  357. package/dist/features/orders/schemas/firestore.d.ts +59 -0
  358. package/dist/features/orders/schemas/firestore.js +5 -0
  359. package/dist/features/orders/schemas/index.d.ts +91 -40
  360. package/dist/features/orders/schemas/index.js +10 -0
  361. package/dist/features/orders/types/index.d.ts +15 -0
  362. package/dist/features/payments/schemas/index.d.ts +12 -12
  363. package/dist/features/pre-orders/components/MarketplacePreorderCard.js +5 -5
  364. package/dist/features/pre-orders/components/PreOrderActionsClient.js +1 -1
  365. package/dist/features/pre-orders/components/PreOrderBadge.js +1 -1
  366. package/dist/features/pre-orders/components/PreOrderDetailPageView.js +7 -7
  367. package/dist/features/pre-orders/components/PreOrdersIndexListing.js +3 -3
  368. package/dist/features/pre-orders/schemas/index.d.ts +12 -12
  369. package/dist/features/products/columns/productTableColumns.js +2 -2
  370. package/dist/features/products/components/AuctionsIndexListing.js +3 -3
  371. package/dist/features/products/components/CompareOverlay.js +15 -10
  372. package/dist/features/products/components/CustomFieldsEditor.js +2 -2
  373. package/dist/features/products/components/CustomSectionsEditor.js +3 -3
  374. package/dist/features/products/components/FeatureBadge.js +2 -2
  375. package/dist/features/products/components/GroupSettingsPanel.js +5 -4
  376. package/dist/features/products/components/MakeOfferButton.js +4 -4
  377. package/dist/features/products/components/MarketplaceBundleCard.js +3 -2
  378. package/dist/features/products/components/MarketplacePrizeDrawCard.js +1 -1
  379. package/dist/features/products/components/PrizeDrawCollage.js +6 -6
  380. package/dist/features/products/components/PrizeDrawDetailPageView.js +5 -5
  381. package/dist/features/products/components/PrizeDrawEntryActions.js +1 -1
  382. package/dist/features/products/components/PrizeDrawItemsEditor.js +4 -4
  383. package/dist/features/products/components/PrizeDrawsIndexListing.js +11 -4
  384. package/dist/features/products/components/PrizeDrawsSection.js +1 -1
  385. package/dist/features/products/components/PrizeRevealModal.js +9 -4
  386. package/dist/features/products/components/ProductDetailActions.js +2 -1
  387. package/dist/features/products/components/ProductDetailPageView.js +16 -16
  388. package/dist/features/products/components/ProductFeaturesSelector.js +5 -5
  389. package/dist/features/products/components/ProductForm.js +1 -1
  390. package/dist/features/products/components/ProductGalleryClient.js +5 -3
  391. package/dist/features/products/components/ProductGrid.js +11 -11
  392. package/dist/features/products/components/ProductTabs.js +2 -2
  393. package/dist/features/products/components/ProductTabsShell.js +2 -1
  394. package/dist/features/products/components/ProductsIndexListing.js +6 -1
  395. package/dist/features/products/components/ShareButton.js +2 -1
  396. package/dist/features/products/components/ShowGroupSection.js +9 -5
  397. package/dist/features/products/components/SublistingCarouselSection.js +8 -4
  398. package/dist/features/products/constants/action-defs.d.ts +10 -2
  399. package/dist/features/products/constants/action-defs.js +20 -2
  400. package/dist/features/products/schemas/firestore.d.ts +5 -0
  401. package/dist/features/products/schemas/index.d.ts +40 -40
  402. package/dist/features/products/schemas/product-features.validators.d.ts +14 -14
  403. package/dist/features/promotions/components/CouponCard.js +13 -7
  404. package/dist/features/promotions/components/CouponsIndexListing.js +4 -6
  405. package/dist/features/promotions/components/PromotionsView.js +2 -2
  406. package/dist/features/promotions/schemas/index.d.ts +26 -26
  407. package/dist/features/reviews/components/ReviewDetailPageView.js +1 -1
  408. package/dist/features/reviews/components/ReviewDetailShell.js +11 -11
  409. package/dist/features/reviews/components/ReviewModal.js +1 -1
  410. package/dist/features/reviews/components/ReviewsIndexListing.js +2 -2
  411. package/dist/features/reviews/components/ReviewsList.js +2 -2
  412. package/dist/features/reviews/schemas/index.d.ts +22 -22
  413. package/dist/features/scams/components/ScamAwarenessModal.js +2 -2
  414. package/dist/features/scams/components/ScamProfileView.js +3 -3
  415. package/dist/features/scams/components/ScamRegistryView.js +2 -2
  416. package/dist/features/scams/schemas/index.d.ts +20 -20
  417. package/dist/features/search/components/Search.js +9 -9
  418. package/dist/features/search/components/SearchFiltersRow.js +1 -1
  419. package/dist/features/search/components/SearchResultsSection.js +3 -3
  420. package/dist/features/search/components/SearchView.js +1 -1
  421. package/dist/features/search/hooks/useNavSuggestions.js +2 -1
  422. package/dist/features/search/hooks/useSearch.js +2 -2
  423. package/dist/features/search/schemas/index.d.ts +3 -3
  424. package/dist/features/seller/components/BrandInlineSelect.js +2 -2
  425. package/dist/features/seller/components/CategoryInlineSelect.js +2 -2
  426. package/dist/features/seller/components/QuickProductForm.js +1 -1
  427. package/dist/features/seller/components/SellerAddressesView.js +4 -4
  428. package/dist/features/seller/components/SellerAnalyticsAlertsView.js +3 -3
  429. package/dist/features/seller/components/SellerAnalyticsView.js +2 -2
  430. package/dist/features/seller/components/SellerArtView.js +11 -11
  431. package/dist/features/seller/components/SellerAuctionsView.js +11 -11
  432. package/dist/features/seller/components/SellerBidsView.js +3 -3
  433. package/dist/features/seller/components/SellerBundlesView.js +12 -12
  434. package/dist/features/seller/components/SellerClassifiedView.js +11 -11
  435. package/dist/features/seller/components/SellerCouponEditorView.js +2 -2
  436. package/dist/features/seller/components/SellerDigitalCodesView.js +11 -11
  437. package/dist/features/seller/components/SellerFeaturesView.js +4 -4
  438. package/dist/features/seller/components/SellerLiveView.js +11 -11
  439. package/dist/features/seller/components/SellerOffersPanel.js +3 -2
  440. package/dist/features/seller/components/SellerOrdersView.js +2 -2
  441. package/dist/features/seller/components/SellerPayoutMethodsView.js +1 -1
  442. package/dist/features/seller/components/SellerPayoutRequestView.js +6 -5
  443. package/dist/features/seller/components/SellerPayoutSettingsView.js +5 -4
  444. package/dist/features/seller/components/SellerPreOrdersView.js +1 -1
  445. package/dist/features/seller/components/SellerPrizeDrawsView.js +1 -1
  446. package/dist/features/seller/components/SellerProductShell.js +20 -6
  447. package/dist/features/seller/components/SellerProductsCards.js +3 -3
  448. package/dist/features/seller/components/SellerProductsView.js +4 -4
  449. package/dist/features/seller/components/SellerReviewsView.js +7 -6
  450. package/dist/features/seller/components/SellerShippingView.js +2 -1
  451. package/dist/features/seller/components/SellerSidebar.js +5 -5
  452. package/dist/features/seller/components/SellerStickersView.js +11 -11
  453. package/dist/features/seller/components/SellerTemplatesView.js +1 -1
  454. package/dist/features/seller/schemas/index.d.ts +20 -20
  455. package/dist/features/server-errors/schemas/index.d.ts +6 -6
  456. package/dist/features/shell/CommandPalette.d.ts +27 -0
  457. package/dist/features/shell/CommandPalette.js +92 -0
  458. package/dist/features/shell/FormShell.js +4 -3
  459. package/dist/features/shell/QuickFormDrawer.js +3 -2
  460. package/dist/features/shell/StepForm.js +2 -2
  461. package/dist/features/shell/index.d.ts +2 -0
  462. package/dist/features/shell/index.js +1 -0
  463. package/dist/features/shipments/components/AdminShipmentEditorView.d.ts +7 -0
  464. package/dist/features/shipments/components/AdminShipmentEditorView.js +123 -0
  465. package/dist/features/shipments/components/AdminShipmentLotItemsView.d.ts +6 -0
  466. package/dist/features/shipments/components/AdminShipmentLotItemsView.js +96 -0
  467. package/dist/features/shipments/components/AdminShipmentProjectionsView.d.ts +9 -0
  468. package/dist/features/shipments/components/AdminShipmentProjectionsView.js +44 -0
  469. package/dist/features/shipments/components/AdminShipmentsView.d.ts +8 -0
  470. package/dist/features/shipments/components/AdminShipmentsView.js +82 -0
  471. package/dist/features/shipments/components/ShipmentItemLinkModal.d.ts +15 -0
  472. package/dist/features/shipments/components/ShipmentItemLinkModal.js +37 -0
  473. package/dist/features/shipments/hooks/useShipments.d.ts +69 -0
  474. package/dist/features/shipments/hooks/useShipments.js +96 -0
  475. package/dist/features/shipments/index.d.ts +10 -0
  476. package/dist/features/shipments/index.js +7 -0
  477. package/dist/features/shipments/manifest.d.ts +2 -0
  478. package/dist/features/shipments/manifest.js +26 -0
  479. package/dist/features/shipments/repository/shipment-items.repository.d.ts +56 -0
  480. package/dist/features/shipments/repository/shipment-items.repository.js +78 -0
  481. package/dist/features/shipments/repository/shipment-lots.repository.d.ts +48 -0
  482. package/dist/features/shipments/repository/shipment-lots.repository.js +55 -0
  483. package/dist/features/shipments/repository/shipments.repository.d.ts +50 -0
  484. package/dist/features/shipments/repository/shipments.repository.js +77 -0
  485. package/dist/features/shipments/schemas/firestore.d.ts +150 -0
  486. package/dist/features/shipments/schemas/firestore.js +76 -0
  487. package/dist/features/shipments/schemas/index.d.ts +2 -0
  488. package/dist/features/shipments/schemas/index.js +2 -0
  489. package/dist/features/shipments/schemas/validation.d.ts +350 -0
  490. package/dist/features/shipments/schemas/validation.js +96 -0
  491. package/dist/features/shipments/utils/cost-allocation.d.ts +25 -0
  492. package/dist/features/shipments/utils/cost-allocation.js +83 -0
  493. package/dist/features/site-settings/components/ActionPermissionsManager.js +2 -2
  494. package/dist/features/stores/components/InteractiveStoreCard.js +2 -2
  495. package/dist/features/stores/components/StoreAboutView.js +1 -1
  496. package/dist/features/stores/components/StoreAuctionsListing.js +3 -3
  497. package/dist/features/stores/components/StoreAuctionsView.js +1 -1
  498. package/dist/features/stores/components/StoreCapabilitiesGuideView.js +1 -1
  499. package/dist/features/stores/components/StoreClassifiedsListing.js +2 -2
  500. package/dist/features/stores/components/StoreDetailLayoutView.js +1 -1
  501. package/dist/features/stores/components/StoreDigitalCodesListing.js +2 -2
  502. package/dist/features/stores/components/StoreFinanceGuideView.js +2 -2
  503. package/dist/features/stores/components/StoreGuideHubView.js +2 -2
  504. package/dist/features/stores/components/StoreHeader.js +4 -4
  505. package/dist/features/stores/components/StoreLiveItemsListing.js +2 -2
  506. package/dist/features/stores/components/StoreNavTabs.js +2 -2
  507. package/dist/features/stores/components/StoreOrdersGuideView.js +1 -1
  508. package/dist/features/stores/components/StorePreOrdersListing.js +3 -3
  509. package/dist/features/stores/components/StoreProductsListing.js +1 -1
  510. package/dist/features/stores/components/StoreReviewsListing.js +2 -2
  511. package/dist/features/stores/components/StoreReviewsView.js +1 -1
  512. package/dist/features/stores/components/StoreSettingsGuideView.js +1 -1
  513. package/dist/features/stores/components/StoresIndexListing.js +9 -3
  514. package/dist/features/stores/schemas/index.d.ts +10 -10
  515. package/dist/features/support/schemas/index.d.ts +22 -22
  516. package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +3 -3
  517. package/dist/features/whatsapp-bot/components/WhatsAppChatButton.js +1 -1
  518. package/dist/features/wishlist/hooks/useWishlistCount.js +1 -2
  519. package/dist/index.d.ts +44 -1
  520. package/dist/index.js +37 -1
  521. package/dist/next/routing/route-map.d.ts +18 -0
  522. package/dist/next/routing/route-map.js +9 -0
  523. package/dist/react/hooks/useVisualViewportInset.d.ts +1 -0
  524. package/dist/react/hooks/useVisualViewportInset.js +59 -0
  525. package/dist/react/index.d.ts +1 -0
  526. package/dist/react/index.js +1 -0
  527. package/dist/repositories/index.d.ts +5 -0
  528. package/dist/repositories/index.js +5 -0
  529. package/dist/schemas/registry.d.ts +398 -364
  530. package/dist/schemas/sieve.d.ts +2 -2
  531. package/dist/schemas/webhooks/google-oauth.d.ts +2 -2
  532. package/dist/schemas/webhooks/razorpay.d.ts +100 -100
  533. package/dist/seed/_helpers/media.js +1 -0
  534. package/dist/seed/actions/demo-seed-actions.d.ts +1 -1
  535. package/dist/seed/catalogue-seed-data.d.ts +2 -0
  536. package/dist/seed/catalogue-seed-data.js +112 -0
  537. package/dist/seed/grouped-listings-seed-data.d.ts +5 -0
  538. package/dist/seed/homepage-sections-seed-data.js +0 -1
  539. package/dist/seed/index.d.ts +2 -0
  540. package/dist/seed/index.js +2 -0
  541. package/dist/seed/manifest.js +6 -0
  542. package/dist/seed/products-preorders-seed-data.d.ts +5 -0
  543. package/dist/seed/shipments-seed-data.d.ts +5 -0
  544. package/dist/seed/shipments-seed-data.js +185 -0
  545. package/dist/server.d.ts +4 -0
  546. package/dist/server.js +5 -0
  547. package/dist/styles.css +75 -19
  548. package/dist/tailwind-utilities.css +1 -1
  549. package/dist/tokens/index.d.ts +0 -2
  550. package/dist/tokens/index.js +0 -2
  551. package/dist/tokens/tokens.css +12 -2
  552. package/dist/ui/DataTable.js +4 -3
  553. package/dist/ui/components/Button.d.ts +4 -1
  554. package/dist/ui/components/Button.js +11 -5
  555. package/dist/ui/components/Checkbox.d.ts +9 -1
  556. package/dist/ui/components/Checkbox.js +5 -2
  557. package/dist/ui/components/ClaimCouponButton.js +2 -1
  558. package/dist/ui/components/ConfirmDeleteModal.style.css +1 -1
  559. package/dist/ui/components/Drawer.style.css +13 -1
  560. package/dist/ui/components/Dropdown.style.css +2 -2
  561. package/dist/ui/components/FilterDrawer.d.ts +4 -1
  562. package/dist/ui/components/FilterDrawer.js +8 -2
  563. package/dist/ui/components/Form.d.ts +1 -1
  564. package/dist/ui/components/Form.js +2 -2
  565. package/dist/ui/components/FormActionBar.style.css +6 -1
  566. package/dist/ui/components/IconButton.d.ts +6 -1
  567. package/dist/ui/components/IconButton.js +5 -2
  568. package/dist/ui/components/IconButton.style.css +11 -0
  569. package/dist/ui/components/ImageGallery.style.css +2 -0
  570. package/dist/ui/components/ImageLightbox.style.css +1 -0
  571. package/dist/ui/components/ListingFilterDrawer.d.ts +4 -1
  572. package/dist/ui/components/ListingFilterDrawer.js +4 -3
  573. package/dist/ui/components/ListingLayout.style.css +2 -2
  574. package/dist/ui/components/Modal.style.css +1 -1
  575. package/dist/ui/components/Pagination.d.ts +5 -1
  576. package/dist/ui/components/Pagination.js +4 -2
  577. package/dist/ui/components/RowActionMenu.js +1 -1
  578. package/dist/ui/components/RowActionMenu.style.css +1 -1
  579. package/dist/ui/components/Select.d.ts +6 -1
  580. package/dist/ui/components/Select.js +18 -13
  581. package/dist/ui/components/Select.style.css +1 -1
  582. package/dist/ui/components/Semantic.d.ts +13 -0
  583. package/dist/ui/components/Semantic.js +16 -3
  584. package/dist/ui/components/SideDrawer.style.css +16 -4
  585. package/dist/ui/components/SideModal.style.css +1 -1
  586. package/dist/ui/components/StickyToolbar.d.ts +3 -2
  587. package/dist/ui/components/StickyToolbar.js +1 -1
  588. package/dist/ui/components/Textarea.d.ts +5 -0
  589. package/dist/ui/components/Textarea.js +8 -4
  590. package/dist/ui/components/Toast.style.css +3 -0
  591. package/dist/ui/components/UnsavedChangesModal.style.css +1 -1
  592. package/dist/ui/components/surface-tokens.d.ts +121 -113
  593. package/dist/ui/components/surface-tokens.js +110 -104
  594. package/dist/ui/forms/FormShell.d.ts +8 -27
  595. package/dist/ui/forms/FormShell.js +1 -194
  596. package/dist/ui/forms/index.d.ts +2 -2
  597. package/dist/ui/forms/index.js +1 -1
  598. package/dist/ui/index.d.ts +8 -4
  599. package/dist/ui/index.js +4 -2
  600. package/dist/utils/id-generators.d.ts +27 -0
  601. package/dist/utils/id-generators.js +45 -0
  602. package/dist/utils/number.formatter.d.ts +7 -0
  603. package/dist/utils/number.formatter.js +9 -0
  604. package/dist/validation/schemas.d.ts +5 -5
  605. package/package.json +1 -1
@@ -37,69 +37,75 @@ export const SURFACE_MAP = {
37
37
  /** Near-black placeholder behind a media thumbnail (e.g. YouTube card) — deliberately not theme-tinted. */
38
38
  "media-dark": "bg-zinc-900",
39
39
  };
40
- /** Resolves a bare spacing step (e.g. `4`, `1.5`) to its themed CSS var arbitrary-value class fragment. */
41
- const SP = (step) => `var(--appkit-space-${step.replace(".", "-")})`;
40
+ /**
41
+ * Every className below is spelled out as a complete string literal — Tailwind's
42
+ * content scanner reads this source file as plain text (it does not evaluate
43
+ * JS), so building a class name via template-literal interpolation of the
44
+ * space step leaves an unresolved placeholder that the scanner cannot turn
45
+ * into a generatable candidate. See the same fix in Typography.tsx
46
+ * (RESPONSIVE_TEXT_SIZE_CLASS) for the identical issue with text sizes.
47
+ */
42
48
  export const PADDING_MAP = {
43
49
  none: "",
44
- "2xs": `p-[${SP("1")}]`,
45
- xs: `p-[${SP("2")}]`,
46
- sm: `p-[${SP("3")}]`,
47
- md: `p-[${SP("4")}]`,
48
- "5": `p-[${SP("5")}]`,
49
- lg: `p-[${SP("6")}]`,
50
- xl: `p-[${SP("8")}]`,
51
- "3xl": `p-[${SP("12")}]`,
52
- card: `p-[${SP("5")}] sm:p-[${SP("6")}] lg:p-[${SP("8")}]`,
53
- "card-tight": `p-[${SP("3")}] sm:p-[${SP("4")}]`,
54
- section: `py-[${SP("10")}] sm:py-[${SP("14")}] xl:py-[${SP("20")}]`,
55
- sectionSm: `py-[${SP("6")}] sm:py-[${SP("10")}]`,
56
- page: `py-[${SP("6")}] sm:py-[${SP("8")}] lg:py-[${SP("10")}]`,
57
- hero: `py-[${SP("12")}] sm:py-[${SP("16")}] lg:py-[${SP("24")}]`,
58
- toolbar: `px-[${SP("3")}] py-[${SP("1.5")}]`,
59
- inline: `px-[${SP("4")}] py-[${SP("3")}]`,
60
- inlineSm: `px-[${SP("3")}] py-[${SP("2")}]`,
61
- inlineLg: `px-[${SP("6")}] py-[${SP("4")}]`,
50
+ "2xs": "p-[var(--appkit-space-1)]",
51
+ xs: "p-[var(--appkit-space-2)]",
52
+ sm: "p-[var(--appkit-space-3)]",
53
+ md: "p-[var(--appkit-space-4)]",
54
+ "5": "p-[var(--appkit-space-5)]",
55
+ lg: "p-[var(--appkit-space-6)]",
56
+ xl: "p-[var(--appkit-space-8)]",
57
+ "3xl": "p-[var(--appkit-space-12)]",
58
+ card: "p-[var(--appkit-space-5)] sm:p-[var(--appkit-space-6)] lg:p-[var(--appkit-space-8)]",
59
+ "card-tight": "p-[var(--appkit-space-3)] sm:p-[var(--appkit-space-4)]",
60
+ section: "py-[var(--appkit-space-10)] sm:py-[var(--appkit-space-14)] xl:py-[var(--appkit-space-20)]",
61
+ sectionSm: "py-[var(--appkit-space-6)] sm:py-[var(--appkit-space-10)]",
62
+ page: "py-[var(--appkit-space-6)] sm:py-[var(--appkit-space-8)] lg:py-[var(--appkit-space-10)]",
63
+ hero: "py-[var(--appkit-space-12)] sm:py-[var(--appkit-space-16)] lg:py-[var(--appkit-space-24)]",
64
+ toolbar: "px-[var(--appkit-space-3)] py-[var(--appkit-space-1-5)]",
65
+ inline: "px-[var(--appkit-space-4)] py-[var(--appkit-space-3)]",
66
+ inlineSm: "px-[var(--appkit-space-3)] py-[var(--appkit-space-2)]",
67
+ inlineLg: "px-[var(--appkit-space-6)] py-[var(--appkit-space-4)]",
62
68
  /** Tiny pill chip — `px-1.5 py-0.5`. Used by Bundle/PrizeDraw badge labels. */
63
- "chip-2xs": `px-[${SP("1.5")}] py-[${SP("0.5")}]`,
69
+ "chip-2xs": "px-[var(--appkit-space-1-5)] py-[var(--appkit-space-0-5)]",
64
70
  // Vertical-only presets — the variant-catalogue codemod migrates raw
65
71
  // `py-N` / `py-N md:py-M` className tokens into these names.
66
- "y-2xs": `py-[${SP("1")}]`,
67
- "y-xs": `py-[${SP("2")}]`,
68
- "y-sm": `py-[${SP("3")}]`,
69
- "y-md": `py-[${SP("4")}]`,
70
- "y-lg": `py-[${SP("6")}]`,
71
- "y-xl": `py-[${SP("8")}]`,
72
- "y-2xl": `py-[${SP("10")}]`,
73
- "y-3xl": `py-[${SP("12")}]`,
74
- "y-4xl": `py-[${SP("16")}]`,
72
+ "y-2xs": "py-[var(--appkit-space-1)]",
73
+ "y-xs": "py-[var(--appkit-space-2)]",
74
+ "y-sm": "py-[var(--appkit-space-3)]",
75
+ "y-md": "py-[var(--appkit-space-4)]",
76
+ "y-lg": "py-[var(--appkit-space-6)]",
77
+ "y-xl": "py-[var(--appkit-space-8)]",
78
+ "y-2xl": "py-[var(--appkit-space-10)]",
79
+ "y-3xl": "py-[var(--appkit-space-12)]",
80
+ "y-4xl": "py-[var(--appkit-space-16)]",
75
81
  // Horizontal-only presets.
76
- "x-xs": `px-[${SP("2")}]`,
77
- "x-sm": `px-[${SP("3")}]`,
78
- "x-md": `px-[${SP("4")}]`,
79
- "x-lg": `px-[${SP("6")}]`,
80
- "x-xl": `px-[${SP("8")}]`,
82
+ "x-xs": "px-[var(--appkit-space-2)]",
83
+ "x-sm": "px-[var(--appkit-space-3)]",
84
+ "x-md": "px-[var(--appkit-space-4)]",
85
+ "x-lg": "px-[var(--appkit-space-6)]",
86
+ "x-xl": "px-[var(--appkit-space-8)]",
81
87
  // Top-only and bottom-only side presets.
82
- "t-2xs": `pt-[${SP("1")}]`,
83
- "b-2xs": `pb-[${SP("1")}]`,
84
- "t-xs": `pt-[${SP("2")}]`,
85
- "t-sm": `pt-[${SP("3")}]`,
86
- "t-md": `pt-[${SP("4")}]`,
87
- "t-lg": `pt-[${SP("6")}]`,
88
- "t-xl": `pt-[${SP("8")}]`,
89
- "b-xs": `pb-[${SP("2")}]`,
90
- "b-sm": `pb-[${SP("3")}]`,
91
- "b-md": `pb-[${SP("4")}]`,
92
- "b-lg": `pb-[${SP("6")}]`,
93
- "b-xl": `pb-[${SP("8")}]`,
94
- "b-2xl": `pb-[${SP("10")}]`,
88
+ "t-2xs": "pt-[var(--appkit-space-1)]",
89
+ "b-2xs": "pb-[var(--appkit-space-1)]",
90
+ "t-xs": "pt-[var(--appkit-space-2)]",
91
+ "t-sm": "pt-[var(--appkit-space-3)]",
92
+ "t-md": "pt-[var(--appkit-space-4)]",
93
+ "t-lg": "pt-[var(--appkit-space-6)]",
94
+ "t-xl": "pt-[var(--appkit-space-8)]",
95
+ "b-xs": "pb-[var(--appkit-space-2)]",
96
+ "b-sm": "pb-[var(--appkit-space-3)]",
97
+ "b-md": "pb-[var(--appkit-space-4)]",
98
+ "b-lg": "pb-[var(--appkit-space-6)]",
99
+ "b-xl": "pb-[var(--appkit-space-8)]",
100
+ "b-2xl": "pb-[var(--appkit-space-10)]",
95
101
  // Fill-in vertical sizes.
96
- "y-2-5xl": `py-[${SP("14")}]`,
97
- "y-5xl": `py-[${SP("20")}]`,
98
- "y-6xl": `py-[${SP("24")}]`,
102
+ "y-2-5xl": "py-[var(--appkit-space-14)]",
103
+ "y-5xl": "py-[var(--appkit-space-20)]",
104
+ "y-6xl": "py-[var(--appkit-space-24)]",
99
105
  // Responsive banner preset — used by accent-banner Sections.
100
- banner: `py-[${SP("14")}] md:py-[${SP("16")}] lg:py-[${SP("20")}]`,
106
+ banner: "py-[var(--appkit-space-14)] md:py-[var(--appkit-space-16)] lg:py-[var(--appkit-space-20)]",
101
107
  // Responsive content preset — about-views inner container padding.
102
- "content-banner": `py-[${SP("10")}] md:py-[${SP("12")}] lg:py-[${SP("16")}]`,
108
+ "content-banner": "py-[var(--appkit-space-10)] md:py-[var(--appkit-space-12)] lg:py-[var(--appkit-space-16)]",
103
109
  };
104
110
  export const ROUNDED_MAP = {
105
111
  none: "",
@@ -175,17 +181,17 @@ export const SHADOW_MAP = {
175
181
  export const GAP_PRESETS = {
176
182
  none: "gap-0",
177
183
  px: "gap-px",
178
- xs: `gap-[${SP("1")}]`,
179
- sm: `gap-[${SP("2")}]`,
180
- dense: `gap-[${SP("2")}]`,
181
- md: `gap-[${SP("3")}]`,
182
- comfortable: `gap-[${SP("3")}]`,
183
- lg: `gap-[${SP("4")}]`,
184
- loose: `gap-[${SP("4")}]`,
185
- xl: `gap-[${SP("5")}]`,
186
- "2xl": `gap-[${SP("6")}]`,
187
- section: `gap-[${SP("6")}] sm:gap-[${SP("8")}]`,
188
- hero: `gap-[${SP("10")}] sm:gap-[${SP("12")}]`,
184
+ xs: "gap-[var(--appkit-space-1)]",
185
+ sm: "gap-[var(--appkit-space-2)]",
186
+ dense: "gap-[var(--appkit-space-2)]",
187
+ md: "gap-[var(--appkit-space-3)]",
188
+ comfortable: "gap-[var(--appkit-space-3)]",
189
+ lg: "gap-[var(--appkit-space-4)]",
190
+ loose: "gap-[var(--appkit-space-4)]",
191
+ xl: "gap-[var(--appkit-space-5)]",
192
+ "2xl": "gap-[var(--appkit-space-6)]",
193
+ section: "gap-[var(--appkit-space-6)] sm:gap-[var(--appkit-space-8)]",
194
+ hero: "gap-[var(--appkit-space-10)] sm:gap-[var(--appkit-space-12)]",
189
195
  };
190
196
  /**
191
197
  * Named padding presets consumed by `<Container>` / `<Section>` / `<Card>` /
@@ -196,60 +202,60 @@ export const GAP_PRESETS = {
196
202
  export const PADDING_PRESETS = PADDING_MAP;
197
203
  export const X_ONLY_MAP = {
198
204
  none: "",
199
- "x-xs": `px-[${SP("2")}]`,
200
- "x-sm": `px-[${SP("3")}]`,
201
- "x-md": `px-[${SP("4")}]`,
202
- "x-5": `px-[${SP("5")}]`,
203
- "x-lg": `px-[${SP("6")}]`,
204
- "x-xl": `px-[${SP("8")}]`,
205
+ "x-xs": "px-[var(--appkit-space-2)]",
206
+ "x-sm": "px-[var(--appkit-space-3)]",
207
+ "x-md": "px-[var(--appkit-space-4)]",
208
+ "x-5": "px-[var(--appkit-space-5)]",
209
+ "x-lg": "px-[var(--appkit-space-6)]",
210
+ "x-xl": "px-[var(--appkit-space-8)]",
205
211
  /** Responsive: `px-3 sm:px-4` — the canonical mobile-tight container. */
206
- "x-sm-md": `px-[${SP("3")}] sm:px-[${SP("4")}]`,
212
+ "x-sm-md": "px-[var(--appkit-space-3)] sm:px-[var(--appkit-space-4)]",
207
213
  /** Responsive: `px-3 lg:px-4` — the canonical mobile-tight wide container. */
208
- "x-sm-lg-md": `px-[${SP("3")}] lg:px-[${SP("4")}]`,
214
+ "x-sm-lg-md": "px-[var(--appkit-space-3)] lg:px-[var(--appkit-space-4)]",
209
215
  /** Responsive: `px-4 sm:px-6` — narrow container horizontal padding. */
210
- "x-md-lg": `px-[${SP("4")}] sm:px-[${SP("6")}]`,
216
+ "x-md-lg": "px-[var(--appkit-space-4)] sm:px-[var(--appkit-space-6)]",
211
217
  /** Responsive: `px-6 md:px-10` — guide hub / store-extension container padding. */
212
- "x-md-xl": `px-[${SP("6")}] md:px-[${SP("10")}]`,
218
+ "x-md-xl": "px-[var(--appkit-space-6)] md:px-[var(--appkit-space-10)]",
213
219
  /** Responsive: `px-4 sm:px-8` — section header container padding. */
214
- "x-md-2xl": `px-[${SP("4")}] sm:px-[${SP("8")}]`,
220
+ "x-md-2xl": "px-[var(--appkit-space-4)] sm:px-[var(--appkit-space-8)]",
215
221
  /** Responsive: `px-4 sm:px-6 lg:px-8` — canonical page-container horizontal padding. */
216
- "x-page": `px-[${SP("4")}] sm:px-[${SP("6")}] lg:px-[${SP("8")}]`,
222
+ "x-page": "px-[var(--appkit-space-4)] sm:px-[var(--appkit-space-6)] lg:px-[var(--appkit-space-8)]",
217
223
  // Asymmetric left one-sided value (for sites that pad just one edge, e.g. a
218
224
  // selection-checkbox gutter).
219
225
  /** Asymmetric: `pl-8` — reserves a left gutter (e.g. for an overlaid selection checkbox). */
220
- "l-xl": `pl-[${SP("8")}]`,
226
+ "l-xl": "pl-[var(--appkit-space-8)]",
221
227
  };
222
228
  const Y_ONLY_MAP = {
223
229
  none: "",
224
- "y-2xs": `py-[${SP("1")}]`,
225
- "y-2xs-tall": `py-[${SP("1.5")}]`,
226
- "y-xs": `py-[${SP("2")}]`,
227
- "y-xs-tall": `py-[${SP("2.5")}]`,
228
- "y-sm": `py-[${SP("3")}]`,
229
- "y-sm-tall": `py-[${SP("3.5")}]`,
230
- "y-md": `py-[${SP("4")}]`,
231
- "y-md-lg": `py-[${SP("5")}]`,
232
- "y-lg": `py-[${SP("6")}]`,
233
- "y-xl": `py-[${SP("8")}]`,
234
- "y-2xl": `py-[${SP("10")}]`,
235
- "y-3xl": `py-[${SP("12")}]`,
236
- "y-2-5xl": `py-[${SP("14")}]`,
237
- "y-4xl": `py-[${SP("16")}]`,
238
- "y-5xl": `py-[${SP("20")}]`,
239
- "y-6xl": `py-[${SP("24")}]`,
230
+ "y-2xs": "py-[var(--appkit-space-1)]",
231
+ "y-2xs-tall": "py-[var(--appkit-space-1-5)]",
232
+ "y-xs": "py-[var(--appkit-space-2)]",
233
+ "y-xs-tall": "py-[var(--appkit-space-2-5)]",
234
+ "y-sm": "py-[var(--appkit-space-3)]",
235
+ "y-sm-tall": "py-[var(--appkit-space-3-5)]",
236
+ "y-md": "py-[var(--appkit-space-4)]",
237
+ "y-md-lg": "py-[var(--appkit-space-5)]",
238
+ "y-lg": "py-[var(--appkit-space-6)]",
239
+ "y-xl": "py-[var(--appkit-space-8)]",
240
+ "y-2xl": "py-[var(--appkit-space-10)]",
241
+ "y-3xl": "py-[var(--appkit-space-12)]",
242
+ "y-2-5xl": "py-[var(--appkit-space-14)]",
243
+ "y-4xl": "py-[var(--appkit-space-16)]",
244
+ "y-5xl": "py-[var(--appkit-space-20)]",
245
+ "y-6xl": "py-[var(--appkit-space-24)]",
240
246
  // Asymmetric top/bottom one-sided values (for sites that pad just one edge).
241
- "t-2xs": `pt-[${SP("1")}]`,
242
- "b-2xs": `pb-[${SP("1")}]`,
243
- "t-xs": `pt-[${SP("2")}]`,
244
- "b-xs": `pb-[${SP("2")}]`,
245
- "t-sm": `pt-[${SP("3")}]`,
246
- "b-sm": `pb-[${SP("3")}]`,
247
- "t-md": `pt-[${SP("4")}]`,
248
- "b-md": `pb-[${SP("4")}]`,
249
- "b-md-lg": `pb-[${SP("5")}]`,
250
- "b-lg": `pb-[${SP("6")}]`,
247
+ "t-2xs": "pt-[var(--appkit-space-1)]",
248
+ "b-2xs": "pb-[var(--appkit-space-1)]",
249
+ "t-xs": "pt-[var(--appkit-space-2)]",
250
+ "b-xs": "pb-[var(--appkit-space-2)]",
251
+ "t-sm": "pt-[var(--appkit-space-3)]",
252
+ "b-sm": "pb-[var(--appkit-space-3)]",
253
+ "t-md": "pt-[var(--appkit-space-4)]",
254
+ "b-md": "pb-[var(--appkit-space-4)]",
255
+ "b-md-lg": "pb-[var(--appkit-space-5)]",
256
+ "b-lg": "pb-[var(--appkit-space-6)]",
251
257
  /** Asymmetric: `pt-4 pb-6` — hotspot control bar with tighter top than bottom. */
252
- "t-md-b-lg": `pt-[${SP("4")}] pb-[${SP("6")}]`,
258
+ "t-md-b-lg": "pt-[var(--appkit-space-4)] pb-[var(--appkit-space-6)]",
253
259
  };
254
260
  const OVERFLOW_MAP = {
255
261
  auto: "overflow-auto",
@@ -1,6 +1,13 @@
1
1
  import React, { type ReactNode } from "react";
2
- import type { ZodType } from "zod";
3
2
  import type { FormValues } from "../../schemas/types";
3
+ /**
4
+ * A step descriptor. The step-wizard *rendering* this once drove
5
+ * (`<FormShell steps={…}>`) was deleted 2026-08-09 as dead code — the real
6
+ * wizard chrome is `features/shell/FormShell.tsx` + `StepForm.tsx`. This type
7
+ * survives because `FormShellContextValue.steps` still carries the shape for
8
+ * any context consumer that reads it (FormShellProvider/useFormShellState
9
+ * both populate it as `[]` since neither is step-aware).
10
+ */
4
11
  export interface FormShellStep {
5
12
  id: string;
6
13
  label: string;
@@ -24,31 +31,6 @@ export interface FormShellContextValue {
24
31
  isSubmitting: boolean;
25
32
  stepErrorCounts: number[];
26
33
  }
27
- export interface FormShellProps {
28
- steps: FormShellStep[];
29
- /** Called on debounced auto-save and "Save Draft" click */
30
- onSaveDraft?: (values: FormValues) => Promise<{
31
- id?: string;
32
- } | void>;
33
- /** Called on Publish / Save */
34
- onPublish: (values: FormValues) => Promise<void>;
35
- /** Current form values — caller owns state */
36
- values: FormValues;
37
- /** Zod schema for auto-validation on publish. Errors are mapped to field names. */
38
- schema?: ZodType;
39
- /** When true + schema provided, validate on every value change (not just publish). */
40
- validateOnChange?: boolean;
41
- /** Whether any values differ from the persisted state */
42
- isDirty?: boolean;
43
- draftId?: string;
44
- autoSaveDelayMs?: number;
45
- publishLabel?: string;
46
- saveDraftLabel?: string;
47
- title?: string;
48
- className?: string;
49
- /** If true, show steps as vertical accordion on mobile instead of wizard tabs */
50
- mobileAccordion?: boolean;
51
- }
52
34
  export declare const FormShellContext: React.Context<FormShellContextValue | null>;
53
35
  export declare function useFormShell(): FormShellContextValue;
54
36
  export interface UseFormShellStateResult {
@@ -90,4 +72,3 @@ export interface FormShellProviderProps {
90
72
  values?: FormValues;
91
73
  }
92
74
  export declare function FormShellProvider({ children, onSaveDraft, isDirty, autoSaveDelayMs, values, }: FormShellProviderProps): React.JSX.Element;
93
- export declare function FormShell({ steps, onSaveDraft, onPublish, values, schema, validateOnChange, isDirty, autoSaveDelayMs, publishLabel, saveDraftLabel, title, className, mobileAccordion, }: FormShellProps): React.JSX.Element;
@@ -1,8 +1,6 @@
1
1
  "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState, } from "react";
4
- import { Button } from "../components/Button";
5
- import { Heading, Span, Text } from "../components/Typography";
6
4
  // ─── Context ──────────────────────────────────────────────────────────────────
7
5
  export const FormShellContext = createContext(null);
8
6
  export function useFormShell() {
@@ -74,25 +72,6 @@ export function useFormShellState(schema) {
74
72
  }), [errors, setFieldError]);
75
73
  return { shellCtx, setFieldError, clearErrors, hasErrors: Object.keys(errors).length > 0, validate };
76
74
  }
77
- function StepIndicator({ steps, currentStep, stepErrorCounts, onGoTo, }) {
78
- return (_jsx("nav", { className: "appkit-formshell__step-indicator", "aria-label": "Form steps", children: steps.map((step, i) => {
79
- const isActive = i === currentStep;
80
- const hasErrors = stepErrorCounts[i] > 0;
81
- return (_jsxs("button", { type: "button", className: [
82
- "appkit-formshell__step-btn",
83
- isActive ? "appkit-formshell__step-btn--active" : "",
84
- hasErrors ? "appkit-formshell__step-btn--error" : "",
85
- ]
86
- .filter(Boolean)
87
- .join(" "), onClick: () => onGoTo(i), "aria-current": isActive ? "step" : undefined, "aria-label": `${step.label}${hasErrors ? ` (${stepErrorCounts[i]} error${stepErrorCounts[i] !== 1 ? "s" : ""})` : ""}`, children: [_jsxs("span", { className: "appkit-formshell__step-dot", children: [hasErrors && (_jsx("span", { className: "appkit-formshell__step-error-badge", "aria-hidden": "true" })), _jsx("span", { className: "appkit-formshell__step-num", children: i + 1 })] }), _jsx("span", { className: "appkit-formshell__step-label", children: step.label })] }, step.id));
88
- }) }));
89
- }
90
- function ErrorSummary({ errors, visible }) {
91
- const entries = Object.entries(errors).filter(([, v]) => v);
92
- if (!visible || entries.length === 0)
93
- return null;
94
- return (_jsxs("div", { className: "appkit-formshell__error-summary", role: "alert", "aria-live": "assertive", children: [_jsxs(Text, { size: "sm", variant: "error", className: "appkit-formshell__error-summary__title", children: ["Please fix ", entries.length, " error", entries.length !== 1 ? "s" : "", " before publishing."] }), _jsx("ul", { className: "appkit-formshell__error-summary__list", children: entries.map(([field, msg]) => (_jsx("li", { children: _jsxs(Text, { size: "sm", variant: "error", children: [_jsx(Span, { weight: "bold", children: field }), ": ", msg] }) }, field))) })] }));
95
- }
96
75
  export function FormShellProvider({ children, onSaveDraft, isDirty = false, autoSaveDelayMs = 2000, values = {}, }) {
97
76
  const [errors, setErrors] = useState({});
98
77
  const [touched, setTouched] = useState({});
@@ -152,175 +131,3 @@ export function FormShellProvider({ children, onSaveDraft, isDirty = false, auto
152
131
  }), [errors, touched, setFieldError, setFieldTouched, clearFieldError, isDirty]);
153
132
  return _jsx(FormShellContext.Provider, { value: ctx, children: children });
154
133
  }
155
- // ─── Schema validation helper ────────────────────────────────────────────────
156
- function validateSchema(schema, values, setFieldError, setErrors) {
157
- const result = schema.safeParse(values);
158
- if (result.success) {
159
- setErrors({});
160
- return true;
161
- }
162
- const newErrors = {};
163
- for (const issue of result.error.issues) {
164
- const path = issue.path.join(".");
165
- if (path && !newErrors[path]) {
166
- newErrors[path] = issue.message;
167
- }
168
- }
169
- setErrors(newErrors);
170
- return false;
171
- }
172
- // ─── FormShell ────────────────────────────────────────────────────────────────
173
- export function FormShell({ steps, onSaveDraft, onPublish, values, schema, validateOnChange = false, isDirty = false, autoSaveDelayMs = 2000, publishLabel = "Publish", saveDraftLabel = "Save Draft", title, className = "", mobileAccordion = true, }) {
174
- const [errors, setErrors] = useState({});
175
- const [touched, setTouched] = useState({});
176
- const [currentStep, setCurrentStep] = useState(0);
177
- const [isSubmitting, setIsSubmitting] = useState(false);
178
- const [showErrorSummary, setShowErrorSummary] = useState(false);
179
- // Auto-save
180
- const autoSaveTimer = useRef(null);
181
- const valuesRef = useRef(values);
182
- valuesRef.current = values;
183
- useEffect(() => {
184
- if (!onSaveDraft || !isDirty)
185
- return;
186
- if (autoSaveTimer.current)
187
- clearTimeout(autoSaveTimer.current);
188
- autoSaveTimer.current = setTimeout(() => {
189
- onSaveDraft(valuesRef.current).catch(() => { });
190
- }, autoSaveDelayMs);
191
- return () => {
192
- if (autoSaveTimer.current)
193
- clearTimeout(autoSaveTimer.current);
194
- };
195
- }, [values, isDirty, onSaveDraft, autoSaveDelayMs]);
196
- // Per-step error counts
197
- const stepErrorCounts = useMemo(() => {
198
- return steps.map((step) => {
199
- const fields = step.requiredFields ?? [];
200
- return fields.filter((f) => errors[f]).length;
201
- });
202
- }, [steps, errors]);
203
- // Publish gate: all required fields across all steps must be valid
204
- const isPublishReady = useMemo(() => {
205
- return steps.every((step) => (step.requiredFields ?? []).every((f) => !errors[f]));
206
- }, [steps, errors]);
207
- const setFieldError = useCallback((name, error) => {
208
- setErrors((prev) => {
209
- if (!error) {
210
- const next = { ...prev };
211
- delete next[name];
212
- return next;
213
- }
214
- if (prev[name] === error)
215
- return prev;
216
- return { ...prev, [name]: error };
217
- });
218
- }, []);
219
- const clearFieldError = useCallback((name) => {
220
- setErrors((prev) => {
221
- if (!prev[name])
222
- return prev;
223
- const next = { ...prev };
224
- delete next[name];
225
- return next;
226
- });
227
- }, []);
228
- const setFieldTouched = useCallback((name) => {
229
- setTouched((prev) => (prev[name] ? prev : { ...prev, [name]: true }));
230
- }, []);
231
- const goToStep = useCallback((n) => {
232
- if (n >= 0 && n < steps.length)
233
- setCurrentStep(n);
234
- }, [steps.length]);
235
- const nextStep = useCallback(() => setCurrentStep((s) => Math.min(s + 1, steps.length - 1)), [steps.length]);
236
- const prevStep = useCallback(() => setCurrentStep((s) => Math.max(s - 1, 0)), []);
237
- const handleSaveDraft = useCallback(async () => {
238
- if (!onSaveDraft)
239
- return;
240
- setIsSubmitting(true);
241
- try {
242
- await onSaveDraft(values);
243
- }
244
- finally {
245
- setIsSubmitting(false);
246
- }
247
- }, [onSaveDraft, values]);
248
- // Schema-driven live validation on value changes
249
- useEffect(() => {
250
- if (!schema || !validateOnChange)
251
- return;
252
- validateSchema(schema, values, setFieldError, setErrors);
253
- }, [schema, validateOnChange, values, setFieldError]);
254
- const handlePublish = useCallback(async () => {
255
- setShowErrorSummary(true);
256
- if (schema) {
257
- const valid = validateSchema(schema, values, setFieldError, setErrors);
258
- if (!valid)
259
- return;
260
- }
261
- if (!isPublishReady)
262
- return;
263
- setIsSubmitting(true);
264
- try {
265
- await onPublish(values);
266
- }
267
- finally {
268
- setIsSubmitting(false);
269
- }
270
- }, [isPublishReady, onPublish, values, schema, setFieldError]);
271
- const ctx = useMemo(() => ({
272
- errors,
273
- touched,
274
- setFieldError,
275
- setFieldTouched,
276
- clearFieldError,
277
- steps,
278
- currentStep,
279
- goToStep,
280
- nextStep,
281
- prevStep,
282
- isPublishReady,
283
- isDirty,
284
- isSubmitting,
285
- stepErrorCounts,
286
- }), [
287
- errors,
288
- touched,
289
- setFieldError,
290
- setFieldTouched,
291
- clearFieldError,
292
- steps,
293
- currentStep,
294
- goToStep,
295
- nextStep,
296
- prevStep,
297
- isPublishReady,
298
- isDirty,
299
- isSubmitting,
300
- stepErrorCounts,
301
- ]);
302
- const isMultiStep = steps.length > 1;
303
- return (_jsx(FormShellContext.Provider, { value: ctx, children: _jsxs("div", { className: [
304
- "appkit-formshell",
305
- mobileAccordion ? "appkit-formshell--accordion-mobile" : "",
306
- className,
307
- ]
308
- .filter(Boolean)
309
- .join(" "), children: [(title || isMultiStep) && (_jsxs("div", { className: "appkit-formshell__header", children: [title && (_jsx(Heading, { level: 2, className: "appkit-formshell__title", children: title })), isMultiStep && (_jsx(StepIndicator, { steps: steps, currentStep: currentStep, stepErrorCounts: stepErrorCounts, onGoTo: goToStep }))] })), _jsx(ErrorSummary, { errors: errors, visible: showErrorSummary }), _jsx("div", { className: "appkit-formshell__body", children: isMultiStep ? (mobileAccordion ? (
310
- // Mobile: vertical accordion; Desktop: show only current step
311
- _jsx("div", { className: "appkit-formshell__steps", children: steps.map((step, i) => {
312
- const isActive = i === currentStep;
313
- const hasErrors = stepErrorCounts[i] > 0;
314
- return (_jsxs("div", { className: [
315
- "appkit-formshell__step",
316
- isActive ? "appkit-formshell__step--active" : "",
317
- hasErrors ? "appkit-formshell__step--error" : "",
318
- ]
319
- .filter(Boolean)
320
- .join(" "), children: [_jsxs("button", { type: "button", className: "appkit-formshell__step-accordion-btn", onClick: () => goToStep(i), "aria-expanded": isActive, children: [_jsxs("span", { className: "appkit-formshell__step-accordion-label", children: [i + 1, ". ", step.label] }), hasErrors && (_jsx("span", { className: "appkit-formshell__step-error-badge appkit-formshell__step-error-badge--inline", children: stepErrorCounts[i] }))] }), _jsx("div", { className: "appkit-formshell__step-content", hidden: !isActive, "aria-hidden": !isActive, children: step.content })] }, step.id));
321
- }) })) : (
322
- // Non-accordion: show only the active step
323
- _jsx("div", { className: "appkit-formshell__step-content", children: steps[currentStep]?.content }))) : (
324
- // Single step: render content directly
325
- _jsx("div", { className: "appkit-formshell__step-content", children: steps[0]?.content })) }), _jsxs("div", { className: "appkit-formshell__footer", children: [isMultiStep && (_jsxs("div", { className: "appkit-formshell__step-nav", children: [_jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: prevStep, disabled: currentStep === 0 || isSubmitting, children: "Previous" }), currentStep < steps.length - 1 && (_jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: nextStep, disabled: isSubmitting, children: "Next" }))] })), _jsxs("div", { className: "appkit-formshell__actions", children: [onSaveDraft && (_jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: handleSaveDraft, isLoading: isSubmitting, disabled: isSubmitting, children: saveDraftLabel })), _jsx(Button, { type: "button", size: "sm", onClick: handlePublish, isLoading: isSubmitting, disabled: isSubmitting || (showErrorSummary && !isPublishReady), children: publishLabel })] })] })] }) }));
326
- }
@@ -1,5 +1,5 @@
1
- export type { FormShellProps, FormShellProviderProps, FormShellStep, FormShellContextValue, UseFormShellStateResult, } from "./FormShell";
2
- export { FormShell, FormShellProvider, FormShellContext, useFormShell, useFormShellState, applyZodIssues } from "./FormShell";
1
+ export type { FormShellProviderProps, FormShellStep, FormShellContextValue, UseFormShellStateResult, } from "./FormShell";
2
+ export { FormShellProvider, FormShellContext, useFormShell, useFormShellState, applyZodIssues } from "./FormShell";
3
3
  export type { FieldInputProps } from "./FieldInput";
4
4
  export { FieldInput } from "./FieldInput";
5
5
  export type { FieldSelectProps } from "./FieldSelect";
@@ -1,4 +1,4 @@
1
- export { FormShell, FormShellProvider, FormShellContext, useFormShell, useFormShellState, applyZodIssues } from "./FormShell";
1
+ export { FormShellProvider, FormShellContext, useFormShell, useFormShellState, applyZodIssues } from "./FormShell";
2
2
  export { FieldInput } from "./FieldInput";
3
3
  export { FieldSelect } from "./FieldSelect";
4
4
  export { FieldCheckbox } from "./FieldCheckbox";
@@ -1,17 +1,19 @@
1
1
  import "./components/index.style.css";
2
2
  import "./forms/FormShell.style.css";
3
- export type { FormShellProps, FormShellStep, FormShellContextValue, } from "./forms";
4
- export { FormShell, useFormShell } from "./forms";
3
+ export type { FormShellStep, FormShellContextValue, } from "./forms";
4
+ export { FormShellProvider, useFormShell } from "./forms";
5
5
  export type { FieldInputProps } from "./forms";
6
6
  export { FieldInput } from "./forms";
7
7
  export type { FieldSelectProps } from "./forms";
8
8
  export { FieldSelect } from "./forms";
9
9
  export type { FieldCheckboxProps } from "./forms";
10
10
  export { FieldCheckbox } from "./forms";
11
+ export type { FieldTextareaProps } from "./forms";
12
+ export { FieldTextarea } from "./forms";
11
13
  export { buildColumns, createColumnBuilder, renderBoolean, renderCurrency, renderCurrencyCompact, renderCount, renderNullable, renderRating, } from "./columns";
12
14
  export type { BooleanRenderOpts, RatingMode, RatingRenderOpts, } from "./columns";
13
- export type { SectionProps, ArticleProps, MainProps, AsideProps, NavProps, BlockHeaderProps, BlockFooterProps, UlProps, OlProps, LiProps, TableProps, TheadProps, TbodyProps, TrProps, ThProps, TdProps, CodeProps, PreProps, BlockquoteProps, FigureProps, FigcaptionProps, DlProps, DtProps, DdProps, } from "./components/Semantic";
14
- export { Section, Article, Main, Aside, Nav, BlockHeader, BlockFooter, Ul, Ol, Li, Table, Thead, Tbody, Tr, Th, Td, Code, Pre, Blockquote, Figure, Figcaption, Dl, Dt, Dd, } from "./components/Semantic";
15
+ export type { SectionProps, SectionBackgroundConfig, ArticleProps, MainProps, AsideProps, NavProps, BlockHeaderProps, BlockFooterProps, UlProps, OlProps, LiProps, TableProps, TheadProps, TbodyProps, TrProps, ThProps, TdProps, CodeProps, PreProps, BlockquoteProps, FigureProps, FigcaptionProps, DlProps, DtProps, DdProps, } from "./components/Semantic";
16
+ export { Section, sectionBackgroundStyle, Article, Main, Aside, Nav, BlockHeader, BlockFooter, Ul, Ol, Li, Table, Thead, Tbody, Tr, Th, Td, Code, Pre, Blockquote, Figure, Figcaption, Dl, Dt, Dd, } from "./components/Semantic";
15
17
  export type { DivProps } from "./components/Div";
16
18
  export { Div } from "./components/Div";
17
19
  export type { ColorVariant } from "./components/Typography";
@@ -218,3 +220,5 @@ export { Anchor } from "./components/Anchor";
218
220
  export type { AnchorProps, AnchorTone, AnchorUnderline } from "./components/Anchor";
219
221
  export { Scrim } from "./components/Scrim";
220
222
  export type { ScrimProps, ScrimDirection, ScrimIntensity } from "./components/Scrim";
223
+ export { Kbd } from "./components/Kbd";
224
+ export type { KbdProps, KbdSize, KbdTone } from "./components/Kbd";
package/dist/ui/index.js CHANGED
@@ -1,12 +1,13 @@
1
1
  import "./components/index.style.css";
2
2
  import "./forms/FormShell.style.css";
3
- export { FormShell, useFormShell } from "./forms";
3
+ export { FormShellProvider, useFormShell } from "./forms";
4
4
  export { FieldInput } from "./forms";
5
5
  export { FieldSelect } from "./forms";
6
6
  export { FieldCheckbox } from "./forms";
7
+ export { FieldTextarea } from "./forms";
7
8
  // --- Column utilities ---------------------------------------------------------
8
9
  export { buildColumns, createColumnBuilder, renderBoolean, renderCurrency, renderCurrencyCompact, renderCount, renderNullable, renderRating, } from "./columns";
9
- export { Section, Article, Main, Aside, Nav, BlockHeader, BlockFooter, Ul, Ol, Li, Table, Thead, Tbody, Tr, Th, Td, Code, Pre, Blockquote, Figure, Figcaption, Dl, Dt, Dd, } from "./components/Semantic";
10
+ export { Section, sectionBackgroundStyle, Article, Main, Aside, Nav, BlockHeader, BlockFooter, Ul, Ol, Li, Table, Thead, Tbody, Tr, Th, Td, Code, Pre, Blockquote, Figure, Figcaption, Dl, Dt, Dd, } from "./components/Semantic";
10
11
  export { Div } from "./components/Div";
11
12
  export { Heading, Text, Label, Caption, Span } from "./components/Typography";
12
13
  // --- Filter chip group (SB10-C completion, S8 2026-05-13) --------------------
@@ -114,3 +115,4 @@ export { Details, Summary } from "./components/Details";
114
115
  export { HorizontalRule } from "./components/HorizontalRule";
115
116
  export { Anchor } from "./components/Anchor";
116
117
  export { Scrim } from "./components/Scrim";
118
+ export { Kbd } from "./components/Kbd";