@mohasinac/appkit 3.2.8 → 3.2.10

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 (269) hide show
  1. package/dist/_internal/client/features/filters/filter-load-options.js +12 -9
  2. package/dist/_internal/client/theme/ThemeProvider.js +14 -4
  3. package/dist/_internal/server/features/auth/firebase-identity.d.ts +12 -0
  4. package/dist/_internal/server/features/auth/firebase-identity.js +25 -0
  5. package/dist/_internal/server/features/site-settings/safe-settings.d.ts +12 -0
  6. package/dist/_internal/server/features/site-settings/safe-settings.js +25 -0
  7. package/dist/_internal/shared/features/layout/config.js +7 -7
  8. package/dist/_internal/shared/styles/skeleton.d.ts +8 -8
  9. package/dist/_internal/shared/styles/skeleton.js +10 -10
  10. package/dist/_internal/shared/styles/themed.d.ts +12 -12
  11. package/dist/_internal/shared/styles/themed.js +12 -12
  12. package/dist/features/about/components/AboutView.js +1 -1
  13. package/dist/features/about/components/FAQPageView.js +1 -1
  14. package/dist/features/about/components/FeesView.js +2 -2
  15. package/dist/features/about/components/HowAuctionsWorkView.js +2 -2
  16. package/dist/features/about/components/HowCheckoutWorksView.js +2 -2
  17. package/dist/features/about/components/HowOffersWorkView.js +2 -2
  18. package/dist/features/about/components/HowOrdersWorkView.js +2 -2
  19. package/dist/features/about/components/HowPayoutsWorkView.js +2 -2
  20. package/dist/features/about/components/HowPreOrdersWorkView.js +2 -2
  21. package/dist/features/about/components/HowReviewsWorkView.js +2 -2
  22. package/dist/features/about/components/PublicProfileView.js +3 -3
  23. package/dist/features/about/components/SecurityPrivacyView.js +2 -2
  24. package/dist/features/account/components/AddressBook.js +2 -2
  25. package/dist/features/account/components/AddressesIndexListing.js +1 -1
  26. package/dist/features/account/components/ChatWindow.js +1 -1
  27. package/dist/features/account/components/MessagesView.js +1 -1
  28. package/dist/features/account/components/NotificationBell.js +2 -2
  29. package/dist/features/account/components/NotificationPreferencesPanel.js +1 -1
  30. package/dist/features/account/components/UserSidebar.js +3 -3
  31. package/dist/features/account/components/UserSupportView.js +3 -3
  32. package/dist/features/admin/components/AdminAdEditorView.js +1 -1
  33. package/dist/features/admin/components/AdminAdsView.js +5 -5
  34. package/dist/features/admin/components/AdminAnalyticsView.js +1 -1
  35. package/dist/features/admin/components/AdminBrandsView.js +1 -1
  36. package/dist/features/admin/components/AdminBundlesView.js +2 -2
  37. package/dist/features/admin/components/AdminCarouselEditorView.js +4 -4
  38. package/dist/features/admin/components/AdminCarouselView.js +2 -2
  39. package/dist/features/admin/components/AdminCategoriesView.js +2 -2
  40. package/dist/features/admin/components/AdminContactEditorView.js +1 -1
  41. package/dist/features/admin/components/AdminCouponEditorView.js +1 -1
  42. package/dist/features/admin/components/AdminEmployeeEditorView.js +3 -3
  43. package/dist/features/admin/components/AdminFaqsView.js +1 -1
  44. package/dist/features/admin/components/AdminFeatureEditorView.js +2 -2
  45. package/dist/features/admin/components/AdminFeatureFlagsView.js +1 -1
  46. package/dist/features/admin/components/AdminFeaturesView.js +2 -2
  47. package/dist/features/admin/components/AdminNavigationView.js +2 -2
  48. package/dist/features/admin/components/AdminNotificationsView.js +1 -1
  49. package/dist/features/admin/components/AdminOrderEditorView.js +1 -1
  50. package/dist/features/admin/components/AdminPageHeader.d.ts +1 -1
  51. package/dist/features/admin/components/AdminPageHeader.js +1 -1
  52. package/dist/features/admin/components/AdminReviewsView.js +1 -1
  53. package/dist/features/admin/components/AdminScammerEditorView.js +3 -3
  54. package/dist/features/admin/components/AdminScammersView.js +1 -1
  55. package/dist/features/admin/components/AdminSectionsView.js +1 -1
  56. package/dist/features/admin/components/AdminSessionsView.js +1 -1
  57. package/dist/features/admin/components/AdminSidebar.js +5 -5
  58. package/dist/features/admin/components/AdminSiteSettingsView.js +3 -3
  59. package/dist/features/admin/components/AdminStoreEditorView.js +3 -3
  60. package/dist/features/admin/components/AdminSupportTicketDetailView.js +3 -3
  61. package/dist/features/admin/components/AdminSupportTicketsView.js +2 -2
  62. package/dist/features/admin/components/AdminViewCards.js +5 -5
  63. package/dist/features/admin/components/DataTable.js +1 -1
  64. package/dist/features/admin/components/DrawerFormFooter.js +1 -1
  65. package/dist/features/admin/components/QuickActionsPanel.js +1 -1
  66. package/dist/features/admin/components/analytics/AdminTopProductsTable.js +1 -1
  67. package/dist/features/auctions/components/AuctionDetailPageView.js +2 -2
  68. package/dist/features/auctions/components/CollapsibleBidHistory.js +1 -1
  69. package/dist/features/auctions/components/MarketplaceAuctionCard.js +1 -1
  70. package/dist/features/auth/components/ForgotPasswordView.js +1 -1
  71. package/dist/features/auth/components/Guards.js +1 -1
  72. package/dist/features/auth/components/RegisterForm.js +1 -1
  73. package/dist/features/auth/components/ResetPasswordView.js +1 -1
  74. package/dist/features/auth/components/SocialAuthButtons.js +1 -1
  75. package/dist/features/blog/components/BlogIndexListing.js +1 -1
  76. package/dist/features/blog/components/BlogListView.js +3 -3
  77. package/dist/features/blog/components/BlogPostView.js +1 -1
  78. package/dist/features/cart/components/CartDrawer.js +5 -5
  79. package/dist/features/categories/components/BrandDetailPageView.js +1 -1
  80. package/dist/features/categories/components/BrandDetailTabs.js +1 -1
  81. package/dist/features/categories/components/CategoriesIndexListing.js +2 -2
  82. package/dist/features/categories/components/CategoryDetailPageView.js +1 -1
  83. package/dist/features/categories/components/CategoryDetailTabs.js +1 -1
  84. package/dist/features/categories/components/CategoryGrid.js +3 -3
  85. package/dist/features/categories/components/CategoryTree.js +2 -2
  86. package/dist/features/categories/components/ConcernCard.js +1 -1
  87. package/dist/features/checkout/components/CheckoutStepper.js +1 -1
  88. package/dist/features/classified/components/ClassifiedIndexListing.js +1 -1
  89. package/dist/features/collections/components/CollectionCard.js +1 -1
  90. package/dist/features/collections/hooks/useCollections.js +12 -12
  91. package/dist/features/contact/components/ContactForm.js +1 -1
  92. package/dist/features/copilot/components/AdminCopilotView.js +5 -5
  93. package/dist/features/digital-codes/components/DigitalCodesIndexListing.js +1 -1
  94. package/dist/features/events/components/AdminEventEntriesView.js +1 -1
  95. package/dist/features/events/components/EventCard.js +1 -1
  96. package/dist/features/events/components/EventPollWidget.js +1 -1
  97. package/dist/features/events/components/EventStatusBadge.js +1 -1
  98. package/dist/features/events/components/EventsIndexListing.js +1 -1
  99. package/dist/features/faq/components/ContactCTA.js +2 -2
  100. package/dist/features/faq/components/FAQAccordion.js +4 -4
  101. package/dist/features/faq/components/FAQCategorySidebar.js +2 -2
  102. package/dist/features/faq/components/FAQHelpfulButtons.js +4 -4
  103. package/dist/features/faq/components/RelatedFAQs.js +1 -1
  104. package/dist/features/filters/AsyncFacetSection.js +3 -3
  105. package/dist/features/filters/FilterFacetSection.js +5 -5
  106. package/dist/features/filters/RangeFilter.js +3 -3
  107. package/dist/features/filters/SwitchFilter.js +2 -2
  108. package/dist/features/forms/Checkbox.js +1 -1
  109. package/dist/features/forms/Input.js +2 -2
  110. package/dist/features/forms/Radio.js +2 -2
  111. package/dist/features/forms/Select.js +1 -1
  112. package/dist/features/forms/Slider.js +1 -1
  113. package/dist/features/forms/Textarea.js +1 -1
  114. package/dist/features/forms/Toggle.js +3 -3
  115. package/dist/features/forms/utils.d.ts +4 -4
  116. package/dist/features/forms/utils.js +4 -4
  117. package/dist/features/homepage/components/AdSlot.js +1 -1
  118. package/dist/features/homepage/components/AdvertisementBanner.js +3 -3
  119. package/dist/features/homepage/components/BrandsSection.js +2 -2
  120. package/dist/features/homepage/components/GoogleReviewsSection.js +1 -1
  121. package/dist/features/homepage/components/HeroSection.js +1 -1
  122. package/dist/features/homepage/components/HomepageCustomerReviewsSection.js +1 -1
  123. package/dist/features/homepage/components/HowItWorksSection.js +1 -1
  124. package/dist/features/homepage/components/ShopByCategorySection.js +2 -2
  125. package/dist/features/homepage/components/SiteFeaturesSection.js +1 -1
  126. package/dist/features/homepage/components/SocialPostCard.js +1 -1
  127. package/dist/features/homepage/components/StatsCounterSection.js +1 -1
  128. package/dist/features/homepage/components/TrustIndicatorsSection.js +1 -1
  129. package/dist/features/homepage/constants/hero-carousel-styles.d.ts +3 -3
  130. package/dist/features/homepage/constants/hero-carousel-styles.js +3 -3
  131. package/dist/features/homepage/hooks/useActiveAd.d.ts +1 -3
  132. package/dist/features/homepage/hooks/useActiveAd.js +9 -17
  133. package/dist/features/layout/AppLayoutShell.js +12 -12
  134. package/dist/features/layout/AutoBreadcrumbs.js +1 -1
  135. package/dist/features/layout/BackToTop.js +2 -2
  136. package/dist/features/layout/BottomActions.js +8 -8
  137. package/dist/features/layout/BottomNavItem.js +1 -1
  138. package/dist/features/layout/BottomNavLayout.js +1 -1
  139. package/dist/features/layout/BottomNavbar.d.ts +1 -1
  140. package/dist/features/layout/BottomNavbar.js +2 -2
  141. package/dist/features/layout/BottomSheet.js +1 -1
  142. package/dist/features/layout/Breadcrumbs.js +2 -2
  143. package/dist/features/layout/FooterLayout.js +2 -2
  144. package/dist/features/layout/MainNavbar.js +1 -1
  145. package/dist/features/layout/NavItem.js +1 -1
  146. package/dist/features/layout/NavbarLayout.js +3 -3
  147. package/dist/features/layout/SidebarLayout.js +1 -1
  148. package/dist/features/layout/TitleBarLayout.js +3 -3
  149. package/dist/features/live/components/LiveItemsIndexListing.js +1 -1
  150. package/dist/features/loyalty/components/CoinsDisplay.js +1 -1
  151. package/dist/features/loyalty/hooks/useLoyaltyBalance.js +11 -3
  152. package/dist/features/media/AvatarUpload.js +1 -1
  153. package/dist/features/media/MediaPickerModal.js +1 -1
  154. package/dist/features/media/components/MediaSlider.js +1 -1
  155. package/dist/features/media/finalize.d.ts +12 -1
  156. package/dist/features/media/finalize.js +64 -11
  157. package/dist/features/media/modals/ImageCropModal.js +1 -1
  158. package/dist/features/media/modals/ImageEditor.js +1 -1
  159. package/dist/features/media/repository/media-assets.repository.d.ts +33 -0
  160. package/dist/features/media/repository/media-assets.repository.js +43 -0
  161. package/dist/features/media/upload/MediaUploadField.js +1 -1
  162. package/dist/features/messages/hooks/useConversation.js +12 -17
  163. package/dist/features/messages/hooks/useConversations.js +3 -5
  164. package/dist/features/orders/components/MarketplaceOrderCard.js +1 -1
  165. package/dist/features/orders/components/OrdersList.js +3 -3
  166. package/dist/features/pre-orders/components/MarketplacePreorderCard.js +1 -1
  167. package/dist/features/pre-orders/components/PreOrderBadge.js +1 -1
  168. package/dist/features/pre-orders/components/PreOrderDetailPageView.js +2 -2
  169. package/dist/features/pre-orders/components/PreOrdersIndexListing.js +1 -1
  170. package/dist/features/pre-orders/hooks/usePreOrders.js +12 -12
  171. package/dist/features/products/columns/productTableColumns.js +3 -3
  172. package/dist/features/products/components/BidHistory.js +1 -1
  173. package/dist/features/products/components/CompareOverlay.js +9 -9
  174. package/dist/features/products/components/CustomSectionTabContent.js +1 -1
  175. package/dist/features/products/components/CustomSectionsEditor.js +1 -1
  176. package/dist/features/products/components/FeatureBadge.js +2 -2
  177. package/dist/features/products/components/GroupSettingsPanel.js +2 -2
  178. package/dist/features/products/components/PrizeDrawDetailPageView.js +2 -2
  179. package/dist/features/products/components/PrizeDrawsIndexListing.js +1 -1
  180. package/dist/features/products/components/ProductDetailPageView.js +4 -4
  181. package/dist/features/products/components/ProductFeatureBadges.js +2 -2
  182. package/dist/features/products/components/ProductFeaturesSelector.js +4 -4
  183. package/dist/features/products/components/ProductGalleryClient.js +1 -1
  184. package/dist/features/products/components/ProductGrid.js +8 -8
  185. package/dist/features/products/components/ProductTabs.js +1 -1
  186. package/dist/features/products/components/ProductTabsShell.js +1 -1
  187. package/dist/features/products/components/ShareButton.js +1 -1
  188. package/dist/features/products/components/ShowGroupSection.js +2 -2
  189. package/dist/features/products/components/SublistingCarouselSection.js +2 -2
  190. package/dist/features/promotions/components/CouponCard.js +2 -2
  191. package/dist/features/promotions/components/CouponsIndexListing.js +2 -2
  192. package/dist/features/reviews/components/ReviewDetailPageView.js +1 -1
  193. package/dist/features/reviews/components/ReviewDetailShell.js +5 -5
  194. package/dist/features/reviews/components/ReviewModal.js +1 -1
  195. package/dist/features/reviews/components/ReviewSummary.js +2 -2
  196. package/dist/features/reviews/components/ReviewsIndexListing.js +1 -1
  197. package/dist/features/reviews/components/ReviewsList.js +2 -2
  198. package/dist/features/scams/components/ScamRegistryView.js +2 -2
  199. package/dist/features/search/components/Search.js +11 -11
  200. package/dist/features/search/components/SearchFiltersRow.js +1 -1
  201. package/dist/features/search/components/SearchResultsSection.js +2 -2
  202. package/dist/features/seller/components/SellerAddressesView.js +4 -4
  203. package/dist/features/seller/components/SellerAnalyticsAlertsView.js +1 -1
  204. package/dist/features/seller/components/SellerCouponEditorView.js +1 -1
  205. package/dist/features/seller/components/SellerCouponsView.js +1 -1
  206. package/dist/features/seller/components/SellerFeaturesView.js +2 -2
  207. package/dist/features/seller/components/SellerGoogleReviewsView.js +1 -1
  208. package/dist/features/seller/components/SellerOrdersView.js +1 -1
  209. package/dist/features/seller/components/SellerPayoutMethodsView.js +1 -1
  210. package/dist/features/seller/components/SellerSidebar.js +4 -4
  211. package/dist/features/seller/components/analytics/SellerRevenueChart.js +1 -1
  212. package/dist/features/seller/components/analytics/SellerTopProducts.js +1 -1
  213. package/dist/features/site-settings/components/ActionPermissionsManager.js +2 -2
  214. package/dist/features/site-settings/components/NavPermissionsManager.js +1 -1
  215. package/dist/features/stores/components/InteractiveStoreCard.js +3 -3
  216. package/dist/features/stores/components/StoreHeader.js +2 -2
  217. package/dist/features/stores/components/StoreNavTabs.js +2 -2
  218. package/dist/features/stores/components/StorePreOrdersListing.js +1 -1
  219. package/dist/features/stores/components/StoreReviewsListing.js +1 -1
  220. package/dist/features/stores/components/StoresIndexListing.js +1 -1
  221. package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +2 -2
  222. package/dist/features/wishlist/components/WishlistPage.js +2 -2
  223. package/dist/features/wishlist/hooks/useWishlistCount.js +5 -13
  224. package/dist/http/index.d.ts +1 -0
  225. package/dist/http/index.js +1 -0
  226. package/dist/http/retry.d.ts +1 -0
  227. package/dist/http/retry.js +26 -0
  228. package/dist/index.d.ts +4 -0
  229. package/dist/index.js +8 -0
  230. package/dist/next/ErrorBoundary.js +1 -1
  231. package/dist/providers/storage-firebase/provider.js +109 -55
  232. package/dist/repositories/index.d.ts +2 -0
  233. package/dist/repositories/index.js +2 -0
  234. package/dist/seed/site-settings-seed-data.js +476 -0
  235. package/dist/server.d.ts +4 -0
  236. package/dist/server.js +9 -0
  237. package/dist/styles.css +1 -1
  238. package/dist/tailwind-utilities.css +1 -1
  239. package/dist/tokens/index.d.ts +6 -6
  240. package/dist/tokens/index.js +59 -59
  241. package/dist/ui/DataTable.js +3 -3
  242. package/dist/ui/components/Avatar.js +1 -1
  243. package/dist/ui/components/BaseListingCard.js +7 -7
  244. package/dist/ui/components/Button.js +3 -3
  245. package/dist/ui/components/DetailPageGallery.js +3 -3
  246. package/dist/ui/components/DetailPageHero.js +1 -1
  247. package/dist/ui/components/DetailPageTabs.js +4 -4
  248. package/dist/ui/components/FilterChipGroup.js +2 -2
  249. package/dist/ui/components/Input.js +1 -1
  250. package/dist/ui/components/Layout.d.ts +2 -2
  251. package/dist/ui/components/ListingFilterDrawer.js +2 -2
  252. package/dist/ui/components/ListingToolbar.js +6 -6
  253. package/dist/ui/components/LoginRequiredModal.js +1 -1
  254. package/dist/ui/components/Modal.js +1 -1
  255. package/dist/ui/components/NavbarChevron.js +1 -1
  256. package/dist/ui/components/PageLoader.js +3 -3
  257. package/dist/ui/components/Radio.js +1 -1
  258. package/dist/ui/components/RichTextEditor.js +1 -1
  259. package/dist/ui/components/Select.js +1 -1
  260. package/dist/ui/components/SettingsSection.js +3 -3
  261. package/dist/ui/components/SideModal.js +1 -1
  262. package/dist/ui/components/Slider.js +2 -2
  263. package/dist/ui/components/StatsGrid.js +1 -1
  264. package/dist/ui/components/Typography.js +3 -3
  265. package/dist/ui/components/surface-tokens.d.ts +11 -11
  266. package/dist/ui/components/surface-tokens.js +12 -12
  267. package/dist/utils/safe-fire-forget.d.ts +14 -0
  268. package/dist/utils/safe-fire-forget.js +23 -0
  269. package/package.json +1 -1
@@ -9,6 +9,8 @@
9
9
  * const load = makeCategoryLoadOptions();
10
10
  * <AsyncFacetSection loadOptions={load} ... />
11
11
  */
12
+ import { apiClient } from "../../../../http/ApiClient";
13
+ import { normalizeError } from "../../../../errors/normalize";
12
14
  const PAGE_SIZE = 25;
13
15
  function buildUrl(base, q, page, extra) {
14
16
  const params = new URLSearchParams({
@@ -20,16 +22,17 @@ function buildUrl(base, q, page, extra) {
20
22
  return `${base}?${params.toString()}`;
21
23
  }
22
24
  async function fetchPage(url, mapItem) {
23
- const res = await fetch(url);
24
- if (!res.ok)
25
+ try {
26
+ const data = await apiClient.get(url);
27
+ return {
28
+ items: (data?.items ?? []).map(mapItem),
29
+ hasMore: data?.hasMore ?? false,
30
+ };
31
+ }
32
+ catch (_err) {
33
+ void normalizeError(_err); // PaginatedSelect degrades to empty page; caller can retry by re-typing
25
34
  return { items: [], hasMore: false };
26
- const json = (await res.json());
27
- const raw = json.data?.items ?? [];
28
- const hasMore = json.data?.hasMore ?? false;
29
- return {
30
- items: raw.map(mapItem),
31
- hasMore,
32
- };
35
+ }
33
36
  }
34
37
  // ── Categories ────────────────────────────────────────────────────────────────
35
38
  /**
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { normalizeError } from "../../../errors/normalize";
3
4
  import { createContext, useCallback, useContext, useEffect, useMemo, useState, } from "react";
4
5
  import { BUILT_IN_THEMES, DEFAULT_DARK_THEME, DEFAULT_LIGHT_THEME, } from "../../../tokens/themes";
5
6
  // Brand-neutral localStorage namespace so consumers other than letitrip can
@@ -16,8 +17,8 @@ function readModePreference() {
16
17
  if (stored === "light" || stored === "dark" || stored === "auto")
17
18
  return stored;
18
19
  }
19
- catch {
20
- /* localStorage may be unavailable (privacy mode, embedded iframe). */
20
+ catch (_err) {
21
+ void normalizeError(_err); /* localStorage unavailable in privacy/iframe context */
21
22
  }
22
23
  return "auto";
23
24
  }
@@ -37,6 +38,7 @@ function pickTheme(registry, mode) {
37
38
  // its mode mismatches (e.g. admin pointed defaultLightThemeId at a dark theme).
38
39
  return mode === "dark" ? DEFAULT_DARK_THEME : DEFAULT_LIGHT_THEME;
39
40
  }
41
+ const THEME_ID_STORAGE_KEY = "appkit:theme-id";
40
42
  /** Apply a theme record to `<html>` by setting `data-theme` and inline CSS variables. */
41
43
  function applyTheme(theme) {
42
44
  if (typeof document === "undefined")
@@ -48,6 +50,14 @@ function applyTheme(theme) {
48
50
  root.classList.add("dark");
49
51
  else
50
52
  root.classList.remove("dark");
53
+ // Persist active theme ID so the anti-FOUC script can restore it on return visits,
54
+ // preventing a flash to the built-in cobalt/hot-pink colors on page load.
55
+ try {
56
+ window.localStorage.setItem(THEME_ID_STORAGE_KEY, theme.id);
57
+ }
58
+ catch (_err) {
59
+ void normalizeError(_err); /* localStorage unavailable in this context */
60
+ }
51
61
  for (const [name, value] of Object.entries(theme.tokens)) {
52
62
  root.style.setProperty(`--${name}`, value);
53
63
  }
@@ -87,8 +97,8 @@ export function ThemeProvider({ registry, children }) {
87
97
  try {
88
98
  window.localStorage.setItem(MODE_STORAGE_KEY, next);
89
99
  }
90
- catch {
91
- /* ignore; preference applies for the session at minimum. */
100
+ catch (_err) {
101
+ void normalizeError(_err); /* localStorage unavailable; preference applies for this session */
92
102
  }
93
103
  }, []);
94
104
  const setTheme = useCallback((mode) => setPreference(mode), [setPreference]);
@@ -0,0 +1,12 @@
1
+ type IdentityOperation = "signInWithPassword" | "signInWithCustomToken";
2
+ /**
3
+ * Calls the Firebase Identity Toolkit REST API with one retry for transient
4
+ * network failures. Throws a plain Error (message from the API) on non-2xx.
5
+ *
6
+ * Both auth routes (login + register) hit this endpoint to exchange
7
+ * credentials / custom tokens for a Firebase ID token that can be converted
8
+ * into a session cookie. Centralised here so the URL, Content-Type, and retry
9
+ * config are in one place.
10
+ */
11
+ export declare function callFirebaseIdentityToolkit<T extends Record<string, unknown>>(operation: IdentityOperation, body: Record<string, unknown>, apiKey: string): Promise<T>;
12
+ export {};
@@ -0,0 +1,25 @@
1
+ import { withRetry } from "../../../../http/retry";
2
+ const IDENTITY_TOOLKIT_BASE = "https://identitytoolkit.googleapis.com/v1/accounts";
3
+ /**
4
+ * Calls the Firebase Identity Toolkit REST API with one retry for transient
5
+ * network failures. Throws a plain Error (message from the API) on non-2xx.
6
+ *
7
+ * Both auth routes (login + register) hit this endpoint to exchange
8
+ * credentials / custom tokens for a Firebase ID token that can be converted
9
+ * into a session cookie. Centralised here so the URL, Content-Type, and retry
10
+ * config are in one place.
11
+ */
12
+ export async function callFirebaseIdentityToolkit(operation, body, apiKey) {
13
+ const url = `${IDENTITY_TOOLKIT_BASE}:${operation}?key=${encodeURIComponent(apiKey)}`;
14
+ const res = await withRetry(() => fetch(url, {
15
+ method: "POST",
16
+ headers: { "Content-Type": "application/json" },
17
+ body: JSON.stringify(body),
18
+ }), 1, 500);
19
+ const data = (await res.json());
20
+ if (!res.ok) {
21
+ throw new Error(data.error?.message ??
22
+ `Firebase Identity Toolkit ${operation} failed (${res.status})`);
23
+ }
24
+ return data;
25
+ }
@@ -0,0 +1,12 @@
1
+ import type { SiteSettingsDocument } from "../../../../features/admin/schemas/firestore";
2
+ /**
3
+ * Null-safe wrapper around getSiteSettingsGlobal().
4
+ *
5
+ * Use in API routes and server actions that can degrade gracefully when
6
+ * site settings are unavailable (feature flags, watermark config, etc.).
7
+ * Returns null on Firestore failure; the caller decides the fallback.
8
+ *
9
+ * For paths where missing settings are a hard error (e.g. billing config),
10
+ * call getSiteSettingsGlobal() directly so the 500 propagates naturally.
11
+ */
12
+ export declare function getSiteSettingsSafe(): Promise<SiteSettingsDocument | null>;
@@ -0,0 +1,25 @@
1
+ import { normalizeError } from "../../../../errors/normalize";
2
+ import { serverLogger } from "../../../../monitoring/server-logger";
3
+ import { getSiteSettingsGlobal } from "../../../../features/admin/utils/getSiteSettingsGlobal";
4
+ /**
5
+ * Null-safe wrapper around getSiteSettingsGlobal().
6
+ *
7
+ * Use in API routes and server actions that can degrade gracefully when
8
+ * site settings are unavailable (feature flags, watermark config, etc.).
9
+ * Returns null on Firestore failure; the caller decides the fallback.
10
+ *
11
+ * For paths where missing settings are a hard error (e.g. billing config),
12
+ * call getSiteSettingsGlobal() directly so the 500 propagates naturally.
13
+ */
14
+ export async function getSiteSettingsSafe() {
15
+ try {
16
+ return await getSiteSettingsGlobal();
17
+ }
18
+ catch (err) {
19
+ void normalizeError(err);
20
+ serverLogger.warn("getSiteSettingsSafe: Firestore read failed — degrading to null", {
21
+ error: err instanceof Error ? err.message : String(err),
22
+ });
23
+ return null;
24
+ }
25
+ }
@@ -18,19 +18,19 @@ export const DASHBOARD_SIDEBAR_WIDTH = {
18
18
  /** Per-variant accent token map. Drives DashboardSidebar active-item styling. */
19
19
  export const DASHBOARD_ACCENT_CLASSES = {
20
20
  admin: {
21
- activeBg: "bg-zinc-100 dark:bg-slate-800",
22
- activeText: "text-zinc-900 dark:text-zinc-100",
23
- hoverBg: "hover:bg-zinc-50 dark:hover:bg-slate-800/60",
21
+ activeBg: "bg-[var(--appkit-color-surface-elevated)]",
22
+ activeText: "text-[var(--appkit-color-text)]",
23
+ hoverBg: "hover:bg-[var(--appkit-color-surface)]",
24
24
  },
25
25
  store: {
26
- activeBg: "bg-warning-surface dark:bg-warning-surface",
27
- activeText: "text-warning dark:text-warning",
28
- hoverBg: "hover:bg-zinc-50 dark:hover:bg-slate-800/60",
26
+ activeBg: "bg-warning-surface",
27
+ activeText: "text-warning",
28
+ hoverBg: "hover:bg-[var(--appkit-color-surface)]",
29
29
  },
30
30
  user: {
31
31
  activeBg: "bg-primary-50 dark:bg-primary-900/25",
32
32
  activeText: "text-primary-700 dark:text-primary-300",
33
- hoverBg: "hover:bg-zinc-50 dark:hover:bg-slate-800",
33
+ hoverBg: "hover:bg-[var(--appkit-color-surface)]",
34
34
  },
35
35
  };
36
36
  /** hideAt → Tailwind class. `md:hidden` etc. */
@@ -5,12 +5,12 @@
5
5
  * shimmer (animate-shimmer + gradient).
6
6
  */
7
7
  export declare const SKELETON: {
8
- readonly base: "animate-pulse rounded bg-zinc-200 dark:bg-slate-700/60";
9
- readonly text: "animate-pulse rounded bg-zinc-200 dark:bg-slate-700/60 h-4";
10
- readonly heading: "animate-pulse rounded bg-zinc-200 dark:bg-slate-700/60 h-7";
11
- readonly image: "animate-pulse rounded-xl bg-zinc-200 dark:bg-slate-700/60";
12
- readonly card: "animate-pulse rounded-2xl bg-zinc-200 dark:bg-slate-700/60";
13
- readonly shimmer: "animate-shimmer bg-[length:400%_100%] rounded bg-gradient-to-r from-zinc-200 via-zinc-100 to-zinc-200 dark:from-slate-800 dark:via-slate-700/60 dark:to-slate-800";
14
- readonly shimmerText: "animate-shimmer bg-[length:400%_100%] h-4 rounded bg-gradient-to-r from-zinc-200 via-zinc-100 to-zinc-200 dark:from-slate-800 dark:via-slate-700/60 dark:to-slate-800";
15
- readonly shimmerCard: "animate-shimmer bg-[length:400%_100%] rounded-2xl bg-gradient-to-r from-zinc-200 via-zinc-100 to-zinc-200 dark:from-slate-800 dark:via-slate-700/60 dark:to-slate-800";
8
+ readonly base: "animate-pulse rounded bg-[var(--appkit-color-border-subtle)]";
9
+ readonly text: "animate-pulse rounded bg-[var(--appkit-color-border-subtle)] h-4";
10
+ readonly heading: "animate-pulse rounded bg-[var(--appkit-color-border-subtle)] h-7";
11
+ readonly image: "animate-pulse rounded-xl bg-[var(--appkit-color-border-subtle)]";
12
+ readonly card: "animate-pulse rounded-2xl bg-[var(--appkit-color-border-subtle)]";
13
+ readonly shimmer: "animate-shimmer bg-[length:400%_100%] rounded bg-gradient-to-r from-[var(--appkit-color-border-subtle)] via-[var(--appkit-color-bg)] to-[var(--appkit-color-border-subtle)]";
14
+ readonly shimmerText: "animate-shimmer bg-[length:400%_100%] h-4 rounded bg-gradient-to-r from-[var(--appkit-color-border-subtle)] via-[var(--appkit-color-bg)] to-[var(--appkit-color-border-subtle)]";
15
+ readonly shimmerCard: "animate-shimmer bg-[length:400%_100%] rounded-2xl bg-gradient-to-r from-[var(--appkit-color-border-subtle)] via-[var(--appkit-color-bg)] to-[var(--appkit-color-border-subtle)]";
16
16
  };
@@ -5,14 +5,14 @@
5
5
  * shimmer (animate-shimmer + gradient).
6
6
  */
7
7
  export const SKELETON = {
8
- // Pulse (fade) variant
9
- base: "animate-pulse rounded bg-zinc-200 dark:bg-slate-700/60",
10
- text: "animate-pulse rounded bg-zinc-200 dark:bg-slate-700/60 h-4",
11
- heading: "animate-pulse rounded bg-zinc-200 dark:bg-slate-700/60 h-7",
12
- image: "animate-pulse rounded-xl bg-zinc-200 dark:bg-slate-700/60",
13
- card: "animate-pulse rounded-2xl bg-zinc-200 dark:bg-slate-700/60",
14
- // Shimmer (sweep) variant
15
- shimmer: "animate-shimmer bg-[length:400%_100%] rounded bg-gradient-to-r from-zinc-200 via-zinc-100 to-zinc-200 dark:from-slate-800 dark:via-slate-700/60 dark:to-slate-800",
16
- shimmerText: "animate-shimmer bg-[length:400%_100%] h-4 rounded bg-gradient-to-r from-zinc-200 via-zinc-100 to-zinc-200 dark:from-slate-800 dark:via-slate-700/60 dark:to-slate-800",
17
- shimmerCard: "animate-shimmer bg-[length:400%_100%] rounded-2xl bg-gradient-to-r from-zinc-200 via-zinc-100 to-zinc-200 dark:from-slate-800 dark:via-slate-700/60 dark:to-slate-800",
8
+ // Pulse (fade) variant — bg adapts to active theme
9
+ base: "animate-pulse rounded bg-[var(--appkit-color-border-subtle)]",
10
+ text: "animate-pulse rounded bg-[var(--appkit-color-border-subtle)] h-4",
11
+ heading: "animate-pulse rounded bg-[var(--appkit-color-border-subtle)] h-7",
12
+ image: "animate-pulse rounded-xl bg-[var(--appkit-color-border-subtle)]",
13
+ card: "animate-pulse rounded-2xl bg-[var(--appkit-color-border-subtle)]",
14
+ // Shimmer (sweep) variant — gradient from border-subtle → bg → border-subtle
15
+ shimmer: "animate-shimmer bg-[length:400%_100%] rounded bg-gradient-to-r from-[var(--appkit-color-border-subtle)] via-[var(--appkit-color-bg)] to-[var(--appkit-color-border-subtle)]",
16
+ shimmerText: "animate-shimmer bg-[length:400%_100%] h-4 rounded bg-gradient-to-r from-[var(--appkit-color-border-subtle)] via-[var(--appkit-color-bg)] to-[var(--appkit-color-border-subtle)]",
17
+ shimmerCard: "animate-shimmer bg-[length:400%_100%] rounded-2xl bg-gradient-to-r from-[var(--appkit-color-border-subtle)] via-[var(--appkit-color-bg)] to-[var(--appkit-color-border-subtle)]",
18
18
  };
@@ -6,18 +6,18 @@
6
6
  * subsequent sweep migrates each callsite to a primitive `surface` /
7
7
  * `color` / `border` variant.
8
8
  */
9
- export declare const THEMED_BG_PRIMARY = "bg-zinc-50 dark:bg-slate-950";
10
- export declare const THEMED_BG_SECONDARY = "bg-zinc-100 dark:bg-slate-900";
11
- export declare const THEMED_BG_TERTIARY = "bg-zinc-200 dark:bg-slate-800";
12
- export declare const THEMED_BORDER = "border-zinc-200 dark:border-slate-700";
13
- export declare const THEMED_BORDER_STRONG = "border-zinc-300 dark:border-slate-600";
14
- export declare const THEMED_TEXT_PRIMARY = "text-zinc-900 dark:text-zinc-50";
15
- export declare const THEMED_TEXT_SECONDARY = "text-zinc-500 dark:text-zinc-400";
16
- export declare const THEMED_TEXT_TERTIARY = "text-zinc-400 dark:text-zinc-500";
17
- export declare const THEMED_TEXT_MUTED = "text-zinc-400 dark:text-zinc-400";
18
- export declare const THEMED_TEXT_SUCCESS = "text-emerald-600 dark:text-emerald-400";
19
- export declare const THEMED_TEXT_WARNING = "text-amber-600 dark:text-amber-400";
20
- export declare const THEMED_TEXT_ERROR = "text-red-600 dark:text-red-400";
9
+ export declare const THEMED_BG_PRIMARY = "bg-[var(--appkit-color-bg)]";
10
+ export declare const THEMED_BG_SECONDARY = "bg-[var(--appkit-color-surface)]";
11
+ export declare const THEMED_BG_TERTIARY = "bg-[var(--appkit-color-surface-elevated)]";
12
+ export declare const THEMED_BORDER = "border-[var(--appkit-color-border)]";
13
+ export declare const THEMED_BORDER_STRONG = "border-[var(--appkit-color-border)]";
14
+ export declare const THEMED_TEXT_PRIMARY = "text-[var(--appkit-color-text)]";
15
+ export declare const THEMED_TEXT_SECONDARY = "text-[var(--appkit-color-text-muted)]";
16
+ export declare const THEMED_TEXT_TERTIARY = "text-[var(--appkit-color-text-faint)]";
17
+ export declare const THEMED_TEXT_MUTED = "text-[var(--appkit-color-text-faint)]";
18
+ export declare const THEMED_TEXT_SUCCESS = "text-success";
19
+ export declare const THEMED_TEXT_WARNING = "text-warning";
20
+ export declare const THEMED_TEXT_ERROR = "text-error";
21
21
  export declare const FLEX_CENTER = "flex items-center justify-center";
22
22
  export declare const FLEX_BETWEEN = "flex items-center justify-between";
23
23
  export declare const FLEX_START = "flex items-center justify-start";
@@ -6,18 +6,18 @@
6
6
  * subsequent sweep migrates each callsite to a primitive `surface` /
7
7
  * `color` / `border` variant.
8
8
  */
9
- export const THEMED_BG_PRIMARY = "bg-zinc-50 dark:bg-slate-950";
10
- export const THEMED_BG_SECONDARY = "bg-zinc-100 dark:bg-slate-900";
11
- export const THEMED_BG_TERTIARY = "bg-zinc-200 dark:bg-slate-800";
12
- export const THEMED_BORDER = "border-zinc-200 dark:border-slate-700";
13
- export const THEMED_BORDER_STRONG = "border-zinc-300 dark:border-slate-600";
14
- export const THEMED_TEXT_PRIMARY = "text-zinc-900 dark:text-zinc-50";
15
- export const THEMED_TEXT_SECONDARY = "text-zinc-500 dark:text-zinc-400";
16
- export const THEMED_TEXT_TERTIARY = "text-zinc-400 dark:text-zinc-500";
17
- export const THEMED_TEXT_MUTED = "text-zinc-400 dark:text-zinc-400";
18
- export const THEMED_TEXT_SUCCESS = "text-emerald-600 dark:text-emerald-400";
19
- export const THEMED_TEXT_WARNING = "text-amber-600 dark:text-amber-400";
20
- export const THEMED_TEXT_ERROR = "text-red-600 dark:text-red-400";
9
+ export const THEMED_BG_PRIMARY = "bg-[var(--appkit-color-bg)]";
10
+ export const THEMED_BG_SECONDARY = "bg-[var(--appkit-color-surface)]";
11
+ export const THEMED_BG_TERTIARY = "bg-[var(--appkit-color-surface-elevated)]";
12
+ export const THEMED_BORDER = "border-[var(--appkit-color-border)]";
13
+ export const THEMED_BORDER_STRONG = "border-[var(--appkit-color-border)]";
14
+ export const THEMED_TEXT_PRIMARY = "text-[var(--appkit-color-text)]";
15
+ export const THEMED_TEXT_SECONDARY = "text-[var(--appkit-color-text-muted)]";
16
+ export const THEMED_TEXT_TERTIARY = "text-[var(--appkit-color-text-faint)]";
17
+ export const THEMED_TEXT_MUTED = "text-[var(--appkit-color-text-faint)]";
18
+ export const THEMED_TEXT_SUCCESS = "text-success";
19
+ export const THEMED_TEXT_WARNING = "text-warning";
20
+ export const THEMED_TEXT_ERROR = "text-error";
21
21
  export const FLEX_CENTER = "flex items-center justify-center";
22
22
  export const FLEX_BETWEEN = "flex items-center justify-between";
23
23
  export const FLEX_START = "flex items-center justify-start";
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Card, Div, Heading, Row, Section, Span, Stack, Text } from "../../../ui";
3
3
  export function AboutView({ labels = {}, howItems = [], valueItems = [], milestones = [], ctaBannerClass = "", renderCtaButtons, }) {
4
- return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [_jsx(Section, { color: "inverse", tone: "accent-banner", padding: "y-4xl", children: _jsxs(Div, { paddingX: "x-page", className: "max-w-4xl mx-auto text-center", children: [_jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-6", mdSize: "5xl", size: "4xl", weight: "bold", children: labels.title }), _jsx(Text, { color: "inverse", variant: "none", className: "/80 max-w-2xl mx-auto", size: "xl", children: labels.subtitle })] }) }), _jsxs(Div, { paddingX: "x-page", className: "max-w-5xl mx-auto", padding: "y-4xl", children: [_jsxs(Section, { className: "text-center max-w-3xl mx-auto", children: [_jsx(Heading, { level: 2, className: "mb-4", children: labels.missionTitle }), _jsx(Text, { size: "lg", variant: "secondary", className: "leading-relaxed", children: labels.missionText })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-12", align: "center", children: labels.howItWorksTitle }), _jsx(Div, { className: "grid md:grid-cols-3", gap: "6", children: howItems.map(({ title, text, icon, tone }) => (_jsxs(Card, { variant: `gradient-${tone ?? "indigo"}`, padding: "md", spacing: "sm", children: [_jsx(Div, { children: _jsx(Span, { size: "4xl", children: icon }) }), _jsx(Heading, { level: 3, children: title }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: text })] }, title))) })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-12", align: "center", children: labels.valuesTitle }), _jsx(Div, { className: "grid md:grid-cols-3", gap: "5", children: valueItems.map(({ title, text, icon }) => (_jsxs("div", { className: "bg-white dark:bg-slate-800 rounded-xl p-6 space-y-3 border border-neutral-200 dark:border-slate-700", children: [_jsx(Div, { children: _jsx(Span, { size: "3xl", children: icon }) }), _jsx(Heading, { level: 3, children: title }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: text })] }, title))) })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-10", align: "center", children: labels.milestonesTitle }), _jsx(Stack, { className: "relative border-l-2 border-primary/30 max-w-2xl mx-auto pl-[2rem]", gap: "xl", children: milestones.map(({ year, text }) => (_jsxs(Div, { className: "relative", children: [_jsx(Div, { className: "absolute -left-10 top-1 w-4 h-4 bg-primary border-2 border-white", rounded: "full" }), _jsx(Span, { size: "xs", weight: "bold", className: "text-primary tracking-wide", transform: "uppercase", children: year }), _jsx(Text, { className: "mt-1", children: text })] }, year))) })] }), _jsxs(Section, { color: "inverse", tone: "accent-banner", className: `text-center ${ctaBannerClass}`, padding: "xl", rounded: "2xl", children: [_jsx(Heading, { color: "inverse", level: 2, variant: "none", className: "mb-8", size: "3xl", weight: "bold", children: labels.ctaTitle }), renderCtaButtons ? (renderCtaButtons()) : (_jsx(Row, { justify: "center", gap: "3", wrap: true, children: _jsxs(Span, { color: "inverse", size: "sm", className: "/70", children: [labels.ctaSell, " \u00B7 ", labels.ctaShop] }) }))] })] })] }));
4
+ return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [_jsx(Section, { color: "inverse", tone: "accent-banner", padding: "y-4xl", children: _jsxs(Div, { paddingX: "x-page", className: "max-w-4xl mx-auto text-center", children: [_jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-6", mdSize: "5xl", size: "4xl", weight: "bold", children: labels.title }), _jsx(Text, { color: "inverse", variant: "none", className: "/80 max-w-2xl mx-auto", size: "xl", children: labels.subtitle })] }) }), _jsxs(Div, { paddingX: "x-page", className: "max-w-5xl mx-auto", padding: "y-4xl", children: [_jsxs(Section, { className: "text-center max-w-3xl mx-auto", children: [_jsx(Heading, { level: 2, className: "mb-4", children: labels.missionTitle }), _jsx(Text, { size: "lg", variant: "secondary", className: "leading-relaxed", children: labels.missionText })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-12", align: "center", children: labels.howItWorksTitle }), _jsx(Div, { className: "grid md:grid-cols-3", gap: "6", children: howItems.map(({ title, text, icon, tone }) => (_jsxs(Card, { variant: `gradient-${tone ?? "indigo"}`, padding: "md", spacing: "sm", children: [_jsx(Div, { children: _jsx(Span, { size: "4xl", children: icon }) }), _jsx(Heading, { level: 3, children: title }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: text })] }, title))) })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-12", align: "center", children: labels.valuesTitle }), _jsx(Div, { className: "grid md:grid-cols-3", gap: "5", children: valueItems.map(({ title, text, icon }) => (_jsxs("div", { className: "bg-[var(--appkit-color-surface)] rounded-xl p-6 space-y-3 border border-[var(--appkit-color-border)]", children: [_jsx(Div, { children: _jsx(Span, { size: "3xl", children: icon }) }), _jsx(Heading, { level: 3, children: title }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: text })] }, title))) })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-10", align: "center", children: labels.milestonesTitle }), _jsx(Stack, { className: "relative border-l-2 border-primary/30 max-w-2xl mx-auto pl-[2rem]", gap: "xl", children: milestones.map(({ year, text }) => (_jsxs(Div, { className: "relative", children: [_jsx(Div, { className: "absolute -left-10 top-1 w-4 h-4 bg-primary border-2 border-white", rounded: "full" }), _jsx(Span, { size: "xs", weight: "bold", className: "text-primary tracking-wide", transform: "uppercase", children: year }), _jsx(Text, { className: "mt-1", children: text })] }, year))) })] }), _jsxs(Section, { color: "inverse", tone: "accent-banner", className: `text-center ${ctaBannerClass}`, padding: "xl", rounded: "2xl", children: [_jsx(Heading, { color: "inverse", level: 2, variant: "none", className: "mb-8", size: "3xl", weight: "bold", children: labels.ctaTitle }), renderCtaButtons ? (renderCtaButtons()) : (_jsx(Row, { justify: "center", gap: "3", wrap: true, children: _jsxs(Span, { color: "inverse", size: "sm", className: "/70", children: [labels.ctaSell, " \u00B7 ", labels.ctaShop] }) }))] })] })] }));
5
5
  }
@@ -20,5 +20,5 @@ export async function FAQPageView({ category, } = {}) {
20
20
  ? allItems.filter((item) => item.category === category)
21
21
  : allItems;
22
22
  const activeCategory = categories.find((c) => c.slug === category);
23
- return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [_jsx(Section, { color: "inverse", tone: "accent-banner", padding: "banner", children: _jsxs(Container, { size: "md", className: "text-center", children: [_jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-3", children: activeCategory ? activeCategory.label : t("title") }), _jsx(Text, { color: "inverse", variant: "none", className: "/80 max-w-2xl mx-auto", children: t("subtitle") })] }) }), _jsx(Container, { size: "md", padding: "content-banner", children: _jsxs(Stack, { direction: "md-row", gap: "xl", children: [categories.length > 0 && (_jsxs(Aside, { className: "md:w-56 flex-shrink-0", children: [_jsx(Heading, { level: 3, className: "uppercase tracking-wide mb-3", color: "muted", size: "sm", weight: "semibold", children: t("categoriesLabel") }), _jsxs(Nav, { "aria-label": "FAQ categories", spacing: "xs", children: [_jsxs(TextLink, { rounded: "lg", href: String(ROUTES.PUBLIC.FAQS), paddingX: "sm", paddingY: "xs", layout: "flex", align: "center", justify: "between", weight: !category ? "semibold" : undefined, className: `transition-colors ${!category ? "bg-primary/10 text-primary" : "hover:bg-neutral-100 dark:bg-neutral-800 dark:hover:bg-neutral-800"}`, size: "sm", children: [_jsxs(Span, { className: `${flex.row}`, gap: "md", children: [_jsx(HelpCircle, { className: "w-4 h-4" }), t("allCategories")] }), _jsx(ChevronRight, { className: "w-3.5 h-3.5 opacity-50" })] }), categories.map((cat) => (_jsxs(TextLink, { rounded: "lg", href: String(ROUTES.PUBLIC.FAQ_CATEGORY(cat.slug)), paddingX: "sm", paddingY: "xs", layout: "flex", align: "center", justify: "between", weight: category === cat.slug ? "semibold" : undefined, className: `transition-colors ${category === cat.slug ? "bg-primary/10 text-primary" : "hover:bg-neutral-100 dark:bg-neutral-800 dark:hover:bg-neutral-800"}`, size: "sm", children: [_jsxs(Span, { className: `${flex.row}`, gap: "md", children: [_jsx(Span, { children: cat.icon }), cat.label] }), _jsx(ChevronRight, { className: "w-3.5 h-3.5 opacity-50" })] }, cat.slug)))] })] })), _jsxs(Div, { className: "flex-1 min-w-0", children: [visibleItems.length === 0 ? (_jsxs(Section, { className: `text-center`, border: "default", surface: "subtle", rounded: "2xl", padding: "y-4xl", children: [_jsx(HelpCircle, { className: "w-10 h-10 mx-auto mb-3 text-zinc-300 dark:text-zinc-600 dark:text-zinc-400" }), _jsx(Heading, { level: 3, className: "mb-2", size: "base", children: t("emptyTitle") }), _jsx(Text, { variant: "secondary", size: "sm", children: t("emptyText") })] })) : (_jsx(Stack, { gap: "sm", children: visibleItems.map((item, i) => (_jsxs(Details, { tone: "card", className: "group overflow-hidden", children: [_jsxs(Summary, { paddingX: "x-5", paddingY: "y-md", size: "sm", weight: "medium", layout: "flex", align: "center", justify: "between", className: "hover:bg-neutral-50 dark:hover:bg-neutral-800/50 transition-colors", children: [_jsx(Span, { children: item.question }), _jsx(ChevronRight, { className: "w-4 h-4 flex-shrink-0 ml-3 transition-transform group-open:rotate-90" })] }), _jsx(Div, { padding: "x-md", paddingY: "b-md-lg", className: "pt-[0.25rem]", children: _jsx(RichTextRenderer, { html: item.answer, proseClass: "prose prose-sm max-w-none dark:prose-invert" }) })] }, i))) })), _jsxs(Section, { className: `mt-10 text-center`, border: "default", surface: "subtle", rounded: "2xl", padding: "lg", children: [_jsx(Heading, { level: 3, className: "mb-2", size: "base", children: t("stillNeedHelpTitle") }), _jsx(Text, { variant: "secondary", className: "mb-4", size: "sm", children: t("stillNeedHelpText") }), _jsxs(Row, { align: "center", justify: "center", gap: "md", wrap: true, children: [_jsx(TextLink, { href: String(ROUTES.PUBLIC.HELP), children: t("helpCenter") }), _jsx(TextLink, { href: String(ROUTES.PUBLIC.CONTACT), variant: "muted", children: t("contactUs") })] })] })] })] }) })] }));
23
+ return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [_jsx(Section, { color: "inverse", tone: "accent-banner", padding: "banner", children: _jsxs(Container, { size: "md", className: "text-center", children: [_jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-3", children: activeCategory ? activeCategory.label : t("title") }), _jsx(Text, { color: "inverse", variant: "none", className: "/80 max-w-2xl mx-auto", children: t("subtitle") })] }) }), _jsx(Container, { size: "md", padding: "content-banner", children: _jsxs(Stack, { direction: "md-row", gap: "xl", children: [categories.length > 0 && (_jsxs(Aside, { className: "md:w-56 flex-shrink-0", children: [_jsx(Heading, { level: 3, className: "uppercase tracking-wide mb-3", color: "muted", size: "sm", weight: "semibold", children: t("categoriesLabel") }), _jsxs(Nav, { "aria-label": "FAQ categories", spacing: "xs", children: [_jsxs(TextLink, { rounded: "lg", href: String(ROUTES.PUBLIC.FAQS), paddingX: "sm", paddingY: "xs", layout: "flex", align: "center", justify: "between", weight: !category ? "semibold" : undefined, className: `transition-colors ${!category ? "bg-primary/10 text-primary" : "hover:bg-[var(--appkit-color-surface)] hover:bg-[var(--appkit-color-surface-elevated)]"}`, size: "sm", children: [_jsxs(Span, { className: `${flex.row}`, gap: "md", children: [_jsx(HelpCircle, { className: "w-4 h-4" }), t("allCategories")] }), _jsx(ChevronRight, { className: "w-3.5 h-3.5 opacity-50" })] }), categories.map((cat) => (_jsxs(TextLink, { rounded: "lg", href: String(ROUTES.PUBLIC.FAQ_CATEGORY(cat.slug)), paddingX: "sm", paddingY: "xs", layout: "flex", align: "center", justify: "between", weight: category === cat.slug ? "semibold" : undefined, className: `transition-colors ${category === cat.slug ? "bg-primary/10 text-primary" : "hover:bg-[var(--appkit-color-surface)] hover:bg-[var(--appkit-color-surface-elevated)]"}`, size: "sm", children: [_jsxs(Span, { className: `${flex.row}`, gap: "md", children: [_jsx(Span, { children: cat.icon }), cat.label] }), _jsx(ChevronRight, { className: "w-3.5 h-3.5 opacity-50" })] }, cat.slug)))] })] })), _jsxs(Div, { className: "flex-1 min-w-0", children: [visibleItems.length === 0 ? (_jsxs(Section, { className: `text-center`, border: "default", surface: "subtle", rounded: "2xl", padding: "y-4xl", children: [_jsx(HelpCircle, { className: "w-10 h-10 mx-auto mb-3 text-zinc-300 dark:text-[var(--appkit-color-text-muted)]" }), _jsx(Heading, { level: 3, className: "mb-2", size: "base", children: t("emptyTitle") }), _jsx(Text, { variant: "secondary", size: "sm", children: t("emptyText") })] })) : (_jsx(Stack, { gap: "sm", children: visibleItems.map((item, i) => (_jsxs(Details, { tone: "card", className: "group overflow-hidden", children: [_jsxs(Summary, { paddingX: "x-5", paddingY: "y-md", size: "sm", weight: "medium", layout: "flex", align: "center", justify: "between", className: "hover:bg-neutral-50 hover:bg-[var(--appkit-color-surface-elevated)]/50 transition-colors", children: [_jsx(Span, { children: item.question }), _jsx(ChevronRight, { className: "w-4 h-4 flex-shrink-0 ml-3 transition-transform group-open:rotate-90" })] }), _jsx(Div, { padding: "x-md", paddingY: "b-md-lg", className: "pt-[0.25rem]", children: _jsx(RichTextRenderer, { html: item.answer, proseClass: "prose prose-sm max-w-none dark:prose-invert" }) })] }, i))) })), _jsxs(Section, { className: `mt-10 text-center`, border: "default", surface: "subtle", rounded: "2xl", padding: "lg", children: [_jsx(Heading, { level: 3, className: "mb-2", size: "base", children: t("stillNeedHelpTitle") }), _jsx(Text, { variant: "secondary", className: "mb-4", size: "sm", children: t("stillNeedHelpText") }), _jsxs(Row, { align: "center", justify: "center", gap: "md", wrap: true, children: [_jsx(TextLink, { href: String(ROUTES.PUBLIC.HELP), children: t("helpCenter") }), _jsx(TextLink, { href: String(ROUTES.PUBLIC.CONTACT), variant: "muted", children: t("contactUs") })] })] })] })] }) })] }));
24
24
  }
@@ -65,10 +65,10 @@ export async function FeesView({} = {}) {
65
65
  return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [_jsx(Section, { color: "inverse", tone: "accent-banner", padding: "banner", children: _jsxs(Div, { className: `${page.container.sm} text-center`, children: [_jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-4", children: t("title") }), _jsx(Text, { color: "inverse", variant: "none", className: "/80 max-w-2xl mx-auto", children: t("subtitle") })] }) }), _jsxs(Stack, { gap: "section", className: `${page.container.sm}`, padding: "content-banner", children: [renderFeeTableSection(t, themed, FEE_ROWS), renderPayoutExampleSection(t, themed, OFFER_PAYOUT_ROWS), renderDisclaimerSection(t, themed)] })] }));
66
66
  }
67
67
  function renderFeeTableSection(t, themed, rows) {
68
- return (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-6", children: t("tableTitle") }), _jsx(Div, { className: `${__O.xAuto}`, border: "default", rounded: "xl", children: _jsxs(Table, { size: "sm", children: [_jsx(Thead, { className: themed.bgSecondary, children: _jsxs(Tr, { children: [_jsx(Th, { className: "text-left", padding: "md", weight: "semibold", children: t("colFeeType") }), _jsx(Th, { className: "text-left", padding: "md", weight: "semibold", children: t("colRate") }), _jsx(Th, { className: "text-left", padding: "md", weight: "semibold", children: t("colPaidBy") }), _jsx(Th, { className: "text-left hidden md:table-cell", padding: "md", weight: "semibold", children: t("colNote") })] }) }), _jsx(Tbody, { className: "divide-y divide-neutral-100 dark:divide-neutral-800", children: rows.map((row) => (_jsxs(Tr, { className: `${themed.bgPrimary} hover:bg-neutral-50 dark:hover:bg-neutral-800/50`, children: [_jsx(Td, { weight: "medium", padding: "md", children: row.category }), _jsx(Td, { className: CLS_RATE_CELL, children: row.rate }), _jsx(Td, { padding: "md", children: _jsx(Caption, { children: row.who }) }), _jsx(Td, { className: "text-neutral-500 dark:text-neutral-400 hidden md:table-cell", padding: "md", size: "xs", children: row.note })] }, row.category))) })] }) }), _jsx(Caption, { className: "mt-3 block", color: "muted", children: t("tableNote") })] }));
68
+ return (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-6", children: t("tableTitle") }), _jsx(Div, { className: `${__O.xAuto}`, border: "default", rounded: "xl", children: _jsxs(Table, { size: "sm", children: [_jsx(Thead, { className: themed.bgSecondary, children: _jsxs(Tr, { children: [_jsx(Th, { className: "text-left", padding: "md", weight: "semibold", children: t("colFeeType") }), _jsx(Th, { className: "text-left", padding: "md", weight: "semibold", children: t("colRate") }), _jsx(Th, { className: "text-left", padding: "md", weight: "semibold", children: t("colPaidBy") }), _jsx(Th, { className: "text-left hidden md:table-cell", padding: "md", weight: "semibold", children: t("colNote") })] }) }), _jsx(Tbody, { className: "divide-y divide-neutral-100 divide-[var(--appkit-color-border)]", children: rows.map((row) => (_jsxs(Tr, { className: `${themed.bgPrimary} hover:bg-neutral-50 hover:bg-[var(--appkit-color-surface-elevated)]/50`, children: [_jsx(Td, { weight: "medium", padding: "md", children: row.category }), _jsx(Td, { className: CLS_RATE_CELL, children: row.rate }), _jsx(Td, { padding: "md", children: _jsx(Caption, { children: row.who }) }), _jsx(Td, { className: "text-[var(--appkit-color-text-muted)] hidden md:table-cell", padding: "md", size: "xs", children: row.note })] }, row.category))) })] }) }), _jsx(Caption, { className: "mt-3 block", color: "muted", children: t("tableNote") })] }));
69
69
  }
70
70
  function renderPayoutExampleSection(t, themed, rows) {
71
- return (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-3", children: t("payoutExampleTitle") }), _jsx(Text, { variant: "secondary", className: "mb-6", children: t("payoutExampleSubtitle") }), _jsxs(Div, { className: `${__P.p5} max-w-sm`, border: "default", surface: "muted", rounded: "xl", children: [_jsx(Heading, { level: 3, className: "mb-4", size: "base", children: t("payoutExampleProduct") }), _jsx(Stack, { gap: "sm", children: rows.map((row, i) => (_jsxs(Row, { textWeight: "bold", textSize: "sm", className: `${row.highlight ? "border-t border-neutral-200 dark:border-neutral-700 mt-2" : ""}`, paddingY: row.highlight ? "t-xs" : undefined, justify: "between", children: [_jsx(Text, { className: row.highlight ? "font-bold" : "text-neutral-600 dark:text-neutral-400", children: row.label }), _jsx(Text, { className: row.highlight ? CLS_HIGHLIGHT : "", children: row.example })] }, i))) })] })] }));
71
+ return (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-3", children: t("payoutExampleTitle") }), _jsx(Text, { variant: "secondary", className: "mb-6", children: t("payoutExampleSubtitle") }), _jsxs(Div, { className: `${__P.p5} max-w-sm`, border: "default", surface: "muted", rounded: "xl", children: [_jsx(Heading, { level: 3, className: "mb-4", size: "base", children: t("payoutExampleProduct") }), _jsx(Stack, { gap: "sm", children: rows.map((row, i) => (_jsxs(Row, { textWeight: "bold", textSize: "sm", className: `${row.highlight ? "border-t border-[var(--appkit-color-border)] mt-2" : ""}`, paddingY: row.highlight ? "t-xs" : undefined, justify: "between", children: [_jsx(Text, { className: row.highlight ? "font-bold" : "text-[var(--appkit-color-text-muted)]", children: row.label }), _jsx(Text, { className: row.highlight ? CLS_HIGHLIGHT : "", children: row.example })] }, i))) })] })] }));
72
72
  }
73
73
  function renderDisclaimerSection(t, themed) {
74
74
  return (_jsxs(Section, { className: `${__P.p5}`, border: "default", surface: "subtle", rounded: "xl", children: [_jsx(Heading, { level: 3, className: "mb-2", size: "base", children: t("disclaimerTitle") }), _jsx(Caption, { className: "leading-relaxed", children: t("disclaimerText") })] }));
@@ -52,9 +52,9 @@ export async function HowAuctionsWorkView({} = {}) {
52
52
  const DIAGRAM_STEPS = [
53
53
  {
54
54
  emoji: "🔍",
55
- circleClass: "bg-slate-100 dark:bg-slate-700 border-2 border-slate-300 dark:border-slate-500",
55
+ circleClass: "bg-[var(--appkit-color-border-subtle)] border-2 border-[var(--appkit-color-border)]",
56
56
  badge: t("step1Title"),
57
- badgeClass: "bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300",
57
+ badgeClass: "bg-[var(--appkit-color-border-subtle)] text-[var(--appkit-color-text-muted)]",
58
58
  desc: t("diagramStep1Desc"),
59
59
  },
60
60
  {
@@ -38,9 +38,9 @@ export async function HowCheckoutWorksView({} = {}) {
38
38
  const DIAGRAM_STEPS = [
39
39
  {
40
40
  emoji: "🛒",
41
- circleClass: "bg-slate-100 dark:bg-slate-700 border-2 border-slate-300 dark:border-slate-500",
41
+ circleClass: "bg-[var(--appkit-color-border-subtle)] border-2 border-[var(--appkit-color-border)]",
42
42
  badge: t("step1Title"),
43
- badgeClass: "bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300",
43
+ badgeClass: "bg-[var(--appkit-color-border-subtle)] text-[var(--appkit-color-text-muted)]",
44
44
  desc: t("diagramStep1Desc"),
45
45
  },
46
46
  {
@@ -24,9 +24,9 @@ export async function HowOffersWorkView({} = {}) {
24
24
  const DIAGRAM_STEPS = [
25
25
  {
26
26
  emoji: "💬",
27
- circleClass: "bg-slate-100 dark:bg-slate-700 border-2 border-slate-300 dark:border-slate-500",
27
+ circleClass: "bg-[var(--appkit-color-border-subtle)] border-2 border-[var(--appkit-color-border)]",
28
28
  badge: t("diagramStep1Badge"),
29
- badgeClass: "bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300",
29
+ badgeClass: "bg-[var(--appkit-color-border-subtle)] text-[var(--appkit-color-text-muted)]",
30
30
  desc: t("diagramStep1Desc"),
31
31
  },
32
32
  {
@@ -90,9 +90,9 @@ export async function HowOrdersWorkView({} = {}) {
90
90
  const DIAGRAM_STEPS = [
91
91
  {
92
92
  emoji: "🛒",
93
- circleClass: "bg-slate-100 dark:bg-slate-700 border-2 border-slate-300 dark:border-slate-500",
93
+ circleClass: "bg-[var(--appkit-color-border-subtle)] border-2 border-[var(--appkit-color-border)]",
94
94
  badge: t("diagramStep1Badge"),
95
- badgeClass: "bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300",
95
+ badgeClass: "bg-[var(--appkit-color-border-subtle)] text-[var(--appkit-color-text-muted)]",
96
96
  desc: t("diagramStep1Desc"),
97
97
  },
98
98
  {
@@ -52,9 +52,9 @@ export async function HowPayoutsWorkView({} = {}) {
52
52
  const DIAGRAM_STEPS = [
53
53
  {
54
54
  emoji: "✅",
55
- circleClass: "bg-slate-100 dark:bg-slate-700 border-2 border-slate-300 dark:border-slate-500",
55
+ circleClass: "bg-[var(--appkit-color-border-subtle)] border-2 border-[var(--appkit-color-border)]",
56
56
  badge: t("step1Title"),
57
- badgeClass: "bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300",
57
+ badgeClass: "bg-[var(--appkit-color-border-subtle)] text-[var(--appkit-color-text-muted)]",
58
58
  desc: t("diagramStep1Desc"),
59
59
  },
60
60
  {
@@ -52,9 +52,9 @@ export async function HowPreOrdersWorkView({} = {}) {
52
52
  const DIAGRAM_STEPS = [
53
53
  {
54
54
  emoji: "🔍",
55
- circleClass: "bg-slate-100 dark:bg-slate-700 border-2 border-slate-300 dark:border-slate-500",
55
+ circleClass: "bg-[var(--appkit-color-border-subtle)] border-2 border-[var(--appkit-color-border)]",
56
56
  badge: t("step1Title"),
57
- badgeClass: "bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300",
57
+ badgeClass: "bg-[var(--appkit-color-border-subtle)] text-[var(--appkit-color-text-muted)]",
58
58
  desc: t("diagramStep1Desc"),
59
59
  },
60
60
  {
@@ -44,9 +44,9 @@ export async function HowReviewsWorkView({} = {}) {
44
44
  const DIAGRAM_STEPS = [
45
45
  {
46
46
  emoji: "📦",
47
- circleClass: "bg-slate-100 dark:bg-slate-700 border-2 border-slate-300 dark:border-slate-500",
47
+ circleClass: "bg-[var(--appkit-color-border-subtle)] border-2 border-[var(--appkit-color-border)]",
48
48
  badge: t("diagramStep1Badge"),
49
- badgeClass: "bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300",
49
+ badgeClass: "bg-[var(--appkit-color-border-subtle)] text-[var(--appkit-color-text-muted)]",
50
50
  desc: t("diagramStep1Desc"),
51
51
  },
52
52
  {
@@ -16,7 +16,7 @@ const __P = {
16
16
  p4: "p-4",
17
17
  p6: "p-6",
18
18
  };
19
- const CLS_EMPTY_ICON = "w-10 h-10 mx-auto mb-3 text-neutral-300 dark:text-neutral-600 ";
19
+ const CLS_EMPTY_ICON = "w-10 h-10 mx-auto mb-3 text-neutral-300 dark:text-[var(--appkit-color-text-muted)] ";
20
20
  const __O = {
21
21
  hidden: "overflow-hidden",
22
22
  };
@@ -92,7 +92,7 @@ export async function PublicProfileView({ userId, }) {
92
92
  const storeDescription = store?.storeDescription ?? pub?.storeDescription;
93
93
  const profileHeroCtx = { displayName, photoURL, memberSince, isSeller, storeSlug, flex, page };
94
94
  const statItems = buildProfileStatItems(t, { listingCount, reviewCount, itemsSold, auctionsWon, totalOrders, isSeller });
95
- return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [renderProfileHero(t, profileHeroCtx), _jsxs(Stack, { gap: "2xl", className: `${page.container.md}`, paddingY: "y-3xl", children: [renderProfileStatsRow(flex, statItems), renderProfileBioSection(pub), renderStoreDescriptionSection(isSeller, storeSlug ?? null, storeDescription ?? null, storeName, t), renderProfileListingsSection(t, products, storeSlug ?? null), renderAuthoredReviewsSection(t, reviewsAuthored, displayName), reviewsReceivedAsBuyer.length > 0 && renderBuyerReceivedReviewsSection(t, reviewsReceivedAsBuyer), _jsx(Row, { justify: "center", padding: "t-xs", children: _jsxs(Link, { href: String(ROUTES.HOME), className: "text-sm text-zinc-400 dark:text-zinc-400 hover:text-neutral-600 dark:hover:text-zinc-300", children: ["\u2190 ", t("backHome")] }) })] })] }));
95
+ return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [renderProfileHero(t, profileHeroCtx), _jsxs(Stack, { gap: "2xl", className: `${page.container.md}`, paddingY: "y-3xl", children: [renderProfileStatsRow(flex, statItems), renderProfileBioSection(pub), renderStoreDescriptionSection(isSeller, storeSlug ?? null, storeDescription ?? null, storeName, t), renderProfileListingsSection(t, products, storeSlug ?? null), renderAuthoredReviewsSection(t, reviewsAuthored, displayName), reviewsReceivedAsBuyer.length > 0 && renderBuyerReceivedReviewsSection(t, reviewsReceivedAsBuyer), _jsx(Row, { justify: "center", padding: "t-xs", children: _jsxs(Link, { href: String(ROUTES.HOME), className: "text-sm text-[var(--appkit-color-text-faint)] hover:text-[var(--appkit-color-text-muted)]", children: ["\u2190 ", t("backHome")] }) })] })] }));
96
96
  }
97
97
  function buildProfileStatItems(t, ctx) {
98
98
  const { listingCount, reviewCount, itemsSold, auctionsWon, totalOrders, isSeller } = ctx;
@@ -120,7 +120,7 @@ function renderProfileStatsRow(flex, statItems) {
120
120
  function renderProfileBioSection(pub) {
121
121
  if (!pub?.bio && !pub?.location && !pub?.website)
122
122
  return null;
123
- return (_jsx(Section, { children: _jsxs(Stack, { gap: "sm", className: `${__P.p6}`, border: "default", surface: "muted", rounded: "2xl", children: [pub.bio && _jsx(Text, { className: "leading-relaxed text-neutral-700", size: "sm", children: pub.bio }), _jsxs(Row, { gap: "md", wrap: true, children: [pub.location && _jsxs(Span, { layout: "flex", gap: "xs", size: "sm", className: "text-neutral-500 dark:text-neutral-400", children: [_jsx(MapPin, { className: "w-4 h-4" }), pub.location] }), pub.website && _jsxs(Anchor, { href: pub.website, layout: "inline-flex", className: "gap-[0.375rem]", children: [_jsx(Globe, { className: "w-4 h-4" }), _jsx(Span, { size: "sm", children: pub.website.replace(/^https?:\/\//, "") })] })] })] }) }));
123
+ return (_jsx(Section, { children: _jsxs(Stack, { gap: "sm", className: `${__P.p6}`, border: "default", surface: "muted", rounded: "2xl", children: [pub.bio && _jsx(Text, { className: "leading-relaxed text-neutral-700", size: "sm", children: pub.bio }), _jsxs(Row, { gap: "md", wrap: true, children: [pub.location && _jsxs(Span, { layout: "flex", gap: "xs", size: "sm", className: "text-[var(--appkit-color-text-muted)]", children: [_jsx(MapPin, { className: "w-4 h-4" }), pub.location] }), pub.website && _jsxs(Anchor, { href: pub.website, layout: "inline-flex", className: "gap-[0.375rem]", children: [_jsx(Globe, { className: "w-4 h-4" }), _jsx(Span, { size: "sm", children: pub.website.replace(/^https?:\/\//, "") })] })] })] }) }));
124
124
  }
125
125
  function renderStoreDescriptionSection(isSeller, storeSlug, storeDescription, storeName, t) {
126
126
  if (!isSeller || !storeSlug || !storeDescription)
@@ -87,9 +87,9 @@ export async function SecurityPrivacyView({} = {}) {
87
87
  const DIAGRAM_STEPS = [
88
88
  {
89
89
  emoji: "🖥️",
90
- circleClass: "bg-slate-100 dark:bg-slate-700 border-2 border-slate-300 dark:border-slate-500",
90
+ circleClass: "bg-[var(--appkit-color-border-subtle)] border-2 border-[var(--appkit-color-border)]",
91
91
  badge: t("diagramStep1Badge"),
92
- badgeClass: "bg-slate-100 dark:bg-slate-700 text-slate-700 dark:text-slate-300",
92
+ badgeClass: "bg-[var(--appkit-color-border-subtle)] text-[var(--appkit-color-text-muted)]",
93
93
  desc: t("diagramStep1Desc"),
94
94
  },
95
95
  {
@@ -7,8 +7,8 @@ export function AddressCard({ address, onEdit, onDelete, onSetDefault, labels =
7
7
  const line2 = "line2" in address && address.line2
8
8
  ? address.line2
9
9
  : address.addressLine2;
10
- return (_jsxs(Div, { surface: "card", padding: "sm", className: "relative", children: [address.isDefault && (_jsx(Span, { color: "success", surface: "success-surface", size: "xs", weight: "medium", className: "absolute right-3 top-3", rounded: "full", padding: "pill-xs", children: labels.defaultBadge ?? "Default" })), address.label && (_jsx(Text, { className: "mb-1 tracking-wide text-neutral-500 dark:text-neutral-400", size: "xs", weight: "semibold", transform: "uppercase", children: address.label })), _jsx(Text, { className: "text-neutral-900 dark:text-neutral-100", size: "sm", children: line1 }), line2 && _jsx(Text, { className: "text-neutral-900 dark:text-neutral-100", size: "sm", children: line2 }), _jsxs(Text, { className: "text-neutral-900 dark:text-neutral-100", size: "sm", children: [address.city, ", ", address.state, " ", address.postalCode] }), _jsx(Text, { className: "text-neutral-900 dark:text-neutral-100", size: "sm", children: address.country }), address.phone && (_jsx(Text, { className: "mt-1 text-neutral-500 dark:text-neutral-400", size: "sm", children: address.phone })), _jsxs(Div, { layout: "flex", gap: "1", className: "mt-3", children: [onEdit && (_jsx(Button, { onClick: () => onEdit(address), variant: "ghost", size: "sm", className: "text-xs font-medium text-primary hover:underline", children: labels.edit ?? "Edit" })), onDelete && (_jsx(Button, { onClick: () => onDelete(address.id), variant: "ghost", size: "sm", className: "text-xs font-medium text-error hover:underline", children: labels.delete ?? "Delete" })), !address.isDefault && onSetDefault && (_jsx(Button, { onClick: () => onSetDefault(address.id), variant: "outline", size: "sm", className: "ml-auto text-xs font-medium", children: labels.setDefault ?? "Set default" }))] })] }));
10
+ return (_jsxs(Div, { surface: "card", padding: "sm", className: "relative", children: [address.isDefault && (_jsx(Span, { color: "success", surface: "success-surface", size: "xs", weight: "medium", className: "absolute right-3 top-3", rounded: "full", padding: "pill-xs", children: labels.defaultBadge ?? "Default" })), address.label && (_jsx(Text, { className: "mb-1 tracking-wide text-[var(--appkit-color-text-muted)]", size: "xs", weight: "semibold", transform: "uppercase", children: address.label })), _jsx(Text, { className: "text-[var(--appkit-color-text)]", size: "sm", children: line1 }), line2 && _jsx(Text, { className: "text-[var(--appkit-color-text)]", size: "sm", children: line2 }), _jsxs(Text, { className: "text-[var(--appkit-color-text)]", size: "sm", children: [address.city, ", ", address.state, " ", address.postalCode] }), _jsx(Text, { className: "text-[var(--appkit-color-text)]", size: "sm", children: address.country }), address.phone && (_jsx(Text, { className: "mt-1 text-[var(--appkit-color-text-muted)]", size: "sm", children: address.phone })), _jsxs(Div, { layout: "flex", gap: "1", className: "mt-3", children: [onEdit && (_jsx(Button, { onClick: () => onEdit(address), variant: "ghost", size: "sm", className: "text-xs font-medium text-primary hover:underline", children: labels.edit ?? "Edit" })), onDelete && (_jsx(Button, { onClick: () => onDelete(address.id), variant: "ghost", size: "sm", className: "text-xs font-medium text-error hover:underline", children: labels.delete ?? "Delete" })), !address.isDefault && onSetDefault && (_jsx(Button, { onClick: () => onSetDefault(address.id), variant: "outline", size: "sm", className: "ml-auto text-xs font-medium", children: labels.setDefault ?? "Set default" }))] })] }));
11
11
  }
12
12
  export function AddressBook({ addresses, onEdit, onDelete, onSetDefault, onAdd, emptyLabel = "No saved addresses", addLabel = "Add Address", }) {
13
- return (_jsxs(Stack, { gap: "md", children: [addresses.length === 0 && (_jsx(Text, { className: "text-neutral-500 dark:text-neutral-400", size: "sm", children: emptyLabel })), _jsx(Div, { layout: "grid", gap: "4", className: "sm:grid-cols-2", children: addresses.map((addr) => (_jsx(AddressCard, { address: addr, onEdit: onEdit, onDelete: onDelete, onSetDefault: onSetDefault }, addr.id))) }), onAdd && (_jsxs(Button, { rounded: "lg", onClick: onAdd, variant: "outline", paddingX: "md", paddingY: "md", textSize: "sm", weight: "medium", className: "mt-2 border border-dashed border-neutral-300 dark:border-[var(--appkit-color-border)] text-neutral-500 dark:text-[var(--appkit-color-text-muted)] transition hover:border-neutral-400 dark:hover:border-[var(--appkit-color-border-subtle)] hover:text-neutral-700 dark:hover:text-[var(--appkit-color-text)]", children: ["+ ", addLabel] }))] }));
13
+ return (_jsxs(Stack, { gap: "md", children: [addresses.length === 0 && (_jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", size: "sm", children: emptyLabel })), _jsx(Div, { layout: "grid", gap: "4", className: "sm:grid-cols-2", children: addresses.map((addr) => (_jsx(AddressCard, { address: addr, onEdit: onEdit, onDelete: onDelete, onSetDefault: onSetDefault }, addr.id))) }), onAdd && (_jsxs(Button, { rounded: "lg", onClick: onAdd, variant: "outline", paddingX: "md", paddingY: "md", textSize: "sm", weight: "medium", className: "mt-2 border border-dashed border-neutral-300 dark:border-[var(--appkit-color-border)] text-[var(--appkit-color-text-muted)] dark:text-[var(--appkit-color-text-muted)] transition hover:border-neutral-400 dark:hover:border-[var(--appkit-color-border-subtle)] hover:text-neutral-700 dark:hover:text-[var(--appkit-color-text)]", children: ["+ ", addLabel] }))] }));
14
14
  }
@@ -74,5 +74,5 @@ export function AddressesIndexListing({ onAdd, onEdit, onDelete, }) {
74
74
  },
75
75
  });
76
76
  return (_jsxs(Stack, { gap: "md", children: [_jsx(ListingToolbar, { filterCount: activeFilterCount, onFiltersClick: openFilters, searchValue: searchInput, searchPlaceholder: "Search by address, postcode or label...", onSearchChange: setSearchInput, onSearchCommit: commitSearch, view: view, onViewChange: (v) => { if (v === "table")
77
- return; setView(v); }, onResetAll: resetAll, hasActiveState: hasActiveState }), _jsx(Div, { className: "sm:px-[1rem]", padding: "x-sm", children: isLoading ? (_jsx(Div, { layout: "grid", gap: "4", className: "sm:grid-cols-2", children: Array.from({ length: 4 }).map((_, i) => (_jsxs("div", { className: "rounded-xl border border-zinc-200 dark:border-slate-700 animate-pulse p-4 space-y-2", children: [_jsx(Div, { className: "h-4 w-1/3", surface: "subtle", rounded: "default" }), _jsx(Div, { className: "h-3 w-3/4", surface: "subtle", rounded: "default" }), _jsx(Div, { className: "h-3 w-1/2", surface: "subtle", rounded: "default" })] }, i))) })) : addresses.length === 0 ? (_jsx(Text, { paddingY: "xl", color: "muted", size: "sm", align: "center", children: table.get(TABLE_KEYS.QUERY) ? `No addresses matching "${table.get(TABLE_KEYS.QUERY)}"` : "No saved addresses." })) : (_jsx(AddressBook, { addresses: addresses, onEdit: onEdit, onDelete: onDelete, onAdd: onAdd })) }), _jsx(ListingFilterDrawer, { open: filterOpen, onClose: () => setFilterOpen(false), onApply: applyFilters, onClear: clearFilters, activeCount: activeFilterCount, children: _jsx(AddressFilters, { table: pendingTable }) })] }));
77
+ return; setView(v); }, onResetAll: resetAll, hasActiveState: hasActiveState }), _jsx(Div, { className: "sm:px-[1rem]", padding: "x-sm", children: isLoading ? (_jsx(Div, { layout: "grid", gap: "4", className: "sm:grid-cols-2", children: Array.from({ length: 4 }).map((_, i) => (_jsxs("div", { className: "rounded-xl border border-[var(--appkit-color-border)] animate-pulse p-4 space-y-2", children: [_jsx(Div, { className: "h-4 w-1/3", surface: "subtle", rounded: "default" }), _jsx(Div, { className: "h-3 w-3/4", surface: "subtle", rounded: "default" }), _jsx(Div, { className: "h-3 w-1/2", surface: "subtle", rounded: "default" })] }, i))) })) : addresses.length === 0 ? (_jsx(Text, { paddingY: "xl", color: "muted", size: "sm", align: "center", children: table.get(TABLE_KEYS.QUERY) ? `No addresses matching "${table.get(TABLE_KEYS.QUERY)}"` : "No saved addresses." })) : (_jsx(AddressBook, { addresses: addresses, onEdit: onEdit, onDelete: onDelete, onAdd: onAdd })) }), _jsx(ListingFilterDrawer, { open: filterOpen, onClose: () => setFilterOpen(false), onApply: applyFilters, onClear: clearFilters, activeCount: activeFilterCount, children: _jsx(AddressFilters, { table: pendingTable }) })] }));
78
78
  }
@@ -2,5 +2,5 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Div, Heading, Row, Span } from "../../../ui";
3
3
  const CLS_DOT_ON = "bg-success-surface";
4
4
  export function ChatWindow({ labels = {}, isConnected = true, isLoading = false, error, renderLoadingIndicator, renderMessages, renderInput, className = "", }) {
5
- return (_jsxs(Div, { className: className, children: [_jsxs(Row, { justify: "between", className: "border-b border-neutral-200 dark:border-neutral-700 mb-3", padding: "b-sm", children: [_jsxs(Row, { gap: "xs", children: [labels.title && _jsx(Heading, { level: 4, children: labels.title }), _jsx(Span, { className: `w-2 h-2 ${isConnected ? CLS_DOT_ON : "bg-[var(--appkit-color-text-faint)]"}`, rounded: "full", "aria-label": isConnected ? labels.connected : labels.disconnected })] }), isLoading && (renderLoadingIndicator?.() ?? null)] }), error ?? null, renderMessages(), renderInput()] }));
5
+ return (_jsxs(Div, { className: className, children: [_jsxs(Row, { justify: "between", className: "border-b border-[var(--appkit-color-border)] mb-3", padding: "b-sm", children: [_jsxs(Row, { gap: "xs", children: [labels.title && _jsx(Heading, { level: 4, children: labels.title }), _jsx(Span, { className: `w-2 h-2 ${isConnected ? CLS_DOT_ON : "bg-[var(--appkit-color-text-faint)]"}`, rounded: "full", "aria-label": isConnected ? labels.connected : labels.disconnected })] }), isLoading && (renderLoadingIndicator?.() ?? null)] }), error ?? null, renderMessages(), renderInput()] }));
6
6
  }