fancy-ui-svelte 0.2.1
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/LICENSE +21 -0
- package/README.md +198 -0
- package/dist/fancy-ui/_template/Component.svelte +110 -0
- package/dist/fancy-ui/_template/Component.svelte.d.ts +16 -0
- package/dist/fancy-ui/_template/README.md +279 -0
- package/dist/fancy-ui/_template/index.d.ts +13 -0
- package/dist/fancy-ui/_template/index.js +27 -0
- package/dist/fancy-ui/_template/types.d.ts +53 -0
- package/dist/fancy-ui/_template/types.js +12 -0
- package/dist/fancy-ui/animated-beam/AnimatedBeam.svelte +166 -0
- package/dist/fancy-ui/animated-beam/AnimatedBeam.svelte.d.ts +4 -0
- package/dist/fancy-ui/animated-beam/AnimatedBeam.test.d.ts +1 -0
- package/dist/fancy-ui/animated-beam/AnimatedBeam.test.js +49 -0
- package/dist/fancy-ui/animated-beam/README.md +38 -0
- package/dist/fancy-ui/animated-beam/index.d.ts +2 -0
- package/dist/fancy-ui/animated-beam/index.js +1 -0
- package/dist/fancy-ui/animated-beam/types.d.ts +19 -0
- package/dist/fancy-ui/animated-beam/types.js +1 -0
- package/dist/fancy-ui/animated-testimonials/AnimatedTestimonials.svelte +196 -0
- package/dist/fancy-ui/animated-testimonials/AnimatedTestimonials.svelte.d.ts +29 -0
- package/dist/fancy-ui/animated-testimonials/AnimatedTestimonials.test.d.ts +1 -0
- package/dist/fancy-ui/animated-testimonials/AnimatedTestimonials.test.js +92 -0
- package/dist/fancy-ui/animated-testimonials/index.d.ts +2 -0
- package/dist/fancy-ui/animated-testimonials/index.js +1 -0
- package/dist/fancy-ui/animated-tooltip/AnimatedTooltip.svelte +97 -0
- package/dist/fancy-ui/animated-tooltip/AnimatedTooltip.svelte.d.ts +15 -0
- package/dist/fancy-ui/animated-tooltip/AnimatedTooltip.test.d.ts +1 -0
- package/dist/fancy-ui/animated-tooltip/AnimatedTooltip.test.js +67 -0
- package/dist/fancy-ui/animated-tooltip/index.d.ts +2 -0
- package/dist/fancy-ui/animated-tooltip/index.js +1 -0
- package/dist/fancy-ui/apple-card-carousel/AppleCard.svelte +226 -0
- package/dist/fancy-ui/apple-card-carousel/AppleCard.svelte.d.ts +27 -0
- package/dist/fancy-ui/apple-card-carousel/AppleCardCarousel.svelte +49 -0
- package/dist/fancy-ui/apple-card-carousel/AppleCardCarousel.svelte.d.ts +11 -0
- package/dist/fancy-ui/apple-card-carousel/AppleCardCarousel.test.d.ts +1 -0
- package/dist/fancy-ui/apple-card-carousel/AppleCardCarousel.test.js +85 -0
- package/dist/fancy-ui/apple-card-carousel/index.d.ts +3 -0
- package/dist/fancy-ui/apple-card-carousel/index.js +2 -0
- package/dist/fancy-ui/bento-grid/BentoGrid.svelte +21 -0
- package/dist/fancy-ui/bento-grid/BentoGrid.svelte.d.ts +7 -0
- package/dist/fancy-ui/bento-grid/BentoGridCard.svelte +70 -0
- package/dist/fancy-ui/bento-grid/BentoGridCard.svelte.d.ts +12 -0
- package/dist/fancy-ui/bento-grid/BentoGridItem.svelte +39 -0
- package/dist/fancy-ui/bento-grid/BentoGridItem.svelte.d.ts +10 -0
- package/dist/fancy-ui/bento-grid/README.md +51 -0
- package/dist/fancy-ui/bento-grid/index.d.ts +3 -0
- package/dist/fancy-ui/bento-grid/index.js +3 -0
- package/dist/fancy-ui/bg-falling-stars/FallingStarsBg.svelte +163 -0
- package/dist/fancy-ui/bg-falling-stars/FallingStarsBg.svelte.d.ts +11 -0
- package/dist/fancy-ui/bg-falling-stars/FallingStarsBg.test.d.ts +1 -0
- package/dist/fancy-ui/bg-falling-stars/FallingStarsBg.test.js +50 -0
- package/dist/fancy-ui/bg-falling-stars/README.md +22 -0
- package/dist/fancy-ui/bg-falling-stars/index.d.ts +2 -0
- package/dist/fancy-ui/bg-falling-stars/index.js +1 -0
- package/dist/fancy-ui/bg-stars/README.md +41 -0
- package/dist/fancy-ui/bg-stars/StarsBackground.svelte +205 -0
- package/dist/fancy-ui/bg-stars/StarsBackground.svelte.d.ts +33 -0
- package/dist/fancy-ui/bg-stars/StarsBackground.test.d.ts +1 -0
- package/dist/fancy-ui/bg-stars/StarsBackground.test.js +46 -0
- package/dist/fancy-ui/bg-stars/index.d.ts +1 -0
- package/dist/fancy-ui/bg-stars/index.js +1 -0
- package/dist/fancy-ui/blur-reveal/BlurReveal.svelte +126 -0
- package/dist/fancy-ui/blur-reveal/BlurReveal.svelte.d.ts +18 -0
- package/dist/fancy-ui/blur-reveal/BlurReveal.test.d.ts +1 -0
- package/dist/fancy-ui/blur-reveal/BlurReveal.test.js +47 -0
- package/dist/fancy-ui/blur-reveal/README.md +41 -0
- package/dist/fancy-ui/blur-reveal/index.d.ts +2 -0
- package/dist/fancy-ui/blur-reveal/index.js +2 -0
- package/dist/fancy-ui/book/Book.svelte +89 -0
- package/dist/fancy-ui/book/Book.svelte.d.ts +15 -0
- package/dist/fancy-ui/book/Book.test.d.ts +1 -0
- package/dist/fancy-ui/book/Book.test.js +47 -0
- package/dist/fancy-ui/book/BookDescription.svelte +17 -0
- package/dist/fancy-ui/book/BookDescription.svelte.d.ts +8 -0
- package/dist/fancy-ui/book/BookHeader.svelte +17 -0
- package/dist/fancy-ui/book/BookHeader.svelte.d.ts +8 -0
- package/dist/fancy-ui/book/BookTitle.svelte +17 -0
- package/dist/fancy-ui/book/BookTitle.svelte.d.ts +8 -0
- package/dist/fancy-ui/book/README.md +34 -0
- package/dist/fancy-ui/book/index.d.ts +128 -0
- package/dist/fancy-ui/book/index.js +46 -0
- package/dist/fancy-ui/border-beam/BorderBeam.svelte +85 -0
- package/dist/fancy-ui/border-beam/BorderBeam.svelte.d.ts +27 -0
- package/dist/fancy-ui/border-beam/BorderBeam.test.d.ts +1 -0
- package/dist/fancy-ui/border-beam/BorderBeam.test.js +64 -0
- package/dist/fancy-ui/border-beam/index.d.ts +2 -0
- package/dist/fancy-ui/border-beam/index.js +2 -0
- package/dist/fancy-ui/box-reveal/BoxReveal.svelte +73 -0
- package/dist/fancy-ui/box-reveal/BoxReveal.svelte.d.ts +24 -0
- package/dist/fancy-ui/box-reveal/BoxReveal.test.d.ts +1 -0
- package/dist/fancy-ui/box-reveal/BoxReveal.test.js +66 -0
- package/dist/fancy-ui/box-reveal/README.md +24 -0
- package/dist/fancy-ui/box-reveal/index.d.ts +2 -0
- package/dist/fancy-ui/box-reveal/index.js +2 -0
- package/dist/fancy-ui/card-3d/CardBody.svelte +16 -0
- package/dist/fancy-ui/card-3d/CardBody.svelte.d.ts +7 -0
- package/dist/fancy-ui/card-3d/CardContainer.svelte +53 -0
- package/dist/fancy-ui/card-3d/CardContainer.svelte.d.ts +8 -0
- package/dist/fancy-ui/card-3d/CardItem.svelte +49 -0
- package/dist/fancy-ui/card-3d/CardItem.svelte.d.ts +14 -0
- package/dist/fancy-ui/card-3d/README.md +52 -0
- package/dist/fancy-ui/card-3d/index.d.ts +3 -0
- package/dist/fancy-ui/card-3d/index.js +3 -0
- package/dist/fancy-ui/card-spotlight/CardSpotlight.svelte +59 -0
- package/dist/fancy-ui/card-spotlight/CardSpotlight.svelte.d.ts +11 -0
- package/dist/fancy-ui/card-spotlight/README.md +24 -0
- package/dist/fancy-ui/card-spotlight/index.d.ts +1 -0
- package/dist/fancy-ui/card-spotlight/index.js +1 -0
- package/dist/fancy-ui/colourful-text/ColourfulText.svelte +78 -0
- package/dist/fancy-ui/colourful-text/ColourfulText.svelte.d.ts +22 -0
- package/dist/fancy-ui/colourful-text/ColourfulText.test.d.ts +1 -0
- package/dist/fancy-ui/colourful-text/ColourfulText.test.js +53 -0
- package/dist/fancy-ui/colourful-text/README.md +21 -0
- package/dist/fancy-ui/colourful-text/index.d.ts +2 -0
- package/dist/fancy-ui/colourful-text/index.js +2 -0
- package/dist/fancy-ui/compare/Compare.svelte +304 -0
- package/dist/fancy-ui/compare/Compare.svelte.d.ts +25 -0
- package/dist/fancy-ui/compare/Compare.test.d.ts +1 -0
- package/dist/fancy-ui/compare/Compare.test.js +57 -0
- package/dist/fancy-ui/compare/README.md +97 -0
- package/dist/fancy-ui/compare/StarField.svelte +108 -0
- package/dist/fancy-ui/compare/StarField.svelte.d.ts +7 -0
- package/dist/fancy-ui/compare/index.d.ts +2 -0
- package/dist/fancy-ui/compare/index.js +2 -0
- package/dist/fancy-ui/confetti/Confetti.svelte +60 -0
- package/dist/fancy-ui/confetti/Confetti.svelte.d.ts +14 -0
- package/dist/fancy-ui/confetti/Confetti.test.d.ts +1 -0
- package/dist/fancy-ui/confetti/Confetti.test.js +39 -0
- package/dist/fancy-ui/confetti/ConfettiButton.svelte +41 -0
- package/dist/fancy-ui/confetti/ConfettiButton.svelte.d.ts +9 -0
- package/dist/fancy-ui/confetti/README.md +22 -0
- package/dist/fancy-ui/confetti/index.d.ts +2 -0
- package/dist/fancy-ui/confetti/index.js +2 -0
- package/dist/fancy-ui/container-scroll/ContainerScroll.svelte +82 -0
- package/dist/fancy-ui/container-scroll/ContainerScroll.svelte.d.ts +9 -0
- package/dist/fancy-ui/container-scroll/ContainerScroll.test.d.ts +1 -0
- package/dist/fancy-ui/container-scroll/ContainerScroll.test.js +34 -0
- package/dist/fancy-ui/container-scroll/README.md +28 -0
- package/dist/fancy-ui/container-scroll/index.d.ts +1 -0
- package/dist/fancy-ui/container-scroll/index.js +1 -0
- package/dist/fancy-ui/container-text-flip/ContainerTextFlip.svelte +78 -0
- package/dist/fancy-ui/container-text-flip/ContainerTextFlip.svelte.d.ts +10 -0
- package/dist/fancy-ui/container-text-flip/ContainerTextFlip.test.d.ts +1 -0
- package/dist/fancy-ui/container-text-flip/ContainerTextFlip.test.js +46 -0
- package/dist/fancy-ui/container-text-flip/README.md +22 -0
- package/dist/fancy-ui/container-text-flip/index.d.ts +1 -0
- package/dist/fancy-ui/container-text-flip/index.js +1 -0
- package/dist/fancy-ui/direction-aware-hover/DirectionAwareHover.svelte +232 -0
- package/dist/fancy-ui/direction-aware-hover/DirectionAwareHover.svelte.d.ts +11 -0
- package/dist/fancy-ui/direction-aware-hover/DirectionAwareHover.test.d.ts +1 -0
- package/dist/fancy-ui/direction-aware-hover/DirectionAwareHover.test.js +78 -0
- package/dist/fancy-ui/direction-aware-hover/README.md +47 -0
- package/dist/fancy-ui/direction-aware-hover/index.d.ts +1 -0
- package/dist/fancy-ui/direction-aware-hover/index.js +1 -0
- package/dist/fancy-ui/displacement-text/DisplacementText.svelte +224 -0
- package/dist/fancy-ui/displacement-text/DisplacementText.svelte.d.ts +19 -0
- package/dist/fancy-ui/displacement-text/DisplacementText.test.d.ts +1 -0
- package/dist/fancy-ui/displacement-text/DisplacementText.test.js +144 -0
- package/dist/fancy-ui/displacement-text/index.d.ts +2 -0
- package/dist/fancy-ui/displacement-text/index.js +1 -0
- package/dist/fancy-ui/dock/Dock.svelte +87 -0
- package/dist/fancy-ui/dock/Dock.svelte.d.ts +12 -0
- package/dist/fancy-ui/dock/Dock.test.d.ts +1 -0
- package/dist/fancy-ui/dock/Dock.test.js +51 -0
- package/dist/fancy-ui/dock/DockIcon.svelte +50 -0
- package/dist/fancy-ui/dock/DockIcon.svelte.d.ts +7 -0
- package/dist/fancy-ui/dock/DockSeparator.svelte +21 -0
- package/dist/fancy-ui/dock/DockSeparator.svelte.d.ts +6 -0
- package/dist/fancy-ui/dock/README.md +57 -0
- package/dist/fancy-ui/dock/index.d.ts +4 -0
- package/dist/fancy-ui/dock/index.js +4 -0
- package/dist/fancy-ui/dock/types.d.ts +14 -0
- package/dist/fancy-ui/dock/types.js +1 -0
- package/dist/fancy-ui/flickering-grid/FlickeringGrid.svelte +154 -0
- package/dist/fancy-ui/flickering-grid/FlickeringGrid.svelte.d.ts +27 -0
- package/dist/fancy-ui/flickering-grid/FlickeringGrid.test.d.ts +1 -0
- package/dist/fancy-ui/flickering-grid/FlickeringGrid.test.js +34 -0
- package/dist/fancy-ui/flickering-grid/README.md +24 -0
- package/dist/fancy-ui/flickering-grid/index.d.ts +2 -0
- package/dist/fancy-ui/flickering-grid/index.js +2 -0
- package/dist/fancy-ui/flip-card/FlipCard.svelte +48 -0
- package/dist/fancy-ui/flip-card/FlipCard.svelte.d.ts +10 -0
- package/dist/fancy-ui/flip-card/FlipCard.test.d.ts +1 -0
- package/dist/fancy-ui/flip-card/FlipCard.test.js +36 -0
- package/dist/fancy-ui/flip-card/README.md +26 -0
- package/dist/fancy-ui/flip-card/index.d.ts +1 -0
- package/dist/fancy-ui/flip-card/index.js +1 -0
- package/dist/fancy-ui/flip-words/FlipWords.svelte +135 -0
- package/dist/fancy-ui/flip-words/FlipWords.svelte.d.ts +18 -0
- package/dist/fancy-ui/flip-words/FlipWords.test.d.ts +1 -0
- package/dist/fancy-ui/flip-words/FlipWords.test.js +50 -0
- package/dist/fancy-ui/flip-words/README.md +17 -0
- package/dist/fancy-ui/flip-words/index.d.ts +2 -0
- package/dist/fancy-ui/flip-words/index.js +2 -0
- package/dist/fancy-ui/fluid-cursor/FluidCursor.svelte +1378 -0
- package/dist/fancy-ui/fluid-cursor/FluidCursor.svelte.d.ts +25 -0
- package/dist/fancy-ui/fluid-cursor/FluidCursor.test.d.ts +1 -0
- package/dist/fancy-ui/fluid-cursor/FluidCursor.test.js +41 -0
- package/dist/fancy-ui/fluid-cursor/README.md +34 -0
- package/dist/fancy-ui/fluid-cursor/index.d.ts +1 -0
- package/dist/fancy-ui/fluid-cursor/index.js +1 -0
- package/dist/fancy-ui/focus/Focus.svelte +177 -0
- package/dist/fancy-ui/focus/Focus.svelte.d.ts +12 -0
- package/dist/fancy-ui/focus/Focus.test.d.ts +1 -0
- package/dist/fancy-ui/focus/Focus.test.js +48 -0
- package/dist/fancy-ui/focus/README.md +21 -0
- package/dist/fancy-ui/focus/index.d.ts +1 -0
- package/dist/fancy-ui/focus/index.js +1 -0
- package/dist/fancy-ui/glare-card/GlareCard.svelte +133 -0
- package/dist/fancy-ui/glare-card/GlareCard.svelte.d.ts +8 -0
- package/dist/fancy-ui/glare-card/GlareCard.test.d.ts +1 -0
- package/dist/fancy-ui/glare-card/GlareCard.test.js +40 -0
- package/dist/fancy-ui/glare-card/README.md +24 -0
- package/dist/fancy-ui/glare-card/index.d.ts +1 -0
- package/dist/fancy-ui/glare-card/index.js +1 -0
- package/dist/fancy-ui/glow-border/GlowBorder.svelte +67 -0
- package/dist/fancy-ui/glow-border/GlowBorder.svelte.d.ts +10 -0
- package/dist/fancy-ui/glow-border/GlowBorder.test.d.ts +1 -0
- package/dist/fancy-ui/glow-border/GlowBorder.test.js +57 -0
- package/dist/fancy-ui/glow-border/README.md +54 -0
- package/dist/fancy-ui/glow-border/index.d.ts +1 -0
- package/dist/fancy-ui/glow-border/index.js +1 -0
- package/dist/fancy-ui/glowing-effect/GlowingEffect.svelte +182 -0
- package/dist/fancy-ui/glowing-effect/GlowingEffect.svelte.d.ts +15 -0
- package/dist/fancy-ui/glowing-effect/GlowingEffect.test.d.ts +1 -0
- package/dist/fancy-ui/glowing-effect/GlowingEffect.test.js +68 -0
- package/dist/fancy-ui/glowing-effect/README.md +29 -0
- package/dist/fancy-ui/glowing-effect/index.d.ts +1 -0
- package/dist/fancy-ui/glowing-effect/index.js +1 -0
- package/dist/fancy-ui/gradient-button/GradientButton.svelte +103 -0
- package/dist/fancy-ui/gradient-button/GradientButton.svelte.d.ts +24 -0
- package/dist/fancy-ui/gradient-button/GradientButton.test.d.ts +1 -0
- package/dist/fancy-ui/gradient-button/GradientButton.test.js +65 -0
- package/dist/fancy-ui/gradient-button/README.md +10 -0
- package/dist/fancy-ui/gradient-button/index.d.ts +2 -0
- package/dist/fancy-ui/gradient-button/index.js +2 -0
- package/dist/fancy-ui/hyper-text/HyperText.svelte +112 -0
- package/dist/fancy-ui/hyper-text/HyperText.svelte.d.ts +20 -0
- package/dist/fancy-ui/hyper-text/HyperText.test.d.ts +1 -0
- package/dist/fancy-ui/hyper-text/HyperText.test.js +39 -0
- package/dist/fancy-ui/hyper-text/README.md +19 -0
- package/dist/fancy-ui/hyper-text/index.d.ts +2 -0
- package/dist/fancy-ui/hyper-text/index.js +2 -0
- package/dist/fancy-ui/image-trail-cursor/ImageTrailCursor.svelte +89 -0
- package/dist/fancy-ui/image-trail-cursor/ImageTrailCursor.svelte.d.ts +9 -0
- package/dist/fancy-ui/image-trail-cursor/ImageTrailCursor.test.d.ts +1 -0
- package/dist/fancy-ui/image-trail-cursor/ImageTrailCursor.test.js +60 -0
- package/dist/fancy-ui/image-trail-cursor/README.md +36 -0
- package/dist/fancy-ui/image-trail-cursor/index.d.ts +3 -0
- package/dist/fancy-ui/image-trail-cursor/index.js +1 -0
- package/dist/fancy-ui/image-trail-cursor/trail-variants.d.ts +107 -0
- package/dist/fancy-ui/image-trail-cursor/trail-variants.js +703 -0
- package/dist/fancy-ui/index.d.ts +52 -0
- package/dist/fancy-ui/index.js +64 -0
- package/dist/fancy-ui/interactive-grid-pattern/InteractiveGridPattern.svelte +71 -0
- package/dist/fancy-ui/interactive-grid-pattern/InteractiveGridPattern.svelte.d.ts +15 -0
- package/dist/fancy-ui/interactive-grid-pattern/InteractiveGridPattern.test.d.ts +1 -0
- package/dist/fancy-ui/interactive-grid-pattern/InteractiveGridPattern.test.js +47 -0
- package/dist/fancy-ui/interactive-grid-pattern/README.md +30 -0
- package/dist/fancy-ui/interactive-grid-pattern/index.d.ts +2 -0
- package/dist/fancy-ui/interactive-grid-pattern/index.js +2 -0
- package/dist/fancy-ui/interactive-hover-button/InteractiveHoverButton.svelte +75 -0
- package/dist/fancy-ui/interactive-hover-button/InteractiveHoverButton.svelte.d.ts +14 -0
- package/dist/fancy-ui/interactive-hover-button/InteractiveHoverButton.test.d.ts +1 -0
- package/dist/fancy-ui/interactive-hover-button/InteractiveHoverButton.test.js +64 -0
- package/dist/fancy-ui/interactive-hover-button/README.md +28 -0
- package/dist/fancy-ui/interactive-hover-button/index.d.ts +2 -0
- package/dist/fancy-ui/interactive-hover-button/index.js +2 -0
- package/dist/fancy-ui/letter-pullup/LetterPullup.svelte +58 -0
- package/dist/fancy-ui/letter-pullup/LetterPullup.svelte.d.ts +17 -0
- package/dist/fancy-ui/letter-pullup/LetterPullup.test.d.ts +1 -0
- package/dist/fancy-ui/letter-pullup/LetterPullup.test.js +49 -0
- package/dist/fancy-ui/letter-pullup/README.md +18 -0
- package/dist/fancy-ui/letter-pullup/index.d.ts +2 -0
- package/dist/fancy-ui/letter-pullup/index.js +2 -0
- package/dist/fancy-ui/line-hover-link/LineHoverLink.svelte +450 -0
- package/dist/fancy-ui/line-hover-link/LineHoverLink.svelte.d.ts +35 -0
- package/dist/fancy-ui/line-hover-link/LineHoverLink.test.d.ts +1 -0
- package/dist/fancy-ui/line-hover-link/LineHoverLink.test.js +55 -0
- package/dist/fancy-ui/line-hover-link/index.d.ts +2 -0
- package/dist/fancy-ui/line-hover-link/index.js +1 -0
- package/dist/fancy-ui/line-shadow-text/LineShadowText.svelte +63 -0
- package/dist/fancy-ui/line-shadow-text/LineShadowText.svelte.d.ts +9 -0
- package/dist/fancy-ui/line-shadow-text/LineShadowText.test.d.ts +1 -0
- package/dist/fancy-ui/line-shadow-text/LineShadowText.test.js +59 -0
- package/dist/fancy-ui/line-shadow-text/README.md +12 -0
- package/dist/fancy-ui/line-shadow-text/index.d.ts +2 -0
- package/dist/fancy-ui/line-shadow-text/index.js +1 -0
- package/dist/fancy-ui/liquid-glass/LiquidGlass.svelte +204 -0
- package/dist/fancy-ui/liquid-glass/LiquidGlass.svelte.d.ts +23 -0
- package/dist/fancy-ui/liquid-glass/LiquidGlass.test.d.ts +1 -0
- package/dist/fancy-ui/liquid-glass/LiquidGlass.test.js +48 -0
- package/dist/fancy-ui/liquid-glass/README.md +34 -0
- package/dist/fancy-ui/liquid-glass/index.d.ts +1 -0
- package/dist/fancy-ui/liquid-glass/index.js +1 -0
- package/dist/fancy-ui/logo-cloud/AnimatedLogoCloud.svelte +61 -0
- package/dist/fancy-ui/logo-cloud/AnimatedLogoCloud.svelte.d.ts +15 -0
- package/dist/fancy-ui/logo-cloud/AnimatedLogoCloud.test.d.ts +1 -0
- package/dist/fancy-ui/logo-cloud/AnimatedLogoCloud.test.js +59 -0
- package/dist/fancy-ui/logo-cloud/IconLogoCloud.svelte +31 -0
- package/dist/fancy-ui/logo-cloud/IconLogoCloud.svelte.d.ts +11 -0
- package/dist/fancy-ui/logo-cloud/README.md +41 -0
- package/dist/fancy-ui/logo-cloud/StaticLogoCloud.svelte +31 -0
- package/dist/fancy-ui/logo-cloud/StaticLogoCloud.svelte.d.ts +11 -0
- package/dist/fancy-ui/logo-cloud/index.d.ts +4 -0
- package/dist/fancy-ui/logo-cloud/index.js +4 -0
- package/dist/fancy-ui/marquee/Marquee.svelte +70 -0
- package/dist/fancy-ui/marquee/Marquee.svelte.d.ts +11 -0
- package/dist/fancy-ui/marquee/Marquee.test.d.ts +1 -0
- package/dist/fancy-ui/marquee/Marquee.test.js +46 -0
- package/dist/fancy-ui/marquee/ReviewCard.svelte +25 -0
- package/dist/fancy-ui/marquee/ReviewCard.svelte.d.ts +9 -0
- package/dist/fancy-ui/marquee/index.d.ts +2 -0
- package/dist/fancy-ui/marquee/index.js +2 -0
- package/dist/fancy-ui/meteors/Meteors.svelte +59 -0
- package/dist/fancy-ui/meteors/Meteors.svelte.d.ts +15 -0
- package/dist/fancy-ui/meteors/Meteors.test.d.ts +1 -0
- package/dist/fancy-ui/meteors/Meteors.test.js +48 -0
- package/dist/fancy-ui/meteors/README.md +18 -0
- package/dist/fancy-ui/meteors/index.d.ts +2 -0
- package/dist/fancy-ui/meteors/index.js +2 -0
- package/dist/fancy-ui/neon-border/NeonBorder.svelte +135 -0
- package/dist/fancy-ui/neon-border/NeonBorder.svelte.d.ts +24 -0
- package/dist/fancy-ui/neon-border/NeonBorder.test.d.ts +1 -0
- package/dist/fancy-ui/neon-border/NeonBorder.test.js +80 -0
- package/dist/fancy-ui/neon-border/README.md +27 -0
- package/dist/fancy-ui/neon-border/index.d.ts +2 -0
- package/dist/fancy-ui/neon-border/index.js +2 -0
- package/dist/fancy-ui/number-ticker/NumberTicker.svelte +126 -0
- package/dist/fancy-ui/number-ticker/NumberTicker.svelte.d.ts +24 -0
- package/dist/fancy-ui/number-ticker/NumberTicker.test.d.ts +1 -0
- package/dist/fancy-ui/number-ticker/NumberTicker.test.js +64 -0
- package/dist/fancy-ui/number-ticker/README.md +22 -0
- package/dist/fancy-ui/number-ticker/index.d.ts +2 -0
- package/dist/fancy-ui/number-ticker/index.js +2 -0
- package/dist/fancy-ui/rainbow-button/RainbowButton.svelte +96 -0
- package/dist/fancy-ui/rainbow-button/RainbowButton.svelte.d.ts +18 -0
- package/dist/fancy-ui/rainbow-button/RainbowButton.test.d.ts +1 -0
- package/dist/fancy-ui/rainbow-button/RainbowButton.test.js +51 -0
- package/dist/fancy-ui/rainbow-button/index.d.ts +2 -0
- package/dist/fancy-ui/rainbow-button/index.js +2 -0
- package/dist/fancy-ui/registry.d.ts +72 -0
- package/dist/fancy-ui/registry.js +643 -0
- package/dist/fancy-ui/ripple/README.md +16 -0
- package/dist/fancy-ui/ripple/Ripple.svelte +64 -0
- package/dist/fancy-ui/ripple/Ripple.svelte.d.ts +13 -0
- package/dist/fancy-ui/ripple/Ripple.test.d.ts +1 -0
- package/dist/fancy-ui/ripple/Ripple.test.js +81 -0
- package/dist/fancy-ui/ripple/index.d.ts +1 -0
- package/dist/fancy-ui/ripple/index.js +1 -0
- package/dist/fancy-ui/ripple-button/RippleButton.svelte +111 -0
- package/dist/fancy-ui/ripple-button/RippleButton.svelte.d.ts +15 -0
- package/dist/fancy-ui/ripple-button/RippleButton.test.d.ts +1 -0
- package/dist/fancy-ui/ripple-button/RippleButton.test.js +44 -0
- package/dist/fancy-ui/ripple-button/index.d.ts +2 -0
- package/dist/fancy-ui/ripple-button/index.js +2 -0
- package/dist/fancy-ui/shimmer-button/README.md +10 -0
- package/dist/fancy-ui/shimmer-button/ShimmerButton.svelte +115 -0
- package/dist/fancy-ui/shimmer-button/ShimmerButton.svelte.d.ts +22 -0
- package/dist/fancy-ui/shimmer-button/ShimmerButton.test.d.ts +1 -0
- package/dist/fancy-ui/shimmer-button/ShimmerButton.test.js +69 -0
- package/dist/fancy-ui/shimmer-button/index.d.ts +2 -0
- package/dist/fancy-ui/shimmer-button/index.js +2 -0
- package/dist/fancy-ui/smooth-cursor/README.md +23 -0
- package/dist/fancy-ui/smooth-cursor/SmoothCursor.svelte +224 -0
- package/dist/fancy-ui/smooth-cursor/SmoothCursor.svelte.d.ts +20 -0
- package/dist/fancy-ui/smooth-cursor/index.d.ts +2 -0
- package/dist/fancy-ui/smooth-cursor/index.js +1 -0
- package/dist/fancy-ui/sparkles/README.md +15 -0
- package/dist/fancy-ui/sparkles/Sparkles.svelte +123 -0
- package/dist/fancy-ui/sparkles/Sparkles.svelte.d.ts +12 -0
- package/dist/fancy-ui/sparkles/Sparkles.test.d.ts +1 -0
- package/dist/fancy-ui/sparkles/Sparkles.test.js +66 -0
- package/dist/fancy-ui/sparkles/index.d.ts +1 -0
- package/dist/fancy-ui/sparkles/index.js +1 -0
- package/dist/fancy-ui/sparkles-text/README.md +19 -0
- package/dist/fancy-ui/sparkles-text/SparklesText.svelte +112 -0
- package/dist/fancy-ui/sparkles-text/SparklesText.svelte.d.ts +22 -0
- package/dist/fancy-ui/sparkles-text/SparklesText.test.d.ts +1 -0
- package/dist/fancy-ui/sparkles-text/SparklesText.test.js +54 -0
- package/dist/fancy-ui/sparkles-text/index.d.ts +2 -0
- package/dist/fancy-ui/sparkles-text/index.js +2 -0
- package/dist/fancy-ui/tailwind.css +3 -0
- package/dist/fancy-ui/text-generate-effect/README.md +14 -0
- package/dist/fancy-ui/text-generate-effect/TextGenerateEffect.svelte +66 -0
- package/dist/fancy-ui/text-generate-effect/TextGenerateEffect.svelte.d.ts +11 -0
- package/dist/fancy-ui/text-generate-effect/TextGenerateEffect.test.d.ts +1 -0
- package/dist/fancy-ui/text-generate-effect/TextGenerateEffect.test.js +73 -0
- package/dist/fancy-ui/text-generate-effect/index.d.ts +2 -0
- package/dist/fancy-ui/text-generate-effect/index.js +1 -0
- package/dist/fancy-ui/text-reveal-card/README.md +36 -0
- package/dist/fancy-ui/text-reveal-card/TextRevealCard.svelte +112 -0
- package/dist/fancy-ui/text-reveal-card/TextRevealCard.svelte.d.ts +12 -0
- package/dist/fancy-ui/text-reveal-card/TextRevealCard.test.d.ts +1 -0
- package/dist/fancy-ui/text-reveal-card/TextRevealCard.test.js +34 -0
- package/dist/fancy-ui/text-reveal-card/TextRevealStars.svelte +76 -0
- package/dist/fancy-ui/text-reveal-card/TextRevealStars.svelte.d.ts +7 -0
- package/dist/fancy-ui/text-reveal-card/index.d.ts +2 -0
- package/dist/fancy-ui/text-reveal-card/index.js +2 -0
- package/dist/fancy-ui/timeline/README.md +56 -0
- package/dist/fancy-ui/timeline/Timeline.svelte +141 -0
- package/dist/fancy-ui/timeline/Timeline.svelte.d.ts +20 -0
- package/dist/fancy-ui/timeline/Timeline.test.d.ts +1 -0
- package/dist/fancy-ui/timeline/Timeline.test.js +63 -0
- package/dist/fancy-ui/timeline/index.d.ts +2 -0
- package/dist/fancy-ui/timeline/index.js +2 -0
- package/dist/fancy-ui/tracing-beam/README.md +24 -0
- package/dist/fancy-ui/tracing-beam/TracingBeam.svelte +156 -0
- package/dist/fancy-ui/tracing-beam/TracingBeam.svelte.d.ts +8 -0
- package/dist/fancy-ui/tracing-beam/TracingBeam.test.d.ts +1 -0
- package/dist/fancy-ui/tracing-beam/TracingBeam.test.js +61 -0
- package/dist/fancy-ui/tracing-beam/index.d.ts +1 -0
- package/dist/fancy-ui/tracing-beam/index.js +1 -0
- package/dist/types.d.ts +87 -0
- package/dist/types.js +6 -0
- package/dist/utils.d.ts +12 -0
- package/dist/utils.js +5 -0
- package/package.json +105 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { render, cleanup } from "@testing-library/svelte";
|
|
2
|
+
import { afterEach, describe, it, expect } from "vitest";
|
|
3
|
+
import Book from "./Book.svelte";
|
|
4
|
+
describe("Book", () => {
|
|
5
|
+
afterEach(cleanup);
|
|
6
|
+
it("renders the component", () => {
|
|
7
|
+
const { container } = render(Book);
|
|
8
|
+
const wrapper = container.querySelector(".group");
|
|
9
|
+
expect(wrapper).toBeInTheDocument();
|
|
10
|
+
});
|
|
11
|
+
it("has perspective class", () => {
|
|
12
|
+
const { container } = render(Book);
|
|
13
|
+
const wrapper = container.querySelector(".group");
|
|
14
|
+
expect(wrapper?.className).toContain("[perspective:800px]");
|
|
15
|
+
});
|
|
16
|
+
it("applies default size (md = 220px)", () => {
|
|
17
|
+
const { container } = render(Book);
|
|
18
|
+
const inner = container.querySelector(".group > div");
|
|
19
|
+
expect(inner?.style.width).toBe("220px");
|
|
20
|
+
});
|
|
21
|
+
it("applies custom size", () => {
|
|
22
|
+
const { container } = render(Book, { props: { size: "lg" } });
|
|
23
|
+
const inner = container.querySelector(".group > div");
|
|
24
|
+
expect(inner?.style.width).toBe("260px");
|
|
25
|
+
});
|
|
26
|
+
it("applies static transform when isStatic", () => {
|
|
27
|
+
const { container } = render(Book, { props: { isStatic: true } });
|
|
28
|
+
const inner = container.querySelector(".group > div");
|
|
29
|
+
expect(inner?.className).toContain("[transform:rotateY(-30deg)]");
|
|
30
|
+
expect(inner?.className).not.toContain("group-hover");
|
|
31
|
+
});
|
|
32
|
+
it("applies hover transform by default", () => {
|
|
33
|
+
const { container } = render(Book);
|
|
34
|
+
const inner = container.querySelector(".group > div");
|
|
35
|
+
expect(inner?.className).toContain("group-hover:[transform:rotateY(-30deg)]");
|
|
36
|
+
});
|
|
37
|
+
it("applies custom class", () => {
|
|
38
|
+
const { container } = render(Book, { props: { class: "my-book" } });
|
|
39
|
+
const wrapper = container.querySelector(".group");
|
|
40
|
+
expect(wrapper?.className).toContain("my-book");
|
|
41
|
+
});
|
|
42
|
+
it("renders spine element", () => {
|
|
43
|
+
const { container } = render(Book);
|
|
44
|
+
const spine = container.querySelector('[style*="rotateY(90deg)"]');
|
|
45
|
+
expect(spine).toBeInTheDocument();
|
|
46
|
+
});
|
|
47
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from "../../utils";
|
|
3
|
+
import type { Snippet } from "svelte";
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
class?: string;
|
|
7
|
+
children?: Snippet;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
let { class: className = "", children }: Props = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<p class={cn("text-xs/relaxed select-none", className)}>
|
|
14
|
+
{#if children}
|
|
15
|
+
{@render children()}
|
|
16
|
+
{/if}
|
|
17
|
+
</p>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
interface Props {
|
|
3
|
+
class?: string;
|
|
4
|
+
children?: Snippet;
|
|
5
|
+
}
|
|
6
|
+
declare const BookDescription: import("svelte").Component<Props, {}, "">;
|
|
7
|
+
type BookDescription = ReturnType<typeof BookDescription>;
|
|
8
|
+
export default BookDescription;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from "../../utils";
|
|
3
|
+
import type { Snippet } from "svelte";
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
class?: string;
|
|
7
|
+
children?: Snippet;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
let { class: className = "", children }: Props = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div class={cn("flex flex-wrap gap-2", className)}>
|
|
14
|
+
{#if children}
|
|
15
|
+
{@render children()}
|
|
16
|
+
{/if}
|
|
17
|
+
</div>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from "../../utils";
|
|
3
|
+
import type { Snippet } from "svelte";
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
class?: string;
|
|
7
|
+
children?: Snippet;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
let { class: className = "", children }: Props = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<h1 class={cn("mt-3 mb-1 font-bold text-balance select-none", className)}>
|
|
14
|
+
{#if children}
|
|
15
|
+
{@render children()}
|
|
16
|
+
{/if}
|
|
17
|
+
</h1>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Book
|
|
2
|
+
|
|
3
|
+
A 3D book component with cover, spine, and back face. Opens on hover with a smooth rotation animation.
|
|
4
|
+
|
|
5
|
+
## Components
|
|
6
|
+
|
|
7
|
+
- `Book` — Main container with 3D perspective
|
|
8
|
+
- `BookHeader` — Flex container for tags/badges
|
|
9
|
+
- `BookTitle` — Bold heading for the book title
|
|
10
|
+
- `BookDescription` — Small text for description
|
|
11
|
+
|
|
12
|
+
## Props (Book)
|
|
13
|
+
|
|
14
|
+
| Prop | Type | Default | Description |
|
|
15
|
+
| ------------ | -------------- | -------- | ------------------------------ |
|
|
16
|
+
| `color` | `BookColor` | `"zinc"` | Gradient color (22 options) |
|
|
17
|
+
| `size` | `BookSize` | `"md"` | Width (sm/md/lg/xl) |
|
|
18
|
+
| `radius` | `BookRadius` | `"md"` | Border radius |
|
|
19
|
+
| `shadowSize` | `BookShadowSize` | `"lg"` | Back shadow size |
|
|
20
|
+
| `duration` | `number` | `1000` | Transition duration in ms |
|
|
21
|
+
| `isStatic` | `boolean` | `false` | Always show opened state |
|
|
22
|
+
| `class` | `string` | `""` | Additional CSS classes |
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
```svelte
|
|
27
|
+
<Book color="blue" size="md">
|
|
28
|
+
<BookHeader>
|
|
29
|
+
<span class="rounded bg-white/20 px-2 py-0.5 text-xs">New</span>
|
|
30
|
+
</BookHeader>
|
|
31
|
+
<BookTitle>My Book Title</BookTitle>
|
|
32
|
+
<BookDescription>A short description of the book.</BookDescription>
|
|
33
|
+
</Book>
|
|
34
|
+
```
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
export declare const BOOK_RADIUS_MAP: {
|
|
2
|
+
readonly sm: "rounded-sm";
|
|
3
|
+
readonly md: "rounded-md";
|
|
4
|
+
readonly lg: "rounded-lg";
|
|
5
|
+
readonly xl: "rounded-xl";
|
|
6
|
+
};
|
|
7
|
+
export declare const BOOK_SIZE_MAP: {
|
|
8
|
+
readonly sm: {
|
|
9
|
+
readonly width: "180px";
|
|
10
|
+
readonly spineTranslation: "152px";
|
|
11
|
+
};
|
|
12
|
+
readonly md: {
|
|
13
|
+
readonly width: "220px";
|
|
14
|
+
readonly spineTranslation: "192px";
|
|
15
|
+
};
|
|
16
|
+
readonly lg: {
|
|
17
|
+
readonly width: "260px";
|
|
18
|
+
readonly spineTranslation: "232px";
|
|
19
|
+
};
|
|
20
|
+
readonly xl: {
|
|
21
|
+
readonly width: "300px";
|
|
22
|
+
readonly spineTranslation: "272px";
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare const BOOK_SHADOW_SIZE_MAP: {
|
|
26
|
+
readonly sm: "-5px 0 15px 5px var(--shadowColor)";
|
|
27
|
+
readonly md: "-7px 0 25px 7px var(--shadowColor)";
|
|
28
|
+
readonly lg: "-10px 0 35px 10px var(--shadowColor)";
|
|
29
|
+
readonly xl: "-12px 0 45px 12px var(--shadowColor)";
|
|
30
|
+
};
|
|
31
|
+
export declare const BOOK_COLOR_MAP: {
|
|
32
|
+
readonly slate: {
|
|
33
|
+
readonly from: "from-slate-900";
|
|
34
|
+
readonly to: "to-slate-700";
|
|
35
|
+
};
|
|
36
|
+
readonly gray: {
|
|
37
|
+
readonly from: "from-gray-900";
|
|
38
|
+
readonly to: "to-gray-700";
|
|
39
|
+
};
|
|
40
|
+
readonly zinc: {
|
|
41
|
+
readonly from: "from-zinc-900";
|
|
42
|
+
readonly to: "to-zinc-700";
|
|
43
|
+
};
|
|
44
|
+
readonly neutral: {
|
|
45
|
+
readonly from: "from-neutral-900";
|
|
46
|
+
readonly to: "to-neutral-700";
|
|
47
|
+
};
|
|
48
|
+
readonly stone: {
|
|
49
|
+
readonly from: "from-stone-900";
|
|
50
|
+
readonly to: "to-stone-700";
|
|
51
|
+
};
|
|
52
|
+
readonly red: {
|
|
53
|
+
readonly from: "from-red-900";
|
|
54
|
+
readonly to: "to-red-700";
|
|
55
|
+
};
|
|
56
|
+
readonly orange: {
|
|
57
|
+
readonly from: "from-orange-900";
|
|
58
|
+
readonly to: "to-orange-700";
|
|
59
|
+
};
|
|
60
|
+
readonly amber: {
|
|
61
|
+
readonly from: "from-amber-900";
|
|
62
|
+
readonly to: "to-amber-700";
|
|
63
|
+
};
|
|
64
|
+
readonly yellow: {
|
|
65
|
+
readonly from: "from-yellow-900";
|
|
66
|
+
readonly to: "to-yellow-700";
|
|
67
|
+
};
|
|
68
|
+
readonly lime: {
|
|
69
|
+
readonly from: "from-lime-900";
|
|
70
|
+
readonly to: "to-lime-700";
|
|
71
|
+
};
|
|
72
|
+
readonly green: {
|
|
73
|
+
readonly from: "from-green-900";
|
|
74
|
+
readonly to: "to-green-700";
|
|
75
|
+
};
|
|
76
|
+
readonly emerald: {
|
|
77
|
+
readonly from: "from-emerald-900";
|
|
78
|
+
readonly to: "to-emerald-700";
|
|
79
|
+
};
|
|
80
|
+
readonly teal: {
|
|
81
|
+
readonly from: "from-teal-900";
|
|
82
|
+
readonly to: "to-teal-700";
|
|
83
|
+
};
|
|
84
|
+
readonly cyan: {
|
|
85
|
+
readonly from: "from-cyan-900";
|
|
86
|
+
readonly to: "to-cyan-700";
|
|
87
|
+
};
|
|
88
|
+
readonly sky: {
|
|
89
|
+
readonly from: "from-sky-900";
|
|
90
|
+
readonly to: "to-sky-700";
|
|
91
|
+
};
|
|
92
|
+
readonly blue: {
|
|
93
|
+
readonly from: "from-blue-900";
|
|
94
|
+
readonly to: "to-blue-700";
|
|
95
|
+
};
|
|
96
|
+
readonly indigo: {
|
|
97
|
+
readonly from: "from-indigo-900";
|
|
98
|
+
readonly to: "to-indigo-700";
|
|
99
|
+
};
|
|
100
|
+
readonly violet: {
|
|
101
|
+
readonly from: "from-violet-900";
|
|
102
|
+
readonly to: "to-violet-700";
|
|
103
|
+
};
|
|
104
|
+
readonly purple: {
|
|
105
|
+
readonly from: "from-purple-900";
|
|
106
|
+
readonly to: "to-purple-700";
|
|
107
|
+
};
|
|
108
|
+
readonly fuchsia: {
|
|
109
|
+
readonly from: "from-fuchsia-900";
|
|
110
|
+
readonly to: "to-fuchsia-700";
|
|
111
|
+
};
|
|
112
|
+
readonly pink: {
|
|
113
|
+
readonly from: "from-pink-900";
|
|
114
|
+
readonly to: "to-pink-700";
|
|
115
|
+
};
|
|
116
|
+
readonly rose: {
|
|
117
|
+
readonly from: "from-rose-900";
|
|
118
|
+
readonly to: "to-rose-700";
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
export type BookColor = keyof typeof BOOK_COLOR_MAP;
|
|
122
|
+
export type BookSize = keyof typeof BOOK_SIZE_MAP;
|
|
123
|
+
export type BookRadius = keyof typeof BOOK_RADIUS_MAP;
|
|
124
|
+
export type BookShadowSize = keyof typeof BOOK_SHADOW_SIZE_MAP;
|
|
125
|
+
export { default as Book } from "./Book.svelte";
|
|
126
|
+
export { default as BookHeader } from "./BookHeader.svelte";
|
|
127
|
+
export { default as BookTitle } from "./BookTitle.svelte";
|
|
128
|
+
export { default as BookDescription } from "./BookDescription.svelte";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export const BOOK_RADIUS_MAP = {
|
|
2
|
+
sm: "rounded-sm",
|
|
3
|
+
md: "rounded-md",
|
|
4
|
+
lg: "rounded-lg",
|
|
5
|
+
xl: "rounded-xl",
|
|
6
|
+
};
|
|
7
|
+
export const BOOK_SIZE_MAP = {
|
|
8
|
+
sm: { width: "180px", spineTranslation: "152px" },
|
|
9
|
+
md: { width: "220px", spineTranslation: "192px" },
|
|
10
|
+
lg: { width: "260px", spineTranslation: "232px" },
|
|
11
|
+
xl: { width: "300px", spineTranslation: "272px" },
|
|
12
|
+
};
|
|
13
|
+
export const BOOK_SHADOW_SIZE_MAP = {
|
|
14
|
+
sm: "-5px 0 15px 5px var(--shadowColor)",
|
|
15
|
+
md: "-7px 0 25px 7px var(--shadowColor)",
|
|
16
|
+
lg: "-10px 0 35px 10px var(--shadowColor)",
|
|
17
|
+
xl: "-12px 0 45px 12px var(--shadowColor)",
|
|
18
|
+
};
|
|
19
|
+
export const BOOK_COLOR_MAP = {
|
|
20
|
+
slate: { from: "from-slate-900", to: "to-slate-700" },
|
|
21
|
+
gray: { from: "from-gray-900", to: "to-gray-700" },
|
|
22
|
+
zinc: { from: "from-zinc-900", to: "to-zinc-700" },
|
|
23
|
+
neutral: { from: "from-neutral-900", to: "to-neutral-700" },
|
|
24
|
+
stone: { from: "from-stone-900", to: "to-stone-700" },
|
|
25
|
+
red: { from: "from-red-900", to: "to-red-700" },
|
|
26
|
+
orange: { from: "from-orange-900", to: "to-orange-700" },
|
|
27
|
+
amber: { from: "from-amber-900", to: "to-amber-700" },
|
|
28
|
+
yellow: { from: "from-yellow-900", to: "to-yellow-700" },
|
|
29
|
+
lime: { from: "from-lime-900", to: "to-lime-700" },
|
|
30
|
+
green: { from: "from-green-900", to: "to-green-700" },
|
|
31
|
+
emerald: { from: "from-emerald-900", to: "to-emerald-700" },
|
|
32
|
+
teal: { from: "from-teal-900", to: "to-teal-700" },
|
|
33
|
+
cyan: { from: "from-cyan-900", to: "to-cyan-700" },
|
|
34
|
+
sky: { from: "from-sky-900", to: "to-sky-700" },
|
|
35
|
+
blue: { from: "from-blue-900", to: "to-blue-700" },
|
|
36
|
+
indigo: { from: "from-indigo-900", to: "to-indigo-700" },
|
|
37
|
+
violet: { from: "from-violet-900", to: "to-violet-700" },
|
|
38
|
+
purple: { from: "from-purple-900", to: "to-purple-700" },
|
|
39
|
+
fuchsia: { from: "from-fuchsia-900", to: "to-fuchsia-700" },
|
|
40
|
+
pink: { from: "from-pink-900", to: "to-pink-700" },
|
|
41
|
+
rose: { from: "from-rose-900", to: "to-rose-700" },
|
|
42
|
+
};
|
|
43
|
+
export { default as Book } from "./Book.svelte";
|
|
44
|
+
export { default as BookHeader } from "./BookHeader.svelte";
|
|
45
|
+
export { default as BookTitle } from "./BookTitle.svelte";
|
|
46
|
+
export { default as BookDescription } from "./BookDescription.svelte";
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
/**
|
|
3
|
+
* BorderBeam - Animated beam effect that travels around the border
|
|
4
|
+
*
|
|
5
|
+
* Place inside a container with `position: relative` and `overflow: hidden`.
|
|
6
|
+
* The beam will animate around the container's border.
|
|
7
|
+
*/
|
|
8
|
+
export interface BorderBeamProps {
|
|
9
|
+
/** Additional CSS classes */
|
|
10
|
+
class?: string;
|
|
11
|
+
/** Size of the beam in pixels */
|
|
12
|
+
size?: number;
|
|
13
|
+
/** Animation duration in seconds */
|
|
14
|
+
duration?: number;
|
|
15
|
+
/** Border width in pixels */
|
|
16
|
+
borderWidth?: number;
|
|
17
|
+
/** Anchor position (0-100) */
|
|
18
|
+
anchor?: number;
|
|
19
|
+
/** Gradient start color */
|
|
20
|
+
colorFrom?: string;
|
|
21
|
+
/** Gradient end color */
|
|
22
|
+
colorTo?: string;
|
|
23
|
+
/** Animation delay in seconds */
|
|
24
|
+
delay?: number;
|
|
25
|
+
}
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<script lang="ts">
|
|
29
|
+
import { cn } from "../../utils.js";
|
|
30
|
+
|
|
31
|
+
let {
|
|
32
|
+
class: className,
|
|
33
|
+
size = 200,
|
|
34
|
+
duration = 15,
|
|
35
|
+
borderWidth = 1.5,
|
|
36
|
+
anchor = 90,
|
|
37
|
+
colorFrom = "#ffaa40",
|
|
38
|
+
colorTo = "#9c40ff",
|
|
39
|
+
delay = 0,
|
|
40
|
+
}: BorderBeamProps = $props();
|
|
41
|
+
|
|
42
|
+
const style = $derived(
|
|
43
|
+
[
|
|
44
|
+
`--border-beam-size: ${size}`,
|
|
45
|
+
`--border-beam-duration: ${duration}s`,
|
|
46
|
+
`--border-beam-anchor: ${anchor}`,
|
|
47
|
+
`--border-beam-border-width: ${borderWidth}`,
|
|
48
|
+
`--border-beam-color-from: ${colorFrom}`,
|
|
49
|
+
`--border-beam-color-to: ${colorTo}`,
|
|
50
|
+
`--border-beam-delay: ${delay}s`,
|
|
51
|
+
].join(";")
|
|
52
|
+
);
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<div
|
|
56
|
+
class={cn(
|
|
57
|
+
"border-beam",
|
|
58
|
+
"pointer-events-none absolute inset-0 rounded-[inherit]",
|
|
59
|
+
"[border:calc(var(--border-beam-border-width)*1px)_solid_transparent]",
|
|
60
|
+
"![mask-composite:intersect] ![mask-clip:padding-box,border-box] [mask:linear-gradient(transparent,transparent),linear-gradient(white,white)]",
|
|
61
|
+
"after:absolute after:aspect-square after:w-[calc(var(--border-beam-size)*1px)]",
|
|
62
|
+
"after:[animation-delay:var(--border-beam-delay)]",
|
|
63
|
+
"after:[background:linear-gradient(to_left,var(--border-beam-color-from),var(--border-beam-color-to),transparent)]",
|
|
64
|
+
"after:[offset-anchor:calc(var(--border-beam-anchor)*1%)_50%]",
|
|
65
|
+
"after:[offset-path:rect(0_auto_auto_0_round_calc(var(--border-beam-size)*1px))]",
|
|
66
|
+
className
|
|
67
|
+
)}
|
|
68
|
+
{style}
|
|
69
|
+
></div>
|
|
70
|
+
|
|
71
|
+
<style>
|
|
72
|
+
.border-beam::after {
|
|
73
|
+
content: "";
|
|
74
|
+
animation: border-beam-animation var(--border-beam-duration) infinite linear;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@keyframes border-beam-animation {
|
|
78
|
+
0% {
|
|
79
|
+
offset-distance: 0%;
|
|
80
|
+
}
|
|
81
|
+
100% {
|
|
82
|
+
offset-distance: 100%;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
</style>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BorderBeam - Animated beam effect that travels around the border
|
|
3
|
+
*
|
|
4
|
+
* Place inside a container with `position: relative` and `overflow: hidden`.
|
|
5
|
+
* The beam will animate around the container's border.
|
|
6
|
+
*/
|
|
7
|
+
export interface BorderBeamProps {
|
|
8
|
+
/** Additional CSS classes */
|
|
9
|
+
class?: string;
|
|
10
|
+
/** Size of the beam in pixels */
|
|
11
|
+
size?: number;
|
|
12
|
+
/** Animation duration in seconds */
|
|
13
|
+
duration?: number;
|
|
14
|
+
/** Border width in pixels */
|
|
15
|
+
borderWidth?: number;
|
|
16
|
+
/** Anchor position (0-100) */
|
|
17
|
+
anchor?: number;
|
|
18
|
+
/** Gradient start color */
|
|
19
|
+
colorFrom?: string;
|
|
20
|
+
/** Gradient end color */
|
|
21
|
+
colorTo?: string;
|
|
22
|
+
/** Animation delay in seconds */
|
|
23
|
+
delay?: number;
|
|
24
|
+
}
|
|
25
|
+
declare const BorderBeam: import("svelte").Component<BorderBeamProps, {}, "">;
|
|
26
|
+
type BorderBeam = ReturnType<typeof BorderBeam>;
|
|
27
|
+
export default BorderBeam;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { render, cleanup } from "@testing-library/svelte";
|
|
2
|
+
import { afterEach, describe, it, expect } from "vitest";
|
|
3
|
+
import BorderBeam from "./BorderBeam.svelte";
|
|
4
|
+
describe("BorderBeam", () => {
|
|
5
|
+
afterEach(cleanup);
|
|
6
|
+
it("renders a div element", () => {
|
|
7
|
+
const { container } = render(BorderBeam);
|
|
8
|
+
const div = container.querySelector(".border-beam");
|
|
9
|
+
expect(div).toBeInTheDocument();
|
|
10
|
+
});
|
|
11
|
+
it("applies default CSS custom properties", () => {
|
|
12
|
+
const { container } = render(BorderBeam);
|
|
13
|
+
const div = container.querySelector(".border-beam");
|
|
14
|
+
const style = div.getAttribute("style") ?? "";
|
|
15
|
+
expect(style).toContain("--border-beam-size: 200");
|
|
16
|
+
expect(style).toContain("--border-beam-duration: 15s");
|
|
17
|
+
expect(style).toContain("--border-beam-anchor: 90");
|
|
18
|
+
expect(style).toContain("--border-beam-border-width: 1.5");
|
|
19
|
+
expect(style).toContain("--border-beam-color-from: #ffaa40");
|
|
20
|
+
expect(style).toContain("--border-beam-color-to: #9c40ff");
|
|
21
|
+
expect(style).toContain("--border-beam-delay: 0s");
|
|
22
|
+
});
|
|
23
|
+
it("applies custom size", () => {
|
|
24
|
+
const { container } = render(BorderBeam, { props: { size: 300 } });
|
|
25
|
+
const div = container.querySelector(".border-beam");
|
|
26
|
+
expect(div.getAttribute("style")).toContain("--border-beam-size: 300");
|
|
27
|
+
});
|
|
28
|
+
it("applies custom duration", () => {
|
|
29
|
+
const { container } = render(BorderBeam, { props: { duration: 5 } });
|
|
30
|
+
const div = container.querySelector(".border-beam");
|
|
31
|
+
expect(div.getAttribute("style")).toContain("--border-beam-duration: 5s");
|
|
32
|
+
});
|
|
33
|
+
it("applies custom colors", () => {
|
|
34
|
+
const { container } = render(BorderBeam, {
|
|
35
|
+
props: { colorFrom: "#ff0000", colorTo: "#00ff00" },
|
|
36
|
+
});
|
|
37
|
+
const div = container.querySelector(".border-beam");
|
|
38
|
+
const style = div.getAttribute("style") ?? "";
|
|
39
|
+
expect(style).toContain("--border-beam-color-from: #ff0000");
|
|
40
|
+
expect(style).toContain("--border-beam-color-to: #00ff00");
|
|
41
|
+
});
|
|
42
|
+
it("applies custom delay", () => {
|
|
43
|
+
const { container } = render(BorderBeam, { props: { delay: 3 } });
|
|
44
|
+
const div = container.querySelector(".border-beam");
|
|
45
|
+
expect(div.getAttribute("style")).toContain("--border-beam-delay: 3s");
|
|
46
|
+
});
|
|
47
|
+
it("applies custom borderWidth", () => {
|
|
48
|
+
const { container } = render(BorderBeam, { props: { borderWidth: 3 } });
|
|
49
|
+
const div = container.querySelector(".border-beam");
|
|
50
|
+
expect(div.getAttribute("style")).toContain("--border-beam-border-width: 3");
|
|
51
|
+
});
|
|
52
|
+
it("applies custom class names", () => {
|
|
53
|
+
const { container } = render(BorderBeam, { props: { class: "my-beam" } });
|
|
54
|
+
const div = container.querySelector(".border-beam");
|
|
55
|
+
expect(div?.className).toContain("my-beam");
|
|
56
|
+
});
|
|
57
|
+
it("preserves base classes when custom class is added", () => {
|
|
58
|
+
const { container } = render(BorderBeam, { props: { class: "extra" } });
|
|
59
|
+
const div = container.querySelector(".border-beam");
|
|
60
|
+
expect(div?.className).toContain("pointer-events-none");
|
|
61
|
+
expect(div?.className).toContain("absolute");
|
|
62
|
+
expect(div?.className).toContain("inset-0");
|
|
63
|
+
});
|
|
64
|
+
});
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
/**
|
|
3
|
+
* BoxReveal - Sliding box reveal animation
|
|
4
|
+
*
|
|
5
|
+
* Content fades up while a colored box slides from left to right,
|
|
6
|
+
* revealing the content underneath. Triggers when entering viewport
|
|
7
|
+
* via IntersectionObserver.
|
|
8
|
+
*/
|
|
9
|
+
export interface BoxRevealProps {
|
|
10
|
+
/** Color of the reveal box */
|
|
11
|
+
color?: string;
|
|
12
|
+
/** Animation duration in seconds */
|
|
13
|
+
duration?: number;
|
|
14
|
+
/** Delay before animation starts (seconds) */
|
|
15
|
+
delay?: number;
|
|
16
|
+
/** Additional CSS classes */
|
|
17
|
+
class?: string;
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<script lang="ts">
|
|
22
|
+
import { cn } from "../../utils.js";
|
|
23
|
+
import { onMount } from "svelte";
|
|
24
|
+
import type { Snippet } from "svelte";
|
|
25
|
+
|
|
26
|
+
let {
|
|
27
|
+
color = "#5046e6",
|
|
28
|
+
duration = 0.5,
|
|
29
|
+
delay = 0.25,
|
|
30
|
+
class: className,
|
|
31
|
+
children,
|
|
32
|
+
}: BoxRevealProps & { children: Snippet } = $props();
|
|
33
|
+
|
|
34
|
+
let containerRef: HTMLDivElement;
|
|
35
|
+
let isInView = $state(false);
|
|
36
|
+
|
|
37
|
+
onMount(() => {
|
|
38
|
+
const observer = new IntersectionObserver(
|
|
39
|
+
(entries) => {
|
|
40
|
+
if (entries[0]?.isIntersecting) {
|
|
41
|
+
isInView = true;
|
|
42
|
+
observer.disconnect();
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{ threshold: 0.1 }
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
observer.observe(containerRef);
|
|
49
|
+
|
|
50
|
+
return () => observer.disconnect();
|
|
51
|
+
});
|
|
52
|
+
</script>
|
|
53
|
+
|
|
54
|
+
<div bind:this={containerRef} class={cn("box-reveal relative overflow-hidden", className)}>
|
|
55
|
+
<!-- Content (fades up) -->
|
|
56
|
+
<div
|
|
57
|
+
class="box-reveal-content"
|
|
58
|
+
style="opacity:{isInView ? 1 : 0};transform:translateY({isInView
|
|
59
|
+
? 0
|
|
60
|
+
: 25}px);transition:opacity {duration}s ease {delay * 2}s,transform {duration}s ease {delay *
|
|
61
|
+
2}s"
|
|
62
|
+
>
|
|
63
|
+
{@render children()}
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<!-- Sliding box overlay -->
|
|
67
|
+
<div
|
|
68
|
+
class="box-reveal-overlay absolute inset-0 z-20"
|
|
69
|
+
style="background:{color};left:{isInView
|
|
70
|
+
? '100%'
|
|
71
|
+
: '0%'};transition:left {duration}s ease-in {delay}s"
|
|
72
|
+
></div>
|
|
73
|
+
</div>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BoxReveal - Sliding box reveal animation
|
|
3
|
+
*
|
|
4
|
+
* Content fades up while a colored box slides from left to right,
|
|
5
|
+
* revealing the content underneath. Triggers when entering viewport
|
|
6
|
+
* via IntersectionObserver.
|
|
7
|
+
*/
|
|
8
|
+
export interface BoxRevealProps {
|
|
9
|
+
/** Color of the reveal box */
|
|
10
|
+
color?: string;
|
|
11
|
+
/** Animation duration in seconds */
|
|
12
|
+
duration?: number;
|
|
13
|
+
/** Delay before animation starts (seconds) */
|
|
14
|
+
delay?: number;
|
|
15
|
+
/** Additional CSS classes */
|
|
16
|
+
class?: string;
|
|
17
|
+
}
|
|
18
|
+
import type { Snippet } from "svelte";
|
|
19
|
+
type $$ComponentProps = BoxRevealProps & {
|
|
20
|
+
children: Snippet;
|
|
21
|
+
};
|
|
22
|
+
declare const BoxReveal: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
23
|
+
type BoxReveal = ReturnType<typeof BoxReveal>;
|
|
24
|
+
export default BoxReveal;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|