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.
Files changed (418) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +198 -0
  3. package/dist/fancy-ui/_template/Component.svelte +110 -0
  4. package/dist/fancy-ui/_template/Component.svelte.d.ts +16 -0
  5. package/dist/fancy-ui/_template/README.md +279 -0
  6. package/dist/fancy-ui/_template/index.d.ts +13 -0
  7. package/dist/fancy-ui/_template/index.js +27 -0
  8. package/dist/fancy-ui/_template/types.d.ts +53 -0
  9. package/dist/fancy-ui/_template/types.js +12 -0
  10. package/dist/fancy-ui/animated-beam/AnimatedBeam.svelte +166 -0
  11. package/dist/fancy-ui/animated-beam/AnimatedBeam.svelte.d.ts +4 -0
  12. package/dist/fancy-ui/animated-beam/AnimatedBeam.test.d.ts +1 -0
  13. package/dist/fancy-ui/animated-beam/AnimatedBeam.test.js +49 -0
  14. package/dist/fancy-ui/animated-beam/README.md +38 -0
  15. package/dist/fancy-ui/animated-beam/index.d.ts +2 -0
  16. package/dist/fancy-ui/animated-beam/index.js +1 -0
  17. package/dist/fancy-ui/animated-beam/types.d.ts +19 -0
  18. package/dist/fancy-ui/animated-beam/types.js +1 -0
  19. package/dist/fancy-ui/animated-testimonials/AnimatedTestimonials.svelte +196 -0
  20. package/dist/fancy-ui/animated-testimonials/AnimatedTestimonials.svelte.d.ts +29 -0
  21. package/dist/fancy-ui/animated-testimonials/AnimatedTestimonials.test.d.ts +1 -0
  22. package/dist/fancy-ui/animated-testimonials/AnimatedTestimonials.test.js +92 -0
  23. package/dist/fancy-ui/animated-testimonials/index.d.ts +2 -0
  24. package/dist/fancy-ui/animated-testimonials/index.js +1 -0
  25. package/dist/fancy-ui/animated-tooltip/AnimatedTooltip.svelte +97 -0
  26. package/dist/fancy-ui/animated-tooltip/AnimatedTooltip.svelte.d.ts +15 -0
  27. package/dist/fancy-ui/animated-tooltip/AnimatedTooltip.test.d.ts +1 -0
  28. package/dist/fancy-ui/animated-tooltip/AnimatedTooltip.test.js +67 -0
  29. package/dist/fancy-ui/animated-tooltip/index.d.ts +2 -0
  30. package/dist/fancy-ui/animated-tooltip/index.js +1 -0
  31. package/dist/fancy-ui/apple-card-carousel/AppleCard.svelte +226 -0
  32. package/dist/fancy-ui/apple-card-carousel/AppleCard.svelte.d.ts +27 -0
  33. package/dist/fancy-ui/apple-card-carousel/AppleCardCarousel.svelte +49 -0
  34. package/dist/fancy-ui/apple-card-carousel/AppleCardCarousel.svelte.d.ts +11 -0
  35. package/dist/fancy-ui/apple-card-carousel/AppleCardCarousel.test.d.ts +1 -0
  36. package/dist/fancy-ui/apple-card-carousel/AppleCardCarousel.test.js +85 -0
  37. package/dist/fancy-ui/apple-card-carousel/index.d.ts +3 -0
  38. package/dist/fancy-ui/apple-card-carousel/index.js +2 -0
  39. package/dist/fancy-ui/bento-grid/BentoGrid.svelte +21 -0
  40. package/dist/fancy-ui/bento-grid/BentoGrid.svelte.d.ts +7 -0
  41. package/dist/fancy-ui/bento-grid/BentoGridCard.svelte +70 -0
  42. package/dist/fancy-ui/bento-grid/BentoGridCard.svelte.d.ts +12 -0
  43. package/dist/fancy-ui/bento-grid/BentoGridItem.svelte +39 -0
  44. package/dist/fancy-ui/bento-grid/BentoGridItem.svelte.d.ts +10 -0
  45. package/dist/fancy-ui/bento-grid/README.md +51 -0
  46. package/dist/fancy-ui/bento-grid/index.d.ts +3 -0
  47. package/dist/fancy-ui/bento-grid/index.js +3 -0
  48. package/dist/fancy-ui/bg-falling-stars/FallingStarsBg.svelte +163 -0
  49. package/dist/fancy-ui/bg-falling-stars/FallingStarsBg.svelte.d.ts +11 -0
  50. package/dist/fancy-ui/bg-falling-stars/FallingStarsBg.test.d.ts +1 -0
  51. package/dist/fancy-ui/bg-falling-stars/FallingStarsBg.test.js +50 -0
  52. package/dist/fancy-ui/bg-falling-stars/README.md +22 -0
  53. package/dist/fancy-ui/bg-falling-stars/index.d.ts +2 -0
  54. package/dist/fancy-ui/bg-falling-stars/index.js +1 -0
  55. package/dist/fancy-ui/bg-stars/README.md +41 -0
  56. package/dist/fancy-ui/bg-stars/StarsBackground.svelte +205 -0
  57. package/dist/fancy-ui/bg-stars/StarsBackground.svelte.d.ts +33 -0
  58. package/dist/fancy-ui/bg-stars/StarsBackground.test.d.ts +1 -0
  59. package/dist/fancy-ui/bg-stars/StarsBackground.test.js +46 -0
  60. package/dist/fancy-ui/bg-stars/index.d.ts +1 -0
  61. package/dist/fancy-ui/bg-stars/index.js +1 -0
  62. package/dist/fancy-ui/blur-reveal/BlurReveal.svelte +126 -0
  63. package/dist/fancy-ui/blur-reveal/BlurReveal.svelte.d.ts +18 -0
  64. package/dist/fancy-ui/blur-reveal/BlurReveal.test.d.ts +1 -0
  65. package/dist/fancy-ui/blur-reveal/BlurReveal.test.js +47 -0
  66. package/dist/fancy-ui/blur-reveal/README.md +41 -0
  67. package/dist/fancy-ui/blur-reveal/index.d.ts +2 -0
  68. package/dist/fancy-ui/blur-reveal/index.js +2 -0
  69. package/dist/fancy-ui/book/Book.svelte +89 -0
  70. package/dist/fancy-ui/book/Book.svelte.d.ts +15 -0
  71. package/dist/fancy-ui/book/Book.test.d.ts +1 -0
  72. package/dist/fancy-ui/book/Book.test.js +47 -0
  73. package/dist/fancy-ui/book/BookDescription.svelte +17 -0
  74. package/dist/fancy-ui/book/BookDescription.svelte.d.ts +8 -0
  75. package/dist/fancy-ui/book/BookHeader.svelte +17 -0
  76. package/dist/fancy-ui/book/BookHeader.svelte.d.ts +8 -0
  77. package/dist/fancy-ui/book/BookTitle.svelte +17 -0
  78. package/dist/fancy-ui/book/BookTitle.svelte.d.ts +8 -0
  79. package/dist/fancy-ui/book/README.md +34 -0
  80. package/dist/fancy-ui/book/index.d.ts +128 -0
  81. package/dist/fancy-ui/book/index.js +46 -0
  82. package/dist/fancy-ui/border-beam/BorderBeam.svelte +85 -0
  83. package/dist/fancy-ui/border-beam/BorderBeam.svelte.d.ts +27 -0
  84. package/dist/fancy-ui/border-beam/BorderBeam.test.d.ts +1 -0
  85. package/dist/fancy-ui/border-beam/BorderBeam.test.js +64 -0
  86. package/dist/fancy-ui/border-beam/index.d.ts +2 -0
  87. package/dist/fancy-ui/border-beam/index.js +2 -0
  88. package/dist/fancy-ui/box-reveal/BoxReveal.svelte +73 -0
  89. package/dist/fancy-ui/box-reveal/BoxReveal.svelte.d.ts +24 -0
  90. package/dist/fancy-ui/box-reveal/BoxReveal.test.d.ts +1 -0
  91. package/dist/fancy-ui/box-reveal/BoxReveal.test.js +66 -0
  92. package/dist/fancy-ui/box-reveal/README.md +24 -0
  93. package/dist/fancy-ui/box-reveal/index.d.ts +2 -0
  94. package/dist/fancy-ui/box-reveal/index.js +2 -0
  95. package/dist/fancy-ui/card-3d/CardBody.svelte +16 -0
  96. package/dist/fancy-ui/card-3d/CardBody.svelte.d.ts +7 -0
  97. package/dist/fancy-ui/card-3d/CardContainer.svelte +53 -0
  98. package/dist/fancy-ui/card-3d/CardContainer.svelte.d.ts +8 -0
  99. package/dist/fancy-ui/card-3d/CardItem.svelte +49 -0
  100. package/dist/fancy-ui/card-3d/CardItem.svelte.d.ts +14 -0
  101. package/dist/fancy-ui/card-3d/README.md +52 -0
  102. package/dist/fancy-ui/card-3d/index.d.ts +3 -0
  103. package/dist/fancy-ui/card-3d/index.js +3 -0
  104. package/dist/fancy-ui/card-spotlight/CardSpotlight.svelte +59 -0
  105. package/dist/fancy-ui/card-spotlight/CardSpotlight.svelte.d.ts +11 -0
  106. package/dist/fancy-ui/card-spotlight/README.md +24 -0
  107. package/dist/fancy-ui/card-spotlight/index.d.ts +1 -0
  108. package/dist/fancy-ui/card-spotlight/index.js +1 -0
  109. package/dist/fancy-ui/colourful-text/ColourfulText.svelte +78 -0
  110. package/dist/fancy-ui/colourful-text/ColourfulText.svelte.d.ts +22 -0
  111. package/dist/fancy-ui/colourful-text/ColourfulText.test.d.ts +1 -0
  112. package/dist/fancy-ui/colourful-text/ColourfulText.test.js +53 -0
  113. package/dist/fancy-ui/colourful-text/README.md +21 -0
  114. package/dist/fancy-ui/colourful-text/index.d.ts +2 -0
  115. package/dist/fancy-ui/colourful-text/index.js +2 -0
  116. package/dist/fancy-ui/compare/Compare.svelte +304 -0
  117. package/dist/fancy-ui/compare/Compare.svelte.d.ts +25 -0
  118. package/dist/fancy-ui/compare/Compare.test.d.ts +1 -0
  119. package/dist/fancy-ui/compare/Compare.test.js +57 -0
  120. package/dist/fancy-ui/compare/README.md +97 -0
  121. package/dist/fancy-ui/compare/StarField.svelte +108 -0
  122. package/dist/fancy-ui/compare/StarField.svelte.d.ts +7 -0
  123. package/dist/fancy-ui/compare/index.d.ts +2 -0
  124. package/dist/fancy-ui/compare/index.js +2 -0
  125. package/dist/fancy-ui/confetti/Confetti.svelte +60 -0
  126. package/dist/fancy-ui/confetti/Confetti.svelte.d.ts +14 -0
  127. package/dist/fancy-ui/confetti/Confetti.test.d.ts +1 -0
  128. package/dist/fancy-ui/confetti/Confetti.test.js +39 -0
  129. package/dist/fancy-ui/confetti/ConfettiButton.svelte +41 -0
  130. package/dist/fancy-ui/confetti/ConfettiButton.svelte.d.ts +9 -0
  131. package/dist/fancy-ui/confetti/README.md +22 -0
  132. package/dist/fancy-ui/confetti/index.d.ts +2 -0
  133. package/dist/fancy-ui/confetti/index.js +2 -0
  134. package/dist/fancy-ui/container-scroll/ContainerScroll.svelte +82 -0
  135. package/dist/fancy-ui/container-scroll/ContainerScroll.svelte.d.ts +9 -0
  136. package/dist/fancy-ui/container-scroll/ContainerScroll.test.d.ts +1 -0
  137. package/dist/fancy-ui/container-scroll/ContainerScroll.test.js +34 -0
  138. package/dist/fancy-ui/container-scroll/README.md +28 -0
  139. package/dist/fancy-ui/container-scroll/index.d.ts +1 -0
  140. package/dist/fancy-ui/container-scroll/index.js +1 -0
  141. package/dist/fancy-ui/container-text-flip/ContainerTextFlip.svelte +78 -0
  142. package/dist/fancy-ui/container-text-flip/ContainerTextFlip.svelte.d.ts +10 -0
  143. package/dist/fancy-ui/container-text-flip/ContainerTextFlip.test.d.ts +1 -0
  144. package/dist/fancy-ui/container-text-flip/ContainerTextFlip.test.js +46 -0
  145. package/dist/fancy-ui/container-text-flip/README.md +22 -0
  146. package/dist/fancy-ui/container-text-flip/index.d.ts +1 -0
  147. package/dist/fancy-ui/container-text-flip/index.js +1 -0
  148. package/dist/fancy-ui/direction-aware-hover/DirectionAwareHover.svelte +232 -0
  149. package/dist/fancy-ui/direction-aware-hover/DirectionAwareHover.svelte.d.ts +11 -0
  150. package/dist/fancy-ui/direction-aware-hover/DirectionAwareHover.test.d.ts +1 -0
  151. package/dist/fancy-ui/direction-aware-hover/DirectionAwareHover.test.js +78 -0
  152. package/dist/fancy-ui/direction-aware-hover/README.md +47 -0
  153. package/dist/fancy-ui/direction-aware-hover/index.d.ts +1 -0
  154. package/dist/fancy-ui/direction-aware-hover/index.js +1 -0
  155. package/dist/fancy-ui/displacement-text/DisplacementText.svelte +224 -0
  156. package/dist/fancy-ui/displacement-text/DisplacementText.svelte.d.ts +19 -0
  157. package/dist/fancy-ui/displacement-text/DisplacementText.test.d.ts +1 -0
  158. package/dist/fancy-ui/displacement-text/DisplacementText.test.js +144 -0
  159. package/dist/fancy-ui/displacement-text/index.d.ts +2 -0
  160. package/dist/fancy-ui/displacement-text/index.js +1 -0
  161. package/dist/fancy-ui/dock/Dock.svelte +87 -0
  162. package/dist/fancy-ui/dock/Dock.svelte.d.ts +12 -0
  163. package/dist/fancy-ui/dock/Dock.test.d.ts +1 -0
  164. package/dist/fancy-ui/dock/Dock.test.js +51 -0
  165. package/dist/fancy-ui/dock/DockIcon.svelte +50 -0
  166. package/dist/fancy-ui/dock/DockIcon.svelte.d.ts +7 -0
  167. package/dist/fancy-ui/dock/DockSeparator.svelte +21 -0
  168. package/dist/fancy-ui/dock/DockSeparator.svelte.d.ts +6 -0
  169. package/dist/fancy-ui/dock/README.md +57 -0
  170. package/dist/fancy-ui/dock/index.d.ts +4 -0
  171. package/dist/fancy-ui/dock/index.js +4 -0
  172. package/dist/fancy-ui/dock/types.d.ts +14 -0
  173. package/dist/fancy-ui/dock/types.js +1 -0
  174. package/dist/fancy-ui/flickering-grid/FlickeringGrid.svelte +154 -0
  175. package/dist/fancy-ui/flickering-grid/FlickeringGrid.svelte.d.ts +27 -0
  176. package/dist/fancy-ui/flickering-grid/FlickeringGrid.test.d.ts +1 -0
  177. package/dist/fancy-ui/flickering-grid/FlickeringGrid.test.js +34 -0
  178. package/dist/fancy-ui/flickering-grid/README.md +24 -0
  179. package/dist/fancy-ui/flickering-grid/index.d.ts +2 -0
  180. package/dist/fancy-ui/flickering-grid/index.js +2 -0
  181. package/dist/fancy-ui/flip-card/FlipCard.svelte +48 -0
  182. package/dist/fancy-ui/flip-card/FlipCard.svelte.d.ts +10 -0
  183. package/dist/fancy-ui/flip-card/FlipCard.test.d.ts +1 -0
  184. package/dist/fancy-ui/flip-card/FlipCard.test.js +36 -0
  185. package/dist/fancy-ui/flip-card/README.md +26 -0
  186. package/dist/fancy-ui/flip-card/index.d.ts +1 -0
  187. package/dist/fancy-ui/flip-card/index.js +1 -0
  188. package/dist/fancy-ui/flip-words/FlipWords.svelte +135 -0
  189. package/dist/fancy-ui/flip-words/FlipWords.svelte.d.ts +18 -0
  190. package/dist/fancy-ui/flip-words/FlipWords.test.d.ts +1 -0
  191. package/dist/fancy-ui/flip-words/FlipWords.test.js +50 -0
  192. package/dist/fancy-ui/flip-words/README.md +17 -0
  193. package/dist/fancy-ui/flip-words/index.d.ts +2 -0
  194. package/dist/fancy-ui/flip-words/index.js +2 -0
  195. package/dist/fancy-ui/fluid-cursor/FluidCursor.svelte +1378 -0
  196. package/dist/fancy-ui/fluid-cursor/FluidCursor.svelte.d.ts +25 -0
  197. package/dist/fancy-ui/fluid-cursor/FluidCursor.test.d.ts +1 -0
  198. package/dist/fancy-ui/fluid-cursor/FluidCursor.test.js +41 -0
  199. package/dist/fancy-ui/fluid-cursor/README.md +34 -0
  200. package/dist/fancy-ui/fluid-cursor/index.d.ts +1 -0
  201. package/dist/fancy-ui/fluid-cursor/index.js +1 -0
  202. package/dist/fancy-ui/focus/Focus.svelte +177 -0
  203. package/dist/fancy-ui/focus/Focus.svelte.d.ts +12 -0
  204. package/dist/fancy-ui/focus/Focus.test.d.ts +1 -0
  205. package/dist/fancy-ui/focus/Focus.test.js +48 -0
  206. package/dist/fancy-ui/focus/README.md +21 -0
  207. package/dist/fancy-ui/focus/index.d.ts +1 -0
  208. package/dist/fancy-ui/focus/index.js +1 -0
  209. package/dist/fancy-ui/glare-card/GlareCard.svelte +133 -0
  210. package/dist/fancy-ui/glare-card/GlareCard.svelte.d.ts +8 -0
  211. package/dist/fancy-ui/glare-card/GlareCard.test.d.ts +1 -0
  212. package/dist/fancy-ui/glare-card/GlareCard.test.js +40 -0
  213. package/dist/fancy-ui/glare-card/README.md +24 -0
  214. package/dist/fancy-ui/glare-card/index.d.ts +1 -0
  215. package/dist/fancy-ui/glare-card/index.js +1 -0
  216. package/dist/fancy-ui/glow-border/GlowBorder.svelte +67 -0
  217. package/dist/fancy-ui/glow-border/GlowBorder.svelte.d.ts +10 -0
  218. package/dist/fancy-ui/glow-border/GlowBorder.test.d.ts +1 -0
  219. package/dist/fancy-ui/glow-border/GlowBorder.test.js +57 -0
  220. package/dist/fancy-ui/glow-border/README.md +54 -0
  221. package/dist/fancy-ui/glow-border/index.d.ts +1 -0
  222. package/dist/fancy-ui/glow-border/index.js +1 -0
  223. package/dist/fancy-ui/glowing-effect/GlowingEffect.svelte +182 -0
  224. package/dist/fancy-ui/glowing-effect/GlowingEffect.svelte.d.ts +15 -0
  225. package/dist/fancy-ui/glowing-effect/GlowingEffect.test.d.ts +1 -0
  226. package/dist/fancy-ui/glowing-effect/GlowingEffect.test.js +68 -0
  227. package/dist/fancy-ui/glowing-effect/README.md +29 -0
  228. package/dist/fancy-ui/glowing-effect/index.d.ts +1 -0
  229. package/dist/fancy-ui/glowing-effect/index.js +1 -0
  230. package/dist/fancy-ui/gradient-button/GradientButton.svelte +103 -0
  231. package/dist/fancy-ui/gradient-button/GradientButton.svelte.d.ts +24 -0
  232. package/dist/fancy-ui/gradient-button/GradientButton.test.d.ts +1 -0
  233. package/dist/fancy-ui/gradient-button/GradientButton.test.js +65 -0
  234. package/dist/fancy-ui/gradient-button/README.md +10 -0
  235. package/dist/fancy-ui/gradient-button/index.d.ts +2 -0
  236. package/dist/fancy-ui/gradient-button/index.js +2 -0
  237. package/dist/fancy-ui/hyper-text/HyperText.svelte +112 -0
  238. package/dist/fancy-ui/hyper-text/HyperText.svelte.d.ts +20 -0
  239. package/dist/fancy-ui/hyper-text/HyperText.test.d.ts +1 -0
  240. package/dist/fancy-ui/hyper-text/HyperText.test.js +39 -0
  241. package/dist/fancy-ui/hyper-text/README.md +19 -0
  242. package/dist/fancy-ui/hyper-text/index.d.ts +2 -0
  243. package/dist/fancy-ui/hyper-text/index.js +2 -0
  244. package/dist/fancy-ui/image-trail-cursor/ImageTrailCursor.svelte +89 -0
  245. package/dist/fancy-ui/image-trail-cursor/ImageTrailCursor.svelte.d.ts +9 -0
  246. package/dist/fancy-ui/image-trail-cursor/ImageTrailCursor.test.d.ts +1 -0
  247. package/dist/fancy-ui/image-trail-cursor/ImageTrailCursor.test.js +60 -0
  248. package/dist/fancy-ui/image-trail-cursor/README.md +36 -0
  249. package/dist/fancy-ui/image-trail-cursor/index.d.ts +3 -0
  250. package/dist/fancy-ui/image-trail-cursor/index.js +1 -0
  251. package/dist/fancy-ui/image-trail-cursor/trail-variants.d.ts +107 -0
  252. package/dist/fancy-ui/image-trail-cursor/trail-variants.js +703 -0
  253. package/dist/fancy-ui/index.d.ts +52 -0
  254. package/dist/fancy-ui/index.js +64 -0
  255. package/dist/fancy-ui/interactive-grid-pattern/InteractiveGridPattern.svelte +71 -0
  256. package/dist/fancy-ui/interactive-grid-pattern/InteractiveGridPattern.svelte.d.ts +15 -0
  257. package/dist/fancy-ui/interactive-grid-pattern/InteractiveGridPattern.test.d.ts +1 -0
  258. package/dist/fancy-ui/interactive-grid-pattern/InteractiveGridPattern.test.js +47 -0
  259. package/dist/fancy-ui/interactive-grid-pattern/README.md +30 -0
  260. package/dist/fancy-ui/interactive-grid-pattern/index.d.ts +2 -0
  261. package/dist/fancy-ui/interactive-grid-pattern/index.js +2 -0
  262. package/dist/fancy-ui/interactive-hover-button/InteractiveHoverButton.svelte +75 -0
  263. package/dist/fancy-ui/interactive-hover-button/InteractiveHoverButton.svelte.d.ts +14 -0
  264. package/dist/fancy-ui/interactive-hover-button/InteractiveHoverButton.test.d.ts +1 -0
  265. package/dist/fancy-ui/interactive-hover-button/InteractiveHoverButton.test.js +64 -0
  266. package/dist/fancy-ui/interactive-hover-button/README.md +28 -0
  267. package/dist/fancy-ui/interactive-hover-button/index.d.ts +2 -0
  268. package/dist/fancy-ui/interactive-hover-button/index.js +2 -0
  269. package/dist/fancy-ui/letter-pullup/LetterPullup.svelte +58 -0
  270. package/dist/fancy-ui/letter-pullup/LetterPullup.svelte.d.ts +17 -0
  271. package/dist/fancy-ui/letter-pullup/LetterPullup.test.d.ts +1 -0
  272. package/dist/fancy-ui/letter-pullup/LetterPullup.test.js +49 -0
  273. package/dist/fancy-ui/letter-pullup/README.md +18 -0
  274. package/dist/fancy-ui/letter-pullup/index.d.ts +2 -0
  275. package/dist/fancy-ui/letter-pullup/index.js +2 -0
  276. package/dist/fancy-ui/line-hover-link/LineHoverLink.svelte +450 -0
  277. package/dist/fancy-ui/line-hover-link/LineHoverLink.svelte.d.ts +35 -0
  278. package/dist/fancy-ui/line-hover-link/LineHoverLink.test.d.ts +1 -0
  279. package/dist/fancy-ui/line-hover-link/LineHoverLink.test.js +55 -0
  280. package/dist/fancy-ui/line-hover-link/index.d.ts +2 -0
  281. package/dist/fancy-ui/line-hover-link/index.js +1 -0
  282. package/dist/fancy-ui/line-shadow-text/LineShadowText.svelte +63 -0
  283. package/dist/fancy-ui/line-shadow-text/LineShadowText.svelte.d.ts +9 -0
  284. package/dist/fancy-ui/line-shadow-text/LineShadowText.test.d.ts +1 -0
  285. package/dist/fancy-ui/line-shadow-text/LineShadowText.test.js +59 -0
  286. package/dist/fancy-ui/line-shadow-text/README.md +12 -0
  287. package/dist/fancy-ui/line-shadow-text/index.d.ts +2 -0
  288. package/dist/fancy-ui/line-shadow-text/index.js +1 -0
  289. package/dist/fancy-ui/liquid-glass/LiquidGlass.svelte +204 -0
  290. package/dist/fancy-ui/liquid-glass/LiquidGlass.svelte.d.ts +23 -0
  291. package/dist/fancy-ui/liquid-glass/LiquidGlass.test.d.ts +1 -0
  292. package/dist/fancy-ui/liquid-glass/LiquidGlass.test.js +48 -0
  293. package/dist/fancy-ui/liquid-glass/README.md +34 -0
  294. package/dist/fancy-ui/liquid-glass/index.d.ts +1 -0
  295. package/dist/fancy-ui/liquid-glass/index.js +1 -0
  296. package/dist/fancy-ui/logo-cloud/AnimatedLogoCloud.svelte +61 -0
  297. package/dist/fancy-ui/logo-cloud/AnimatedLogoCloud.svelte.d.ts +15 -0
  298. package/dist/fancy-ui/logo-cloud/AnimatedLogoCloud.test.d.ts +1 -0
  299. package/dist/fancy-ui/logo-cloud/AnimatedLogoCloud.test.js +59 -0
  300. package/dist/fancy-ui/logo-cloud/IconLogoCloud.svelte +31 -0
  301. package/dist/fancy-ui/logo-cloud/IconLogoCloud.svelte.d.ts +11 -0
  302. package/dist/fancy-ui/logo-cloud/README.md +41 -0
  303. package/dist/fancy-ui/logo-cloud/StaticLogoCloud.svelte +31 -0
  304. package/dist/fancy-ui/logo-cloud/StaticLogoCloud.svelte.d.ts +11 -0
  305. package/dist/fancy-ui/logo-cloud/index.d.ts +4 -0
  306. package/dist/fancy-ui/logo-cloud/index.js +4 -0
  307. package/dist/fancy-ui/marquee/Marquee.svelte +70 -0
  308. package/dist/fancy-ui/marquee/Marquee.svelte.d.ts +11 -0
  309. package/dist/fancy-ui/marquee/Marquee.test.d.ts +1 -0
  310. package/dist/fancy-ui/marquee/Marquee.test.js +46 -0
  311. package/dist/fancy-ui/marquee/ReviewCard.svelte +25 -0
  312. package/dist/fancy-ui/marquee/ReviewCard.svelte.d.ts +9 -0
  313. package/dist/fancy-ui/marquee/index.d.ts +2 -0
  314. package/dist/fancy-ui/marquee/index.js +2 -0
  315. package/dist/fancy-ui/meteors/Meteors.svelte +59 -0
  316. package/dist/fancy-ui/meteors/Meteors.svelte.d.ts +15 -0
  317. package/dist/fancy-ui/meteors/Meteors.test.d.ts +1 -0
  318. package/dist/fancy-ui/meteors/Meteors.test.js +48 -0
  319. package/dist/fancy-ui/meteors/README.md +18 -0
  320. package/dist/fancy-ui/meteors/index.d.ts +2 -0
  321. package/dist/fancy-ui/meteors/index.js +2 -0
  322. package/dist/fancy-ui/neon-border/NeonBorder.svelte +135 -0
  323. package/dist/fancy-ui/neon-border/NeonBorder.svelte.d.ts +24 -0
  324. package/dist/fancy-ui/neon-border/NeonBorder.test.d.ts +1 -0
  325. package/dist/fancy-ui/neon-border/NeonBorder.test.js +80 -0
  326. package/dist/fancy-ui/neon-border/README.md +27 -0
  327. package/dist/fancy-ui/neon-border/index.d.ts +2 -0
  328. package/dist/fancy-ui/neon-border/index.js +2 -0
  329. package/dist/fancy-ui/number-ticker/NumberTicker.svelte +126 -0
  330. package/dist/fancy-ui/number-ticker/NumberTicker.svelte.d.ts +24 -0
  331. package/dist/fancy-ui/number-ticker/NumberTicker.test.d.ts +1 -0
  332. package/dist/fancy-ui/number-ticker/NumberTicker.test.js +64 -0
  333. package/dist/fancy-ui/number-ticker/README.md +22 -0
  334. package/dist/fancy-ui/number-ticker/index.d.ts +2 -0
  335. package/dist/fancy-ui/number-ticker/index.js +2 -0
  336. package/dist/fancy-ui/rainbow-button/RainbowButton.svelte +96 -0
  337. package/dist/fancy-ui/rainbow-button/RainbowButton.svelte.d.ts +18 -0
  338. package/dist/fancy-ui/rainbow-button/RainbowButton.test.d.ts +1 -0
  339. package/dist/fancy-ui/rainbow-button/RainbowButton.test.js +51 -0
  340. package/dist/fancy-ui/rainbow-button/index.d.ts +2 -0
  341. package/dist/fancy-ui/rainbow-button/index.js +2 -0
  342. package/dist/fancy-ui/registry.d.ts +72 -0
  343. package/dist/fancy-ui/registry.js +643 -0
  344. package/dist/fancy-ui/ripple/README.md +16 -0
  345. package/dist/fancy-ui/ripple/Ripple.svelte +64 -0
  346. package/dist/fancy-ui/ripple/Ripple.svelte.d.ts +13 -0
  347. package/dist/fancy-ui/ripple/Ripple.test.d.ts +1 -0
  348. package/dist/fancy-ui/ripple/Ripple.test.js +81 -0
  349. package/dist/fancy-ui/ripple/index.d.ts +1 -0
  350. package/dist/fancy-ui/ripple/index.js +1 -0
  351. package/dist/fancy-ui/ripple-button/RippleButton.svelte +111 -0
  352. package/dist/fancy-ui/ripple-button/RippleButton.svelte.d.ts +15 -0
  353. package/dist/fancy-ui/ripple-button/RippleButton.test.d.ts +1 -0
  354. package/dist/fancy-ui/ripple-button/RippleButton.test.js +44 -0
  355. package/dist/fancy-ui/ripple-button/index.d.ts +2 -0
  356. package/dist/fancy-ui/ripple-button/index.js +2 -0
  357. package/dist/fancy-ui/shimmer-button/README.md +10 -0
  358. package/dist/fancy-ui/shimmer-button/ShimmerButton.svelte +115 -0
  359. package/dist/fancy-ui/shimmer-button/ShimmerButton.svelte.d.ts +22 -0
  360. package/dist/fancy-ui/shimmer-button/ShimmerButton.test.d.ts +1 -0
  361. package/dist/fancy-ui/shimmer-button/ShimmerButton.test.js +69 -0
  362. package/dist/fancy-ui/shimmer-button/index.d.ts +2 -0
  363. package/dist/fancy-ui/shimmer-button/index.js +2 -0
  364. package/dist/fancy-ui/smooth-cursor/README.md +23 -0
  365. package/dist/fancy-ui/smooth-cursor/SmoothCursor.svelte +224 -0
  366. package/dist/fancy-ui/smooth-cursor/SmoothCursor.svelte.d.ts +20 -0
  367. package/dist/fancy-ui/smooth-cursor/index.d.ts +2 -0
  368. package/dist/fancy-ui/smooth-cursor/index.js +1 -0
  369. package/dist/fancy-ui/sparkles/README.md +15 -0
  370. package/dist/fancy-ui/sparkles/Sparkles.svelte +123 -0
  371. package/dist/fancy-ui/sparkles/Sparkles.svelte.d.ts +12 -0
  372. package/dist/fancy-ui/sparkles/Sparkles.test.d.ts +1 -0
  373. package/dist/fancy-ui/sparkles/Sparkles.test.js +66 -0
  374. package/dist/fancy-ui/sparkles/index.d.ts +1 -0
  375. package/dist/fancy-ui/sparkles/index.js +1 -0
  376. package/dist/fancy-ui/sparkles-text/README.md +19 -0
  377. package/dist/fancy-ui/sparkles-text/SparklesText.svelte +112 -0
  378. package/dist/fancy-ui/sparkles-text/SparklesText.svelte.d.ts +22 -0
  379. package/dist/fancy-ui/sparkles-text/SparklesText.test.d.ts +1 -0
  380. package/dist/fancy-ui/sparkles-text/SparklesText.test.js +54 -0
  381. package/dist/fancy-ui/sparkles-text/index.d.ts +2 -0
  382. package/dist/fancy-ui/sparkles-text/index.js +2 -0
  383. package/dist/fancy-ui/tailwind.css +3 -0
  384. package/dist/fancy-ui/text-generate-effect/README.md +14 -0
  385. package/dist/fancy-ui/text-generate-effect/TextGenerateEffect.svelte +66 -0
  386. package/dist/fancy-ui/text-generate-effect/TextGenerateEffect.svelte.d.ts +11 -0
  387. package/dist/fancy-ui/text-generate-effect/TextGenerateEffect.test.d.ts +1 -0
  388. package/dist/fancy-ui/text-generate-effect/TextGenerateEffect.test.js +73 -0
  389. package/dist/fancy-ui/text-generate-effect/index.d.ts +2 -0
  390. package/dist/fancy-ui/text-generate-effect/index.js +1 -0
  391. package/dist/fancy-ui/text-reveal-card/README.md +36 -0
  392. package/dist/fancy-ui/text-reveal-card/TextRevealCard.svelte +112 -0
  393. package/dist/fancy-ui/text-reveal-card/TextRevealCard.svelte.d.ts +12 -0
  394. package/dist/fancy-ui/text-reveal-card/TextRevealCard.test.d.ts +1 -0
  395. package/dist/fancy-ui/text-reveal-card/TextRevealCard.test.js +34 -0
  396. package/dist/fancy-ui/text-reveal-card/TextRevealStars.svelte +76 -0
  397. package/dist/fancy-ui/text-reveal-card/TextRevealStars.svelte.d.ts +7 -0
  398. package/dist/fancy-ui/text-reveal-card/index.d.ts +2 -0
  399. package/dist/fancy-ui/text-reveal-card/index.js +2 -0
  400. package/dist/fancy-ui/timeline/README.md +56 -0
  401. package/dist/fancy-ui/timeline/Timeline.svelte +141 -0
  402. package/dist/fancy-ui/timeline/Timeline.svelte.d.ts +20 -0
  403. package/dist/fancy-ui/timeline/Timeline.test.d.ts +1 -0
  404. package/dist/fancy-ui/timeline/Timeline.test.js +63 -0
  405. package/dist/fancy-ui/timeline/index.d.ts +2 -0
  406. package/dist/fancy-ui/timeline/index.js +2 -0
  407. package/dist/fancy-ui/tracing-beam/README.md +24 -0
  408. package/dist/fancy-ui/tracing-beam/TracingBeam.svelte +156 -0
  409. package/dist/fancy-ui/tracing-beam/TracingBeam.svelte.d.ts +8 -0
  410. package/dist/fancy-ui/tracing-beam/TracingBeam.test.d.ts +1 -0
  411. package/dist/fancy-ui/tracing-beam/TracingBeam.test.js +61 -0
  412. package/dist/fancy-ui/tracing-beam/index.d.ts +1 -0
  413. package/dist/fancy-ui/tracing-beam/index.js +1 -0
  414. package/dist/types.d.ts +87 -0
  415. package/dist/types.js +6 -0
  416. package/dist/utils.d.ts +12 -0
  417. package/dist/utils.js +5 -0
  418. package/package.json +105 -0
@@ -0,0 +1,64 @@
1
+ <script lang="ts">
2
+ import { cn } from "../../utils";
3
+
4
+ interface Props {
5
+ baseCircleSize?: number;
6
+ baseCircleOpacity?: number;
7
+ spaceBetweenCircle?: number;
8
+ circleOpacityDowngradeRatio?: number;
9
+ circleClass?: string;
10
+ waveSpeed?: number;
11
+ numberOfCircles?: number;
12
+ class?: string;
13
+ }
14
+
15
+ let {
16
+ baseCircleSize = 210,
17
+ baseCircleOpacity = 0.24,
18
+ spaceBetweenCircle = 70,
19
+ circleOpacityDowngradeRatio = 0.03,
20
+ circleClass = "",
21
+ waveSpeed = 80,
22
+ numberOfCircles = 7,
23
+ class: className = "",
24
+ }: Props = $props();
25
+
26
+ let circles = $derived(
27
+ Array.from({ length: numberOfCircles }, (_, i) => ({
28
+ size: baseCircleSize + i * spaceBetweenCircle,
29
+ opacity: baseCircleOpacity - i * circleOpacityDowngradeRatio,
30
+ delay: i * waveSpeed,
31
+ borderStyle: i === numberOfCircles - 1 ? "dashed" : "solid",
32
+ }))
33
+ );
34
+ </script>
35
+
36
+ <div class={cn("absolute inset-0", className)} aria-hidden="true">
37
+ {#each circles as circle, i (i)}
38
+ <div
39
+ class={cn(
40
+ "animate-ripple-circle absolute rounded-full shadow-xl motion-reduce:animate-none",
41
+ circleClass
42
+ )}
43
+ style="width: {circle.size}px; height: {circle.size}px; opacity: {circle.opacity}; animation-delay: {circle.delay}ms; border-style: {circle.borderStyle}; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(1); border-width: 1px;"
44
+ ></div>
45
+ {/each}
46
+ </div>
47
+
48
+ <style>
49
+ :global {
50
+ @keyframes ripple-effect {
51
+ 0%,
52
+ 100% {
53
+ transform: translate(-50%, -50%) scale(1);
54
+ }
55
+ 50% {
56
+ transform: translate(-50%, -50%) scale(0.9);
57
+ }
58
+ }
59
+ }
60
+
61
+ .animate-ripple-circle {
62
+ animation: ripple-effect 2s ease-in-out infinite;
63
+ }
64
+ </style>
@@ -0,0 +1,13 @@
1
+ interface Props {
2
+ baseCircleSize?: number;
3
+ baseCircleOpacity?: number;
4
+ spaceBetweenCircle?: number;
5
+ circleOpacityDowngradeRatio?: number;
6
+ circleClass?: string;
7
+ waveSpeed?: number;
8
+ numberOfCircles?: number;
9
+ class?: string;
10
+ }
11
+ declare const Ripple: import("svelte").Component<Props, {}, "">;
12
+ type Ripple = ReturnType<typeof Ripple>;
13
+ export default Ripple;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,81 @@
1
+ import { render, cleanup } from "@testing-library/svelte";
2
+ import { afterEach, describe, it, expect } from "vitest";
3
+ import Ripple from "./Ripple.svelte";
4
+ describe("Ripple", () => {
5
+ afterEach(cleanup);
6
+ it("renders correct number of circles (default 7)", () => {
7
+ const { container } = render(Ripple);
8
+ const circles = container.querySelectorAll(".animate-ripple-circle");
9
+ expect(circles.length).toBe(7);
10
+ });
11
+ it("renders with custom numberOfCircles", () => {
12
+ const { container } = render(Ripple, { props: { numberOfCircles: 3 } });
13
+ const circles = container.querySelectorAll(".animate-ripple-circle");
14
+ expect(circles.length).toBe(3);
15
+ });
16
+ it("renders with numberOfCircles set to 10", () => {
17
+ const { container } = render(Ripple, { props: { numberOfCircles: 10 } });
18
+ const circles = container.querySelectorAll(".animate-ripple-circle");
19
+ expect(circles.length).toBe(10);
20
+ });
21
+ it("applies circleClass to each circle", () => {
22
+ const { container } = render(Ripple, {
23
+ props: { numberOfCircles: 3, circleClass: "my-circle" },
24
+ });
25
+ const circles = container.querySelectorAll(".animate-ripple-circle");
26
+ circles.forEach((circle) => {
27
+ expect(circle.className).toContain("my-circle");
28
+ });
29
+ });
30
+ it("applies custom class to container", () => {
31
+ const { container } = render(Ripple, { props: { class: "my-ripple" } });
32
+ const wrapper = container.firstElementChild;
33
+ expect(wrapper?.className).toContain("my-ripple");
34
+ });
35
+ it("preserves base classes on container", () => {
36
+ const { container } = render(Ripple, { props: { class: "extra" } });
37
+ const wrapper = container.firstElementChild;
38
+ expect(wrapper?.className).toContain("absolute");
39
+ expect(wrapper?.className).toContain("inset-0");
40
+ });
41
+ it("last circle has dashed border style", () => {
42
+ const { container } = render(Ripple, { props: { numberOfCircles: 5 } });
43
+ const circles = container.querySelectorAll(".animate-ripple-circle");
44
+ const lastCircle = circles[circles.length - 1];
45
+ const style = lastCircle.getAttribute("style") ?? "";
46
+ expect(style).toContain("border-style: dashed");
47
+ });
48
+ it("other circles have solid border style", () => {
49
+ const { container } = render(Ripple, { props: { numberOfCircles: 5 } });
50
+ const circles = container.querySelectorAll(".animate-ripple-circle");
51
+ for (let i = 0; i < circles.length - 1; i++) {
52
+ const style = circles[i].getAttribute("style") ?? "";
53
+ expect(style).toContain("border-style: solid");
54
+ }
55
+ });
56
+ it("circle sizes match baseCircleSize + index * spaceBetweenCircle", () => {
57
+ const baseCircleSize = 100;
58
+ const spaceBetweenCircle = 50;
59
+ const numberOfCircles = 4;
60
+ const { container } = render(Ripple, {
61
+ props: { baseCircleSize, spaceBetweenCircle, numberOfCircles },
62
+ });
63
+ const circles = container.querySelectorAll(".animate-ripple-circle");
64
+ circles.forEach((circle, i) => {
65
+ const expectedSize = baseCircleSize + i * spaceBetweenCircle;
66
+ const style = circle.getAttribute("style") ?? "";
67
+ expect(style).toContain(`width: ${expectedSize}px`);
68
+ expect(style).toContain(`height: ${expectedSize}px`);
69
+ });
70
+ });
71
+ it("circle sizes use defaults (210 base, 70 spacing)", () => {
72
+ const { container } = render(Ripple, { props: { numberOfCircles: 3 } });
73
+ const circles = container.querySelectorAll(".animate-ripple-circle");
74
+ const expectedSizes = [210, 280, 350];
75
+ circles.forEach((circle, i) => {
76
+ const style = circle.getAttribute("style") ?? "";
77
+ expect(style).toContain(`width: ${expectedSizes[i]}px`);
78
+ expect(style).toContain(`height: ${expectedSizes[i]}px`);
79
+ });
80
+ });
81
+ });
@@ -0,0 +1 @@
1
+ export { default as Ripple } from "./Ripple.svelte";
@@ -0,0 +1 @@
1
+ export { default as Ripple } from "./Ripple.svelte";
@@ -0,0 +1,111 @@
1
+ <script lang="ts" module>
2
+ import type { Snippet } from "svelte";
3
+ import type { HTMLButtonAttributes } from "svelte/elements";
4
+
5
+ export interface RippleButtonProps extends Omit<HTMLButtonAttributes, "class"> {
6
+ /** Additional CSS classes */
7
+ class?: string;
8
+ /** Color of the ripple effect */
9
+ rippleColor?: string;
10
+ /** Animation duration in milliseconds */
11
+ duration?: number;
12
+ /** Button content */
13
+ children?: Snippet;
14
+ }
15
+
16
+ interface Ripple {
17
+ x: number;
18
+ y: number;
19
+ size: number;
20
+ key: number;
21
+ }
22
+ </script>
23
+
24
+ <script lang="ts">
25
+ import { cn } from "../../utils.js";
26
+
27
+ let {
28
+ class: className,
29
+ rippleColor = "#ADD8E6",
30
+ duration = 600,
31
+ children,
32
+ onclick,
33
+ ...restProps
34
+ }: RippleButtonProps = $props();
35
+
36
+ let buttonRef: HTMLButtonElement;
37
+ let ripples = $state<Ripple[]>([]);
38
+
39
+ function handleClick(event: MouseEvent & { currentTarget: EventTarget & HTMLButtonElement }) {
40
+ createRipple(event);
41
+ // Call the original onclick handler if provided
42
+ if (onclick && typeof onclick === "function") {
43
+ onclick(event);
44
+ }
45
+ }
46
+
47
+ function createRipple(event: MouseEvent) {
48
+ if (!buttonRef) return;
49
+
50
+ const rect = buttonRef.getBoundingClientRect();
51
+ const size = Math.max(rect.width, rect.height);
52
+ const x = event.clientX - rect.left - size / 2;
53
+ const y = event.clientY - rect.top - size / 2;
54
+
55
+ const newRipple: Ripple = { x, y, size, key: Date.now() };
56
+ ripples = [...ripples, newRipple];
57
+
58
+ // Remove ripple after animation completes
59
+ setTimeout(() => {
60
+ ripples = ripples.filter((r) => r.key !== newRipple.key);
61
+ }, duration);
62
+ }
63
+ </script>
64
+
65
+ <button
66
+ bind:this={buttonRef}
67
+ class={cn(
68
+ "relative flex cursor-pointer items-center justify-center overflow-hidden",
69
+ "bg-background text-primary rounded-lg border-2 px-4 py-2 text-center",
70
+ className
71
+ )}
72
+ style="--ripple-duration: {duration}ms"
73
+ onclick={handleClick}
74
+ {...restProps}
75
+ >
76
+ <div class="relative z-10">
77
+ {@render children?.()}
78
+ </div>
79
+
80
+ <span class="pointer-events-none absolute inset-0">
81
+ {#each ripples as ripple (ripple.key)}
82
+ <span
83
+ class="ripple-animation absolute rounded-full opacity-30"
84
+ style="
85
+ width: {ripple.size}px;
86
+ height: {ripple.size}px;
87
+ top: {ripple.y}px;
88
+ left: {ripple.x}px;
89
+ background-color: {rippleColor};
90
+ "
91
+ ></span>
92
+ {/each}
93
+ </span>
94
+ </button>
95
+
96
+ <style>
97
+ @keyframes rippling {
98
+ 0% {
99
+ transform: scale(0);
100
+ opacity: 0.3;
101
+ }
102
+ 100% {
103
+ transform: scale(2);
104
+ opacity: 0;
105
+ }
106
+ }
107
+
108
+ .ripple-animation {
109
+ animation: rippling var(--ripple-duration, 600ms) ease-out forwards;
110
+ }
111
+ </style>
@@ -0,0 +1,15 @@
1
+ import type { Snippet } from "svelte";
2
+ import type { HTMLButtonAttributes } from "svelte/elements";
3
+ export interface RippleButtonProps extends Omit<HTMLButtonAttributes, "class"> {
4
+ /** Additional CSS classes */
5
+ class?: string;
6
+ /** Color of the ripple effect */
7
+ rippleColor?: string;
8
+ /** Animation duration in milliseconds */
9
+ duration?: number;
10
+ /** Button content */
11
+ children?: Snippet;
12
+ }
13
+ declare const RippleButton: import("svelte").Component<RippleButtonProps, {}, "">;
14
+ type RippleButton = ReturnType<typeof RippleButton>;
15
+ export default RippleButton;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,44 @@
1
+ import { render, screen, cleanup } from "@testing-library/svelte";
2
+ import { afterEach, describe, it, expect } from "vitest";
3
+ import RippleButton from "./RippleButton.svelte";
4
+ describe("RippleButton", () => {
5
+ afterEach(cleanup);
6
+ it("renders a button element", () => {
7
+ render(RippleButton);
8
+ expect(screen.getByRole("button")).toBeInTheDocument();
9
+ });
10
+ it("has overflow-hidden class", () => {
11
+ render(RippleButton);
12
+ const button = screen.getByRole("button");
13
+ expect(button.className).toContain("overflow-hidden");
14
+ });
15
+ it("has rounded-lg class", () => {
16
+ render(RippleButton);
17
+ const button = screen.getByRole("button");
18
+ expect(button.className).toContain("rounded-lg");
19
+ });
20
+ it("sets --ripple-duration CSS custom property", () => {
21
+ render(RippleButton, { props: { duration: 800 } });
22
+ const button = screen.getByRole("button");
23
+ expect(button.getAttribute("style")).toContain("--ripple-duration: 800ms");
24
+ });
25
+ it("applies custom class names", () => {
26
+ render(RippleButton, { props: { class: "my-ripple" } });
27
+ const button = screen.getByRole("button");
28
+ expect(button.className).toContain("my-ripple");
29
+ });
30
+ it("preserves base classes when custom class is added", () => {
31
+ render(RippleButton, { props: { class: "extra" } });
32
+ const button = screen.getByRole("button");
33
+ expect(button.className).toContain("overflow-hidden");
34
+ expect(button.className).toContain("rounded-lg");
35
+ });
36
+ it("forwards native button attributes", () => {
37
+ render(RippleButton, {
38
+ props: { disabled: true, "aria-label": "Click me" },
39
+ });
40
+ const button = screen.getByRole("button");
41
+ expect(button).toBeDisabled();
42
+ expect(button).toHaveAttribute("aria-label", "Click me");
43
+ });
44
+ });
@@ -0,0 +1,2 @@
1
+ import RippleButton, { type RippleButtonProps } from "./RippleButton.svelte";
2
+ export { RippleButton, type RippleButtonProps };
@@ -0,0 +1,2 @@
1
+ import RippleButton, {} from "./RippleButton.svelte";
2
+ export { RippleButton };
@@ -0,0 +1,10 @@
1
+ # ShimmerButton
2
+
3
+ ## Implementation Details
4
+
5
+ - Pure CSS animation, no JS state needed
6
+ - Props use `$props()` with Svelte 5 syntax
7
+ - Scoped keyframes (`shimmer-slide`, `spin-around`) via `<style>` block
8
+ - CSS variables set via inline `style` attribute
9
+ - Uses `{@render children?.()}` for slot content
10
+ - Spreads `...restProps` for native button attributes
@@ -0,0 +1,115 @@
1
+ <script lang="ts" module>
2
+ import type { Snippet } from "svelte";
3
+ import type { HTMLButtonAttributes } from "svelte/elements";
4
+
5
+ type BaseProps = {
6
+ /** Shimmer highlight color */
7
+ shimmerColor?: string;
8
+ /** Thickness of the shimmer border */
9
+ shimmerSize?: string;
10
+ /** Button border radius */
11
+ borderRadius?: string;
12
+ /** Duration of the shimmer animation cycle */
13
+ shimmerDuration?: string;
14
+ /** Button background color */
15
+ background?: string;
16
+ /** Custom CSS class */
17
+ class?: string;
18
+ /** Button content */
19
+ children?: Snippet;
20
+ };
21
+
22
+ export type ShimmerButtonProps = BaseProps & Omit<HTMLButtonAttributes, keyof BaseProps>;
23
+ </script>
24
+
25
+ <script lang="ts">
26
+ import { cn } from "../../utils.js";
27
+
28
+ let {
29
+ class: className,
30
+ shimmerColor = "#ffffff",
31
+ shimmerSize = "0.05em",
32
+ borderRadius = "100px",
33
+ shimmerDuration = "3s",
34
+ background = "rgba(0, 0, 0, 1)",
35
+ children,
36
+ ...restProps
37
+ }: ShimmerButtonProps = $props();
38
+
39
+ const styleVars = $derived(
40
+ `--spread: 90deg; --shimmer-color: ${shimmerColor}; --radius: ${borderRadius}; --speed: ${shimmerDuration}; --cut: ${shimmerSize}; --bg: ${background}`
41
+ );
42
+ </script>
43
+
44
+ <button
45
+ class={cn(
46
+ "shimmer-button group relative z-0 flex cursor-pointer items-center justify-center overflow-hidden [border-radius:var(--radius)] border border-white/10 px-6 py-3 whitespace-nowrap text-white [background:var(--bg)] dark:text-black",
47
+ "transform-gpu transition-transform duration-300 ease-in-out active:translate-y-px",
48
+ className
49
+ )}
50
+ style={styleVars}
51
+ {...restProps}
52
+ >
53
+ <!-- Shimmer layer -->
54
+ <div class="[container-type:size] absolute inset-0 -z-30 overflow-visible blur-[2px]">
55
+ <div
56
+ class="shimmer-slide absolute inset-0 [aspect-ratio:1] h-[100cqh] [border-radius:0] [mask:none]"
57
+ >
58
+ <div
59
+ class="spin-around absolute -inset-full w-auto [translate:0_0] rotate-0 [background:conic-gradient(from_calc(270deg-(var(--spread)*0.5)),transparent_0,var(--shimmer-color)_var(--spread),transparent_var(--spread))]"
60
+ ></div>
61
+ </div>
62
+ </div>
63
+
64
+ <!-- Content -->
65
+ {@render children?.()}
66
+
67
+ <!-- Inner shadow overlay -->
68
+ <div
69
+ class={cn(
70
+ "insert-0 absolute size-full",
71
+ "rounded-2xl px-4 py-1.5 text-sm font-medium shadow-[inset_0_-8px_10px_#ffffff1f]",
72
+ "transform-gpu transition-all duration-300 ease-in-out",
73
+ "group-hover:shadow-[inset_0_-6px_10px_#ffffff3f]",
74
+ "group-active:shadow-[inset_0_-10px_10px_#ffffff3f]"
75
+ )}
76
+ ></div>
77
+
78
+ <!-- Background fill -->
79
+ <div
80
+ class="absolute [inset:var(--cut)] -z-20 [border-radius:var(--radius)] [background:var(--bg)]"
81
+ ></div>
82
+ </button>
83
+
84
+ <style>
85
+ @keyframes shimmer-slide {
86
+ to {
87
+ transform: translate(calc(100cqw - 100%), 0);
88
+ }
89
+ }
90
+
91
+ @keyframes spin-around {
92
+ 0% {
93
+ transform: translateZ(0) rotate(0);
94
+ }
95
+ 15%,
96
+ 35% {
97
+ transform: translateZ(0) rotate(90deg);
98
+ }
99
+ 65%,
100
+ 85% {
101
+ transform: translateZ(0) rotate(270deg);
102
+ }
103
+ 100% {
104
+ transform: translateZ(0) rotate(360deg);
105
+ }
106
+ }
107
+
108
+ .shimmer-slide {
109
+ animation: shimmer-slide var(--speed) ease-in-out infinite alternate;
110
+ }
111
+
112
+ .spin-around {
113
+ animation: spin-around calc(var(--speed) * 2) infinite linear;
114
+ }
115
+ </style>
@@ -0,0 +1,22 @@
1
+ import type { Snippet } from "svelte";
2
+ import type { HTMLButtonAttributes } from "svelte/elements";
3
+ type BaseProps = {
4
+ /** Shimmer highlight color */
5
+ shimmerColor?: string;
6
+ /** Thickness of the shimmer border */
7
+ shimmerSize?: string;
8
+ /** Button border radius */
9
+ borderRadius?: string;
10
+ /** Duration of the shimmer animation cycle */
11
+ shimmerDuration?: string;
12
+ /** Button background color */
13
+ background?: string;
14
+ /** Custom CSS class */
15
+ class?: string;
16
+ /** Button content */
17
+ children?: Snippet;
18
+ };
19
+ export type ShimmerButtonProps = BaseProps & Omit<HTMLButtonAttributes, keyof BaseProps>;
20
+ declare const ShimmerButton: import("svelte").Component<ShimmerButtonProps, {}, "">;
21
+ type ShimmerButton = ReturnType<typeof ShimmerButton>;
22
+ export default ShimmerButton;
@@ -0,0 +1,69 @@
1
+ import { render, screen, cleanup } from "@testing-library/svelte";
2
+ import { afterEach, describe, it, expect } from "vitest";
3
+ import ShimmerButton from "./ShimmerButton.svelte";
4
+ describe("ShimmerButton", () => {
5
+ afterEach(cleanup);
6
+ it("renders a button element", () => {
7
+ render(ShimmerButton);
8
+ expect(screen.getByRole("button")).toBeInTheDocument();
9
+ });
10
+ it("applies default CSS custom properties", () => {
11
+ render(ShimmerButton);
12
+ const button = screen.getByRole("button");
13
+ const style = button.getAttribute("style") ?? "";
14
+ expect(style).toContain("--shimmer-color: #ffffff");
15
+ expect(style).toContain("--speed: 3s");
16
+ expect(style).toContain("--bg: rgba(0, 0, 0, 1)");
17
+ });
18
+ it("applies custom shimmerColor", () => {
19
+ render(ShimmerButton, { props: { shimmerColor: "#ff0000" } });
20
+ const button = screen.getByRole("button");
21
+ expect(button.getAttribute("style")).toContain("--shimmer-color: #ff0000");
22
+ });
23
+ it("applies custom background", () => {
24
+ render(ShimmerButton, { props: { background: "rgba(0, 0, 255, 0.5)" } });
25
+ const button = screen.getByRole("button");
26
+ expect(button.getAttribute("style")).toContain("--bg: rgba(0, 0, 255, 0.5)");
27
+ });
28
+ it("applies custom shimmerDuration", () => {
29
+ render(ShimmerButton, { props: { shimmerDuration: "5s" } });
30
+ const button = screen.getByRole("button");
31
+ expect(button.getAttribute("style")).toContain("--speed: 5s");
32
+ });
33
+ it("applies custom borderRadius", () => {
34
+ render(ShimmerButton, { props: { borderRadius: "8px" } });
35
+ const button = screen.getByRole("button");
36
+ expect(button.getAttribute("style")).toContain("--radius: 8px");
37
+ });
38
+ it("applies custom class names", () => {
39
+ render(ShimmerButton, { props: { class: "my-shimmer" } });
40
+ const button = screen.getByRole("button");
41
+ expect(button.className).toContain("my-shimmer");
42
+ });
43
+ it("preserves base classes when custom class is added", () => {
44
+ render(ShimmerButton, { props: { class: "extra" } });
45
+ const button = screen.getByRole("button");
46
+ expect(button.className).toContain("shimmer-button");
47
+ expect(button.className).toContain("overflow-hidden");
48
+ });
49
+ it("contains shimmer layer div", () => {
50
+ render(ShimmerButton);
51
+ const button = screen.getByRole("button");
52
+ const shimmerLayer = button.querySelector(".shimmer-slide");
53
+ expect(shimmerLayer).toBeInTheDocument();
54
+ });
55
+ it("contains spin-around element", () => {
56
+ render(ShimmerButton);
57
+ const button = screen.getByRole("button");
58
+ const spinAround = button.querySelector(".spin-around");
59
+ expect(spinAround).toBeInTheDocument();
60
+ });
61
+ it("forwards native button attributes", () => {
62
+ render(ShimmerButton, {
63
+ props: { disabled: true, "aria-label": "Submit" },
64
+ });
65
+ const button = screen.getByRole("button");
66
+ expect(button).toBeDisabled();
67
+ expect(button).toHaveAttribute("aria-label", "Submit");
68
+ });
69
+ });
@@ -0,0 +1,2 @@
1
+ import ShimmerButton, { type ShimmerButtonProps } from "./ShimmerButton.svelte";
2
+ export { ShimmerButton, type ShimmerButtonProps };
@@ -0,0 +1,2 @@
1
+ import ShimmerButton, {} from "./ShimmerButton.svelte";
2
+ export { ShimmerButton };
@@ -0,0 +1,23 @@
1
+ # SmoothCursor
2
+
3
+ A customizable, physics-based smooth cursor animation component. The cursor follows mouse movement with spring physics, creating a natural, fluid feel. Includes rotation based on movement direction.
4
+
5
+ ## Features
6
+
7
+ - Spring physics for smooth, natural cursor movement
8
+ - Configurable spring parameters (damping, stiffness, mass)
9
+ - Rotation based on movement direction
10
+ - Custom cursor support via Svelte snippets
11
+ - Auto-hides when mouse leaves the viewport
12
+ - Respects `prefers-reduced-motion`: disables spring physics and snaps directly to pointer
13
+ - Hides the native browser cursor automatically
14
+ - Performance optimized with `requestAnimationFrame` and `will-change`
15
+
16
+ ## Implementation Notes
17
+
18
+ ### Svelte 5 Implementation
19
+
20
+ 1. **Spring physics**: Implemented manually using `requestAnimationFrame` instead of Framer Motion's `useSpring`
21
+ 2. **Custom cursor**: Uses Svelte 5 snippets instead of JSX elements
22
+ 3. **Lifecycle**: Uses `onMount` with cleanup return for event listener management
23
+ 4. **Props**: Uses Svelte 5 `$props()` with `$derived()` for merged config