@mohasinac/appkit 2.1.1 → 2.2.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.
- package/README.md +36 -65
- package/dist/cli/index.d.ts +6 -9
- package/dist/cli/index.js +167 -141
- package/dist/client.d.ts +15 -0
- package/dist/client.js +15 -0
- package/dist/constants/api-endpoint-resolver.d.ts +34 -0
- package/dist/constants/api-endpoint-resolver.js +38 -0
- package/dist/constants/api-endpoints.d.ts +388 -0
- package/dist/constants/api-endpoints.js +342 -0
- package/dist/constants/cache-invalidation.d.ts +18 -0
- package/dist/constants/cache-invalidation.js +33 -0
- package/dist/constants/index.d.ts +14 -0
- package/dist/constants/index.js +14 -0
- package/dist/contracts/auth.d.ts +58 -0
- package/dist/contracts/auth.js +2 -0
- package/dist/contracts/client-auth.d.ts +22 -0
- package/dist/contracts/client-auth.js +17 -0
- package/dist/contracts/client-payment-gateway.d.ts +65 -0
- package/dist/contracts/client-payment-gateway.js +25 -0
- package/dist/contracts/client-realtime.d.ts +24 -0
- package/dist/contracts/client-realtime.js +18 -0
- package/dist/contracts/client-session.d.ts +37 -0
- package/dist/contracts/client-session.js +22 -0
- package/dist/contracts/config.d.ts +53 -0
- package/dist/contracts/config.js +2 -0
- package/dist/contracts/email.d.ts +30 -0
- package/dist/contracts/email.js +2 -0
- package/dist/contracts/extend.d.ts +270 -0
- package/dist/contracts/extend.js +75 -0
- package/dist/contracts/feature.d.ts +53 -0
- package/dist/contracts/feature.js +2 -0
- package/dist/contracts/field-ops.d.ts +31 -0
- package/dist/contracts/field-ops.js +35 -0
- package/dist/contracts/form.d.ts +89 -0
- package/dist/contracts/form.js +80 -0
- package/dist/contracts/index.d.ts +32 -728
- package/dist/contracts/index.js +13 -4
- package/dist/contracts/infra.d.ts +43 -0
- package/dist/contracts/infra.js +2 -0
- package/dist/contracts/payment.d.ts +39 -0
- package/dist/contracts/payment.js +2 -0
- package/dist/contracts/registry.d.ts +26 -0
- package/dist/contracts/registry.js +14 -0
- package/dist/contracts/repository.d.ts +127 -0
- package/dist/contracts/repository.js +28 -0
- package/dist/contracts/search.d.ts +44 -0
- package/dist/contracts/search.js +2 -0
- package/dist/contracts/shipping.d.ts +64 -0
- package/dist/contracts/shipping.js +2 -0
- package/dist/contracts/storage.d.ts +27 -0
- package/dist/contracts/storage.js +2 -0
- package/dist/contracts/style.d.ts +23 -0
- package/dist/contracts/style.js +2 -0
- package/dist/contracts/table.d.ts +104 -0
- package/dist/contracts/table.js +68 -0
- package/dist/core/CacheManager.d.ts +31 -0
- package/dist/core/CacheManager.js +63 -0
- package/dist/core/EventBus.d.ts +27 -0
- package/dist/core/EventBus.js +75 -0
- package/dist/core/Logger.d.ts +60 -0
- package/dist/core/Logger.js +153 -0
- package/dist/core/Queue.d.ts +43 -0
- package/dist/core/Queue.js +92 -0
- package/dist/core/StorageManager.d.ts +36 -0
- package/dist/core/StorageManager.js +159 -0
- package/dist/core/baseline-resolver.d.ts +52 -0
- package/dist/core/baseline-resolver.js +74 -0
- package/dist/core/browser.d.ts +18 -0
- package/dist/core/browser.js +9 -0
- package/dist/core/copilot-log.repository.d.ts +44 -0
- package/dist/core/copilot-log.repository.js +61 -0
- package/dist/core/hooks/useSiteSettings.d.ts +1 -0
- package/dist/core/hooks/useSiteSettings.js +11 -0
- package/dist/core/index.d.ts +31 -326
- package/dist/core/index.js +21 -7
- package/dist/core/integration-keys.d.ts +30 -0
- package/dist/core/integration-keys.js +55 -0
- package/dist/core/mutation-events.d.ts +147 -0
- package/dist/core/mutation-events.js +193 -0
- package/dist/core/newsletter-actions.d.ts +20 -0
- package/dist/core/newsletter-actions.js +28 -0
- package/dist/core/newsletter.repository.d.ts +55 -0
- package/dist/core/newsletter.repository.js +109 -0
- package/dist/core/server-action.d.ts +114 -0
- package/dist/core/server-action.js +119 -0
- package/dist/core/site-config.d.ts +33 -0
- package/dist/core/site-config.js +74 -0
- package/dist/core/unit-of-work.d.ts +32 -0
- package/dist/core/unit-of-work.js +114 -0
- package/dist/errors/api-error.d.ts +4 -0
- package/dist/errors/api-error.js +6 -0
- package/dist/errors/authentication-error.d.ts +4 -0
- package/dist/errors/authentication-error.js +6 -0
- package/dist/errors/authorization-error.d.ts +4 -0
- package/dist/errors/authorization-error.js +6 -0
- package/dist/errors/base-error.d.ts +14 -0
- package/dist/errors/base-error.js +22 -0
- package/dist/errors/database-error.d.ts +4 -0
- package/dist/errors/database-error.js +6 -0
- package/dist/errors/error-codes.d.ts +43 -0
- package/dist/errors/error-codes.js +93 -0
- package/dist/errors/error-handler.d.ts +16 -0
- package/dist/errors/error-handler.js +57 -0
- package/dist/errors/index.d.ts +11 -96
- package/dist/errors/index.js +15 -4
- package/dist/errors/messages.d.ts +469 -0
- package/dist/errors/messages.js +503 -0
- package/dist/errors/not-found-error.d.ts +4 -0
- package/dist/errors/not-found-error.js +6 -0
- package/dist/errors/validation-error.d.ts +4 -0
- package/dist/errors/validation-error.js +6 -0
- package/dist/features/about/components/AboutView.d.ts +38 -0
- package/dist/features/about/components/AboutView.js +5 -0
- package/dist/features/about/index.d.ts +2 -42
- package/dist/features/about/index.js +1 -280
- package/dist/features/account/actions/address-actions.d.ts +7 -0
- package/dist/features/account/actions/address-actions.js +24 -0
- package/dist/features/account/actions/index.d.ts +1 -0
- package/dist/features/account/actions/index.js +1 -0
- package/dist/features/account/address-validation.d.ts +20 -0
- package/dist/features/account/address-validation.js +35 -0
- package/dist/features/account/api/[userId]/addresses/route.d.ts +21 -0
- package/dist/features/account/api/[userId]/addresses/route.js +91 -0
- package/dist/features/account/api/[userId]/route.d.ts +23 -0
- package/dist/features/account/api/[userId]/route.js +67 -0
- package/dist/features/account/columns/index.d.ts +17 -0
- package/dist/features/account/columns/index.js +39 -0
- package/dist/features/account/components/AddressBook.d.ts +39 -0
- package/dist/features/account/components/AddressBook.js +14 -0
- package/dist/features/account/components/AddressForm.d.ts +39 -0
- package/dist/features/account/components/AddressForm.js +55 -0
- package/dist/features/account/components/AddressSelectorCreate.d.ts +16 -0
- package/dist/features/account/components/AddressSelectorCreate.js +40 -0
- package/dist/features/account/components/BecomeSellerView.d.ts +17 -0
- package/dist/features/account/components/BecomeSellerView.js +5 -0
- package/dist/features/account/components/ChatList.d.ts +14 -0
- package/dist/features/account/components/ChatList.js +10 -0
- package/dist/features/account/components/ChatWindow.d.ts +17 -0
- package/dist/features/account/components/ChatWindow.js +6 -0
- package/dist/features/account/components/MessagesView.d.ts +16 -0
- package/dist/features/account/components/MessagesView.js +5 -0
- package/dist/features/account/components/NotificationBell.d.ts +32 -0
- package/dist/features/account/components/NotificationBell.js +80 -0
- package/dist/features/account/components/OrderDetailView.d.ts +18 -0
- package/dist/features/account/components/OrderDetailView.js +12 -0
- package/dist/features/account/components/ProfileView.d.ts +12 -0
- package/dist/features/account/components/ProfileView.js +5 -0
- package/dist/features/account/components/UserAccountHubView.d.ts +13 -0
- package/dist/features/account/components/UserAccountHubView.js +5 -0
- package/dist/features/account/components/UserAddressesView.d.ts +13 -0
- package/dist/features/account/components/UserAddressesView.js +5 -0
- package/dist/features/account/components/UserNotificationsView.d.ts +15 -0
- package/dist/features/account/components/UserNotificationsView.js +12 -0
- package/dist/features/account/components/UserOffersView.d.ts +10 -0
- package/dist/features/account/components/UserOffersView.js +5 -0
- package/dist/features/account/components/UserOrderTrackView.d.ts +16 -0
- package/dist/features/account/components/UserOrderTrackView.js +8 -0
- package/dist/features/account/components/UserOrdersView.d.ts +12 -0
- package/dist/features/account/components/UserOrdersView.js +5 -0
- package/dist/features/account/components/UserSettingsView.d.ts +15 -0
- package/dist/features/account/components/UserSettingsView.js +12 -0
- package/dist/features/account/components/index.d.ts +34 -0
- package/dist/features/account/components/index.js +17 -0
- package/dist/features/account/constants/addresses.d.ts +13 -0
- package/dist/features/account/constants/addresses.js +43 -0
- package/dist/features/account/hooks/useAccount.d.ts +13 -0
- package/dist/features/account/hooks/useAccount.js +19 -0
- package/dist/features/account/hooks/useAddressForm.d.ts +24 -0
- package/dist/features/account/hooks/useAddressForm.js +58 -0
- package/dist/features/account/hooks/useAddressSelector.d.ts +25 -0
- package/dist/features/account/hooks/useAddressSelector.js +30 -0
- package/dist/features/account/hooks/useAddresses.d.ts +59 -0
- package/dist/features/account/hooks/useAddresses.js +73 -0
- package/dist/features/account/hooks/useNotifications.d.ts +23 -0
- package/dist/features/account/hooks/useNotifications.js +31 -0
- package/dist/features/account/hooks/useProfile.d.ts +25 -0
- package/dist/features/account/hooks/useProfile.js +24 -0
- package/dist/features/account/hooks/useProfileStats.d.ts +6 -0
- package/dist/features/account/hooks/useProfileStats.js +21 -0
- package/dist/features/account/hooks/usePublicProfile.d.ts +78 -0
- package/dist/features/account/hooks/usePublicProfile.js +51 -0
- package/dist/features/account/index.d.ts +15 -555
- package/dist/features/account/index.js +15 -1003
- package/dist/features/account/manifest.d.ts +2 -0
- package/dist/features/account/manifest.js +27 -0
- package/dist/features/account/messages/en.json +12 -0
- package/dist/features/account/repository/account.repository.d.ts +11 -0
- package/dist/features/account/repository/account.repository.js +20 -0
- package/dist/features/account/repository/address.repository.d.ts +17 -0
- package/dist/features/account/repository/address.repository.js +185 -0
- package/dist/features/account/schemas/firestore.d.ts +48 -0
- package/dist/features/account/schemas/firestore.js +59 -0
- package/dist/features/account/schemas/index.d.ts +198 -0
- package/dist/features/account/schemas/index.js +51 -0
- package/dist/features/account/server.d.ts +9 -0
- package/dist/features/account/server.js +9 -0
- package/dist/features/account/types/index.d.ts +83 -0
- package/dist/features/account/types/index.js +2 -0
- package/dist/features/admin/actions/admin-actions.d.ts +35 -0
- package/dist/features/admin/actions/admin-actions.js +174 -0
- package/dist/features/admin/actions/admin-coupon-actions.d.ts +17 -0
- package/dist/features/admin/actions/admin-coupon-actions.js +87 -0
- package/dist/features/admin/actions/admin-read-actions.d.ts +105 -0
- package/dist/features/admin/actions/admin-read-actions.js +172 -0
- package/dist/features/admin/actions/chat-actions.d.ts +29 -0
- package/dist/features/admin/actions/chat-actions.js +97 -0
- package/dist/features/admin/actions/index.d.ts +6 -0
- package/dist/features/admin/actions/index.js +6 -0
- package/dist/features/admin/actions/notification-actions.d.ts +31 -0
- package/dist/features/admin/actions/notification-actions.js +42 -0
- package/dist/features/admin/actions/site-settings-actions.d.ts +8 -0
- package/dist/features/admin/actions/site-settings-actions.js +16 -0
- package/dist/features/admin/api/bids/route.d.ts +14 -0
- package/dist/features/admin/api/bids/route.js +53 -0
- package/dist/features/admin/api/coupons/route.d.ts +14 -0
- package/dist/features/admin/api/coupons/route.js +53 -0
- package/dist/features/admin/api/products/route.d.ts +14 -0
- package/dist/features/admin/api/products/route.js +54 -0
- package/dist/features/admin/api/reviews/route.d.ts +14 -0
- package/dist/features/admin/api/reviews/route.js +53 -0
- package/dist/features/admin/components/AdminAnalyticsView.d.ts +29 -0
- package/dist/features/admin/components/AdminAnalyticsView.js +15 -0
- package/dist/features/admin/components/AdminBidsView.d.ts +4 -0
- package/dist/features/admin/components/AdminBidsView.js +5 -0
- package/dist/features/admin/components/AdminBlogView.d.ts +4 -0
- package/dist/features/admin/components/AdminBlogView.js +5 -0
- package/dist/features/admin/components/AdminCarouselView.d.ts +9 -0
- package/dist/features/admin/components/AdminCarouselView.js +5 -0
- package/dist/features/admin/components/AdminCategoriesView.d.ts +9 -0
- package/dist/features/admin/components/AdminCategoriesView.js +5 -0
- package/dist/features/admin/components/AdminCouponsView.d.ts +4 -0
- package/dist/features/admin/components/AdminCouponsView.js +5 -0
- package/dist/features/admin/components/AdminDashboardView.d.ts +16 -0
- package/dist/features/admin/components/AdminDashboardView.js +11 -0
- package/dist/features/admin/components/AdminFaqsView.d.ts +4 -0
- package/dist/features/admin/components/AdminFaqsView.js +5 -0
- package/dist/features/admin/components/AdminFeatureFlagsView.d.ts +9 -0
- package/dist/features/admin/components/AdminFeatureFlagsView.js +5 -0
- package/dist/features/admin/components/AdminFilterBar.d.ts +65 -0
- package/dist/features/admin/components/AdminFilterBar.js +22 -0
- package/dist/features/admin/components/AdminMediaView.d.ts +9 -0
- package/dist/features/admin/components/AdminMediaView.js +5 -0
- package/dist/features/admin/components/AdminNavigationView.d.ts +9 -0
- package/dist/features/admin/components/AdminNavigationView.js +5 -0
- package/dist/features/admin/components/AdminOrdersView.d.ts +4 -0
- package/dist/features/admin/components/AdminOrdersView.js +5 -0
- package/dist/features/admin/components/AdminPageHeader.d.ts +53 -0
- package/dist/features/admin/components/AdminPageHeader.js +12 -0
- package/dist/features/admin/components/AdminPayoutsView.d.ts +4 -0
- package/dist/features/admin/components/AdminPayoutsView.js +5 -0
- package/dist/features/admin/components/AdminProductsView.d.ts +4 -0
- package/dist/features/admin/components/AdminProductsView.js +5 -0
- package/dist/features/admin/components/AdminReviewsView.d.ts +7 -0
- package/dist/features/admin/components/AdminReviewsView.js +5 -0
- package/dist/features/admin/components/AdminSectionsView.d.ts +9 -0
- package/dist/features/admin/components/AdminSectionsView.js +5 -0
- package/dist/features/admin/components/AdminSessionsManager.d.ts +9 -0
- package/dist/features/admin/components/AdminSessionsManager.js +5 -0
- package/dist/features/admin/components/AdminSidebar.d.ts +9 -0
- package/dist/features/admin/components/AdminSidebar.js +6 -0
- package/dist/features/admin/components/AdminSiteView.d.ts +10 -0
- package/dist/features/admin/components/AdminSiteView.js +5 -0
- package/dist/features/admin/components/AdminStoresView.d.ts +4 -0
- package/dist/features/admin/components/AdminStoresView.js +5 -0
- package/dist/features/admin/components/AdminTopBar.d.ts +8 -0
- package/dist/features/admin/components/AdminTopBar.js +8 -0
- package/dist/features/admin/components/AdminUsersView.d.ts +4 -0
- package/dist/features/admin/components/AdminUsersView.js +5 -0
- package/dist/features/admin/components/DashboardStats.d.ts +8 -0
- package/dist/features/admin/components/DashboardStats.js +21 -0
- package/dist/features/admin/components/DataTable.d.ts +19 -0
- package/dist/features/admin/components/DataTable.js +7 -0
- package/dist/features/admin/components/DemoSeedView.d.ts +11 -0
- package/dist/features/admin/components/DemoSeedView.js +5 -0
- package/dist/features/admin/components/DrawerFormFooter.d.ts +54 -0
- package/dist/features/admin/components/DrawerFormFooter.js +6 -0
- package/dist/features/admin/components/QuickActionsPanel.d.ts +15 -0
- package/dist/features/admin/components/QuickActionsPanel.js +6 -0
- package/dist/features/admin/components/analytics/AdminAnalyticsCharts.d.ts +17 -0
- package/dist/features/admin/components/analytics/AdminAnalyticsCharts.js +33 -0
- package/dist/features/admin/components/analytics/AdminStatCard.d.ts +8 -0
- package/dist/features/admin/components/analytics/AdminStatCard.js +6 -0
- package/dist/features/admin/components/analytics/AdminTopProductsTable.d.ts +16 -0
- package/dist/features/admin/components/analytics/AdminTopProductsTable.js +6 -0
- package/dist/features/admin/components/analytics/index.d.ts +3 -0
- package/dist/features/admin/components/analytics/index.js +3 -0
- package/dist/features/admin/components/index.d.ts +62 -0
- package/dist/features/admin/components/index.js +32 -0
- package/dist/features/admin/hooks/useAdmin.d.ts +9 -0
- package/dist/features/admin/hooks/useAdmin.js +14 -0
- package/dist/features/admin/hooks/useChat.d.ts +24 -0
- package/dist/features/admin/hooks/useChat.js +97 -0
- package/dist/features/admin/index.d.ts +8 -554
- package/dist/features/admin/index.js +7 -2703
- package/dist/features/admin/manifest.d.ts +2 -0
- package/dist/features/admin/manifest.js +13 -0
- package/dist/features/admin/messages/en.json +13 -0
- package/dist/features/admin/permission-map.d.ts +3 -0
- package/dist/features/admin/permission-map.js +24 -0
- package/dist/features/admin/repository/chat.repository.d.ts +70 -0
- package/dist/features/admin/repository/chat.repository.js +216 -0
- package/dist/features/admin/repository/notification.repository.d.ts +64 -0
- package/dist/features/admin/repository/notification.repository.js +225 -0
- package/dist/features/admin/repository/site-settings.repository.d.ts +118 -0
- package/dist/features/admin/repository/site-settings.repository.js +214 -0
- package/dist/features/admin/schemas/firestore.d.ts +311 -0
- package/dist/features/admin/schemas/firestore.js +246 -0
- package/dist/features/admin/schemas/index.d.ts +1 -0
- package/dist/features/admin/schemas/index.js +1 -0
- package/dist/features/admin/server.d.ts +15 -0
- package/dist/features/admin/server.js +14 -0
- package/dist/features/admin/types/index.d.ts +61 -0
- package/dist/features/admin/types/index.js +1 -0
- package/dist/features/admin/types/product.types.d.ts +78 -0
- package/dist/features/admin/types/product.types.js +13 -0
- package/dist/features/auctions/actions/bid-actions.d.ts +22 -0
- package/dist/features/auctions/actions/bid-actions.js +106 -0
- package/dist/features/auctions/actions/index.d.ts +1 -0
- package/dist/features/auctions/actions/index.js +1 -0
- package/dist/features/auctions/api/route.d.ts +14 -0
- package/dist/features/auctions/api/route.js +67 -0
- package/dist/features/auctions/columns/index.d.ts +14 -0
- package/dist/features/auctions/columns/index.js +63 -0
- package/dist/features/auctions/components/AuctionCard.d.ts +26 -0
- package/dist/features/auctions/components/AuctionCard.js +35 -0
- package/dist/features/auctions/components/MarketplaceAuctionCard.d.ts +56 -0
- package/dist/features/auctions/components/MarketplaceAuctionCard.js +112 -0
- package/dist/features/auctions/components/MarketplaceAuctionGrid.d.ts +22 -0
- package/dist/features/auctions/components/MarketplaceAuctionGrid.js +37 -0
- package/dist/features/auctions/components/index.d.ts +3 -0
- package/dist/features/auctions/components/index.js +3 -0
- package/dist/features/auctions/hooks/useAuctions.d.ts +50 -0
- package/dist/features/auctions/hooks/useAuctions.js +93 -0
- package/dist/features/auctions/hooks/usePlaceBid.d.ts +24 -0
- package/dist/features/auctions/hooks/usePlaceBid.js +29 -0
- package/dist/features/auctions/hooks/useRealtimeBids.d.ts +38 -0
- package/dist/features/auctions/hooks/useRealtimeBids.js +66 -0
- package/dist/features/auctions/index.d.ts +8 -513
- package/dist/features/auctions/index.js +8 -1194
- package/dist/features/auctions/manifest.d.ts +2 -0
- package/dist/features/auctions/manifest.js +17 -0
- package/dist/features/auctions/messages/en.json +18 -0
- package/dist/features/auctions/repository/auctions.repository.d.ts +12 -0
- package/dist/features/auctions/repository/auctions.repository.js +42 -0
- package/dist/features/auctions/repository/bid.repository.d.ts +145 -0
- package/dist/features/auctions/repository/bid.repository.js +370 -0
- package/dist/features/auctions/schemas/firestore.d.ts +48 -0
- package/dist/features/auctions/schemas/firestore.js +50 -0
- package/dist/features/auctions/schemas/index.d.ts +155 -0
- package/dist/features/auctions/schemas/index.js +64 -0
- package/dist/features/auctions/server.d.ts +10 -0
- package/dist/features/auctions/server.js +10 -0
- package/dist/features/auctions/types/index.d.ts +73 -0
- package/dist/features/auctions/types/index.js +1 -0
- package/dist/features/auth/actions/index.d.ts +2 -0
- package/dist/features/auth/actions/index.js +2 -0
- package/dist/features/auth/actions/profile-actions.d.ts +27 -0
- package/dist/features/auth/actions/profile-actions.js +50 -0
- package/dist/features/auth/actions/realtime-token-actions.d.ts +11 -0
- package/dist/features/auth/actions/realtime-token-actions.js +31 -0
- package/dist/features/auth/api/route.d.ts +22 -0
- package/dist/features/auth/api/route.js +48 -0
- package/dist/features/auth/auth-helpers.d.ts +14 -0
- package/dist/features/auth/auth-helpers.js +68 -0
- package/dist/features/auth/components/AuthStatusPanel.d.ts +10 -0
- package/dist/features/auth/components/AuthStatusPanel.js +22 -0
- package/dist/features/auth/components/ForgotPasswordView.d.ts +18 -0
- package/dist/features/auth/components/ForgotPasswordView.js +15 -0
- package/dist/features/auth/components/Guards.d.ts +86 -0
- package/dist/features/auth/components/Guards.js +91 -0
- package/dist/features/auth/components/LoginForm.d.ts +36 -0
- package/dist/features/auth/components/LoginForm.js +18 -0
- package/dist/features/auth/components/RegisterForm.d.ts +36 -0
- package/dist/features/auth/components/RegisterForm.js +27 -0
- package/dist/features/auth/components/ResetPasswordView.d.ts +23 -0
- package/dist/features/auth/components/ResetPasswordView.js +22 -0
- package/dist/features/auth/components/SocialAuthButtons.d.ts +8 -0
- package/dist/features/auth/components/SocialAuthButtons.js +6 -0
- package/dist/features/auth/components/VerifyEmailView.d.ts +20 -0
- package/dist/features/auth/components/VerifyEmailView.js +8 -0
- package/dist/features/auth/components/index.d.ts +14 -0
- package/dist/features/auth/components/index.js +8 -0
- package/dist/features/auth/consent-otp.d.ts +52 -0
- package/dist/features/auth/consent-otp.js +120 -0
- package/dist/features/auth/hooks/useAuth.d.ts +81 -0
- package/dist/features/auth/hooks/useAuth.js +164 -0
- package/dist/features/auth/hooks/useAuthEvent.d.ts +22 -0
- package/dist/features/auth/hooks/useAuthEvent.js +31 -0
- package/dist/features/auth/hooks/useLogout.d.ts +16 -0
- package/dist/features/auth/hooks/useLogout.js +22 -0
- package/dist/features/auth/hooks/useRBAC.d.ts +38 -0
- package/dist/features/auth/hooks/useRBAC.js +80 -0
- package/dist/features/auth/index.d.ts +10 -315
- package/dist/features/auth/index.js +10 -1874
- package/dist/features/auth/manifest.d.ts +2 -0
- package/dist/features/auth/manifest.js +21 -0
- package/dist/features/auth/messages/en.json +13 -0
- package/dist/features/auth/repository/index.d.ts +4 -0
- package/dist/features/auth/repository/index.js +4 -0
- package/dist/features/auth/repository/session.repository.d.ts +44 -0
- package/dist/features/auth/repository/session.repository.js +246 -0
- package/dist/features/auth/repository/sms-counter.repository.d.ts +15 -0
- package/dist/features/auth/repository/sms-counter.repository.js +54 -0
- package/dist/features/auth/repository/token.repository.d.ts +38 -0
- package/dist/features/auth/repository/token.repository.js +186 -0
- package/dist/features/auth/repository/user.repository.d.ts +46 -0
- package/dist/features/auth/repository/user.repository.js +233 -0
- package/dist/features/auth/schemas/firestore.d.ts +351 -0
- package/dist/features/auth/schemas/firestore.js +272 -0
- package/dist/features/auth/schemas/index.d.ts +72 -0
- package/dist/features/auth/schemas/index.js +41 -0
- package/dist/features/auth/server.d.ts +15 -18
- package/dist/features/auth/server.js +21 -529
- package/dist/features/auth/token-helpers.d.ts +7 -0
- package/dist/features/auth/token-helpers.js +37 -0
- package/dist/features/auth/token-store.d.ts +39 -0
- package/dist/features/auth/token-store.js +120 -0
- package/dist/features/auth/types/index.d.ts +30 -0
- package/dist/features/auth/types/index.js +1 -0
- package/dist/features/before-after/api/[id]/route.d.ts +26 -0
- package/dist/features/before-after/api/[id]/route.js +88 -0
- package/dist/features/before-after/api/route.d.ts +13 -0
- package/dist/features/before-after/api/route.js +79 -0
- package/dist/features/before-after/columns/index.d.ts +17 -0
- package/dist/features/before-after/columns/index.js +50 -0
- package/dist/features/before-after/components/BeforeAfterGallery.d.ts +7 -0
- package/dist/features/before-after/components/BeforeAfterGallery.js +8 -0
- package/dist/features/before-after/components/BeforeAfterSlider.d.ts +7 -0
- package/dist/features/before-after/components/BeforeAfterSlider.js +27 -0
- package/dist/features/before-after/components/index.d.ts +2 -0
- package/dist/features/before-after/components/index.js +2 -0
- package/dist/features/before-after/hooks/useBeforeAfter.d.ts +15 -0
- package/dist/features/before-after/hooks/useBeforeAfter.js +25 -0
- package/dist/features/before-after/index.d.ts +6 -128
- package/dist/features/before-after/index.js +6 -546
- package/dist/features/before-after/manifest.d.ts +2 -0
- package/dist/features/before-after/manifest.js +10 -0
- package/dist/features/before-after/messages/en.json +8 -0
- package/dist/features/before-after/repository/before-after.repository.d.ts +13 -0
- package/dist/features/before-after/repository/before-after.repository.js +36 -0
- package/dist/features/before-after/schemas/index.d.ts +48 -0
- package/dist/features/before-after/schemas/index.js +24 -0
- package/dist/features/before-after/server.d.ts +7 -0
- package/dist/features/before-after/server.js +7 -0
- package/dist/features/before-after/types/index.d.ts +18 -0
- package/dist/features/before-after/types/index.js +1 -0
- package/dist/features/blog/actions/blog-actions.d.ts +302 -0
- package/dist/features/blog/actions/blog-actions.js +119 -0
- package/dist/features/blog/actions/index.d.ts +1 -0
- package/dist/features/blog/actions/index.js +1 -0
- package/dist/features/blog/api/[slug]/route.d.ts +23 -0
- package/dist/features/blog/api/[slug]/route.js +40 -0
- package/dist/features/blog/api/route.d.ts +12 -0
- package/dist/features/blog/api/route.js +64 -0
- package/dist/features/blog/columns/index.d.ts +27 -0
- package/dist/features/blog/columns/index.js +54 -0
- package/dist/features/blog/components/BlogFeaturedCard.d.ts +17 -0
- package/dist/features/blog/components/BlogFeaturedCard.js +24 -0
- package/dist/features/blog/components/BlogFilters.d.ts +106 -0
- package/dist/features/blog/components/BlogFilters.js +67 -0
- package/dist/features/blog/components/BlogListView.d.ts +29 -0
- package/dist/features/blog/components/BlogListView.js +38 -0
- package/dist/features/blog/components/BlogPostForm.d.ts +56 -0
- package/dist/features/blog/components/BlogPostForm.js +24 -0
- package/dist/features/blog/components/BlogPostView.d.ts +32 -0
- package/dist/features/blog/components/BlogPostView.js +39 -0
- package/dist/features/blog/components/index.d.ts +9 -0
- package/dist/features/blog/components/index.js +5 -0
- package/dist/features/blog/hooks/useBlog.d.ts +27 -0
- package/dist/features/blog/hooks/useBlog.js +51 -0
- package/dist/features/blog/index.d.ts +6 -492
- package/dist/features/blog/index.js +6 -4062
- package/dist/features/blog/manifest.d.ts +2 -0
- package/dist/features/blog/manifest.js +14 -0
- package/dist/features/blog/messages/en.json +14 -0
- package/dist/features/blog/repository/blog.repository.d.ts +79 -0
- package/dist/features/blog/repository/blog.repository.js +130 -0
- package/dist/features/blog/schemas/firestore.d.ts +87 -0
- package/dist/features/blog/schemas/firestore.js +99 -0
- package/dist/features/blog/schemas/index.d.ts +207 -0
- package/dist/features/blog/schemas/index.js +71 -0
- package/dist/features/blog/server.d.ts +8 -71
- package/dist/features/blog/server.js +10 -180
- package/dist/features/blog/types/index.d.ts +47 -0
- package/dist/features/blog/types/index.js +1 -0
- package/dist/features/cart/actions/cart-actions.d.ts +16 -0
- package/dist/features/cart/actions/cart-actions.js +52 -0
- package/dist/features/cart/actions/index.d.ts +1 -0
- package/dist/features/cart/actions/index.js +1 -0
- package/dist/features/cart/api/[id]/route.d.ts +21 -0
- package/dist/features/cart/api/[id]/route.js +62 -0
- package/dist/features/cart/api/route.d.ts +13 -0
- package/dist/features/cart/api/route.js +79 -0
- package/dist/features/cart/columns/index.d.ts +17 -0
- package/dist/features/cart/columns/index.js +53 -0
- package/dist/features/cart/components/CartDrawer.d.ts +27 -0
- package/dist/features/cart/components/CartDrawer.js +14 -0
- package/dist/features/cart/components/CartSummary.d.ts +19 -0
- package/dist/features/cart/components/CartSummary.js +5 -0
- package/dist/features/cart/components/CartView.d.ts +17 -0
- package/dist/features/cart/components/CartView.js +7 -0
- package/dist/features/cart/components/CheckoutAddressStep.d.ts +20 -0
- package/dist/features/cart/components/CheckoutAddressStep.js +12 -0
- package/dist/features/cart/components/CheckoutOtpModal.d.ts +15 -0
- package/dist/features/cart/components/CheckoutOtpModal.js +12 -0
- package/dist/features/cart/components/CheckoutSuccessView.d.ts +12 -0
- package/dist/features/cart/components/CheckoutSuccessView.js +9 -0
- package/dist/features/cart/components/CheckoutView.d.ts +15 -0
- package/dist/features/cart/components/CheckoutView.js +18 -0
- package/dist/features/cart/components/index.d.ts +13 -0
- package/dist/features/cart/components/index.js +7 -0
- package/dist/features/cart/hooks/useAddToCart.d.ts +27 -0
- package/dist/features/cart/hooks/useAddToCart.js +52 -0
- package/dist/features/cart/hooks/useCart.d.ts +17 -0
- package/dist/features/cart/hooks/useCart.js +24 -0
- package/dist/features/cart/hooks/useCartCount.d.ts +7 -0
- package/dist/features/cart/hooks/useCartCount.js +19 -0
- package/dist/features/cart/hooks/useCartQuery.d.ts +8 -0
- package/dist/features/cart/hooks/useCartQuery.js +11 -0
- package/dist/features/cart/hooks/useCheckoutReadQueries.d.ts +14 -0
- package/dist/features/cart/hooks/useCheckoutReadQueries.js +18 -0
- package/dist/features/cart/hooks/useGuestCart.d.ts +18 -0
- package/dist/features/cart/hooks/useGuestCart.js +32 -0
- package/dist/features/cart/hooks/useGuestCartMerge.d.ts +15 -0
- package/dist/features/cart/hooks/useGuestCartMerge.js +50 -0
- package/dist/features/cart/hooks/useOrder.d.ts +13 -0
- package/dist/features/cart/hooks/useOrder.js +24 -0
- package/dist/features/cart/index.d.ts +14 -451
- package/dist/features/cart/index.js +14 -1064
- package/dist/features/cart/manifest.d.ts +2 -0
- package/dist/features/cart/manifest.js +10 -0
- package/dist/features/cart/messages/en.json +10 -0
- package/dist/features/cart/repository/cart.repository.d.ts +23 -0
- package/dist/features/cart/repository/cart.repository.js +210 -0
- package/dist/features/cart/schemas/firestore.d.ts +83 -0
- package/dist/features/cart/schemas/firestore.js +36 -0
- package/dist/features/cart/schemas/index.d.ts +184 -0
- package/dist/features/cart/schemas/index.js +35 -0
- package/dist/features/cart/server.d.ts +8 -0
- package/dist/features/cart/server.js +8 -0
- package/dist/features/cart/types/index.d.ts +27 -0
- package/dist/features/cart/types/index.js +1 -0
- package/dist/features/cart/utils/guest-cart.d.ts +26 -0
- package/dist/features/cart/utils/guest-cart.js +83 -0
- package/dist/features/categories/actions/category-actions.d.ts +17 -0
- package/dist/features/categories/actions/category-actions.js +63 -0
- package/dist/features/categories/actions/index.d.ts +1 -0
- package/dist/features/categories/actions/index.js +1 -0
- package/dist/features/categories/api/[id]/route.d.ts +23 -0
- package/dist/features/categories/api/[id]/route.js +98 -0
- package/dist/features/categories/api/route.d.ts +19 -0
- package/dist/features/categories/api/route.js +200 -0
- package/dist/features/categories/columns/index.d.ts +15 -0
- package/dist/features/categories/columns/index.js +38 -0
- package/dist/features/categories/components/BreadcrumbTrail.d.ts +47 -0
- package/dist/features/categories/components/BreadcrumbTrail.js +36 -0
- package/dist/features/categories/components/CategoriesListView.d.ts +31 -0
- package/dist/features/categories/components/CategoriesListView.js +27 -0
- package/dist/features/categories/components/CategoryFilters.d.ts +68 -0
- package/dist/features/categories/components/CategoryFilters.js +75 -0
- package/dist/features/categories/components/CategoryForm.d.ts +24 -0
- package/dist/features/categories/components/CategoryForm.js +42 -0
- package/dist/features/categories/components/CategoryGrid.d.ts +14 -0
- package/dist/features/categories/components/CategoryGrid.js +14 -0
- package/dist/features/categories/components/CategoryProductsView.d.ts +49 -0
- package/dist/features/categories/components/CategoryProductsView.js +21 -0
- package/dist/features/categories/components/CategorySelectorCreate.d.ts +17 -0
- package/dist/features/categories/components/CategorySelectorCreate.js +57 -0
- package/dist/features/categories/components/CategorySortSelect.d.ts +9 -0
- package/dist/features/categories/components/CategorySortSelect.js +8 -0
- package/dist/features/categories/components/CategoryTableColumns.d.ts +30 -0
- package/dist/features/categories/components/CategoryTableColumns.js +54 -0
- package/dist/features/categories/components/CategoryTree.d.ts +15 -0
- package/dist/features/categories/components/CategoryTree.js +49 -0
- package/dist/features/categories/components/ConcernCard.d.ts +8 -0
- package/dist/features/categories/components/ConcernCard.js +5 -0
- package/dist/features/categories/components/ConcernGrid.d.ts +8 -0
- package/dist/features/categories/components/ConcernGrid.js +8 -0
- package/dist/features/categories/components/index.d.ts +22 -0
- package/dist/features/categories/components/index.js +12 -0
- package/dist/features/categories/hooks/useCategories.d.ts +26 -0
- package/dist/features/categories/hooks/useCategories.js +50 -0
- package/dist/features/categories/hooks/useCategorySelector.d.ts +26 -0
- package/dist/features/categories/hooks/useCategorySelector.js +42 -0
- package/dist/features/categories/index.d.ts +7 -461
- package/dist/features/categories/index.js +7 -2031
- package/dist/features/categories/manifest.d.ts +2 -0
- package/dist/features/categories/manifest.js +20 -0
- package/dist/features/categories/messages/en.json +14 -0
- package/dist/features/categories/repository/categories.repository.d.ts +31 -0
- package/dist/features/categories/repository/categories.repository.js +399 -0
- package/dist/features/categories/schemas/firestore.d.ts +140 -0
- package/dist/features/categories/schemas/firestore.js +189 -0
- package/dist/features/categories/schemas/index.d.ts +207 -0
- package/dist/features/categories/schemas/index.js +67 -0
- package/dist/features/categories/server.d.ts +7 -44
- package/dist/features/categories/server.js +10 -789
- package/dist/features/categories/types/index.d.ts +80 -0
- package/dist/features/categories/types/index.js +13 -0
- package/dist/features/checkout/actions/checkout-actions.d.ts +14 -0
- package/dist/features/checkout/actions/checkout-actions.js +91 -0
- package/dist/features/checkout/actions/index.d.ts +1 -0
- package/dist/features/checkout/actions/index.js +1 -0
- package/dist/features/checkout/components/CheckoutStepper.d.ts +10 -0
- package/dist/features/checkout/components/CheckoutStepper.js +15 -0
- package/dist/features/checkout/components/index.d.ts +1 -0
- package/dist/features/checkout/components/index.js +1 -0
- package/dist/features/checkout/hooks/useCheckout.d.ts +9 -0
- package/dist/features/checkout/hooks/useCheckout.js +24 -0
- package/dist/features/checkout/hooks/useCheckoutApi.d.ts +74 -0
- package/dist/features/checkout/hooks/useCheckoutApi.js +48 -0
- package/dist/features/checkout/hooks/usePaymentCheckout.d.ts +78 -0
- package/dist/features/checkout/hooks/usePaymentCheckout.js +178 -0
- package/dist/features/checkout/index.d.ts +8 -70
- package/dist/features/checkout/index.js +7 -192
- package/dist/features/checkout/manifest.d.ts +2 -0
- package/dist/features/checkout/manifest.js +17 -0
- package/dist/features/checkout/messages/en.json +10 -0
- package/dist/features/checkout/repository/failed-checkout.repository.d.ts +18 -0
- package/dist/features/checkout/repository/failed-checkout.repository.js +29 -0
- package/dist/features/checkout/schemas/firestore.d.ts +33 -0
- package/dist/features/checkout/schemas/firestore.js +6 -0
- package/dist/features/checkout/schemas/index.d.ts +1 -0
- package/dist/features/checkout/schemas/index.js +1 -0
- package/dist/features/checkout/server.d.ts +8 -0
- package/dist/features/checkout/server.js +8 -0
- package/dist/features/checkout/types/index.d.ts +46 -0
- package/dist/features/checkout/types/index.js +2 -0
- package/dist/features/cms/index.d.ts +1 -2
- package/dist/features/cms/index.js +5 -4
- package/dist/features/collections/api/[slug]/route.d.ts +26 -0
- package/dist/features/collections/api/[slug]/route.js +102 -0
- package/dist/features/collections/api/route.d.ts +13 -0
- package/dist/features/collections/api/route.js +79 -0
- package/dist/features/collections/columns/index.d.ts +17 -0
- package/dist/features/collections/columns/index.js +55 -0
- package/dist/features/collections/components/CollectionCard.d.ts +12 -0
- package/dist/features/collections/components/CollectionCard.js +9 -0
- package/dist/features/collections/components/index.d.ts +1 -0
- package/dist/features/collections/components/index.js +1 -0
- package/dist/features/collections/hooks/useCollections.d.ts +7 -0
- package/dist/features/collections/hooks/useCollections.js +34 -0
- package/dist/features/collections/index.d.ts +6 -148
- package/dist/features/collections/index.js +6 -378
- package/dist/features/collections/manifest.d.ts +2 -0
- package/dist/features/collections/manifest.js +16 -0
- package/dist/features/collections/messages/en.json +10 -0
- package/dist/features/collections/repository/collections.repository.d.ts +8 -0
- package/dist/features/collections/repository/collections.repository.js +16 -0
- package/dist/features/collections/schemas/index.d.ts +76 -0
- package/dist/features/collections/schemas/index.js +34 -0
- package/dist/features/collections/server.d.ts +7 -0
- package/dist/features/collections/server.js +7 -0
- package/dist/features/collections/types/index.d.ts +25 -0
- package/dist/features/collections/types/index.js +1 -0
- package/dist/features/consultation/api/[id]/route.d.ts +26 -0
- package/dist/features/consultation/api/[id]/route.js +88 -0
- package/dist/features/consultation/api/route.d.ts +13 -0
- package/dist/features/consultation/api/route.js +79 -0
- package/dist/features/consultation/columns/index.d.ts +17 -0
- package/dist/features/consultation/columns/index.js +54 -0
- package/dist/features/consultation/components/ConsultationForm.d.ts +8 -0
- package/dist/features/consultation/components/ConsultationForm.js +51 -0
- package/dist/features/consultation/components/index.d.ts +1 -0
- package/dist/features/consultation/components/index.js +1 -0
- package/dist/features/consultation/hooks/useBookConsultation.d.ts +8 -0
- package/dist/features/consultation/hooks/useBookConsultation.js +16 -0
- package/dist/features/consultation/index.d.ts +6 -172
- package/dist/features/consultation/index.js +6 -1084
- package/dist/features/consultation/manifest.d.ts +2 -0
- package/dist/features/consultation/manifest.js +12 -0
- package/dist/features/consultation/messages/en.json +25 -0
- package/dist/features/consultation/repository/consultations.repository.d.ts +12 -0
- package/dist/features/consultation/repository/consultations.repository.js +28 -0
- package/dist/features/consultation/schemas/index.d.ts +87 -0
- package/dist/features/consultation/schemas/index.js +47 -0
- package/dist/features/consultation/server.d.ts +7 -0
- package/dist/features/consultation/server.js +7 -0
- package/dist/features/consultation/types/index.d.ts +33 -0
- package/dist/features/consultation/types/index.js +1 -0
- package/dist/features/contact/components/ContactForm.d.ts +32 -0
- package/dist/features/contact/components/ContactForm.js +58 -0
- package/dist/features/contact/components/ContactInfoSidebar.d.ts +20 -0
- package/dist/features/contact/components/ContactInfoSidebar.js +6 -0
- package/dist/features/contact/components/index.d.ts +4 -0
- package/dist/features/contact/components/index.js +2 -0
- package/dist/features/contact/email.d.ts +61 -0
- package/dist/features/contact/email.js +345 -0
- package/dist/features/contact/hooks/useContactSubmit.d.ts +4 -0
- package/dist/features/contact/hooks/useContactSubmit.js +7 -0
- package/dist/features/contact/index.d.ts +2 -56
- package/dist/features/contact/index.js +2 -586
- package/dist/features/contact/server.d.ts +7 -0
- package/dist/features/contact/server.js +7 -0
- package/dist/features/copilot/components/AdminCopilotView.d.ts +21 -0
- package/dist/features/copilot/components/AdminCopilotView.js +29 -0
- package/dist/features/copilot/components/index.d.ts +2 -0
- package/dist/features/copilot/components/index.js +1 -0
- package/dist/features/copilot/hooks/useCopilotChat.d.ts +22 -0
- package/dist/features/copilot/hooks/useCopilotChat.js +57 -0
- package/dist/features/copilot/hooks/useCopilotFeedback.d.ts +15 -0
- package/dist/features/copilot/hooks/useCopilotFeedback.js +16 -0
- package/dist/features/copilot/index.d.ts +3 -47
- package/dist/features/copilot/index.js +3 -681
- package/dist/features/corporate/api/[id]/route.d.ts +26 -0
- package/dist/features/corporate/api/[id]/route.js +88 -0
- package/dist/features/corporate/api/route.d.ts +13 -0
- package/dist/features/corporate/api/route.js +79 -0
- package/dist/features/corporate/columns/index.d.ts +17 -0
- package/dist/features/corporate/columns/index.js +54 -0
- package/dist/features/corporate/components/CorporateInquiryForm.d.ts +7 -0
- package/dist/features/corporate/components/CorporateInquiryForm.js +36 -0
- package/dist/features/corporate/components/index.d.ts +1 -0
- package/dist/features/corporate/components/index.js +1 -0
- package/dist/features/corporate/hooks/useSubmitCorporateInquiry.d.ts +8 -0
- package/dist/features/corporate/hooks/useSubmitCorporateInquiry.js +16 -0
- package/dist/features/corporate/index.d.ts +6 -183
- package/dist/features/corporate/index.js +6 -782
- package/dist/features/corporate/manifest.d.ts +2 -0
- package/dist/features/corporate/manifest.js +12 -0
- package/dist/features/corporate/messages/en.json +26 -0
- package/dist/features/corporate/repository/corporate.repository.d.ts +12 -0
- package/dist/features/corporate/repository/corporate.repository.js +28 -0
- package/dist/features/corporate/schemas/index.d.ts +95 -0
- package/dist/features/corporate/schemas/index.js +50 -0
- package/dist/features/corporate/server.d.ts +7 -0
- package/dist/features/corporate/server.js +7 -0
- package/dist/features/corporate/types/index.d.ts +37 -0
- package/dist/features/corporate/types/index.js +1 -0
- package/dist/features/cron/firebase-adapters.d.ts +70 -0
- package/dist/features/cron/firebase-adapters.js +68 -0
- package/dist/features/cron/index.d.ts +5 -0
- package/dist/features/cron/index.js +7 -0
- package/dist/features/cron/jobs/auction-expiry.job.d.ts +27 -0
- package/dist/features/cron/jobs/auction-expiry.job.js +38 -0
- package/dist/features/cron/jobs/preorder-reminder.job.d.ts +14 -0
- package/dist/features/cron/jobs/preorder-reminder.job.js +40 -0
- package/dist/features/cron/registry.d.ts +45 -0
- package/dist/features/cron/registry.js +86 -0
- package/dist/features/cron/types.d.ts +66 -0
- package/dist/features/cron/types.js +9 -0
- package/dist/features/events/actions/event-actions.d.ts +92 -0
- package/dist/features/events/actions/event-actions.js +253 -0
- package/dist/features/events/actions/index.d.ts +1 -0
- package/dist/features/events/actions/index.js +1 -0
- package/dist/features/events/api/[id]/route.d.ts +24 -0
- package/dist/features/events/api/[id]/route.js +83 -0
- package/dist/features/events/api/route.d.ts +12 -0
- package/dist/features/events/api/route.js +88 -0
- package/dist/features/events/columns/index.d.ts +22 -0
- package/dist/features/events/columns/index.js +41 -0
- package/dist/features/events/components/AdminEventEntriesView.d.ts +17 -0
- package/dist/features/events/components/AdminEventEntriesView.js +10 -0
- package/dist/features/events/components/AdminEventsView.d.ts +11 -0
- package/dist/features/events/components/AdminEventsView.js +5 -0
- package/dist/features/events/components/EventBanner.d.ts +13 -0
- package/dist/features/events/components/EventBanner.js +48 -0
- package/dist/features/events/components/EventCard.d.ts +13 -0
- package/dist/features/events/components/EventCard.js +21 -0
- package/dist/features/events/components/EventDetailView.d.ts +15 -0
- package/dist/features/events/components/EventDetailView.js +11 -0
- package/dist/features/events/components/EventFilters.d.ts +105 -0
- package/dist/features/events/components/EventFilters.js +73 -0
- package/dist/features/events/components/EventFormDrawer.d.ts +22 -0
- package/dist/features/events/components/EventFormDrawer.js +6 -0
- package/dist/features/events/components/EventLeaderboard.d.ts +23 -0
- package/dist/features/events/components/EventLeaderboard.js +18 -0
- package/dist/features/events/components/EventParticipateView.d.ts +19 -0
- package/dist/features/events/components/EventParticipateView.js +13 -0
- package/dist/features/events/components/EventStatusBadge.d.ts +7 -0
- package/dist/features/events/components/EventStatusBadge.js +12 -0
- package/dist/features/events/components/EventsListView.d.ts +16 -0
- package/dist/features/events/components/EventsListView.js +21 -0
- package/dist/features/events/components/index.d.ts +19 -0
- package/dist/features/events/components/index.js +11 -0
- package/dist/features/events/hooks/useBulkEvent.d.ts +19 -0
- package/dist/features/events/hooks/useBulkEvent.js +36 -0
- package/dist/features/events/hooks/useEvent.d.ts +43 -0
- package/dist/features/events/hooks/useEvent.js +55 -0
- package/dist/features/events/hooks/useEvents.d.ts +27 -0
- package/dist/features/events/hooks/useEvents.js +38 -0
- package/dist/features/events/index.d.ts +8 -841
- package/dist/features/events/index.js +8 -1453
- package/dist/features/events/manifest.d.ts +2 -0
- package/dist/features/events/manifest.js +24 -0
- package/dist/features/events/messages/en.json +28 -0
- package/dist/features/events/repository/event-entry.repository.d.ts +17 -0
- package/dist/features/events/repository/event-entry.repository.js +115 -0
- package/dist/features/events/repository/events.repository.d.ts +18 -0
- package/dist/features/events/repository/events.repository.js +128 -0
- package/dist/features/events/schemas/firestore.d.ts +115 -0
- package/dist/features/events/schemas/firestore.js +77 -0
- package/dist/features/events/schemas/index.d.ts +383 -0
- package/dist/features/events/schemas/index.js +87 -0
- package/dist/features/events/server.d.ts +8 -37
- package/dist/features/events/server.js +11 -195
- package/dist/features/events/types/index.d.ts +133 -0
- package/dist/features/events/types/index.js +1 -0
- package/dist/features/faq/actions/faq-actions.d.ts +191 -0
- package/dist/features/faq/actions/faq-actions.js +103 -0
- package/dist/features/faq/actions/index.d.ts +1 -0
- package/dist/features/faq/actions/index.js +1 -0
- package/dist/features/faq/api/route.d.ts +11 -0
- package/dist/features/faq/api/route.js +50 -0
- package/dist/features/faq/columns/index.d.ts +15 -0
- package/dist/features/faq/columns/index.js +47 -0
- package/dist/features/faq/components/ContactCTA.d.ts +16 -0
- package/dist/features/faq/components/ContactCTA.js +6 -0
- package/dist/features/faq/components/FAQAccordion.d.ts +20 -0
- package/dist/features/faq/components/FAQAccordion.js +17 -0
- package/dist/features/faq/components/FAQCategorySidebar.d.ts +24 -0
- package/dist/features/faq/components/FAQCategorySidebar.js +15 -0
- package/dist/features/faq/components/FAQHelpfulButtons.d.ts +19 -0
- package/dist/features/faq/components/FAQHelpfulButtons.js +46 -0
- package/dist/features/faq/components/FAQPageContent.d.ts +54 -0
- package/dist/features/faq/components/FAQPageContent.js +67 -0
- package/dist/features/faq/components/FAQSortDropdown.d.ts +13 -0
- package/dist/features/faq/components/FAQSortDropdown.js +11 -0
- package/dist/features/faq/components/RelatedFAQs.d.ts +10 -0
- package/dist/features/faq/components/RelatedFAQs.js +9 -0
- package/dist/features/faq/components/index.d.ts +9 -0
- package/dist/features/faq/components/index.js +7 -0
- package/dist/features/faq/hooks/useFAQs.d.ts +22 -0
- package/dist/features/faq/hooks/useFAQs.js +42 -0
- package/dist/features/faq/hooks/useFaqList.d.ts +194 -0
- package/dist/features/faq/hooks/useFaqList.js +35 -0
- package/dist/features/faq/hooks/useFaqVote.d.ts +14 -0
- package/dist/features/faq/hooks/useFaqVote.js +10 -0
- package/dist/features/faq/index.d.ts +8 -619
- package/dist/features/faq/index.js +8 -1685
- package/dist/features/faq/manifest.d.ts +2 -0
- package/dist/features/faq/manifest.js +10 -0
- package/dist/features/faq/messages/en.json +14 -0
- package/dist/features/faq/repository/faqs.repository.d.ts +43 -0
- package/dist/features/faq/repository/faqs.repository.js +300 -0
- package/dist/features/faq/schemas/firestore.d.ts +63 -0
- package/dist/features/faq/schemas/firestore.js +115 -0
- package/dist/features/faq/schemas/index.d.ts +157 -0
- package/dist/features/faq/schemas/index.js +62 -0
- package/dist/features/faq/server.d.ts +9 -0
- package/dist/features/faq/server.js +9 -0
- package/dist/features/faq/types/index.d.ts +52 -0
- package/dist/features/faq/types/index.js +1 -0
- package/dist/features/filters/FilterFacetSection.d.ts +23 -0
- package/dist/features/filters/FilterFacetSection.js +39 -0
- package/dist/features/filters/FilterPanel.d.ts +61 -0
- package/dist/features/filters/FilterPanel.js +40 -0
- package/dist/features/filters/RangeFilter.d.ts +23 -0
- package/dist/features/filters/RangeFilter.js +28 -0
- package/dist/features/filters/SwitchFilter.d.ts +12 -0
- package/dist/features/filters/SwitchFilter.js +19 -0
- package/dist/features/filters/filterUtils.d.ts +11 -0
- package/dist/features/filters/filterUtils.js +13 -0
- package/dist/features/filters/index.d.ts +10 -136
- package/dist/features/filters/index.js +6 -1061
- package/dist/features/forms/Checkbox.d.ts +8 -0
- package/dist/features/forms/Checkbox.js +15 -0
- package/dist/features/forms/Form.d.ts +25 -0
- package/dist/features/forms/Form.js +38 -0
- package/dist/features/forms/Input.d.ts +10 -0
- package/dist/features/forms/Input.js +23 -0
- package/dist/features/forms/Radio.d.ts +17 -0
- package/dist/features/forms/Radio.js +19 -0
- package/dist/features/forms/Select.d.ts +13 -0
- package/dist/features/forms/Select.js +8 -0
- package/dist/features/forms/Slider.d.ts +20 -0
- package/dist/features/forms/Slider.js +22 -0
- package/dist/features/forms/Textarea.d.ts +8 -0
- package/dist/features/forms/Textarea.js +15 -0
- package/dist/features/forms/Toggle.d.ts +15 -0
- package/dist/features/forms/Toggle.js +48 -0
- package/dist/features/forms/index.d.ts +17 -129
- package/dist/features/forms/index.js +11 -915
- package/dist/features/forms/utils.d.ts +10 -0
- package/dist/features/forms/utils.js +13 -0
- package/dist/features/homepage/actions/carousel-actions.d.ts +37 -0
- package/dist/features/homepage/actions/carousel-actions.js +54 -0
- package/dist/features/homepage/actions/homepage-section-actions.d.ts +46 -0
- package/dist/features/homepage/actions/homepage-section-actions.js +55 -0
- package/dist/features/homepage/actions/index.d.ts +2 -0
- package/dist/features/homepage/actions/index.js +2 -0
- package/dist/features/homepage/api/[id]/route.d.ts +23 -0
- package/dist/features/homepage/api/[id]/route.js +100 -0
- package/dist/features/homepage/api/carousel/[id]/route.d.ts +23 -0
- package/dist/features/homepage/api/carousel/[id]/route.js +122 -0
- package/dist/features/homepage/api/carousel/route.d.ts +15 -0
- package/dist/features/homepage/api/carousel/route.js +154 -0
- package/dist/features/homepage/api/route.d.ts +14 -0
- package/dist/features/homepage/api/route.js +136 -0
- package/dist/features/homepage/api/sections/[id]/route.d.ts +26 -0
- package/dist/features/homepage/api/sections/[id]/route.js +88 -0
- package/dist/features/homepage/api/sections/route.d.ts +13 -0
- package/dist/features/homepage/api/sections/route.js +79 -0
- package/dist/features/homepage/components/AdvertisementBanner.d.ts +13 -0
- package/dist/features/homepage/components/AdvertisementBanner.js +23 -0
- package/dist/features/homepage/components/BeforeAfterCard.d.ts +10 -0
- package/dist/features/homepage/components/BeforeAfterCard.js +54 -0
- package/dist/features/homepage/components/CharacterHotspot.d.ts +24 -0
- package/dist/features/homepage/components/CharacterHotspot.js +373 -0
- package/dist/features/homepage/components/CharacterHotspotForm.d.ts +26 -0
- package/dist/features/homepage/components/CharacterHotspotForm.js +309 -0
- package/dist/features/homepage/components/CustomerReviewsSection.d.ts +13 -0
- package/dist/features/homepage/components/CustomerReviewsSection.js +14 -0
- package/dist/features/homepage/components/FAQSection.d.ts +26 -0
- package/dist/features/homepage/components/FAQSection.js +20 -0
- package/dist/features/homepage/components/FeaturedResultsSection.d.ts +17 -0
- package/dist/features/homepage/components/FeaturedResultsSection.js +18 -0
- package/dist/features/homepage/components/HeroBanner.d.ts +7 -0
- package/dist/features/homepage/components/HeroBanner.js +93 -0
- package/dist/features/homepage/components/HeroCarousel.d.ts +12 -0
- package/dist/features/homepage/components/HeroCarousel.js +157 -0
- package/dist/features/homepage/components/HeroSection.d.ts +7 -0
- package/dist/features/homepage/components/HeroSection.js +12 -0
- package/dist/features/homepage/components/HomepageSkeleton.d.ts +2 -0
- package/dist/features/homepage/components/HomepageSkeleton.js +14 -0
- package/dist/features/homepage/components/HomepageView.d.ts +25 -0
- package/dist/features/homepage/components/HomepageView.js +5 -0
- package/dist/features/homepage/components/HowItWorksInfoView.d.ts +36 -0
- package/dist/features/homepage/components/HowItWorksInfoView.js +8 -0
- package/dist/features/homepage/components/HowItWorksSection.d.ts +23 -0
- package/dist/features/homepage/components/HowItWorksSection.js +36 -0
- package/dist/features/homepage/components/NewsletterBanner.d.ts +22 -0
- package/dist/features/homepage/components/NewsletterBanner.js +34 -0
- package/dist/features/homepage/components/NewsletterSection.d.ts +10 -0
- package/dist/features/homepage/components/NewsletterSection.js +8 -0
- package/dist/features/homepage/components/PromoGrid.d.ts +9 -0
- package/dist/features/homepage/components/PromoGrid.js +35 -0
- package/dist/features/homepage/components/SectionCarousel.d.ts +75 -0
- package/dist/features/homepage/components/SectionCarousel.js +39 -0
- package/dist/features/homepage/components/SecurityHighlightsSection.d.ts +21 -0
- package/dist/features/homepage/components/SecurityHighlightsSection.js +36 -0
- package/dist/features/homepage/components/SiteFeaturesSection.d.ts +13 -0
- package/dist/features/homepage/components/SiteFeaturesSection.js +9 -0
- package/dist/features/homepage/components/StatsCounterSection.d.ts +14 -0
- package/dist/features/homepage/components/StatsCounterSection.js +32 -0
- package/dist/features/homepage/components/TestimonialsCarousel.d.ts +9 -0
- package/dist/features/homepage/components/TestimonialsCarousel.js +30 -0
- package/dist/features/homepage/components/TrustBadges.d.ts +5 -0
- package/dist/features/homepage/components/TrustBadges.js +54 -0
- package/dist/features/homepage/components/TrustFeaturesSection.d.ts +16 -0
- package/dist/features/homepage/components/TrustFeaturesSection.js +41 -0
- package/dist/features/homepage/components/TrustIndicatorsSection.d.ts +11 -0
- package/dist/features/homepage/components/TrustIndicatorsSection.js +9 -0
- package/dist/features/homepage/components/WelcomeSection.d.ts +20 -0
- package/dist/features/homepage/components/WelcomeSection.js +12 -0
- package/dist/features/homepage/components/WhatsAppCommunitySection.d.ts +15 -0
- package/dist/features/homepage/components/WhatsAppCommunitySection.js +21 -0
- package/dist/features/homepage/components/index.d.ts +52 -0
- package/dist/features/homepage/components/index.js +27 -0
- package/dist/features/homepage/hooks/useBlogArticles.d.ts +12 -0
- package/dist/features/homepage/hooks/useBlogArticles.js +31 -0
- package/dist/features/homepage/hooks/useFeaturedAuctions.d.ts +2 -0
- package/dist/features/homepage/hooks/useFeaturedAuctions.js +26 -0
- package/dist/features/homepage/hooks/useFeaturedPreOrders.d.ts +2 -0
- package/dist/features/homepage/hooks/useFeaturedPreOrders.js +26 -0
- package/dist/features/homepage/hooks/useFeaturedProducts.d.ts +4 -0
- package/dist/features/homepage/hooks/useFeaturedProducts.js +32 -0
- package/dist/features/homepage/hooks/useHeroCarousel.d.ts +9 -0
- package/dist/features/homepage/hooks/useHeroCarousel.js +17 -0
- package/dist/features/homepage/hooks/useHomepage.d.ts +11 -0
- package/dist/features/homepage/hooks/useHomepage.js +18 -0
- package/dist/features/homepage/hooks/useHomepageReviews.d.ts +7 -0
- package/dist/features/homepage/hooks/useHomepageReviews.js +16 -0
- package/dist/features/homepage/hooks/useHomepageSections.d.ts +2 -0
- package/dist/features/homepage/hooks/useHomepageSections.js +11 -0
- package/dist/features/homepage/hooks/useNewsletter.d.ts +14 -0
- package/dist/features/homepage/hooks/useNewsletter.js +10 -0
- package/dist/features/homepage/hooks/useTopBrands.d.ts +2 -0
- package/dist/features/homepage/hooks/useTopBrands.js +12 -0
- package/dist/features/homepage/hooks/useTopCategories.d.ts +4 -0
- package/dist/features/homepage/hooks/useTopCategories.js +13 -0
- package/dist/features/homepage/index.d.ts +13 -846
- package/dist/features/homepage/index.js +13 -6279
- package/dist/features/homepage/manifest.d.ts +2 -0
- package/dist/features/homepage/manifest.js +14 -0
- package/dist/features/homepage/messages/en.json +6 -0
- package/dist/features/homepage/repository/carousel.repository.d.ts +101 -0
- package/dist/features/homepage/repository/carousel.repository.js +252 -0
- package/dist/features/homepage/repository/homepage-sections.repository.d.ts +27 -0
- package/dist/features/homepage/repository/homepage-sections.repository.js +174 -0
- package/dist/features/homepage/repository/homepage.repository.d.ts +11 -0
- package/dist/features/homepage/repository/homepage.repository.js +25 -0
- package/dist/features/homepage/schemas/firestore.d.ts +251 -0
- package/dist/features/homepage/schemas/firestore.js +83 -0
- package/dist/features/homepage/schemas/index.d.ts +1 -0
- package/dist/features/homepage/schemas/index.js +1 -0
- package/dist/features/homepage/server.d.ts +10 -121
- package/dist/features/homepage/server.js +10 -1024
- package/dist/features/homepage/types/index.d.ts +163 -0
- package/dist/features/homepage/types/index.js +1 -0
- package/dist/features/layout/AutoBreadcrumbs.d.ts +15 -0
- package/dist/features/layout/AutoBreadcrumbs.js +84 -0
- package/dist/features/layout/BackToTop.d.ts +16 -0
- package/dist/features/layout/BackToTop.js +26 -0
- package/dist/features/layout/BottomActions.d.ts +1 -0
- package/dist/features/layout/BottomActions.js +153 -0
- package/dist/features/layout/BottomActionsContext.d.ts +107 -0
- package/dist/features/layout/BottomActionsContext.js +114 -0
- package/dist/features/layout/BottomNavItem.d.ts +28 -0
- package/dist/features/layout/BottomNavItem.js +28 -0
- package/dist/features/layout/BottomNavLayout.d.ts +14 -0
- package/dist/features/layout/BottomNavLayout.js +12 -0
- package/dist/features/layout/BottomNavbar.d.ts +46 -0
- package/dist/features/layout/BottomNavbar.js +19 -0
- package/dist/features/layout/BottomSheet.d.ts +29 -0
- package/dist/features/layout/BottomSheet.js +40 -0
- package/dist/features/layout/Breadcrumbs.d.ts +26 -0
- package/dist/features/layout/Breadcrumbs.js +25 -0
- package/dist/features/layout/DashboardNavContext.d.ts +19 -0
- package/dist/features/layout/DashboardNavContext.js +36 -0
- package/dist/features/layout/FooterLayout.d.ts +39 -0
- package/dist/features/layout/FooterLayout.js +12 -0
- package/dist/features/layout/LayoutClient.d.ts +11 -0
- package/dist/features/layout/LayoutClient.js +7 -0
- package/dist/features/layout/ListingLayout.d.ts +35 -0
- package/dist/features/layout/ListingLayout.js +104 -0
- package/dist/features/layout/LocaleSwitcher.d.ts +22 -0
- package/dist/features/layout/LocaleSwitcher.js +12 -0
- package/dist/features/layout/MainNavbar.d.ts +32 -0
- package/dist/features/layout/MainNavbar.js +29 -0
- package/dist/features/layout/NavItem.d.ts +19 -0
- package/dist/features/layout/NavItem.js +35 -0
- package/dist/features/layout/NavbarLayout.d.ts +27 -0
- package/dist/features/layout/NavbarLayout.js +23 -0
- package/dist/features/layout/SidebarLayout.d.ts +24 -0
- package/dist/features/layout/SidebarLayout.js +29 -0
- package/dist/features/layout/TitleBar.d.ts +18 -0
- package/dist/features/layout/TitleBar.js +19 -0
- package/dist/features/layout/TitleBarLayout.d.ts +48 -0
- package/dist/features/layout/TitleBarLayout.js +17 -0
- package/dist/features/layout/hooks/useBottomActions.d.ts +7 -0
- package/dist/features/layout/hooks/useBottomActions.js +28 -0
- package/dist/features/layout/index.d.ts +41 -315
- package/dist/features/layout/index.js +23 -1745
- package/dist/features/loyalty/api/admin/loyalty/grant/route.d.ts +12 -0
- package/dist/features/loyalty/api/admin/loyalty/grant/route.js +36 -0
- package/dist/features/loyalty/api/balance/route.d.ts +12 -0
- package/dist/features/loyalty/api/balance/route.js +39 -0
- package/dist/features/loyalty/api/earn/route.d.ts +12 -0
- package/dist/features/loyalty/api/earn/route.js +36 -0
- package/dist/features/loyalty/api/history/route.d.ts +12 -0
- package/dist/features/loyalty/api/history/route.js +56 -0
- package/dist/features/loyalty/api/redeem/route.d.ts +12 -0
- package/dist/features/loyalty/api/redeem/route.js +36 -0
- package/dist/features/loyalty/columns/index.d.ts +17 -0
- package/dist/features/loyalty/columns/index.js +40 -0
- package/dist/features/loyalty/components/CoinsDisplay.d.ts +11 -0
- package/dist/features/loyalty/components/CoinsDisplay.js +9 -0
- package/dist/features/loyalty/components/index.d.ts +1 -0
- package/dist/features/loyalty/components/index.js +1 -0
- package/dist/features/loyalty/hooks/useLoyaltyBalance.d.ts +4 -0
- package/dist/features/loyalty/hooks/useLoyaltyBalance.js +18 -0
- package/dist/features/loyalty/index.d.ts +6 -174
- package/dist/features/loyalty/index.js +6 -332
- package/dist/features/loyalty/manifest.d.ts +2 -0
- package/dist/features/loyalty/manifest.js +16 -0
- package/dist/features/loyalty/messages/en.json +19 -0
- package/dist/features/loyalty/repository/loyalty.repository.d.ts +8 -0
- package/dist/features/loyalty/repository/loyalty.repository.js +22 -0
- package/dist/features/loyalty/schemas/index.d.ts +85 -0
- package/dist/features/loyalty/schemas/index.js +40 -0
- package/dist/features/loyalty/server.d.ts +7 -0
- package/dist/features/loyalty/server.js +7 -0
- package/dist/features/loyalty/types/index.d.ts +31 -0
- package/dist/features/loyalty/types/index.js +1 -0
- package/dist/features/loyalty/types/loyalty-config.d.ts +7 -0
- package/dist/features/loyalty/types/loyalty-config.js +1 -0
- package/dist/features/loyalty/types/loyalty-math.d.ts +9 -0
- package/dist/features/loyalty/types/loyalty-math.js +27 -0
- package/dist/features/media/AvatarUpload.d.ts +22 -0
- package/dist/features/media/AvatarUpload.js +133 -0
- package/dist/features/media/MediaAvatar.d.ts +12 -0
- package/dist/features/media/MediaAvatar.js +13 -0
- package/dist/features/media/MediaImage.d.ts +28 -0
- package/dist/features/media/MediaImage.js +35 -0
- package/dist/features/media/MediaLightbox.d.ts +32 -0
- package/dist/features/media/MediaLightbox.js +245 -0
- package/dist/features/media/MediaVideo.d.ts +22 -0
- package/dist/features/media/MediaVideo.js +38 -0
- package/dist/features/media/components/MediaSlider.d.ts +10 -0
- package/dist/features/media/components/MediaSlider.js +12 -0
- package/dist/features/media/finalize.d.ts +11 -0
- package/dist/features/media/finalize.js +70 -0
- package/dist/features/media/hooks/useMedia.d.ts +198 -0
- package/dist/features/media/hooks/useMedia.js +78 -0
- package/dist/features/media/index.d.ts +30 -425
- package/dist/features/media/index.js +21 -3593
- package/dist/features/media/messages/en.json +63 -0
- package/dist/features/media/modals/ImageCropModal.d.ts +16 -0
- package/dist/features/media/modals/ImageCropModal.js +99 -0
- package/dist/features/media/modals/VideoThumbnailSelector.d.ts +10 -0
- package/dist/features/media/modals/VideoThumbnailSelector.js +51 -0
- package/dist/features/media/modals/VideoTrimModal.d.ts +11 -0
- package/dist/features/media/modals/VideoTrimModal.js +73 -0
- package/dist/features/media/server.d.ts +2 -0
- package/dist/features/media/server.js +2 -0
- package/dist/features/media/types/index.d.ts +29 -0
- package/dist/features/media/types/index.js +43 -0
- package/dist/features/media/upload/CameraCapture.d.ts +8 -0
- package/dist/features/media/upload/CameraCapture.js +59 -0
- package/dist/features/media/upload/ImageUpload.d.ts +14 -0
- package/dist/features/media/upload/ImageUpload.js +132 -0
- package/dist/features/media/upload/MediaUploadField.d.ts +31 -0
- package/dist/features/media/upload/MediaUploadField.js +204 -0
- package/dist/features/media/upload/MediaUploadList.d.ts +26 -0
- package/dist/features/media/upload/MediaUploadList.js +104 -0
- package/dist/features/orders/actions/index.d.ts +2 -0
- package/dist/features/orders/actions/index.js +2 -0
- package/dist/features/orders/actions/order-actions.d.ts +16 -0
- package/dist/features/orders/actions/order-actions.js +46 -0
- package/dist/features/orders/actions/refund-actions.d.ts +16 -0
- package/dist/features/orders/actions/refund-actions.js +88 -0
- package/dist/features/orders/api/track/[trackingId]/route.d.ts +17 -0
- package/dist/features/orders/api/track/[trackingId]/route.js +30 -0
- package/dist/features/orders/columns/index.d.ts +15 -0
- package/dist/features/orders/columns/index.js +34 -0
- package/dist/features/orders/components/MarketplaceOrderCard.d.ts +37 -0
- package/dist/features/orders/components/MarketplaceOrderCard.js +52 -0
- package/dist/features/orders/components/OrderFilters.d.ts +82 -0
- package/dist/features/orders/components/OrderFilters.js +106 -0
- package/dist/features/orders/components/OrdersList.d.ts +18 -0
- package/dist/features/orders/components/OrdersList.js +37 -0
- package/dist/features/orders/components/index.d.ts +4 -0
- package/dist/features/orders/components/index.js +3 -0
- package/dist/features/orders/hooks/useOrders.d.ts +32 -0
- package/dist/features/orders/hooks/useOrders.js +57 -0
- package/dist/features/orders/index.d.ts +7 -370
- package/dist/features/orders/index.js +7 -863
- package/dist/features/orders/manifest.d.ts +2 -0
- package/dist/features/orders/manifest.js +18 -0
- package/dist/features/orders/messages/en.json +15 -0
- package/dist/features/orders/repository/orders.repository.d.ts +188 -0
- package/dist/features/orders/repository/orders.repository.js +300 -0
- package/dist/features/orders/schemas/firestore.d.ts +129 -0
- package/dist/features/orders/schemas/firestore.js +96 -0
- package/dist/features/orders/schemas/index.d.ts +217 -0
- package/dist/features/orders/schemas/index.js +76 -0
- package/dist/features/orders/server.d.ts +9 -0
- package/dist/features/orders/server.js +10 -0
- package/dist/features/orders/types/index.d.ts +69 -0
- package/dist/features/orders/types/index.js +2 -0
- package/dist/features/orders/utils/order-splitter.d.ts +14 -0
- package/dist/features/orders/utils/order-splitter.js +29 -0
- package/dist/features/payments/columns/index.d.ts +17 -0
- package/dist/features/payments/columns/index.js +45 -0
- package/dist/features/payments/hooks/usePaymentEvent.d.ts +17 -0
- package/dist/features/payments/hooks/usePaymentEvent.js +26 -0
- package/dist/features/payments/hooks/usePayments.d.ts +10 -0
- package/dist/features/payments/hooks/usePayments.js +19 -0
- package/dist/features/payments/index.d.ts +6 -141
- package/dist/features/payments/index.js +6 -331
- package/dist/features/payments/manifest.d.ts +2 -0
- package/dist/features/payments/manifest.js +12 -0
- package/dist/features/payments/messages/en.json +11 -0
- package/dist/features/payments/repository/payments.repository.d.ts +15 -0
- package/dist/features/payments/repository/payments.repository.js +36 -0
- package/dist/features/payments/repository/payout.repository.d.ts +111 -0
- package/dist/features/payments/repository/payout.repository.js +202 -0
- package/dist/features/payments/schemas/firestore.d.ts +74 -0
- package/dist/features/payments/schemas/firestore.js +65 -0
- package/dist/features/payments/schemas/index.d.ts +77 -0
- package/dist/features/payments/schemas/index.js +67 -0
- package/dist/features/payments/server.d.ts +8 -0
- package/dist/features/payments/server.js +8 -0
- package/dist/features/payments/types/index.d.ts +36 -0
- package/dist/features/payments/types/index.js +2 -0
- package/dist/features/pre-orders/api/[id]/route.d.ts +26 -0
- package/dist/features/pre-orders/api/[id]/route.js +88 -0
- package/dist/features/pre-orders/api/[slug]/route.d.ts +16 -0
- package/dist/features/pre-orders/api/[slug]/route.js +41 -0
- package/dist/features/pre-orders/api/admin/[id]/route.d.ts +21 -0
- package/dist/features/pre-orders/api/admin/[id]/route.js +65 -0
- package/dist/features/pre-orders/api/admin/route.d.ts +12 -0
- package/dist/features/pre-orders/api/admin/route.js +56 -0
- package/dist/features/pre-orders/api/route.d.ts +13 -0
- package/dist/features/pre-orders/api/route.js +77 -0
- package/dist/features/pre-orders/columns/index.d.ts +17 -0
- package/dist/features/pre-orders/columns/index.js +68 -0
- package/dist/features/pre-orders/components/MarketplacePreorderCard.d.ts +24 -0
- package/dist/features/pre-orders/components/MarketplacePreorderCard.js +53 -0
- package/dist/features/pre-orders/components/PreOrderBadge.d.ts +14 -0
- package/dist/features/pre-orders/components/PreOrderBadge.js +17 -0
- package/dist/features/pre-orders/components/PreorderCard.d.ts +12 -0
- package/dist/features/pre-orders/components/PreorderCard.js +27 -0
- package/dist/features/pre-orders/components/index.d.ts +2 -0
- package/dist/features/pre-orders/components/index.js +2 -0
- package/dist/features/pre-orders/hooks/usePreOrders.d.ts +7 -0
- package/dist/features/pre-orders/hooks/usePreOrders.js +34 -0
- package/dist/features/pre-orders/index.d.ts +6 -170
- package/dist/features/pre-orders/index.js +6 -538
- package/dist/features/pre-orders/manifest.d.ts +2 -0
- package/dist/features/pre-orders/manifest.js +17 -0
- package/dist/features/pre-orders/messages/en.json +13 -0
- package/dist/features/pre-orders/repository/pre-orders.repository.d.ts +14 -0
- package/dist/features/pre-orders/repository/pre-orders.repository.js +44 -0
- package/dist/features/pre-orders/repository/preorders.repository.d.ts +8 -0
- package/dist/features/pre-orders/repository/preorders.repository.js +21 -0
- package/dist/features/pre-orders/schemas/index.d.ts +79 -0
- package/dist/features/pre-orders/schemas/index.js +27 -0
- package/dist/features/pre-orders/server.d.ts +5 -14
- package/dist/features/pre-orders/server.js +8 -106
- package/dist/features/pre-orders/types/index.d.ts +29 -0
- package/dist/features/pre-orders/types/index.js +12 -0
- package/dist/features/products/actions/index.d.ts +1 -0
- package/dist/features/products/actions/index.js +1 -0
- package/dist/features/products/actions/product-actions.d.ts +26 -0
- package/dist/features/products/actions/product-actions.js +111 -0
- package/dist/features/products/api/[id]/route.d.ts +29 -0
- package/dist/features/products/api/[id]/route.js +137 -0
- package/dist/features/products/api/route.d.ts +19 -0
- package/dist/features/products/api/route.js +214 -0
- package/dist/features/products/columns/index.d.ts +64 -0
- package/dist/features/products/columns/index.js +85 -0
- package/dist/features/products/columns/productTableColumns.d.ts +27 -0
- package/dist/features/products/columns/productTableColumns.js +88 -0
- package/dist/features/products/components/AuctionDetailView.d.ts +13 -0
- package/dist/features/products/components/AuctionDetailView.js +9 -0
- package/dist/features/products/components/AuctionsView.d.ts +6 -0
- package/dist/features/products/components/AuctionsView.js +5 -0
- package/dist/features/products/components/BidHistory.d.ts +28 -0
- package/dist/features/products/components/BidHistory.js +18 -0
- package/dist/features/products/components/BuyBar.d.ts +21 -0
- package/dist/features/products/components/BuyBar.js +20 -0
- package/dist/features/products/components/InteractiveProductCard.d.ts +19 -0
- package/dist/features/products/components/InteractiveProductCard.js +18 -0
- package/dist/features/products/components/MakeOfferForm.d.ts +20 -0
- package/dist/features/products/components/MakeOfferForm.js +8 -0
- package/dist/features/products/components/PlaceBidForm.d.ts +20 -0
- package/dist/features/products/components/PlaceBidForm.js +6 -0
- package/dist/features/products/components/PreOrderDetailView.d.ts +14 -0
- package/dist/features/products/components/PreOrderDetailView.js +9 -0
- package/dist/features/products/components/PreOrdersView.d.ts +6 -0
- package/dist/features/products/components/PreOrdersView.js +5 -0
- package/dist/features/products/components/ProductDetailView.d.ts +11 -0
- package/dist/features/products/components/ProductDetailView.js +9 -0
- package/dist/features/products/components/ProductFeatureBadges.d.ts +32 -0
- package/dist/features/products/components/ProductFeatureBadges.js +103 -0
- package/dist/features/products/components/ProductFilters.d.ts +90 -0
- package/dist/features/products/components/ProductFilters.js +105 -0
- package/dist/features/products/components/ProductForm.d.ts +47 -0
- package/dist/features/products/components/ProductForm.js +120 -0
- package/dist/features/products/components/ProductGrid.d.ts +69 -0
- package/dist/features/products/components/ProductGrid.js +92 -0
- package/dist/features/products/components/ProductInfo.d.ts +20 -0
- package/dist/features/products/components/ProductInfo.js +4 -0
- package/dist/features/products/components/ProductTabs.d.ts +21 -0
- package/dist/features/products/components/ProductTabs.js +22 -0
- package/dist/features/products/components/ProductsView.d.ts +6 -0
- package/dist/features/products/components/ProductsView.js +5 -0
- package/dist/features/products/components/RelatedProducts.d.ts +16 -0
- package/dist/features/products/components/RelatedProducts.js +12 -0
- package/dist/features/products/components/index.d.ts +34 -0
- package/dist/features/products/components/index.js +18 -0
- package/dist/features/products/hooks/useBrands.d.ts +9 -0
- package/dist/features/products/hooks/useBrands.js +15 -0
- package/dist/features/products/hooks/useProductDetail.d.ts +15 -0
- package/dist/features/products/hooks/useProductDetail.js +29 -0
- package/dist/features/products/hooks/useProducts.d.ts +43 -0
- package/dist/features/products/hooks/useProducts.js +67 -0
- package/dist/features/products/hooks/useRelatedProducts.d.ts +2 -0
- package/dist/features/products/hooks/useRelatedProducts.js +17 -0
- package/dist/features/products/index.d.ts +10 -1066
- package/dist/features/products/index.js +10 -2475
- package/dist/features/products/manifest.d.ts +2 -0
- package/dist/features/products/manifest.js +16 -0
- package/dist/features/products/messages/en.json +11 -0
- package/dist/features/products/repository/products.repository.d.ts +213 -0
- package/dist/features/products/repository/products.repository.js +300 -0
- package/dist/features/products/schemas/firestore.d.ts +125 -0
- package/dist/features/products/schemas/firestore.js +149 -0
- package/dist/features/products/schemas/index.d.ts +400 -0
- package/dist/features/products/schemas/index.js +173 -0
- package/dist/features/products/server.d.ts +7 -49
- package/dist/features/products/server.js +10 -803
- package/dist/features/products/types/index.d.ts +122 -0
- package/dist/features/products/types/index.js +1 -0
- package/dist/features/products/utils/listing-type.d.ts +2 -0
- package/dist/features/products/utils/listing-type.js +9 -0
- package/dist/features/promotions/actions/coupon-actions.d.ts +28 -0
- package/dist/features/promotions/actions/coupon-actions.js +23 -0
- package/dist/features/promotions/actions/index.d.ts +3 -0
- package/dist/features/promotions/actions/index.js +3 -0
- package/dist/features/promotions/actions/promotions-actions.d.ts +18 -0
- package/dist/features/promotions/actions/promotions-actions.js +37 -0
- package/dist/features/promotions/actions/seller-coupon-actions.d.ts +41 -0
- package/dist/features/promotions/actions/seller-coupon-actions.js +92 -0
- package/dist/features/promotions/api/route.d.ts +21 -0
- package/dist/features/promotions/api/route.js +85 -0
- package/dist/features/promotions/columns/index.d.ts +12 -0
- package/dist/features/promotions/columns/index.js +45 -0
- package/dist/features/promotions/components/CouponCard.d.ts +16 -0
- package/dist/features/promotions/components/CouponCard.js +20 -0
- package/dist/features/promotions/components/PromotionsView.d.ts +43 -0
- package/dist/features/promotions/components/PromotionsView.js +10 -0
- package/dist/features/promotions/components/index.d.ts +3 -0
- package/dist/features/promotions/components/index.js +2 -0
- package/dist/features/promotions/hooks/useCouponValidate.d.ts +22 -0
- package/dist/features/promotions/hooks/useCouponValidate.js +10 -0
- package/dist/features/promotions/hooks/usePromotions.d.ts +21 -0
- package/dist/features/promotions/hooks/usePromotions.js +49 -0
- package/dist/features/promotions/index.d.ts +7 -301
- package/dist/features/promotions/index.js +7 -957
- package/dist/features/promotions/manifest.d.ts +2 -0
- package/dist/features/promotions/manifest.js +14 -0
- package/dist/features/promotions/messages/en.json +20 -0
- package/dist/features/promotions/repository/coupons.repository.d.ts +224 -0
- package/dist/features/promotions/repository/coupons.repository.js +539 -0
- package/dist/features/promotions/repository/promotions.repository.d.ts +14 -0
- package/dist/features/promotions/repository/promotions.repository.js +43 -0
- package/dist/features/promotions/schemas/firestore.d.ts +105 -0
- package/dist/features/promotions/schemas/firestore.js +124 -0
- package/dist/features/promotions/schemas/index.d.ts +117 -0
- package/dist/features/promotions/schemas/index.js +58 -0
- package/dist/features/promotions/server.d.ts +10 -0
- package/dist/features/promotions/server.js +10 -0
- package/dist/features/promotions/types/index.d.ts +51 -0
- package/dist/features/promotions/types/index.js +2 -0
- package/dist/features/reviews/actions/index.d.ts +1 -0
- package/dist/features/reviews/actions/index.js +1 -0
- package/dist/features/reviews/actions/review-actions.d.ts +40 -0
- package/dist/features/reviews/actions/review-actions.js +182 -0
- package/dist/features/reviews/api/[id]/route.d.ts +23 -0
- package/dist/features/reviews/api/[id]/route.js +109 -0
- package/dist/features/reviews/api/route.d.ts +21 -0
- package/dist/features/reviews/api/route.js +171 -0
- package/dist/features/reviews/columns/index.d.ts +15 -0
- package/dist/features/reviews/columns/index.js +44 -0
- package/dist/features/reviews/components/ReviewFilters.d.ts +74 -0
- package/dist/features/reviews/components/ReviewFilters.js +60 -0
- package/dist/features/reviews/components/ReviewModal.d.ts +11 -0
- package/dist/features/reviews/components/ReviewModal.js +25 -0
- package/dist/features/reviews/components/ReviewSummary.d.ts +16 -0
- package/dist/features/reviews/components/ReviewSummary.js +20 -0
- package/dist/features/reviews/components/ReviewsList.d.ts +15 -0
- package/dist/features/reviews/components/ReviewsList.js +25 -0
- package/dist/features/reviews/components/ReviewsListView.d.ts +31 -0
- package/dist/features/reviews/components/ReviewsListView.js +16 -0
- package/dist/features/reviews/components/index.d.ts +10 -0
- package/dist/features/reviews/components/index.js +5 -0
- package/dist/features/reviews/hooks/useCreateReview.d.ts +12 -0
- package/dist/features/reviews/hooks/useCreateReview.js +20 -0
- package/dist/features/reviews/hooks/useReviews.d.ts +34 -0
- package/dist/features/reviews/hooks/useReviews.js +49 -0
- package/dist/features/reviews/index.d.ts +7 -434
- package/dist/features/reviews/index.js +7 -2297
- package/dist/features/reviews/manifest.d.ts +2 -0
- package/dist/features/reviews/manifest.js +10 -0
- package/dist/features/reviews/messages/en.json +10 -0
- package/dist/features/reviews/repository/reviews.repository.d.ts +103 -0
- package/dist/features/reviews/repository/reviews.repository.js +214 -0
- package/dist/features/reviews/schemas/firestore.d.ts +67 -0
- package/dist/features/reviews/schemas/firestore.js +59 -0
- package/dist/features/reviews/schemas/index.d.ts +183 -0
- package/dist/features/reviews/schemas/index.js +68 -0
- package/dist/features/reviews/server.d.ts +7 -46
- package/dist/features/reviews/server.js +10 -769
- package/dist/features/reviews/types/index.d.ts +62 -0
- package/dist/features/reviews/types/index.js +1 -0
- package/dist/features/search/actions/index.d.ts +1 -0
- package/dist/features/search/actions/index.js +1 -0
- package/dist/features/search/actions/search-actions.d.ts +18 -0
- package/dist/features/search/actions/search-actions.js +43 -0
- package/dist/features/search/api/route.d.ts +22 -0
- package/dist/features/search/api/route.js +79 -0
- package/dist/features/search/columns/index.d.ts +17 -0
- package/dist/features/search/columns/index.js +49 -0
- package/dist/features/search/components/Search.d.ts +41 -0
- package/dist/features/search/components/Search.js +263 -0
- package/dist/features/search/components/SearchFiltersRow.d.ts +22 -0
- package/dist/features/search/components/SearchFiltersRow.js +21 -0
- package/dist/features/search/components/SearchResultsSection.d.ts +53 -0
- package/dist/features/search/components/SearchResultsSection.js +36 -0
- package/dist/features/search/components/SearchView.d.ts +29 -0
- package/dist/features/search/components/SearchView.js +8 -0
- package/dist/features/search/components/index.d.ts +8 -0
- package/dist/features/search/components/index.js +4 -0
- package/dist/features/search/hooks/useNavSuggestions.d.ts +11 -0
- package/dist/features/search/hooks/useNavSuggestions.js +32 -0
- package/dist/features/search/hooks/useSearch.d.ts +21 -0
- package/dist/features/search/hooks/useSearch.js +34 -0
- package/dist/features/search/index.d.ts +7 -298
- package/dist/features/search/index.js +7 -1351
- package/dist/features/search/manifest.d.ts +2 -0
- package/dist/features/search/manifest.js +10 -0
- package/dist/features/search/messages/en.json +15 -0
- package/dist/features/search/repository/search.repository.d.ts +14 -0
- package/dist/features/search/repository/search.repository.js +59 -0
- package/dist/features/search/schemas/index.d.ts +70 -0
- package/dist/features/search/schemas/index.js +34 -0
- package/dist/features/search/server.d.ts +5 -83
- package/dist/features/search/server.js +5 -149
- package/dist/features/search/types/index.d.ts +46 -0
- package/dist/features/search/types/index.js +2 -0
- package/dist/features/seller/actions/index.d.ts +2 -0
- package/dist/features/seller/actions/index.js +2 -0
- package/dist/features/seller/actions/offer-actions.d.ts +32 -0
- package/dist/features/seller/actions/offer-actions.js +266 -0
- package/dist/features/seller/actions/seller-actions.d.ts +172 -0
- package/dist/features/seller/actions/seller-actions.js +480 -0
- package/dist/features/seller/api/coupons/route.d.ts +17 -0
- package/dist/features/seller/api/coupons/route.js +47 -0
- package/dist/features/seller/api/offers/route.d.ts +17 -0
- package/dist/features/seller/api/offers/route.js +63 -0
- package/dist/features/seller/api/products/route.d.ts +17 -0
- package/dist/features/seller/api/products/route.js +64 -0
- package/dist/features/seller/api/store/route.d.ts +17 -0
- package/dist/features/seller/api/store/route.js +34 -0
- package/dist/features/seller/columns/index.d.ts +22 -0
- package/dist/features/seller/columns/index.js +73 -0
- package/dist/features/seller/components/SellerAddressesView.d.ts +13 -0
- package/dist/features/seller/components/SellerAddressesView.js +5 -0
- package/dist/features/seller/components/SellerAnalyticsView.d.ts +13 -0
- package/dist/features/seller/components/SellerAnalyticsView.js +17 -0
- package/dist/features/seller/components/SellerAuctionsView.d.ts +6 -0
- package/dist/features/seller/components/SellerAuctionsView.js +5 -0
- package/dist/features/seller/components/SellerCouponsView.d.ts +6 -0
- package/dist/features/seller/components/SellerCouponsView.js +5 -0
- package/dist/features/seller/components/SellerCreateProductView.d.ts +11 -0
- package/dist/features/seller/components/SellerCreateProductView.js +5 -0
- package/dist/features/seller/components/SellerDashboardView.d.ts +14 -0
- package/dist/features/seller/components/SellerDashboardView.js +11 -0
- package/dist/features/seller/components/SellerEditProductView.d.ts +11 -0
- package/dist/features/seller/components/SellerEditProductView.js +5 -0
- package/dist/features/seller/components/SellerGuideView.d.ts +12 -0
- package/dist/features/seller/components/SellerGuideView.js +5 -0
- package/dist/features/seller/components/SellerOffersView.d.ts +4 -0
- package/dist/features/seller/components/SellerOffersView.js +5 -0
- package/dist/features/seller/components/SellerOrdersView.d.ts +4 -0
- package/dist/features/seller/components/SellerOrdersView.js +5 -0
- package/dist/features/seller/components/SellerPayoutHistoryTable.d.ts +14 -0
- package/dist/features/seller/components/SellerPayoutHistoryTable.js +10 -0
- package/dist/features/seller/components/SellerPayoutSettingsView.d.ts +11 -0
- package/dist/features/seller/components/SellerPayoutSettingsView.js +5 -0
- package/dist/features/seller/components/SellerPayoutStats.d.ts +8 -0
- package/dist/features/seller/components/SellerPayoutStats.js +9 -0
- package/dist/features/seller/components/SellerPayoutsView.d.ts +18 -0
- package/dist/features/seller/components/SellerPayoutsView.js +11 -0
- package/dist/features/seller/components/SellerProductsView.d.ts +6 -0
- package/dist/features/seller/components/SellerProductsView.js +5 -0
- package/dist/features/seller/components/SellerShippingView.d.ts +12 -0
- package/dist/features/seller/components/SellerShippingView.js +5 -0
- package/dist/features/seller/components/SellerSidebar.d.ts +16 -0
- package/dist/features/seller/components/SellerSidebar.js +11 -0
- package/dist/features/seller/components/SellerStatCard.d.ts +14 -0
- package/dist/features/seller/components/SellerStatCard.js +5 -0
- package/dist/features/seller/components/SellerStoreSetupView.d.ts +12 -0
- package/dist/features/seller/components/SellerStoreSetupView.js +8 -0
- package/dist/features/seller/components/SellerStoreView.d.ts +8 -0
- package/dist/features/seller/components/SellerStoreView.js +8 -0
- package/dist/features/seller/components/SellerStorefrontView.d.ts +13 -0
- package/dist/features/seller/components/SellerStorefrontView.js +10 -0
- package/dist/features/seller/components/SellersListView.d.ts +4 -0
- package/dist/features/seller/components/SellersListView.js +5 -0
- package/dist/features/seller/components/analytics/SellerAnalyticsStats.d.ts +14 -0
- package/dist/features/seller/components/analytics/SellerAnalyticsStats.js +9 -0
- package/dist/features/seller/components/analytics/SellerRevenueChart.d.ts +13 -0
- package/dist/features/seller/components/analytics/SellerRevenueChart.js +28 -0
- package/dist/features/seller/components/analytics/SellerTopProducts.d.ts +17 -0
- package/dist/features/seller/components/analytics/SellerTopProducts.js +6 -0
- package/dist/features/seller/components/analytics/index.d.ts +3 -0
- package/dist/features/seller/components/analytics/index.js +3 -0
- package/dist/features/seller/components/index.d.ts +44 -0
- package/dist/features/seller/components/index.js +23 -0
- package/dist/features/seller/hooks/useBecomeSeller.d.ts +12 -0
- package/dist/features/seller/hooks/useBecomeSeller.js +26 -0
- package/dist/features/seller/hooks/useSellerPayouts.d.ts +25 -0
- package/dist/features/seller/hooks/useSellerPayouts.js +42 -0
- package/dist/features/seller/hooks/useSellerStore.d.ts +28 -0
- package/dist/features/seller/hooks/useSellerStore.js +48 -0
- package/dist/features/seller/hooks/useSellerStorefront.d.ts +16 -0
- package/dist/features/seller/hooks/useSellerStorefront.js +57 -0
- package/dist/features/seller/index.d.ts +10 -926
- package/dist/features/seller/index.js +10 -2029
- package/dist/features/seller/manifest.d.ts +2 -0
- package/dist/features/seller/manifest.js +74 -0
- package/dist/features/seller/messages/en.json +32 -0
- package/dist/features/seller/permission-map.d.ts +3 -0
- package/dist/features/seller/permission-map.js +15 -0
- package/dist/features/seller/repository/offer.repository.d.ts +66 -0
- package/dist/features/seller/repository/offer.repository.js +210 -0
- package/dist/features/seller/repository/seller.repository.d.ts +22 -0
- package/dist/features/seller/repository/seller.repository.js +72 -0
- package/dist/features/seller/schemas/firestore.d.ts +76 -0
- package/dist/features/seller/schemas/firestore.js +57 -0
- package/dist/features/seller/schemas/index.d.ts +244 -0
- package/dist/features/seller/schemas/index.js +100 -0
- package/dist/features/seller/server.d.ts +13 -0
- package/dist/features/seller/server.js +13 -0
- package/dist/features/seller/types/index.d.ts +147 -0
- package/dist/features/seller/types/index.js +2 -0
- package/dist/features/stores/actions/index.d.ts +2 -0
- package/dist/features/stores/actions/index.js +2 -0
- package/dist/features/stores/actions/store-address-actions.d.ts +11 -0
- package/dist/features/stores/actions/store-address-actions.js +54 -0
- package/dist/features/stores/actions/store-query-actions.d.ts +34 -0
- package/dist/features/stores/actions/store-query-actions.js +113 -0
- package/dist/features/stores/api/[storeSlug]/auctions/route.d.ts +23 -0
- package/dist/features/stores/api/[storeSlug]/auctions/route.js +92 -0
- package/dist/features/stores/api/[storeSlug]/products/route.d.ts +23 -0
- package/dist/features/stores/api/[storeSlug]/products/route.js +97 -0
- package/dist/features/stores/api/[storeSlug]/reviews/route.d.ts +23 -0
- package/dist/features/stores/api/[storeSlug]/reviews/route.js +101 -0
- package/dist/features/stores/api/[storeSlug]/route.d.ts +21 -0
- package/dist/features/stores/api/[storeSlug]/route.js +66 -0
- package/dist/features/stores/api/route.d.ts +12 -0
- package/dist/features/stores/api/route.js +101 -0
- package/dist/features/stores/columns/index.d.ts +16 -0
- package/dist/features/stores/columns/index.js +45 -0
- package/dist/features/stores/components/InteractiveStoreCard.d.ts +20 -0
- package/dist/features/stores/components/InteractiveStoreCard.js +16 -0
- package/dist/features/stores/components/StoreAboutView.d.ts +21 -0
- package/dist/features/stores/components/StoreAboutView.js +12 -0
- package/dist/features/stores/components/StoreAddressSelectorCreate.d.ts +16 -0
- package/dist/features/stores/components/StoreAddressSelectorCreate.js +40 -0
- package/dist/features/stores/components/StoreAuctionsView.d.ts +17 -0
- package/dist/features/stores/components/StoreAuctionsView.js +5 -0
- package/dist/features/stores/components/StoreHeader.d.ts +15 -0
- package/dist/features/stores/components/StoreHeader.js +8 -0
- package/dist/features/stores/components/StoreNavTabs.d.ts +15 -0
- package/dist/features/stores/components/StoreNavTabs.js +14 -0
- package/dist/features/stores/components/StoreProductsView.d.ts +30 -0
- package/dist/features/stores/components/StoreProductsView.js +11 -0
- package/dist/features/stores/components/StoreReviewsView.d.ts +17 -0
- package/dist/features/stores/components/StoreReviewsView.js +9 -0
- package/dist/features/stores/components/StoresListView.d.ts +19 -0
- package/dist/features/stores/components/StoresListView.js +24 -0
- package/dist/features/stores/components/index.d.ts +16 -0
- package/dist/features/stores/components/index.js +9 -0
- package/dist/features/stores/hooks/useStoreAddressSelector.d.ts +23 -0
- package/dist/features/stores/hooks/useStoreAddressSelector.js +30 -0
- package/dist/features/stores/hooks/useStores.d.ts +58 -0
- package/dist/features/stores/hooks/useStores.js +96 -0
- package/dist/features/stores/index.d.ts +7 -536
- package/dist/features/stores/index.js +7 -1911
- package/dist/features/stores/manifest.d.ts +2 -0
- package/dist/features/stores/manifest.js +35 -0
- package/dist/features/stores/messages/en.json +21 -0
- package/dist/features/stores/repository/store-address.repository.d.ts +55 -0
- package/dist/features/stores/repository/store-address.repository.js +188 -0
- package/dist/features/stores/repository/store.repository.d.ts +67 -0
- package/dist/features/stores/repository/store.repository.js +181 -0
- package/dist/features/stores/repository/stores.repository.d.ts +11 -0
- package/dist/features/stores/repository/stores.repository.js +34 -0
- package/dist/features/stores/schemas/firestore.d.ts +117 -0
- package/dist/features/stores/schemas/firestore.js +109 -0
- package/dist/features/stores/schemas/index.d.ts +85 -0
- package/dist/features/stores/schemas/index.js +48 -0
- package/dist/features/stores/server.d.ts +12 -103
- package/dist/features/stores/server.js +15 -444
- package/dist/features/stores/types/index.d.ts +102 -0
- package/dist/features/stores/types/index.js +2 -0
- package/dist/features/whatsapp-bot/api/send-status/route.d.ts +12 -0
- package/dist/features/whatsapp-bot/api/send-status/route.js +36 -0
- package/dist/features/whatsapp-bot/api/webhook/route.d.ts +12 -0
- package/dist/features/whatsapp-bot/api/webhook/route.js +41 -0
- package/dist/features/whatsapp-bot/components/WhatsAppChatButton.d.ts +8 -0
- package/dist/features/whatsapp-bot/components/WhatsAppChatButton.js +7 -0
- package/dist/features/whatsapp-bot/components/index.d.ts +1 -0
- package/dist/features/whatsapp-bot/components/index.js +1 -0
- package/dist/features/whatsapp-bot/helpers/whatsapp.d.ts +21 -0
- package/dist/features/whatsapp-bot/helpers/whatsapp.js +125 -0
- package/dist/features/whatsapp-bot/index.d.ts +3 -85
- package/dist/features/whatsapp-bot/index.js +3 -154
- package/dist/features/whatsapp-bot/manifest.d.ts +2 -0
- package/dist/features/whatsapp-bot/manifest.js +13 -0
- package/dist/features/whatsapp-bot/messages/en.json +7 -0
- package/dist/features/whatsapp-bot/server.d.ts +7 -0
- package/dist/features/whatsapp-bot/server.js +7 -0
- package/dist/features/whatsapp-bot/types/index.d.ts +50 -0
- package/dist/features/whatsapp-bot/types/index.js +1 -0
- package/dist/features/wishlist/actions/index.d.ts +1 -0
- package/dist/features/wishlist/actions/index.js +1 -0
- package/dist/features/wishlist/actions/wishlist-actions.d.ts +20 -0
- package/dist/features/wishlist/actions/wishlist-actions.js +29 -0
- package/dist/features/wishlist/columns/index.d.ts +17 -0
- package/dist/features/wishlist/columns/index.js +42 -0
- package/dist/features/wishlist/components/WishlistPage.d.ts +16 -0
- package/dist/features/wishlist/components/WishlistPage.js +17 -0
- package/dist/features/wishlist/components/WishlistToggleButton.d.ts +12 -0
- package/dist/features/wishlist/components/WishlistToggleButton.js +21 -0
- package/dist/features/wishlist/components/WishlistView.d.ts +33 -0
- package/dist/features/wishlist/components/WishlistView.js +41 -0
- package/dist/features/wishlist/components/index.d.ts +4 -0
- package/dist/features/wishlist/components/index.js +3 -0
- package/dist/features/wishlist/hooks/useUserWishlist.d.ts +187 -0
- package/dist/features/wishlist/hooks/useUserWishlist.js +17 -0
- package/dist/features/wishlist/hooks/useWishlist.d.ts +16 -0
- package/dist/features/wishlist/hooks/useWishlist.js +23 -0
- package/dist/features/wishlist/hooks/useWishlistToggle.d.ts +10 -0
- package/dist/features/wishlist/hooks/useWishlistToggle.js +32 -0
- package/dist/features/wishlist/index.d.ts +9 -360
- package/dist/features/wishlist/index.js +8 -888
- package/dist/features/wishlist/manifest.d.ts +2 -0
- package/dist/features/wishlist/manifest.js +12 -0
- package/dist/features/wishlist/messages/en.json +7 -0
- package/dist/features/wishlist/repository/user-wishlist.repository.d.ts +14 -0
- package/dist/features/wishlist/repository/user-wishlist.repository.js +91 -0
- package/dist/features/wishlist/repository/wishlist.repository.d.ts +13 -0
- package/dist/features/wishlist/repository/wishlist.repository.js +31 -0
- package/dist/features/wishlist/schemas/index.d.ts +46 -0
- package/dist/features/wishlist/schemas/index.js +24 -0
- package/dist/features/wishlist/server.d.ts +9 -0
- package/dist/features/wishlist/server.js +9 -0
- package/dist/features/wishlist/types/index.d.ts +16 -0
- package/dist/features/wishlist/types/index.js +1 -0
- package/dist/http/ApiClient.d.ts +59 -0
- package/dist/http/ApiClient.js +149 -0
- package/dist/http/api-handler.d.ts +33 -0
- package/dist/http/api-handler.js +89 -0
- package/dist/http/index.d.ts +6 -58
- package/dist/http/index.js +8 -4
- package/dist/index.d.ts +1 -17
- package/dist/index.js +1 -13
- package/dist/instrumentation/index.d.ts +4 -6
- package/dist/instrumentation/index.js +54 -14
- package/dist/monitoring/analytics.d.ts +79 -0
- package/dist/monitoring/analytics.js +171 -0
- package/dist/monitoring/browser.d.ts +10 -0
- package/dist/monitoring/browser.js +6 -0
- package/dist/monitoring/cache-metrics.d.ts +24 -0
- package/dist/monitoring/cache-metrics.js +83 -0
- package/dist/monitoring/client-logger.d.ts +29 -0
- package/dist/monitoring/client-logger.js +127 -0
- package/dist/monitoring/error-tracking.d.ts +50 -0
- package/dist/monitoring/error-tracking.js +54 -0
- package/dist/monitoring/index.d.ts +12 -181
- package/dist/monitoring/index.js +7 -8
- package/dist/monitoring/performance.d.ts +31 -0
- package/dist/monitoring/performance.js +34 -0
- package/dist/monitoring/runtime.d.ts +17 -0
- package/dist/monitoring/runtime.js +28 -0
- package/dist/monitoring/server-logger.d.ts +37 -0
- package/dist/monitoring/server-logger.js +289 -0
- package/dist/next/ErrorBoundary.d.ts +19 -0
- package/dist/next/ErrorBoundary.js +35 -0
- package/dist/next/IAuthVerifier.d.ts +54 -0
- package/dist/next/IAuthVerifier.js +23 -0
- package/dist/next/api/api-response.d.ts +29 -0
- package/dist/next/api/api-response.js +31 -0
- package/dist/next/api/apiHandler.d.ts +48 -0
- package/dist/next/api/apiHandler.js +87 -0
- package/dist/next/api/errorHandler.d.ts +57 -0
- package/dist/next/api/errorHandler.js +72 -0
- package/dist/next/api/routeHandler.d.ts +60 -0
- package/dist/next/api/routeHandler.js +113 -0
- package/dist/next/cache-middleware.d.ts +35 -0
- package/dist/next/cache-middleware.js +77 -0
- package/dist/next/components/ErrorView.d.ts +13 -0
- package/dist/next/components/ErrorView.js +32 -0
- package/dist/next/components/GlobalError.d.ts +7 -0
- package/dist/next/components/GlobalError.js +43 -0
- package/dist/next/components/NotFoundView.d.ts +28 -0
- package/dist/next/components/NotFoundView.js +25 -0
- package/dist/next/components/UnauthorizedView.d.ts +28 -0
- package/dist/next/components/UnauthorizedView.js +22 -0
- package/dist/next/index.d.ts +34 -776
- package/dist/next/index.js +30 -646
- package/dist/next/middleware/chain.d.ts +47 -0
- package/dist/next/middleware/chain.js +80 -0
- package/dist/next/middleware/index.d.ts +6 -0
- package/dist/next/middleware/index.js +3 -0
- package/dist/next/middleware/pii-redactor.d.ts +32 -0
- package/dist/next/middleware/pii-redactor.js +82 -0
- package/dist/next/middleware/pii-scrubber.d.ts +11 -0
- package/dist/next/middleware/pii-scrubber.js +43 -0
- package/dist/next/middleware/types.d.ts +18 -0
- package/dist/next/middleware/types.js +1 -0
- package/dist/next/request-helpers.d.ts +25 -0
- package/dist/next/request-helpers.js +52 -0
- package/dist/next/routing/route-map.d.ts +272 -0
- package/dist/next/routing/route-map.js +202 -0
- package/dist/providers/auth-firebase/browser-stub.d.ts +24 -0
- package/dist/providers/auth-firebase/browser-stub.js +28 -0
- package/dist/providers/auth-firebase/helpers.d.ts +83 -0
- package/dist/providers/auth-firebase/helpers.js +205 -0
- package/dist/providers/auth-firebase/index.d.ts +7 -133
- package/dist/providers/auth-firebase/index.js +16 -370
- package/dist/providers/auth-firebase/provider.d.ts +8 -0
- package/dist/providers/auth-firebase/provider.js +118 -0
- package/dist/providers/auth-firebase/session.d.ts +19 -0
- package/dist/providers/auth-firebase/session.js +86 -0
- package/dist/providers/db-firebase/admin-app-lite.d.ts +6 -0
- package/dist/providers/db-firebase/admin-app-lite.js +50 -0
- package/dist/providers/db-firebase/admin-auth-lite.d.ts +5 -0
- package/dist/providers/db-firebase/admin-auth-lite.js +10 -0
- package/dist/providers/db-firebase/admin-storage-lite.d.ts +6 -0
- package/dist/providers/db-firebase/admin-storage-lite.js +11 -0
- package/dist/providers/db-firebase/admin.d.ts +29 -0
- package/dist/providers/db-firebase/admin.js +163 -0
- package/dist/providers/db-firebase/base.d.ts +44 -0
- package/dist/providers/db-firebase/base.js +180 -0
- package/dist/providers/db-firebase/base.repository.d.ts +34 -0
- package/dist/providers/db-firebase/base.repository.js +235 -0
- package/dist/providers/db-firebase/browser-stub.d.ts +37 -0
- package/dist/providers/db-firebase/browser-stub.js +56 -0
- package/dist/providers/db-firebase/client-config.d.ts +22 -0
- package/dist/providers/db-firebase/client-config.js +30 -0
- package/dist/providers/db-firebase/field-ops.d.ts +7 -0
- package/dist/providers/db-firebase/field-ops.js +13 -0
- package/dist/providers/db-firebase/helpers.d.ts +23 -0
- package/dist/providers/db-firebase/helpers.js +67 -0
- package/dist/providers/db-firebase/index.d.ts +16 -250
- package/dist/providers/db-firebase/index.js +42 -498
- package/dist/providers/db-firebase/realtime.d.ts +43 -0
- package/dist/providers/db-firebase/realtime.js +122 -0
- package/dist/providers/db-firebase/rtdb-paths.d.ts +12 -0
- package/dist/providers/db-firebase/rtdb-paths.js +12 -0
- package/dist/providers/db-firebase/sieve.d.ts +76 -0
- package/dist/providers/db-firebase/sieve.js +83 -0
- package/dist/providers/email-resend/index.d.ts +6 -64
- package/dist/providers/email-resend/index.js +14 -56
- package/dist/providers/email-resend/provider.d.ts +43 -0
- package/dist/providers/email-resend/provider.js +75 -0
- package/dist/providers/firebase-client/auth.d.ts +12 -0
- package/dist/providers/firebase-client/auth.js +30 -0
- package/dist/providers/firebase-client/index.d.ts +9 -0
- package/dist/providers/firebase-client/index.js +9 -0
- package/dist/providers/firebase-client/realtime.d.ts +18 -0
- package/dist/providers/firebase-client/realtime.js +39 -0
- package/dist/providers/payment-razorpay/index.d.ts +66 -69
- package/dist/providers/payment-razorpay/index.js +201 -97
- package/dist/providers/shipping-shiprocket/index.d.ts +69 -33
- package/dist/providers/shipping-shiprocket/index.js +135 -122
- package/dist/providers/shipping-shiprocket/shiprocket-provider.d.ts +46 -0
- package/dist/providers/shipping-shiprocket/shiprocket-provider.js +152 -0
- package/dist/providers/storage-firebase/client.d.ts +56 -0
- package/dist/providers/storage-firebase/client.js +141 -0
- package/dist/providers/storage-firebase/index.d.ts +6 -43
- package/dist/providers/storage-firebase/index.js +16 -153
- package/dist/providers/storage-firebase/provider.d.ts +23 -0
- package/dist/providers/storage-firebase/provider.js +103 -0
- package/dist/react/ErrorBoundary.d.ts +31 -0
- package/dist/react/ErrorBoundary.js +68 -0
- package/dist/react/contexts/SessionContext.d.ts +80 -0
- package/dist/react/contexts/SessionContext.js +350 -0
- package/dist/react/contexts/ThemeContext.d.ts +14 -0
- package/dist/react/contexts/ThemeContext.js +65 -0
- package/dist/react/contexts/index.d.ts +4 -0
- package/dist/react/contexts/index.js +2 -0
- package/dist/react/hooks/useBreakpoint.d.ts +29 -0
- package/dist/react/hooks/useBreakpoint.js +37 -0
- package/dist/react/hooks/useBulkAction.d.ts +65 -0
- package/dist/react/hooks/useBulkAction.js +69 -0
- package/dist/react/hooks/useBulkSelection.d.ts +40 -0
- package/dist/react/hooks/useBulkSelection.js +58 -0
- package/dist/react/hooks/useCamera.d.ts +34 -0
- package/dist/react/hooks/useCamera.js +147 -0
- package/dist/react/hooks/useClickOutside.d.ts +37 -0
- package/dist/react/hooks/useClickOutside.js +57 -0
- package/dist/react/hooks/useContainerGrid.d.ts +39 -0
- package/dist/react/hooks/useContainerGrid.js +47 -0
- package/dist/react/hooks/useCountdown.d.ts +26 -0
- package/dist/react/hooks/useCountdown.js +49 -0
- package/dist/react/hooks/useGesture.d.ts +51 -0
- package/dist/react/hooks/useGesture.js +181 -0
- package/dist/react/hooks/useKeyPress.d.ts +48 -0
- package/dist/react/hooks/useKeyPress.js +62 -0
- package/dist/react/hooks/useLongPress.d.ts +26 -0
- package/dist/react/hooks/useLongPress.js +55 -0
- package/dist/react/hooks/useMediaQuery.d.ts +17 -0
- package/dist/react/hooks/useMediaQuery.js +34 -0
- package/dist/react/hooks/useMessage.d.ts +11 -0
- package/dist/react/hooks/useMessage.js +45 -0
- package/dist/react/hooks/usePendingFilters.d.ts +58 -0
- package/dist/react/hooks/usePendingFilters.js +79 -0
- package/dist/react/hooks/usePendingTable.d.ts +49 -0
- package/dist/react/hooks/usePendingTable.js +45 -0
- package/dist/react/hooks/usePullToRefresh.d.ts +38 -0
- package/dist/react/hooks/usePullToRefresh.js +82 -0
- package/dist/react/hooks/useRealtimeEvent.d.ts +53 -0
- package/dist/react/hooks/useRealtimeEvent.js +124 -0
- package/dist/react/hooks/useSwipe.d.ts +55 -0
- package/dist/react/hooks/useSwipe.js +165 -0
- package/dist/react/hooks/useUnsavedChanges.d.ts +44 -0
- package/dist/react/hooks/useUnsavedChanges.js +55 -0
- package/dist/react/hooks/useUrlTable.d.ts +31 -0
- package/dist/react/hooks/useUrlTable.js +137 -0
- package/dist/react/hooks/useVisibleItems.d.ts +37 -0
- package/dist/react/hooks/useVisibleItems.js +59 -0
- package/dist/react/index.d.ts +49 -787
- package/dist/react/index.js +47 -1665
- package/dist/react/useModalStack.d.ts +33 -0
- package/dist/react/useModalStack.js +61 -0
- package/dist/repositories/index.d.ts +38 -0
- package/dist/repositories/index.js +40 -0
- package/dist/security/authorization.d.ts +24 -0
- package/dist/security/authorization.js +73 -0
- package/dist/security/browser.d.ts +7 -0
- package/dist/security/browser.js +5 -0
- package/dist/security/csp.d.ts +16 -0
- package/dist/security/csp.js +44 -0
- package/dist/security/index.d.ts +11 -309
- package/dist/security/index.js +8 -5
- package/dist/security/pii-encrypt.d.ts +121 -0
- package/dist/security/pii-encrypt.js +351 -0
- package/dist/security/pii-redact.d.ts +20 -0
- package/dist/security/pii-redact.js +129 -0
- package/dist/security/pii-schemas.d.ts +38 -0
- package/dist/security/pii-schemas.js +62 -0
- package/dist/security/rate-limit.d.ts +70 -0
- package/dist/security/rate-limit.js +107 -0
- package/dist/security/rbac/Can.d.ts +31 -0
- package/dist/security/rbac/Can.js +24 -0
- package/dist/security/rbac/default-roles.d.ts +2 -0
- package/dist/security/rbac/default-roles.js +83 -0
- package/dist/security/rbac/hook.d.ts +20 -0
- package/dist/security/rbac/hook.js +30 -0
- package/dist/security/rbac/index.d.ts +8 -0
- package/dist/security/rbac/index.js +6 -0
- package/dist/security/rbac/middleware.d.ts +51 -0
- package/dist/security/rbac/middleware.js +51 -0
- package/dist/security/rbac/resolver.d.ts +5 -0
- package/dist/security/rbac/resolver.js +38 -0
- package/dist/security/rbac/server.d.ts +24 -0
- package/dist/security/rbac/server.js +42 -0
- package/dist/security/rbac/types.d.ts +22 -0
- package/dist/security/rbac/types.js +2 -0
- package/dist/security/settings-encryption.d.ts +5 -0
- package/dist/security/settings-encryption.js +48 -0
- package/dist/seed/actions/demo-seed-actions.d.ts +31 -0
- package/dist/seed/actions/demo-seed-actions.js +36 -0
- package/dist/seed/actions/index.d.ts +1 -0
- package/dist/seed/actions/index.js +1 -0
- package/dist/seed/addresses-seed-data.d.ts +19 -0
- package/dist/seed/addresses-seed-data.js +418 -0
- package/dist/seed/bids-seed-data.d.ts +7 -0
- package/dist/seed/bids-seed-data.js +1168 -0
- package/dist/seed/blog-posts-seed-data.d.ts +7 -0
- package/dist/seed/blog-posts-seed-data.js +215 -0
- package/dist/seed/carousel-slides-seed-data.d.ts +7 -0
- package/dist/seed/carousel-slides-seed-data.js +283 -0
- package/dist/seed/cart-seed-data.d.ts +20 -0
- package/dist/seed/cart-seed-data.js +179 -0
- package/dist/seed/categories-seed-data.d.ts +7 -0
- package/dist/seed/categories-seed-data.js +1220 -0
- package/dist/seed/coupons-seed-data.d.ts +7 -0
- package/dist/seed/coupons-seed-data.js +508 -0
- package/dist/seed/defaults/categories.d.ts +2 -0
- package/dist/seed/defaults/categories.js +12 -0
- package/dist/seed/defaults/faqs.d.ts +2 -0
- package/dist/seed/defaults/faqs.js +40 -0
- package/dist/seed/defaults/homepage-sections.d.ts +2 -0
- package/dist/seed/defaults/homepage-sections.js +59 -0
- package/dist/seed/events-seed-data.d.ts +8 -0
- package/dist/seed/events-seed-data.js +662 -0
- package/dist/seed/factories/address.factory.d.ts +21 -0
- package/dist/seed/factories/address.factory.js +44 -0
- package/dist/seed/factories/bid.factory.d.ts +15 -0
- package/dist/seed/factories/bid.factory.js +33 -0
- package/dist/seed/factories/blog-post.factory.d.ts +15 -0
- package/dist/seed/factories/blog-post.factory.js +22 -0
- package/dist/seed/factories/carousel.factory.d.ts +11 -0
- package/dist/seed/factories/carousel.factory.js +16 -0
- package/dist/seed/factories/cart.factory.d.ts +26 -0
- package/dist/seed/factories/cart.factory.js +35 -0
- package/dist/seed/factories/category.factory.d.ts +11 -0
- package/dist/seed/factories/category.factory.js +16 -0
- package/dist/seed/factories/coupon.factory.d.ts +21 -0
- package/dist/seed/factories/coupon.factory.js +43 -0
- package/dist/seed/factories/faq.factory.d.ts +10 -0
- package/dist/seed/factories/faq.factory.js +15 -0
- package/dist/seed/factories/homepage-section.factory.d.ts +9 -0
- package/dist/seed/factories/homepage-section.factory.js +13 -0
- package/dist/seed/factories/notification.factory.d.ts +17 -0
- package/dist/seed/factories/notification.factory.js +39 -0
- package/dist/seed/factories/order.factory.d.ts +20 -0
- package/dist/seed/factories/order.factory.js +20 -0
- package/dist/seed/factories/payout.factory.d.ts +21 -0
- package/dist/seed/factories/payout.factory.js +38 -0
- package/dist/seed/factories/product.factory.d.ts +27 -0
- package/dist/seed/factories/product.factory.js +111 -0
- package/dist/seed/factories/review.factory.d.ts +14 -0
- package/dist/seed/factories/review.factory.js +52 -0
- package/dist/seed/factories/session.factory.d.ts +15 -0
- package/dist/seed/factories/session.factory.js +31 -0
- package/dist/seed/factories/store.factory.d.ts +23 -0
- package/dist/seed/factories/store.factory.js +46 -0
- package/dist/seed/factories/user.factory.d.ts +19 -0
- package/dist/seed/factories/user.factory.js +55 -0
- package/dist/seed/faq-seed-data.d.ts +47 -0
- package/dist/seed/faq-seed-data.js +2320 -0
- package/dist/seed/firestore-indexes.d.ts +13 -0
- package/dist/seed/firestore-indexes.js +32 -0
- package/dist/seed/homepage-sections-seed-data.d.ts +18 -0
- package/dist/seed/homepage-sections-seed-data.js +339 -0
- package/dist/seed/index.d.ts +68 -397
- package/dist/seed/index.js +49 -1040
- package/dist/seed/notifications-seed-data.d.ts +7 -0
- package/dist/seed/notifications-seed-data.js +494 -0
- package/dist/seed/orders-seed-data.d.ts +7 -0
- package/dist/seed/orders-seed-data.js +578 -0
- package/dist/seed/payouts-seed-data.d.ts +7 -0
- package/dist/seed/payouts-seed-data.js +202 -0
- package/dist/seed/products-seed-data.d.ts +7 -0
- package/dist/seed/products-seed-data.js +2477 -0
- package/dist/seed/reviews-seed-data.d.ts +7 -0
- package/dist/seed/reviews-seed-data.js +618 -0
- package/dist/seed/runner.d.ts +3 -0
- package/dist/seed/runner.js +38 -0
- package/dist/seed/seed-market-config.d.ts +49 -0
- package/dist/seed/seed-market-config.js +198 -0
- package/dist/seed/sessions-seed-data.d.ts +17 -0
- package/dist/seed/sessions-seed-data.js +355 -0
- package/dist/seed/site-settings-seed-data.d.ts +7 -0
- package/dist/seed/site-settings-seed-data.js +236 -0
- package/dist/seed/store-addresses-seed-data.d.ts +19 -0
- package/dist/seed/store-addresses-seed-data.js +106 -0
- package/dist/seed/stores-seed-data.d.ts +14 -0
- package/dist/seed/stores-seed-data.js +127 -0
- package/dist/seed/test-utils.d.ts +49 -0
- package/dist/seed/test-utils.js +107 -0
- package/dist/seed/types.d.ts +33 -0
- package/dist/seed/types.js +1 -0
- package/dist/seed/users-seed-data.d.ts +7 -0
- package/dist/seed/users-seed-data.js +727 -0
- package/dist/seo/index.d.ts +2 -150
- package/dist/seo/index.js +2 -4
- package/dist/seo/json-ld.d.ts +69 -0
- package/dist/seo/json-ld.js +166 -0
- package/dist/seo/metadata.d.ts +77 -0
- package/dist/seo/metadata.js +157 -0
- package/dist/server.d.ts +109 -0
- package/dist/server.js +110 -0
- package/dist/style/tailwind/index.d.ts +5 -7
- package/dist/style/tailwind/index.js +54 -33
- package/dist/style/vanilla/index.d.ts +5 -7
- package/dist/style/vanilla/index.js +45 -33
- package/dist/tokens/index.d.ts +23 -24
- package/dist/tokens/index.js +786 -4
- package/dist/tokens/tokens.css +221 -0
- package/dist/ui/DataTable.d.ts +78 -0
- package/dist/ui/DataTable.js +157 -0
- package/dist/ui/DataTable.style.css +190 -0
- package/dist/ui/animation.helper.d.ts +17 -0
- package/dist/ui/animation.helper.js +17 -0
- package/dist/ui/color.helper.d.ts +12 -0
- package/dist/ui/color.helper.js +31 -0
- package/dist/ui/columns/build-columns.d.ts +21 -0
- package/dist/ui/columns/build-columns.js +33 -0
- package/dist/ui/columns/column-renderers.d.ts +33 -0
- package/dist/ui/columns/column-renderers.js +64 -0
- package/dist/ui/columns/index.d.ts +6 -0
- package/dist/ui/columns/index.js +5 -0
- package/dist/ui/components/Accordion.d.ts +27 -0
- package/dist/ui/components/Accordion.js +57 -0
- package/dist/ui/components/Accordion.style.css +82 -0
- package/dist/ui/components/ActiveFilterChips.d.ts +13 -0
- package/dist/ui/components/ActiveFilterChips.js +9 -0
- package/dist/ui/components/ActiveFilterChips.style.css +66 -0
- package/dist/ui/components/Alert.d.ts +43 -0
- package/dist/ui/components/Alert.js +47 -0
- package/dist/ui/components/Alert.style.css +187 -0
- package/dist/ui/components/Avatar.d.ts +18 -0
- package/dist/ui/components/Avatar.js +42 -0
- package/dist/ui/components/Avatar.style.css +73 -0
- package/dist/ui/components/AvatarDisplay.d.ts +10 -0
- package/dist/ui/components/AvatarDisplay.js +56 -0
- package/dist/ui/components/AvatarDisplay.style.css +46 -0
- package/dist/ui/components/BackgroundRenderer.d.ts +15 -0
- package/dist/ui/components/BackgroundRenderer.js +42 -0
- package/dist/ui/components/BackgroundRenderer.style.css +31 -0
- package/dist/ui/components/Badge.d.ts +33 -0
- package/dist/ui/components/Badge.js +34 -0
- package/dist/ui/components/Badge.style.css +114 -0
- package/dist/ui/components/BaseListingCard.d.ts +39 -0
- package/dist/ui/components/BaseListingCard.js +56 -0
- package/dist/ui/components/BaseListingCard.style.css +84 -0
- package/dist/ui/components/Breadcrumb.d.ts +15 -0
- package/dist/ui/components/Breadcrumb.js +12 -0
- package/dist/ui/components/Breadcrumb.style.css +60 -0
- package/dist/ui/components/BulkActionBar.d.ts +34 -0
- package/dist/ui/components/BulkActionBar.js +86 -0
- package/dist/ui/components/BulkActionBar.style.css +196 -0
- package/dist/ui/components/Button.d.ts +31 -0
- package/dist/ui/components/Button.js +29 -0
- package/dist/ui/components/Button.style.css +160 -0
- package/dist/ui/components/Card.d.ts +21 -0
- package/dist/ui/components/Card.js +51 -0
- package/dist/ui/components/Card.style.css +192 -0
- package/dist/ui/components/Checkbox.d.ts +8 -0
- package/dist/ui/components/Checkbox.js +38 -0
- package/dist/ui/components/Checkbox.style.css +113 -0
- package/dist/ui/components/ConfirmDeleteModal.d.ts +33 -0
- package/dist/ui/components/ConfirmDeleteModal.js +74 -0
- package/dist/ui/components/ConfirmDeleteModal.style.css +89 -0
- package/dist/ui/components/CountdownDisplay.d.ts +14 -0
- package/dist/ui/components/CountdownDisplay.js +50 -0
- package/dist/ui/components/CountdownDisplay.style.css +4 -0
- package/dist/ui/components/DashboardStatsCard.d.ts +15 -0
- package/dist/ui/components/DashboardStatsCard.js +28 -0
- package/dist/ui/components/DashboardStatsCard.style.css +70 -0
- package/dist/ui/components/DescriptionField.d.ts +23 -0
- package/dist/ui/components/DescriptionField.js +28 -0
- package/dist/ui/components/DescriptionField.style.css +36 -0
- package/dist/ui/components/DetailViewShell.d.ts +51 -0
- package/dist/ui/components/DetailViewShell.js +50 -0
- package/dist/ui/components/Div.d.ts +20 -0
- package/dist/ui/components/Div.js +19 -0
- package/dist/ui/components/Div.style.css +6 -0
- package/dist/ui/components/Divider.d.ts +12 -0
- package/dist/ui/components/Divider.js +11 -0
- package/dist/ui/components/Divider.style.css +39 -0
- package/dist/ui/components/Drawer.d.ts +21 -0
- package/dist/ui/components/Drawer.js +72 -0
- package/dist/ui/components/Drawer.style.css +146 -0
- package/dist/ui/components/Dropdown.d.ts +36 -0
- package/dist/ui/components/Dropdown.js +142 -0
- package/dist/ui/components/Dropdown.style.css +112 -0
- package/dist/ui/components/DynamicSelect.d.ts +24 -0
- package/dist/ui/components/DynamicSelect.js +78 -0
- package/dist/ui/components/DynamicSelect.style.css +101 -0
- package/dist/ui/components/EmptyState.d.ts +12 -0
- package/dist/ui/components/EmptyState.js +17 -0
- package/dist/ui/components/EmptyState.style.css +30 -0
- package/dist/ui/components/FilterDrawer.d.ts +16 -0
- package/dist/ui/components/FilterDrawer.js +39 -0
- package/dist/ui/components/FilterDrawer.style.css +61 -0
- package/dist/ui/components/FlowDiagram.d.ts +33 -0
- package/dist/ui/components/FlowDiagram.js +15 -0
- package/dist/ui/components/FlowDiagram.style.css +77 -0
- package/dist/ui/components/Form.d.ts +27 -0
- package/dist/ui/components/Form.js +48 -0
- package/dist/ui/components/Form.style.css +27 -0
- package/dist/ui/components/FormField.d.ts +26 -0
- package/dist/ui/components/FormField.js +25 -0
- package/dist/ui/components/FormField.style.css +30 -0
- package/dist/ui/components/FormGrid.d.ts +46 -0
- package/dist/ui/components/FormGrid.js +42 -0
- package/dist/ui/components/FormGrid.style.css +32 -0
- package/dist/ui/components/HorizontalScroller.d.ts +33 -0
- package/dist/ui/components/HorizontalScroller.js +47 -0
- package/dist/ui/components/HorizontalScroller.style.css +109 -0
- package/dist/ui/components/IconButton.d.ts +32 -0
- package/dist/ui/components/IconButton.js +31 -0
- package/dist/ui/components/IconButton.style.css +103 -0
- package/dist/ui/components/ImageGallery.d.ts +17 -0
- package/dist/ui/components/ImageGallery.js +108 -0
- package/dist/ui/components/ImageGallery.style.css +163 -0
- package/dist/ui/components/ImageLightbox.d.ts +24 -0
- package/dist/ui/components/ImageLightbox.js +61 -0
- package/dist/ui/components/ImageLightbox.style.css +58 -0
- package/dist/ui/components/Input.d.ts +12 -0
- package/dist/ui/components/Input.js +29 -0
- package/dist/ui/components/Input.style.css +28 -0
- package/dist/ui/components/ItemRow.d.ts +10 -0
- package/dist/ui/components/ItemRow.js +7 -0
- package/dist/ui/components/ItemRow.style.css +33 -0
- package/dist/ui/components/Layout.d.ts +282 -0
- package/dist/ui/components/Layout.js +184 -0
- package/dist/ui/components/Layout.style.css +212 -0
- package/dist/ui/components/ListingLayout.d.ts +60 -0
- package/dist/ui/components/ListingLayout.js +121 -0
- package/dist/ui/components/ListingLayout.style.css +527 -0
- package/dist/ui/components/ListingViewShell.d.ts +38 -0
- package/dist/ui/components/ListingViewShell.js +11 -0
- package/dist/ui/components/Menu.d.ts +29 -0
- package/dist/ui/components/Menu.js +19 -0
- package/dist/ui/components/Menu.style.css +6 -0
- package/dist/ui/components/Modal.d.ts +18 -0
- package/dist/ui/components/Modal.js +79 -0
- package/dist/ui/components/Modal.style.css +102 -0
- package/dist/ui/components/Pagination.d.ts +25 -0
- package/dist/ui/components/Pagination.js +56 -0
- package/dist/ui/components/Pagination.style.css +76 -0
- package/dist/ui/components/PasswordStrengthIndicator.d.ts +12 -0
- package/dist/ui/components/PasswordStrengthIndicator.js +35 -0
- package/dist/ui/components/PasswordStrengthIndicator.style.css +56 -0
- package/dist/ui/components/PriceDisplay.d.ts +8 -0
- package/dist/ui/components/PriceDisplay.js +28 -0
- package/dist/ui/components/PriceDisplay.style.css +47 -0
- package/dist/ui/components/Progress.d.ts +23 -0
- package/dist/ui/components/Progress.js +32 -0
- package/dist/ui/components/Progress.style.css +81 -0
- package/dist/ui/components/Radio.d.ts +18 -0
- package/dist/ui/components/Radio.js +64 -0
- package/dist/ui/components/Radio.style.css +155 -0
- package/dist/ui/components/RatingDisplay.d.ts +8 -0
- package/dist/ui/components/RatingDisplay.js +15 -0
- package/dist/ui/components/RatingDisplay.style.css +50 -0
- package/dist/ui/components/ResponsiveView.d.ts +12 -0
- package/dist/ui/components/ResponsiveView.js +9 -0
- package/dist/ui/components/ResponsiveView.style.css +69 -0
- package/dist/ui/components/RoleBadge.d.ts +7 -0
- package/dist/ui/components/RoleBadge.js +21 -0
- package/dist/ui/components/RoleBadge.style.css +7 -0
- package/dist/ui/components/RowActionMenu.d.ts +13 -0
- package/dist/ui/components/RowActionMenu.js +17 -0
- package/dist/ui/components/RowActionMenu.style.css +91 -0
- package/dist/ui/components/SectionTabs.d.ts +19 -0
- package/dist/ui/components/SectionTabs.js +66 -0
- package/dist/ui/components/SectionTabs.style.css +163 -0
- package/dist/ui/components/Select.d.ts +19 -0
- package/dist/ui/components/Select.js +27 -0
- package/dist/ui/components/Select.style.css +177 -0
- package/dist/ui/components/Semantic.d.ts +154 -0
- package/dist/ui/components/Semantic.js +32 -0
- package/dist/ui/components/Semantic.style.css +14 -0
- package/dist/ui/components/SideDrawer.d.ts +28 -0
- package/dist/ui/components/SideDrawer.js +151 -0
- package/dist/ui/components/SideDrawer.style.css +214 -0
- package/dist/ui/components/SideModal.d.ts +25 -0
- package/dist/ui/components/SideModal.js +61 -0
- package/dist/ui/components/SideModal.style.css +77 -0
- package/dist/ui/components/Skeleton.d.ts +14 -0
- package/dist/ui/components/Skeleton.js +22 -0
- package/dist/ui/components/Skeleton.style.css +55 -0
- package/dist/ui/components/SkipToMain.d.ts +6 -0
- package/dist/ui/components/SkipToMain.js +6 -0
- package/dist/ui/components/SkipToMain.style.css +34 -0
- package/dist/ui/components/Slider.d.ts +17 -0
- package/dist/ui/components/Slider.js +38 -0
- package/dist/ui/components/Slider.style.css +17 -0
- package/dist/ui/components/SlottedListingView.d.ts +62 -0
- package/dist/ui/components/SlottedListingView.js +41 -0
- package/dist/ui/components/SortDropdown.d.ts +15 -0
- package/dist/ui/components/SortDropdown.js +8 -0
- package/dist/ui/components/SortDropdown.style.css +12 -0
- package/dist/ui/components/Spinner.d.ts +13 -0
- package/dist/ui/components/Spinner.js +15 -0
- package/dist/ui/components/Spinner.style.css +76 -0
- package/dist/ui/components/StackedViewShell.d.ts +50 -0
- package/dist/ui/components/StackedViewShell.js +39 -0
- package/dist/ui/components/StarRating.d.ts +17 -0
- package/dist/ui/components/StarRating.js +29 -0
- package/dist/ui/components/StarRating.style.css +44 -0
- package/dist/ui/components/StatsGrid.d.ts +18 -0
- package/dist/ui/components/StatsGrid.js +17 -0
- package/dist/ui/components/StatsGrid.style.css +96 -0
- package/dist/ui/components/StatusBadge.d.ts +18 -0
- package/dist/ui/components/StatusBadge.js +60 -0
- package/dist/ui/components/StatusBadge.style.css +5 -0
- package/dist/ui/components/StepperNav.d.ts +10 -0
- package/dist/ui/components/StepperNav.js +23 -0
- package/dist/ui/components/StepperNav.style.css +110 -0
- package/dist/ui/components/SummaryCard.d.ts +21 -0
- package/dist/ui/components/SummaryCard.js +15 -0
- package/dist/ui/components/SummaryCard.style.css +82 -0
- package/dist/ui/components/TabStrip.d.ts +34 -0
- package/dist/ui/components/TabStrip.js +57 -0
- package/dist/ui/components/TabStrip.style.css +97 -0
- package/dist/ui/components/TablePagination.d.ts +21 -0
- package/dist/ui/components/TablePagination.js +32 -0
- package/dist/ui/components/TablePagination.style.css +89 -0
- package/dist/ui/components/Tabs.d.ts +28 -0
- package/dist/ui/components/Tabs.js +41 -0
- package/dist/ui/components/Tabs.style.css +46 -0
- package/dist/ui/components/TagInput.d.ts +10 -0
- package/dist/ui/components/TagInput.js +60 -0
- package/dist/ui/components/TagInput.style.css +121 -0
- package/dist/ui/components/TextLink.d.ts +42 -0
- package/dist/ui/components/TextLink.js +48 -0
- package/dist/ui/components/TextLink.style.css +94 -0
- package/dist/ui/components/Textarea.d.ts +9 -0
- package/dist/ui/components/Textarea.js +21 -0
- package/dist/ui/components/Textarea.style.css +30 -0
- package/dist/ui/components/Toast.d.ts +15 -0
- package/dist/ui/components/Toast.js +61 -0
- package/dist/ui/components/Toast.style.css +114 -0
- package/dist/ui/components/Toggle.d.ts +12 -0
- package/dist/ui/components/Toggle.js +47 -0
- package/dist/ui/components/Toggle.style.css +107 -0
- package/dist/ui/components/Tooltip.d.ts +34 -0
- package/dist/ui/components/Tooltip.js +110 -0
- package/dist/ui/components/Tooltip.style.css +114 -0
- package/dist/ui/components/Typography.d.ts +50 -0
- package/dist/ui/components/Typography.js +103 -0
- package/dist/ui/components/Typography.style.css +178 -0
- package/dist/ui/components/UnsavedChangesModal.d.ts +17 -0
- package/dist/ui/components/UnsavedChangesModal.js +52 -0
- package/dist/ui/components/UnsavedChangesModal.style.css +33 -0
- package/dist/ui/components/ViewToggle.d.ts +15 -0
- package/dist/ui/components/ViewToggle.js +29 -0
- package/dist/ui/components/ViewToggle.style.css +50 -0
- package/dist/ui/components/index.style.css +76 -0
- package/dist/ui/index.d.ts +165 -1644
- package/dist/ui/index.js +87 -4784
- package/dist/ui/rich-text/RichText.d.ts +46 -0
- package/dist/ui/rich-text/RichText.js +172 -0
- package/dist/ui/rich-text/RichText.style.css +5 -0
- package/dist/ui/rich-text/index.d.ts +2 -0
- package/dist/ui/rich-text/index.js +1 -0
- package/dist/ui/style.helper.d.ts +7 -0
- package/dist/ui/style.helper.js +12 -0
- package/dist/utils/animation.helper.d.ts +19 -0
- package/dist/utils/animation.helper.js +19 -0
- package/dist/utils/array.helper.d.ts +17 -0
- package/dist/utils/array.helper.js +53 -0
- package/dist/utils/business-day.d.ts +47 -0
- package/dist/utils/business-day.js +68 -0
- package/dist/utils/client.d.ts +1 -0
- package/dist/utils/client.js +1 -0
- package/dist/utils/color.helper.d.ts +32 -0
- package/dist/utils/color.helper.js +51 -0
- package/dist/utils/cookie.converter.d.ts +7 -0
- package/dist/utils/cookie.converter.js +32 -0
- package/dist/utils/date.formatter.d.ts +22 -0
- package/dist/utils/date.formatter.js +194 -0
- package/dist/utils/event-manager.d.ts +45 -0
- package/dist/utils/event-manager.js +185 -0
- package/dist/utils/filter.helper.d.ts +18 -0
- package/dist/utils/filter.helper.js +21 -0
- package/dist/utils/id-generators.d.ts +243 -0
- package/dist/utils/id-generators.js +360 -0
- package/dist/utils/index.d.ts +17 -545
- package/dist/utils/index.js +18 -4
- package/dist/utils/media-field.d.ts +2 -0
- package/dist/utils/media-field.js +1 -0
- package/dist/utils/number.formatter.d.ts +13 -0
- package/dist/utils/number.formatter.js +100 -0
- package/dist/utils/object.helper.d.ts +16 -0
- package/dist/utils/object.helper.js +82 -0
- package/dist/utils/pagination.helper.d.ts +23 -0
- package/dist/utils/pagination.helper.js +24 -0
- package/dist/utils/schema-ui.d.ts +83 -0
- package/dist/utils/schema-ui.js +185 -0
- package/dist/utils/sorting.helper.d.ts +7 -0
- package/dist/utils/sorting.helper.js +16 -0
- package/dist/utils/string.formatter.d.ts +19 -0
- package/dist/utils/string.formatter.js +140 -0
- package/dist/utils/type.converter.d.ts +14 -0
- package/dist/utils/type.converter.js +61 -0
- package/dist/validation/ZodSetup.d.ts +5 -0
- package/dist/validation/ZodSetup.js +11 -0
- package/dist/validation/email.validator.d.ts +7 -0
- package/dist/validation/email.validator.js +33 -0
- package/dist/validation/index.d.ts +9 -126
- package/dist/validation/index.js +8 -4
- package/dist/validation/input.validator.d.ts +11 -0
- package/dist/validation/input.validator.js +33 -0
- package/dist/validation/password.validator.d.ts +21 -0
- package/dist/validation/password.validator.js +77 -0
- package/dist/validation/phone.validator.d.ts +9 -0
- package/dist/validation/phone.validator.js +41 -0
- package/dist/validation/schemas.d.ts +267 -0
- package/dist/validation/schemas.js +176 -0
- package/dist/validation/url.validator.d.ts +7 -0
- package/dist/validation/url.validator.js +44 -0
- package/dist/validation/zod-error-map.d.ts +17 -0
- package/dist/validation/zod-error-map.js +85 -0
- package/dist/values/index.d.ts +6 -0
- package/dist/values/index.js +6 -0
- package/dist/values/success-messages.d.ts +242 -0
- package/dist/values/success-messages.js +272 -0
- package/package.json +87 -445
- package/dist/chunk-2NMEKWO5.js +0 -35
- package/dist/chunk-2NMEKWO5.js.map +0 -1
- package/dist/chunk-6344OTT4.js +0 -329
- package/dist/chunk-6344OTT4.js.map +0 -1
- package/dist/chunk-7HUFI4MW.cjs +0 -941
- package/dist/chunk-7HUFI4MW.cjs.map +0 -1
- package/dist/chunk-AZ2XDBYA.cjs +0 -150
- package/dist/chunk-AZ2XDBYA.cjs.map +0 -1
- package/dist/chunk-CI4ZFLS7.js +0 -1162
- package/dist/chunk-CI4ZFLS7.js.map +0 -1
- package/dist/chunk-DSCHV5OD.js +0 -620
- package/dist/chunk-DSCHV5OD.js.map +0 -1
- package/dist/chunk-EEMSMWIZ.js +0 -566
- package/dist/chunk-EEMSMWIZ.js.map +0 -1
- package/dist/chunk-EPJNBIKL.js +0 -916
- package/dist/chunk-EPJNBIKL.js.map +0 -1
- package/dist/chunk-FJEY6LN2.cjs +0 -64
- package/dist/chunk-FJEY6LN2.cjs.map +0 -1
- package/dist/chunk-GZXXRVTM.cjs +0 -343
- package/dist/chunk-GZXXRVTM.cjs.map +0 -1
- package/dist/chunk-IE5L2QHV.js +0 -204
- package/dist/chunk-IE5L2QHV.js.map +0 -1
- package/dist/chunk-JPHORBTI.cjs +0 -366
- package/dist/chunk-JPHORBTI.cjs.map +0 -1
- package/dist/chunk-K4C5Z22R.js +0 -146
- package/dist/chunk-K4C5Z22R.js.map +0 -1
- package/dist/chunk-PAHR3D5L.js +0 -56
- package/dist/chunk-PAHR3D5L.js.map +0 -1
- package/dist/chunk-PE44UBFV.js +0 -324
- package/dist/chunk-PE44UBFV.js.map +0 -1
- package/dist/chunk-RNELVIKK.cjs +0 -1287
- package/dist/chunk-RNELVIKK.cjs.map +0 -1
- package/dist/chunk-S367Y35J.cjs +0 -39
- package/dist/chunk-S367Y35J.cjs.map +0 -1
- package/dist/chunk-ULLW73KN.cjs +0 -217
- package/dist/chunk-ULLW73KN.cjs.map +0 -1
- package/dist/chunk-UNYFAUWW.cjs +0 -630
- package/dist/chunk-UNYFAUWW.cjs.map +0 -1
- package/dist/chunk-V55QYTXF.js +0 -259
- package/dist/chunk-V55QYTXF.js.map +0 -1
- package/dist/chunk-WKVCFDEA.cjs +0 -599
- package/dist/chunk-WKVCFDEA.cjs.map +0 -1
- package/dist/chunk-YT4QVIBP.cjs +0 -292
- package/dist/chunk-YT4QVIBP.cjs.map +0 -1
- package/dist/cli/index.cjs +0 -155
- package/dist/cli/index.cjs.map +0 -1
- package/dist/cli/index.d.cts +0 -41
- package/dist/cli/index.js.map +0 -1
- package/dist/contracts/index.cjs +0 -37
- package/dist/contracts/index.cjs.map +0 -1
- package/dist/contracts/index.d.cts +0 -728
- package/dist/contracts/index.js.map +0 -1
- package/dist/core/index.cjs +0 -84
- package/dist/core/index.cjs.map +0 -1
- package/dist/core/index.d.cts +0 -329
- package/dist/core/index.js.map +0 -1
- package/dist/errors/index.cjs +0 -57
- package/dist/errors/index.cjs.map +0 -1
- package/dist/errors/index.d.cts +0 -96
- package/dist/errors/index.js.map +0 -1
- package/dist/extend-D57fwPSu.d.cts +0 -122
- package/dist/extend-D57fwPSu.d.ts +0 -122
- package/dist/extend-D_0wzsse.d.cts +0 -79
- package/dist/extend-D_0wzsse.d.ts +0 -79
- package/dist/extend-jcOQfU2G.d.cts +0 -162
- package/dist/extend-jcOQfU2G.d.ts +0 -162
- package/dist/feature-C8mVv66I.d.cts +0 -84
- package/dist/feature-C8mVv66I.d.ts +0 -84
- package/dist/feature-DENiK3vd.d.cts +0 -55
- package/dist/feature-DENiK3vd.d.ts +0 -55
- package/dist/feature-RWXQ_lnf.d.cts +0 -41
- package/dist/feature-RWXQ_lnf.d.ts +0 -41
- package/dist/features/about/index.cjs +0 -286
- package/dist/features/about/index.cjs.map +0 -1
- package/dist/features/about/index.d.cts +0 -42
- package/dist/features/about/index.js.map +0 -1
- package/dist/features/account/index.cjs +0 -1032
- package/dist/features/account/index.cjs.map +0 -1
- package/dist/features/account/index.d.cts +0 -555
- package/dist/features/account/index.js.map +0 -1
- package/dist/features/admin/index.cjs +0 -2747
- package/dist/features/admin/index.cjs.map +0 -1
- package/dist/features/admin/index.d.cts +0 -554
- package/dist/features/admin/index.js.map +0 -1
- package/dist/features/auctions/index.cjs +0 -1219
- package/dist/features/auctions/index.cjs.map +0 -1
- package/dist/features/auctions/index.d.cts +0 -513
- package/dist/features/auctions/index.js.map +0 -1
- package/dist/features/auth/index.cjs +0 -1897
- package/dist/features/auth/index.cjs.map +0 -1
- package/dist/features/auth/index.d.cts +0 -315
- package/dist/features/auth/index.js.map +0 -1
- package/dist/features/auth/server.cjs +0 -531
- package/dist/features/auth/server.cjs.map +0 -1
- package/dist/features/auth/server.d.cts +0 -24
- package/dist/features/auth/server.js.map +0 -1
- package/dist/features/before-after/index.cjs +0 -559
- package/dist/features/before-after/index.cjs.map +0 -1
- package/dist/features/before-after/index.d.cts +0 -128
- package/dist/features/before-after/index.js.map +0 -1
- package/dist/features/blog/index.cjs +0 -4088
- package/dist/features/blog/index.cjs.map +0 -1
- package/dist/features/blog/index.d.cts +0 -492
- package/dist/features/blog/index.js.map +0 -1
- package/dist/features/blog/server.cjs +0 -184
- package/dist/features/blog/server.cjs.map +0 -1
- package/dist/features/blog/server.d.cts +0 -74
- package/dist/features/blog/server.js.map +0 -1
- package/dist/features/cart/index.cjs +0 -1097
- package/dist/features/cart/index.cjs.map +0 -1
- package/dist/features/cart/index.d.cts +0 -451
- package/dist/features/cart/index.js.map +0 -1
- package/dist/features/categories/index.cjs +0 -2062
- package/dist/features/categories/index.cjs.map +0 -1
- package/dist/features/categories/index.d.cts +0 -461
- package/dist/features/categories/index.js.map +0 -1
- package/dist/features/categories/server.cjs +0 -796
- package/dist/features/categories/server.cjs.map +0 -1
- package/dist/features/categories/server.d.cts +0 -47
- package/dist/features/categories/server.js.map +0 -1
- package/dist/features/checkout/index.cjs +0 -200
- package/dist/features/checkout/index.cjs.map +0 -1
- package/dist/features/checkout/index.d.cts +0 -70
- package/dist/features/checkout/index.js.map +0 -1
- package/dist/features/cms/index.cjs +0 -5
- package/dist/features/cms/index.cjs.map +0 -1
- package/dist/features/cms/index.d.cts +0 -2
- package/dist/features/cms/index.js.map +0 -1
- package/dist/features/collections/index.cjs +0 -394
- package/dist/features/collections/index.cjs.map +0 -1
- package/dist/features/collections/index.d.cts +0 -148
- package/dist/features/collections/index.js.map +0 -1
- package/dist/features/consultation/index.cjs +0 -1099
- package/dist/features/consultation/index.cjs.map +0 -1
- package/dist/features/consultation/index.d.cts +0 -172
- package/dist/features/consultation/index.js.map +0 -1
- package/dist/features/contact/index.cjs +0 -593
- package/dist/features/contact/index.cjs.map +0 -1
- package/dist/features/contact/index.d.cts +0 -56
- package/dist/features/contact/index.js.map +0 -1
- package/dist/features/copilot/index.cjs +0 -688
- package/dist/features/copilot/index.cjs.map +0 -1
- package/dist/features/copilot/index.d.cts +0 -47
- package/dist/features/copilot/index.js.map +0 -1
- package/dist/features/corporate/index.cjs +0 -796
- package/dist/features/corporate/index.cjs.map +0 -1
- package/dist/features/corporate/index.d.cts +0 -183
- package/dist/features/corporate/index.js.map +0 -1
- package/dist/features/events/index.cjs +0 -1486
- package/dist/features/events/index.cjs.map +0 -1
- package/dist/features/events/index.d.cts +0 -841
- package/dist/features/events/index.js.map +0 -1
- package/dist/features/events/server.cjs +0 -199
- package/dist/features/events/server.cjs.map +0 -1
- package/dist/features/events/server.d.cts +0 -40
- package/dist/features/events/server.js.map +0 -1
- package/dist/features/faq/index.cjs +0 -1714
- package/dist/features/faq/index.cjs.map +0 -1
- package/dist/features/faq/index.d.cts +0 -619
- package/dist/features/faq/index.js.map +0 -1
- package/dist/features/filters/index.cjs +0 -1073
- package/dist/features/filters/index.cjs.map +0 -1
- package/dist/features/filters/index.d.cts +0 -136
- package/dist/features/filters/index.js.map +0 -1
- package/dist/features/forms/index.cjs +0 -936
- package/dist/features/forms/index.cjs.map +0 -1
- package/dist/features/forms/index.d.cts +0 -129
- package/dist/features/forms/index.js.map +0 -1
- package/dist/features/homepage/index.cjs +0 -6321
- package/dist/features/homepage/index.cjs.map +0 -1
- package/dist/features/homepage/index.d.cts +0 -846
- package/dist/features/homepage/index.js.map +0 -1
- package/dist/features/homepage/server.cjs +0 -1038
- package/dist/features/homepage/server.cjs.map +0 -1
- package/dist/features/homepage/server.d.cts +0 -121
- package/dist/features/homepage/server.js.map +0 -1
- package/dist/features/layout/index.cjs +0 -1766
- package/dist/features/layout/index.cjs.map +0 -1
- package/dist/features/layout/index.d.cts +0 -315
- package/dist/features/layout/index.js.map +0 -1
- package/dist/features/loyalty/index.cjs +0 -352
- package/dist/features/loyalty/index.cjs.map +0 -1
- package/dist/features/loyalty/index.d.cts +0 -174
- package/dist/features/loyalty/index.js.map +0 -1
- package/dist/features/media/index.cjs +0 -3620
- package/dist/features/media/index.cjs.map +0 -1
- package/dist/features/media/index.d.cts +0 -425
- package/dist/features/media/index.js.map +0 -1
- package/dist/features/orders/index.cjs +0 -882
- package/dist/features/orders/index.cjs.map +0 -1
- package/dist/features/orders/index.d.cts +0 -370
- package/dist/features/orders/index.js.map +0 -1
- package/dist/features/payments/index.cjs +0 -341
- package/dist/features/payments/index.cjs.map +0 -1
- package/dist/features/payments/index.d.cts +0 -141
- package/dist/features/payments/index.js.map +0 -1
- package/dist/features/pre-orders/index.cjs +0 -558
- package/dist/features/pre-orders/index.cjs.map +0 -1
- package/dist/features/pre-orders/index.d.cts +0 -170
- package/dist/features/pre-orders/index.js.map +0 -1
- package/dist/features/pre-orders/server.cjs +0 -111
- package/dist/features/pre-orders/server.cjs.map +0 -1
- package/dist/features/pre-orders/server.d.cts +0 -17
- package/dist/features/pre-orders/server.js.map +0 -1
- package/dist/features/products/index.cjs +0 -2513
- package/dist/features/products/index.cjs.map +0 -1
- package/dist/features/products/index.d.cts +0 -1066
- package/dist/features/products/index.js.map +0 -1
- package/dist/features/products/server.cjs +0 -809
- package/dist/features/products/server.cjs.map +0 -1
- package/dist/features/products/server.d.cts +0 -52
- package/dist/features/products/server.js.map +0 -1
- package/dist/features/promotions/index.cjs +0 -977
- package/dist/features/promotions/index.cjs.map +0 -1
- package/dist/features/promotions/index.d.cts +0 -301
- package/dist/features/promotions/index.js.map +0 -1
- package/dist/features/reviews/index.cjs +0 -2324
- package/dist/features/reviews/index.cjs.map +0 -1
- package/dist/features/reviews/index.d.cts +0 -434
- package/dist/features/reviews/index.js.map +0 -1
- package/dist/features/reviews/server.cjs +0 -776
- package/dist/features/reviews/server.cjs.map +0 -1
- package/dist/features/reviews/server.d.cts +0 -49
- package/dist/features/reviews/server.js.map +0 -1
- package/dist/features/search/index.cjs +0 -1368
- package/dist/features/search/index.cjs.map +0 -1
- package/dist/features/search/index.d.cts +0 -298
- package/dist/features/search/index.js.map +0 -1
- package/dist/features/search/server.cjs +0 -154
- package/dist/features/search/server.cjs.map +0 -1
- package/dist/features/search/server.d.cts +0 -83
- package/dist/features/search/server.js.map +0 -1
- package/dist/features/seller/index.cjs +0 -2086
- package/dist/features/seller/index.cjs.map +0 -1
- package/dist/features/seller/index.d.cts +0 -926
- package/dist/features/seller/index.js.map +0 -1
- package/dist/features/stores/index.cjs +0 -1942
- package/dist/features/stores/index.cjs.map +0 -1
- package/dist/features/stores/index.d.cts +0 -536
- package/dist/features/stores/index.js.map +0 -1
- package/dist/features/stores/server.cjs +0 -451
- package/dist/features/stores/server.cjs.map +0 -1
- package/dist/features/stores/server.d.cts +0 -106
- package/dist/features/stores/server.js.map +0 -1
- package/dist/features/whatsapp-bot/index.cjs +0 -168
- package/dist/features/whatsapp-bot/index.cjs.map +0 -1
- package/dist/features/whatsapp-bot/index.d.cts +0 -85
- package/dist/features/whatsapp-bot/index.js.map +0 -1
- package/dist/features/wishlist/index.cjs +0 -904
- package/dist/features/wishlist/index.cjs.map +0 -1
- package/dist/features/wishlist/index.d.cts +0 -360
- package/dist/features/wishlist/index.js.map +0 -1
- package/dist/http/index.cjs +0 -21
- package/dist/http/index.cjs.map +0 -1
- package/dist/http/index.d.cts +0 -61
- package/dist/http/index.js.map +0 -1
- package/dist/index-B6T9NNcG.d.cts +0 -9
- package/dist/index-B6T9NNcG.d.ts +0 -9
- package/dist/index-CakUKzrE.d.cts +0 -10
- package/dist/index-CakUKzrE.d.ts +0 -10
- package/dist/index-D0Fxv9Z8.d.cts +0 -32
- package/dist/index-D0Fxv9Z8.d.ts +0 -32
- package/dist/index-Dh42RtMY.d.cts +0 -54
- package/dist/index-Dh42RtMY.d.ts +0 -54
- package/dist/index.cjs +0 -1182
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -17
- package/dist/index.js.map +0 -1
- package/dist/instrumentation/index.cjs +0 -17
- package/dist/instrumentation/index.cjs.map +0 -1
- package/dist/instrumentation/index.d.cts +0 -66
- package/dist/instrumentation/index.js.map +0 -1
- package/dist/monitoring/index.cjs +0 -141
- package/dist/monitoring/index.cjs.map +0 -1
- package/dist/monitoring/index.d.cts +0 -181
- package/dist/monitoring/index.js.map +0 -1
- package/dist/next/index.cjs +0 -693
- package/dist/next/index.cjs.map +0 -1
- package/dist/next/index.d.cts +0 -777
- package/dist/next/index.js.map +0 -1
- package/dist/providers/auth-firebase/index.cjs +0 -400
- package/dist/providers/auth-firebase/index.cjs.map +0 -1
- package/dist/providers/auth-firebase/index.d.cts +0 -137
- package/dist/providers/auth-firebase/index.js.map +0 -1
- package/dist/providers/db-firebase/index.cjs +0 -533
- package/dist/providers/db-firebase/index.cjs.map +0 -1
- package/dist/providers/db-firebase/index.d.cts +0 -265
- package/dist/providers/db-firebase/index.js.map +0 -1
- package/dist/providers/email-resend/index.cjs +0 -58
- package/dist/providers/email-resend/index.cjs.map +0 -1
- package/dist/providers/email-resend/index.d.cts +0 -73
- package/dist/providers/email-resend/index.js.map +0 -1
- package/dist/providers/payment-razorpay/index.cjs +0 -111
- package/dist/providers/payment-razorpay/index.cjs.map +0 -1
- package/dist/providers/payment-razorpay/index.d.cts +0 -96
- package/dist/providers/payment-razorpay/index.js.map +0 -1
- package/dist/providers/search-algolia/index.cjs +0 -301
- package/dist/providers/search-algolia/index.cjs.map +0 -1
- package/dist/providers/search-algolia/index.d.cts +0 -251
- package/dist/providers/search-algolia/index.d.ts +0 -251
- package/dist/providers/search-algolia/index.js +0 -280
- package/dist/providers/search-algolia/index.js.map +0 -1
- package/dist/providers/shipping-shiprocket/index.cjs +0 -147
- package/dist/providers/shipping-shiprocket/index.cjs.map +0 -1
- package/dist/providers/shipping-shiprocket/index.d.cts +0 -236
- package/dist/providers/shipping-shiprocket/index.js.map +0 -1
- package/dist/providers/storage-firebase/index.cjs +0 -176
- package/dist/providers/storage-firebase/index.cjs.map +0 -1
- package/dist/providers/storage-firebase/index.d.cts +0 -53
- package/dist/providers/storage-firebase/index.js.map +0 -1
- package/dist/react/index.cjs +0 -1687
- package/dist/react/index.cjs.map +0 -1
- package/dist/react/index.d.cts +0 -788
- package/dist/react/index.js.map +0 -1
- package/dist/repository-BO60jtdT.d.cts +0 -61
- package/dist/repository-BO60jtdT.d.ts +0 -61
- package/dist/repository-jKU_Ji1P.d.cts +0 -44
- package/dist/repository-jKU_Ji1P.d.ts +0 -44
- package/dist/security/index.cjs +0 -138
- package/dist/security/index.cjs.map +0 -1
- package/dist/security/index.d.cts +0 -309
- package/dist/security/index.js.map +0 -1
- package/dist/seed/index.cjs +0 -1085
- package/dist/seed/index.cjs.map +0 -1
- package/dist/seed/index.d.cts +0 -397
- package/dist/seed/index.js.map +0 -1
- package/dist/seo/index.cjs +0 -81
- package/dist/seo/index.cjs.map +0 -1
- package/dist/seo/index.d.cts +0 -150
- package/dist/seo/index.js.map +0 -1
- package/dist/style/tailwind/index.cjs +0 -40
- package/dist/style/tailwind/index.cjs.map +0 -1
- package/dist/style/tailwind/index.d.cts +0 -34
- package/dist/style/tailwind/index.js.map +0 -1
- package/dist/style/vanilla/index.cjs +0 -40
- package/dist/style/vanilla/index.cjs.map +0 -1
- package/dist/style/vanilla/index.d.cts +0 -26
- package/dist/style/vanilla/index.js.map +0 -1
- package/dist/style-BSlM-eWG.d.cts +0 -25
- package/dist/style-BSlM-eWG.d.ts +0 -25
- package/dist/tokens/index.cjs +0 -45
- package/dist/tokens/index.cjs.map +0 -1
- package/dist/tokens/index.d.cts +0 -734
- package/dist/tokens/index.js.map +0 -1
- package/dist/ui/index.cjs +0 -4870
- package/dist/ui/index.cjs.map +0 -1
- package/dist/ui/index.d.cts +0 -1644
- package/dist/ui/index.js.map +0 -1
- package/dist/utils/index.cjs +0 -505
- package/dist/utils/index.cjs.map +0 -1
- package/dist/utils/index.d.cts +0 -545
- package/dist/utils/index.js.map +0 -1
- package/dist/validation/index.cjs +0 -153
- package/dist/validation/index.cjs.map +0 -1
- package/dist/validation/index.d.cts +0 -126
- package/dist/validation/index.js.map +0 -1
package/dist/react/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/errors/base-error.ts","../../src/errors/error-codes.ts","../../src/errors/api-error.ts","../../src/errors/validation-error.ts","../../src/errors/authentication-error.ts","../../src/errors/authorization-error.ts","../../src/errors/not-found-error.ts","../../src/errors/database-error.ts","../../src/errors/error-handler.ts","../../src/errors/index.ts","../../src/react/hooks/useMediaQuery.ts","../../src/react/hooks/useBreakpoint.ts","../../src/react/hooks/useClickOutside.ts","../../src/react/hooks/useKeyPress.ts","../../src/react/hooks/useLongPress.ts","../../src/react/hooks/useGesture.ts","../../src/react/hooks/useSwipe.ts","../../src/react/hooks/usePullToRefresh.ts","../../src/react/hooks/useCountdown.ts","../../src/react/hooks/useCamera.ts","../../src/react/hooks/useBulkSelection.ts","../../src/react/hooks/useUrlTable.ts","../../src/react/hooks/usePendingFilters.ts","../../src/react/hooks/usePendingTable.ts","../../src/react/hooks/useUnsavedChanges.ts","../../src/react/hooks/useBulkAction.ts","../../src/react/hooks/useContainerGrid.ts","../../src/react/hooks/useVisibleItems.ts","../../src/react/useModalStack.ts","../../src/core/Logger.ts","../../src/core/Queue.ts","../../src/core/StorageManager.ts","../../src/core/EventBus.ts","../../src/security/authorization.ts","../../src/monitoring/error-tracking.ts","../../src/monitoring/client-logger.ts","../../src/monitoring/server-logger.ts","../../src/react/ErrorBoundary.tsx"],"names":["useState","useEffect","useRef","useMemo","useCallback","useRouter","usePathname","useSearchParams","_a","_b","error","jsxs","jsx","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,eAAA,GAAA,KAAA,CAAA;AAAA,EAAA,0BAAA,GAAA;AAAA,EAAA;AAAA,CAAA,CAAA;;;ACAA,IAAA,gBAAA,GAAA,KAAA,CAAA;AAAA,EAAA,2BAAA,GAAA;AAAA,EAAA;AAAA,CAAA,CAAA;;;ACAA,IAAA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E,WAAA;AAAY,KACnC,CAAA;AAED,IAAA,UAAA,CAAW,KAAA,EAAA,IAAA,WAAA,MAAA,YAA2C;AAEtD,IAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAA,CAAK,KAAA,EAAM,OAAA,KAAX,IAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAA,CAAA,EAAA,EAAqB,KAAA,EAAO,SAAA,CAAA;AAAA,EAC9B;AAAA,EAMA,MAAA,GAAS;AACP,IAAA,IAAI,CAAC,IAAA,CAAK,KAAA,CAAM,QAAA,EAAU;AACxB,MAAA,OAAO,KAAK,KAAA,CAAM,QAAA;AAAA,IACpB;AAEA,IAAA,IAAI,IAAA,CAAK,MAAM,cAAA,EAAgB;AAC7B,MAAA,OAAO,KAAK,KAAA,CAAM,cAAA,CAAe,KAAK,KAAA,CAAM,KAAA,EAAO,KAAK,WAAW,CAAA;AAAA,IACrE;AAEA,IAAA,IAAI,IAAA,CAAK,MAAM,QAAA,EAAU;AACvB,MAAA,OAAO,KAAK,KAAA,CAAM,QAAA;AAAA,IACpB;AAEA,IAAA,uBACED,eAAC,eAAA,EAAA,EAAgB,KAAA,EAAO,KAAK,KAAA,CAAM,KAAA,EAAO,OAAA,EAAS,IAAA,CAAK,WAAA,EAAa,CAAA;AAAA,EAEzE;AACF","file":"index.cjs","sourcesContent":["export class AppError extends Error {\n constructor(\n public statusCode: number,\n public message: string,\n public code: string,\n public data?: unknown,\n ) {\n super(message);\n this.name = this.constructor.name;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n\n toJSON(): {\n success: false;\n error: string;\n code: string;\n statusCode: number;\n data?: unknown;\n } {\n return {\n success: false,\n error: this.message,\n code: this.code,\n statusCode: this.statusCode,\n ...(this.data !== undefined && { data: this.data }),\n };\n }\n}\n","export const ERROR_CODES = {\n // Authentication\n AUTH_INVALID_CREDENTIALS: \"AUTH_001\",\n AUTH_TOKEN_EXPIRED: \"AUTH_002\",\n AUTH_TOKEN_INVALID: \"AUTH_003\",\n AUTH_SESSION_EXPIRED: \"AUTH_004\",\n AUTH_EMAIL_NOT_VERIFIED: \"AUTH_005\",\n\n // Validation\n VALIDATION_REQUIRED_FIELD: \"VAL_001\",\n VALIDATION_INVALID_INPUT: \"VAL_002\",\n VALIDATION_INVALID_EMAIL: \"VAL_003\",\n VALIDATION_INVALID_PASSWORD: \"VAL_004\",\n VALIDATION_INVALID_PHONE: \"VAL_005\",\n\n // User\n USER_NOT_FOUND: \"USER_001\",\n USER_ALREADY_EXISTS: \"USER_002\",\n USER_NOT_AUTHENTICATED: \"USER_003\",\n USER_ACCOUNT_DISABLED: \"USER_004\",\n\n // Database\n DB_OPERATION_FAILED: \"DB_001\",\n DB_NOT_FOUND: \"DB_002\",\n DB_DUPLICATE_ENTRY: \"DB_003\",\n\n // Email\n EMAIL_SEND_FAILED: \"EMAIL_001\",\n EMAIL_INVALID_TEMPLATE: \"EMAIL_002\",\n EMAIL_RATE_LIMITED: \"EMAIL_003\",\n EMAIL_DELIVERY_FAILED: \"EMAIL_004\",\n\n // Password\n PWD_RESET_TOKEN_EXPIRED: \"PWD_001\",\n PWD_RESET_TOKEN_INVALID: \"PWD_002\",\n PWD_TOO_WEAK: \"PWD_003\",\n PWD_HISTORY_REUSE: \"PWD_004\",\n PWD_SAME_AS_CURRENT: \"PWD_005\",\n\n // Authorization\n AUTHZ_FORBIDDEN: \"AUTHZ_001\",\n AUTHZ_INSUFFICIENT_ROLE: \"AUTHZ_002\",\n\n // General\n GEN_BAD_REQUEST: \"GEN_001\",\n GEN_NOT_FOUND: \"GEN_002\",\n GEN_INTERNAL_ERROR: \"GEN_003\",\n GEN_SERVICE_UNAVAILABLE: \"GEN_004\",\n GEN_RATE_LIMITED: \"GEN_005\",\n GEN_UNKNOWN: \"GEN_999\",\n} as const;\n\nexport type ErrorCode = (typeof ERROR_CODES)[keyof typeof ERROR_CODES];\n\nexport const ERROR_MESSAGES: Record<ErrorCode, string> = {\n // Authentication\n AUTH_001: \"Invalid email or password\",\n AUTH_002: \"Your session has expired. Please log in again\",\n AUTH_003: \"Invalid authentication token\",\n AUTH_004: \"Your session has expired. Please log in again\",\n AUTH_005: \"Please verify your email address before logging in\",\n\n // Validation\n VAL_001: \"This field is required\",\n VAL_002: \"Invalid input provided\",\n VAL_003: \"Please enter a valid email address\",\n VAL_004:\n \"Password must be at least 12 characters with uppercase, lowercase, number and special character\",\n VAL_005: \"Please enter a valid phone number\",\n\n // User\n USER_001: \"User not found\",\n USER_002: \"An account with this email already exists\",\n USER_003: \"Please log in to continue\",\n USER_004: \"Your account has been disabled. Please contact support\",\n\n // Database\n DB_001: \"A database error occurred. Please try again\",\n DB_002: \"The requested resource was not found\",\n DB_003: \"This record already exists\",\n\n // Email\n EMAIL_001: \"Failed to send email. Please try again\",\n EMAIL_002: \"Invalid email template\",\n EMAIL_003: \"Too many emails sent. Please wait before trying again\",\n EMAIL_004: \"Email delivery failed. Please check the address and try again\",\n\n // Password\n PWD_001: \"Password reset link has expired. Please request a new one\",\n PWD_002: \"Invalid password reset link\",\n PWD_003: \"Password does not meet security requirements\",\n PWD_004: \"Cannot reuse a recent password\",\n PWD_005: \"New password must be different from your current password\",\n\n // Authorization\n AUTHZ_001: \"You do not have permission to perform this action\",\n AUTHZ_002: \"Insufficient role to perform this action\",\n\n // General\n GEN_001: \"Bad request\",\n GEN_002: \"The requested resource was not found\",\n GEN_003: \"An internal server error occurred\",\n GEN_004: \"Service temporarily unavailable\",\n GEN_005: \"Too many requests. Please slow down\",\n GEN_999: \"An unknown error occurred\",\n};\n","import { AppError } from \"./base-error\";\n\nexport class ApiError extends AppError {\n constructor(statusCode: number, message: string, data?: unknown) {\n super(statusCode, message, \"API_ERROR\", data);\n }\n}\n","import { AppError } from \"./base-error\";\n\nexport class ValidationError extends AppError {\n constructor(message: string, fields?: unknown) {\n super(400, message, \"VALIDATION_ERROR\", fields);\n }\n}\n","import { AppError } from \"./base-error\";\n\nexport class AuthenticationError extends AppError {\n constructor(message: string, data?: unknown) {\n super(401, message, \"AUTHENTICATION_ERROR\", data);\n }\n}\n","import { AppError } from \"./base-error\";\n\nexport class AuthorizationError extends AppError {\n constructor(message: string, data?: unknown) {\n super(403, message, \"AUTHORIZATION_ERROR\", data);\n }\n}\n","import { AppError } from \"./base-error\";\n\nexport class NotFoundError extends AppError {\n constructor(message: string, data?: unknown) {\n super(404, message, \"NOT_FOUND\", data);\n }\n}\n","import { AppError } from \"./base-error\";\n\nexport class DatabaseError extends AppError {\n constructor(message: string, data?: unknown) {\n super(500, message, \"DATABASE_ERROR\", data);\n }\n}\n","import { NextResponse } from \"next/server.js\";\nimport { AppError } from \"./base-error\";\nimport { ERROR_CODES, ERROR_MESSAGES } from \"./error-codes\";\n\n/**\n * Handle API errors with consistent response format.\n * Use in Next.js API route catch blocks.\n */\nexport function handleApiError(error: unknown): NextResponse {\n if (error instanceof AppError) {\n if (error.statusCode >= 500) {\n console.error(\"[API Error]\", {\n code: error.code,\n message: error.message,\n statusCode: error.statusCode,\n data: error.data,\n });\n }\n return NextResponse.json(error.toJSON(), { status: error.statusCode });\n }\n\n // Zod / schema validation errors\n if (error && typeof error === \"object\" && \"issues\" in error) {\n return NextResponse.json(\n {\n success: false,\n error: \"Validation failed\",\n code: ERROR_CODES.VALIDATION_INVALID_INPUT,\n data: error,\n },\n { status: 400 },\n );\n }\n\n console.error(\"[Unexpected API Error]\", {\n error:\n error instanceof Error\n ? { name: error.name, message: error.message, stack: error.stack }\n : error,\n });\n\n return NextResponse.json(\n {\n success: false,\n error: ERROR_MESSAGES[ERROR_CODES.GEN_INTERNAL_ERROR],\n code: ERROR_CODES.GEN_INTERNAL_ERROR,\n },\n { status: 500 },\n );\n}\n\n/**\n * Log an error with optional context. Wraps console.error for package portability;\n * replace with your structured logger if needed.\n */\nexport function logError(\n error: unknown,\n context?: Record<string, unknown>,\n): void {\n console.error(\"[Application Error]\", {\n ...(context && { context }),\n error:\n error instanceof Error\n ? { name: error.name, message: error.message, stack: error.stack }\n : error,\n });\n}\n\n/**\n * Type guard — check if a value is an AppError instance.\n */\nexport function isAppError(error: unknown): error is AppError {\n return error instanceof AppError;\n}\n","export { AppError } from \"./base-error\";\nexport { ERROR_CODES, ERROR_MESSAGES } from \"./error-codes\";\nexport type { ErrorCode } from \"./error-codes\";\nexport { ApiError } from \"./api-error\";\nexport { ValidationError } from \"./validation-error\";\nexport { AuthenticationError } from \"./authentication-error\";\nexport { AuthorizationError } from \"./authorization-error\";\nexport { NotFoundError } from \"./not-found-error\";\nexport { DatabaseError } from \"./database-error\";\n// error-handler uses `next/server` — only import in server/API-route contexts\nexport { handleApiError, logError, isAppError } from \"./error-handler\";\n","\"use client\";\n\nimport { useState, useEffect } from \"react\";\n\n/**\n * useMediaQuery Hook\n *\n * Detects if a CSS media query matches the current viewport.\n * Returns true/false based on whether the query matches.\n *\n * @param query - CSS media query string (e.g., '(min-width: 768px)')\n * @returns boolean - Whether the media query currently matches\n *\n * @example\n * ```tsx\n * const isMobile = useMediaQuery('(max-width: 767px)');\n * const isDesktop = useMediaQuery('(min-width: 1024px)');\n * ```\n */\nexport function useMediaQuery(query: string): boolean {\n const [matches, setMatches] = useState(\n // Lazy initializer: use real value on first client render, suppressing the flash.\n // Returns false on server (no window) — consistent with no-match default.\n () => typeof window !== \"undefined\" && window.matchMedia(query).matches,\n );\n\n useEffect(() => {\n if (typeof window === \"undefined\") return;\n\n const media = window.matchMedia(query);\n setMatches(media.matches);\n\n const listener = (e: MediaQueryListEvent) => setMatches(e.matches);\n media.addEventListener(\"change\", listener);\n\n return () => media.removeEventListener(\"change\", listener);\n }, [query]);\n\n return matches;\n}\n","\"use client\";\n\nimport { useMediaQuery } from \"./useMediaQuery\";\n\n/**\n * useBreakpoint Hook\n *\n * Convenience hook for detecting common Tailwind breakpoints.\n * Returns boolean flags and the current breakpoint name.\n *\n * Breakpoints (Tailwind defaults):\n * - Mobile: < 768px\n * - Tablet: 768px - 1023px\n * - Desktop: >= 1024px\n *\n * @returns Object with breakpoint detection flags\n *\n * @example\n * ```tsx\n * const { isMobile, isTablet, isDesktop, breakpoint } = useBreakpoint();\n *\n * if (isMobile) {\n * return <MobileView />;\n * }\n * return <DesktopView />;\n * ```\n */\nexport function useBreakpoint() {\n const isMobile = useMediaQuery(\"(max-width: 767px)\");\n const isTablet = useMediaQuery(\"(min-width: 768px) and (max-width: 1023px)\");\n const isDesktop = useMediaQuery(\"(min-width: 1024px)\");\n\n const breakpoint = isMobile ? \"mobile\" : isTablet ? \"tablet\" : \"desktop\";\n\n return {\n isMobile,\n isTablet,\n isDesktop,\n breakpoint: breakpoint as \"mobile\" | \"tablet\" | \"desktop\",\n };\n}\n","\"use client\";\n\nimport { useEffect, useRef, RefObject } from \"react\";\n\n/**\n * Configuration options for useClickOutside hook\n */\nexport interface UseClickOutsideOptions {\n /** Whether the hook is enabled */\n enabled?: boolean;\n /** Event type to listen for (default: 'mousedown') */\n eventType?: \"mousedown\" | \"mouseup\" | \"click\";\n /** Refs to additional elements that should be considered \"inside\" */\n additionalRefs?: RefObject<HTMLElement | null>[];\n}\n\nconst EMPTY_REFS: RefObject<HTMLElement | null>[] = [];\n\n/**\n * useClickOutside Hook\n *\n * Detects clicks outside of specified element(s) and triggers a callback.\n * Commonly used for dropdowns, modals, and popovers.\n *\n * @param ref - Primary element reference\n * @param callback - Function to call when clicking outside\n * @param options - Configuration options\n *\n * @example\n * ```tsx\n * const dropdownRef = useRef<HTMLDivElement>(null);\n * const triggerRef = useRef<HTMLButtonElement>(null);\n *\n * useClickOutside(dropdownRef, () => {\n * setIsOpen(false);\n * }, {\n * additionalRefs: [triggerRef],\n * enabled: isOpen,\n * });\n * ```\n */\nexport function useClickOutside<T extends HTMLElement = HTMLElement>(\n ref: RefObject<T | null>,\n callback: (event: MouseEvent | TouchEvent) => void,\n options: UseClickOutsideOptions = {},\n) {\n const {\n enabled = true,\n eventType = \"mousedown\",\n additionalRefs = EMPTY_REFS,\n } = options;\n\n // Store callback in a ref to avoid re-subscribing listeners on every render\n const callbackRef = useRef(callback);\n useEffect(() => {\n callbackRef.current = callback;\n }, [callback]);\n\n useEffect(() => {\n if (!enabled) return;\n\n const handleClickOutside = (event: MouseEvent | TouchEvent) => {\n // Check if click is outside the primary ref\n if (ref.current && !ref.current.contains(event.target as Node)) {\n // Check if click is outside all additional refs\n const isOutsideAll = additionalRefs.every(\n (additionalRef) =>\n !additionalRef.current ||\n !additionalRef.current.contains(event.target as Node),\n );\n\n if (isOutsideAll) {\n callbackRef.current(event);\n }\n }\n };\n\n // Add event listeners for both mouse and touch\n document.addEventListener(eventType, handleClickOutside);\n document.addEventListener(\"touchstart\", handleClickOutside);\n\n return () => {\n document.removeEventListener(eventType, handleClickOutside);\n document.removeEventListener(\"touchstart\", handleClickOutside);\n };\n }, [ref, enabled, eventType, additionalRefs]);\n}\n","\"use client\";\n\nimport { useEffect, useCallback, useRef, useMemo } from \"react\";\n\n/**\n * Key combination modifiers\n */\nexport interface KeyModifiers {\n ctrl?: boolean;\n shift?: boolean;\n alt?: boolean;\n meta?: boolean; // Command key on Mac\n}\n\n/**\n * Configuration options for useKeyPress hook\n */\nexport interface UseKeyPressOptions extends KeyModifiers {\n /** Whether the hook is enabled */\n enabled?: boolean;\n /** Event type to listen for (default: 'keydown') */\n eventType?: \"keydown\" | \"keyup\" | \"keypress\";\n /** Prevent default behavior */\n preventDefault?: boolean;\n /** Target element (default: document) */\n target?: HTMLElement | Document | Window;\n}\n\n/**\n * useKeyPress Hook\n *\n * Detects keyboard events with support for key combinations.\n * Useful for keyboard shortcuts and accessibility.\n *\n * @param key - Key or array of keys to listen for (e.g., 'Enter', 'Escape', ['a', 'A'])\n * @param callback - Function to call when key is pressed\n * @param options - Configuration options including modifiers\n *\n * @example\n * ```tsx\n * // Simple key press\n * useKeyPress('Escape', () => closeModal());\n *\n * // Key combination (Ctrl+S)\n * useKeyPress('s', handleSave, {\n * ctrl: true,\n * preventDefault: true,\n * });\n *\n * // Multiple keys\n * useKeyPress(['Enter', 'NumpadEnter'], handleSubmit);\n * ```\n */\nexport function useKeyPress(\n key: string | string[],\n callback: (event: KeyboardEvent) => void,\n options: UseKeyPressOptions = {},\n) {\n const {\n enabled = true,\n eventType = \"keydown\",\n preventDefault = false,\n ctrl = false,\n shift = false,\n alt = false,\n meta = false,\n target = typeof document !== \"undefined\" ? document : null,\n } = options;\n\n // Memoize keys array to avoid re-creation when `key` is a string\n const keys = useMemo(() => (Array.isArray(key) ? key : [key]), [key]);\n\n // Store callback in a ref to keep event listener stable\n const callbackRef = useRef(callback);\n useEffect(() => {\n callbackRef.current = callback;\n }, [callback]);\n\n const handleKeyPress = useCallback(\n (event: KeyboardEvent) => {\n // Check if pressed key matches any of the target keys\n const isKeyMatch = keys.some((k) => event.key === k || event.code === k);\n\n if (!isKeyMatch) return;\n\n // Check modifiers\n const modifiersMatch =\n event.ctrlKey === ctrl &&\n event.shiftKey === shift &&\n event.altKey === alt &&\n event.metaKey === meta;\n\n if (!modifiersMatch) return;\n\n if (preventDefault) {\n event.preventDefault();\n }\n\n callbackRef.current(event);\n },\n [keys, ctrl, shift, alt, meta, preventDefault],\n );\n\n useEffect(() => {\n if (!enabled || !target) return;\n\n target.addEventListener(eventType, handleKeyPress as EventListener);\n\n return () => {\n target.removeEventListener(eventType, handleKeyPress as EventListener);\n };\n }, [enabled, eventType, handleKeyPress, target]);\n}\n","\"use client\";\n\nimport { useRef, useCallback, useEffect } from \"react\";\n\n/**\n * useLongPress Hook\n *\n * Fires `callback` after the element is held for `ms` milliseconds.\n * A quick tap (pointer-up before the threshold) does NOT fire the callback.\n * Safe to use on both mouse and touch devices.\n *\n * @param callback - Function to call on long-press\n * @param ms - Hold duration in ms before callback fires (default: 500)\n *\n * @example\n * ```tsx\n * const longPress = useLongPress(() => openContextMenu(), 500);\n *\n * return (\n * <tr {...longPress}>…</tr>\n * );\n * ```\n */\nexport function useLongPress(callback: () => void, ms = 500) {\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n // Keep callback ref stable — avoids re-attaching on every render\n const callbackRef = useRef(callback);\n\n useEffect(() => {\n callbackRef.current = callback;\n }, [callback]);\n\n const start = useCallback(() => {\n timerRef.current = setTimeout(() => {\n callbackRef.current();\n }, ms);\n }, [ms]);\n\n const cancel = useCallback(() => {\n if (timerRef.current !== null) {\n clearTimeout(timerRef.current);\n timerRef.current = null;\n }\n }, []);\n\n // Clean up any pending timer on unmount\n useEffect(() => {\n return () => {\n if (timerRef.current !== null) {\n clearTimeout(timerRef.current);\n }\n };\n }, []);\n\n return {\n onMouseDown: start,\n onMouseUp: cancel,\n onMouseLeave: cancel,\n onTouchStart: start,\n onTouchEnd: cancel,\n };\n}\n","\"use client\";\n\nimport { useRef, useEffect, RefObject } from \"react\";\n\n/**\n * Gesture types supported\n */\nexport type GestureType = \"tap\" | \"doubletap\" | \"pinch\" | \"rotate\";\n\n/**\n * Configuration options for useGesture hook\n */\nexport interface UseGestureOptions {\n /** Callback for tap gesture */\n onTap?: (x: number, y: number) => void;\n /** Callback for double tap gesture */\n onDoubleTap?: (x: number, y: number) => void;\n /** Callback for pinch gesture (zoom in/out) */\n onPinch?: (scale: number, distance: number) => void;\n /** Callback during pinching */\n onPinching?: (scale: number) => void;\n /** Callback for rotation gesture */\n onRotate?: (angle: number) => void;\n /** Callback during rotation */\n onRotating?: (angle: number) => void;\n /** Maximum time between taps for double tap (ms, default: 300) */\n doubleTapDelay?: number;\n /** Maximum movement allowed for tap (px, default: 10) */\n tapMovementThreshold?: number;\n /** Prevent default behavior */\n preventDefault?: boolean;\n}\n\n/**\n * useGesture Hook\n *\n * Detects various touch gestures including tap, double tap, pinch, and rotate.\n * Primarily designed for touch devices but also works with mouse for basic gestures.\n *\n * @param ref - Reference to the element to attach gesture handlers\n * @param options - Configuration options for gesture detection\n *\n * @example\n * ```tsx\n * const ref = useRef<HTMLDivElement>(null);\n *\n * useGesture(ref, {\n * onTap: (x, y) => console.log('Tapped at', x, y),\n * onDoubleTap: () => console.log('Double tapped'),\n * onPinch: (scale) => console.log('Pinch scale', scale),\n * });\n *\n * return <div ref={ref}>Touch me!</div>;\n * ```\n */\nexport function useGesture<T extends HTMLElement = HTMLElement>(\n ref: RefObject<T | null>,\n options: UseGestureOptions = {},\n) {\n const {\n onTap,\n onDoubleTap,\n onPinch,\n onPinching,\n onRotate,\n onRotating,\n doubleTapDelay = 300,\n tapMovementThreshold = 10,\n preventDefault = false,\n } = options;\n\n const touchStartRef = useRef<{ x: number; y: number; time: number } | null>(\n null,\n );\n const lastTapRef = useRef<number>(0);\n const initialPinchDistanceRef = useRef<number>(0);\n const initialRotationRef = useRef<number>(0);\n\n // Store callbacks in refs to avoid event listener churn\n const onTapRef = useRef(onTap);\n const onDoubleTapRef = useRef(onDoubleTap);\n const onPinchRef = useRef(onPinch);\n const onPinchingRef = useRef(onPinching);\n const onRotateRef = useRef(onRotate);\n const onRotatingRef = useRef(onRotating);\n\n useEffect(() => {\n onTapRef.current = onTap;\n }, [onTap]);\n useEffect(() => {\n onDoubleTapRef.current = onDoubleTap;\n }, [onDoubleTap]);\n useEffect(() => {\n onPinchRef.current = onPinch;\n }, [onPinch]);\n useEffect(() => {\n onPinchingRef.current = onPinching;\n }, [onPinching]);\n useEffect(() => {\n onRotateRef.current = onRotate;\n }, [onRotate]);\n useEffect(() => {\n onRotatingRef.current = onRotating;\n }, [onRotating]);\n\n useEffect(() => {\n const element = ref.current;\n if (!element) return;\n\n const getDistance = (touch1: Touch, touch2: Touch): number => {\n const dx = touch1.clientX - touch2.clientX;\n const dy = touch1.clientY - touch2.clientY;\n return Math.sqrt(dx * dx + dy * dy);\n };\n\n const getAngle = (touch1: Touch, touch2: Touch): number => {\n const dx = touch1.clientX - touch2.clientX;\n const dy = touch1.clientY - touch2.clientY;\n return Math.atan2(dy, dx) * (180 / Math.PI);\n };\n\n const handleTouchStart = (e: TouchEvent) => {\n if (preventDefault) e.preventDefault();\n const touch = e.touches[0];\n touchStartRef.current = {\n x: touch.clientX,\n y: touch.clientY,\n time: Date.now(),\n };\n if (e.touches.length === 2) {\n initialPinchDistanceRef.current = getDistance(\n e.touches[0],\n e.touches[1],\n );\n initialRotationRef.current = getAngle(e.touches[0], e.touches[1]);\n }\n };\n\n const handleTouchMove = (e: TouchEvent) => {\n if (!touchStartRef.current) return;\n if (\n e.touches.length === 2 &&\n (onPinchRef.current ||\n onPinchingRef.current ||\n onRotateRef.current ||\n onRotatingRef.current)\n ) {\n if (preventDefault) e.preventDefault();\n const currentDistance = getDistance(e.touches[0], e.touches[1]);\n const currentAngle = getAngle(e.touches[0], e.touches[1]);\n if (initialPinchDistanceRef.current > 0) {\n onPinchingRef.current?.(\n currentDistance / initialPinchDistanceRef.current,\n );\n }\n if (initialRotationRef.current !== 0) {\n onRotatingRef.current?.(currentAngle - initialRotationRef.current);\n }\n }\n };\n\n const handleTouchEnd = (e: TouchEvent) => {\n if (!touchStartRef.current) return;\n if (preventDefault) e.preventDefault();\n const touch = e.changedTouches[0];\n const deltaX = Math.abs(touch.clientX - touchStartRef.current.x);\n const deltaY = Math.abs(touch.clientY - touchStartRef.current.y);\n\n if (deltaX < tapMovementThreshold && deltaY < tapMovementThreshold) {\n const now = Date.now();\n const timeSinceLastTap = now - lastTapRef.current;\n if (onDoubleTapRef.current && timeSinceLastTap < doubleTapDelay) {\n onDoubleTapRef.current(\n touchStartRef.current.x,\n touchStartRef.current.y,\n );\n lastTapRef.current = 0;\n } else {\n onTapRef.current?.(touchStartRef.current.x, touchStartRef.current.y);\n lastTapRef.current = now;\n }\n }\n\n if (e.touches.length === 0 && initialPinchDistanceRef.current > 0) {\n const currentDistance = getDistance(\n e.changedTouches[0],\n e.changedTouches[1] || e.changedTouches[0],\n );\n onPinchRef.current?.(\n currentDistance / initialPinchDistanceRef.current,\n currentDistance,\n );\n initialPinchDistanceRef.current = 0;\n }\n\n if (e.touches.length === 0 && initialRotationRef.current !== 0) {\n const currentAngle = getAngle(\n e.changedTouches[0],\n e.changedTouches[1] || e.changedTouches[0],\n );\n onRotateRef.current?.(currentAngle - initialRotationRef.current);\n initialRotationRef.current = 0;\n }\n\n touchStartRef.current = null;\n };\n\n const handleMouseDown = (e: MouseEvent) => {\n if (preventDefault) e.preventDefault();\n touchStartRef.current = { x: e.clientX, y: e.clientY, time: Date.now() };\n };\n\n const handleMouseUp = (e: MouseEvent) => {\n if (!touchStartRef.current) return;\n if (preventDefault) e.preventDefault();\n const deltaX = Math.abs(e.clientX - touchStartRef.current.x);\n const deltaY = Math.abs(e.clientY - touchStartRef.current.y);\n if (deltaX < tapMovementThreshold && deltaY < tapMovementThreshold) {\n const now = Date.now();\n const timeSinceLastTap = now - lastTapRef.current;\n if (onDoubleTapRef.current && timeSinceLastTap < doubleTapDelay) {\n onDoubleTapRef.current(\n touchStartRef.current.x,\n touchStartRef.current.y,\n );\n lastTapRef.current = 0;\n } else {\n onTapRef.current?.(touchStartRef.current.x, touchStartRef.current.y);\n lastTapRef.current = now;\n }\n }\n touchStartRef.current = null;\n };\n\n element.addEventListener(\"touchstart\", handleTouchStart, {\n passive: !preventDefault,\n });\n element.addEventListener(\"touchmove\", handleTouchMove, {\n passive: !preventDefault,\n });\n element.addEventListener(\"touchend\", handleTouchEnd, {\n passive: !preventDefault,\n });\n element.addEventListener(\"mousedown\", handleMouseDown);\n element.addEventListener(\"mouseup\", handleMouseUp);\n\n return () => {\n element.removeEventListener(\"touchstart\", handleTouchStart);\n element.removeEventListener(\"touchmove\", handleTouchMove);\n element.removeEventListener(\"touchend\", handleTouchEnd);\n element.removeEventListener(\"mousedown\", handleMouseDown);\n element.removeEventListener(\"mouseup\", handleMouseUp);\n };\n }, [ref, doubleTapDelay, tapMovementThreshold, preventDefault]);\n}\n","\"use client\";\n\nimport { useRef, useEffect, RefObject } from \"react\";\n\n/**\n * Swipe direction types\n */\nexport type SwipeDirection = \"left\" | \"right\" | \"up\" | \"down\";\n\n/**\n * Configuration options for useSwipe hook\n */\nexport interface UseSwipeOptions {\n /** Minimum distance in pixels to register as a swipe (default: 50) */\n minSwipeDistance?: number;\n /** Maximum time in ms for a swipe gesture (default: 300) */\n maxSwipeTime?: number;\n /** Threshold for swipe velocity (pixels/ms, default: 0.3) */\n velocityThreshold?: number;\n /** Callback when swipe is detected */\n onSwipe?: (\n direction: SwipeDirection,\n distance: number,\n velocity: number,\n ) => void;\n /** Callback for specific directions */\n onSwipeLeft?: (distance: number, velocity: number) => void;\n onSwipeRight?: (distance: number, velocity: number) => void;\n onSwipeUp?: (distance: number, velocity: number) => void;\n onSwipeDown?: (distance: number, velocity: number) => void;\n /** Callback during swipe (for dragging effect) */\n onSwiping?: (deltaX: number, deltaY: number) => void;\n /** Callback when swipe starts */\n onSwipeStart?: () => void;\n /** Callback when swipe ends (regardless of direction detected) */\n onSwipeEnd?: () => void;\n /** Prevent default behavior during touch */\n preventDefault?: boolean;\n}\n\n/**\n * useSwipe Hook\n *\n * Detects swipe gestures on touch and mouse events.\n * Works on both mobile (touch) and desktop (mouse drag).\n *\n * @param ref - Reference to the element to attach swipe handlers\n * @param options - Configuration options for swipe detection\n *\n * @example\n * ```tsx\n * const ref = useRef<HTMLDivElement>(null);\n *\n * useSwipe(ref, {\n * onSwipeLeft: () => console.log('Swiped left'),\n * onSwipeRight: () => console.log('Swiped right'),\n * minSwipeDistance: 100,\n * });\n *\n * return <div ref={ref}>Swipe me!</div>;\n * ```\n */\nexport function useSwipe<T extends HTMLElement = HTMLElement>(\n ref: RefObject<T | null>,\n options: UseSwipeOptions = {},\n) {\n const {\n minSwipeDistance = 50,\n maxSwipeTime = 300,\n velocityThreshold = 0.3,\n onSwipe,\n onSwipeLeft,\n onSwipeRight,\n onSwipeUp,\n onSwipeDown,\n onSwiping,\n onSwipeStart,\n onSwipeEnd,\n preventDefault = false,\n } = options;\n\n const touchStartRef = useRef<{ x: number; y: number; time: number } | null>(\n null,\n );\n const isSwiping = useRef(false);\n\n const onSwipeRef = useRef(onSwipe);\n const onSwipeLeftRef = useRef(onSwipeLeft);\n const onSwipeRightRef = useRef(onSwipeRight);\n const onSwipeUpRef = useRef(onSwipeUp);\n const onSwipeDownRef = useRef(onSwipeDown);\n const onSwipingRef = useRef(onSwiping);\n const onSwipeStartRef = useRef(onSwipeStart);\n const onSwipeEndRef = useRef(onSwipeEnd);\n\n useEffect(() => {\n onSwipeRef.current = onSwipe;\n }, [onSwipe]);\n useEffect(() => {\n onSwipeLeftRef.current = onSwipeLeft;\n }, [onSwipeLeft]);\n useEffect(() => {\n onSwipeRightRef.current = onSwipeRight;\n }, [onSwipeRight]);\n useEffect(() => {\n onSwipeUpRef.current = onSwipeUp;\n }, [onSwipeUp]);\n useEffect(() => {\n onSwipeDownRef.current = onSwipeDown;\n }, [onSwipeDown]);\n useEffect(() => {\n onSwipingRef.current = onSwiping;\n }, [onSwiping]);\n useEffect(() => {\n onSwipeStartRef.current = onSwipeStart;\n }, [onSwipeStart]);\n useEffect(() => {\n onSwipeEndRef.current = onSwipeEnd;\n }, [onSwipeEnd]);\n\n useEffect(() => {\n const element = ref.current;\n if (!element) return;\n\n const processSwipe = (\n deltaX: number,\n deltaY: number,\n deltaTime: number,\n ) => {\n const absX = Math.abs(deltaX);\n const absY = Math.abs(deltaY);\n const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n const velocity = distance / deltaTime;\n\n if (\n distance < minSwipeDistance ||\n deltaTime > maxSwipeTime ||\n velocity < velocityThreshold\n )\n return;\n\n let direction: SwipeDirection;\n if (absX > absY) {\n direction = deltaX > 0 ? \"right\" : \"left\";\n if (direction === \"left\") onSwipeLeftRef.current?.(distance, velocity);\n else onSwipeRightRef.current?.(distance, velocity);\n } else {\n direction = deltaY > 0 ? \"down\" : \"up\";\n if (direction === \"up\") onSwipeUpRef.current?.(distance, velocity);\n else onSwipeDownRef.current?.(distance, velocity);\n }\n onSwipeRef.current?.(direction, distance, velocity);\n };\n\n const handleTouchStart = (e: TouchEvent) => {\n if (preventDefault) e.preventDefault();\n const touch = e.touches[0];\n touchStartRef.current = {\n x: touch.clientX,\n y: touch.clientY,\n time: Date.now(),\n };\n isSwiping.current = true;\n onSwipeStartRef.current?.();\n };\n\n const handleTouchMove = (e: TouchEvent) => {\n if (!touchStartRef.current || !isSwiping.current) return;\n if (preventDefault) e.preventDefault();\n onSwipingRef.current?.(\n e.touches[0].clientX - touchStartRef.current.x,\n e.touches[0].clientY - touchStartRef.current.y,\n );\n };\n\n const handleTouchEnd = (e: TouchEvent) => {\n if (!touchStartRef.current || !isSwiping.current) return;\n if (preventDefault) e.preventDefault();\n const touch = e.changedTouches[0];\n processSwipe(\n touch.clientX - touchStartRef.current.x,\n touch.clientY - touchStartRef.current.y,\n Date.now() - touchStartRef.current.time,\n );\n touchStartRef.current = null;\n isSwiping.current = false;\n onSwipeEndRef.current?.();\n };\n\n const handleMouseDown = (e: MouseEvent) => {\n if (preventDefault) e.preventDefault();\n touchStartRef.current = { x: e.clientX, y: e.clientY, time: Date.now() };\n isSwiping.current = true;\n onSwipeStartRef.current?.();\n };\n\n const handleMouseMove = (e: MouseEvent) => {\n if (!touchStartRef.current || !isSwiping.current) return;\n onSwipingRef.current?.(\n e.clientX - touchStartRef.current.x,\n e.clientY - touchStartRef.current.y,\n );\n };\n\n const handleMouseUp = (e: MouseEvent) => {\n if (!touchStartRef.current || !isSwiping.current) return;\n if (preventDefault) e.preventDefault();\n processSwipe(\n e.clientX - touchStartRef.current.x,\n e.clientY - touchStartRef.current.y,\n Date.now() - touchStartRef.current.time,\n );\n touchStartRef.current = null;\n isSwiping.current = false;\n onSwipeEndRef.current?.();\n };\n\n element.addEventListener(\"touchstart\", handleTouchStart, {\n passive: !preventDefault,\n });\n element.addEventListener(\"touchmove\", handleTouchMove, {\n passive: !preventDefault,\n });\n element.addEventListener(\"touchend\", handleTouchEnd, {\n passive: !preventDefault,\n });\n element.addEventListener(\"mousedown\", handleMouseDown);\n document.addEventListener(\"mousemove\", handleMouseMove);\n document.addEventListener(\"mouseup\", handleMouseUp);\n\n return () => {\n element.removeEventListener(\"touchstart\", handleTouchStart);\n element.removeEventListener(\"touchmove\", handleTouchMove);\n element.removeEventListener(\"touchend\", handleTouchEnd);\n element.removeEventListener(\"mousedown\", handleMouseDown);\n document.removeEventListener(\"mousemove\", handleMouseMove);\n document.removeEventListener(\"mouseup\", handleMouseUp);\n };\n }, [ref, minSwipeDistance, maxSwipeTime, velocityThreshold, preventDefault]);\n}\n","\"use client\";\n\nimport { useRef, useState, useCallback, useEffect, RefObject } from \"react\";\n\nexport interface UsePullToRefreshOptions {\n /** Distance in px the user must pull before onRefresh triggers (default: 80) */\n threshold?: number;\n}\n\nexport interface UsePullToRefreshReturn {\n /** Attach to the scrollable container element */\n containerRef: RefObject<HTMLDivElement | null>;\n /** `true` while the user is actively pulling */\n isPulling: boolean;\n /** Pull progress from 0 (not started) to 1 (threshold reached) */\n progress: number;\n}\n\n/**\n * usePullToRefresh Hook\n *\n * Attaches touch event listeners to `containerRef`.\n * When the user overscrolls from the very top and pulls down past `threshold`,\n * `onRefresh` is called. Progress (0–1) can be used to render a loading indicator.\n *\n * @param onRefresh - Async function called when pull threshold is reached\n * @param options - Configuration: `threshold` in px (default 80)\n *\n * @example\n * ```tsx\n * const { containerRef, isPulling, progress } = usePullToRefresh(async () => {\n * await refetchOrders();\n * });\n *\n * return (\n * <div ref={containerRef} className=\"overflow-y-auto\">\n * {isPulling && <PullIndicator progress={progress} />}\n * {…}\n * </div>\n * );\n * ```\n */\nexport function usePullToRefresh(\n onRefresh: () => Promise<void>,\n options: UsePullToRefreshOptions = {},\n): UsePullToRefreshReturn {\n const { threshold = 80 } = options;\n\n const containerRef = useRef<HTMLDivElement>(null);\n const [isPulling, setIsPulling] = useState(false);\n const [progress, setProgress] = useState(0);\n\n const startYRef = useRef<number | null>(null);\n const thresholdReachedRef = useRef(false);\n const onRefreshRef = useRef(onRefresh);\n\n useEffect(() => {\n onRefreshRef.current = onRefresh;\n }, [onRefresh]);\n\n const handleTouchStart = useCallback((e: TouchEvent) => {\n const el = containerRef.current;\n if (!el || el.scrollTop > 0) return;\n startYRef.current = e.touches[0].clientY;\n thresholdReachedRef.current = false;\n }, []);\n\n const handleTouchMove = useCallback(\n (e: TouchEvent) => {\n if (startYRef.current === null) return;\n const delta = e.touches[0].clientY - startYRef.current;\n if (delta <= 0) {\n setProgress(0);\n setIsPulling(false);\n return;\n }\n const prog = Math.min(delta / threshold, 1);\n setProgress(prog);\n setIsPulling(true);\n thresholdReachedRef.current = prog >= 1;\n },\n [threshold],\n );\n\n const handleTouchEnd = useCallback(async () => {\n setIsPulling(false);\n setProgress(0);\n startYRef.current = null;\n if (thresholdReachedRef.current) {\n thresholdReachedRef.current = false;\n await onRefreshRef.current();\n }\n }, []);\n\n useEffect(() => {\n const el = containerRef.current;\n if (!el) return;\n\n el.addEventListener(\"touchstart\", handleTouchStart, { passive: true });\n el.addEventListener(\"touchmove\", handleTouchMove, { passive: true });\n el.addEventListener(\"touchend\", handleTouchEnd);\n\n return () => {\n el.removeEventListener(\"touchstart\", handleTouchStart);\n el.removeEventListener(\"touchmove\", handleTouchMove);\n el.removeEventListener(\"touchend\", handleTouchEnd);\n };\n }, [handleTouchStart, handleTouchMove, handleTouchEnd]);\n\n return { containerRef, isPulling, progress };\n}\n","import { useState, useEffect } from \"react\";\n\n/**\n * useCountdown — tracks time remaining until a future date.\n *\n * Returns `null` when the target date has passed or is not provided.\n *\n * Supports:\n * - `Date` objects\n * - ISO strings / numeric timestamps\n * - Firestore Timestamp JSON shape `{ _seconds, _nanoseconds }` (serialised\n * by Firestore's REST API — no Firestore SDK import needed)\n */\nexport interface CountdownRemaining {\n days: number;\n hours: number;\n minutes: number;\n seconds: number;\n}\n\n/** Resolve any date-like value into a ms timestamp. */\nfunction resolveMs(endDate: unknown): number {\n if (!endDate) return NaN;\n if (endDate instanceof Date) return endDate.getTime();\n // Firestore Timestamp JSON shape: { _seconds, _nanoseconds }\n if (\n typeof endDate === \"object\" &&\n endDate !== null &&\n \"_seconds\" in endDate &&\n typeof (endDate as Record<string, unknown>)._seconds === \"number\"\n ) {\n return (endDate as { _seconds: number })._seconds * 1000;\n }\n // ISO string or numeric string\n return new Date(endDate as string).getTime();\n}\n\n/**\n * @example\n * ```tsx\n * const remaining = useCountdown(auction.endsAt);\n * if (!remaining) return <span>Ended</span>;\n * return <span>{remaining.hours}h {remaining.minutes}m {remaining.seconds}s</span>;\n * ```\n */\nexport function useCountdown(\n endDate: Date | string | undefined,\n): CountdownRemaining | null {\n const getRemaining = (): CountdownRemaining | null => {\n if (!endDate) return null;\n const ms = resolveMs(endDate);\n if (Number.isNaN(ms)) return null;\n const diff = ms - Date.now();\n if (diff <= 0) return null;\n return {\n days: Math.floor(diff / (1000 * 60 * 60 * 24)),\n hours: Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)),\n minutes: Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60)),\n seconds: Math.floor((diff % (1000 * 60)) / 1000),\n };\n };\n\n const [remaining, setRemaining] = useState<CountdownRemaining | null>(\n getRemaining,\n );\n\n useEffect(() => {\n const id = setInterval(() => setRemaining(getRemaining()), 1000);\n return () => clearInterval(id);\n }, [endDate]);\n\n return remaining;\n}\n","\"use client\";\n\nimport { useCallback, useEffect, useRef, useState } from \"react\";\n\nexport interface UseCameraOptions {\n facingMode?: \"user\" | \"environment\";\n video?: boolean | MediaTrackConstraints;\n audio?: boolean;\n}\n\nexport interface UseCameraReturn {\n isSupported: boolean;\n isActive: boolean;\n isCapturing: boolean;\n stream: MediaStream | null;\n error: string | null;\n videoRef: React.RefObject<HTMLVideoElement | null>;\n startCamera: (options?: UseCameraOptions) => Promise<void>;\n stopCamera: () => void;\n takePhoto: () => Blob | null;\n startRecording: () => void;\n stopRecording: () => Promise<Blob>;\n switchCamera: () => Promise<void>;\n}\n\n/**\n * useCamera\n *\n * Provides access to the device camera via the MediaDevices API.\n * Zero domain imports. Safe to use in any Tier 1 / Tier 2 component.\n *\n * Lifecycle:\n * - Call `startCamera()` to open the stream and wire `videoRef` to a <video> element.\n * - `stopCamera()` releases hardware tracks (turns off the camera indicator light).\n * - `takePhoto()` captures the current frame as image/webp.\n * - `startRecording()` / `stopRecording()` use MediaRecorder (video/webm output).\n * - `useEffect` cleanup calls `stopCamera()` automatically on unmount.\n */\nexport function useCamera(): UseCameraReturn {\n const isSupported =\n typeof navigator !== \"undefined\" &&\n typeof navigator.mediaDevices !== \"undefined\" &&\n typeof navigator.mediaDevices.getUserMedia === \"function\";\n\n const videoRef = useRef<HTMLVideoElement>(null);\n const streamRef = useRef<MediaStream | null>(null);\n const mediaRecorderRef = useRef<MediaRecorder | null>(null);\n const chunksRef = useRef<Blob[]>([]);\n const currentFacingModeRef = useRef<\"user\" | \"environment\">(\"environment\");\n const stopRecordingResolveRef = useRef<((blob: Blob) => void) | null>(null);\n\n const [stream, setStream] = useState<MediaStream | null>(null);\n const [isActive, setIsActive] = useState(false);\n const [isCapturing, setIsCapturing] = useState(false);\n const [error, setError] = useState<string | null>(null);\n\n const stopCamera = useCallback(() => {\n if (streamRef.current) {\n streamRef.current.getTracks().forEach((t) => t.stop());\n streamRef.current = null;\n }\n if (videoRef.current) {\n videoRef.current.srcObject = null;\n }\n setStream(null);\n setIsActive(false);\n setIsCapturing(false);\n }, []);\n\n useEffect(() => {\n return () => {\n stopCamera();\n };\n }, [stopCamera]);\n\n const startCamera = useCallback(\n async (options?: UseCameraOptions) => {\n if (!isSupported) {\n setError(\"Camera is not supported on this device\");\n return;\n }\n setError(null);\n stopCamera();\n\n const facingMode = options?.facingMode ?? \"environment\";\n currentFacingModeRef.current = facingMode;\n\n const videoConstraints: boolean | MediaTrackConstraints =\n options?.video !== undefined ? options.video : { facingMode };\n\n try {\n const mediaStream = await navigator.mediaDevices.getUserMedia({\n video: videoConstraints,\n audio: options?.audio ?? false,\n });\n streamRef.current = mediaStream;\n setStream(mediaStream);\n setIsActive(true);\n if (videoRef.current) {\n videoRef.current.srcObject = mediaStream;\n }\n } catch (err) {\n const message =\n err instanceof DOMException && err.name === \"NotAllowedError\"\n ? \"Camera permission denied. Please allow access in your browser settings.\"\n : \"Camera unavailable\";\n setError(message);\n }\n },\n [isSupported, stopCamera],\n );\n\n const takePhoto = useCallback((): Blob | null => {\n const video = videoRef.current;\n if (!video || !isActive) return null;\n\n const canvas = document.createElement(\"canvas\");\n canvas.width = video.videoWidth;\n canvas.height = video.videoHeight;\n const ctx = canvas.getContext(\"2d\");\n if (!ctx) return null;\n ctx.drawImage(video, 0, 0);\n\n let result: Blob | null = null;\n canvas.toBlob(\n (blob) => {\n result = blob;\n },\n \"image/webp\",\n 0.92,\n );\n return result;\n }, [isActive]);\n\n const startRecording = useCallback(() => {\n if (!streamRef.current || !isActive) return;\n chunksRef.current = [];\n const recorder = new MediaRecorder(streamRef.current, {\n mimeType: \"video/webm\",\n });\n recorder.ondataavailable = (e) => {\n if (e.data.size > 0) chunksRef.current.push(e.data);\n };\n recorder.onstop = () => {\n const blob = new Blob(chunksRef.current, { type: \"video/webm\" });\n setIsCapturing(false);\n if (stopRecordingResolveRef.current) {\n stopRecordingResolveRef.current(blob);\n stopRecordingResolveRef.current = null;\n }\n };\n mediaRecorderRef.current = recorder;\n recorder.start();\n setIsCapturing(true);\n }, [isActive]);\n\n const stopRecording = useCallback((): Promise<Blob> => {\n return new Promise((resolve) => {\n stopRecordingResolveRef.current = resolve;\n if (\n mediaRecorderRef.current &&\n mediaRecorderRef.current.state !== \"inactive\"\n ) {\n mediaRecorderRef.current.stop();\n } else {\n resolve(new Blob([], { type: \"video/webm\" }));\n }\n });\n }, []);\n\n const switchCamera = useCallback(async () => {\n const next =\n currentFacingModeRef.current === \"environment\" ? \"user\" : \"environment\";\n await startCamera({ facingMode: next });\n }, [startCamera]);\n\n return {\n isSupported,\n isActive,\n isCapturing,\n stream,\n error,\n videoRef,\n startCamera,\n stopCamera,\n takePhoto,\n startRecording,\n stopRecording,\n switchCamera,\n };\n}\n","\"use client\";\r\n\r\n/**\r\n * useBulkSelection\r\n *\r\n * Generic multi-select state hook for list/table rows.\r\n * Pairs with any table component that accepts `selectedIds` and\r\n * `onSelectionChange` props.\r\n *\r\n * @example\r\n * ```tsx\r\n * const selection = useBulkSelection({ items, keyExtractor: (p) => p.id });\r\n *\r\n * <DataTable\r\n * selectable\r\n * selectedIds={selection.selectedIds}\r\n * onSelectionChange={selection.setSelectedIds}\r\n * />\r\n * ```\r\n */\r\n\r\nimport { useState, useCallback, useMemo } from \"react\";\r\nimport type { Dispatch, SetStateAction } from \"react\";\r\n\r\n/** Default API limit — match the `z.array().max(N)` on your bulk endpoint */\r\nconst BULK_MAX_IDS = 100;\r\n\r\nexport interface UseBulkSelectionOptions<T> {\r\n /** The current page / list of items being displayed. */\r\n items: T[];\r\n /** Extract a stable unique key from each item (e.g. `item => item.id`). */\r\n keyExtractor: (item: T) => string;\r\n /**\r\n * Maximum number of IDs that can be selected at once.\r\n * @default 100\r\n */\r\n maxSelection?: number;\r\n}\r\n\r\nexport interface UseBulkSelectionReturn {\r\n selectedIds: string[];\r\n selectedCount: number;\r\n /** Returns `true` if the given ID is currently selected. */\r\n isSelected: (id: string) => boolean;\r\n /** `true` when every item on the current page is selected. */\r\n isAllSelected: boolean;\r\n /**\r\n * `true` when some — but not all — items are selected.\r\n * Use to set the indeterminate state on the header checkbox.\r\n */\r\n isIndeterminate: boolean;\r\n /** Toggle one item in or out of the selection. Respects `maxSelection`. */\r\n toggle: (id: string) => void;\r\n /**\r\n * Select all items on the current page (up to `maxSelection`),\r\n * or deselect all if every item is already selected.\r\n */\r\n toggleAll: () => void;\r\n /** Deselect everything. Call this after a bulk action completes. */\r\n clearSelection: () => void;\r\n /**\r\n * Direct state setter — pass straight to a table's `onSelectionChange`\r\n * or use when you need to replace the entire selection programmatically.\r\n */\r\n setSelectedIds: Dispatch<SetStateAction<string[]>>;\r\n}\r\n\r\nexport function useBulkSelection<T>({\r\n items,\r\n keyExtractor,\r\n maxSelection = BULK_MAX_IDS,\r\n}: UseBulkSelectionOptions<T>): UseBulkSelectionReturn {\r\n const [selectedIds, setSelectedIds] = useState<string[]>([]);\r\n\r\n const allIds = useMemo(() => items.map(keyExtractor), [items, keyExtractor]);\r\n\r\n const isSelected = useCallback(\r\n (id: string) => selectedIds.includes(id),\r\n [selectedIds],\r\n );\r\n\r\n const toggle = useCallback(\r\n (id: string) => {\r\n setSelectedIds((prev) => {\r\n if (prev.includes(id)) return prev.filter((s) => s !== id);\r\n if (prev.length >= maxSelection) return prev;\r\n return [...prev, id];\r\n });\r\n },\r\n [maxSelection],\r\n );\r\n\r\n const toggleAll = useCallback(() => {\r\n setSelectedIds((prev) => {\r\n const allSelected = prev.length === allIds.length && allIds.length > 0;\r\n if (allSelected) return [];\r\n return allIds.slice(0, maxSelection);\r\n });\r\n }, [allIds, maxSelection]);\r\n\r\n const clearSelection = useCallback(() => setSelectedIds([]), []);\r\n\r\n const isAllSelected =\r\n allIds.length > 0 && selectedIds.length === allIds.length;\r\n const isIndeterminate =\r\n selectedIds.length > 0 && selectedIds.length < allIds.length;\r\n\r\n return {\r\n selectedIds,\r\n selectedCount: selectedIds.length,\r\n isSelected,\r\n isAllSelected,\r\n isIndeterminate,\r\n toggle,\r\n toggleAll,\r\n clearSelection,\r\n setSelectedIds,\r\n };\r\n}\r\n","\"use client\";\r\n\r\n/**\r\n * useUrlTable\r\n *\r\n * Manages list/table state (filters, sort, pagination, view mode) entirely\r\n * through URL query params via `router.replace()` — no local state, fully\r\n * shareable and bookmark-able.\r\n *\r\n * Key rules:\r\n * - `set(key, value)` resets `page` to `'1'` unless the key is `'page'`,\r\n * `'pageSize'`, or `'view'`.\r\n * - `setMany(updates)` resets `page` to `'1'` unless every key in\r\n * `updates` is `'page'`, `'pageSize'`, or `'view'`.\r\n * - Always uses `router.replace()` so filter changes don't pollute history.\r\n *\r\n * @example\r\n * ```tsx\r\n * const table = useUrlTable({ defaults: { pageSize: '25', sort: '-createdAt' } });\r\n *\r\n * // Read\r\n * table.get('status') // string | ''\r\n * table.getNumber('page', 1) // number\r\n *\r\n * // Write\r\n * table.set('status', 'active') // resets page → 1\r\n * table.setPage(3)\r\n * table.setSort('-price')\r\n * table.setMany({ status: 'active', role: 'seller' })\r\n *\r\n * // Build API query strings\r\n * table.buildSieveParams('status==published')\r\n * table.buildSearchParams()\r\n * ```\r\n */\r\n\r\nimport { useRouter, usePathname, useSearchParams } from \"next/navigation\";\r\nimport { useCallback, useRef } from \"react\";\r\n\r\nexport interface UseUrlTableOptions {\r\n /** Default param values used when a param is absent from the URL */\r\n defaults?: Record<string, string>;\r\n /**\r\n * Override the router used for navigation. Pass a locale-aware router\r\n * (e.g. from next-intl) to preserve locale prefixes on replace.\r\n */\r\n router?: { replace: (url: string) => void };\r\n /** Override the current pathname (e.g. from a locale-aware usePathname). */\r\n pathname?: string;\r\n /**\r\n * Override the URLSearchParams instance. Useful when driving the hook\r\n * from a non-standard location source.\r\n */\r\n searchParams?: URLSearchParams;\r\n}\r\n\r\nconst NON_RESETTING_KEYS = [\"page\", \"pageSize\", \"view\"] as const;\r\n\r\nexport function useUrlTable(options?: UseUrlTableOptions) {\r\n // Always call native hooks unconditionally (React rules).\r\n const nativeRouter = useRouter();\r\n const nativePathname = usePathname();\r\n const nativeSearchParams = useSearchParams();\r\n\r\n // Callers may inject locale-aware overrides; fall back to native.\r\n const router = options?.router ?? nativeRouter;\r\n const pathname = options?.pathname ?? nativePathname;\r\n const searchParams = options?.searchParams ?? nativeSearchParams;\r\n\r\n // Stabilise defaults — callers often pass object literals inline, which\r\n // would recreate all useCallback deps on every render without this ref.\r\n const defaultsRef = useRef(options?.defaults ?? {});\r\n const defaults = defaultsRef.current;\r\n\r\n const get = useCallback(\r\n (key: string) => searchParams.get(key) ?? defaults[key] ?? \"\",\r\n [searchParams, defaults],\r\n );\r\n\r\n const getNumber = useCallback(\r\n (key: string, fallback = 0) => {\r\n const v = get(key);\r\n if (!v) return fallback;\r\n const n = Number(v);\r\n return isNaN(n) ? fallback : n;\r\n },\r\n [get],\r\n );\r\n\r\n const buildParams = useCallback(\r\n (updates: Record<string, string>) => {\r\n const p = new URLSearchParams(searchParams.toString());\r\n for (const [k, v] of Object.entries(updates)) {\r\n if (v === \"\" || v === undefined) p.delete(k);\r\n else p.set(k, v);\r\n }\r\n return p;\r\n },\r\n [searchParams],\r\n );\r\n\r\n const set = useCallback(\r\n (key: string, value: string) => {\r\n const p = buildParams({ [key]: value });\r\n if (\r\n !NON_RESETTING_KEYS.includes(key as (typeof NON_RESETTING_KEYS)[number])\r\n ) {\r\n p.set(\"page\", \"1\");\r\n }\r\n router.replace(`${pathname}?${p.toString()}`);\r\n },\r\n [buildParams, pathname, router],\r\n );\r\n\r\n const setMany = useCallback(\r\n (updates: Record<string, string>) => {\r\n const p = buildParams(updates);\r\n const keys = Object.keys(updates);\r\n const allNonResetting = keys.every((k) =>\r\n NON_RESETTING_KEYS.includes(k as (typeof NON_RESETTING_KEYS)[number]),\r\n );\r\n if (!allNonResetting && !keys.includes(\"page\")) {\r\n p.set(\"page\", \"1\");\r\n }\r\n router.replace(`${pathname}?${p.toString()}`);\r\n },\r\n [buildParams, pathname, router],\r\n );\r\n\r\n const clear = useCallback(\r\n (keys?: string[]) => {\r\n if (keys) {\r\n const p = new URLSearchParams(searchParams.toString());\r\n keys.forEach((k) => p.delete(k));\r\n p.set(\"page\", \"1\");\r\n router.replace(`${pathname}?${p.toString()}`);\r\n } else {\r\n router.replace(pathname);\r\n }\r\n },\r\n [searchParams, pathname, router],\r\n );\r\n\r\n const setPage = (page: number) => set(\"page\", String(page));\r\n const setPageSize = (size: number) => set(\"pageSize\", String(size));\r\n const setSort = (sort: string) => set(\"sort\", sort);\r\n\r\n const buildSieveParams = useCallback(\r\n (sieveFilters: string) => {\r\n const page = get(\"page\") || \"1\";\r\n const pageSize = get(\"pageSize\") || defaults[\"pageSize\"] || \"25\";\r\n const sort = get(\"sort\") || defaults[\"sort\"] || \"-createdAt\";\r\n const parts = new URLSearchParams();\r\n if (sieveFilters) parts.set(\"filters\", sieveFilters);\r\n parts.set(\"sorts\", sort);\r\n parts.set(\"page\", page);\r\n parts.set(\"pageSize\", pageSize);\r\n return `?${parts.toString()}`;\r\n },\r\n [get, defaults],\r\n );\r\n\r\n const buildSearchParams = useCallback(() => {\r\n const p = new URLSearchParams();\r\n const addIfPresent = (k: string) => {\r\n const v = get(k);\r\n if (v) p.set(k, v);\r\n };\r\n [\"q\", \"category\", \"minPrice\", \"maxPrice\"].forEach(addIfPresent);\r\n p.set(\"sort\", get(\"sort\") || defaults[\"sort\"] || \"-createdAt\");\r\n p.set(\"page\", get(\"page\") || \"1\");\r\n p.set(\"pageSize\", get(\"pageSize\") || defaults[\"pageSize\"] || \"24\");\r\n return `?${p.toString()}`;\r\n }, [get, defaults]);\r\n\r\n return {\r\n params: searchParams,\r\n get,\r\n getNumber,\r\n set,\r\n setMany,\r\n clear,\r\n setPage,\r\n setPageSize,\r\n setSort,\r\n buildSieveParams,\r\n buildSearchParams,\r\n };\r\n}\r\n","\"use client\";\r\n\r\nimport { useCallback, useMemo, useState } from \"react\";\r\nimport type { useUrlTable } from \"./useUrlTable\";\r\n\r\ntype UrlTable = ReturnType<typeof useUrlTable>;\r\n\r\nexport interface UsePendingFiltersOptions {\r\n /** The page's useUrlTable instance */\r\n table: UrlTable;\r\n /** URL param keys to manage (e.g. ['status', 'category', 'role']) */\r\n keys: string[];\r\n}\r\n\r\nexport interface UsePendingFiltersReturn {\r\n /** Current uncommitted selections per key (string[] per key) */\r\n pending: Record<string, string[]>;\r\n /** Values currently in the URL (committed) per key */\r\n applied: Record<string, string[]>;\r\n /** true when pending differs from applied */\r\n isDirty: boolean;\r\n /** Total number of selected values across all pending keys */\r\n pendingCount: number;\r\n /** Total number of selected values in the URL (for badge display) */\r\n appliedCount: number;\r\n /** Update one key in pending state (does NOT write to URL) */\r\n set: (key: string, values: string[]) => void;\r\n /** Write all pending keys to the URL (resets page to 1) */\r\n apply: () => void;\r\n /** Discard pending, revert to applied (URL) state */\r\n reset: () => void;\r\n /** Clear all keys in both pending state and the URL */\r\n clear: () => void;\r\n}\r\n\r\n/**\r\n * usePendingFilters\r\n *\r\n * Manages local (uncommitted) filter state for a FilterDrawer or any deferred\r\n * filter panel. Values are only written to the URL when `apply()` is called.\r\n *\r\n * Initialised from the current URL params on mount, so opening a drawer\r\n * pre-fills any already-applied filters.\r\n *\r\n * @example\r\n * ```ts\r\n * const table = useUrlTable({ defaults: { pageSize: '25' } });\r\n * const filters = usePendingFilters({ table, keys: ['status', 'category'] });\r\n *\r\n * <FilterDrawer\r\n * onApply={() => { filters.apply(); setDrawerOpen(false); }}\r\n * onReset={() => filters.clear()}\r\n * activeCount={filters.appliedCount}\r\n * >\r\n * <FilterFacetSection\r\n * title=\"Status\"\r\n * options={STATUS_OPTIONS}\r\n * selected={filters.pending['status'] ?? []}\r\n * onChange={(v) => filters.set('status', v)}\r\n * />\r\n * </FilterDrawer>\r\n * ```\r\n */\r\nexport function usePendingFilters({\r\n table,\r\n keys,\r\n}: UsePendingFiltersOptions): UsePendingFiltersReturn {\r\n const parseValues = useCallback(\r\n (key: string): string[] => {\r\n const raw = table.get(key);\r\n return raw ? raw.split(\",\").filter(Boolean) : [];\r\n },\r\n [table],\r\n );\r\n\r\n const [pending, setPending] = useState<Record<string, string[]>>(() =>\r\n Object.fromEntries(keys.map((k) => [k, parseValues(k)])),\r\n );\r\n\r\n const applied = useMemo<Record<string, string[]>>(\r\n () => Object.fromEntries(keys.map((k) => [k, parseValues(k)])),\r\n [keys, parseValues],\r\n );\r\n\r\n const pendingCount = useMemo(\r\n () => Object.values(pending).reduce((sum, arr) => sum + arr.length, 0),\r\n [pending],\r\n );\r\n\r\n const appliedCount = useMemo(\r\n () => Object.values(applied).reduce((sum, arr) => sum + arr.length, 0),\r\n [applied],\r\n );\r\n\r\n const isDirty = useMemo(() => {\r\n return keys.some((k) => {\r\n const p = (pending[k] ?? []).slice().sort();\r\n const a = (applied[k] ?? []).slice().sort();\r\n return p.length !== a.length || p.some((v, i) => v !== a[i]);\r\n });\r\n }, [keys, pending, applied]);\r\n\r\n const set = useCallback((key: string, values: string[]) => {\r\n setPending((prev) => ({ ...prev, [key]: values }));\r\n }, []);\r\n\r\n const apply = useCallback(() => {\r\n const updates: Record<string, string> = { page: \"1\" };\r\n for (const k of keys) {\r\n updates[k] = (pending[k] ?? []).join(\",\");\r\n }\r\n table.setMany(updates);\r\n }, [keys, pending, table]);\r\n\r\n const reset = useCallback(() => {\r\n setPending(Object.fromEntries(keys.map((k) => [k, parseValues(k)])));\r\n }, [keys, parseValues]);\r\n\r\n const clear = useCallback(() => {\r\n const empty = Object.fromEntries(keys.map((k) => [k, [] as string[]]));\r\n setPending(empty);\r\n const updates: Record<string, string> = { page: \"1\" };\r\n for (const k of keys) updates[k] = \"\";\r\n table.setMany(updates);\r\n }, [keys, table]);\r\n\r\n return {\r\n pending,\r\n applied,\r\n isDirty,\r\n pendingCount,\r\n appliedCount,\r\n set,\r\n apply,\r\n reset,\r\n clear,\r\n };\r\n}\r\n","\"use client\";\r\n\r\nimport { useMemo } from \"react\";\r\nimport { usePendingFilters } from \"./usePendingFilters\";\r\nimport type { useUrlTable } from \"./useUrlTable\";\r\n\r\ntype UrlTable = ReturnType<typeof useUrlTable>;\r\n\r\n/**\r\n * Minimal UrlTable-compatible interface consumed by *Filters components.\r\n */\r\nexport interface PendingTable {\r\n get: (key: string) => string;\r\n set: (key: string, value: string) => void;\r\n setMany: (updates: Record<string, string>) => void;\r\n}\r\n\r\nexport interface UsePendingTableReturn {\r\n /** Drop-in UrlTable replacement that reads/writes to pending state */\r\n pendingTable: PendingTable;\r\n /** Count of applied (URL) filter values — use for the filter badge */\r\n filterActiveCount: number;\r\n /** Commit all pending changes to the URL (resets page to 1) */\r\n onFilterApply: () => void;\r\n /** Clear all filter keys from pending state and URL */\r\n onFilterClear: () => void;\r\n /**\r\n * Revert pending state to the current URL values without clearing them.\r\n * Call this when opening a filter drawer to ensure it shows the last\r\n * committed state, even if the URL changed externally (e.g. a status tab).\r\n */\r\n onFilterReset: () => void;\r\n}\r\n\r\n/**\r\n * usePendingTable\r\n *\r\n * A thin wrapper around `usePendingFilters` that exposes a `pendingTable`\r\n * object matching the `UrlTable` interface (`get`, `set`, `setMany`).\r\n *\r\n * Drop this into any listing view to replace the per-filter `useState` +\r\n * `handleFilterApply` + `handleFilterClear` boilerplate.\r\n *\r\n * @example\r\n * ```tsx\r\n * const { pendingTable, filterActiveCount, onFilterApply, onFilterClear } =\r\n * usePendingTable(table, ['status', 'category', 'minPrice', 'maxPrice']);\r\n *\r\n * // Pass pendingTable directly to any *Filters component:\r\n * filterContent={<ProductFilters table={pendingTable} showStatus />}\r\n * filterActiveCount={filterActiveCount}\r\n * onFilterApply={onFilterApply}\r\n * onFilterClear={onFilterClear}\r\n * ```\r\n */\r\nexport function usePendingTable(\r\n table: UrlTable,\r\n keys: string[],\r\n): UsePendingTableReturn {\r\n const filters = usePendingFilters({ table, keys });\r\n\r\n const pendingTable = useMemo<PendingTable>(\r\n () => ({\r\n get: (key: string): string => filters.pending[key]?.[0] ?? \"\",\r\n set: (key: string, value: string): void => {\r\n filters.set(key, value ? [value] : []);\r\n },\r\n setMany: (updates: Record<string, string>): void => {\r\n for (const [k, v] of Object.entries(updates)) {\r\n filters.set(k, v ? [v] : []);\r\n }\r\n },\r\n }),\r\n [filters.pending, filters.set],\r\n );\r\n\r\n return {\r\n pendingTable,\r\n filterActiveCount: filters.appliedCount,\r\n onFilterApply: filters.apply,\r\n onFilterClear: filters.clear,\r\n onFilterReset: filters.reset,\r\n };\r\n}\r\n","\"use client\";\r\n\r\nimport { useState, useEffect, useCallback, useRef } from \"react\";\r\n\r\nexport const UNSAVED_CHANGES_EVENT = \"unsaved-changes:confirm\";\r\n\r\nexport interface UseUnsavedChangesOptions {\r\n /** Current form values to compare against initial */\r\n formValues: Record<string, string>;\r\n /** Initial form values snapshot (taken when data loads) */\r\n initialValues: Record<string, string> | null;\r\n /** Additional dirty flag from outside the form (e.g. pending avatar upload) */\r\n extraDirty?: boolean;\r\n /**\r\n * Called when the user attempts to navigate away with unsaved changes.\r\n * Must return a Promise that resolves to `true` (continue) or `false` (stay).\r\n * Defaults to `window.confirm` with a generic message.\r\n */\r\n confirmFn?: () => Promise<boolean>;\r\n /**\r\n * Message shown in the browser-native `beforeunload` dialog.\r\n * Most modern browsers ignore custom messages and show their own text.\r\n */\r\n beforeUnloadWarning?: string;\r\n}\r\n\r\nexport interface UseUnsavedChangesReturn {\r\n /** Whether there are any unsaved changes (form or extra) */\r\n isDirty: boolean;\r\n /** Whether the form fields specifically have changed */\r\n isFormDirty: boolean;\r\n /** Call after a successful save to reset initial values to current */\r\n markClean: () => void;\r\n /** Prompt the user and return true if they confirmed leaving, false otherwise */\r\n confirmLeave: () => Promise<boolean>;\r\n}\r\n\r\n/**\r\n * useUnsavedChanges\r\n *\r\n * Tracks unsaved form changes and warns users before navigating away.\r\n *\r\n * - Compares `formValues` to `initialValues` to detect form dirtiness\r\n * - Accepts an optional `extraDirty` flag (e.g. pending file upload)\r\n * - Registers a `beforeunload` handler while dirty\r\n * - Exposes `confirmLeave()` which calls the provided `confirmFn` (or falls back\r\n * to `window.confirm`) to handle navigation guards\r\n * - `markClean()` resets the snapshot after a successful save\r\n */\r\nexport function useUnsavedChanges({\r\n formValues,\r\n initialValues,\r\n extraDirty = false,\r\n confirmFn,\r\n beforeUnloadWarning = \"You have unsaved changes. Leave?\",\r\n}: UseUnsavedChangesOptions): UseUnsavedChangesReturn {\r\n const [savedSnapshot, setSavedSnapshot] = useState<Record<\r\n string,\r\n string\r\n > | null>(initialValues);\r\n const savedSnapshotRef = useRef(savedSnapshot);\r\n savedSnapshotRef.current = savedSnapshot;\r\n\r\n // Sync snapshot when initialValues first arrives (data load)\r\n useEffect(() => {\r\n if (initialValues && !savedSnapshotRef.current) {\r\n setSavedSnapshot(initialValues);\r\n }\r\n }, [initialValues]);\r\n\r\n const isFormDirty = (() => {\r\n if (!savedSnapshot) return false;\r\n return Object.keys(formValues).some(\r\n (key) => (formValues[key] ?? \"\") !== (savedSnapshot[key] ?? \"\"),\r\n );\r\n })();\r\n\r\n const isDirty = isFormDirty || extraDirty;\r\n\r\n useEffect(() => {\r\n if (!isDirty) return;\r\n const handler = (e: BeforeUnloadEvent) => {\r\n e.preventDefault();\r\n e.returnValue = beforeUnloadWarning;\r\n return beforeUnloadWarning;\r\n };\r\n window.addEventListener(\"beforeunload\", handler);\r\n return () => window.removeEventListener(\"beforeunload\", handler);\r\n }, [isDirty, beforeUnloadWarning]);\r\n\r\n const markClean = useCallback(() => {\r\n setSavedSnapshot({ ...formValues });\r\n }, [formValues]);\r\n\r\n const confirmLeave = useCallback((): Promise<boolean> => {\r\n if (!isDirty) return Promise.resolve(true);\r\n if (confirmFn) return confirmFn();\r\n return Promise.resolve(\r\n window.confirm(\"You have unsaved changes. Leave without saving?\"),\r\n );\r\n }, [isDirty, confirmFn]);\r\n\r\n return { isDirty, isFormDirty, markClean, confirmLeave };\r\n}\r\n","\"use client\";\r\n\r\nimport { useState, useCallback, useRef } from \"react\";\r\n\r\n// ---------------------------------------------------------------------------\r\n// Shared types — safe to use in any project consuming @mohasinac/react\r\n// ---------------------------------------------------------------------------\r\n\r\nexport interface BulkActionItemFailure {\r\n id: string;\r\n reason: string;\r\n}\r\n\r\nexport interface BulkActionSummary {\r\n total: number;\r\n succeeded: number;\r\n skipped: number;\r\n failed: number;\r\n}\r\n\r\nexport interface BulkActionResult<TData = Record<string, unknown>> {\r\n action: string;\r\n summary: BulkActionSummary;\r\n succeeded: string[];\r\n skipped: string[];\r\n failed: BulkActionItemFailure[];\r\n data?: TData;\r\n}\r\n\r\nexport interface BulkActionPayload {\r\n action: string;\r\n ids: string[];\r\n}\r\n\r\n// ---------------------------------------------------------------------------\r\n// useBulkAction\r\n// ---------------------------------------------------------------------------\r\n\r\nexport interface UseBulkActionOptions<\r\n TPayload extends BulkActionPayload,\r\n TData = Record<string, unknown>,\r\n> {\r\n /**\r\n * Async function that POSTs to the bulk endpoint.\r\n * Must return `Promise<BulkActionResult<TData>>`.\r\n */\r\n mutationFn: (payload: TPayload) => Promise<BulkActionResult<TData>>;\r\n /**\r\n * Called when `mutationFn` resolves (even for partial failures).\r\n * Inspect `result.summary` to build feedback.\r\n */\r\n onSuccess?: (\r\n result: BulkActionResult<TData>,\r\n payload: TPayload,\r\n ) => void | Promise<void>;\r\n /**\r\n * Called when `mutationFn` rejects.\r\n */\r\n onError?: (error: Error, payload: TPayload) => void;\r\n /**\r\n * When `true`, `execute()` parks the payload in `pendingPayload` instead of\r\n * running immediately. The caller renders a confirm modal wired to\r\n * `confirmAndExecute` / `cancelConfirm`.\r\n */\r\n requiresConfirm?: boolean;\r\n}\r\n\r\nexport interface UseBulkActionReturn<\r\n TPayload extends BulkActionPayload,\r\n TData = Record<string, unknown>,\r\n> {\r\n execute: (payload: TPayload) => Promise<void>;\r\n isLoading: boolean;\r\n result: BulkActionResult<TData> | null;\r\n error: Error | null;\r\n reset: () => void;\r\n pendingPayload: TPayload | null;\r\n confirmAndExecute: () => Promise<void>;\r\n cancelConfirm: () => void;\r\n}\r\n\r\n/**\r\n * useBulkAction\r\n *\r\n * Generic mutation hook for any `/bulk` endpoint.\r\n * Handles loading state, partial-success result tracking, and an optional\r\n * confirmation flow for destructive operations.\r\n *\r\n * Pair with `useBulkSelection` and a `BulkActionBar` component for the\r\n * full admin list pattern.\r\n */\r\nexport function useBulkAction<\r\n TPayload extends BulkActionPayload = BulkActionPayload,\r\n TData = Record<string, unknown>,\r\n>(\r\n options: UseBulkActionOptions<TPayload, TData>,\r\n): UseBulkActionReturn<TPayload, TData> {\r\n const [isLoading, setIsLoading] = useState(false);\r\n const [result, setResult] = useState<BulkActionResult<TData> | null>(null);\r\n const [error, setError] = useState<Error | null>(null);\r\n const [pendingPayload, setPendingPayload] = useState<TPayload | null>(null);\r\n\r\n const optionsRef = useRef(options);\r\n optionsRef.current = options;\r\n\r\n const runMutation = useCallback(async (payload: TPayload) => {\r\n setIsLoading(true);\r\n setError(null);\r\n try {\r\n const res = await optionsRef.current.mutationFn(payload);\r\n setResult(res);\r\n await optionsRef.current.onSuccess?.(res, payload);\r\n } catch (err) {\r\n const error =\r\n err instanceof Error\r\n ? err\r\n : new Error((err as { message?: string })?.message ?? \"Unexpected error\");\r\n setError(error);\r\n optionsRef.current.onError?.(error, payload);\r\n } finally {\r\n setIsLoading(false);\r\n }\r\n }, []);\r\n\r\n const execute = useCallback(\r\n async (payload: TPayload) => {\r\n if (optionsRef.current.requiresConfirm) {\r\n setPendingPayload(payload);\r\n return;\r\n }\r\n await runMutation(payload);\r\n },\r\n [runMutation],\r\n );\r\n\r\n const confirmAndExecute = useCallback(async () => {\r\n if (!pendingPayload) return;\r\n const payload = pendingPayload;\r\n setPendingPayload(null);\r\n await runMutation(payload);\r\n }, [pendingPayload, runMutation]);\r\n\r\n const cancelConfirm = useCallback(() => setPendingPayload(null), []);\r\n\r\n const reset = useCallback(() => {\r\n setResult(null);\r\n setError(null);\r\n setPendingPayload(null);\r\n }, []);\r\n\r\n return {\r\n execute,\r\n isLoading,\r\n result,\r\n error,\r\n reset,\r\n pendingPayload,\r\n confirmAndExecute,\r\n cancelConfirm,\r\n };\r\n}\r\n","// appkit/src/react/hooks/useContainerGrid.ts\r\n\"use client\";\r\nimport { useRef, useState, useEffect } from \"react\";\r\n\r\nexport interface UseContainerGridOptions {\r\n /** Minimum width of each grid item in pixels */\r\n minItemWidth: number;\r\n /** Gap between items in pixels (default: 16) */\r\n gap?: number;\r\n /** Minimum column count (default: 1) */\r\n minCols?: number;\r\n /** Maximum column count (default: Infinity) */\r\n maxCols?: number;\r\n}\r\n\r\nexport interface UseContainerGridResult {\r\n /** Attach to the grid container element */\r\n containerRef: React.RefObject<HTMLElement | null>;\r\n /** Current computed column count */\r\n cols: number;\r\n}\r\n\r\n/**\r\n * `useContainerGrid` — compute the number of columns that fit in a container\r\n * using a `ResizeObserver`. Drives fluid skeleton loader card counts.\r\n *\r\n * **Formula**: `cols = clamp(minCols, floor((width + gap) / (minItemWidth + gap)), maxCols)`\r\n *\r\n * Pair with the `fluid-grid-*` CSS utilities in `tailwind.config.js` so the\r\n * skeleton count always matches the visible grid columns.\r\n *\r\n * @example\r\n * ```tsx\r\n * const { containerRef, cols } = useContainerGrid({ minItemWidth: 220 });\r\n *\r\n * return (\r\n * <ul ref={containerRef as React.RefObject<HTMLUListElement>} className=\"fluid-grid-card gap-4\">\r\n * {isLoading\r\n * ? Array.from({ length: cols * 2 }).map((_, i) => <li key={i}><Skeleton /></li>)\r\n * : items.map((item) => <li key={item.id}><ProductCard product={item} /></li>)}\r\n * </ul>\r\n * );\r\n * ```\r\n */\r\nexport function useContainerGrid({\r\n minItemWidth,\r\n gap = 16,\r\n minCols = 1,\r\n maxCols = Infinity,\r\n}: UseContainerGridOptions): UseContainerGridResult {\r\n const containerRef = useRef<HTMLElement>(null);\r\n const [cols, setCols] = useState(minCols);\r\n\r\n useEffect(() => {\r\n const el = containerRef.current;\r\n if (!el) return;\r\n\r\n const compute = (width: number) => {\r\n const raw = Math.floor((width + gap) / (minItemWidth + gap));\r\n const clamped = Math.min(\r\n maxCols === Infinity ? raw : maxCols,\r\n Math.max(minCols, raw),\r\n );\r\n setCols(clamped);\r\n };\r\n\r\n const ro = new ResizeObserver(([entry]) => {\r\n if (entry) compute(entry.contentRect.width);\r\n });\r\n ro.observe(el);\r\n compute(el.getBoundingClientRect().width);\r\n\r\n return () => ro.disconnect();\r\n }, [minItemWidth, gap, minCols, maxCols]);\r\n\r\n return { containerRef, cols };\r\n}\r\n","// appkit/src/react/hooks/useVisibleItems.ts\r\n\"use client\";\r\nimport { useRef, useState, useEffect, useCallback } from \"react\";\r\n\r\nexport interface UseVisibleItemsOptions {\r\n /** Total number of items */\r\n total: number;\r\n /** Minimum width of each item in pixels */\r\n minItemWidth: number;\r\n /** Width reserved for each scroll arrow button (default: 36) */\r\n arrowWidth?: number;\r\n /** Gap between items in pixels (default: 8) */\r\n gap?: number;\r\n}\r\n\r\nexport interface UseVisibleItemsResult {\r\n /** Attach to the scroll container element */\r\n containerRef: React.RefObject<HTMLElement | null>;\r\n /** Number of items that fit in the current container width */\r\n visibleCount: number;\r\n /** Whether any items are hidden (arrows should be shown) */\r\n hasOverflow: boolean;\r\n /** Index of the first visible item */\r\n scrollOffset: number;\r\n setScrollOffset: React.Dispatch<React.SetStateAction<number>>;\r\n /** Scroll left by one page */\r\n scrollLeft: () => void;\r\n /** Scroll right by one page */\r\n scrollRight: () => void;\r\n canScrollLeft: boolean;\r\n canScrollRight: boolean;\r\n}\r\n\r\n/**\r\n * `useVisibleItems` — compute how many items fit in a container, handling\r\n * arrow button reservations. Powers `HorizontalScroller` and `TabStrip`.\r\n *\r\n * **Formula** (when overflow exists):\r\n * `visible = floor((containerWidth - 2 × (arrowWidth + gap) + gap) / (minItemWidth + gap))`\r\n *\r\n * When all items fit without arrows, no arrows are shown.\r\n */\r\nexport function useVisibleItems({\r\n total,\r\n minItemWidth,\r\n arrowWidth = 36,\r\n gap = 8,\r\n}: UseVisibleItemsOptions): UseVisibleItemsResult {\r\n const containerRef = useRef<HTMLElement>(null);\r\n const [visibleCount, setVisibleCount] = useState(total);\r\n const [scrollOffset, setScrollOffset] = useState(0);\r\n\r\n useEffect(() => {\r\n const el = containerRef.current;\r\n if (!el) return;\r\n\r\n const compute = (width: number) => {\r\n // Check if all items fit without scrolling\r\n const totalItemsWidth = total * minItemWidth + Math.max(0, total - 1) * gap;\r\n if (totalItemsWidth <= width) {\r\n setVisibleCount(total);\r\n return;\r\n }\r\n // Reserve space for both arrows\r\n const usable = width - 2 * (arrowWidth + gap);\r\n const raw = Math.floor((usable + gap) / (minItemWidth + gap));\r\n setVisibleCount(Math.max(1, raw));\r\n };\r\n\r\n const ro = new ResizeObserver(([entry]) => {\r\n if (entry) compute(entry.contentRect.width);\r\n });\r\n ro.observe(el);\r\n compute(el.getBoundingClientRect().width);\r\n\r\n return () => ro.disconnect();\r\n }, [total, minItemWidth, arrowWidth, gap]);\r\n\r\n // Clamp scroll offset when visibleCount or total changes\r\n useEffect(() => {\r\n setScrollOffset((o) => Math.min(o, Math.max(0, total - visibleCount)));\r\n }, [visibleCount, total]);\r\n\r\n const hasOverflow = visibleCount < total;\r\n\r\n const scrollLeft = useCallback(\r\n () => setScrollOffset((o) => Math.max(0, o - visibleCount)),\r\n [visibleCount],\r\n );\r\n\r\n const scrollRight = useCallback(\r\n () =>\r\n setScrollOffset((o) =>\r\n Math.min(total - visibleCount, o + visibleCount),\r\n ),\r\n [visibleCount, total],\r\n );\r\n\r\n return {\r\n containerRef,\r\n visibleCount,\r\n hasOverflow,\r\n scrollOffset,\r\n setScrollOffset,\r\n scrollLeft,\r\n scrollRight,\r\n canScrollLeft: scrollOffset > 0,\r\n canScrollRight: scrollOffset + visibleCount < total,\r\n };\r\n}\r\n","\"use client\";\r\n\r\nimport { useCallback, useRef, useState } from \"react\";\r\n\r\n// ─── ModalEntry ───────────────────────────────────────────────────────────────\r\n\r\nexport interface ModalEntry<T = unknown> {\r\n id: string;\r\n data?: T;\r\n}\r\n\r\n// ─── useModalStack ────────────────────────────────────────────────────────────\r\n\r\n/**\r\n * useModalStack — manages a LIFO stack of modal/drawer instances.\r\n *\r\n * Supports nested modal flows (e.g. confirmation on top of form).\r\n * The topmost entry in the stack is the \"active\" modal.\r\n *\r\n * @example\r\n * ```tsx\r\n * const { open, close, closeAll, isOpen, peek } = useModalStack<ReviewData>();\r\n *\r\n * // open a modal with optional payload:\r\n * <Button onClick={() => open(\"review-modal\", review)}>Write Review</Button>\r\n *\r\n * const active = peek(); // { id: \"review-modal\", data: review }\r\n * const visible = isOpen(\"review-modal\");\r\n * ```\r\n */\r\nexport function useModalStack<T = unknown>() {\r\n const [stack, setStack] = useState<ModalEntry<T>[]>([]);\r\n const idCounter = useRef(0);\r\n\r\n const open = useCallback((id: string, data?: T) => {\r\n setStack((prev) => [...prev, { id, data }]);\r\n }, []);\r\n\r\n const close = useCallback(() => {\r\n setStack((prev) => prev.slice(0, -1));\r\n }, []);\r\n\r\n const closeAll = useCallback(() => {\r\n setStack([]);\r\n }, []);\r\n\r\n const closeById = useCallback((id: string) => {\r\n setStack((prev) => prev.filter((e) => e.id !== id));\r\n }, []);\r\n\r\n const peek = useCallback((): ModalEntry<T> | undefined => {\r\n return stack[stack.length - 1];\r\n }, [stack]);\r\n\r\n const isOpen = useCallback(\r\n (id: string): boolean => {\r\n return stack.some((e) => e.id === id);\r\n },\r\n [stack],\r\n );\r\n\r\n const isTopmost = useCallback(\r\n (id: string): boolean => {\r\n return stack[stack.length - 1]?.id === id;\r\n },\r\n [stack],\r\n );\r\n\r\n const nextId = useCallback(() => {\r\n idCounter.current++;\r\n return `modal-${idCounter.current}`;\r\n }, []);\r\n\r\n return {\r\n stack,\r\n open,\r\n close,\r\n closeAll,\r\n closeById,\r\n peek,\r\n isOpen,\r\n isTopmost,\r\n nextId,\r\n depth: stack.length,\r\n };\r\n}\r\n","/**\n * Logger Class — @mohasinac/core\n *\n * Singleton class for application logging.\n * Pure utility — no framework or app-specific imports.\n *\n * The `logFileUrl` constructor option replaces the previous app-specific\n * `import(\"@/constants\")` call, making this usable in any context.\n */\n\nexport type LogLevel = \"debug\" | \"info\" | \"warn\" | \"error\";\n\nexport interface LogEntry {\n level: LogLevel;\n message: string;\n timestamp: Date;\n data?: unknown;\n}\n\nexport interface LoggerOptions {\n minLevel?: LogLevel;\n enableConsole?: boolean;\n enableStorage?: boolean;\n /**\n * URL to POST error log entries. Set to your `/api/logs/write` route.\n */\n logFileUrl?: string;\n /**\n * @deprecated Prefer `logFileUrl`. When `true` and `logFileUrl` is not set,\n * defaults to `/api/logs/write` for backward compatibility with the\n * previous app-coupled Logger implementation.\n */\n enableFileLogging?: boolean;\n maxEntries?: number;\n /** Optional function to sanitize data before logging (e.g., PII redaction). */\n sanitizer?: (data: unknown) => unknown;\n}\n\nexport class Logger {\n private static instance: Logger;\n private logs: LogEntry[] = [];\n private options: Required<\n Omit<LoggerOptions, \"logFileUrl\" | \"enableFileLogging\" | \"sanitizer\">\n > & {\n logFileUrl?: string;\n sanitizer?: (data: unknown) => unknown;\n };\n private levelPriority: Record<LogLevel, number> = {\n debug: 0,\n info: 1,\n warn: 2,\n error: 3,\n };\n\n private constructor(options?: LoggerOptions) {\n // `enableFileLogging: true` is a backward-compat alias for logFileUrl.\n const fileUrl =\n options?.logFileUrl ??\n (options?.enableFileLogging ? \"/api/logs/write\" : undefined);\n this.options = {\n minLevel: options?.minLevel ?? \"debug\",\n enableConsole: options?.enableConsole ?? true,\n enableStorage: options?.enableStorage ?? false,\n logFileUrl: fileUrl,\n maxEntries: options?.maxEntries ?? 1000,\n sanitizer: options?.sanitizer,\n };\n }\n\n /** Get singleton instance */\n public static getInstance(options?: LoggerOptions): Logger {\n if (!Logger.instance) {\n Logger.instance = new Logger(options);\n }\n return Logger.instance;\n }\n\n /** Set or update the data sanitizer (e.g., for PII redaction). */\n public static setSanitizer(fn: (data: unknown) => unknown): void {\n Logger.getInstance().options.sanitizer = fn;\n }\n\n private shouldLog(level: LogLevel): boolean {\n return (\n this.levelPriority[level] >= this.levelPriority[this.options.minLevel]\n );\n }\n\n private addLog(level: LogLevel, message: string, data?: unknown): void {\n if (!this.shouldLog(level)) return;\n\n const sanitized =\n data && this.options.sanitizer ? this.options.sanitizer(data) : data;\n const entry: LogEntry = {\n level,\n message,\n timestamp: new Date(),\n data: sanitized,\n };\n\n this.logs.push(entry);\n if (this.logs.length > this.options.maxEntries) {\n this.logs.shift();\n }\n\n if (this.options.enableConsole) {\n this.logToConsole(entry);\n }\n\n if (this.options.enableStorage && typeof window !== \"undefined\") {\n this.saveToStorage();\n }\n\n if (this.options.logFileUrl && level === \"error\") {\n this.writeToFile(entry).catch(() => {\n // Silently fail to prevent recursive logging\n });\n }\n }\n\n private logToConsole(entry: LogEntry): void {\n const prefix = `[${entry.level.toUpperCase()}] ${entry.timestamp.toISOString()}`;\n const message = `${prefix} ${entry.message}`;\n switch (entry.level) {\n case \"debug\":\n console.debug(message, entry.data);\n break;\n case \"info\":\n console.info(message, entry.data);\n break;\n case \"warn\":\n console.warn(message, entry.data);\n break;\n case \"error\":\n console.error(message, entry.data);\n break;\n }\n }\n\n private saveToStorage(): void {\n try {\n localStorage.setItem(\"app_logs\", JSON.stringify(this.logs));\n } catch {\n // Silently fail\n }\n }\n\n private async writeToFile(entry: LogEntry): Promise<void> {\n if (typeof window === \"undefined\" || !this.options.logFileUrl) return;\n try {\n await fetch(this.options.logFileUrl, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n level: entry.level,\n message: entry.message,\n timestamp: entry.timestamp.toISOString(),\n data: entry.data,\n }),\n });\n } catch {\n // Silently fail\n }\n }\n\n public debug(message: string, data?: unknown): void {\n this.addLog(\"debug\", message, data);\n }\n\n public info(message: string, data?: unknown): void {\n this.addLog(\"info\", message, data);\n }\n\n public warn(message: string, data?: unknown): void {\n this.addLog(\"warn\", message, data);\n }\n\n public error(message: string, data?: unknown): void {\n this.addLog(\"error\", message, data);\n }\n\n public getLogs(level?: LogLevel): LogEntry[] {\n if (level) return this.logs.filter((log) => log.level === level);\n return [...this.logs];\n }\n\n public clear(): void {\n this.logs = [];\n if (this.options.enableStorage && typeof window !== \"undefined\") {\n localStorage.removeItem(\"app_logs\");\n }\n }\n\n public export(): string {\n return JSON.stringify(this.logs, null, 2);\n }\n\n public getStats(): Record<LogLevel, number> {\n return {\n debug: this.logs.filter((l) => l.level === \"debug\").length,\n info: this.logs.filter((l) => l.level === \"info\").length,\n warn: this.logs.filter((l) => l.level === \"warn\").length,\n error: this.logs.filter((l) => l.level === \"error\").length,\n };\n }\n}\n\n/** Shared singleton instance */\nexport const logger = Logger.getInstance();\n","/**\n * Queue Class — @mohasinac/core\n *\n * Generic priority queue for task management.\n * Pure utility — no framework or app-specific imports.\n */\n\nimport { Logger } from \"./Logger\";\n\nconst qLogger = Logger.getInstance();\n\nexport interface QueueOptions {\n concurrency?: number;\n autoStart?: boolean;\n}\n\nexport interface Task<T = unknown> {\n id: string;\n fn: () => Promise<T>;\n priority?: number;\n}\n\nexport class Queue<T = unknown> {\n private tasks: Task<T>[] = [];\n private running: number = 0;\n private readonly concurrency: number;\n private autoStart: boolean;\n private results: Map<string, T> = new Map();\n private errors: Map<string, Error> = new Map();\n\n constructor(options?: QueueOptions) {\n this.concurrency = options?.concurrency ?? 1;\n this.autoStart = options?.autoStart ?? true;\n }\n\n /** Add a task to the queue */\n public add(id: string, fn: () => Promise<T>, priority: number = 0): void {\n this.tasks.push({ id, fn, priority });\n this.tasks.sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0));\n if (this.autoStart) {\n this.process();\n }\n }\n\n private process(): void {\n while (this.running < this.concurrency && this.tasks.length > 0) {\n const task = this.tasks.shift();\n if (!task) break;\n this.running++;\n task\n .fn()\n .then((result) => {\n this.results.set(task.id, result);\n })\n .catch((error: unknown) => {\n this.errors.set(task.id, error as Error);\n })\n .finally(() => {\n this.running--;\n this.process();\n })\n .catch((err: unknown) => {\n qLogger.error(\"Queue.process error in finally\", { err });\n });\n }\n }\n\n public start(): void {\n this.process();\n }\n\n public pause(): void {\n this.autoStart = false;\n }\n\n public resume(): void {\n this.autoStart = true;\n this.process();\n }\n\n public clear(): void {\n this.tasks = [];\n this.results.clear();\n this.errors.clear();\n }\n\n public getResult(id: string): T | undefined {\n return this.results.get(id);\n }\n\n public getError(id: string): Error | undefined {\n return this.errors.get(id);\n }\n\n public size(): number {\n return this.tasks.length;\n }\n\n public getRunning(): number {\n return this.running;\n }\n\n public isEmpty(): boolean {\n return this.tasks.length === 0 && this.running === 0;\n }\n\n public async waitForCompletion(): Promise<void> {\n while (!this.isEmpty()) {\n await new Promise<void>((resolve) => setTimeout(resolve, 100));\n }\n }\n\n public getStats(): {\n pending: number;\n running: number;\n completed: number;\n failed: number;\n } {\n return {\n pending: this.tasks.length,\n running: this.running,\n completed: this.results.size,\n failed: this.errors.size,\n };\n }\n}\n","/**\n * StorageManager Class — @mohasinac/core\n *\n * Singleton class for managing localStorage and sessionStorage with\n * namespace prefixing and SSR-safe fallbacks.\n * Pure utility — no framework or app-specific imports.\n */\n\nimport { Logger } from \"./Logger\";\n\nconst sLogger = Logger.getInstance();\n\nexport type StorageType = \"local\" | \"session\";\n\nexport interface StorageOptions {\n type?: StorageType;\n prefix?: string;\n}\n\nexport class StorageManager {\n /** Per-prefix instance map — prevents namespace collisions */\n private static instances = new Map<string, StorageManager>();\n private readonly prefix: string;\n\n private constructor(prefix: string = \"app_\") {\n this.prefix = prefix;\n }\n\n /**\n * Get-or-create a StorageManager for the given prefix.\n * Each prefix returns an independent instance.\n */\n public static getInstance(prefix: string = \"\"): StorageManager {\n if (!StorageManager.instances.has(prefix)) {\n StorageManager.instances.set(prefix, new StorageManager(prefix));\n }\n return StorageManager.instances.get(prefix)!;\n }\n\n private getStorage(type: StorageType): Storage | null {\n try {\n if (typeof window === \"undefined\") return null;\n const storage =\n type === \"local\" ? window.localStorage : window.sessionStorage;\n return storage ?? null;\n } catch {\n return null;\n }\n }\n\n private generateKey(key: string): string {\n return `${this.prefix}${key}`;\n }\n\n public set<T>(key: string, value: T, options?: StorageOptions): boolean {\n const storage = this.getStorage(options?.type ?? \"local\");\n if (!storage) return false;\n try {\n storage.setItem(this.generateKey(key), JSON.stringify(value));\n return true;\n } catch (error) {\n sLogger.error(\"StorageManager.set error\", { error });\n return false;\n }\n }\n\n public get<T>(key: string, options?: StorageOptions): T | null {\n const storage = this.getStorage(options?.type ?? \"local\");\n if (!storage) return null;\n try {\n const item = storage.getItem(this.generateKey(key));\n if (item === null) return null;\n return JSON.parse(item) as T;\n } catch (error) {\n sLogger.error(\"StorageManager.get error\", { error });\n return null;\n }\n }\n\n public remove(key: string, options?: StorageOptions): boolean {\n const storage = this.getStorage(options?.type ?? \"local\");\n if (!storage) return false;\n try {\n storage.removeItem(this.generateKey(key));\n return true;\n } catch (error) {\n sLogger.error(\"StorageManager.remove error\", { error });\n return false;\n }\n }\n\n public clear(options?: StorageOptions): boolean {\n const storage = this.getStorage(options?.type ?? \"local\");\n if (!storage) return false;\n try {\n const keys = Object.keys(storage);\n keys.forEach((k) => {\n if (k.startsWith(this.prefix)) storage.removeItem(k);\n });\n return true;\n } catch (error) {\n sLogger.error(\"StorageManager.clear error\", { error });\n return false;\n }\n }\n\n public has(key: string, options?: StorageOptions): boolean {\n return this.get(key, options) !== null;\n }\n\n public keys(options?: StorageOptions): string[] {\n const storage = this.getStorage(options?.type ?? \"local\");\n if (!storage) return [];\n const result: string[] = [];\n for (let i = 0; i < storage.length; i++) {\n const k = storage.key(i);\n if (k?.startsWith(this.prefix)) {\n result.push(k.slice(this.prefix.length));\n }\n }\n return result;\n }\n\n public size(options?: StorageOptions): number {\n const storage = this.getStorage(options?.type ?? \"local\");\n if (!storage) return 0;\n let bytes = 0;\n for (let i = 0; i < storage.length; i++) {\n const k = storage.key(i);\n if (k?.startsWith(this.prefix)) {\n const v = storage.getItem(k);\n bytes += k.length + (v?.length ?? 0);\n }\n }\n return bytes;\n }\n\n public isAvailable(type: StorageType = \"local\"): boolean {\n const storage = this.getStorage(type);\n if (!storage) return false;\n try {\n const testKey = \"__storage_test__\";\n storage.setItem(testKey, \"1\");\n storage.removeItem(testKey);\n return true;\n } catch {\n return false;\n }\n }\n\n public getAll<T = unknown>(options?: StorageOptions): Record<string, T> {\n const storage = this.getStorage(options?.type ?? \"local\");\n if (!storage) return {};\n const result: Record<string, T> = {};\n for (let i = 0; i < storage.length; i++) {\n const k = storage.key(i);\n if (k?.startsWith(this.prefix)) {\n const v = this.get<T>(k.slice(this.prefix.length), options);\n if (v !== null) result[k.slice(this.prefix.length)] = v;\n }\n }\n return result;\n }\n}\n\n/** Default StorageManager instance (empty prefix) */\nexport const storageManager = StorageManager.getInstance(\"\");\n","/**\n * EventBus Class — @mohasinac/core\n *\n * Singleton pub/sub event bus for decoupled communication.\n * Pure utility — no framework or app-specific imports.\n */\n\nimport { Logger } from \"./Logger\";\n\nconst logger = Logger.getInstance();\n\ntype EventCallback = (...args: unknown[]) => void;\n\nexport interface EventSubscription {\n unsubscribe: () => void;\n}\n\nexport class EventBus {\n private static instance: EventBus;\n private readonly events: Map<string, EventCallback[]> = new Map();\n\n private constructor() {}\n\n public static getInstance(): EventBus {\n if (!EventBus.instance) {\n EventBus.instance = new EventBus();\n }\n return EventBus.instance;\n }\n\n public on(event: string, callback: EventCallback): EventSubscription {\n if (!this.events.has(event)) {\n this.events.set(event, []);\n }\n this.events.get(event)!.push(callback);\n return { unsubscribe: () => this.off(event, callback) };\n }\n\n public once(event: string, callback: EventCallback): EventSubscription {\n const wrapped = (...args: unknown[]) => {\n callback(...args);\n this.off(event, wrapped);\n };\n return this.on(event, wrapped);\n }\n\n public off(event: string, callback: EventCallback): void {\n const callbacks = this.events.get(event);\n if (!callbacks) return;\n const idx = callbacks.indexOf(callback);\n if (idx > -1) callbacks.splice(idx, 1);\n if (callbacks.length === 0) this.events.delete(event);\n }\n\n public emit(event: string, ...args: unknown[]): void {\n const callbacks = this.events.get(event);\n if (!callbacks) return;\n callbacks.forEach((cb) => {\n try {\n cb(...args);\n } catch (error) {\n logger.error(`EventBus: error in handler for \"${event}\"`, { error });\n }\n });\n }\n\n public removeAllListeners(event?: string): void {\n if (event) {\n this.events.delete(event);\n } else {\n this.events.clear();\n }\n }\n\n public listenerCount(event: string): number {\n return this.events.get(event)?.length ?? 0;\n }\n\n public eventNames(): string[] {\n return Array.from(this.events.keys());\n }\n\n public hasListeners(event: string): boolean {\n return this.listenerCount(event) > 0;\n }\n}\n\n/** Shared singleton instance */\nexport const eventBus = EventBus.getInstance();\n","/**\n * Authorization Guards\n *\n * Pure utility functions that throw AuthenticationError / AuthorizationError.\n * Suitable for API routes, Server Actions, and middleware.\n *\n * Note: getUserFromRequest / requireAuthFromRequest are intentionally omitted —\n * they depend on Firebase Admin and the user repository; implement them in your\n * app layer using these primitives.\n */\n\nimport { AuthenticationError, AuthorizationError } from \"@mohasinac/errors\";\n\nexport type UserRole = \"admin\" | \"moderator\" | \"seller\" | \"user\";\n\nconst ROLE_HIERARCHY: Record<UserRole, number> = {\n admin: 4,\n moderator: 3,\n seller: 2,\n user: 1,\n};\n\nconst MSG = {\n NOT_AUTHENTICATED: \"Please log in to continue\",\n FORBIDDEN: \"You do not have permission to perform this action\",\n EMAIL_NOT_VERIFIED: \"Please verify your email address before logging in\",\n ACCOUNT_DISABLED: \"Your account has been disabled. Please contact support\",\n};\n\nexport function requireAuth(user: unknown): void {\n if (!user) {\n throw new AuthenticationError(MSG.NOT_AUTHENTICATED);\n }\n}\n\nexport function requireRole(\n user: Record<string, unknown> | null | undefined,\n roles: UserRole | UserRole[],\n): void {\n if (!user) throw new AuthenticationError(MSG.NOT_AUTHENTICATED);\n const requiredRoles = Array.isArray(roles) ? roles : [roles];\n const userRole = (user.role as UserRole) || \"user\";\n if (!requiredRoles.includes(userRole)) {\n throw new AuthorizationError(MSG.FORBIDDEN);\n }\n}\n\nexport function requireOwnership(\n user: Record<string, unknown> | null | undefined,\n resourceOwnerId: string,\n): void {\n if (!user) throw new AuthenticationError(MSG.NOT_AUTHENTICATED);\n if (user.uid !== resourceOwnerId) {\n throw new AuthorizationError(MSG.FORBIDDEN);\n }\n}\n\nexport function requireEmailVerified(\n user: Record<string, unknown> | null | undefined,\n): void {\n if (!user) throw new AuthenticationError(MSG.NOT_AUTHENTICATED);\n if (!user.emailVerified) throw new AuthorizationError(MSG.EMAIL_NOT_VERIFIED);\n}\n\nexport function requireActiveAccount(\n user: Record<string, unknown> | null | undefined,\n): void {\n if (!user) throw new AuthenticationError(MSG.NOT_AUTHENTICATED);\n if (user.disabled) throw new AuthorizationError(MSG.ACCOUNT_DISABLED);\n}\n\n/**\n * Check if currentUserRole is allowed to change a target user's role.\n * - admin: can change anyone's role\n * - moderator: can only change user → seller\n */\nexport function canChangeRole(\n currentUserRole: UserRole,\n targetCurrentRole: UserRole,\n targetNewRole: UserRole,\n): boolean {\n if (currentUserRole === \"admin\") return true;\n if (currentUserRole === \"moderator\") {\n return targetCurrentRole === \"user\" && targetNewRole === \"seller\";\n }\n return false;\n}\n\n/** Return the numeric hierarchy level for a role. */\nexport function getRoleLevel(role: UserRole): number {\n return ROLE_HIERARCHY[role] ?? 0;\n}\n","/**\n * Error Tracking — Provider-agnostic types, enums, and utilities.\n *\n * Implementations that require Firebase Crashlytics or external SDKs should\n * be wired in the app's monitoring setup by calling setErrorTracker().\n */\n\nexport enum ErrorSeverity {\n LOW = \"low\",\n MEDIUM = \"medium\",\n HIGH = \"high\",\n CRITICAL = \"critical\",\n}\n\nexport enum ErrorCategory {\n AUTHENTICATION = \"authentication\",\n API = \"api\",\n DATABASE = \"database\",\n VALIDATION = \"validation\",\n NETWORK = \"network\",\n PERMISSION = \"permission\",\n UI = \"ui\",\n UNKNOWN = \"unknown\",\n}\n\nexport interface ErrorContext {\n userId?: string;\n userRole?: string;\n page?: string;\n component?: string;\n action?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport interface TrackedError {\n message: string;\n stack?: string;\n category: ErrorCategory;\n severity: ErrorSeverity;\n context?: ErrorContext;\n timestamp: string;\n}\n\nexport type ErrorTrackerFn = (\n error: Error | string,\n category: ErrorCategory,\n severity: ErrorSeverity,\n context?: ErrorContext,\n) => void;\n\nconst TRACKER_KEY = \"__mohasinac_error_tracker__\" as const;\n\ndeclare global {\n // eslint-disable-next-line no-var\n var __mohasinac_error_tracker__: ErrorTrackerFn | undefined;\n}\n\nfunction getTracker(): ErrorTrackerFn {\n return (\n globalThis.__mohasinac_error_tracker__ ??\n ((error, category, severity, context) => {\n const msg = error instanceof Error ? error.message : error;\n console.error(`[${severity.toUpperCase()}][${category}] ${msg}`, context);\n })\n );\n}\n\n/** Override the default console-based tracker with a custom implementation. */\nexport function setErrorTracker(fn: ErrorTrackerFn): void {\n (globalThis as Record<string, unknown>)[TRACKER_KEY] = fn;\n}\n\nexport function trackError(\n error: Error | string,\n category: ErrorCategory = ErrorCategory.UNKNOWN,\n severity: ErrorSeverity = ErrorSeverity.MEDIUM,\n context?: ErrorContext,\n): void {\n getTracker()(error, category, severity, context);\n}\n\nexport function trackApiError(\n error: Error | string,\n context?: ErrorContext,\n): void {\n trackError(error, ErrorCategory.API, ErrorSeverity.HIGH, context);\n}\n\nexport function trackAuthError(\n error: Error | string,\n context?: ErrorContext,\n): void {\n trackError(error, ErrorCategory.AUTHENTICATION, ErrorSeverity.HIGH, context);\n}\n\nexport function trackValidationError(\n error: Error | string,\n context?: ErrorContext,\n): void {\n trackError(error, ErrorCategory.VALIDATION, ErrorSeverity.LOW, context);\n}\n\nexport function trackDatabaseError(\n error: Error | string,\n context?: ErrorContext,\n): void {\n trackError(error, ErrorCategory.DATABASE, ErrorSeverity.CRITICAL, context);\n}\n\nexport function trackPermissionError(\n error: Error | string,\n context?: ErrorContext,\n): void {\n trackError(error, ErrorCategory.PERMISSION, ErrorSeverity.MEDIUM, context);\n}\n","/**\r\n * Client-Side Error Logging Utilities\r\n *\r\n * Wraps the Logger singleton for use in React components, client hooks, and\r\n * browser-only code. Automatically attaches timestamp, userAgent, and current URL.\r\n *\r\n * For server-side logging use `server-logger.ts`.\r\n */\r\n\r\nimport { logger } from \"../core\";\r\nimport { AppError } from \"../errors\";\r\n\r\nexport interface ClientErrorContext {\r\n userId?: string;\r\n component?: string;\r\n action?: string;\r\n url?: string;\r\n method?: string;\r\n statusCode?: number;\r\n [key: string]: unknown;\r\n}\r\n\r\nfunction buildClientMeta(\r\n error: unknown,\r\n context?: ClientErrorContext,\r\n): Record<string, unknown> {\r\n const base: Record<string, unknown> = {\r\n ...context,\r\n timestamp: new Date().toISOString(),\r\n userAgent:\r\n typeof navigator !== \"undefined\" ? navigator.userAgent : \"unknown\",\r\n url: typeof window !== \"undefined\" ? window.location.href : \"unknown\",\r\n };\r\n\r\n if (error instanceof AppError) {\r\n base.error = {\r\n name: error.name,\r\n message: error.message,\r\n code: error.code,\r\n statusCode: error.statusCode,\r\n data: error.data,\r\n };\r\n } else if (error instanceof Error) {\r\n base.error = {\r\n name: error.name,\r\n message: error.message,\r\n stack: error.stack,\r\n };\r\n } else {\r\n base.error = error;\r\n }\r\n\r\n return base;\r\n}\r\n\r\nexport const logClientError = (\r\n message: string,\r\n error: unknown,\r\n context?: ClientErrorContext,\r\n): void => {\r\n logger.error(message, buildClientMeta(error, context));\r\n};\r\n\r\nexport const logClientWarning = (\r\n message: string,\r\n data?: ClientErrorContext,\r\n): void => {\r\n logger.warn(message, { ...data, timestamp: new Date().toISOString() });\r\n};\r\n\r\nexport const logClientInfo = (\r\n message: string,\r\n data?: ClientErrorContext,\r\n): void => {\r\n logger.info(message, { ...data, timestamp: new Date().toISOString() });\r\n};\r\n\r\nexport const logClientDebug = (\r\n message: string,\r\n data?: ClientErrorContext,\r\n): void => {\r\n logger.debug(message, { ...data, timestamp: new Date().toISOString() });\r\n};\r\n","/**\r\n * Server-Side Error Logging Utilities\r\n *\r\n * Wraps the Logger singleton for use in API routes, server components, and\r\n * server actions. Attaches request metadata when a NextRequest is available.\r\n *\r\n * IMPORTANT: Only import this file in server-side code. For client-side code\r\n * use `client-logger.ts`.\r\n */\r\n\r\nimport { logger } from \"../core\";\r\nimport { AppError } from \"../errors\";\r\nimport { type NextRequest } from \"next/server\";\r\n\r\nexport interface ServerErrorContext {\r\n userId?: string;\r\n endpoint?: string;\r\n method?: string;\r\n statusCode?: number;\r\n requestId?: string;\r\n [key: string]: unknown;\r\n}\r\n\r\n/** Pull the commonly needed headers from a NextRequest in one call. */\r\nexport const extractRequestMetadata = (request: NextRequest) => ({\r\n method: request.method,\r\n url: request.url,\r\n userAgent: request.headers.get(\"user-agent\") ?? \"unknown\",\r\n ip:\r\n request.headers.get(\"x-forwarded-for\") ??\r\n request.headers.get(\"x-real-ip\") ??\r\n \"unknown\",\r\n referer: request.headers.get(\"referer\") ?? \"none\",\r\n});\r\n\r\nfunction buildServerMeta(\r\n error: unknown,\r\n context?: ServerErrorContext,\r\n): Record<string, unknown> {\r\n const base: Record<string, unknown> = {\r\n ...context,\r\n timestamp: new Date().toISOString(),\r\n };\r\n\r\n if (error instanceof AppError) {\r\n base.error = {\r\n name: error.name,\r\n message: error.message,\r\n code: error.code,\r\n statusCode: error.statusCode,\r\n data: error.data,\r\n };\r\n } else if (error instanceof Error) {\r\n base.error = {\r\n name: error.name,\r\n message: error.message,\r\n stack: error.stack,\r\n };\r\n } else {\r\n base.error = error;\r\n }\r\n\r\n return base;\r\n}\r\n\r\nexport const logServerError = (\r\n message: string,\r\n error: unknown,\r\n context?: ServerErrorContext,\r\n): void => {\r\n logger.error(message, buildServerMeta(error, context));\r\n};\r\n\r\nexport const logServerWarning = (\r\n message: string,\r\n data?: ServerErrorContext,\r\n): void => {\r\n logger.warn(message, { ...data, timestamp: new Date().toISOString() });\r\n};\r\n\r\nexport const logServerInfo = (\r\n message: string,\r\n data?: ServerErrorContext,\r\n): void => {\r\n logger.info(message, { ...data, timestamp: new Date().toISOString() });\r\n};\r\n\r\nexport const logServerDebug = (\r\n message: string,\r\n data?: ServerErrorContext,\r\n): void => {\r\n logger.debug(message, { ...data, timestamp: new Date().toISOString() });\r\n};\r\n","\"use client\";\r\n\r\n/**\r\n * Generic React Error Boundary\r\n *\r\n * Catches errors anywhere in the wrapped component tree and renders a\r\n * configurable fallback UI. Pass `fallback` for a fully custom view, or\r\n * `renderFallback` for a render-prop version that receives the caught error\r\n * and a reset handler.\r\n */\r\n\r\nimport React, { Component, type ReactNode, type ErrorInfo } from \"react\";\r\nimport { Logger } from \"../core\";\r\nimport { trackError, ErrorCategory, ErrorSeverity } from \"../monitoring\";\r\n\r\nexport interface ErrorBoundaryProps {\r\n children: ReactNode;\r\n /** Static fallback node — shown instead of the default error UI. */\r\n fallback?: ReactNode;\r\n /** Render-prop fallback — receives the error and a reset callback. */\r\n renderFallback?: (error: Error | null, reset: () => void) => ReactNode;\r\n /** Optional callback invoked after componentDidCatch. */\r\n onError?: (error: Error, errorInfo: ErrorInfo) => void;\r\n}\r\n\r\ninterface State {\r\n hasError: boolean;\r\n error: Error | null;\r\n}\r\n\r\nfunction DefaultFallback({\r\n error,\r\n onReset,\r\n}: {\r\n error: Error | null;\r\n onReset: () => void;\r\n}) {\r\n return (\r\n <div\r\n role=\"alert\"\r\n style={{\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n minHeight: \"100vh\",\r\n padding: \"2rem\",\r\n textAlign: \"center\",\r\n }}\r\n >\r\n <h1 style={{ fontSize: \"1.5rem\", marginBottom: \"0.5rem\" }}>\r\n Something went wrong\r\n </h1>\r\n <p style={{ marginBottom: \"1.5rem\", opacity: 0.7 }}>\r\n An unexpected error occurred. Please try again.\r\n </p>\r\n {process.env.NODE_ENV === \"development\" && error && (\r\n <pre\r\n style={{\r\n fontSize: \"0.75rem\",\r\n padding: \"1rem\",\r\n background: \"#f3f4f6\",\r\n borderRadius: \"0.5rem\",\r\n textAlign: \"left\",\r\n maxWidth: \"40rem\",\r\n overflow: \"auto\",\r\n marginBottom: \"1.5rem\",\r\n }}\r\n >\r\n {error.message}\r\n </pre>\r\n )}\r\n <button onClick={onReset} type=\"button\">\r\n Try again\r\n </button>\r\n </div>\r\n );\r\n}\r\n\r\nexport class ErrorBoundary extends Component<ErrorBoundaryProps, State> {\r\n private readonly log = Logger.getInstance({ enableConsole: true });\r\n\r\n constructor(props: ErrorBoundaryProps) {\r\n super(props);\r\n this.state = { hasError: false, error: null };\r\n }\r\n\r\n static getDerivedStateFromError(error: Error): State {\r\n return { hasError: true, error };\r\n }\r\n\r\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\r\n this.log.error(\"ErrorBoundary caught an error\", {\r\n error: error.message,\r\n stack: error.stack,\r\n componentStack: errorInfo.componentStack,\r\n timestamp: new Date().toISOString(),\r\n });\r\n\r\n trackError(error, ErrorCategory.UI, ErrorSeverity.HIGH);\r\n\r\n this.props.onError?.(error, errorInfo);\r\n }\r\n\r\n handleReset = () => {\r\n this.setState({ hasError: false, error: null });\r\n };\r\n\r\n render() {\r\n if (!this.state.hasError) {\r\n return this.props.children;\r\n }\r\n\r\n if (this.props.renderFallback) {\r\n return this.props.renderFallback(this.state.error, this.handleReset);\r\n }\r\n\r\n if (this.props.fallback) {\r\n return this.props.fallback;\r\n }\r\n\r\n return (\r\n <DefaultFallback error={this.state.error} onReset={this.handleReset} />\r\n );\r\n }\r\n}\r\n"]}
|