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,20 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
export interface TimelineItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
export interface TimelineProps {
|
|
7
|
+
/** Timeline entries */
|
|
8
|
+
items?: TimelineItem[];
|
|
9
|
+
/** Heading text */
|
|
10
|
+
title?: string;
|
|
11
|
+
/** Subheading text */
|
|
12
|
+
description?: string;
|
|
13
|
+
/** Additional CSS classes for the outer wrapper */
|
|
14
|
+
class?: string;
|
|
15
|
+
/** Content snippet, called for each item */
|
|
16
|
+
content?: Snippet<[TimelineItem]>;
|
|
17
|
+
}
|
|
18
|
+
declare const Timeline: import("svelte").Component<TimelineProps, {}, "">;
|
|
19
|
+
type Timeline = ReturnType<typeof Timeline>;
|
|
20
|
+
export default Timeline;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { render, cleanup } from "@testing-library/svelte";
|
|
2
|
+
import { afterEach, beforeEach, describe, it, expect, vi } from "vitest";
|
|
3
|
+
import Timeline from "./Timeline.svelte";
|
|
4
|
+
const mockItems = [
|
|
5
|
+
{ id: "one", label: "2020" },
|
|
6
|
+
{ id: "two", label: "2021" },
|
|
7
|
+
{ id: "three", label: "2022" },
|
|
8
|
+
];
|
|
9
|
+
describe("Timeline", () => {
|
|
10
|
+
beforeEach(() => {
|
|
11
|
+
// Mock ResizeObserver (not available in jsdom) - must be a class
|
|
12
|
+
global.ResizeObserver = class {
|
|
13
|
+
observe = vi.fn();
|
|
14
|
+
unobserve = vi.fn();
|
|
15
|
+
disconnect = vi.fn();
|
|
16
|
+
};
|
|
17
|
+
});
|
|
18
|
+
afterEach(cleanup);
|
|
19
|
+
it("renders a container div", () => {
|
|
20
|
+
const { container } = render(Timeline);
|
|
21
|
+
const div = container.firstElementChild;
|
|
22
|
+
expect(div).toBeInTheDocument();
|
|
23
|
+
});
|
|
24
|
+
it("has w-full class", () => {
|
|
25
|
+
const { container } = render(Timeline);
|
|
26
|
+
const div = container.firstElementChild;
|
|
27
|
+
expect(div?.className).toContain("w-full");
|
|
28
|
+
});
|
|
29
|
+
it("renders title when provided", () => {
|
|
30
|
+
const { container } = render(Timeline, { props: { title: "My Timeline" } });
|
|
31
|
+
const h2 = container.querySelector("h2");
|
|
32
|
+
expect(h2).toBeInTheDocument();
|
|
33
|
+
expect(h2?.textContent).toBe("My Timeline");
|
|
34
|
+
});
|
|
35
|
+
it("renders description when provided", () => {
|
|
36
|
+
const { container } = render(Timeline, {
|
|
37
|
+
props: { title: "Title", description: "My description" },
|
|
38
|
+
});
|
|
39
|
+
const p = container.querySelector("p");
|
|
40
|
+
expect(p?.textContent).toBe("My description");
|
|
41
|
+
});
|
|
42
|
+
it("does not render header section when no title or description", () => {
|
|
43
|
+
const { container } = render(Timeline);
|
|
44
|
+
const h2 = container.querySelector("h2");
|
|
45
|
+
expect(h2).not.toBeInTheDocument();
|
|
46
|
+
});
|
|
47
|
+
it("renders one entry per item", () => {
|
|
48
|
+
const { container } = render(Timeline, { props: { items: mockItems } });
|
|
49
|
+
const labels = container.querySelectorAll("h3");
|
|
50
|
+
expect(labels.length).toBe(3);
|
|
51
|
+
});
|
|
52
|
+
it("displays item labels", () => {
|
|
53
|
+
const { container } = render(Timeline, { props: { items: mockItems } });
|
|
54
|
+
const labels = container.querySelectorAll("h3");
|
|
55
|
+
expect(labels[0].textContent).toBe("2020");
|
|
56
|
+
expect(labels[1].textContent).toBe("2021");
|
|
57
|
+
});
|
|
58
|
+
it("applies custom class names", () => {
|
|
59
|
+
const { container } = render(Timeline, { props: { class: "my-timeline" } });
|
|
60
|
+
const div = container.firstElementChild;
|
|
61
|
+
expect(div?.className).toContain("my-timeline");
|
|
62
|
+
});
|
|
63
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# TracingBeam
|
|
2
|
+
|
|
3
|
+
Vertical SVG beam that highlights scroll progress alongside content.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Prop | Type | Default | Description |
|
|
8
|
+
|------|------|---------|-------------|
|
|
9
|
+
| `class` | `string` | `''` | Additional CSS classes |
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
Wrap your content inside TracingBeam:
|
|
14
|
+
|
|
15
|
+
```svelte
|
|
16
|
+
<TracingBeam>
|
|
17
|
+
<article>
|
|
18
|
+
<h2>Section 1</h2>
|
|
19
|
+
<p>Content here...</p>
|
|
20
|
+
<h2>Section 2</h2>
|
|
21
|
+
<p>More content...</p>
|
|
22
|
+
</article>
|
|
23
|
+
</TracingBeam>
|
|
24
|
+
```
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from "../../utils";
|
|
3
|
+
import { onMount } from "svelte";
|
|
4
|
+
import type { Snippet } from "svelte";
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
class?: string;
|
|
8
|
+
children?: Snippet;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
let { class: className = "", children }: Props = $props();
|
|
12
|
+
|
|
13
|
+
let tracingBeamRef: HTMLDivElement;
|
|
14
|
+
let contentRef: HTMLDivElement;
|
|
15
|
+
let svgHeight = $state(0);
|
|
16
|
+
let scrollYProgress = $state(0);
|
|
17
|
+
let scrollPercentage = $state(0);
|
|
18
|
+
|
|
19
|
+
// Spring state
|
|
20
|
+
let springY1 = $state(0);
|
|
21
|
+
let springY2 = $state(0);
|
|
22
|
+
let springVelY1 = 0;
|
|
23
|
+
let springVelY2 = 0;
|
|
24
|
+
|
|
25
|
+
let targetY1 = $derived(
|
|
26
|
+
mapRange(scrollYProgress, 0, 0.8, scrollYProgress, svgHeight) * (1.4 - scrollPercentage)
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
let targetY2 = $derived(
|
|
30
|
+
mapRange(scrollYProgress, 0, 1, scrollYProgress, svgHeight - 500) * (1.4 - scrollPercentage)
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
let circleHasShadow = $derived(scrollYProgress <= 0);
|
|
34
|
+
let circleBg = $derived(scrollYProgress > 0 ? "bg-white" : "bg-emerald-500");
|
|
35
|
+
let circleBorder = $derived(scrollYProgress > 0 ? "border-neutral-300" : "border-emerald-600");
|
|
36
|
+
|
|
37
|
+
let svgPath = $derived(`M 1 0V -36 l 18 24 V ${svgHeight * 0.8} l -18 24V ${svgHeight}`);
|
|
38
|
+
|
|
39
|
+
let rafId: number;
|
|
40
|
+
|
|
41
|
+
function mapRange(
|
|
42
|
+
value: number,
|
|
43
|
+
inMin: number,
|
|
44
|
+
inMax: number,
|
|
45
|
+
outMin: number,
|
|
46
|
+
outMax: number
|
|
47
|
+
): number {
|
|
48
|
+
return ((value - inMin) * (outMax - outMin)) / (inMax - inMin) + outMin;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function updateSpring() {
|
|
52
|
+
const tension = 80;
|
|
53
|
+
const friction = 26;
|
|
54
|
+
const precision = 0.01;
|
|
55
|
+
|
|
56
|
+
const forceY1 = tension * (targetY1 - springY1);
|
|
57
|
+
springVelY1 = (springVelY1 + forceY1 * 0.001) * (1 - friction * 0.001);
|
|
58
|
+
springY1 += springVelY1;
|
|
59
|
+
|
|
60
|
+
const forceY2 = tension * (targetY2 - springY2);
|
|
61
|
+
springVelY2 = (springVelY2 + forceY2 * 0.001) * (1 - friction * 0.001);
|
|
62
|
+
springY2 += springVelY2;
|
|
63
|
+
|
|
64
|
+
const settled =
|
|
65
|
+
Math.abs(springVelY1) < precision &&
|
|
66
|
+
Math.abs(targetY1 - springY1) < precision &&
|
|
67
|
+
Math.abs(springVelY2) < precision &&
|
|
68
|
+
Math.abs(targetY2 - springY2) < precision;
|
|
69
|
+
|
|
70
|
+
if (!settled) {
|
|
71
|
+
rafId = requestAnimationFrame(updateSpring);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function updateScrollProgress() {
|
|
76
|
+
if (!tracingBeamRef) return;
|
|
77
|
+
const rect = tracingBeamRef.getBoundingClientRect();
|
|
78
|
+
const windowHeight = window.innerHeight;
|
|
79
|
+
const elementHeight = rect.height;
|
|
80
|
+
|
|
81
|
+
scrollPercentage = (windowHeight - rect.top) / (windowHeight + elementHeight);
|
|
82
|
+
scrollYProgress = (rect.y / windowHeight) * -1;
|
|
83
|
+
|
|
84
|
+
cancelAnimationFrame(rafId);
|
|
85
|
+
rafId = requestAnimationFrame(updateSpring);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function updateSVGHeight() {
|
|
89
|
+
if (!contentRef) return;
|
|
90
|
+
svgHeight = contentRef.offsetHeight;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
onMount(() => {
|
|
94
|
+
window.addEventListener("scroll", updateScrollProgress, { passive: true });
|
|
95
|
+
window.addEventListener("resize", updateScrollProgress, { passive: true });
|
|
96
|
+
updateScrollProgress();
|
|
97
|
+
|
|
98
|
+
const resizeObserver = new ResizeObserver(updateSVGHeight);
|
|
99
|
+
resizeObserver.observe(contentRef);
|
|
100
|
+
updateSVGHeight();
|
|
101
|
+
|
|
102
|
+
return () => {
|
|
103
|
+
cancelAnimationFrame(rafId);
|
|
104
|
+
window.removeEventListener("scroll", updateScrollProgress);
|
|
105
|
+
window.removeEventListener("resize", updateScrollProgress);
|
|
106
|
+
resizeObserver.disconnect();
|
|
107
|
+
};
|
|
108
|
+
});
|
|
109
|
+
</script>
|
|
110
|
+
|
|
111
|
+
<div bind:this={tracingBeamRef} class={cn("relative mx-auto h-full w-full max-w-4xl", className)}>
|
|
112
|
+
<div class="absolute top-3 -left-4 md:-left-12">
|
|
113
|
+
<div
|
|
114
|
+
class="ml-[27px] flex size-4 items-center justify-center rounded-full border border-neutral-200 shadow-sm"
|
|
115
|
+
style:box-shadow={circleHasShadow ? "rgba(0, 0, 0, 0.24) 0px 3px 8px" : "none"}
|
|
116
|
+
>
|
|
117
|
+
<div class={cn("size-2 rounded-full border", circleBg, circleBorder)}></div>
|
|
118
|
+
</div>
|
|
119
|
+
<svg
|
|
120
|
+
viewBox="0 0 20 {svgHeight}"
|
|
121
|
+
width="20"
|
|
122
|
+
height={svgHeight}
|
|
123
|
+
class="ml-4 block"
|
|
124
|
+
aria-hidden="true"
|
|
125
|
+
>
|
|
126
|
+
<path d={svgPath} fill="none" stroke="#9091A0" stroke-opacity="0.16"></path>
|
|
127
|
+
<path
|
|
128
|
+
d={svgPath}
|
|
129
|
+
fill="none"
|
|
130
|
+
stroke="url(#tracing-beam-gradient)"
|
|
131
|
+
stroke-width="1.25"
|
|
132
|
+
class="motion-reduce:hidden"
|
|
133
|
+
></path>
|
|
134
|
+
<defs>
|
|
135
|
+
<linearGradient
|
|
136
|
+
id="tracing-beam-gradient"
|
|
137
|
+
gradientUnits="userSpaceOnUse"
|
|
138
|
+
x1="0"
|
|
139
|
+
x2="0"
|
|
140
|
+
y1={springY1}
|
|
141
|
+
y2={springY2}
|
|
142
|
+
>
|
|
143
|
+
<stop stop-color="#18CCFC" stop-opacity="0"></stop>
|
|
144
|
+
<stop stop-color="#18CCFC"></stop>
|
|
145
|
+
<stop offset="0.325" stop-color="#6344F5"></stop>
|
|
146
|
+
<stop offset="1" stop-color="#AE48FF" stop-opacity="0"></stop>
|
|
147
|
+
</linearGradient>
|
|
148
|
+
</defs>
|
|
149
|
+
</svg>
|
|
150
|
+
</div>
|
|
151
|
+
<div bind:this={contentRef}>
|
|
152
|
+
{#if children}
|
|
153
|
+
{@render children()}
|
|
154
|
+
{/if}
|
|
155
|
+
</div>
|
|
156
|
+
</div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { render, cleanup } from "@testing-library/svelte";
|
|
2
|
+
import { afterEach, beforeEach, describe, it, expect, vi } from "vitest";
|
|
3
|
+
import TracingBeam from "./TracingBeam.svelte";
|
|
4
|
+
describe("TracingBeam", () => {
|
|
5
|
+
beforeEach(() => {
|
|
6
|
+
vi.stubGlobal("ResizeObserver", class {
|
|
7
|
+
observe = vi.fn();
|
|
8
|
+
unobserve = vi.fn();
|
|
9
|
+
disconnect = vi.fn();
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
afterEach(() => {
|
|
13
|
+
cleanup();
|
|
14
|
+
vi.restoreAllMocks();
|
|
15
|
+
});
|
|
16
|
+
it("renders container div", () => {
|
|
17
|
+
const { container } = render(TracingBeam);
|
|
18
|
+
const div = container.firstElementChild;
|
|
19
|
+
expect(div).toBeInTheDocument();
|
|
20
|
+
expect(div.tagName).toBe("DIV");
|
|
21
|
+
});
|
|
22
|
+
it("renders SVG element", () => {
|
|
23
|
+
const { container } = render(TracingBeam);
|
|
24
|
+
const svg = container.querySelector("svg");
|
|
25
|
+
expect(svg).toBeInTheDocument();
|
|
26
|
+
});
|
|
27
|
+
it("SVG has aria-hidden attribute", () => {
|
|
28
|
+
const { container } = render(TracingBeam);
|
|
29
|
+
const svg = container.querySelector("svg");
|
|
30
|
+
expect(svg?.getAttribute("aria-hidden")).toBe("true");
|
|
31
|
+
});
|
|
32
|
+
it("renders circle indicator", () => {
|
|
33
|
+
const { container } = render(TracingBeam);
|
|
34
|
+
const outerCircle = container.querySelector(".rounded-full.border");
|
|
35
|
+
expect(outerCircle).toBeInTheDocument();
|
|
36
|
+
const innerCircle = outerCircle?.querySelector(".rounded-full");
|
|
37
|
+
expect(innerCircle).toBeInTheDocument();
|
|
38
|
+
});
|
|
39
|
+
it("applies custom class", () => {
|
|
40
|
+
const { container } = render(TracingBeam, { props: { class: "my-beam" } });
|
|
41
|
+
const div = container.firstElementChild;
|
|
42
|
+
expect(div?.className).toContain("my-beam");
|
|
43
|
+
});
|
|
44
|
+
it("preserves base classes when custom class is added", () => {
|
|
45
|
+
const { container } = render(TracingBeam, { props: { class: "extra" } });
|
|
46
|
+
const div = container.firstElementChild;
|
|
47
|
+
expect(div?.className).toContain("relative");
|
|
48
|
+
expect(div?.className).toContain("mx-auto");
|
|
49
|
+
expect(div?.className).toContain("max-w-4xl");
|
|
50
|
+
});
|
|
51
|
+
it("renders gradient definition in SVG", () => {
|
|
52
|
+
const { container } = render(TracingBeam);
|
|
53
|
+
const gradient = container.querySelector("#tracing-beam-gradient");
|
|
54
|
+
expect(gradient).toBeInTheDocument();
|
|
55
|
+
});
|
|
56
|
+
it("renders two path elements in SVG", () => {
|
|
57
|
+
const { container } = render(TracingBeam);
|
|
58
|
+
const paths = container.querySelectorAll("svg path");
|
|
59
|
+
expect(paths.length).toBe(2);
|
|
60
|
+
});
|
|
61
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TracingBeam } from "./TracingBeam.svelte";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TracingBeam } from "./TracingBeam.svelte";
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared component types for FancyUI
|
|
3
|
+
*
|
|
4
|
+
* These types provide a consistent foundation for all implemented components.
|
|
5
|
+
*/
|
|
6
|
+
import type { Snippet } from "svelte";
|
|
7
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
8
|
+
/**
|
|
9
|
+
* Base props shared by all FancyUI components
|
|
10
|
+
*/
|
|
11
|
+
export interface BaseComponentProps {
|
|
12
|
+
/** Additional CSS classes to apply */
|
|
13
|
+
class?: string;
|
|
14
|
+
/** Component content (Svelte 5 snippet) */
|
|
15
|
+
children?: Snippet;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Props for components with animation capabilities
|
|
19
|
+
*/
|
|
20
|
+
export interface AnimatedComponentProps extends BaseComponentProps {
|
|
21
|
+
/** Animation duration in seconds */
|
|
22
|
+
duration?: number;
|
|
23
|
+
/** Animation delay in seconds */
|
|
24
|
+
delay?: number;
|
|
25
|
+
/** Whether animation is paused */
|
|
26
|
+
paused?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Props for components that track mouse/pointer position
|
|
30
|
+
*/
|
|
31
|
+
export interface InteractiveComponentProps extends BaseComponentProps {
|
|
32
|
+
/** Whether interaction is disabled */
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Props for polymorphic components (button/anchor)
|
|
37
|
+
*/
|
|
38
|
+
export interface PolymorphicButtonProps extends BaseComponentProps {
|
|
39
|
+
/** Render as anchor element when href is provided */
|
|
40
|
+
href?: string;
|
|
41
|
+
/** Button type attribute */
|
|
42
|
+
type?: "button" | "submit" | "reset";
|
|
43
|
+
/** Whether the element is disabled */
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
/** Element reference */
|
|
46
|
+
ref?: HTMLButtonElement | HTMLAnchorElement | null;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Common event handler types
|
|
50
|
+
*/
|
|
51
|
+
export type MouseEventHandler = (event: MouseEvent) => void;
|
|
52
|
+
export type KeyboardEventHandler = (event: KeyboardEvent) => void;
|
|
53
|
+
export type FocusEventHandler = (event: FocusEvent) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Utility type to extract props from a component while excluding HTML attributes
|
|
56
|
+
*/
|
|
57
|
+
export type ComponentProps<T> = Omit<T, keyof HTMLAttributes<HTMLElement>>;
|
|
58
|
+
/**
|
|
59
|
+
* Component status for registry tracking
|
|
60
|
+
*/
|
|
61
|
+
export type ComponentStatus = "done" | "in-progress" | "planned";
|
|
62
|
+
/**
|
|
63
|
+
* Component category for organization
|
|
64
|
+
*/
|
|
65
|
+
export type ComponentCategory = "buttons" | "cards" | "backgrounds" | "text" | "layout" | "feedback" | "data-display" | "navigation" | "media" | "effects";
|
|
66
|
+
/**
|
|
67
|
+
* Component metadata for registry
|
|
68
|
+
*/
|
|
69
|
+
export interface ComponentMeta {
|
|
70
|
+
/** Component display name */
|
|
71
|
+
name: string;
|
|
72
|
+
/** URL-friendly slug */
|
|
73
|
+
slug: string;
|
|
74
|
+
/** Short description */
|
|
75
|
+
description: string;
|
|
76
|
+
/** Component category */
|
|
77
|
+
category: ComponentCategory;
|
|
78
|
+
/** Porting status */
|
|
79
|
+
status: ComponentStatus;
|
|
80
|
+
/** Dependencies on other fancy-ui components */
|
|
81
|
+
dependencies?: string[];
|
|
82
|
+
/** Credits for the original design/implementation */
|
|
83
|
+
credits?: Array<{
|
|
84
|
+
source: string;
|
|
85
|
+
url?: string;
|
|
86
|
+
}>;
|
|
87
|
+
}
|
package/dist/types.js
ADDED
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ClassValue } from "clsx";
|
|
2
|
+
export declare function cn(...inputs: ClassValue[]): string;
|
|
3
|
+
export type WithoutChild<T> = T extends {
|
|
4
|
+
child?: any;
|
|
5
|
+
} ? Omit<T, "child"> : T;
|
|
6
|
+
export type WithoutChildren<T> = T extends {
|
|
7
|
+
children?: any;
|
|
8
|
+
} ? Omit<T, "children"> : T;
|
|
9
|
+
export type WithoutChildrenOrChild<T> = WithoutChildren<WithoutChild<T>>;
|
|
10
|
+
export type WithElementRef<T, U extends HTMLElement = HTMLElement> = T & {
|
|
11
|
+
ref?: U | null;
|
|
12
|
+
};
|
package/dist/utils.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "fancy-ui-svelte",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "0.2.1",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/RamaHerbin/fancy-ui.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://fancy-ui.rama.app",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/RamaHerbin/fancy-ui/issues"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"svelte",
|
|
17
|
+
"svelte5",
|
|
18
|
+
"components",
|
|
19
|
+
"animations",
|
|
20
|
+
"ui",
|
|
21
|
+
"tailwind"
|
|
22
|
+
],
|
|
23
|
+
"files": [
|
|
24
|
+
"dist/fancy-ui",
|
|
25
|
+
"dist/utils.js",
|
|
26
|
+
"dist/utils.d.ts",
|
|
27
|
+
"dist/types.js",
|
|
28
|
+
"dist/types.d.ts"
|
|
29
|
+
],
|
|
30
|
+
"main": "./dist/fancy-ui/index.js",
|
|
31
|
+
"svelte": "./dist/fancy-ui/index.js",
|
|
32
|
+
"types": "./dist/fancy-ui/index.d.ts",
|
|
33
|
+
"exports": {
|
|
34
|
+
".": {
|
|
35
|
+
"types": "./dist/fancy-ui/index.d.ts",
|
|
36
|
+
"svelte": "./dist/fancy-ui/index.js",
|
|
37
|
+
"default": "./dist/fancy-ui/index.js"
|
|
38
|
+
},
|
|
39
|
+
"./tailwind.css": "./dist/fancy-ui/tailwind.css"
|
|
40
|
+
},
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=20.19.0"
|
|
43
|
+
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"svelte": "^5.0.0",
|
|
46
|
+
"tailwindcss": "^4.0.0"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"canvas-confetti": "^1.9.4",
|
|
50
|
+
"clsx": "^2.1.1",
|
|
51
|
+
"gsap": "^3.14.2",
|
|
52
|
+
"tailwind-merge": "^3.4.0",
|
|
53
|
+
"three": "^0.183.2"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@changesets/cli": "^2.30.0",
|
|
57
|
+
"@internationalized/date": "^3.10.1",
|
|
58
|
+
"@lucide/svelte": "^0.562.0",
|
|
59
|
+
"@playwright/test": "^1.58.2",
|
|
60
|
+
"@sveltejs/adapter-auto": "^7.0.0",
|
|
61
|
+
"@sveltejs/kit": "^2.49.1",
|
|
62
|
+
"@sveltejs/package": "^2.5.7",
|
|
63
|
+
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
64
|
+
"@tailwindcss/forms": "^0.5.10",
|
|
65
|
+
"@tailwindcss/typography": "^0.5.19",
|
|
66
|
+
"@tailwindcss/vite": "^4.1.17",
|
|
67
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
68
|
+
"@testing-library/svelte": "^5.3.1",
|
|
69
|
+
"@types/canvas-confetti": "^1.9.0",
|
|
70
|
+
"@types/node": "^25.2.3",
|
|
71
|
+
"@types/three": "^0.183.1",
|
|
72
|
+
"arctic": "^3.7.0",
|
|
73
|
+
"bits-ui": "^2.15.4",
|
|
74
|
+
"jsdom": "^28.0.0",
|
|
75
|
+
"marked": "^17.0.3",
|
|
76
|
+
"nanoid": "^5.1.6",
|
|
77
|
+
"prettier": "^3.8.1",
|
|
78
|
+
"prettier-plugin-svelte": "^3.5.0",
|
|
79
|
+
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
80
|
+
"publint": "^0.3.18",
|
|
81
|
+
"svelte": "^5.45.6",
|
|
82
|
+
"svelte-check": "^4.3.4",
|
|
83
|
+
"tailwind-variants": "^3.2.2",
|
|
84
|
+
"tailwindcss": "^4.1.17",
|
|
85
|
+
"tw-animate-css": "^1.4.0",
|
|
86
|
+
"typescript": "^5.9.3",
|
|
87
|
+
"vite": "^7.2.6",
|
|
88
|
+
"vitest": "^4.0.18"
|
|
89
|
+
},
|
|
90
|
+
"scripts": {
|
|
91
|
+
"dev": "vite dev",
|
|
92
|
+
"build": "vite build",
|
|
93
|
+
"preview": "vite preview",
|
|
94
|
+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
95
|
+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
96
|
+
"test": "vitest run",
|
|
97
|
+
"test:watch": "vitest",
|
|
98
|
+
"test:e2e": "playwright test",
|
|
99
|
+
"test:e2e:ui": "playwright test --ui",
|
|
100
|
+
"changeset": "changeset",
|
|
101
|
+
"version": "changeset version",
|
|
102
|
+
"release": "changeset tag",
|
|
103
|
+
"package": "svelte-kit sync && svelte-package -i src/lib -o dist && node -e \"const fs=require('fs'); ['dist/builder','dist/server','dist/stores'].forEach(p=>fs.rmSync(p,{recursive:true,force:true}));\" && publint"
|
|
104
|
+
}
|
|
105
|
+
}
|