@lexsis/storefront-components 1.0.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/dist/PageRenderer.d.ts +8 -0
- package/dist/PageRenderer.d.ts.map +1 -0
- package/dist/PageRenderer.js +116 -0
- package/dist/PageRenderer.js.map +1 -0
- package/dist/SectionSkeleton.d.ts +2 -0
- package/dist/SectionSkeleton.d.ts.map +1 -0
- package/dist/SectionSkeleton.js +5 -0
- package/dist/SectionSkeleton.js.map +1 -0
- package/dist/ThemeContext.d.ts +11 -0
- package/dist/ThemeContext.d.ts.map +1 -0
- package/dist/ThemeContext.js +13 -0
- package/dist/ThemeContext.js.map +1 -0
- package/dist/ThemeProvider.d.ts +9 -0
- package/dist/ThemeProvider.d.ts.map +1 -0
- package/dist/ThemeProvider.js +227 -0
- package/dist/ThemeProvider.js.map +1 -0
- package/dist/ThemeToggle.d.ts +6 -0
- package/dist/ThemeToggle.d.ts.map +1 -0
- package/dist/ThemeToggle.js +26 -0
- package/dist/ThemeToggle.js.map +1 -0
- package/dist/animations/advanced-hooks.d.ts +36 -0
- package/dist/animations/advanced-hooks.d.ts.map +1 -0
- package/dist/animations/advanced-hooks.js +106 -0
- package/dist/animations/advanced-hooks.js.map +1 -0
- package/dist/animations/canvas-utils.d.ts +41 -0
- package/dist/animations/canvas-utils.d.ts.map +1 -0
- package/dist/animations/canvas-utils.js +115 -0
- package/dist/animations/canvas-utils.js.map +1 -0
- package/dist/animations/hooks.d.ts +48 -0
- package/dist/animations/hooks.d.ts.map +1 -0
- package/dist/animations/hooks.js +50 -0
- package/dist/animations/hooks.js.map +1 -0
- package/dist/animations/index.d.ts +4 -0
- package/dist/animations/index.d.ts.map +1 -0
- package/dist/animations/index.js +4 -0
- package/dist/animations/index.js.map +1 -0
- package/dist/animations/presets.d.ts +43 -0
- package/dist/animations/presets.d.ts.map +1 -0
- package/dist/animations/presets.js +278 -0
- package/dist/animations/presets.js.map +1 -0
- package/dist/animations/variants.d.ts +15 -0
- package/dist/animations/variants.d.ts.map +1 -0
- package/dist/animations/variants.js +90 -0
- package/dist/animations/variants.js.map +1 -0
- package/dist/backgrounds/BackgroundSection.d.ts +3 -0
- package/dist/backgrounds/BackgroundSection.d.ts.map +1 -0
- package/dist/backgrounds/BackgroundSection.js +205 -0
- package/dist/backgrounds/BackgroundSection.js.map +1 -0
- package/dist/buttons/ButtonSection.d.ts +3 -0
- package/dist/buttons/ButtonSection.d.ts.map +1 -0
- package/dist/buttons/ButtonSection.js +150 -0
- package/dist/buttons/ButtonSection.js.map +1 -0
- package/dist/cards/CardStack.d.ts +3 -0
- package/dist/cards/CardStack.d.ts.map +1 -0
- package/dist/cards/CardStack.js +140 -0
- package/dist/cards/CardStack.js.map +1 -0
- package/dist/cards/FeatureCard.d.ts +3 -0
- package/dist/cards/FeatureCard.d.ts.map +1 -0
- package/dist/cards/FeatureCard.js +100 -0
- package/dist/cards/FeatureCard.js.map +1 -0
- package/dist/cards/FeaturedCard.d.ts +3 -0
- package/dist/cards/FeaturedCard.d.ts.map +1 -0
- package/dist/cards/FeaturedCard.js +66 -0
- package/dist/cards/FeaturedCard.js.map +1 -0
- package/dist/cards/TerminalCard.d.ts +3 -0
- package/dist/cards/TerminalCard.d.ts.map +1 -0
- package/dist/cards/TerminalCard.js +73 -0
- package/dist/cards/TerminalCard.js.map +1 -0
- package/dist/cards/TestimonialCard.d.ts +3 -0
- package/dist/cards/TestimonialCard.d.ts.map +1 -0
- package/dist/cards/TestimonialCard.js +50 -0
- package/dist/cards/TestimonialCard.js.map +1 -0
- package/dist/cards/index.d.ts +2 -0
- package/dist/cards/index.d.ts.map +1 -0
- package/dist/cards/index.js +2 -0
- package/dist/cards/index.js.map +1 -0
- package/dist/cart/CartCheckoutBar.d.ts +3 -0
- package/dist/cart/CartCheckoutBar.d.ts.map +1 -0
- package/dist/cart/CartCheckoutBar.js +258 -0
- package/dist/cart/CartCheckoutBar.js.map +1 -0
- package/dist/cart/CartDiscount.d.ts +3 -0
- package/dist/cart/CartDiscount.d.ts.map +1 -0
- package/dist/cart/CartDiscount.js +78 -0
- package/dist/cart/CartDiscount.js.map +1 -0
- package/dist/cart/CartDrawer.d.ts +3 -0
- package/dist/cart/CartDrawer.d.ts.map +1 -0
- package/dist/cart/CartDrawer.js +141 -0
- package/dist/cart/CartDrawer.js.map +1 -0
- package/dist/cart/CartLines.d.ts +3 -0
- package/dist/cart/CartLines.d.ts.map +1 -0
- package/dist/cart/CartLines.js +227 -0
- package/dist/cart/CartLines.js.map +1 -0
- package/dist/cart/CartPage.d.ts +3 -0
- package/dist/cart/CartPage.d.ts.map +1 -0
- package/dist/cart/CartPage.js +128 -0
- package/dist/cart/CartPage.js.map +1 -0
- package/dist/cart/CartSummary.d.ts +3 -0
- package/dist/cart/CartSummary.d.ts.map +1 -0
- package/dist/cart/CartSummary.js +155 -0
- package/dist/cart/CartSummary.js.map +1 -0
- package/dist/cart/CartTrigger.d.ts +3 -0
- package/dist/cart/CartTrigger.d.ts.map +1 -0
- package/dist/cart/CartTrigger.js +45 -0
- package/dist/cart/CartTrigger.js.map +1 -0
- package/dist/cart/GuaranteeBanner.d.ts +3 -0
- package/dist/cart/GuaranteeBanner.d.ts.map +1 -0
- package/dist/cart/GuaranteeBanner.js +15 -0
- package/dist/cart/GuaranteeBanner.js.map +1 -0
- package/dist/cart/index.d.ts +8 -0
- package/dist/cart/index.d.ts.map +1 -0
- package/dist/cart/index.js +8 -0
- package/dist/cart/index.js.map +1 -0
- package/dist/content/BeforeAfterSlider.d.ts +3 -0
- package/dist/content/BeforeAfterSlider.d.ts.map +1 -0
- package/dist/content/BeforeAfterSlider.js +61 -0
- package/dist/content/BeforeAfterSlider.js.map +1 -0
- package/dist/content/ImageTextSplit.d.ts +3 -0
- package/dist/content/ImageTextSplit.d.ts.map +1 -0
- package/dist/content/ImageTextSplit.js +33 -0
- package/dist/content/ImageTextSplit.js.map +1 -0
- package/dist/content/LookbookGrid.d.ts +3 -0
- package/dist/content/LookbookGrid.d.ts.map +1 -0
- package/dist/content/LookbookGrid.js +183 -0
- package/dist/content/LookbookGrid.js.map +1 -0
- package/dist/content/ParallaxSection.d.ts +3 -0
- package/dist/content/ParallaxSection.d.ts.map +1 -0
- package/dist/content/ParallaxSection.js +66 -0
- package/dist/content/ParallaxSection.js.map +1 -0
- package/dist/content/RichText.d.ts +3 -0
- package/dist/content/RichText.d.ts.map +1 -0
- package/dist/content/RichText.js +21 -0
- package/dist/content/RichText.js.map +1 -0
- package/dist/content/index.d.ts +5 -0
- package/dist/content/index.d.ts.map +1 -0
- package/dist/content/index.js +5 -0
- package/dist/content/index.js.map +1 -0
- package/dist/content-types.d.ts +637 -0
- package/dist/content-types.d.ts.map +1 -0
- package/dist/content-types.js +2 -0
- package/dist/content-types.js.map +1 -0
- package/dist/context/LxCartContext.d.ts +71 -0
- package/dist/context/LxCartContext.d.ts.map +1 -0
- package/dist/context/LxCartContext.js +491 -0
- package/dist/context/LxCartContext.js.map +1 -0
- package/dist/context/LxEditorContext.d.ts +8 -0
- package/dist/context/LxEditorContext.d.ts.map +1 -0
- package/dist/context/LxEditorContext.js +10 -0
- package/dist/context/LxEditorContext.js.map +1 -0
- package/dist/context/LxPDPContext.d.ts +39 -0
- package/dist/context/LxPDPContext.d.ts.map +1 -0
- package/dist/context/LxPDPContext.js +52 -0
- package/dist/context/LxPDPContext.js.map +1 -0
- package/dist/cta/CtaFullWidth.d.ts +3 -0
- package/dist/cta/CtaFullWidth.d.ts.map +1 -0
- package/dist/cta/CtaFullWidth.js +30 -0
- package/dist/cta/CtaFullWidth.js.map +1 -0
- package/dist/cta/CtaStickyBottom.d.ts +3 -0
- package/dist/cta/CtaStickyBottom.d.ts.map +1 -0
- package/dist/cta/CtaStickyBottom.js +43 -0
- package/dist/cta/CtaStickyBottom.js.map +1 -0
- package/dist/cta/GuaranteeCta.d.ts +3 -0
- package/dist/cta/GuaranteeCta.d.ts.map +1 -0
- package/dist/cta/GuaranteeCta.js +27 -0
- package/dist/cta/GuaranteeCta.js.map +1 -0
- package/dist/cta/NewsletterSignup.d.ts +3 -0
- package/dist/cta/NewsletterSignup.d.ts.map +1 -0
- package/dist/cta/NewsletterSignup.js +35 -0
- package/dist/cta/NewsletterSignup.js.map +1 -0
- package/dist/cta/Popup.d.ts +3 -0
- package/dist/cta/Popup.d.ts.map +1 -0
- package/dist/cta/Popup.js +208 -0
- package/dist/cta/Popup.js.map +1 -0
- package/dist/cta/UrgencyCta.d.ts +3 -0
- package/dist/cta/UrgencyCta.d.ts.map +1 -0
- package/dist/cta/UrgencyCta.js +85 -0
- package/dist/cta/UrgencyCta.js.map +1 -0
- package/dist/cta/WaitlistCta.d.ts +3 -0
- package/dist/cta/WaitlistCta.d.ts.map +1 -0
- package/dist/cta/WaitlistCta.js +62 -0
- package/dist/cta/WaitlistCta.js.map +1 -0
- package/dist/cta/index.d.ts +3 -0
- package/dist/cta/index.d.ts.map +1 -0
- package/dist/cta/index.js +3 -0
- package/dist/cta/index.js.map +1 -0
- package/dist/effects/AnimatedBackground.d.ts +22 -0
- package/dist/effects/AnimatedBackground.d.ts.map +1 -0
- package/dist/effects/AnimatedBackground.js +313 -0
- package/dist/effects/AnimatedBackground.js.map +1 -0
- package/dist/effects/CanvasReveal.d.ts +5 -0
- package/dist/effects/CanvasReveal.d.ts.map +1 -0
- package/dist/effects/CanvasReveal.js +104 -0
- package/dist/effects/CanvasReveal.js.map +1 -0
- package/dist/effects/DecorativeOverlay.d.ts +10 -0
- package/dist/effects/DecorativeOverlay.d.ts.map +1 -0
- package/dist/effects/DecorativeOverlay.js +76 -0
- package/dist/effects/DecorativeOverlay.js.map +1 -0
- package/dist/effects/ScrollLinked.d.ts +3 -0
- package/dist/effects/ScrollLinked.d.ts.map +1 -0
- package/dist/effects/ScrollLinked.js +57 -0
- package/dist/effects/ScrollLinked.js.map +1 -0
- package/dist/effects/svg-library.d.ts +3 -0
- package/dist/effects/svg-library.d.ts.map +1 -0
- package/dist/effects/svg-library.js +105 -0
- package/dist/effects/svg-library.js.map +1 -0
- package/dist/faq/FaqAccordion.d.ts +3 -0
- package/dist/faq/FaqAccordion.d.ts.map +1 -0
- package/dist/faq/FaqAccordion.js +39 -0
- package/dist/faq/FaqAccordion.js.map +1 -0
- package/dist/faq/FaqTwoColumn.d.ts +3 -0
- package/dist/faq/FaqTwoColumn.d.ts.map +1 -0
- package/dist/faq/FaqTwoColumn.js +38 -0
- package/dist/faq/FaqTwoColumn.js.map +1 -0
- package/dist/faq/index.d.ts +3 -0
- package/dist/faq/index.d.ts.map +1 -0
- package/dist/faq/index.js +3 -0
- package/dist/faq/index.js.map +1 -0
- package/dist/features/BentoGrid.d.ts +3 -0
- package/dist/features/BentoGrid.d.ts.map +1 -0
- package/dist/features/BentoGrid.js +62 -0
- package/dist/features/BentoGrid.js.map +1 -0
- package/dist/features/FeatureGrid.d.ts +3 -0
- package/dist/features/FeatureGrid.d.ts.map +1 -0
- package/dist/features/FeatureGrid.js +89 -0
- package/dist/features/FeatureGrid.js.map +1 -0
- package/dist/features/FeatureTabs.d.ts +3 -0
- package/dist/features/FeatureTabs.d.ts.map +1 -0
- package/dist/features/FeatureTabs.js +64 -0
- package/dist/features/FeatureTabs.js.map +1 -0
- package/dist/features/ProcessSteps.d.ts +3 -0
- package/dist/features/ProcessSteps.d.ts.map +1 -0
- package/dist/features/ProcessSteps.js +74 -0
- package/dist/features/ProcessSteps.js.map +1 -0
- package/dist/heroes/HeroActivity.d.ts +3 -0
- package/dist/heroes/HeroActivity.d.ts.map +1 -0
- package/dist/heroes/HeroActivity.js +54 -0
- package/dist/heroes/HeroActivity.js.map +1 -0
- package/dist/heroes/HeroAnimated.d.ts +3 -0
- package/dist/heroes/HeroAnimated.d.ts.map +1 -0
- package/dist/heroes/HeroAnimated.js +101 -0
- package/dist/heroes/HeroAnimated.js.map +1 -0
- package/dist/heroes/HeroAurora.d.ts +3 -0
- package/dist/heroes/HeroAurora.d.ts.map +1 -0
- package/dist/heroes/HeroAurora.js +53 -0
- package/dist/heroes/HeroAurora.js.map +1 -0
- package/dist/heroes/HeroCarousel.d.ts +3 -0
- package/dist/heroes/HeroCarousel.d.ts.map +1 -0
- package/dist/heroes/HeroCarousel.js +187 -0
- package/dist/heroes/HeroCarousel.js.map +1 -0
- package/dist/heroes/HeroCentered.d.ts +3 -0
- package/dist/heroes/HeroCentered.d.ts.map +1 -0
- package/dist/heroes/HeroCentered.js +62 -0
- package/dist/heroes/HeroCentered.js.map +1 -0
- package/dist/heroes/HeroCinematicFullbleed.d.ts +3 -0
- package/dist/heroes/HeroCinematicFullbleed.d.ts.map +1 -0
- package/dist/heroes/HeroCinematicFullbleed.js +44 -0
- package/dist/heroes/HeroCinematicFullbleed.js.map +1 -0
- package/dist/heroes/HeroCountdown.d.ts +3 -0
- package/dist/heroes/HeroCountdown.d.ts.map +1 -0
- package/dist/heroes/HeroCountdown.js +64 -0
- package/dist/heroes/HeroCountdown.js.map +1 -0
- package/dist/heroes/HeroDarkSplitSticker.d.ts +3 -0
- package/dist/heroes/HeroDarkSplitSticker.d.ts.map +1 -0
- package/dist/heroes/HeroDarkSplitSticker.js +39 -0
- package/dist/heroes/HeroDarkSplitSticker.js.map +1 -0
- package/dist/heroes/HeroEditorial.d.ts +3 -0
- package/dist/heroes/HeroEditorial.d.ts.map +1 -0
- package/dist/heroes/HeroEditorial.js +30 -0
- package/dist/heroes/HeroEditorial.js.map +1 -0
- package/dist/heroes/HeroEditorialMinimal.d.ts +3 -0
- package/dist/heroes/HeroEditorialMinimal.d.ts.map +1 -0
- package/dist/heroes/HeroEditorialMinimal.js +47 -0
- package/dist/heroes/HeroEditorialMinimal.js.map +1 -0
- package/dist/heroes/HeroFullBleed.d.ts +3 -0
- package/dist/heroes/HeroFullBleed.d.ts.map +1 -0
- package/dist/heroes/HeroFullBleed.js +136 -0
- package/dist/heroes/HeroFullBleed.js.map +1 -0
- package/dist/heroes/HeroMini.d.ts +3 -0
- package/dist/heroes/HeroMini.d.ts.map +1 -0
- package/dist/heroes/HeroMini.js +25 -0
- package/dist/heroes/HeroMini.js.map +1 -0
- package/dist/heroes/HeroParallax.d.ts +3 -0
- package/dist/heroes/HeroParallax.d.ts.map +1 -0
- package/dist/heroes/HeroParallax.js +71 -0
- package/dist/heroes/HeroParallax.js.map +1 -0
- package/dist/heroes/HeroRetroCentered.d.ts +3 -0
- package/dist/heroes/HeroRetroCentered.d.ts.map +1 -0
- package/dist/heroes/HeroRetroCentered.js +49 -0
- package/dist/heroes/HeroRetroCentered.js.map +1 -0
- package/dist/heroes/HeroSplit.d.ts +3 -0
- package/dist/heroes/HeroSplit.d.ts.map +1 -0
- package/dist/heroes/HeroSplit.js +81 -0
- package/dist/heroes/HeroSplit.js.map +1 -0
- package/dist/heroes/HeroSpotlight.d.ts +3 -0
- package/dist/heroes/HeroSpotlight.d.ts.map +1 -0
- package/dist/heroes/HeroSpotlight.js +60 -0
- package/dist/heroes/HeroSpotlight.js.map +1 -0
- package/dist/heroes/HeroTrustSplit.d.ts +3 -0
- package/dist/heroes/HeroTrustSplit.d.ts.map +1 -0
- package/dist/heroes/HeroTrustSplit.js +53 -0
- package/dist/heroes/HeroTrustSplit.js.map +1 -0
- package/dist/heroes/HeroTypewriter.d.ts +3 -0
- package/dist/heroes/HeroTypewriter.d.ts.map +1 -0
- package/dist/heroes/HeroTypewriter.js +80 -0
- package/dist/heroes/HeroTypewriter.js.map +1 -0
- package/dist/heroes/index.d.ts +12 -0
- package/dist/heroes/index.d.ts.map +1 -0
- package/dist/heroes/index.js +12 -0
- package/dist/heroes/index.js.map +1 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +49 -0
- package/dist/index.js.map +1 -0
- package/dist/layout/Footer.d.ts +3 -0
- package/dist/layout/Footer.d.ts.map +1 -0
- package/dist/layout/Footer.js +75 -0
- package/dist/layout/Footer.js.map +1 -0
- package/dist/layout/Navbar.d.ts +3 -0
- package/dist/layout/Navbar.d.ts.map +1 -0
- package/dist/layout/Navbar.js +81 -0
- package/dist/layout/Navbar.js.map +1 -0
- package/dist/layout/PromoTopBar.d.ts +3 -0
- package/dist/layout/PromoTopBar.d.ts.map +1 -0
- package/dist/layout/PromoTopBar.js +201 -0
- package/dist/layout/PromoTopBar.js.map +1 -0
- package/dist/layout/SectionDivider.d.ts +3 -0
- package/dist/layout/SectionDivider.d.ts.map +1 -0
- package/dist/layout/SectionDivider.js +13 -0
- package/dist/layout/SectionDivider.js.map +1 -0
- package/dist/layout/SectionTransition.d.ts +3 -0
- package/dist/layout/SectionTransition.d.ts.map +1 -0
- package/dist/layout/SectionTransition.js +60 -0
- package/dist/layout/SectionTransition.js.map +1 -0
- package/dist/layout/Ticker.d.ts +3 -0
- package/dist/layout/Ticker.d.ts.map +1 -0
- package/dist/layout/Ticker.js +32 -0
- package/dist/layout/Ticker.js.map +1 -0
- package/dist/layout/index.d.ts +6 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/index.js +6 -0
- package/dist/layout/index.js.map +1 -0
- package/dist/personalization/CartRecovery.d.ts +3 -0
- package/dist/personalization/CartRecovery.d.ts.map +1 -0
- package/dist/personalization/CartRecovery.js +224 -0
- package/dist/personalization/CartRecovery.js.map +1 -0
- package/dist/personalization/CohortTrustStack.d.ts +3 -0
- package/dist/personalization/CohortTrustStack.d.ts.map +1 -0
- package/dist/personalization/CohortTrustStack.js +101 -0
- package/dist/personalization/CohortTrustStack.js.map +1 -0
- package/dist/personalization/LiveActivityTicker.d.ts +3 -0
- package/dist/personalization/LiveActivityTicker.d.ts.map +1 -0
- package/dist/personalization/LiveActivityTicker.js +137 -0
- package/dist/personalization/LiveActivityTicker.js.map +1 -0
- package/dist/personalization/LoyaltyStatus.d.ts +3 -0
- package/dist/personalization/LoyaltyStatus.d.ts.map +1 -0
- package/dist/personalization/LoyaltyStatus.js +185 -0
- package/dist/personalization/LoyaltyStatus.js.map +1 -0
- package/dist/personalization/PersonalizedGreeting.d.ts +3 -0
- package/dist/personalization/PersonalizedGreeting.d.ts.map +1 -0
- package/dist/personalization/PersonalizedGreeting.js +176 -0
- package/dist/personalization/PersonalizedGreeting.js.map +1 -0
- package/dist/personalization/PersonalizedRecommendations.d.ts +3 -0
- package/dist/personalization/PersonalizedRecommendations.d.ts.map +1 -0
- package/dist/personalization/PersonalizedRecommendations.js +156 -0
- package/dist/personalization/PersonalizedRecommendations.js.map +1 -0
- package/dist/personalization/ProgressMilestone.d.ts +3 -0
- package/dist/personalization/ProgressMilestone.d.ts.map +1 -0
- package/dist/personalization/ProgressMilestone.js +127 -0
- package/dist/personalization/ProgressMilestone.js.map +1 -0
- package/dist/personalization/ReengagementBanner.d.ts +3 -0
- package/dist/personalization/ReengagementBanner.d.ts.map +1 -0
- package/dist/personalization/ReengagementBanner.js +185 -0
- package/dist/personalization/ReengagementBanner.js.map +1 -0
- package/dist/personalization/ScarcityIndicator.d.ts +3 -0
- package/dist/personalization/ScarcityIndicator.d.ts.map +1 -0
- package/dist/personalization/ScarcityIndicator.js +264 -0
- package/dist/personalization/ScarcityIndicator.js.map +1 -0
- package/dist/personalization/VipGate.d.ts +3 -0
- package/dist/personalization/VipGate.d.ts.map +1 -0
- package/dist/personalization/VipGate.js +309 -0
- package/dist/personalization/VipGate.js.map +1 -0
- package/dist/placeholder/UnknownComponent.d.ts +6 -0
- package/dist/placeholder/UnknownComponent.d.ts.map +1 -0
- package/dist/placeholder/UnknownComponent.js +5 -0
- package/dist/placeholder/UnknownComponent.js.map +1 -0
- package/dist/pricing/PricingCards.d.ts +3 -0
- package/dist/pricing/PricingCards.d.ts.map +1 -0
- package/dist/pricing/PricingCards.js +143 -0
- package/dist/pricing/PricingCards.js.map +1 -0
- package/dist/primitives/AspectBox.d.ts +12 -0
- package/dist/primitives/AspectBox.d.ts.map +1 -0
- package/dist/primitives/AspectBox.js +15 -0
- package/dist/primitives/AspectBox.js.map +1 -0
- package/dist/primitives/CursorSpotlight.d.ts +11 -0
- package/dist/primitives/CursorSpotlight.d.ts.map +1 -0
- package/dist/primitives/CursorSpotlight.js +21 -0
- package/dist/primitives/CursorSpotlight.js.map +1 -0
- package/dist/primitives/HeadlineEffect.d.ts +16 -0
- package/dist/primitives/HeadlineEffect.d.ts.map +1 -0
- package/dist/primitives/HeadlineEffect.js +187 -0
- package/dist/primitives/HeadlineEffect.js.map +1 -0
- package/dist/primitives/Marquee.d.ts +11 -0
- package/dist/primitives/Marquee.d.ts.map +1 -0
- package/dist/primitives/Marquee.js +22 -0
- package/dist/primitives/Marquee.js.map +1 -0
- package/dist/primitives/MediaFlip.d.ts +16 -0
- package/dist/primitives/MediaFlip.d.ts.map +1 -0
- package/dist/primitives/MediaFlip.js +118 -0
- package/dist/primitives/MediaFlip.js.map +1 -0
- package/dist/primitives/MediaLoop.d.ts +15 -0
- package/dist/primitives/MediaLoop.d.ts.map +1 -0
- package/dist/primitives/MediaLoop.js +31 -0
- package/dist/primitives/MediaLoop.js.map +1 -0
- package/dist/primitives/PDPGallery.d.ts +24 -0
- package/dist/primitives/PDPGallery.d.ts.map +1 -0
- package/dist/primitives/PDPGallery.js +128 -0
- package/dist/primitives/PDPGallery.js.map +1 -0
- package/dist/primitives/TiltCard.d.ts +12 -0
- package/dist/primitives/TiltCard.d.ts.map +1 -0
- package/dist/primitives/TiltCard.js +41 -0
- package/dist/primitives/TiltCard.js.map +1 -0
- package/dist/product/BundleBuilder.d.ts +3 -0
- package/dist/product/BundleBuilder.d.ts.map +1 -0
- package/dist/product/BundleBuilder.js +34 -0
- package/dist/product/BundleBuilder.js.map +1 -0
- package/dist/product/BuyBox.d.ts +3 -0
- package/dist/product/BuyBox.d.ts.map +1 -0
- package/dist/product/BuyBox.js +398 -0
- package/dist/product/BuyBox.js.map +1 -0
- package/dist/product/ComparisonTable.d.ts +3 -0
- package/dist/product/ComparisonTable.d.ts.map +1 -0
- package/dist/product/ComparisonTable.js +59 -0
- package/dist/product/ComparisonTable.js.map +1 -0
- package/dist/product/FormatGrid.d.ts +3 -0
- package/dist/product/FormatGrid.d.ts.map +1 -0
- package/dist/product/FormatGrid.js +28 -0
- package/dist/product/FormatGrid.js.map +1 -0
- package/dist/product/PDPVariants.d.ts +3 -0
- package/dist/product/PDPVariants.d.ts.map +1 -0
- package/dist/product/PDPVariants.js +284 -0
- package/dist/product/PDPVariants.js.map +1 -0
- package/dist/product/PillNav.d.ts +3 -0
- package/dist/product/PillNav.d.ts.map +1 -0
- package/dist/product/PillNav.js +35 -0
- package/dist/product/PillNav.js.map +1 -0
- package/dist/product/ProductAccordion.d.ts +3 -0
- package/dist/product/ProductAccordion.d.ts.map +1 -0
- package/dist/product/ProductAccordion.js +46 -0
- package/dist/product/ProductAccordion.js.map +1 -0
- package/dist/product/ProductCard.d.ts +62 -0
- package/dist/product/ProductCard.d.ts.map +1 -0
- package/dist/product/ProductCard.js +442 -0
- package/dist/product/ProductCard.js.map +1 -0
- package/dist/product/ProductCarousel.d.ts +3 -0
- package/dist/product/ProductCarousel.d.ts.map +1 -0
- package/dist/product/ProductCarousel.js +123 -0
- package/dist/product/ProductCarousel.js.map +1 -0
- package/dist/product/ProductCenteredStack.d.ts +3 -0
- package/dist/product/ProductCenteredStack.d.ts.map +1 -0
- package/dist/product/ProductCenteredStack.js +28 -0
- package/dist/product/ProductCenteredStack.js.map +1 -0
- package/dist/product/ProductGallery.d.ts +3 -0
- package/dist/product/ProductGallery.d.ts.map +1 -0
- package/dist/product/ProductGallery.js +80 -0
- package/dist/product/ProductGallery.js.map +1 -0
- package/dist/product/ProductGrid.d.ts +3 -0
- package/dist/product/ProductGrid.d.ts.map +1 -0
- package/dist/product/ProductGrid.js +58 -0
- package/dist/product/ProductGrid.js.map +1 -0
- package/dist/product/ProductHighlightLeft.d.ts +3 -0
- package/dist/product/ProductHighlightLeft.d.ts.map +1 -0
- package/dist/product/ProductHighlightLeft.js +37 -0
- package/dist/product/ProductHighlightLeft.js.map +1 -0
- package/dist/product/ProductHighlightRight.d.ts +3 -0
- package/dist/product/ProductHighlightRight.d.ts.map +1 -0
- package/dist/product/ProductHighlightRight.js +23 -0
- package/dist/product/ProductHighlightRight.js.map +1 -0
- package/dist/product/ProductPage.d.ts +3 -0
- package/dist/product/ProductPage.d.ts.map +1 -0
- package/dist/product/ProductPage.js +105 -0
- package/dist/product/ProductPage.js.map +1 -0
- package/dist/product/SubscriptionToggle.d.ts +3 -0
- package/dist/product/SubscriptionToggle.d.ts.map +1 -0
- package/dist/product/SubscriptionToggle.js +38 -0
- package/dist/product/SubscriptionToggle.js.map +1 -0
- package/dist/product/Upsell.d.ts +3 -0
- package/dist/product/Upsell.d.ts.map +1 -0
- package/dist/product/Upsell.js +59 -0
- package/dist/product/Upsell.js.map +1 -0
- package/dist/product/VideoCarousel.d.ts +3 -0
- package/dist/product/VideoCarousel.d.ts.map +1 -0
- package/dist/product/VideoCarousel.js +188 -0
- package/dist/product/VideoCarousel.js.map +1 -0
- package/dist/product/index.d.ts +8 -0
- package/dist/product/index.d.ts.map +1 -0
- package/dist/product/index.js +8 -0
- package/dist/product/index.js.map +1 -0
- package/dist/registry-field-schemas.d.ts +66 -0
- package/dist/registry-field-schemas.d.ts.map +1 -0
- package/dist/registry-field-schemas.js +745 -0
- package/dist/registry-field-schemas.js.map +1 -0
- package/dist/registry-metadata.d.ts +10 -0
- package/dist/registry-metadata.d.ts.map +1 -0
- package/dist/registry-metadata.js +2 -0
- package/dist/registry-metadata.js.map +1 -0
- package/dist/registry.d.ts +20 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +2317 -0
- package/dist/registry.js.map +1 -0
- package/dist/renderText.d.ts +6 -0
- package/dist/renderText.d.ts.map +1 -0
- package/dist/renderText.js +23 -0
- package/dist/renderText.js.map +1 -0
- package/dist/reviews/ReviewCarousel.d.ts +3 -0
- package/dist/reviews/ReviewCarousel.d.ts.map +1 -0
- package/dist/reviews/ReviewCarousel.js +24 -0
- package/dist/reviews/ReviewCarousel.js.map +1 -0
- package/dist/reviews/ReviewMasonry.d.ts +3 -0
- package/dist/reviews/ReviewMasonry.d.ts.map +1 -0
- package/dist/reviews/ReviewMasonry.js +25 -0
- package/dist/reviews/ReviewMasonry.js.map +1 -0
- package/dist/reviews/ReviewSpotlight.d.ts +3 -0
- package/dist/reviews/ReviewSpotlight.d.ts.map +1 -0
- package/dist/reviews/ReviewSpotlight.js +13 -0
- package/dist/reviews/ReviewSpotlight.js.map +1 -0
- package/dist/reviews/VideoTestimonials.d.ts +3 -0
- package/dist/reviews/VideoTestimonials.d.ts.map +1 -0
- package/dist/reviews/VideoTestimonials.js +35 -0
- package/dist/reviews/VideoTestimonials.js.map +1 -0
- package/dist/reviews/index.d.ts +4 -0
- package/dist/reviews/index.d.ts.map +1 -0
- package/dist/reviews/index.js +4 -0
- package/dist/reviews/index.js.map +1 -0
- package/dist/schemas/content.d.ts +125 -0
- package/dist/schemas/content.d.ts.map +1 -0
- package/dist/schemas/content.js +2 -0
- package/dist/schemas/content.js.map +1 -0
- package/dist/schemas/index.d.ts +3 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +2 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/settings.d.ts +23 -0
- package/dist/schemas/settings.d.ts.map +1 -0
- package/dist/schemas/settings.js +321 -0
- package/dist/schemas/settings.js.map +1 -0
- package/dist/social-proof/AvatarGroup.d.ts +3 -0
- package/dist/social-proof/AvatarGroup.d.ts.map +1 -0
- package/dist/social-proof/AvatarGroup.js +58 -0
- package/dist/social-proof/AvatarGroup.js.map +1 -0
- package/dist/social-proof/LogoCarousel.d.ts +3 -0
- package/dist/social-proof/LogoCarousel.d.ts.map +1 -0
- package/dist/social-proof/LogoCarousel.js +49 -0
- package/dist/social-proof/LogoCarousel.js.map +1 -0
- package/dist/social-proof/LogoStrip.d.ts +3 -0
- package/dist/social-proof/LogoStrip.d.ts.map +1 -0
- package/dist/social-proof/LogoStrip.js +35 -0
- package/dist/social-proof/LogoStrip.js.map +1 -0
- package/dist/social-proof/PressMentions.d.ts +3 -0
- package/dist/social-proof/PressMentions.d.ts.map +1 -0
- package/dist/social-proof/PressMentions.js +40 -0
- package/dist/social-proof/PressMentions.js.map +1 -0
- package/dist/social-proof/StatsGrid.d.ts +3 -0
- package/dist/social-proof/StatsGrid.d.ts.map +1 -0
- package/dist/social-proof/StatsGrid.js +39 -0
- package/dist/social-proof/StatsGrid.js.map +1 -0
- package/dist/social-proof/TrustBadges.d.ts +3 -0
- package/dist/social-proof/TrustBadges.d.ts.map +1 -0
- package/dist/social-proof/TrustBadges.js +18 -0
- package/dist/social-proof/TrustBadges.js.map +1 -0
- package/dist/social-proof/index.d.ts +4 -0
- package/dist/social-proof/index.d.ts.map +1 -0
- package/dist/social-proof/index.js +4 -0
- package/dist/social-proof/index.js.map +1 -0
- package/dist/text-effects/TextEffect.d.ts +3 -0
- package/dist/text-effects/TextEffect.d.ts.map +1 -0
- package/dist/text-effects/TextEffect.js +277 -0
- package/dist/text-effects/TextEffect.js.map +1 -0
- package/dist/theme/resolve.d.ts +12 -0
- package/dist/theme/resolve.d.ts.map +1 -0
- package/dist/theme/resolve.js +26 -0
- package/dist/theme/resolve.js.map +1 -0
- package/dist/theme/tokens.d.ts +147 -0
- package/dist/theme/tokens.d.ts.map +1 -0
- package/dist/theme/tokens.js +113 -0
- package/dist/theme/tokens.js.map +1 -0
- package/dist/types.d.ts +154 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/elementStyles.d.ts +4 -0
- package/dist/utils/elementStyles.d.ts.map +1 -0
- package/dist/utils/elementStyles.js +6 -0
- package/dist/utils/elementStyles.js.map +1 -0
- package/dist/utils/icon-map.d.ts +128 -0
- package/dist/utils/icon-map.d.ts.map +1 -0
- package/dist/utils/icon-map.js +199 -0
- package/dist/utils/icon-map.js.map +1 -0
- package/dist/utils/imageStyle.d.ts +4 -0
- package/dist/utils/imageStyle.d.ts.map +1 -0
- package/dist/utils/imageStyle.js +23 -0
- package/dist/utils/imageStyle.js.map +1 -0
- package/dist/utils/renderIcon.d.ts +32 -0
- package/dist/utils/renderIcon.d.ts.map +1 -0
- package/dist/utils/renderIcon.js +188 -0
- package/dist/utils/renderIcon.js.map +1 -0
- package/dist/utils/schemaUtils.d.ts +9 -0
- package/dist/utils/schemaUtils.d.ts.map +1 -0
- package/dist/utils/schemaUtils.js +10 -0
- package/dist/utils/schemaUtils.js.map +1 -0
- package/dist/value-props/HowItWorks.d.ts +3 -0
- package/dist/value-props/HowItWorks.d.ts.map +1 -0
- package/dist/value-props/HowItWorks.js +23 -0
- package/dist/value-props/HowItWorks.js.map +1 -0
- package/dist/value-props/NumberedList.d.ts +3 -0
- package/dist/value-props/NumberedList.d.ts.map +1 -0
- package/dist/value-props/NumberedList.js +22 -0
- package/dist/value-props/NumberedList.js.map +1 -0
- package/dist/value-props/ValuePropsAlternating.d.ts +3 -0
- package/dist/value-props/ValuePropsAlternating.d.ts.map +1 -0
- package/dist/value-props/ValuePropsAlternating.js +22 -0
- package/dist/value-props/ValuePropsAlternating.js.map +1 -0
- package/dist/value-props/ValuePropsGrid.d.ts +3 -0
- package/dist/value-props/ValuePropsGrid.d.ts.map +1 -0
- package/dist/value-props/ValuePropsGrid.js +23 -0
- package/dist/value-props/ValuePropsGrid.js.map +1 -0
- package/dist/value-props/ValuePropsIconStrip.d.ts +3 -0
- package/dist/value-props/ValuePropsIconStrip.d.ts.map +1 -0
- package/dist/value-props/ValuePropsIconStrip.js +11 -0
- package/dist/value-props/ValuePropsIconStrip.js.map +1 -0
- package/dist/value-props/index.d.ts +6 -0
- package/dist/value-props/index.d.ts.map +1 -0
- package/dist/value-props/index.js +6 -0
- package/dist/value-props/index.js.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
|
+
import { renderText } from "../renderText";
|
|
4
|
+
import { elStyle } from "../utils/elementStyles";
|
|
5
|
+
export default function UrgencyCta({ content, variant, theme, elementStyles }) {
|
|
6
|
+
const message = renderText(content.message);
|
|
7
|
+
const countdownEnd = renderText(content.countdown_end);
|
|
8
|
+
const stockCount = parseInt(renderText(content.stock_count)) || 0;
|
|
9
|
+
const stockMax = parseInt(renderText(content.stock_max)) || 100;
|
|
10
|
+
const activityCount = renderText(content.activity_count);
|
|
11
|
+
const activityLabel = renderText(content.activity_label);
|
|
12
|
+
const ctaText = renderText(content.cta_text);
|
|
13
|
+
const ctaUrl = renderText(content.cta_url);
|
|
14
|
+
const accent = theme.palette.accent;
|
|
15
|
+
const surface = theme.palette.surface;
|
|
16
|
+
const textColor = theme.palette.text;
|
|
17
|
+
if (variant === "countdown_bar") {
|
|
18
|
+
const [timeLeft, setTimeLeft] = useState({ days: 0, hours: 0, mins: 0, secs: 0 });
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
function compute() {
|
|
21
|
+
const end = new Date(countdownEnd).getTime();
|
|
22
|
+
const now = new Date().getTime();
|
|
23
|
+
const diff = Math.max(0, end - now);
|
|
24
|
+
const days = Math.floor(diff / 86400000);
|
|
25
|
+
const hours = Math.floor((diff % 86400000) / 3600000);
|
|
26
|
+
const mins = Math.floor((diff % 3600000) / 60000);
|
|
27
|
+
const secs = Math.floor((diff % 60000) / 1000);
|
|
28
|
+
setTimeLeft({ days, hours, mins, secs });
|
|
29
|
+
}
|
|
30
|
+
compute();
|
|
31
|
+
const t = setInterval(compute, 1000);
|
|
32
|
+
return () => clearInterval(t);
|
|
33
|
+
}, [countdownEnd]);
|
|
34
|
+
const units = [
|
|
35
|
+
{ label: "Days", value: timeLeft.days },
|
|
36
|
+
{ label: "Hours", value: timeLeft.hours },
|
|
37
|
+
{ label: "Mins", value: timeLeft.mins },
|
|
38
|
+
{ label: "Secs", value: timeLeft.secs },
|
|
39
|
+
];
|
|
40
|
+
return (_jsxs("section", { style: { backgroundColor: accent, padding: "var(--lx-urgencycta-section-padding-y, var(--lx-space-2xl)) var(--lx-urgencycta-section-padding-x, var(--lx-space-5))", textAlign: "center" }, children: [message && _jsx("p", { "data-lx-field": "message", style: { fontFamily: theme.fonts.body, color: "#fff", fontSize: "1.125rem", marginBottom: "var(--lx-urgencycta-message-margin-bottom, var(--lx-space-lg))", ...elStyle(elementStyles, "message") }, children: message }), _jsx("div", { style: { display: "flex", gap: "var(--lx-urgencycta-units-gap, var(--lx-space-md))", justifyContent: "center", flexWrap: "wrap" }, children: units.map((u) => (_jsxs("div", { style: { backgroundColor: "rgba(0,0,0,0.2)", borderRadius: "var(--lx-urgencycta-unit-radius, var(--lx-radius-lg))", padding: "var(--lx-urgencycta-unit-padding-y, var(--lx-space-md)) var(--lx-urgencycta-unit-padding-x, var(--lx-space-lg))", minWidth: "80px" }, children: [_jsx("div", { style: { fontFamily: "monospace", fontSize: "2rem", fontWeight: 700, color: "#fff" }, children: String(u.value).padStart(2, "0") }), _jsx("div", { style: { color: "rgba(255,255,255,0.7)", fontSize: "0.75rem", textTransform: "uppercase", letterSpacing: "0.1em" }, children: u.label })] }, u.label))) }), ctaText && (_jsx("a", { href: ctaUrl || "#", style: { textDecoration: "none" }, children: _jsx("button", { style: {
|
|
41
|
+
marginTop: "28px",
|
|
42
|
+
backgroundColor: "#fff",
|
|
43
|
+
color: accent,
|
|
44
|
+
border: "none",
|
|
45
|
+
borderRadius: "var(--lx-urgencycta-cta-radius, var(--lx-radius-md))",
|
|
46
|
+
padding: "var(--lx-urgencycta-cta-padding-y, var(--lx-space-3)) var(--lx-urgencycta-cta-padding-x, var(--lx-space-xl))",
|
|
47
|
+
fontFamily: theme.fonts.body,
|
|
48
|
+
fontWeight: 700,
|
|
49
|
+
fontSize: "1rem",
|
|
50
|
+
cursor: "pointer",
|
|
51
|
+
...elStyle(elementStyles, "cta_text"),
|
|
52
|
+
}, "data-lx-field": "cta_text", children: ctaText }) }))] }));
|
|
53
|
+
}
|
|
54
|
+
if (variant === "stock_scarcity") {
|
|
55
|
+
const pct = Math.min(100, Math.max(0, (stockCount / stockMax) * 100));
|
|
56
|
+
const barColor = stockCount < 5 ? "#ef4444" : accent;
|
|
57
|
+
return (_jsxs("section", { style: { backgroundColor: surface, padding: "var(--lx-urgencycta-section-padding-y, var(--lx-space-xl)) var(--lx-urgencycta-section-padding-x, var(--lx-space-5))", textAlign: "center" }, children: [_jsxs("p", { style: { fontFamily: theme.fonts.body, fontWeight: 700, color: textColor, fontSize: "1.1rem", marginBottom: "var(--lx-urgencycta-message-margin-bottom, var(--lx-space-md))" }, children: ["Only ", _jsx("span", { style: { color: barColor }, children: stockCount }), " left in stock"] }), _jsx("div", { style: { width: "100%", maxWidth: "400px", margin: "0 auto", backgroundColor: "#e5e7eb", borderRadius: "var(--lx-urgencycta-bar-radius, var(--lx-radius-full))", height: "8px" }, children: _jsx("div", { style: { backgroundColor: barColor, height: "8px", borderRadius: "var(--lx-urgencycta-bar-radius, var(--lx-radius-full))", width: `${pct}%`, transition: "width 1s ease" } }) }), activityCount && activityLabel && (_jsxs("p", { "data-lx-field": "activity_label", style: { fontFamily: theme.fonts.body, color: textColor, opacity: 0.6, fontSize: "0.875rem", marginTop: "var(--lx-urgencycta-activity-margin-top, var(--lx-space-3))", ...elStyle(elementStyles, "activity_label") }, children: [activityCount, " ", activityLabel] })), ctaText && (_jsx("a", { href: ctaUrl || "#", style: { textDecoration: "none" }, children: _jsx("button", { "data-lx-field": "cta_text", style: { marginTop: "var(--lx-urgencycta-cta-margin-top, var(--lx-space-5))", backgroundColor: accent, color: "#fff", border: "none", borderRadius: "var(--lx-urgencycta-cta-radius, var(--lx-radius-md))", padding: "var(--lx-urgencycta-cta-padding-y, var(--lx-space-3)) var(--lx-urgencycta-cta-padding-x, var(--lx-space-xl))", fontFamily: theme.fonts.body, fontWeight: 700, fontSize: "1rem", cursor: "pointer", ...elStyle(elementStyles, "cta_text") }, children: ctaText }) }))] }));
|
|
58
|
+
}
|
|
59
|
+
if (variant === "social_urgency") {
|
|
60
|
+
const [displayCount, setDisplayCount] = useState(0);
|
|
61
|
+
const target = parseInt(activityCount) || 0;
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
if (target === 0)
|
|
64
|
+
return;
|
|
65
|
+
const increment = Math.ceil(target / 30);
|
|
66
|
+
const t = setInterval(() => {
|
|
67
|
+
setDisplayCount((prev) => {
|
|
68
|
+
const next = prev + increment;
|
|
69
|
+
if (next >= target) {
|
|
70
|
+
clearInterval(t);
|
|
71
|
+
return target;
|
|
72
|
+
}
|
|
73
|
+
return next;
|
|
74
|
+
});
|
|
75
|
+
}, 50);
|
|
76
|
+
return () => clearInterval(t);
|
|
77
|
+
}, [target]);
|
|
78
|
+
return (_jsxs("section", { style: { backgroundColor: surface, padding: "var(--lx-urgencycta-section-padding-y, var(--lx-space-xl)) var(--lx-urgencycta-section-padding-x, var(--lx-space-5))", textAlign: "center" }, children: [_jsx("style", { children: `
|
|
79
|
+
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
|
|
80
|
+
` }), _jsxs("div", { style: { animation: "fadeInUp 0.5s ease" }, children: [_jsxs("p", { "data-lx-field": "activity_label", style: { fontFamily: theme.fonts.display, fontSize: "1.5rem", fontWeight: 700, color: textColor, ...elStyle(elementStyles, "activity_label") }, children: ["\uD83D\uDD25 ", displayCount, " ", activityLabel] }), message && _jsx("p", { "data-lx-field": "message", style: { fontFamily: theme.fonts.body, color: textColor, opacity: 0.7, marginTop: "var(--lx-urgencycta-message-margin-top, var(--lx-space-sm))", ...elStyle(elementStyles, "message") }, children: message }), ctaText && (_jsx("a", { href: ctaUrl || "#", style: { textDecoration: "none" }, children: _jsx("button", { "data-lx-field": "cta_text", style: { marginTop: "var(--lx-urgencycta-cta-margin-top, var(--lx-space-5))", backgroundColor: accent, color: "#fff", border: "none", borderRadius: "var(--lx-urgencycta-cta-radius, var(--lx-radius-md))", padding: "var(--lx-urgencycta-cta-padding-y, var(--lx-space-3)) var(--lx-urgencycta-cta-padding-x, var(--lx-space-xl))", fontFamily: theme.fonts.body, fontWeight: 700, fontSize: "1rem", cursor: "pointer", ...elStyle(elementStyles, "cta_text") }, children: ctaText }) }))] })] }));
|
|
81
|
+
}
|
|
82
|
+
// fallback
|
|
83
|
+
return (_jsx("section", { style: { backgroundColor: surface, padding: "var(--lx-urgencycta-section-padding-y, var(--lx-space-xl)) var(--lx-urgencycta-section-padding-x, var(--lx-space-5))", textAlign: "center" }, children: _jsx("p", { "data-lx-field": "message", style: { fontFamily: theme.fonts.body, color: textColor, ...elStyle(elementStyles, "message") }, children: message }) }));
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=UrgencyCta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UrgencyCta.js","sourceRoot":"","sources":["../../src/cta/UrgencyCta.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAkB;IAC3F,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5C,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACvD,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC;IAClE,MAAM,QAAQ,GAAG,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,IAAI,GAAG,CAAC;IAChE,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IACzD,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;I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CAAC;IAED,WAAW;IACX,OAAO,CACL,kBAAS,KAAK,EAAE,EAAE,eAAe,EAAE,OAAO,EAAE,OAAO,EAAE,sHAAsH,EAAE,SAAS,EAAE,QAAQ,EAAE,YAChM,6BAAiB,SAAS,EAAC,KAAK,EAAE,EAAE,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,aAAa,EAAE,SAAS,CAAC,EAAE,YAAG,OAAO,GAAK,GACjI,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WaitlistCta.d.ts","sourceRoot":"","sources":["../../src/cta/WaitlistCta.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAI/C,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,cAAc,2CA2I7F"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { renderText } from "../renderText";
|
|
4
|
+
import { elStyle } from "../utils/elementStyles";
|
|
5
|
+
export default function WaitlistCta({ content, variant, theme, elementStyles }) {
|
|
6
|
+
const heading = renderText(content.heading);
|
|
7
|
+
const subhead = renderText(content.subhead);
|
|
8
|
+
const placeholder = renderText(content.placeholder) || "Enter your email";
|
|
9
|
+
const ctaText = renderText(content.cta_text) || "Join Waitlist";
|
|
10
|
+
const positionNumber = renderText(content.position_number) || "1,247";
|
|
11
|
+
const accent = theme.palette.accent;
|
|
12
|
+
const surface = theme.palette.surface;
|
|
13
|
+
const textColor = theme.palette.text;
|
|
14
|
+
const border = theme.palette.border ?? "#e5e7eb";
|
|
15
|
+
const [email, setEmail] = useState("");
|
|
16
|
+
const [submitted, setSubmitted] = useState(false);
|
|
17
|
+
function handleSubmit(e) {
|
|
18
|
+
e.preventDefault();
|
|
19
|
+
setSubmitted(true);
|
|
20
|
+
}
|
|
21
|
+
if (variant === "simple") {
|
|
22
|
+
return (_jsxs("section", { style: { backgroundColor: theme.palette.bg, padding: "var(--lx-waitlistcta-padding-y, var(--lx-space-2xl)) var(--lx-waitlistcta-padding-x, var(--lx-space-5))", textAlign: "center" }, children: [_jsx("style", { children: `
|
|
23
|
+
@keyframes popIn {
|
|
24
|
+
from { opacity: 0; transform: scale(0.8); }
|
|
25
|
+
to { opacity: 1; transform: scale(1); }
|
|
26
|
+
}
|
|
27
|
+
` }), heading && _jsx("h2", { "data-lx-field": "heading", style: { fontFamily: theme.fonts.display, color: textColor, fontSize: "2rem", fontWeight: 700, marginBottom: "var(--lx-waitlistcta-heading-margin-bottom, var(--lx-space-3))", ...elStyle(elementStyles, "heading") }, children: heading }), subhead && _jsx("p", { "data-lx-field": "subhead", style: { fontFamily: theme.fonts.body, color: textColor, opacity: 0.7, fontSize: "1.1rem", marginBottom: "28px", ...elStyle(elementStyles, "subhead") }, children: subhead }), submitted ? (_jsx("div", { style: { animation: "popIn 0.4s ease", display: "inline-block", backgroundColor: surface, border: `1px solid ${border}`, borderRadius: "var(--lx-waitlistcta-card-radius, var(--lx-radius-lg))", padding: "var(--lx-waitlistcta-card-padding-y, var(--lx-space-5)) var(--lx-waitlistcta-card-padding-x, var(--lx-space-xl))" }, children: _jsx("p", { style: { fontFamily: theme.fonts.body, color: textColor, fontSize: "1.1rem" }, children: "You're on the list! \u2713 We'll let you know when we're ready." }) })) : (_jsxs("form", { onSubmit: handleSubmit, style: { display: "flex", gap: "var(--lx-waitlistcta-form-gap, var(--lx-space-3))", justifyContent: "center", flexWrap: "wrap", maxWidth: "480px", margin: "0 auto" }, children: [_jsx("input", { type: "email", required: true, value: email, onChange: (e) => setEmail(e.target.value), placeholder: placeholder, style: {
|
|
28
|
+
flex: 1,
|
|
29
|
+
minWidth: "220px",
|
|
30
|
+
padding: "var(--lx-waitlistcta-input-padding-y, var(--lx-space-3)) var(--lx-waitlistcta-input-padding-x, var(--lx-space-md))",
|
|
31
|
+
border: `1px solid ${border}`,
|
|
32
|
+
borderRadius: "var(--lx-waitlistcta-input-radius, var(--lx-radius-md))",
|
|
33
|
+
fontFamily: theme.fonts.body,
|
|
34
|
+
fontSize: "1rem",
|
|
35
|
+
backgroundColor: surface,
|
|
36
|
+
color: textColor,
|
|
37
|
+
outline: "none",
|
|
38
|
+
} }), _jsx("button", { "data-lx-field": "cta_text", type: "submit", style: { backgroundColor: accent, color: "#fff", border: "none", borderRadius: "var(--lx-waitlistcta-cta-radius, var(--lx-radius-md))", padding: "var(--lx-waitlistcta-cta-padding-y, var(--lx-space-3)) var(--lx-waitlistcta-cta-padding-x, var(--lx-space-lg))", fontFamily: theme.fonts.body, fontWeight: 700, fontSize: "1rem", cursor: "pointer", ...elStyle(elementStyles, "cta_text") }, children: ctaText })] }))] }));
|
|
39
|
+
}
|
|
40
|
+
if (variant === "with_position") {
|
|
41
|
+
return (_jsxs("section", { style: { backgroundColor: theme.palette.bg, padding: "var(--lx-waitlistcta-padding-y, var(--lx-space-2xl)) var(--lx-waitlistcta-padding-x, var(--lx-space-5))", textAlign: "center" }, children: [_jsx("style", { children: `
|
|
42
|
+
@keyframes popIn {
|
|
43
|
+
from { opacity: 0; transform: scale(0.8); }
|
|
44
|
+
to { opacity: 1; transform: scale(1); }
|
|
45
|
+
}
|
|
46
|
+
` }), heading && _jsx("h2", { "data-lx-field": "heading", style: { fontFamily: theme.fonts.display, color: textColor, fontSize: "2rem", fontWeight: 700, marginBottom: "var(--lx-waitlistcta-heading-margin-bottom, var(--lx-space-3))", ...elStyle(elementStyles, "heading") }, children: heading }), subhead && _jsx("p", { "data-lx-field": "subhead", style: { fontFamily: theme.fonts.body, color: textColor, opacity: 0.7, fontSize: "1.1rem", marginBottom: "28px", ...elStyle(elementStyles, "subhead") }, children: subhead }), submitted ? (_jsxs("div", { style: { animation: "popIn 0.4s ease", display: "inline-block", maxWidth: "480px" }, children: [_jsxs("p", { style: { fontFamily: theme.fonts.body, color: textColor, fontSize: "1.25rem", fontWeight: 700, marginBottom: "var(--lx-waitlistcta-position-margin-bottom, var(--lx-space-md))" }, children: ["You're #", positionNumber, " on the waitlist \uD83C\uDF89"] }), _jsx("div", { style: { width: "100%", backgroundColor: surface, border: `1px solid ${border}`, borderRadius: "var(--lx-waitlistcta-bar-radius, var(--lx-radius-full))", height: "var(--lx-space-sm)" }, children: _jsx("div", { style: { backgroundColor: accent, height: "var(--lx-space-sm)", borderRadius: "var(--lx-waitlistcta-bar-radius, var(--lx-radius-full))", width: "8%", transition: "width 1s ease" } }) }), _jsx("p", { style: { fontFamily: theme.fonts.body, color: textColor, opacity: 0.5, fontSize: "0.8rem", marginTop: "var(--lx-waitlistcta-hint-margin-top, var(--lx-space-sm))" }, children: "Almost there \u2014 we're opening spots soon" })] })) : (_jsxs("form", { onSubmit: handleSubmit, style: { display: "flex", gap: "var(--lx-waitlistcta-form-gap, var(--lx-space-3))", justifyContent: "center", flexWrap: "wrap", maxWidth: "480px", margin: "0 auto" }, children: [_jsx("input", { type: "email", required: true, value: email, onChange: (e) => setEmail(e.target.value), placeholder: placeholder, style: {
|
|
47
|
+
flex: 1,
|
|
48
|
+
minWidth: "220px",
|
|
49
|
+
padding: "var(--lx-waitlistcta-input-padding-y, var(--lx-space-3)) var(--lx-waitlistcta-input-padding-x, var(--lx-space-md))",
|
|
50
|
+
border: `1px solid ${border}`,
|
|
51
|
+
borderRadius: "var(--lx-waitlistcta-input-radius, var(--lx-radius-md))",
|
|
52
|
+
fontFamily: theme.fonts.body,
|
|
53
|
+
fontSize: "1rem",
|
|
54
|
+
backgroundColor: surface,
|
|
55
|
+
color: textColor,
|
|
56
|
+
outline: "none",
|
|
57
|
+
} }), _jsx("button", { "data-lx-field": "cta_text", type: "submit", style: { backgroundColor: accent, color: "#fff", border: "none", borderRadius: "var(--lx-waitlistcta-cta-radius, var(--lx-radius-md))", padding: "var(--lx-waitlistcta-cta-padding-y, var(--lx-space-3)) var(--lx-waitlistcta-cta-padding-x, var(--lx-space-lg))", fontFamily: theme.fonts.body, fontWeight: 700, fontSize: "1rem", cursor: "pointer", ...elStyle(elementStyles, "cta_text") }, children: ctaText })] }))] }));
|
|
58
|
+
}
|
|
59
|
+
// fallback: simple
|
|
60
|
+
return (_jsxs("section", { style: { backgroundColor: theme.palette.bg, padding: "var(--lx-waitlistcta-padding-y, var(--lx-space-2xl)) var(--lx-waitlistcta-padding-x, var(--lx-space-5))", textAlign: "center" }, children: [heading && _jsx("h2", { "data-lx-field": "heading", style: { fontFamily: theme.fonts.display, color: textColor, fontSize: "2rem", fontWeight: 700, marginBottom: "28px", ...elStyle(elementStyles, "heading") }, children: heading }), _jsxs("form", { onSubmit: handleSubmit, style: { display: "flex", gap: "var(--lx-waitlistcta-form-gap, var(--lx-space-3))", justifyContent: "center", flexWrap: "wrap", maxWidth: "480px", margin: "0 auto" }, children: [_jsx("input", { type: "email", required: true, value: email, onChange: (e) => setEmail(e.target.value), placeholder: placeholder, style: { flex: 1, minWidth: "220px", padding: "var(--lx-waitlistcta-input-padding-y, var(--lx-space-3)) var(--lx-waitlistcta-input-padding-x, var(--lx-space-md))", border: `1px solid ${border}`, borderRadius: "var(--lx-waitlistcta-input-radius, var(--lx-radius-md))", fontFamily: theme.fonts.body, fontSize: "1rem", backgroundColor: surface, color: textColor, outline: "none" } }), _jsx("button", { "data-lx-field": "cta_text", type: "submit", style: { backgroundColor: accent, color: "#fff", border: "none", borderRadius: "var(--lx-waitlistcta-cta-radius, var(--lx-radius-md))", padding: "var(--lx-waitlistcta-cta-padding-y, var(--lx-space-3)) var(--lx-waitlistcta-cta-padding-x, var(--lx-space-lg))", fontFamily: theme.fonts.body, fontWeight: 700, fontSize: "1rem", cursor: "pointer", ...elStyle(elementStyles, "cta_text") }, children: ctaText })] })] }));
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=W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,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,GACzX,EACF,kCAAsB,UAAU,EAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,uDAAuD,EAAE,OAAO,EAAE,gHAAgH,EAAE,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,aAAa,EAAE,UAAU,CAAC,EAAE,YAC1a,OAAO,GACD,IACJ,IACC,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cta/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cta/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface AnimatedBackgroundParams {
|
|
2
|
+
amplitude?: number;
|
|
3
|
+
layerCount?: number;
|
|
4
|
+
density?: number;
|
|
5
|
+
minRadius?: number;
|
|
6
|
+
maxRadius?: number;
|
|
7
|
+
filled?: boolean;
|
|
8
|
+
blur?: number;
|
|
9
|
+
stepCount?: number;
|
|
10
|
+
opacity?: number;
|
|
11
|
+
motion?: "bounce" | "drift" | "breathe" | "equalizer";
|
|
12
|
+
}
|
|
13
|
+
export interface AnimatedBackgroundProps {
|
|
14
|
+
type: string;
|
|
15
|
+
colors?: string[];
|
|
16
|
+
opacity?: number;
|
|
17
|
+
speed?: "slow" | "normal" | "fast";
|
|
18
|
+
position?: "top" | "bottom" | "full" | "left" | "right" | "diagonal-tl" | "diagonal-tr" | "diagonal-bl" | "diagonal-br";
|
|
19
|
+
params?: AnimatedBackgroundParams;
|
|
20
|
+
}
|
|
21
|
+
export declare function AnimatedBackground({ type, colors, opacity, speed, position, params, }: AnimatedBackgroundProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=AnimatedBackground.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnimatedBackground.d.ts","sourceRoot":"","sources":["../../src/effects/AnimatedBackground.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,wBAAwB;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;CACvD;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;IACnC,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,aAAa,GAAG,aAAa,GAAG,aAAa,GAAG,aAAa,CAAC;IACxH,MAAM,CAAC,EAAE,wBAAwB,CAAC;CACnC;AA8YD,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,MAAW,EACX,OAAW,EACX,KAAgB,EAChB,QAAmB,EACnB,MAAW,GACZ,EAAE,uBAAuB,2CAmFzB"}
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
const SPEED_MS = { slow: 18000, normal: 10000, fast: 5000 };
|
|
3
|
+
// ─── Smooth Wave — SMIL path morph (only d= morphing, no child animate issues) ─
|
|
4
|
+
function SmoothWave({ colors, speedMs, position, params }) {
|
|
5
|
+
const c0 = colors[0] ?? "#6366f1";
|
|
6
|
+
const c1 = colors[1] ?? c0;
|
|
7
|
+
const gid = `sw-g-${speedMs}`;
|
|
8
|
+
const amp = Math.round(80 * (params.amplitude ?? 1));
|
|
9
|
+
const isTop = position === "top";
|
|
10
|
+
const H = 320;
|
|
11
|
+
// Wider viewBox so wave can scroll without gaps — 3x width
|
|
12
|
+
const W = 4320;
|
|
13
|
+
const uid = `sw${speedMs}`;
|
|
14
|
+
// Build one repeating wave tile (3 cycles across W)
|
|
15
|
+
const makeD = (a, phase) => {
|
|
16
|
+
const seg = 480; // one wave cycle width
|
|
17
|
+
const cycles = W / seg;
|
|
18
|
+
let d = isTop ? `M0,0 ` : `M0,${H} `;
|
|
19
|
+
for (let i = 0; i <= cycles; i++) {
|
|
20
|
+
const x0 = i * seg;
|
|
21
|
+
const x1 = x0 + seg / 2;
|
|
22
|
+
const x2 = x0 + seg;
|
|
23
|
+
const yPeak = isTop ? a * (1 + Math.sin(i * 0.7 + phase) * 0.3) : H - a * (1 + Math.sin(i * 0.7 + phase) * 0.3);
|
|
24
|
+
const yTrough = isTop ? a * 0.2 : H - a * 0.2;
|
|
25
|
+
d += `C${x0 + seg * 0.25},${yPeak} ${x0 + seg * 0.75},${yTrough} ${x2},${(yPeak + yTrough) / 2} `;
|
|
26
|
+
}
|
|
27
|
+
d += isTop ? `L${W},0 L0,0 Z` : `L${W},${H} L0,${H} Z`;
|
|
28
|
+
return d;
|
|
29
|
+
};
|
|
30
|
+
const d1 = makeD(amp, 0);
|
|
31
|
+
const d2 = makeD(amp * 1.15, 0.4);
|
|
32
|
+
const d3 = makeD(amp * 0.9, 0.8);
|
|
33
|
+
// Layer 2 — slightly different amplitude, offset start
|
|
34
|
+
const d1b = makeD(amp * 0.7, 1.2);
|
|
35
|
+
const d2b = makeD(amp * 0.85, 1.6);
|
|
36
|
+
const css = `
|
|
37
|
+
@keyframes ${uid}-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-${W / 3}px); } }
|
|
38
|
+
@keyframes ${uid}-scroll2 { 0% { transform: translateX(-${W / 6}px); } 100% { transform: translateX(-${W / 3 + W / 6}px); } }
|
|
39
|
+
.${uid}-l1 { animation: ${uid}-scroll ${speedMs}ms linear infinite; }
|
|
40
|
+
.${uid}-l2 { animation: ${uid}-scroll2 ${speedMs * 1.4}ms linear infinite; }
|
|
41
|
+
`;
|
|
42
|
+
return (_jsxs("svg", { viewBox: `0 0 1440 ${H}`, xmlns: "http://www.w3.org/2000/svg", preserveAspectRatio: "none", style: { width: "100%", height: "100%", display: "block", overflow: "hidden" }, children: [_jsxs("defs", { children: [_jsxs("linearGradient", { id: gid, x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [_jsx("stop", { offset: "0%", stopColor: c0 }), _jsx("stop", { offset: "100%", stopColor: c1 })] }), _jsxs("linearGradient", { id: `${gid}b`, x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [_jsx("stop", { offset: "0%", stopColor: c1, stopOpacity: "0.5" }), _jsx("stop", { offset: "100%", stopColor: c0, stopOpacity: "0.5" })] }), _jsx("style", { children: css })] }), _jsx("g", { className: `${uid}-l2`, style: { transformBox: "fill-box" }, children: _jsx("path", { d: d1b, fill: `url(#${gid}b)`, vectorEffect: "non-scaling-stroke", children: _jsx("animate", { attributeName: "d", values: `${d1b};${d2b};${d1b}`, dur: `${speedMs * 2}ms`, repeatCount: "indefinite", calcMode: "spline", keySplines: "0.45 0 0.55 1; 0.45 0 0.55 1" }) }) }), _jsx("g", { className: `${uid}-l1`, style: { transformBox: "fill-box" }, children: _jsx("path", { d: d1, fill: `url(#${gid})`, vectorEffect: "non-scaling-stroke", children: _jsx("animate", { attributeName: "d", values: `${d1};${d2};${d3};${d1}`, dur: `${speedMs * 1.5}ms`, repeatCount: "indefinite", calcMode: "spline", keySplines: "0.45 0 0.55 1; 0.45 0 0.55 1; 0.45 0 0.55 1" }) }) })] }));
|
|
43
|
+
}
|
|
44
|
+
// ─── Stepped Wave — CSS keyframes per bar, staggered ─────────────────────────
|
|
45
|
+
function SteppedWave({ colors, speedMs, position, params }) {
|
|
46
|
+
const c0 = colors[0] ?? "#3b82f6";
|
|
47
|
+
const c1 = colors[1] ?? c0;
|
|
48
|
+
const gid = `stw-g-${speedMs}`;
|
|
49
|
+
const isTop = position === "top";
|
|
50
|
+
const W = 1440;
|
|
51
|
+
const H = 320;
|
|
52
|
+
const count = Math.max(4, Math.min(32, params.stepCount ?? 16));
|
|
53
|
+
const amp = Math.round(160 * (params.amplitude ?? 1));
|
|
54
|
+
const motion = params.motion ?? "equalizer";
|
|
55
|
+
const segW = Math.ceil(W / count);
|
|
56
|
+
const uid = `stw${speedMs}`;
|
|
57
|
+
const bars = Array.from({ length: count }, (_, i) => {
|
|
58
|
+
const h = Math.round(amp * (0.3 + 0.7 * Math.abs(Math.sin(i * 2.3 + 1))));
|
|
59
|
+
const hAlt = Math.round(amp * (0.3 + 0.7 * Math.abs(Math.sin(i * 2.3 + 1 + Math.PI * 0.6))));
|
|
60
|
+
return { x: i * segW, h, hAlt, delay: (i / count) * (speedMs * 0.5) };
|
|
61
|
+
});
|
|
62
|
+
const css = (motion === "equalizer" || motion === "bounce")
|
|
63
|
+
? bars.map((b, i) => {
|
|
64
|
+
const fromH = b.h;
|
|
65
|
+
const toH = b.hAlt;
|
|
66
|
+
const fromY = isTop ? 0 : H - fromH;
|
|
67
|
+
const toY = isTop ? 0 : H - toH;
|
|
68
|
+
return `
|
|
69
|
+
@keyframes ${uid}-b${i} {
|
|
70
|
+
0%, 100% { height: ${fromH}px; y: ${fromY}px; }
|
|
71
|
+
50% { height: ${toH}px; y: ${toY}px; }
|
|
72
|
+
}
|
|
73
|
+
.${uid}-b${i} { animation: ${uid}-b${i} ${speedMs * 0.6}ms ease-in-out infinite; animation-delay: ${b.delay}ms; }`;
|
|
74
|
+
}).join("")
|
|
75
|
+
: "";
|
|
76
|
+
return (_jsxs("svg", { viewBox: `0 0 ${W} ${H}`, xmlns: "http://www.w3.org/2000/svg", preserveAspectRatio: "none", style: { width: "100%", height: "100%", display: "block" }, children: [_jsxs("defs", { children: [_jsxs("linearGradient", { id: gid, x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [_jsx("stop", { offset: "0%", stopColor: c0 }), _jsx("stop", { offset: "100%", stopColor: c1 })] }), css && _jsx("style", { children: css })] }), bars.map((b, i) => (_jsx("rect", { className: (motion === "equalizer" || motion === "bounce") ? `${uid}-b${i}` : undefined, x: b.x, y: isTop ? 0 : H - b.h, width: segW + 1, height: b.h, fill: `url(#${gid})` }, i)))] }));
|
|
77
|
+
}
|
|
78
|
+
// ─── Layered Peaks — SMIL path morph per layer ────────────────────────────────
|
|
79
|
+
function LayeredPeaks({ colors, speedMs, params }) {
|
|
80
|
+
const count = Math.max(2, Math.min(5, params.layerCount ?? 3));
|
|
81
|
+
const amp = Math.round(80 * (params.amplitude ?? 1));
|
|
82
|
+
const baseOp = params.opacity ?? 1;
|
|
83
|
+
const uid = `lp${speedMs}`;
|
|
84
|
+
const W = 4320; // 3x wide for seamless scroll
|
|
85
|
+
const layerColors = [...colors, "#7c3aed", "#c026d3", "#db2777", "#e11d48", "#9333ea"].slice(0, count);
|
|
86
|
+
const makePeakD = (yBase, a, phase) => {
|
|
87
|
+
const seg = 480;
|
|
88
|
+
const cycles = W / seg;
|
|
89
|
+
let d = `M0,${yBase} `;
|
|
90
|
+
for (let i = 0; i < cycles; i++) {
|
|
91
|
+
const x0 = i * seg;
|
|
92
|
+
const x2 = x0 + seg;
|
|
93
|
+
const yUp = yBase - a * (1 + Math.sin(i * 0.9 + phase) * 0.25);
|
|
94
|
+
const yDown = yBase + a * 0.3;
|
|
95
|
+
d += `C${x0 + seg * 0.3},${yUp} ${x0 + seg * 0.7},${yDown} ${x2},${yBase} `;
|
|
96
|
+
}
|
|
97
|
+
d += `L${W},320 L0,320 Z`;
|
|
98
|
+
return d;
|
|
99
|
+
};
|
|
100
|
+
const layers = Array.from({ length: count }, (_, i) => {
|
|
101
|
+
const t = i / (count - 1 || 1);
|
|
102
|
+
const yBase = 160 + t * 100;
|
|
103
|
+
const a = amp * (1 - t * 0.25);
|
|
104
|
+
const d1 = makePeakD(yBase, a, i * 0.5);
|
|
105
|
+
const d2 = makePeakD(yBase, a * 1.2, i * 0.5 + 0.6);
|
|
106
|
+
// Each layer scrolls at slightly different speed — depth parallax
|
|
107
|
+
const scrollSpeed = speedMs * (0.8 + i * 0.3);
|
|
108
|
+
const scrollOffset = W / 3;
|
|
109
|
+
return {
|
|
110
|
+
color: layerColors[count - 1 - i],
|
|
111
|
+
op: baseOp * (1 - i * 0.1),
|
|
112
|
+
d1, d2,
|
|
113
|
+
morphDur: speedMs * (1.2 + i * 0.3),
|
|
114
|
+
scrollDur: scrollSpeed,
|
|
115
|
+
delay: i * (speedMs / count / 4),
|
|
116
|
+
scrollOffset,
|
|
117
|
+
};
|
|
118
|
+
});
|
|
119
|
+
const css = layers.map((l, i) => `@keyframes ${uid}-s${i} { 0%{transform:translateX(0)} 100%{transform:translateX(-${l.scrollOffset}px)} }
|
|
120
|
+
.${uid}-g${i} { animation: ${uid}-s${i} ${l.scrollDur}ms linear infinite; }`).join("");
|
|
121
|
+
return (_jsxs("svg", { viewBox: "0 0 1440 320", xmlns: "http://www.w3.org/2000/svg", preserveAspectRatio: "none", style: { width: "100%", height: "100%", display: "block", overflow: "hidden" }, children: [_jsx("defs", { children: _jsx("style", { children: css }) }), layers.map((l, i) => (_jsx("g", { className: `${uid}-g${i}`, children: _jsx("path", { d: l.d1, fill: l.color, opacity: l.op, children: _jsx("animate", { attributeName: "d", values: `${l.d1};${l.d2};${l.d1}`, dur: `${l.morphDur}ms`, repeatCount: "indefinite", calcMode: "spline", keySplines: "0.45 0 0.55 1; 0.45 0 0.55 1", begin: `${l.delay}ms` }) }) }, i)))] }));
|
|
122
|
+
}
|
|
123
|
+
// ─── Stacked Peaks — SMIL path morph ─────────────────────────────────────────
|
|
124
|
+
function StackedPeaks({ colors, speedMs, params }) {
|
|
125
|
+
const count = Math.max(2, Math.min(5, params.layerCount ?? 4));
|
|
126
|
+
const amp = Math.round(80 * (params.amplitude ?? 1));
|
|
127
|
+
const layerColors = [...colors, "#be185d", "#9d174d", "#7c3aed", "#5b21b6", "#4c1d95"].slice(0, count);
|
|
128
|
+
const layers = Array.from({ length: count }, (_, i) => {
|
|
129
|
+
const t = i / count;
|
|
130
|
+
const y = 320 - t * (320 - amp);
|
|
131
|
+
const a = amp * (0.8 + t * 0.4);
|
|
132
|
+
const d1 = `M0,${y} C160,${y - a} 380,${y + a * .7} 640,${y - a * .8} C900,${y - a * 1.2} 1180,${y + a * .5} 1440,${y - a * .6} L1440,320 L0,320 Z`;
|
|
133
|
+
const d2 = `M0,${y} C200,${y + a * .4} 440,${y - a} 700,${y + a * .2} C940,${y - a * .9} 1200,${y + a * .6} 1440,${y - a * .3} L1440,320 L0,320 Z`;
|
|
134
|
+
return { color: layerColors[count - 1 - i], d1, d2, dur: speedMs * (1 + i * 0.25), delay: i * (speedMs / count / 4) };
|
|
135
|
+
});
|
|
136
|
+
return (_jsx("svg", { viewBox: "0 0 1440 320", xmlns: "http://www.w3.org/2000/svg", preserveAspectRatio: "none", style: { width: "100%", height: "100%", display: "block" }, children: layers.map((l, i) => (_jsx("path", { d: l.d1, fill: l.color, children: _jsx("animate", { attributeName: "d", values: `${l.d1};${l.d2};${l.d1}`, dur: `${l.dur}ms`, repeatCount: "indefinite", calcMode: "spline", keySplines: "0.45 0 0.55 1; 0.45 0 0.55 1", begin: `${l.delay}ms` }) }, i))) }));
|
|
137
|
+
}
|
|
138
|
+
// ─── Layered Waves — SMIL path morph ─────────────────────────────────────────
|
|
139
|
+
function LayeredWaves({ colors, speedMs, position, params }) {
|
|
140
|
+
const count = Math.max(2, Math.min(5, params.layerCount ?? 3));
|
|
141
|
+
const amp = Math.round(30 * (params.amplitude ?? 1));
|
|
142
|
+
const isBottom = position === "bottom" || position === "full";
|
|
143
|
+
const baseOp = params.opacity ?? 1;
|
|
144
|
+
const layerColors = [...colors, "#6366f1", "#8b5cf6", "#ec4899", "#f43f5e", "#0ea5e9"].slice(0, count);
|
|
145
|
+
const layers = Array.from({ length: count }, (_, i) => {
|
|
146
|
+
const t = i / count;
|
|
147
|
+
const yBase = isBottom ? 200 + t * 80 : 120 - t * 80;
|
|
148
|
+
const a = amp * (1 - t * 0.2);
|
|
149
|
+
const d1 = `M-100,${yBase} C160,${yBase - a} 400,${yBase + a} 640,${yBase} C880,${yBase - a} 1120,${yBase + a} 1360,${yBase} C1500,${yBase - a / 2} 1540,${yBase} 1540,${yBase} L1540,320 L-100,320 Z`;
|
|
150
|
+
const d2 = `M-100,${yBase} C140,${yBase + a * .8} 380,${yBase - a * 1.2} 620,${yBase + a * .4} C860,${yBase - a * .9} 1100,${yBase + a * 1.1} 1360,${yBase - a * .5} C1500,${yBase + a * .3} 1540,${yBase} 1540,${yBase} L1540,320 L-100,320 Z`;
|
|
151
|
+
return { color: layerColors[count - 1 - i], op: baseOp * (0.5 + t * 0.5), d1, d2, dur: speedMs * (0.8 + i * 0.2), delay: i * (speedMs / count / 3) };
|
|
152
|
+
});
|
|
153
|
+
return (_jsx("svg", { viewBox: "0 0 1440 320", xmlns: "http://www.w3.org/2000/svg", preserveAspectRatio: "none", style: { width: "100%", height: "100%", display: "block" }, children: layers.map((l, i) => (_jsx("path", { d: l.d1, fill: l.color, opacity: l.op, children: _jsx("animate", { attributeName: "d", values: `${l.d1};${l.d2};${l.d1}`, dur: `${l.dur}ms`, repeatCount: "indefinite", calcMode: "spline", keySplines: "0.45 0 0.55 1; 0.45 0 0.55 1", begin: `${l.delay}ms` }) }, i))) }));
|
|
154
|
+
}
|
|
155
|
+
// ─── Blob Scene — SMIL path morph ────────────────────────────────────────────
|
|
156
|
+
function BlobScene({ colors, speedMs, params }) {
|
|
157
|
+
const c0 = colors[0] ?? "#6366f1";
|
|
158
|
+
const c1 = colors[1] ?? "#ec4899";
|
|
159
|
+
const baseOp = params.opacity ?? 0.7;
|
|
160
|
+
const s = Math.round(200 * (params.amplitude ?? 1));
|
|
161
|
+
const b1 = [
|
|
162
|
+
`M${s},${s * .5} C${s * 1.4},${s * .2} ${s * 1.9},${s * .3} ${s * 2.1},${s * .7} C${s * 2.3},${s * 1.1} ${s * 2},${s * 1.5} ${s * 1.6},${s * 1.6} C${s * 1.2},${s * 1.7} ${s * .7},${s * 1.5} ${s * .5},${s * 1.1} C${s * .3},${s * .7} ${s * .6},${s * .8} ${s},${s * .5}Z`,
|
|
163
|
+
`M${s * 1.1},${s * .35} C${s * 1.6},${s * .1} ${s * 2.1},${s * .4} ${s * 2.2},${s * .85} C${s * 2.35},${s * 1.3} ${s * 1.85},${s * 1.7} ${s * 1.4},${s * 1.65} C${s * .95},${s * 1.6} ${s * .55},${s * 1.35} ${s * .4},${s * .95} C${s * .25},${s * .55} ${s * .6},${s * .6} ${s * 1.1},${s * .35}Z`,
|
|
164
|
+
`M${s * .9},${s * .6} C${s * 1.3},${s * .25} ${s * 1.85},${s * .2} ${s * 2.05},${s * .65} C${s * 2.25},${s * 1.1} ${s * 2.1},${s * 1.6} ${s * 1.55},${s * 1.7} C${s},${s * 1.8} ${s * .6},${s * 1.6} ${s * .45},${s * 1.2} C${s * .3},${s * .8} ${s * .5},${s * .95} ${s * .9},${s * .6}Z`,
|
|
165
|
+
];
|
|
166
|
+
const rx = 1440 - s * 2.5;
|
|
167
|
+
const b2 = [
|
|
168
|
+
`M${rx + s},${s * .9} C${rx + s * 1.3},${s * .6} ${rx + s * 2},${s * .7} ${rx + s * 2.1},${s * 1.1} C${rx + s * 2.2},${s * 1.5} ${rx + s * 1.8},${s * 1.8} ${rx + s * 1.3},${s * 1.8} C${rx + s * .8},${s * 1.8} ${rx + s * .5},${s * 1.5} ${rx + s * .6},${s * 1.1} C${rx + s * .65},${s * .9} ${rx + s * .8},${s * 1.1} ${rx + s},${s * .9}Z`,
|
|
169
|
+
`M${rx + s * .85},${s * .75} C${rx + s * 1.4},${s * .45} ${rx + s * 2.15},${s * .6} ${rx + s * 2.2},${s * 1.05} C${rx + s * 2.25},${s * 1.5} ${rx + s * 1.75},${s * 1.85} ${rx + s * 1.2},${s * 1.75} C${rx + s * .65},${s * 1.65} ${rx + s * .35},${s * 1.35} ${rx + s * .5},${s * .95} C${rx + s * .6},${s * .7} ${rx + s * .7},${s * .95} ${rx + s * .85},${s * .75}Z`,
|
|
170
|
+
`M${rx + s * 1.05},${s * .8} C${rx + s * 1.5},${s * .5} ${rx + s * 2.1},${s * .75} ${rx + s * 2.15},${s * 1.15} C${rx + s * 2.2},${s * 1.55} ${rx + s * 1.7},${s * 1.9} ${rx + s * 1.25},${s * 1.8} C${rx + s * .8},${s * 1.7} ${rx + s * .4},${s * 1.4} ${rx + s * .55},${s} C${rx + s * .62},${s * .75} ${rx + s * .78},${s * .92} ${rx + s * 1.05},${s * .8}Z`,
|
|
171
|
+
];
|
|
172
|
+
return (_jsxs("svg", { viewBox: "0 0 1440 400", xmlns: "http://www.w3.org/2000/svg", preserveAspectRatio: "xMidYMid slice", style: { width: "100%", height: "100%", display: "block" }, children: [_jsx("path", { d: b1[0], fill: c0, opacity: baseOp, children: _jsx("animate", { attributeName: "d", values: `${b1[0]};${b1[1]};${b1[2]};${b1[0]}`, dur: `${speedMs}ms`, repeatCount: "indefinite", calcMode: "spline", keySplines: "0.45 0 0.55 1; 0.45 0 0.55 1; 0.45 0 0.55 1" }) }), _jsx("path", { d: b2[0], fill: c1, opacity: baseOp, children: _jsx("animate", { attributeName: "d", values: `${b2[0]};${b2[1]};${b2[2]};${b2[0]}`, dur: `${speedMs * 1.3}ms`, repeatCount: "indefinite", calcMode: "spline", keySplines: "0.45 0 0.55 1; 0.45 0 0.55 1; 0.45 0 0.55 1", begin: `${speedMs * 0.4}ms` }) })] }));
|
|
173
|
+
}
|
|
174
|
+
// ─── Circle Scatter — CSS keyframes, each circle drifts independently ─────────
|
|
175
|
+
function CircleScatter({ colors, speedMs, params }) {
|
|
176
|
+
const c0 = colors[0] ?? "#f43f5e";
|
|
177
|
+
const c1 = colors[1] ?? "#6366f1";
|
|
178
|
+
const count = Math.max(5, Math.min(30, params.density ?? 10));
|
|
179
|
+
const rMin = params.minRadius ?? 15;
|
|
180
|
+
const rMax = params.maxRadius ?? 90;
|
|
181
|
+
const allFilled = params.filled ?? false;
|
|
182
|
+
const baseOp = params.opacity ?? 0.7;
|
|
183
|
+
const amp = Math.round(30 * (params.amplitude ?? 1));
|
|
184
|
+
const motion = params.motion ?? "drift";
|
|
185
|
+
const uid = `cs${speedMs}`;
|
|
186
|
+
const circles = Array.from({ length: count }, (_, i) => {
|
|
187
|
+
const t = i / count;
|
|
188
|
+
const cx = Math.round(80 + t * 1280 + Math.sin(i * 2.3) * 60);
|
|
189
|
+
const cy = Math.round(60 + (i % 4) * 90 + Math.cos(i * 1.7) * 40);
|
|
190
|
+
const r = Math.round(rMin + (rMax - rMin) * Math.abs(Math.sin(i * 1.4)));
|
|
191
|
+
const color = i % 2 === 0 ? c0 : c1;
|
|
192
|
+
const filled = allFilled || i % 3 === 0;
|
|
193
|
+
const dx = Math.round(Math.sin(i * 0.9) * amp);
|
|
194
|
+
const dy = Math.round(Math.cos(i * 1.3) * amp);
|
|
195
|
+
const dur = speedMs * (0.6 + (i % 5) * 0.15);
|
|
196
|
+
const delay = Math.round((i / count) * speedMs * 0.5);
|
|
197
|
+
return { cx, cy, r, color, filled, dx, dy, dur, delay };
|
|
198
|
+
});
|
|
199
|
+
const css = circles.map((c, i) => {
|
|
200
|
+
if (motion === "breathe") {
|
|
201
|
+
return `@keyframes ${uid}-c${i} { 0%,100%{r:${c.r};opacity:${baseOp}} 50%{r:${c.r * 1.15};opacity:${baseOp * .6}} }
|
|
202
|
+
.${uid}-c${i}{animation:${uid}-c${i} ${c.dur}ms ease-in-out infinite;animation-delay:${c.delay}ms}`;
|
|
203
|
+
}
|
|
204
|
+
return `@keyframes ${uid}-c${i} { 0%,100%{transform:translate(0,0)} 50%{transform:translate(${c.dx}px,${c.dy}px)} }
|
|
205
|
+
.${uid}-c${i}{animation:${uid}-c${i} ${c.dur}ms ease-in-out infinite;animation-delay:${c.delay}ms;transform-origin:${c.cx}px ${c.cy}px}`;
|
|
206
|
+
}).join("");
|
|
207
|
+
return (_jsxs("svg", { viewBox: "0 0 1440 400", xmlns: "http://www.w3.org/2000/svg", preserveAspectRatio: "xMidYMid slice", style: { width: "100%", height: "100%", display: "block" }, children: [_jsx("defs", { children: _jsx("style", { children: css }) }), circles.map((c, i) => c.filled
|
|
208
|
+
? _jsx("circle", { className: `${uid}-c${i}`, cx: c.cx, cy: c.cy, r: c.r, fill: c.color, opacity: baseOp * 0.6 }, i)
|
|
209
|
+
: _jsx("circle", { className: `${uid}-c${i}`, cx: c.cx, cy: c.cy, r: c.r, stroke: c.color, strokeWidth: "2", fill: "none", opacity: baseOp }, i))] }));
|
|
210
|
+
}
|
|
211
|
+
// ─── Blurry Gradient — CSS keyframes drift ───────────────────────────────────
|
|
212
|
+
function BlurryGradient({ colors, speedMs, params }) {
|
|
213
|
+
const blurAmt = params.blur ?? 60;
|
|
214
|
+
const count = Math.max(2, Math.min(5, params.density ?? 3));
|
|
215
|
+
const baseOp = params.opacity ?? 0.7;
|
|
216
|
+
const amp = Math.round(80 * (params.amplitude ?? 1));
|
|
217
|
+
const uid = `bg${speedMs}`;
|
|
218
|
+
const ellipseColors = [...colors, "#6366f1", "#ec4899", "#f59e0b", "#10b981", "#8b5cf6"].slice(0, count);
|
|
219
|
+
const ellipses = Array.from({ length: count }, (_, i) => {
|
|
220
|
+
const t = i / count;
|
|
221
|
+
const cx = Math.round(200 + t * 1040);
|
|
222
|
+
const dx = Math.round(Math.sin(i * 1.2) * amp);
|
|
223
|
+
const dy = Math.round(Math.cos(i * 0.9) * amp * 0.6);
|
|
224
|
+
const dur = speedMs * (0.9 + i * 0.2);
|
|
225
|
+
const delay = i * (speedMs / count / 3);
|
|
226
|
+
return { cx, cy: 200, rx: 280 - i * 20, ry: 220 - i * 15, fill: ellipseColors[i], dx, dy, dur, delay };
|
|
227
|
+
});
|
|
228
|
+
const css = ellipses.map((e, i) => `@keyframes ${uid}-e${i} { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(${e.dx}px,${e.dy}px) scale(1.1)} }
|
|
229
|
+
.${uid}-e${i}{animation:${uid}-e${i} ${e.dur}ms ease-in-out infinite;animation-delay:${e.delay}ms;transform-origin:${e.cx}px ${e.cy}px}`).join("");
|
|
230
|
+
return (_jsxs("svg", { viewBox: "0 0 1440 400", xmlns: "http://www.w3.org/2000/svg", preserveAspectRatio: "xMidYMid slice", style: { width: "100%", height: "100%", display: "block" }, children: [_jsxs("defs", { children: [_jsx("filter", { id: `${uid}-blur`, children: _jsx("feGaussianBlur", { stdDeviation: blurAmt }) }), _jsx("style", { children: css })] }), _jsx("g", { filter: `url(#${uid}-blur)`, children: ellipses.map((e, i) => (_jsx("ellipse", { className: `${uid}-e${i}`, cx: e.cx, cy: e.cy, rx: e.rx, ry: e.ry, fill: e.fill, opacity: baseOp }, i))) })] }));
|
|
231
|
+
}
|
|
232
|
+
// ─── Main export ──────────────────────────────────────────────────────────────
|
|
233
|
+
export function AnimatedBackground({ type, colors = [], opacity = 1, speed = "normal", position = "bottom", params = {}, }) {
|
|
234
|
+
const speedMs = SPEED_MS[speed] ?? SPEED_MS.normal;
|
|
235
|
+
const containerStyle = {
|
|
236
|
+
position: "absolute",
|
|
237
|
+
top: 0, left: 0, right: 0, bottom: 0,
|
|
238
|
+
overflow: "hidden",
|
|
239
|
+
opacity,
|
|
240
|
+
pointerEvents: "none",
|
|
241
|
+
zIndex: 0,
|
|
242
|
+
};
|
|
243
|
+
const isWaveType = ["smooth_wave", "stepped_wave", "layered_peaks", "stacked_peaks", "layered_waves"].includes(type);
|
|
244
|
+
// Map extended positions to base position + rotation
|
|
245
|
+
const ROTATION_MAP = {
|
|
246
|
+
"top": { base: "top", rotate: "0deg", origin: "center top" },
|
|
247
|
+
"bottom": { base: "bottom", rotate: "0deg", origin: "center bottom" },
|
|
248
|
+
"full": { base: "full", rotate: "0deg", origin: "center" },
|
|
249
|
+
"left": { base: "bottom", rotate: "90deg", origin: "center" },
|
|
250
|
+
"right": { base: "bottom", rotate: "-90deg", origin: "center" },
|
|
251
|
+
"diagonal-tl": { base: "bottom", rotate: "135deg", origin: "center" },
|
|
252
|
+
"diagonal-tr": { base: "bottom", rotate: "-135deg", origin: "center" },
|
|
253
|
+
"diagonal-bl": { base: "bottom", rotate: "45deg", origin: "center" },
|
|
254
|
+
"diagonal-br": { base: "bottom", rotate: "-45deg", origin: "center" },
|
|
255
|
+
};
|
|
256
|
+
const posConfig = ROTATION_MAP[position] ?? ROTATION_MAP["bottom"];
|
|
257
|
+
const basePosition = posConfig.base;
|
|
258
|
+
const rotation = posConfig.rotate;
|
|
259
|
+
const needsRotation = rotation !== "0deg";
|
|
260
|
+
// Edge-wrap (bottom/top): wave sits at one edge, 60% height
|
|
261
|
+
// Rotated positions (left/right/diagonal): fill full 100% — rotation handles directionality
|
|
262
|
+
// After 90° rotation a 60%-height wave becomes 60%-width = tiny strip, so use 100%
|
|
263
|
+
const useEdgeWrap = isWaveType && basePosition !== "full" && !needsRotation;
|
|
264
|
+
const innerStyle = useEdgeWrap
|
|
265
|
+
? { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, display: "flex", flexDirection: "column", justifyContent: basePosition === "top" ? "flex-start" : "flex-end" }
|
|
266
|
+
: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0 };
|
|
267
|
+
const heightPct = (params.amplitude ?? 1) > 1.5 ? "75%" : "60%";
|
|
268
|
+
const svgStyle = useEdgeWrap
|
|
269
|
+
? { width: "100%", height: heightPct, flexShrink: 0 }
|
|
270
|
+
: { width: "100%", height: "100%" };
|
|
271
|
+
// Diagonal needs √2 ≈ 1.42 scale to cover corners; left/right fits at 1.0
|
|
272
|
+
const rotationScale = ["diagonal-tl", "diagonal-tr", "diagonal-bl", "diagonal-br"].includes(position) ? "1.45" : "1";
|
|
273
|
+
const rotationStyle = needsRotation ? {
|
|
274
|
+
position: "absolute",
|
|
275
|
+
top: "50%", left: "50%",
|
|
276
|
+
width: "100%", height: "100%",
|
|
277
|
+
transform: `translate(-50%, -50%) rotate(${rotation}) scale(${rotationScale})`,
|
|
278
|
+
transformOrigin: "center center",
|
|
279
|
+
} : {};
|
|
280
|
+
let bg = null;
|
|
281
|
+
switch (type) {
|
|
282
|
+
case "smooth_wave":
|
|
283
|
+
bg = _jsx(SmoothWave, { colors: colors, speedMs: speedMs, position: position, params: params });
|
|
284
|
+
break;
|
|
285
|
+
case "stepped_wave":
|
|
286
|
+
bg = _jsx(SteppedWave, { colors: colors, speedMs: speedMs, position: position, params: params });
|
|
287
|
+
break;
|
|
288
|
+
case "layered_peaks":
|
|
289
|
+
bg = _jsx(LayeredPeaks, { colors: colors, speedMs: speedMs, params: params });
|
|
290
|
+
break;
|
|
291
|
+
case "stacked_peaks":
|
|
292
|
+
bg = _jsx(StackedPeaks, { colors: colors, speedMs: speedMs, params: params });
|
|
293
|
+
break;
|
|
294
|
+
case "layered_waves":
|
|
295
|
+
bg = _jsx(LayeredWaves, { colors: colors, speedMs: speedMs, position: position, params: params });
|
|
296
|
+
break;
|
|
297
|
+
case "blob_scene":
|
|
298
|
+
bg = _jsx(BlobScene, { colors: colors, speedMs: speedMs, params: params });
|
|
299
|
+
break;
|
|
300
|
+
case "circle_scatter":
|
|
301
|
+
bg = _jsx(CircleScatter, { colors: colors, speedMs: speedMs, params: params });
|
|
302
|
+
break;
|
|
303
|
+
case "blurry_gradient":
|
|
304
|
+
bg = _jsx(BlurryGradient, { colors: colors, speedMs: speedMs, params: params });
|
|
305
|
+
break;
|
|
306
|
+
default: bg = _jsx(SmoothWave, { colors: colors, speedMs: speedMs, position: position, params: params });
|
|
307
|
+
}
|
|
308
|
+
const svgContent = (_jsx("div", { style: innerStyle, children: _jsx("div", { style: svgStyle, children: bg }) }));
|
|
309
|
+
return (_jsx("div", { style: containerStyle, "aria-hidden": "true", children: needsRotation
|
|
310
|
+
? _jsx("div", { style: rotationStyle, children: svgContent })
|
|
311
|
+
: svgContent }));
|
|
312
|
+
}
|
|
313
|
+
//# sourceMappingURL=AnimatedBackground.js.map
|