@mohasinac/appkit 3.0.3 → 3.0.6
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/dist/_internal/client/features/filters/filter-load-options.js +11 -1
- package/dist/_internal/client/features/layout/filterNavItems.js +0 -1
- package/dist/_internal/client/features/layout/index.js +0 -1
- package/dist/_internal/client/features/maintenance/views/MaintenanceDashboardView.js +0 -1
- package/dist/_internal/client/features/maintenance/views/ServerErrorDetailView.js +0 -1
- package/dist/_internal/server/features/auctions/data.d.ts +2 -4
- package/dist/_internal/server/features/auctions/data.js +3 -9
- package/dist/_internal/server/features/checkout/actions.js +9 -9
- package/dist/_internal/server/features/classified/adapters.d.ts +2 -15
- package/dist/_internal/server/features/classified/adapters.js +2 -17
- package/dist/_internal/server/features/classified/data.d.ts +1 -6
- package/dist/_internal/server/features/classified/data.js +2 -10
- package/dist/_internal/server/features/digital-code/adapters.d.ts +2 -15
- package/dist/_internal/server/features/digital-code/adapters.js +2 -17
- package/dist/_internal/server/features/digital-code/data.d.ts +1 -6
- package/dist/_internal/server/features/digital-code/data.js +2 -10
- package/dist/_internal/server/features/live/adapters.d.ts +2 -15
- package/dist/_internal/server/features/live/adapters.js +2 -17
- package/dist/_internal/server/features/live/data.d.ts +1 -6
- package/dist/_internal/server/features/live/data.js +2 -10
- package/dist/_internal/server/features/pre-orders/data.d.ts +2 -4
- package/dist/_internal/server/features/pre-orders/data.js +3 -9
- package/dist/_internal/server/features/prize-draws/actions.d.ts +2 -0
- package/dist/_internal/server/features/prize-draws/actions.js +22 -0
- package/dist/_internal/server/features/prize-draws/data.d.ts +1 -17
- package/dist/_internal/server/features/prize-draws/data.js +2 -20
- package/dist/_internal/server/features/prize-draws/index.d.ts +3 -1
- package/dist/_internal/server/features/prize-draws/index.js +2 -0
- package/dist/_internal/server/features/prize-draws/service.d.ts +3 -0
- package/dist/_internal/server/features/prize-draws/service.js +19 -0
- package/dist/_internal/server/features/shared/listing-adapters.d.ts +19 -0
- package/dist/_internal/server/features/shared/listing-adapters.js +20 -0
- package/dist/_internal/server/features/shared/listing-data-factory.d.ts +9 -0
- package/dist/_internal/server/features/shared/listing-data-factory.js +33 -0
- package/dist/_internal/server/features/stores/data.d.ts +3 -14
- package/dist/_internal/server/features/stores/data.js +6 -44
- package/dist/_internal/server/jobs/core/cleanupRtdbEvents.js +1 -1
- package/dist/_internal/shared/features/cart/schema.d.ts +8 -8
- package/dist/_internal/shared/features/cart/schema.js +3 -0
- package/dist/_internal/shared/listing-types/_registry.js +2 -0
- package/dist/_internal/shared/listing-types/action-tracker.js +1 -1
- package/dist/_internal/shared/listing-types/auction/schema.d.ts +3 -1
- package/dist/_internal/shared/listing-types/auction/schema.js +7 -1
- package/dist/_internal/shared/listing-types/classified/schema.d.ts +2 -1
- package/dist/_internal/shared/listing-types/classified/schema.js +3 -1
- package/dist/_internal/shared/listing-types/digital-code/schema.d.ts +3 -1
- package/dist/_internal/shared/listing-types/digital-code/schema.js +7 -1
- package/dist/_internal/shared/listing-types/live/schema.d.ts +2 -1
- package/dist/_internal/shared/listing-types/live/schema.js +3 -1
- package/dist/_internal/shared/listing-types/pre-order/schema.d.ts +3 -1
- package/dist/_internal/shared/listing-types/pre-order/schema.js +7 -1
- package/dist/_internal/shared/listing-types/prize-draw/schema.d.ts +3 -1
- package/dist/_internal/shared/listing-types/prize-draw/schema.js +13 -1
- package/dist/_internal/shared/listing-types/standard/schema.d.ts +2 -1
- package/dist/_internal/shared/listing-types/standard/schema.js +4 -1
- package/dist/_internal/shared/types/base-document.d.ts +15 -0
- package/dist/_internal/shared/types/base-document.js +1 -0
- package/dist/_internal/shared/types/index.d.ts +2 -0
- package/dist/_internal/shared/types/index.js +1 -0
- package/dist/client/api/ApiError.d.ts +10 -4
- package/dist/client/api/surface-error.js +0 -1
- package/dist/client.d.ts +8 -4
- package/dist/client.js +4 -2
- package/dist/constants/api-endpoints.d.ts +12 -0
- package/dist/constants/api-endpoints.js +4 -0
- package/dist/core/hooks/useSyncManager.js +4 -4
- package/dist/features/_guide-cls.d.ts +1 -1
- package/dist/features/_guide-cls.js +1 -1
- package/dist/features/about/components/AboutView.js +1 -4
- package/dist/features/about/components/FAQPageView.js +1 -1
- package/dist/features/about/components/FeesView.js +1 -1
- package/dist/features/about/components/HelpPageView.js +1 -1
- package/dist/features/about/components/HowOrdersWorkView.js +1 -1
- package/dist/features/about/components/PublicProfileView.js +6 -6
- package/dist/features/about/components/TrackOrderView.js +1 -1
- package/dist/features/account/components/AddressBook.js +1 -1
- package/dist/features/account/components/AddressForm.js +10 -2
- package/dist/features/account/components/AddressesIndexListing.js +1 -1
- package/dist/features/account/components/BuyerAccountGuideView.js +1 -1
- package/dist/features/account/components/BuyerAuctionsGuideView.js +1 -1
- package/dist/features/account/components/BuyerOrdersGuideView.js +1 -1
- package/dist/features/account/components/BuyerShoppingGuideView.js +1 -1
- package/dist/features/account/components/ChatWindow.js +1 -1
- package/dist/features/account/components/MessagesView.js +1 -1
- package/dist/features/account/components/NotificationBell.js +25 -10
- package/dist/features/account/components/NotificationPreferencesPanel.js +2 -2
- package/dist/features/account/components/UserOffersPanel.js +1 -0
- package/dist/features/account/components/UserSidebar.js +1 -6
- package/dist/features/account/components/UserSupportView.js +1 -1
- package/dist/features/addresses/schemas/firestore.d.ts +2 -4
- package/dist/features/admin/components/AdminAnalyticsGuideView.js +2 -2
- package/dist/features/admin/components/AdminBlogEditorView.js +1 -1
- package/dist/features/admin/components/AdminBundlesView.js +1 -1
- package/dist/features/admin/components/AdminCarouselEditorView.js +1 -1
- package/dist/features/admin/components/AdminCatalogGuideView.js +2 -2
- package/dist/features/admin/components/AdminContentGuideView.js +2 -2
- package/dist/features/admin/components/AdminEmployeeEditorView.js +2 -2
- package/dist/features/admin/components/AdminFulfillmentView.d.ts +6 -0
- package/dist/features/admin/components/AdminFulfillmentView.js +107 -0
- package/dist/features/admin/components/AdminGuideHubView.js +1 -5
- package/dist/features/admin/components/AdminMediaView.js +1 -1
- package/dist/features/admin/components/AdminNavigationView.js +1 -1
- package/dist/features/admin/components/AdminOrdersGuideView.js +3 -3
- package/dist/features/admin/components/AdminPayoutsView.js +1 -4
- package/dist/features/admin/components/AdminProductEditorView.js +21 -9
- package/dist/features/admin/components/AdminProductsView.js +3 -0
- package/dist/features/admin/components/AdminSidebar.js +1 -6
- package/dist/features/admin/components/AdminSiteConfigGuideView.js +1 -1
- package/dist/features/admin/components/AdminSiteSettingsView.js +9 -1
- package/dist/features/admin/components/AdminStoreEditorView.js +1 -1
- package/dist/features/admin/components/AdminStoresGuideView.js +2 -2
- package/dist/features/admin/components/AdminSupportTicketDetailView.js +7 -7
- package/dist/features/admin/components/AdminTeamGuideView.js +2 -2
- package/dist/features/admin/components/AdminTrustGuideView.js +3 -3
- package/dist/features/admin/components/AdminUsersGuideView.js +3 -3
- package/dist/features/admin/components/DashboardStats.js +6 -5
- package/dist/features/admin/components/DataListingView.d.ts +1 -0
- package/dist/features/admin/components/DataTable.js +2 -2
- package/dist/features/admin/components/analytics/AdminAnalyticsCharts.js +4 -6
- package/dist/features/admin/components/analytics/AdminStatCard.js +4 -3
- package/dist/features/admin/components/analytics/AdminTopProductsTable.js +1 -1
- package/dist/features/admin/components/index.d.ts +2 -0
- package/dist/features/admin/components/index.js +1 -0
- package/dist/features/admin/schemas/firestore.d.ts +3 -8
- package/dist/features/auctions/components/AuctionBidsTable.js +1 -1
- package/dist/features/auctions/components/AuctionDetailPageView.js +1 -1
- package/dist/features/auctions/components/MarketplaceAuctionCard.js +3 -3
- package/dist/features/auctions/schemas/firestore.d.ts +2 -4
- package/dist/features/auctions/schemas/index.d.ts +2 -2
- package/dist/features/auth/components/ForgotPasswordView.js +19 -8
- package/dist/features/auth/components/LoginForm.js +10 -2
- package/dist/features/auth/components/RegisterForm.js +10 -2
- package/dist/features/auth/components/ResetPasswordView.js +19 -8
- package/dist/features/auth/components/SocialAuthButtons.js +1 -1
- package/dist/features/before-after/components/BeforeAfterSlider.js +1 -1
- package/dist/features/before-after/schemas/index.d.ts +2 -2
- package/dist/features/blog/api/[slug]/route.js +1 -1
- package/dist/features/blog/components/BlogFeaturedCard.js +1 -1
- package/dist/features/blog/components/BlogListView.js +1 -1
- package/dist/features/blog/components/BlogPostView.js +1 -1
- package/dist/features/blog/schemas/firestore.d.ts +2 -4
- package/dist/features/blog/schemas/index.d.ts +6 -6
- package/dist/features/cart/components/CartDrawer.js +2 -2
- package/dist/features/cart/components/CartView.js +1 -1
- package/dist/features/cart/components/CheckoutView.js +1 -1
- package/dist/features/cart/schemas/firestore.d.ts +2 -4
- package/dist/features/categories/components/BrandDetailPageView.js +2 -1
- package/dist/features/categories/components/BundleDetailView.js +1 -1
- package/dist/features/categories/components/BundleItemsPicker.js +1 -1
- package/dist/features/categories/components/CategoryBundlesListing.js +3 -1
- package/dist/features/categories/components/CategoryDetailPageView.js +1 -1
- package/dist/features/categories/components/CategoryGrid.js +2 -1
- package/dist/features/categories/components/CategoryTableColumns.js +5 -2
- package/dist/features/categories/components/CategoryTree.js +3 -2
- package/dist/features/categories/components/ConcernCard.js +1 -1
- package/dist/features/categories/schemas/firestore.d.ts +2 -4
- package/dist/features/categories/schemas/index.d.ts +6 -6
- package/dist/features/checkout/components/CheckoutStepper.js +1 -1
- package/dist/features/collections/components/CollectionCard.js +1 -1
- package/dist/features/contact/components/ContactPageView.js +27 -27
- package/dist/features/contact/email.js +4 -4
- package/dist/features/copilot/components/AdminCopilotView.js +3 -3
- package/dist/features/email/primitives.d.ts +4 -0
- package/dist/features/email/primitives.js +4 -0
- package/dist/features/events/components/EventCard.js +2 -2
- package/dist/features/events/components/EventOfferCard.js +1 -1
- package/dist/features/events/components/EventRaffleEntryForm.js +1 -1
- package/dist/features/events/components/EventRaffleWinnerView.js +2 -2
- package/dist/features/events/components/EventSaleBanner.js +0 -1
- package/dist/features/events/schemas/firestore.d.ts +2 -4
- package/dist/features/events/schemas/index.d.ts +4 -4
- package/dist/features/faq/components/ContactCTA.js +1 -1
- package/dist/features/faq/components/FAQAccordion.js +2 -2
- package/dist/features/faq/components/FAQCategorySidebar.js +2 -2
- package/dist/features/faq/components/FAQHelpfulButtons.js +2 -2
- package/dist/features/faq/components/RelatedFAQs.js +1 -1
- package/dist/features/faq/schemas/firestore.d.ts +2 -4
- package/dist/features/faq/schemas/index.d.ts +4 -4
- package/dist/features/filters/AsyncFacetSection.js +3 -3
- package/dist/features/filters/FilterFacetSection.js +6 -6
- package/dist/features/filters/RangeFilter.js +2 -2
- package/dist/features/filters/SwitchFilter.js +1 -1
- package/dist/features/forms/Checkbox.js +1 -1
- package/dist/features/forms/Slider.js +7 -2
- package/dist/features/forms/utils.d.ts +2 -2
- package/dist/features/forms/utils.js +2 -2
- package/dist/features/grouped/schemas/index.d.ts +2 -2
- package/dist/features/history/hooks/useHistory.js +1 -1
- package/dist/features/homepage/components/AdSlot.js +3 -3
- package/dist/features/homepage/components/AdvertisementBanner.js +5 -4
- package/dist/features/homepage/components/BeforeAfterCard.js +9 -1
- package/dist/features/homepage/components/CharacterHotspot.js +42 -49
- package/dist/features/homepage/components/CharacterHotspotForm.js +18 -20
- package/dist/features/homepage/components/CollectionCardsSection.js +2 -2
- package/dist/features/homepage/components/CustomCardsSection.js +3 -6
- package/dist/features/homepage/components/CustomerReviewsSection.js +1 -1
- package/dist/features/homepage/components/FAQSection.js +2 -2
- package/dist/features/homepage/components/FeaturedResultsSection.js +1 -1
- package/dist/features/homepage/components/GoogleReviewsSection.js +4 -4
- package/dist/features/homepage/components/HeroBanner.js +12 -63
- package/dist/features/homepage/components/HeroCarousel.js +6 -6
- package/dist/features/homepage/components/HeroSection.js +1 -1
- package/dist/features/homepage/components/HowItWorksInfoView.js +1 -1
- package/dist/features/homepage/components/HowItWorksSection.js +5 -3
- package/dist/features/homepage/components/NewsletterBanner.js +3 -7
- package/dist/features/homepage/components/PromoGrid.js +2 -26
- package/dist/features/homepage/components/SectionCarousel.js +1 -1
- package/dist/features/homepage/components/SecurityHighlightsSection.js +6 -3
- package/dist/features/homepage/components/ShopByCategorySection.js +3 -3
- package/dist/features/homepage/components/SiteFeaturesSection.js +1 -1
- package/dist/features/homepage/components/SocialPostCard.js +2 -3
- package/dist/features/homepage/components/StatsCounterSection.js +6 -3
- package/dist/features/homepage/components/TestimonialsCarousel.js +2 -25
- package/dist/features/homepage/components/TrustBadges.js +1 -9
- package/dist/features/homepage/components/TrustFeaturesSection.js +6 -3
- package/dist/features/homepage/components/TrustIndicatorsSection.js +1 -1
- package/dist/features/homepage/components/WelcomeSection.js +2 -2
- package/dist/features/homepage/components/WhatsAppCommunitySection.js +1 -1
- package/dist/features/homepage/lib/franchise-colors.d.ts +7 -0
- package/dist/features/homepage/lib/franchise-colors.js +7 -0
- package/dist/features/homepage/lib/live-stats.js +5 -5
- package/dist/features/homepage/schemas/firestore.d.ts +4 -12
- package/dist/features/homepage/schemas/index.d.ts +2 -2
- package/dist/features/layout/AppLayoutShell.js +7 -9
- package/dist/features/layout/BottomNavbar.js +1 -2
- package/dist/features/messages/hooks/useConversation.js +2 -1
- package/dist/features/messages/hooks/useConversations.js +1 -0
- package/dist/features/messages/schemas/firestore.d.ts +2 -4
- package/dist/features/messages/schemas/index.d.ts +2 -2
- package/dist/features/orders/components/OrdersList.js +1 -1
- package/dist/features/orders/components/RefundHistoryTable.d.ts +6 -0
- package/dist/features/orders/components/RefundHistoryTable.js +3 -2
- package/dist/features/orders/repository/orders.repository.d.ts +5 -0
- package/dist/features/orders/repository/orders.repository.js +26 -0
- package/dist/features/orders/schemas/firestore.d.ts +9 -5
- package/dist/features/orders/schemas/firestore.js +3 -0
- package/dist/features/payments/schemas/firestore.d.ts +2 -4
- package/dist/features/pre-orders/components/MarketplacePreorderCard.js +2 -2
- package/dist/features/pre-orders/components/PreOrderBadge.js +1 -1
- package/dist/features/pre-orders/components/PreOrderDetailPageView.js +2 -1
- package/dist/features/pre-orders/schemas/index.d.ts +2 -2
- package/dist/features/products/components/CompareOverlay.js +11 -8
- package/dist/features/products/components/CustomSectionTabContent.js +1 -1
- package/dist/features/products/components/FeatureBadge.js +11 -1
- package/dist/features/products/components/GroupSettingsPanel.js +2 -2
- package/dist/features/products/components/MarketplaceBundleCard.js +1 -1
- package/dist/features/products/components/MarketplacePrizeDrawCard.js +2 -2
- package/dist/features/products/components/PrizeDrawItemsEditor.js +1 -1
- package/dist/features/products/components/PrizeDrawsIndexListing.js +1 -1
- package/dist/features/products/components/ProductCardMetadataSection.js +0 -1
- package/dist/features/products/components/ProductDetailPageView.js +1 -1
- package/dist/features/products/components/ProductFeatureBadges.js +1 -1
- package/dist/features/products/components/ProductGalleryClient.js +1 -1
- package/dist/features/products/components/ProductGrid.js +7 -7
- package/dist/features/products/components/ShareButton.js +1 -1
- package/dist/features/products/components/ShowGroupSection.js +7 -5
- package/dist/features/products/components/SublistingCarouselSection.js +2 -2
- package/dist/features/products/constants/action-defs.d.ts +16 -0
- package/dist/features/products/constants/action-defs.js +16 -0
- package/dist/features/products/constants/listing-tabs.d.ts +48 -0
- package/dist/features/products/constants/listing-tabs.js +12 -0
- package/dist/features/products/repository/products.repository.d.ts +37 -0
- package/dist/features/products/repository/products.repository.js +28 -1
- package/dist/features/products/schemas/firestore.d.ts +8 -6
- package/dist/features/products/schemas/firestore.js +2 -0
- package/dist/features/products/schemas/index.d.ts +8 -8
- package/dist/features/products/types/index.d.ts +2 -0
- package/dist/features/promotions/components/CouponCard.js +2 -2
- package/dist/features/promotions/schemas/firestore.d.ts +2 -4
- package/dist/features/promotions/schemas/index.d.ts +6 -6
- package/dist/features/reviews/components/ReviewDetailShell.js +3 -3
- package/dist/features/reviews/components/ReviewModal.js +2 -4
- package/dist/features/reviews/components/ReviewSummary.js +3 -2
- package/dist/features/reviews/components/ReviewsList.js +1 -1
- package/dist/features/reviews/schemas/firestore.d.ts +2 -4
- package/dist/features/reviews/schemas/index.d.ts +2 -2
- package/dist/features/scams/actions/scam-actions.js +1 -1
- package/dist/features/scams/components/ScamProfileView.js +1 -1
- package/dist/features/scams/schemas/firestore.d.ts +2 -4
- package/dist/features/scams/schemas/index.d.ts +4 -4
- package/dist/features/search/components/Search.js +2 -2
- package/dist/features/search/components/SearchFiltersRow.js +1 -1
- package/dist/features/search/schemas/index.d.ts +3 -3
- package/dist/features/seller/components/BarcodeField.d.ts +17 -0
- package/dist/features/seller/components/BarcodeField.js +30 -0
- package/dist/features/seller/components/FulfillmentView.d.ts +5 -0
- package/dist/features/seller/components/FulfillmentView.js +120 -0
- package/dist/features/seller/components/PhysicalLocationModal.js +2 -3
- package/dist/features/seller/components/PrintCenterView.d.ts +3 -1
- package/dist/features/seller/components/PrintCenterView.js +52 -4
- package/dist/features/seller/components/SellerAddressesView.js +2 -1
- package/dist/features/seller/components/SellerAnalyticsAlertsView.js +1 -1
- package/dist/features/seller/components/SellerBidsView.js +1 -1
- package/dist/features/seller/components/SellerCouponEditorView.js +1 -1
- package/dist/features/seller/components/SellerGoogleReviewsView.js +1 -1
- package/dist/features/seller/components/SellerLiveView.js +1 -1
- package/dist/features/seller/components/SellerOffersPanel.js +1 -0
- package/dist/features/seller/components/SellerOrdersView.js +1 -1
- package/dist/features/seller/components/SellerPayoutMethodsView.js +8 -2
- package/dist/features/seller/components/SellerPayoutRequestView.js +1 -1
- package/dist/features/seller/components/SellerPayoutSettingsView.js +1 -1
- package/dist/features/seller/components/SellerProductShell.d.ts +2 -0
- package/dist/features/seller/components/SellerProductShell.js +4 -3
- package/dist/features/seller/components/SellerProductsCards.js +1 -1
- package/dist/features/seller/components/SellerProductsView.js +1 -1
- package/dist/features/seller/components/SellerReviewsView.js +2 -1
- package/dist/features/seller/components/SellerShippingConfigsView.js +9 -3
- package/dist/features/seller/components/SellerShippingView.js +1 -1
- package/dist/features/seller/components/SellerSidebar.js +3 -8
- package/dist/features/seller/components/SellerStoreCategoriesView.js +11 -3
- package/dist/features/seller/components/SellerTemplatesView.js +8 -2
- package/dist/features/seller/components/analytics/SellerRevenueChart.js +1 -1
- package/dist/features/seller/components/analytics/SellerTopProducts.js +1 -1
- package/dist/features/seller/components/index.d.ts +4 -0
- package/dist/features/seller/components/index.js +2 -0
- package/dist/features/seller/schemas/index.d.ts +4 -4
- package/dist/features/shell/FormShell.js +2 -2
- package/dist/features/shell/QuickFormDrawer.js +1 -1
- package/dist/features/site-settings/components/NavPermissionsManager.js +1 -1
- package/dist/features/store-extensions/schemas/firestore.d.ts +12 -44
- package/dist/features/stores/components/StoreCapabilitiesGuideView.js +1 -1
- package/dist/features/stores/components/StoreClassifiedsListing.d.ts +5 -0
- package/dist/features/stores/components/StoreClassifiedsListing.js +48 -0
- package/dist/features/stores/components/StoreClassifiedsPageView.d.ts +4 -0
- package/dist/features/stores/components/StoreClassifiedsPageView.js +20 -0
- package/dist/features/stores/components/StoreDetailLayoutView.js +23 -2
- package/dist/features/stores/components/StoreDigitalCodesListing.d.ts +5 -0
- package/dist/features/stores/components/StoreDigitalCodesListing.js +48 -0
- package/dist/features/stores/components/StoreDigitalCodesPageView.d.ts +4 -0
- package/dist/features/stores/components/StoreDigitalCodesPageView.js +20 -0
- package/dist/features/stores/components/StoreGuideHubView.js +2 -9
- package/dist/features/stores/components/StoreHeader.js +1 -1
- package/dist/features/stores/components/StoreListingsGuideView.js +4 -4
- package/dist/features/stores/components/StoreLiveItemsListing.d.ts +5 -0
- package/dist/features/stores/components/StoreLiveItemsListing.js +48 -0
- package/dist/features/stores/components/StoreLiveItemsPageView.d.ts +4 -0
- package/dist/features/stores/components/StoreLiveItemsPageView.js +20 -0
- package/dist/features/stores/components/StoreOrdersGuideView.js +2 -2
- package/dist/features/stores/components/StoresIndexListing.js +1 -1
- package/dist/features/stores/components/index.d.ts +9 -0
- package/dist/features/stores/components/index.js +3 -0
- package/dist/features/stores/schemas/firestore.d.ts +2 -4
- package/dist/features/stores/schemas/index.d.ts +4 -4
- package/dist/features/support/schemas/firestore.d.ts +2 -4
- package/dist/features/support/schemas/index.d.ts +2 -2
- package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +2 -2
- package/dist/features/wishlist/components/WishlistPage.js +1 -1
- package/dist/features/wishlist/components/WishlistToggleButton.js +3 -3
- package/dist/features/wishlist/hooks/useWishlistCount.js +1 -1
- package/dist/http/ApiClient.d.ts +1 -0
- package/dist/http/ApiClient.js +20 -0
- package/dist/monitoring/error-tracking.d.ts +0 -3
- package/dist/monitoring/error-tracking.js +1 -1
- package/dist/monitoring/server-logger.js +3 -3
- package/dist/next/components/GlobalError.js +1 -1
- package/dist/next/routing/route-map.d.ts +11 -0
- package/dist/next/routing/route-map.js +5 -0
- package/dist/react/ErrorBoundary.js +1 -1
- package/dist/schemas/registry.d.ts +24 -24
- package/dist/seed/grouped-listings-seed-data.d.ts +2 -1
- package/dist/seed/products-preorders-seed-data.d.ts +2 -1
- package/dist/seed/products-standard-seed-data.js +8 -0
- package/dist/server-entry.d.ts +3 -0
- package/dist/server-entry.js +3 -0
- package/dist/server.d.ts +4 -4
- package/dist/styles.css +45 -7
- package/dist/tailwind-utilities.css +1 -1
- package/dist/tokens/themes/default-light.js +3 -0
- package/dist/tokens/tokens.css +43 -6
- package/dist/ui/components/Anchor.d.ts +8 -1
- package/dist/ui/components/Anchor.js +16 -2
- package/dist/ui/components/Button.d.ts +5 -2
- package/dist/ui/components/Button.js +5 -2
- package/dist/ui/components/Details.d.ts +33 -2
- package/dist/ui/components/Details.js +73 -4
- package/dist/ui/components/Div.d.ts +3 -0
- package/dist/ui/components/Div.js +12 -1
- package/dist/ui/components/DynamicBgDiv.d.ts +13 -0
- package/dist/ui/components/DynamicBgDiv.js +18 -0
- package/dist/ui/components/Form.d.ts +3 -19
- package/dist/ui/components/Form.js +8 -1
- package/dist/ui/components/Layout.d.ts +12 -1
- package/dist/ui/components/Layout.js +9 -1
- package/dist/ui/components/Progress.d.ts +1 -1
- package/dist/ui/components/Progress.js +1 -0
- package/dist/ui/components/Progress.style.css +1 -0
- package/dist/ui/components/ProgressBarFill.d.ts +6 -0
- package/dist/ui/components/ProgressBarFill.js +11 -0
- package/dist/ui/components/Semantic.d.ts +26 -7
- package/dist/ui/components/Semantic.js +33 -8
- package/dist/ui/components/TextLink.d.ts +36 -1
- package/dist/ui/components/TextLink.js +30 -2
- package/dist/ui/components/Typography.d.ts +26 -6
- package/dist/ui/components/Typography.js +37 -13
- package/dist/ui/components/VacationBanner.js +0 -1
- package/dist/ui/components/surface-tokens.d.ts +12 -2
- package/dist/ui/components/surface-tokens.js +19 -1
- package/dist/ui/rich-text/RichText.js +1 -1
- package/dist/utils/id-generators.d.ts +8 -0
- package/dist/utils/id-generators.js +14 -0
- package/dist/validation/schemas.d.ts +1 -1
- package/package.json +2 -1
|
@@ -15,6 +15,14 @@ const __O = {
|
|
|
15
15
|
const FALLBACK_IMAGE = "/animevssuperhero.jpg";
|
|
16
16
|
const FALLBACK_IMAGE_ALT = "DC, Marvel and Anime characters";
|
|
17
17
|
const FONT_BANGERS = "var(--font-bangers, Bangers, cursive)";
|
|
18
|
+
/* -- Franchise brand colour references — hex lives in tokens.css (exempt) -- */
|
|
19
|
+
const BRAND_MARVEL = "var(--brand-marvel)";
|
|
20
|
+
const BRAND_DC = "var(--brand-dc)";
|
|
21
|
+
const BRAND_DC_ALT = "var(--brand-dc-alt)";
|
|
22
|
+
const BRAND_ANIME_YELLOW = "var(--brand-anime-yellow)";
|
|
23
|
+
const BRAND_ANIME_YELLOW_TEXT = "var(--brand-anime-yellow-text)";
|
|
24
|
+
const BRAND_NARUTO = "var(--brand-naruto)";
|
|
25
|
+
const BRAND_HOTSPOT_OVERLAY = "var(--brand-hotspot-overlay)";
|
|
18
26
|
const DEFAULT_HOTSPOTS = [
|
|
19
27
|
{
|
|
20
28
|
id: "spiderman",
|
|
@@ -24,7 +32,7 @@ const DEFAULT_HOTSPOTS = [
|
|
|
24
32
|
href: "/franchise/marvel",
|
|
25
33
|
xPct: 8,
|
|
26
34
|
yPct: 22,
|
|
27
|
-
accent:
|
|
35
|
+
accent: BRAND_MARVEL,
|
|
28
36
|
badge: "MARVEL",
|
|
29
37
|
buyText: "Get Spider-Man Figures",
|
|
30
38
|
},
|
|
@@ -36,7 +44,7 @@ const DEFAULT_HOTSPOTS = [
|
|
|
36
44
|
href: "/franchise/marvel",
|
|
37
45
|
xPct: 18,
|
|
38
46
|
yPct: 58,
|
|
39
|
-
accent:
|
|
47
|
+
accent: BRAND_MARVEL,
|
|
40
48
|
badge: "MARVEL",
|
|
41
49
|
buyText: "Get Iron Man Figures",
|
|
42
50
|
},
|
|
@@ -48,7 +56,7 @@ const DEFAULT_HOTSPOTS = [
|
|
|
48
56
|
href: "/franchise/dc-comics",
|
|
49
57
|
xPct: 28,
|
|
50
58
|
yPct: 18,
|
|
51
|
-
accent:
|
|
59
|
+
accent: BRAND_DC,
|
|
52
60
|
badge: "DC",
|
|
53
61
|
buyText: "Get Robin Figures",
|
|
54
62
|
},
|
|
@@ -60,7 +68,7 @@ const DEFAULT_HOTSPOTS = [
|
|
|
60
68
|
href: "/franchise/dc-comics",
|
|
61
69
|
xPct: 36,
|
|
62
70
|
yPct: 42,
|
|
63
|
-
accent:
|
|
71
|
+
accent: BRAND_DC,
|
|
64
72
|
badge: "DC",
|
|
65
73
|
buyText: "Get Batman Figures",
|
|
66
74
|
},
|
|
@@ -72,7 +80,7 @@ const DEFAULT_HOTSPOTS = [
|
|
|
72
80
|
href: "/franchise/marvel",
|
|
73
81
|
xPct: 12,
|
|
74
82
|
yPct: 76,
|
|
75
|
-
accent:
|
|
83
|
+
accent: BRAND_DC_ALT,
|
|
76
84
|
badge: "MARVEL",
|
|
77
85
|
buyText: "Get Cap Figures",
|
|
78
86
|
},
|
|
@@ -84,7 +92,7 @@ const DEFAULT_HOTSPOTS = [
|
|
|
84
92
|
href: "/franchise/dc-comics",
|
|
85
93
|
xPct: 44,
|
|
86
94
|
yPct: 68,
|
|
87
|
-
accent:
|
|
95
|
+
accent: BRAND_DC_ALT,
|
|
88
96
|
badge: "DC",
|
|
89
97
|
buyText: "Get Superman Figures",
|
|
90
98
|
},
|
|
@@ -96,7 +104,7 @@ const DEFAULT_HOTSPOTS = [
|
|
|
96
104
|
href: "/franchise/dragon-ball",
|
|
97
105
|
xPct: 51,
|
|
98
106
|
yPct: 36,
|
|
99
|
-
accent:
|
|
107
|
+
accent: BRAND_ANIME_YELLOW,
|
|
100
108
|
badge: "ANIME",
|
|
101
109
|
buyText: "Get Goku Figures",
|
|
102
110
|
},
|
|
@@ -108,7 +116,7 @@ const DEFAULT_HOTSPOTS = [
|
|
|
108
116
|
href: "/franchise/naruto",
|
|
109
117
|
xPct: 57,
|
|
110
118
|
yPct: 78,
|
|
111
|
-
accent:
|
|
119
|
+
accent: BRAND_NARUTO,
|
|
112
120
|
badge: "ANIME",
|
|
113
121
|
buyText: "Get Naruto Figures",
|
|
114
122
|
},
|
|
@@ -120,7 +128,7 @@ const DEFAULT_HOTSPOTS = [
|
|
|
120
128
|
href: "/franchise/bleach",
|
|
121
129
|
xPct: 70,
|
|
122
130
|
yPct: 20,
|
|
123
|
-
accent:
|
|
131
|
+
accent: BRAND_DC,
|
|
124
132
|
badge: "ANIME",
|
|
125
133
|
buyText: "Get Ichigo Figures",
|
|
126
134
|
},
|
|
@@ -132,7 +140,7 @@ const DEFAULT_HOTSPOTS = [
|
|
|
132
140
|
href: "/franchise/one-piece",
|
|
133
141
|
xPct: 80,
|
|
134
142
|
yPct: 50,
|
|
135
|
-
accent:
|
|
143
|
+
accent: BRAND_ANIME_YELLOW,
|
|
136
144
|
badge: "ANIME",
|
|
137
145
|
buyText: "Get Luffy Figures",
|
|
138
146
|
},
|
|
@@ -144,7 +152,7 @@ const DEFAULT_HOTSPOTS = [
|
|
|
144
152
|
href: "/franchise/one-punch-man",
|
|
145
153
|
xPct: 91,
|
|
146
154
|
yPct: 50,
|
|
147
|
-
accent:
|
|
155
|
+
accent: BRAND_ANIME_YELLOW,
|
|
148
156
|
badge: "ANIME",
|
|
149
157
|
buyText: "Get Saitama Figures",
|
|
150
158
|
},
|
|
@@ -158,40 +166,25 @@ export function CharacterHotspot({ config, defaultHotspots = DEFAULT_HOTSPOTS, u
|
|
|
158
166
|
return (_jsx(CharacterHotspotInner, { panoramicImage: panoramicImage, panoramicAlt: panoramicAlt, hotspots: hotspots, universeLinks: universeLinks ?? DEFAULT_UNIVERSE_LINKS, shopAllHref: shopAllHref, heading: heading, subheading: subheading }));
|
|
159
167
|
}
|
|
160
168
|
const DEFAULT_UNIVERSE_LINKS = [
|
|
161
|
-
{ label: "MARVEL", href: "/franchise/marvel", color:
|
|
162
|
-
{
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
label: "DRAGON BALL",
|
|
170
|
-
href: "/franchise/dragon-ball",
|
|
171
|
-
color: "#FFE500",
|
|
172
|
-
icon: "✦",
|
|
173
|
-
},
|
|
174
|
-
{ label: "NARUTO", href: "/franchise/naruto", color: "#FF6B00", icon: "🍃" },
|
|
175
|
-
{
|
|
176
|
-
label: "ONE PIECE",
|
|
177
|
-
href: "/franchise/one-piece",
|
|
178
|
-
color: "#FFE500",
|
|
179
|
-
icon: "⚓",
|
|
180
|
-
},
|
|
181
|
-
{ label: "BLEACH", href: "/franchise/bleach", color: "#4A90D9", icon: "⚔" },
|
|
169
|
+
{ label: "MARVEL", href: "/franchise/marvel", color: BRAND_MARVEL, icon: "⚡" },
|
|
170
|
+
{ label: "DC COMICS", href: "/franchise/dc-comics", color: BRAND_DC, icon: "🦇" },
|
|
171
|
+
{ label: "DRAGON BALL", href: "/franchise/dragon-ball", color: BRAND_ANIME_YELLOW, icon: "✦" },
|
|
172
|
+
{ label: "NARUTO", href: "/franchise/naruto", color: BRAND_NARUTO, icon: "🍃" },
|
|
173
|
+
{ label: "ONE PIECE", href: "/franchise/one-piece", color: BRAND_ANIME_YELLOW, icon: "⚓" },
|
|
174
|
+
{ label: "BLEACH", href: "/franchise/bleach", color: BRAND_DC, icon: "⚔" },
|
|
182
175
|
];
|
|
183
176
|
function HotspotHeaderOverlay({ heading, subheading, shopAllHref, }) {
|
|
184
177
|
return (_jsx(Div, { className: "absolute top-0 left-0 right-0 z-10 pointer-events-none", style: {
|
|
185
178
|
background: "linear-gradient(to bottom, rgba(10,10,18,0.88) 0%, rgba(10,10,18,0.40) 50%, transparent 100%)",
|
|
186
|
-
}, children: _jsxs(Row, { wrap: true, align: "start", justify: "between", gap: "sm", className: "pointer-events-auto mx-auto max-w-7xl
|
|
179
|
+
}, children: _jsxs(Row, { wrap: true, align: "start", justify: "between", gap: "sm", className: "pointer-events-auto mx-auto max-w-7xl gap-y-3", paddingX: "x-md", paddingY: "t-md-b-lg", children: [_jsxs(Div, { children: [_jsx(Text, { className: "mb-1 font-black uppercase tracking-[0.2em]", size: "xs", style: { color: "var(--color-red)" }, children: "Explore the Universe" }), _jsx(Heading, { level: 2, style: {
|
|
187
180
|
fontFamily: FONT_BANGERS,
|
|
188
181
|
fontSize: "clamp(1.8rem, 4.5vw, 3rem)",
|
|
189
182
|
letterSpacing: "0.07em",
|
|
190
|
-
color: "
|
|
183
|
+
color: "white",
|
|
191
184
|
lineHeight: 1,
|
|
192
185
|
}, children: heading }), subheading ? (_jsx(Text, { className: "mt-2 max-w-md", size: "sm", weight: "medium", style: { color: "var(--dark-section-muted)" }, children: subheading })) : (_jsxs(Text, { className: "mt-2 max-w-md", size: "sm", weight: "medium", style: { color: "var(--dark-section-muted)" }, children: ["& beyond \u2014 tap the", " ", _jsx(Span, { layout: "inline-flex-center", rounded: "full", weight: "light", style: {
|
|
193
186
|
background: "rgba(255,255,255,0.92)",
|
|
194
|
-
color: "
|
|
187
|
+
color: "var(--appkit-color-text)",
|
|
195
188
|
width: 18,
|
|
196
189
|
height: 18,
|
|
197
190
|
border: "1.5px solid rgba(0,0,0,0.18)",
|
|
@@ -203,7 +196,7 @@ function HotspotHeaderOverlay({ heading, subheading, shopAllHref, }) {
|
|
|
203
196
|
fontFamily: FONT_BANGERS,
|
|
204
197
|
letterSpacing: "0.1em",
|
|
205
198
|
background: "var(--color-red)",
|
|
206
|
-
color: "
|
|
199
|
+
color: "white",
|
|
207
200
|
border: "3px solid var(--border-ink)",
|
|
208
201
|
boxShadow: "4px 4px 0px var(--border-ink)",
|
|
209
202
|
}, children: "SHOP ALL \u2192" })] }) }));
|
|
@@ -214,7 +207,7 @@ function HotspotImageLayer({ panoramicImage, panoramicAlt, }) {
|
|
|
214
207
|
} }), _jsx(Div, { className: "absolute inset-0", style: {
|
|
215
208
|
background: "linear-gradient(to bottom, rgba(10,10,18,0.25) 0%, transparent 40%, rgba(10,10,18,0.65) 100%)",
|
|
216
209
|
} }), _jsx(Div, { className: "absolute bottom-0 left-0 right-0 h-16 pointer-events-none", style: {
|
|
217
|
-
background:
|
|
210
|
+
background: `linear-gradient(to bottom, transparent, ${BRAND_HOTSPOT_OVERLAY})`,
|
|
218
211
|
} })] }));
|
|
219
212
|
}
|
|
220
213
|
function HotspotPin({ hotspot, isActive, isMobile, toggle, onClose, }) {
|
|
@@ -239,7 +232,7 @@ function HotspotPin({ hotspot, isActive, isMobile, toggle, onClose, }) {
|
|
|
239
232
|
padding: 0,
|
|
240
233
|
transition: "transform 0.2s ease, opacity 0.2s ease",
|
|
241
234
|
transform: isActive ? "scale(1.2) rotate(45deg)" : "scale(1)",
|
|
242
|
-
color: isMobile ? "
|
|
235
|
+
color: isMobile ? "white" : isActive ? "white" : "var(--appkit-color-text)",
|
|
243
236
|
fontSize: isMobile ? 18 : 22,
|
|
244
237
|
fontWeight: 200,
|
|
245
238
|
lineHeight: 1,
|
|
@@ -256,11 +249,11 @@ function HotspotPin({ hotspot, isActive, isMobile, toggle, onClose, }) {
|
|
|
256
249
|
overflow: "hidden",
|
|
257
250
|
zIndex: 40,
|
|
258
251
|
animation: "fadeInUp 0.2s ease both",
|
|
259
|
-
}, children: [_jsx(Div, { style: { height: 4, background: hotspot.accent } }), _jsxs(Div, { paddingX: "x-5", padding: "y-md", children: [_jsx(Text, { className: "text-[10px] uppercase tracking-[0.18em] mb-1", weight: "bold", style: { color: hotspot.accent ===
|
|
252
|
+
}, children: [_jsx(Div, { style: { height: 4, background: hotspot.accent } }), _jsxs(Div, { paddingX: "x-5", padding: "y-md", children: [_jsx(Text, { className: "text-[10px] uppercase tracking-[0.18em] mb-1", weight: "bold", style: { color: hotspot.accent === BRAND_ANIME_YELLOW ? BRAND_ANIME_YELLOW_TEXT : hotspot.accent }, children: hotspot.universe }), _jsx(Heading, { level: 3, className: "font-black leading-tight mb-3", style: { fontFamily: FONT_BANGERS, fontSize: "1.45rem", letterSpacing: "0.06em", color: "var(--appkit-color-text)" }, children: hotspot.name }), _jsx(Text, { className: "leading-relaxed mb-4", size: "xs", style: { color: "var(--appkit-color-slate-700)" }, children: hotspot.description }), _jsxs(Link, { href: hotspot.href, onClick: onClose, className: "flex items-center justify-between px-4 py-2.5 text-sm font-black uppercase transition-opacity hover:opacity-85", style: {
|
|
260
253
|
fontFamily: FONT_BANGERS,
|
|
261
254
|
letterSpacing: "0.1em",
|
|
262
255
|
background: hotspot.accent,
|
|
263
|
-
color: hotspot.accent ===
|
|
256
|
+
color: hotspot.accent === BRAND_ANIME_YELLOW ? "black" : "white",
|
|
264
257
|
borderRadius: 2,
|
|
265
258
|
}, children: [hotspot.buyText, _jsx(Span, { "aria-hidden": "true", children: "\u2192" })] })] })] }))] }));
|
|
266
259
|
}
|
|
@@ -272,14 +265,14 @@ function MobileHotspotSheet({ active, onClose, }) {
|
|
|
272
265
|
borderTopRightRadius: 16,
|
|
273
266
|
overflow: "hidden",
|
|
274
267
|
animation: "fadeInUp 0.22s ease both",
|
|
275
|
-
}, children: [_jsx(Row, { paddingY: "b-2xs", padding: "t-sm", justify: "center", children: _jsx(Div, { style: { width: 40, height: 4, borderRadius: 2, background: "
|
|
268
|
+
}, children: [_jsx(Row, { paddingY: "b-2xs", padding: "t-sm", justify: "center", children: _jsx(Div, { style: { width: 40, height: 4, borderRadius: 2, background: "var(--appkit-color-zinc-300)" } }) }), _jsx(Div, { style: { height: 4, background: active.accent } }), _jsxs(Div, { padding: "t-md", style: { paddingInline: "1.25rem", paddingBottom: "2.5rem" }, children: [_jsx(Text, { className: "text-[10px] uppercase tracking-[0.18em] mb-1", weight: "bold", style: { color: active.accent === BRAND_ANIME_YELLOW ? BRAND_ANIME_YELLOW_TEXT : active.accent }, children: active.universe }), _jsx(Heading, { level: 3, className: "font-black leading-tight mb-2", style: { fontFamily: FONT_BANGERS, fontSize: "clamp(1.5rem, 6vw, 2rem)", letterSpacing: "0.06em", color: "var(--appkit-color-text)" }, children: active.name }), _jsx(Text, { className: "leading-relaxed mb-5", size: "sm", style: { color: "var(--appkit-color-slate-700)" }, children: active.description }), _jsxs(Row, { gap: "3", children: [_jsxs(Link, { href: active.href, onClick: onClose, className: "flex-1 flex items-center justify-between px-4 py-3 font-black uppercase", style: {
|
|
276
269
|
fontFamily: FONT_BANGERS,
|
|
277
270
|
letterSpacing: "0.1em",
|
|
278
271
|
fontSize: "0.9rem",
|
|
279
272
|
background: active.accent,
|
|
280
|
-
color: active.accent ===
|
|
273
|
+
color: active.accent === BRAND_ANIME_YELLOW ? "black" : "white",
|
|
281
274
|
borderRadius: 4,
|
|
282
|
-
}, children: [active.buyText, _jsx(Span, { "aria-hidden": "true", children: "\u2192" })] }), _jsx(Button, { type: "button", variant: "outline", onClick: onClose, paddingX: "lg", textSize: "sm", rounded: "default", className: "py-
|
|
275
|
+
}, children: [active.buyText, _jsx(Span, { "aria-hidden": "true", children: "\u2192" })] }), _jsx(Button, { type: "button", variant: "outline", onClick: onClose, paddingX: "lg", textSize: "sm", rounded: "default", className: "py-[0.75rem] font-[700]", style: { background: "var(--appkit-color-slate-100)", color: "var(--appkit-color-slate-600)" }, children: "Close" })] })] })] }) }));
|
|
283
276
|
}
|
|
284
277
|
function UniverseBrowseRow({ universeLinks, }) {
|
|
285
278
|
return (_jsx(Div, { gap: "3", className: `mx-auto max-w-7xl ${GRID_COLS_6_LG}`, paddingY: "y-lg", paddingX: "x-md", style: { borderTop: "1px solid rgba(255,255,255,0.08)" }, children: universeLinks.map(({ label, href, color, icon }) => (_jsxs(Link, { href: href, className: "group flex items-center gap-2.5 px-3 py-2.5 rounded-sm transition-all hover:-translate-y-0.5", style: {
|
|
@@ -292,7 +285,7 @@ function UniverseBrowseRow({ universeLinks, }) {
|
|
|
292
285
|
}, onMouseLeave: (e) => {
|
|
293
286
|
e.currentTarget.style.borderColor = "rgba(255,255,255,0.08)";
|
|
294
287
|
e.currentTarget.style.background = "rgba(255,255,255,0.04)";
|
|
295
|
-
}, children: [_jsx(Span, { size: "base", "aria-hidden": "true", className: "select-none", children: icon }), _jsx(Span, { size: "xs", className: "font-black uppercase tracking-wide", style: { fontFamily: FONT_BANGERS, letterSpacing: "0.1em", color: "
|
|
288
|
+
}, children: [_jsx(Span, { size: "base", "aria-hidden": "true", className: "select-none", children: icon }), _jsx(Span, { size: "xs", className: "font-black uppercase tracking-wide", style: { fontFamily: FONT_BANGERS, letterSpacing: "0.1em", color: "var(--appkit-color-slate-200)" }, children: label }), _jsx(Span, { size: "xs", className: "ml-auto", style: { color: "var(--appkit-color-slate-600)", transition: "color 0.15s" }, children: "\u2192" })] }, label))) }));
|
|
296
289
|
}
|
|
297
290
|
function CharacterHotspotInner({ panoramicImage, panoramicAlt, hotspots, universeLinks, shopAllHref, heading, subheading, }) {
|
|
298
291
|
const [activeId, setActiveId] = useState(null);
|
|
@@ -324,13 +317,13 @@ function CharacterHotspotInner({ panoramicImage, panoramicAlt, hotspots, univers
|
|
|
324
317
|
borderTop: "3px solid var(--dark-section-bg)",
|
|
325
318
|
borderBottom: "3px solid var(--dark-section-bg)",
|
|
326
319
|
overflow: "hidden",
|
|
327
|
-
}, children: [_jsxs(Div, { ref: containerRef, className: "relative w-full", style: { aspectRatio: "16/9", minHeight: "420px" }, children: [_jsx(HotspotHeaderOverlay, { heading: heading, subheading: subheading, shopAllHref: shopAllHref }), _jsx(HotspotImageLayer, { panoramicImage: panoramicImage, panoramicAlt: panoramicAlt }), _jsx(Div, { className: "hidden sm:flex absolute left-0 right-0 justify-around items-start pointer-events-none", style: { top: "clamp(120px, 18vh, 165px)", zIndex: 5 }, children: [
|
|
328
|
-
{ label: "MARVEL", color:
|
|
329
|
-
{ label: "DC COMICS", color:
|
|
330
|
-
{ label: "ANIME", color:
|
|
320
|
+
}, children: [_jsxs(Div, { ref: containerRef, className: "relative w-full", style: { aspectRatio: "16/9", minHeight: "420px" }, children: [_jsx(HotspotHeaderOverlay, { heading: heading, subheading: subheading, shopAllHref: shopAllHref }), _jsx(HotspotImageLayer, { panoramicImage: panoramicImage, panoramicAlt: panoramicAlt }), _jsx(Div, { className: "hidden sm:flex absolute left-0 right-0 justify-[space-around] items-[flex-start] pointer-events-none", style: { top: "clamp(120px, 18vh, 165px)", zIndex: 5 }, children: [
|
|
321
|
+
{ label: "MARVEL", color: BRAND_MARVEL },
|
|
322
|
+
{ label: "DC COMICS", color: BRAND_DC },
|
|
323
|
+
{ label: "ANIME", color: BRAND_ANIME_YELLOW },
|
|
331
324
|
].map(({ label, color }) => (_jsxs(Stack, { align: "center", children: [_jsx(Span, { className: "text-[10px] font-black uppercase tracking-[0.18em]", smSize: "xs", rounded: "sm", padding: "pill-md", style: {
|
|
332
325
|
background: color,
|
|
333
|
-
color: color ===
|
|
326
|
+
color: color === BRAND_ANIME_YELLOW ? "black" : "white",
|
|
334
327
|
boxShadow: "2px 2px 0px rgba(0,0,0,0.6)",
|
|
335
328
|
fontFamily: FONT_BANGERS,
|
|
336
329
|
letterSpacing: "0.16em",
|
|
@@ -3,6 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useState, useRef } from "react";
|
|
4
4
|
import Image from "next/image";
|
|
5
5
|
import { Button, Details, Div, Heading, Input, Label, Li, Row, Span, Stack, Summary, Text, Textarea, Ul } from "../../../ui";
|
|
6
|
+
import { DEFAULT_ACCENT_HEX } from "../lib/franchise-colors";
|
|
6
7
|
function randomId() {
|
|
7
8
|
return Math.random().toString(36).slice(2, 9);
|
|
8
9
|
}
|
|
@@ -28,7 +29,7 @@ export function CharacterHotspotForm({ initial, onUploadImage, onSave, onAfterSa
|
|
|
28
29
|
const [draftHref, setDraftHref] = useState("");
|
|
29
30
|
const [draftBuyText, setDraftBuyText] = useState("Shop Now");
|
|
30
31
|
const [draftBadge, setDraftBadge] = useState("");
|
|
31
|
-
const [draftAccent, setDraftAccent] = useState(
|
|
32
|
+
const [draftAccent, setDraftAccent] = useState(DEFAULT_ACCENT_HEX);
|
|
32
33
|
const [uploading, setUploading] = useState(false);
|
|
33
34
|
const [saving, setSaving] = useState(false);
|
|
34
35
|
const [error, setError] = useState(null);
|
|
@@ -84,7 +85,7 @@ export function CharacterHotspotForm({ initial, onUploadImage, onSave, onAfterSa
|
|
|
84
85
|
setDraftHref("");
|
|
85
86
|
setDraftBuyText("Shop Now");
|
|
86
87
|
setDraftBadge("");
|
|
87
|
-
setDraftAccent(
|
|
88
|
+
setDraftAccent(DEFAULT_ACCENT_HEX);
|
|
88
89
|
}
|
|
89
90
|
function deletePin(id) {
|
|
90
91
|
setPins((prev) => prev.filter((p) => p.id !== id));
|
|
@@ -137,14 +138,14 @@ export function CharacterHotspotForm({ initial, onUploadImage, onSave, onAfterSa
|
|
|
137
138
|
} }))] }), _jsx(Span, { weight: "medium", className: "mt-1 text-center text-[10px]", style: { color: "var(--color-muted)" }, children: s.label })] }, s.key))) }), step === "image" && (_jsxs(Div, { className: CLS_STEP, style: {
|
|
138
139
|
borderColor: "var(--border-ink)",
|
|
139
140
|
background: "var(--surface-elevated)",
|
|
140
|
-
}, children: [_jsx(Heading, { level: 2, size: "lg", weight: "bold", children: "Upload Background Image" }), _jsx(Text, { style: { color: "var(--color-muted)" }, size: "sm", children: "Choose a wide panoramic image that shows all the characters. You will place pins on it in the next step." }), _jsxs(Label, { layout: "flex", gap: "md", className: "cursor-pointer
|
|
141
|
+
}, children: [_jsx(Heading, { level: 2, size: "lg", weight: "bold", children: "Upload Background Image" }), _jsx(Text, { style: { color: "var(--color-muted)" }, size: "sm", children: "Choose a wide panoramic image that shows all the characters. You will place pins on it in the next step." }), _jsxs(Label, { layout: "flex-col-center", gap: "md", rounded: "lg", padding: "xl", className: "cursor-pointer border-2 border-dashed transition-colors hover:opacity-80", style: { borderColor: "var(--border-ink)" }, children: [_jsx(Span, { size: "3xl", children: "\uD83D\uDDBC" }), _jsx(Span, { weight: "medium", children: uploading ? "Uploading…" : "Click to choose image" }), _jsx(Span, { size: "xs", style: { color: "var(--color-muted)" }, children: "JPG, PNG, WebP \u2014 wide landscape images work best" }), _jsx(Input, { type: "file", accept: "image/*", className: "hidden", onChange: handleImageUpload, disabled: uploading })] }), imageUrl && (_jsxs(Stack, { gap: "xs", children: [_jsx(Div, { className: CLS_IMG_WRAP, style: { paddingTop: "37.5%" }, children: _jsx(Image, { src: imageUrl, alt: imageAlt, fill: true, className: "object-cover", sizes: "680px" }) }), _jsx(Text, { className: CLS_SUCCESS_TEXT, children: "\u2713 Image uploaded" })] })), _jsxs(Stack, { gap: "xs", children: [_jsx(Label, { size: "sm", weight: "bold", children: "Image Alt Text" }), _jsx(Input, { type: "text", value: imageAlt, onChange: (e) => setImageAlt(e.target.value), placeholder: "DC, Marvel and Anime characters", className: CLS_INPUT, style: {
|
|
141
142
|
borderColor: "var(--border-ink)",
|
|
142
143
|
background: "var(--surface-elevated)",
|
|
143
144
|
color: "var(--color-black)",
|
|
144
145
|
} })] }), _jsxs(Label, { layout: "inline-flex", gap: "md", className: "cursor-pointer", size: "sm", weight: "medium", children: [_jsx(Input, { type: "checkbox", checked: active, onChange: (e) => setActive(e.target.checked), className: "h-4 w-4 rounded" }), "Active (show on homepage)"] }), _jsxs(Row, { justify: "end", gap: "sm", className: "border-t", padding: "t-md", style: { borderColor: "var(--border-ink)" }, children: [(initial?.pins?.length ?? 0) > 0 && (_jsx(Button, { type: "button", onClick: () => setStep("review"), variant: "ghost", className: "px-4 py-2 text-sm font-medium rounded transition-opacity hover:opacity-70", style: {
|
|
145
146
|
background: "transparent",
|
|
146
147
|
color: "var(--color-black)",
|
|
147
|
-
}, children: "Skip to Review" })), _jsx(Button, { type: "button", onClick: () => setStep("place"), disabled: !imageUrl || uploading, variant: "primary", className: "px-
|
|
148
|
+
}, children: "Skip to Review" })), _jsx(Button, { type: "button", onClick: () => setStep("place"), disabled: !imageUrl || uploading, variant: "primary", className: "px-[1rem] py-[0.5rem] text-[0.875rem] font-[700] rounded-[0.25rem] transition-opacity disabled:opacity-50", style: {
|
|
148
149
|
background: "var(--color-black)",
|
|
149
150
|
color: "var(--color-yellow)",
|
|
150
151
|
}, children: "Next: Place Pins \u2192" })] })] })), step === "place" && (_jsxs(Div, { className: CLS_STEP, style: {
|
|
@@ -153,7 +154,7 @@ export function CharacterHotspotForm({ initial, onUploadImage, onSave, onAfterSa
|
|
|
153
154
|
}, children: [_jsx(Heading, { level: 2, size: "lg", weight: "bold", children: "Place a Pin" }), _jsxs(Text, { style: { color: "var(--color-muted)" }, size: "sm", children: [_jsx(Span, { weight: "bold", children: "Click anywhere on the image" }), " to drop a pin, or enter exact coordinates below."] }), _jsxs(Div, { ref: containerRef, className: CLS_IMG_WRAP, style: {
|
|
154
155
|
paddingTop: "56.25%",
|
|
155
156
|
cursor: "crosshair",
|
|
156
|
-
background: "
|
|
157
|
+
background: "black",
|
|
157
158
|
}, onClick: handleImageClick, children: [_jsx(Image, { src: imageUrl, alt: imageAlt, fill: true, className: "object-cover", sizes: "(max-width: 680px) 100vw" }), pins.map((pin) => (_jsxs(Div, { className: "pointer-events-none absolute", style: {
|
|
158
159
|
left: `${pin.xPct}%`,
|
|
159
160
|
top: `${pin.yPct}%`,
|
|
@@ -162,10 +163,10 @@ export function CharacterHotspotForm({ initial, onUploadImage, onSave, onAfterSa
|
|
|
162
163
|
}, children: [_jsx(Row, { textWeight: "bold", textSize: "xs", className: "text-white", align: "center", justify: "center", rounded: "full", style: {
|
|
163
164
|
width: 24,
|
|
164
165
|
height: 24,
|
|
165
|
-
background: pin.accent ||
|
|
166
|
+
background: pin.accent || DEFAULT_ACCENT_HEX,
|
|
166
167
|
border: "2px solid white",
|
|
167
168
|
boxShadow: "0 1px 4px rgba(0,0,0,0.5)",
|
|
168
|
-
}, children: "+" }), pin.name && (_jsx(Div, { textWeight: "bold", className: "pointer-events-none absolute left-7 top-1/2 -translate-y-1/2 whitespace-nowrap
|
|
169
|
+
}, children: "+" }), pin.name && (_jsx(Div, { textWeight: "bold", className: "pointer-events-none absolute left-7 top-1/2 -translate-y-1/2 whitespace-nowrap text-[9px] text-white", rounded: "default", style: { paddingInline: "0.375rem", paddingBlock: "0.125rem", background: "black" }, children: pin.name }))] }, pin.id))), draftPos && (_jsxs(Div, { className: "absolute", style: {
|
|
169
170
|
left: `${draftPos.xPct}%`,
|
|
170
171
|
top: `${draftPos.yPct}%`,
|
|
171
172
|
transform: STY_CENTERED,
|
|
@@ -182,10 +183,7 @@ export function CharacterHotspotForm({ initial, onUploadImage, onSave, onAfterSa
|
|
|
182
183
|
boxShadow: "0 2px 8px rgba(0,0,0,0.55)",
|
|
183
184
|
color: "var(--color-black)",
|
|
184
185
|
fontSize: 18,
|
|
185
|
-
}, children: "\u2605" }), _jsx(Div, { textWeight: "bold", className: "pointer-events-none absolute left-9 top-1/2 -translate-y-1/2 whitespace-nowrap
|
|
186
|
-
background: "var(--color-black)",
|
|
187
|
-
color: "var(--color-yellow)",
|
|
188
|
-
}, children: "NEW PIN" })] }))] }), _jsx(Div, { layout: "grid", gap: "3", className: "grid-cols-2", children: [
|
|
186
|
+
}, children: "\u2605" }), _jsx(Div, { textWeight: "bold", className: "pointer-events-none absolute left-9 top-1/2 -translate-y-1/2 whitespace-nowrap text-[10px]", padding: "x-xs", rounded: "default", style: { paddingBlock: "0.125rem", background: "var(--color-black)", color: "var(--color-yellow)" }, children: "NEW PIN" })] }))] }), _jsx(Div, { layout: "grid", gap: "3", className: "grid-cols-2", children: [
|
|
189
187
|
{
|
|
190
188
|
label: "X Position (%)",
|
|
191
189
|
field: "xPct",
|
|
@@ -218,7 +216,7 @@ export function CharacterHotspotForm({ initial, onUploadImage, onSave, onAfterSa
|
|
|
218
216
|
background: "var(--surface-warm)",
|
|
219
217
|
color: "var(--color-black)",
|
|
220
218
|
border: STY_BORDER_INK,
|
|
221
|
-
}, children: "Done Adding Pins" })), _jsx(Button, { type: "button", onClick: () => setStep("details"), disabled: !draftPos, variant: "primary", className: "px-
|
|
219
|
+
}, children: "Done Adding Pins" })), _jsx(Button, { type: "button", onClick: () => setStep("details"), disabled: !draftPos, variant: "primary", className: "px-[1rem] py-[0.5rem] text-[0.875rem] font-[700] rounded-[0.25rem] transition-opacity disabled:opacity-50", style: {
|
|
222
220
|
background: "var(--color-black)",
|
|
223
221
|
color: "var(--color-yellow)",
|
|
224
222
|
}, children: "Continue: Add Details \u2192" })] })] })] })), step === "details" && (_jsxs(Div, { className: CLS_STEP, style: {
|
|
@@ -266,27 +264,27 @@ export function CharacterHotspotForm({ initial, onUploadImage, onSave, onAfterSa
|
|
|
266
264
|
borderColor: "var(--border-ink)",
|
|
267
265
|
background: "var(--surface-elevated)",
|
|
268
266
|
color: "var(--color-black)",
|
|
269
|
-
} })] }, label))) }), _jsxs(Row, { align: "end", gap: "sm", children: [_jsxs(Stack, { className: "flex-1", gap: "xs", children: [_jsx(Label, { size: "sm", weight: "bold", children: "Accent Colour (hex)" }), _jsx(Input, { type: "text", value: draftAccent, onChange: (e) => setDraftAccent(e.target.value), placeholder:
|
|
267
|
+
} })] }, label))) }), _jsxs(Row, { align: "end", gap: "sm", children: [_jsxs(Stack, { className: "flex-1", gap: "xs", children: [_jsx(Label, { size: "sm", weight: "bold", children: "Accent Colour (hex)" }), _jsx(Input, { type: "text", value: draftAccent, onChange: (e) => setDraftAccent(e.target.value), placeholder: DEFAULT_ACCENT_HEX, className: CLS_INPUT, style: {
|
|
270
268
|
borderColor: "var(--border-ink)",
|
|
271
269
|
background: "var(--surface-elevated)",
|
|
272
270
|
color: "var(--color-black)",
|
|
273
271
|
} })] }), _jsx(Input, { type: "color", value: draftAccent, onChange: (e) => setDraftAccent(e.target.value), className: "mb-0.5 h-10 w-10 cursor-pointer rounded border-2", style: { borderColor: "var(--border-ink)" }, title: "Pick colour" })] }), _jsxs(Row, { justify: "between", className: "border-t", padding: "t-md", style: { borderColor: "var(--border-ink)" }, children: [_jsx(Button, { type: "button", onClick: () => setStep("place"), variant: "ghost", className: "px-4 py-2 text-sm font-medium rounded transition-opacity hover:opacity-70", style: { background: "transparent", color: "var(--color-black)" }, children: "\u2190 Back" }), _jsxs(Row, { gap: "sm", children: [_jsx(Button, { type: "button", disabled: !draftName || !draftHref, onClick: () => {
|
|
274
272
|
commitDraftPin();
|
|
275
273
|
setStep("review");
|
|
276
|
-
}, variant: "outline", className: "px-
|
|
274
|
+
}, variant: "outline", className: "px-[1rem] py-[0.5rem] text-[0.875rem] font-[700] rounded-[0.25rem] transition-opacity disabled:opacity-50", style: {
|
|
277
275
|
background: "var(--surface-warm)",
|
|
278
276
|
color: "var(--color-black)",
|
|
279
277
|
border: STY_BORDER_INK,
|
|
280
278
|
}, children: "Save Pin & Finish" }), _jsx(Button, { type: "button", disabled: !draftName || !draftHref, onClick: () => {
|
|
281
279
|
commitDraftPin();
|
|
282
280
|
setStep("place");
|
|
283
|
-
}, variant: "primary", className: "px-
|
|
281
|
+
}, variant: "primary", className: "px-[1rem] py-[0.5rem] text-[0.875rem] font-[700] rounded-[0.25rem] transition-opacity disabled:opacity-50", style: {
|
|
284
282
|
background: "var(--color-black)",
|
|
285
283
|
color: "var(--color-yellow)",
|
|
286
284
|
}, children: "Save Pin & Add Another \u2192" })] })] })] })), step === "review" && (_jsxs(Div, { className: CLS_STEP, style: {
|
|
287
285
|
borderColor: "var(--border-ink)",
|
|
288
286
|
background: "var(--surface-elevated)",
|
|
289
|
-
}, children: [_jsxs(Row, { justify: "between", children: [_jsx(Heading, { level: 2, size: "lg", weight: "bold", children: "Review & Save" }), _jsxs(Span, { rounded: "full", padding: "pill-md", size: "sm", weight: "bold", style: { background: "var(--surface-warm)" }, children: [pins.length, " pin", pins.length !== 1 ? "s" : ""] })] }), _jsxs(Div, { className: CLS_IMG_WRAP, style: { paddingTop: "56.25%", background: "
|
|
287
|
+
}, children: [_jsxs(Row, { justify: "between", children: [_jsx(Heading, { level: 2, size: "lg", weight: "bold", children: "Review & Save" }), _jsxs(Span, { rounded: "full", padding: "pill-md", size: "sm", weight: "bold", style: { background: "var(--surface-warm)" }, children: [pins.length, " pin", pins.length !== 1 ? "s" : ""] })] }), _jsxs(Div, { className: CLS_IMG_WRAP, style: { paddingTop: "56.25%", background: "black" }, children: [_jsx(Image, { src: imageUrl, alt: imageAlt, fill: true, className: "object-cover", sizes: "(max-width: 680px) 100vw" }), pins.map((pin) => (_jsxs(Div, { className: "pointer-events-none absolute", style: {
|
|
290
288
|
left: `${pin.xPct}%`,
|
|
291
289
|
top: `${pin.yPct}%`,
|
|
292
290
|
transform: STY_CENTERED,
|
|
@@ -294,13 +292,13 @@ export function CharacterHotspotForm({ initial, onUploadImage, onSave, onAfterSa
|
|
|
294
292
|
}, children: [_jsx(Row, { textWeight: "bold", textSize: "xs", className: "text-white", align: "center", justify: "center", rounded: "full", style: {
|
|
295
293
|
width: 28,
|
|
296
294
|
height: 28,
|
|
297
|
-
background: pin.accent ||
|
|
295
|
+
background: pin.accent || DEFAULT_ACCENT_HEX,
|
|
298
296
|
border: "2px solid white",
|
|
299
297
|
boxShadow: "0 2px 6px rgba(0,0,0,0.55)",
|
|
300
|
-
}, children: "+" }), pin.name && (_jsx(Div, { textWeight: "bold", className: "pointer-events-none absolute left-8 top-1/2 -translate-y-1/2 whitespace-nowrap
|
|
298
|
+
}, children: "+" }), pin.name && (_jsx(Div, { textWeight: "bold", className: "pointer-events-none absolute left-8 top-1/2 -translate-y-1/2 whitespace-nowrap text-[9px] text-white", rounded: "default", style: { paddingInline: "0.375rem", paddingBlock: "0.125rem", background: "black" }, children: pin.name }))] }, pin.id)))] }), pins.length > 0 ? (_jsx(Ul, { rounded: "lg", className: "divide-y border", style: { borderColor: "var(--border-ink)" }, children: pins.map((pin, i) => (_jsx(Li, { padding: "inline", children: _jsxs(Row, { gap: "sm", children: [_jsx(Span, { layout: "flex-center", color: "inverse", className: "h-6 w-6 shrink-0", rounded: "full", size: "xs", weight: "bold", style: { background: pin.accent || DEFAULT_ACCENT_HEX }, children: i + 1 }), _jsxs(Div, { className: "min-w-0 flex-1", children: [_jsx(Text, { className: "truncate", size: "sm", weight: "bold", children: pin.name || (_jsx(Span, { className: "italic", style: { color: "var(--color-muted)" }, children: "Unnamed" })) }), _jsxs(Text, { style: { color: "var(--color-muted)" }, size: "xs", children: [pin.universe, " \u00B7 ", pin.xPct.toFixed(0), "%,", " ", pin.yPct.toFixed(0), "%"] })] }), _jsx(Button, { type: "button", onClick: () => deletePin(pin.id), variant: "ghost", className: CLS_DELETE_PIN, title: "Remove pin", children: "\u2715" })] }) }, pin.id))) })) : (_jsx(Div, { textSize: "sm", className: "border-2 border-dashed text-center", rounded: "lg", padding: "xl", style: {
|
|
301
299
|
borderColor: "var(--border-ink)",
|
|
302
300
|
color: "var(--color-muted)",
|
|
303
|
-
}, children: "No pins yet \u2014 add some using the button below." })), _jsxs(Details, {
|
|
301
|
+
}, children: "No pins yet \u2014 add some using the button below." })), _jsxs(Details, { rounded: "lg", padding: "md", className: "border", style: { borderColor: "var(--border-ink)" }, children: [_jsx(Summary, { size: "sm", weight: "medium", children: "Image Settings" }), _jsxs(Stack, { className: "mt-3", gap: "3", children: [_jsxs(Label, { layout: "inline-flex", gap: "md", rounded: "default", padding: "toolbar", className: "cursor-pointer border-2 border-dashed transition-colors hover:opacity-80", size: "sm", weight: "medium", style: { borderColor: "var(--border-ink)" }, children: [uploading ? "Uploading…" : "Replace Image", _jsx(Input, { type: "file", accept: "image/*", className: "hidden", onChange: handleImageUpload, disabled: uploading })] }), _jsxs(Stack, { gap: "xs", children: [_jsx(Label, { size: "sm", weight: "bold", children: "Image Alt Text" }), _jsx(Input, { type: "text", value: imageAlt, onChange: (e) => setImageAlt(e.target.value), className: CLS_INPUT, style: {
|
|
304
302
|
borderColor: "var(--border-ink)",
|
|
305
303
|
background: "var(--surface-elevated)",
|
|
306
304
|
color: "var(--color-black)",
|
|
@@ -311,7 +309,7 @@ export function CharacterHotspotForm({ initial, onUploadImage, onSave, onAfterSa
|
|
|
311
309
|
background: "var(--surface-warm)",
|
|
312
310
|
color: "var(--color-black)",
|
|
313
311
|
border: STY_BORDER_INK,
|
|
314
|
-
}, children: "+ Add Another Pin" }), _jsx(Button, { type: "button", onClick: handleSave, disabled: !imageUrl || saving || pins.length === 0, variant: "primary", className: "px-
|
|
312
|
+
}, children: "+ Add Another Pin" }), _jsx(Button, { type: "button", onClick: handleSave, disabled: !imageUrl || saving || pins.length === 0, rounded: "default", variant: "primary", className: "px-[1rem] py-[0.5rem] text-[0.875rem] font-[700] transition-opacity disabled:opacity-50", style: {
|
|
315
313
|
background: "var(--color-black)",
|
|
316
314
|
color: "var(--color-yellow)",
|
|
317
315
|
}, children: saving ? "Saving…" : "Save to Database" })] })] }))] }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Link from "next/link";
|
|
3
|
-
import { Container, Heading, Row, Section, Stack, Text, } from "../../../ui";
|
|
3
|
+
import { Container, Heading, Row, Section, Span, Stack, Text, } from "../../../ui";
|
|
4
4
|
const DEFAULT_ITEMS_PER_ROW = 4;
|
|
5
5
|
const DEFAULT_MAX_ITEMS = 12;
|
|
6
6
|
function entryLabel(entry) {
|
|
@@ -37,5 +37,5 @@ export async function CollectionCardsSection({ config, }) {
|
|
|
37
37
|
if (collections.length === 0) {
|
|
38
38
|
return null;
|
|
39
39
|
}
|
|
40
|
-
return (_jsx(Section, { padding: "y-2xl", children: _jsx(Container, { size: "xl", children: _jsxs(Stack, { gap: "md", children: [_jsxs(Stack, { gap: "xs", children: [_jsx(Heading, { level: 2, size: "2xl", weight: "semibold", color: "primary", children: title }), subtitle ? (_jsx(Text, { size: "sm", color: "muted", children: subtitle })) : null] }), showTabs ? (_jsx(Row, { gap: "sm", wrap: true, children: collections.slice(0, 3).map((entry, idx) => (_jsx(
|
|
40
|
+
return (_jsx(Section, { padding: "y-2xl", children: _jsx(Container, { size: "xl", children: _jsxs(Stack, { gap: "md", children: [_jsxs(Stack, { gap: "xs", children: [_jsx(Heading, { level: 2, size: "2xl", weight: "semibold", color: "primary", children: title }), subtitle ? (_jsx(Text, { size: "sm", color: "muted", children: subtitle })) : null] }), showTabs ? (_jsx(Row, { gap: "sm", wrap: true, children: collections.slice(0, 3).map((entry, idx) => (_jsx(Span, { border: "default", padding: "x-sm", className: "py-[0.25rem]", rounded: "full", color: "muted", size: "xs", weight: "medium", children: entryLabel(entry) }, `${entry.type}-${idx}`))) })) : null, _jsxs(Stack, { align: "center", gap: "sm", className: "border-dashed text-center", border: "strong", paddingY: "y-3xl", paddingX: "x-lg", rounded: "2xl", children: [_jsxs(Text, { size: "sm", color: "muted", children: ["Mixed collection rendering (", collections.length, "/3 collection", collections.length === 1 ? "" : "s", ", up to ", maxItems, " items,", " ", itemsPerRow, " per row) \u2014 data wiring lands with the bundle/raffle work."] }), cta ? (_jsxs(Link, { href: cta.href, className: "text-sm font-medium text-primary hover:underline", children: [cta.label, " \u2192"] })) : null] })] }) }) }));
|
|
41
41
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { Row } from "@mohasinac/appkit/ui";
|
|
3
4
|
import { Div, Heading, HorizontalScroller, Section, Stack, Text } from "../../../ui";
|
|
5
|
+
import { DynamicBgDiv } from "../../../ui/components/DynamicBgDiv";
|
|
4
6
|
import { THEMED_TEXT_PRIMARY } from "../../../_internal/shared/styles/themed";
|
|
5
7
|
import { SectionCarousel } from "./SectionCarousel";
|
|
6
8
|
import { MediaImage } from "../../media/MediaImage";
|
|
@@ -43,12 +45,7 @@ const VARIANT_CLASS = {
|
|
|
43
45
|
function CardItem({ card }) {
|
|
44
46
|
const radiusClass = RADIUS_CLASS[card.borderRadius ?? "lg"] ?? "rounded-lg";
|
|
45
47
|
const shadowClass = SHADOW_CLASS[card.shadowLevel ?? "sm"] ?? "shadow-sm";
|
|
46
|
-
|
|
47
|
-
if (card.backgroundColor)
|
|
48
|
-
cardStyle.backgroundColor = card.backgroundColor;
|
|
49
|
-
if (card.textColor)
|
|
50
|
-
cardStyle.color = card.textColor;
|
|
51
|
-
return (_jsxs(Stack, { className: `overflow-hidden ${radiusClass} ${shadowClass} bg-[var(--appkit-color-surface)]`, style: cardStyle, children: [card.image && (_jsx(Div, { className: `relative w-full aspect-video ${__O.hidden}`, children: _jsx(MediaImage, { src: card.image, alt: card.imageAlt ?? "", size: "card" }) })), _jsxs(Stack, { className: `${__P.p4} flex-1`, gap: "sm", children: [card.eyebrow && (_jsx(Text, { className: "tracking-widest opacity-70", size: "xs", weight: "semibold", transform: "uppercase", children: card.eyebrow })), card.title && (_jsx(Text, { className: "leading-snug", size: "base", weight: "bold", children: card.title })), card.body && (_jsx(Text, { className: "opacity-80 leading-relaxed flex-1", size: "sm", children: card.body })), card.buttons && card.buttons.length > 0 && (_jsx(Row, { gap: "sm", wrap: true, className: "mt-2", children: card.buttons.map((btn, i) => (_jsx("a", { href: btn.href, target: btn.target ?? "_self", rel: btn.target === "_blank" ? "noopener noreferrer" : undefined, className: VARIANT_CLASS[btn.variant] ?? VARIANT_CLASS.primary, children: btn.label }, i))) })), card.formEmbed && (_jsx("iframe", { src: card.formEmbed, sandbox: "allow-forms allow-scripts", loading: "lazy", className: "w-full mt-3 border-0 rounded-md", style: { minHeight: "200px" }, title: "Embedded form" }))] })] }));
|
|
48
|
+
return (_jsxs(DynamicBgDiv, { color: card.backgroundColor, textColor: card.textColor, className: `flex flex-col overflow-hidden ${radiusClass} ${shadowClass} bg-[var(--appkit-color-surface)]`, children: [card.image && (_jsx(Div, { className: `relative w-full aspect-video ${__O.hidden}`, children: _jsx(MediaImage, { src: card.image, alt: card.imageAlt ?? "", size: "card" }) })), _jsxs(Stack, { className: `${__P.p4} flex-1`, gap: "sm", children: [card.eyebrow && (_jsx(Text, { className: "tracking-widest opacity-70", size: "xs", weight: "semibold", transform: "uppercase", children: card.eyebrow })), card.title && (_jsx(Text, { className: "leading-snug", size: "base", weight: "bold", children: card.title })), card.body && (_jsx(Text, { className: "opacity-80 leading-relaxed flex-1", size: "sm", children: card.body })), card.buttons && card.buttons.length > 0 && (_jsx(Row, { gap: "sm", wrap: true, className: "mt-2", children: card.buttons.map((btn, i) => (_jsx("a", { href: btn.href, target: btn.target ?? "_self", rel: btn.target === "_blank" ? "noopener noreferrer" : undefined, className: VARIANT_CLASS[btn.variant] ?? VARIANT_CLASS.primary, children: btn.label }, i))) })), card.formEmbed && (_jsx("iframe", { src: card.formEmbed, sandbox: "allow-forms allow-scripts", loading: "lazy", className: "w-full mt-3 border-0 rounded-md min-h-[200px]", title: "Embedded form" }))] })] }));
|
|
52
49
|
}
|
|
53
50
|
// --- Section Header ----------------------------------------------------------
|
|
54
51
|
function SectionHeader({ title }) {
|
|
@@ -17,5 +17,5 @@ export function CustomerReviewsSection({ title, subtitle, items, renderItem, vie
|
|
|
17
17
|
}
|
|
18
18
|
if (items.length === 0)
|
|
19
19
|
return null;
|
|
20
|
-
return (_jsx(Section, { className: `${className}`, surface: "muted", padding: "y-3xl", children: _jsxs(Div, { className: "w-full max-w-7xl mx-auto md:px-
|
|
20
|
+
return (_jsx(Section, { className: `${className}`, surface: "muted", padding: "y-3xl", children: _jsxs(Div, { className: "w-full max-w-7xl mx-auto md:px-[2rem]", padding: "x-md", children: [_jsxs(Div, { className: "text-center mb-10", children: [_jsx(Heading, { level: 2, className: `${themed.textPrimary} mb-3`, size: "3xl", mdSize: "4xl", weight: "bold", children: title }), subtitle && (_jsx(Text, { className: `${themed.textSecondary}`, size: "base", children: subtitle }))] }), _jsx(HorizontalScroller, { items: items, renderItem: (item) => renderItem(item), perView: CAROUSEL_PER_VIEW.reviews, gap: 24, autoScroll: true, autoScrollInterval: 4500, pauseOnHover: true, snapToItems: true, showArrows: true, keyExtractor: keyExtractor, loop: true }), viewMoreHref && (_jsx(Div, { className: "text-center mt-8", children: _jsx(TextLink, { href: viewMoreHref, className: "text-primary hover:text-primary/80", size: "sm", weight: "medium", children: viewMoreLabel }) }))] }) }));
|
|
21
21
|
}
|
|
@@ -69,6 +69,6 @@ export function FAQSection({ title, subtitle, items, tabs: tabsProp, showCategor
|
|
|
69
69
|
}, [items, showTabs, activeTab]);
|
|
70
70
|
return (_jsx(Section, { paddingX: "x-md-2xl", className: className, surface: "subtle", paddingY: "y-4xl", children: _jsxs(Div, { className: "w-full max-w-4xl mx-auto", children: [_jsxs(Div, { className: "text-center mb-10", children: [_jsx(Heading, { level: 2, variant: "none", gradient: "brand", className: "mb-3", mdSize: "4xl", size: "3xl", weight: "bold", children: title }), subtitle && (_jsx(Text, { className: `max-w-xl mx-auto ${themed.textSecondary}`, size: "base", children: subtitle }))] }), showTabs && (_jsxs(Row, { align: "center", justify: "center", gap: "sm", wrap: true, className: `mb-8`, children: [_jsx(Button, { rounded: "full", variant: activeTab === "all" ? "primary" : "ghost", size: "sm", onClick: () => setActiveTab("all"), children: "All" }), derivedTabs.map((tab) => (_jsx(Button, { rounded: "full", variant: activeTab === tab.value ? "primary" : "ghost", size: "sm", onClick: () => setActiveTab(tab.value), children: tab.label }, tab.value)))] })), _jsxs(Stack, { gap: "sm", children: [visibleItems.length === 0 && (_jsx(Text, { paddingY: "3xl", align: "center", className: themed.textSecondary, children: "No FAQs in this category yet." })), visibleItems.map((faq) => {
|
|
71
71
|
const isOpen = openIds.has(faq.id);
|
|
72
|
-
return (_jsxs("div", { className: `${themed.bgPrimary} rounded-xl overflow-hidden border transition-all duration-200 ${isOpen ? "border-primary/40 shadow-sm" : `${themed.border}`}`, children: [_jsxs(Button, { variant: "ghost", className: `w-full text-left px-
|
|
73
|
-
})] }), viewMoreHref && (_jsx(Div, { className: "text-center mt-10", children: _jsxs(TextLink, { rounded: "full", paddingX: "xl", paddingY: "sm", href: viewMoreHref, className: "inline-flex items-center gap-
|
|
72
|
+
return (_jsxs("div", { className: `${themed.bgPrimary} rounded-xl overflow-hidden border transition-all duration-200 ${isOpen ? "border-primary/40 shadow-sm" : `${themed.border}`}`, children: [_jsxs(Button, { variant: "ghost", rounded: "none", className: `w-full text-left px-[1.25rem] py-[1rem] ${flex.between} gap-[1rem] hover:${themed.bgTertiary} transition-colors`, onClick: () => toggle(faq.id), "aria-expanded": isOpen, children: [_jsx(Span, { size: "sm", weight: "medium", className: `flex-1 leading-snug ${isOpen ? "text-primary" : themed.textPrimary}`, children: faq.question }), _jsx(ChevronDown, { className: `w-4 h-4 flex-shrink-0 transition-transform duration-250 ${isOpen ? "rotate-180 text-primary" : themed.textSecondary}` })] }), _jsx(Div, { layout: "grid", className: `transition-all duration-300 ease-out ${isOpen ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"}`, children: _jsx(Div, { className: `${__O.hidden}`, children: _jsx(Div, { paddingY: "b-md-lg", padding: "x-md", children: isHtml(faq.answer) ? (_jsx(RichText, { html: faq.answer, proseClass: "prose prose-sm max-w-none dark:prose-invert" })) : (_jsx(Text, { className: `leading-relaxed ${themed.textSecondary}`, size: "sm", children: faq.answer })) }) }) })] }, faq.id));
|
|
73
|
+
})] }), viewMoreHref && (_jsx(Div, { className: "text-center mt-10", children: _jsxs(TextLink, { rounded: "full", paddingX: "xl", paddingY: "sm", href: viewMoreHref, className: "inline-flex items-[center] gap-[0.5rem] bg-primary/10 text-primary hover:bg-primary/20 dark:bg-primary/15 transition-colors", size: "sm", weight: "medium", children: [viewMoreLabel, hasMore && moreCount > 0 && (_jsxs(Span, { color: "inverse", size: "xs", className: "bg-primary", rounded: "full", padding: "pill-xs", children: ["+", moreCount] }))] }) }))] }) }));
|
|
74
74
|
}
|
|
@@ -7,7 +7,7 @@ export function FeaturedResultsSection({ title, subtitle, pillLabel, ornamentLab
|
|
|
7
7
|
const pillCls = "inline-flex items-center gap-2 rounded-full border border-primary-500/30 bg-primary-500/10 px-5 py-1.5 text-xs font-medium uppercase tracking-[0.2em] text-primary-700 backdrop-blur-sm dark:text-primary-400";
|
|
8
8
|
if (!items.length)
|
|
9
9
|
return null;
|
|
10
|
-
return (_jsxs(Section, { className:
|
|
10
|
+
return (_jsxs(Section, { className: className, paddingY: "y-5xl", paddingX: "x-md", children: [_jsxs(Div, { className: "mb-12 text-center", children: [pillLabel && (_jsxs(Span, { className: pillCls, children: [_jsx(Span, { className: "inline-block h-1.5 w-1.5 bg-primary-500", rounded: "full", "aria-hidden": "true" }), pillLabel] })), _jsx(Heading, { level: 2, className: "mt-3 font-display", color: "primary", size: "4xl", children: title }), _jsxs(Row, { align: "center", justify: "center", gap: "sm", color: "faint", className: "mt-3", "aria-hidden": "true", children: [_jsx(Span, { className: "h-px w-6 bg-current" }), _jsx(Span, { size: "xs", children: ornamentLabel }), _jsx(Span, { className: "h-px w-6 bg-current" })] }), subtitle && (_jsx(Text, { className: "mx-auto mt-4 max-w-md", color: "muted", size: "sm", children: subtitle }))] }), _jsx(Div, { className: "mx-auto max-w-7xl", children: _jsx(HorizontalScroller, { items: items, renderItem: (item, i) => (_jsx(Div, { className: "w-full sm:w-auto", children: _jsx(BeforeAfterCard, { item: {
|
|
11
11
|
id: item.id ?? `result-${i}`,
|
|
12
12
|
beforeImage: item.beforeImage,
|
|
13
13
|
afterImage: item.afterImage,
|
|
@@ -5,16 +5,16 @@ import { fetchGoogleReviews } from "../lib/google-reviews-fetcher";
|
|
|
5
5
|
const __P = {
|
|
6
6
|
p4: "p-4",
|
|
7
7
|
};
|
|
8
|
-
const CLS_STAR_ON = "text-
|
|
8
|
+
const CLS_STAR_ON = "text-star";
|
|
9
9
|
const CLS_STAR_OFF = "text-zinc-300 dark:text-zinc-600";
|
|
10
|
-
const CLS_GMAPS_LINK = "shrink-0 text-sm font-medium text-
|
|
10
|
+
const CLS_GMAPS_LINK = "shrink-0 text-sm font-medium text-info hover:underline";
|
|
11
11
|
// --- Star Rating -------------------------------------------------------------
|
|
12
12
|
function StarRating({ rating }) {
|
|
13
|
-
return (_jsx(Row, { className: "gap-
|
|
13
|
+
return (_jsx(Row, { className: "gap-[2px]", align: "center", "aria-label": `${rating} out of 5 stars`, children: [1, 2, 3, 4, 5].map((star) => (_jsx("svg", { className: `w-4 h-4 ${star <= rating ? CLS_STAR_ON : CLS_STAR_OFF}`, viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", children: _jsx("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" }) }, star))) }));
|
|
14
14
|
}
|
|
15
15
|
// --- Google Logo Badge -------------------------------------------------------
|
|
16
16
|
function GoogleBadge() {
|
|
17
|
-
return (_jsxs(Span, { layout: "inline-flex", gap: "xs", size: "xs", color: "muted", children: [_jsxs("svg", { className: "w-3.5 h-3.5", viewBox: "0 0 24 24", "aria-hidden": "true", children: [_jsx("path", { fill: "
|
|
17
|
+
return (_jsxs(Span, { layout: "inline-flex", gap: "xs", size: "xs", color: "muted", children: [_jsxs("svg", { className: "w-3.5 h-3.5", viewBox: "0 0 24 24", "aria-hidden": "true", children: [_jsx("path", { fill: "var(--brand-google-blue)", d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z" }), _jsx("path", { fill: "var(--brand-google-green)", d: "M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" }), _jsx("path", { fill: "var(--brand-google-yellow)", d: "M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" }), _jsx("path", { fill: "var(--brand-google-red)", d: "M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" })] }), "Posted on Google"] }));
|
|
18
18
|
}
|
|
19
19
|
// --- Review Card -------------------------------------------------------------
|
|
20
20
|
function ReviewCard({ review, showRating, showDate, }) {
|