@stfrigerio/sito-template 0.1.57 → 0.1.59

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 (297) hide show
  1. package/dist/components/atoms/Button/Button.stories.d.ts +0 -1
  2. package/dist/components/atoms/Button/Button.stories.d.ts.map +1 -1
  3. package/dist/components/atoms/Card/Card.stories.d.ts +0 -1
  4. package/dist/components/atoms/Card/Card.stories.d.ts.map +1 -1
  5. package/dist/components/atoms/Checkbox/Checkbox.stories.d.ts +0 -7
  6. package/dist/components/atoms/Checkbox/Checkbox.stories.d.ts.map +1 -1
  7. package/dist/components/atoms/DateInput/DateInput.stories.d.ts +0 -7
  8. package/dist/components/atoms/DateInput/DateInput.stories.d.ts.map +1 -1
  9. package/dist/components/atoms/LoadingSpinner/LoadingSpinner.stories.d.ts +1 -15
  10. package/dist/components/atoms/LoadingSpinner/LoadingSpinner.stories.d.ts.map +1 -1
  11. package/dist/components/atoms/NumberStepper/NumberStepper.stories.d.ts +0 -16
  12. package/dist/components/atoms/NumberStepper/NumberStepper.stories.d.ts.map +1 -1
  13. package/dist/components/atoms/SearchableDropdown/SearchableDropdown.stories.d.ts +0 -9
  14. package/dist/components/atoms/SearchableDropdown/SearchableDropdown.stories.d.ts.map +1 -1
  15. package/dist/components/atoms/SelectInput/SelectInput.stories.d.ts +0 -6
  16. package/dist/components/atoms/SelectInput/SelectInput.stories.d.ts.map +1 -1
  17. package/dist/components/atoms/Slider/Slider.stories.d.ts.map +1 -1
  18. package/dist/components/atoms/TextArea/TextArea.stories.d.ts +0 -10
  19. package/dist/components/atoms/TextArea/TextArea.stories.d.ts.map +1 -1
  20. package/dist/components/atoms/TextInput/TextInput.stories.d.ts +0 -14
  21. package/dist/components/atoms/TextInput/TextInput.stories.d.ts.map +1 -1
  22. package/dist/components/atoms/Toggle/Toggle.stories.d.ts +0 -8
  23. package/dist/components/atoms/Toggle/Toggle.stories.d.ts.map +1 -1
  24. package/dist/components/atoms/ToggleButton/ToggleButton.stories.d.ts +0 -7
  25. package/dist/components/atoms/ToggleButton/ToggleButton.stories.d.ts.map +1 -1
  26. package/dist/components/molecules/ArrayInput/ArrayInput.stories.d.ts +0 -9
  27. package/dist/components/molecules/ArrayInput/ArrayInput.stories.d.ts.map +1 -1
  28. package/dist/components/molecules/EditFAB/EditFAB.stories.d.ts +1 -12
  29. package/dist/components/molecules/EditFAB/EditFAB.stories.d.ts.map +1 -1
  30. package/dist/components/molecules/SearchBar/SearchBar.stories.d.ts +0 -8
  31. package/dist/components/molecules/SearchBar/SearchBar.stories.d.ts.map +1 -1
  32. package/dist/components/molecules/Tabs/Tabs.stories.d.ts.map +1 -1
  33. package/dist/components/molecules/ThemeSwitcher/ThemeSwitcher.stories.d.ts +0 -3
  34. package/dist/components/molecules/ThemeSwitcher/ThemeSwitcher.stories.d.ts.map +1 -1
  35. package/dist/components/molecules/TimeInput/TimeInput.stories.d.ts +0 -6
  36. package/dist/components/molecules/TimeInput/TimeInput.stories.d.ts.map +1 -1
  37. package/dist/components/organisms/Calendar/Calendar.d.ts +21 -1
  38. package/dist/components/organisms/Calendar/Calendar.d.ts.map +1 -1
  39. package/dist/components/organisms/Calendar/Calendar.stories.d.ts +1 -1
  40. package/dist/components/organisms/Calendar/Calendar.stories.d.ts.map +1 -1
  41. package/dist/components/organisms/Calendar/DayEventCard.d.ts +1 -1
  42. package/dist/components/organisms/Calendar/DayEventCard.d.ts.map +1 -1
  43. package/dist/components/organisms/ImageSlideshow/ImageSlideshow.stories.d.ts +0 -23
  44. package/dist/components/organisms/ImageSlideshow/ImageSlideshow.stories.d.ts.map +1 -1
  45. package/dist/components/organisms/Navbar/Navbar.d.ts +1 -0
  46. package/dist/components/organisms/Navbar/Navbar.d.ts.map +1 -1
  47. package/dist/components/organisms/Navbar/Navbar.stories.d.ts +1 -7
  48. package/dist/components/organisms/Navbar/Navbar.stories.d.ts.map +1 -1
  49. package/dist/components/organisms/charts/BooleansHeatmap/BooleansHeatmap.stories.d.ts +1 -4
  50. package/dist/components/organisms/charts/BooleansHeatmap/BooleansHeatmap.stories.d.ts.map +1 -1
  51. package/dist/components/organisms/charts/PieChart/PieChart.stories.d.ts +1 -5
  52. package/dist/components/organisms/charts/PieChart/PieChart.stories.d.ts.map +1 -1
  53. package/dist/index.esm.js +148 -60
  54. package/dist/index.esm.js.map +1 -1
  55. package/dist/index.js +147 -59
  56. package/dist/index.js.map +1 -1
  57. package/dist/stories/utils.d.ts.map +1 -1
  58. package/dist/styles.css +1 -1
  59. package/dist/styles.css.map +1 -1
  60. package/dist/themes/dao.css +16 -1
  61. package/dist/themes/globals.css +2 -5
  62. package/package.json +1 -1
  63. package/storybook-static/assets/{ASCIIText.stories-LbmvFzzv.js → ASCIIText.stories-CsG3yKr5.js} +4 -4
  64. package/storybook-static/assets/{AllAtoms.stories-CLunFOjI.js → AllAtoms.stories-D2Pzz8c7.js} +1 -1
  65. package/storybook-static/assets/{AnimatedContent.stories-B8hBaVkK.js → AnimatedContent.stories-BP9feFGz.js} +1 -1
  66. package/storybook-static/assets/{AnimatedList.stories-D8a9eYqH.js → AnimatedList.stories-DQ8jdk44.js} +2 -2
  67. package/storybook-static/assets/{Antigravity.stories-D_mJbWK0.js → Antigravity.stories-BTIHyYKU.js} +1 -1
  68. package/storybook-static/assets/ArrayInput.stories-d5_OJJMu.js +138 -0
  69. package/storybook-static/assets/{Aurora.stories-BN4MataE.js → Aurora.stories-D_eQNPaB.js} +2 -2
  70. package/storybook-static/assets/{Beams.stories-CCtZOw8G.js → Beams.stories-VLKuYE0_.js} +6 -6
  71. package/storybook-static/assets/{BlobCursor.stories-CdB55R5G.js → BlobCursor.stories-BQJgTsuD.js} +1 -1
  72. package/storybook-static/assets/{BlurText.stories-Bg2Ih2Je.js → BlurText.stories-oSn5_w7h.js} +2 -2
  73. package/storybook-static/assets/BooleansHeatmap-C8cFXa7K.css +1 -0
  74. package/storybook-static/assets/BooleansHeatmap.stories-CHoCYK4N.js +63 -0
  75. package/storybook-static/assets/{BorderGlow.stories-CUxbrsvW.js → BorderGlow.stories-D-vgIU3S.js} +1 -1
  76. package/storybook-static/assets/{BubbleMenu.stories-DuVDLBsV.js → BubbleMenu.stories-DcWoqA7_.js} +1 -1
  77. package/storybook-static/assets/{Button-CQGdvhpN.js → Button-DgpqJWgD.js} +1 -1
  78. package/storybook-static/assets/{Button.stories-D8Xx3I9p.js → Button.stories-TQXKQagp.js} +2 -2
  79. package/storybook-static/assets/Calendar-BZCyXxvF.css +1 -0
  80. package/storybook-static/assets/Calendar.stories-D5CKBagI.js +321 -0
  81. package/storybook-static/assets/{Card-DNp-cUnt.js → Card-Bu54h8gN.js} +1 -1
  82. package/storybook-static/assets/{Card.stories-D1f1NTVU.js → Card.stories-Dw2bPvLo.js} +1 -1
  83. package/storybook-static/assets/{CardNav.stories-Cd4zEw8p.js → CardNav.stories-CnbwwAde.js} +1 -1
  84. package/storybook-static/assets/{Carousel.stories-BxbGwXE5.js → Carousel.stories-ChBLLqBg.js} +2 -2
  85. package/storybook-static/assets/{Checkbox-Dw8W2w74.js → Checkbox-Duyafa-Y.js} +1 -1
  86. package/storybook-static/assets/Checkbox.stories-Co7IxmK1.js +55 -0
  87. package/storybook-static/assets/{ChromaGrid.stories-DBHYiDPV.js → ChromaGrid.stories-68ukohGs.js} +1 -1
  88. package/storybook-static/assets/{CircularGallery.stories-TJN6o_RG.js → CircularGallery.stories-CV4iXVIX.js} +2 -2
  89. package/storybook-static/assets/{CircularText.stories-rNjRUNn2.js → CircularText.stories-DqYHtbPW.js} +1 -1
  90. package/storybook-static/assets/{ClickSpark.stories-BfqByoGe.js → ClickSpark.stories-DvAOxLjs.js} +1 -1
  91. package/storybook-static/assets/{ColorBends.stories-IEMOWAyf.js → ColorBends.stories-Dm4nxTTN.js} +2 -2
  92. package/storybook-static/assets/{CountUp.stories-DXPrKAQb.js → CountUp.stories-DTaL8Yfy.js} +1 -1
  93. package/storybook-static/assets/{Counter.stories-DMdecsw_.js → Counter.stories-Bf_2Js0l.js} +2 -2
  94. package/storybook-static/assets/{Crosshair.stories-CYzDxRSn.js → Crosshair.stories-DJjjCcED.js} +2 -2
  95. package/storybook-static/assets/{Cubes.stories-Drq4ULo3.js → Cubes.stories-Qh3JqlQW.js} +1 -1
  96. package/storybook-static/assets/{CurvedLoop.stories-C9GMKnIw.js → CurvedLoop.stories-BvyrCuM7.js} +1 -1
  97. package/storybook-static/assets/{DarkVeil.stories-BtLNfEH8.js → DarkVeil.stories-BVY870pm.js} +2 -2
  98. package/storybook-static/assets/{DateInput-CW4PsZAQ.js → DateInput-DfGES3te.js} +2 -2
  99. package/storybook-static/assets/DateInput-Dhcb9x13.css +1 -0
  100. package/storybook-static/assets/DateInput.stories-BXF8Ttde.js +51 -0
  101. package/storybook-static/assets/{DecayCard.stories-CAU_wTc7.js → DecayCard.stories-B0g2xWqX.js} +1 -1
  102. package/storybook-static/assets/{DecryptedText.stories-Dvba9C1V.js → DecryptedText.stories-fqDZfjv8.js} +1 -1
  103. package/storybook-static/assets/{Dither.stories-B5KfMprl.js → Dither.stories-B4N3Z5sW.js} +2 -2
  104. package/storybook-static/assets/{Dock.stories-oyQGRzlM.js → Dock.stories-f_YKz-pl.js} +1 -1
  105. package/storybook-static/assets/EditFAB.stories-LhVUDgtx.js +233 -0
  106. package/storybook-static/assets/{EvilEye.stories-C1820-DG.js → EvilEye.stories-BtBvvs31.js} +2 -2
  107. package/storybook-static/assets/{FadeContent.stories-B4z_JRy9.js → FadeContent.stories-oNqKrfSe.js} +1 -1
  108. package/storybook-static/assets/{FaultyTerminal.stories-DmkguJql.js → FaultyTerminal.stories-7nV4DvrW.js} +2 -2
  109. package/storybook-static/assets/{Fbo-CTQm-4Bw.js → Fbo-Clk04E0N.js} +1 -1
  110. package/storybook-static/assets/{FloatingLines.stories-CQvqKSpH.js → FloatingLines.stories-DgxhGl_b.js} +2 -2
  111. package/storybook-static/assets/{FlowingMenu.stories-DmOspv0B.js → FlowingMenu.stories-C5dfG25U.js} +1 -1
  112. package/storybook-static/assets/{FluidGlass.stories-CZSqxrNt.js → FluidGlass.stories-DGLlp1x1.js} +2 -2
  113. package/storybook-static/assets/{Folder.stories-7vb52Lfi.js → Folder.stories-BJGdA6Qb.js} +1 -1
  114. package/storybook-static/assets/{FuzzyText.stories-BdXN4VK1.js → FuzzyText.stories-DygRT6bB.js} +1 -1
  115. package/storybook-static/assets/{Galaxy.stories-BhT1GZh5.js → Galaxy.stories-BU6XCHeu.js} +2 -2
  116. package/storybook-static/assets/{GhostCursor.stories-DkXqCjE9.js → GhostCursor.stories-D_HIFPUl.js} +2 -2
  117. package/storybook-static/assets/{GlareHover.stories-CznX3yTV.js → GlareHover.stories-D5_-xnyP.js} +1 -1
  118. package/storybook-static/assets/{GlassSurface.stories-BnwwYK95.js → GlassSurface.stories-CrZqAGRq.js} +2 -2
  119. package/storybook-static/assets/{GlitchText.stories-CVcTBUVS.js → GlitchText.stories-BRqI-kBX.js} +2 -2
  120. package/storybook-static/assets/{GooeyNav.stories-C0abTHBc.js → GooeyNav.stories-DjR0-Th2.js} +1 -1
  121. package/storybook-static/assets/{GradientBlinds.stories-CpSguKtv.js → GradientBlinds.stories-CiIDtPz3.js} +2 -2
  122. package/storybook-static/assets/{GradientText.stories-B4hMx13h.js → GradientText.stories-pLA_An71.js} +1 -1
  123. package/storybook-static/assets/{Grainient.stories-5EakpvU2.js → Grainient.stories-BthRrRMd.js} +2 -2
  124. package/storybook-static/assets/{GridMotion.stories-Bm3DD7cb.js → GridMotion.stories-BSwjL8IE.js} +1 -1
  125. package/storybook-static/assets/ImageSlideshow.stories-BYAQMHlZ.js +108 -0
  126. package/storybook-static/assets/{Iridescence.stories-Cykk3hHZ.js → Iridescence.stories-ChHTH2TM.js} +2 -2
  127. package/storybook-static/assets/{LaserFlow.stories-CfiM4ZZ5.js → LaserFlow.stories-DlDx8Vr8.js} +2 -2
  128. package/storybook-static/assets/{LetterGlitch.stories-BXb7iSeX.js → LetterGlitch.stories-C-S2SRjU.js} +1 -1
  129. package/storybook-static/assets/{LightPillar.stories-CwI-8_BF.js → LightPillar.stories-D0PF-h7T.js} +3 -3
  130. package/storybook-static/assets/{LightRays.stories-BIIfv6Ky.js → LightRays.stories-Cbkl7wuP.js} +2 -2
  131. package/storybook-static/assets/{Lightning.stories-B8GNkzSN.js → Lightning.stories-BUs-gwYj.js} +2 -2
  132. package/storybook-static/assets/{LineWaves.stories-CjxdD_yt.js → LineWaves.stories-D2GXzteP.js} +2 -2
  133. package/storybook-static/assets/{LiquidChrome.stories-G7bVFJM9.js → LiquidChrome.stories-CtDp7th1.js} +2 -2
  134. package/storybook-static/assets/{LiquidEther.stories-C8n27zuA.js → LiquidEther.stories-DM2n5oEm.js} +2 -2
  135. package/storybook-static/assets/{LoadingSpinner-Br8TYFlF.js → LoadingSpinner-DaUSIVPY.js} +1 -1
  136. package/storybook-static/assets/LoadingSpinner.stories-Cx4_nNAf.js +21 -0
  137. package/storybook-static/assets/{MagicRings.stories-D50m_2UF.js → MagicRings.stories-CZt-cHcL.js} +2 -2
  138. package/storybook-static/assets/{Magnet.stories-BP9fjpzP.js → Magnet.stories-B6js1VeO.js} +1 -1
  139. package/storybook-static/assets/{MagnetLines.stories-DvbytV0Y.js → MagnetLines.stories-BKQ9YC_E.js} +1 -1
  140. package/storybook-static/assets/{Masonry.stories-xXYQw2uD.js → Masonry.stories-BGkTkNUa.js} +1 -1
  141. package/storybook-static/assets/{MetaBalls.stories-DKD3gVUH.js → MetaBalls.stories-Cao6Tqjg.js} +2 -2
  142. package/storybook-static/assets/{MetallicPaint.stories-Bz-uS-L_.js → MetallicPaint.stories-DF9qb3W_.js} +2 -2
  143. package/storybook-static/assets/MoodChart-ba3aY_qF.css +1 -0
  144. package/storybook-static/assets/MoodChart.stories-AGxwnR6s.js +40 -0
  145. package/storybook-static/assets/{MotionConfigContext-D5hZdVGx.js → MotionConfigContext-BCa1jVYq.js} +1 -1
  146. package/storybook-static/assets/Navbar-CH6O1IzY.css +1 -0
  147. package/storybook-static/assets/Navbar.stories-CFHb1c22.js +186 -0
  148. package/storybook-static/assets/{Noise.stories-D6C6-k8-.js → Noise.stories-ConXbyqm.js} +2 -2
  149. package/storybook-static/assets/{NumberStepper--0cJcLNZ.js → NumberStepper-DH9y3k8b.js} +1 -1
  150. package/storybook-static/assets/NumberStepper.stories-PMwPqbsn.js +88 -0
  151. package/storybook-static/assets/{Orb.stories-CS__2PJW.js → Orb.stories-DcXSWhV1.js} +2 -2
  152. package/storybook-static/assets/{OrbitImages.stories-CcaelcY5.js → OrbitImages.stories-Dk417qKA.js} +1 -1
  153. package/storybook-static/assets/PieChart-DXPBsaZR.css +1 -0
  154. package/storybook-static/assets/PieChart.stories-6sgfe6Xk.js +91 -0
  155. package/storybook-static/assets/{PixelBlast.stories-CyK8BxPq.js → PixelBlast.stories-_cBuognT.js} +2 -2
  156. package/storybook-static/assets/{PixelCard.stories-D_Og1Eve.js → PixelCard.stories-D_EZOUox.js} +1 -1
  157. package/storybook-static/assets/{PixelSnow.stories-CoCZucVV.js → PixelSnow.stories-DcD7737G.js} +2 -2
  158. package/storybook-static/assets/{PixelTransition.stories-DmVJ4jdu.js → PixelTransition.stories-BwNcUv5J.js} +1 -1
  159. package/storybook-static/assets/{Plasma.stories-DUqrW-qq.js → Plasma.stories-BLolMCfR.js} +2 -2
  160. package/storybook-static/assets/{Prism.stories-DWdVDcBG.js → Prism.stories-CG2_KGsq.js} +2 -2
  161. package/storybook-static/assets/{PrismaticBurst.stories-BEVYTjXo.js → PrismaticBurst.stories-DzS--Ffu.js} +2 -2
  162. package/storybook-static/assets/{ProfileCard.stories-CAoKQpAZ.js → ProfileCard.stories-vI_ispYe.js} +1 -1
  163. package/storybook-static/assets/QuantifiableHabitsChart-BiMp7Kkq.css +1 -0
  164. package/storybook-static/assets/{QuantifiableHabitsChart.stories-CMexb5Ij.js → QuantifiableHabitsChart.stories-D5yeGCZ5.js} +2 -2
  165. package/storybook-static/assets/{Radar.stories-Dcjnm9Bu.js → Radar.stories-DLv_hY9T.js} +2 -2
  166. package/storybook-static/assets/{Ribbons.stories-Cs3Eg2Gz.js → Ribbons.stories-4BbVINtW.js} +4 -4
  167. package/storybook-static/assets/{RippleGrid.stories-QV9Doq9P.js → RippleGrid.stories-CFh8tigy.js} +2 -2
  168. package/storybook-static/assets/{RotatingText.stories-DkntoAXJ.js → RotatingText.stories-AM4GcpU2.js} +2 -2
  169. package/storybook-static/assets/{ScrollFloat.stories-BaX43Ike.js → ScrollFloat.stories-Ct_ZkL7k.js} +1 -1
  170. package/storybook-static/assets/{ScrollReveal.stories-C2IWpLpI.js → ScrollReveal.stories-B7fcgLZ3.js} +1 -1
  171. package/storybook-static/assets/{ScrollVelocity.stories-LaYJ5WQN.js → ScrollVelocity.stories-BRDv3Fdk.js} +1 -1
  172. package/storybook-static/assets/SearchBar.stories-Dnmegbak.js +64 -0
  173. package/storybook-static/assets/{SearchableDropdown-4HgWY0Ck.js → SearchableDropdown-BtIsuxmT.js} +1 -1
  174. package/storybook-static/assets/SearchableDropdown.stories-DVub17TN.js +44 -0
  175. package/storybook-static/assets/{SelectInput-DvSeeIw5.js → SelectInput-C0kBLYgX.js} +1 -1
  176. package/storybook-static/assets/SelectInput.stories-HoF32-Km.js +94 -0
  177. package/storybook-static/assets/{ShapeBlur.stories-ZQV0yHkn.js → ShapeBlur.stories-C3RyLvBh.js} +2 -2
  178. package/storybook-static/assets/{ShapeGrid.stories-G_tZAcp9.js → ShapeGrid.stories-ltmu466o.js} +1 -1
  179. package/storybook-static/assets/{ShinyText.stories-C6BrLI0x.js → ShinyText.stories-JO2F4CpJ.js} +1 -1
  180. package/storybook-static/assets/{Silk.stories-BpsR4txJ.js → Silk.stories-CUzWiwqP.js} +2 -2
  181. package/storybook-static/assets/SleepChart-CjpdWR_T.css +1 -0
  182. package/storybook-static/assets/SleepChart.stories-YvCzf0BI.js +58 -0
  183. package/storybook-static/assets/Slider-BaDHm9m3.css +1 -0
  184. package/storybook-static/assets/{Slider-3iog5_du.js → Slider-CI9mXQSu.js} +1 -1
  185. package/storybook-static/assets/{Slider.stories-C8eUZ7Ne.js → Slider.stories-DQYlBjGq.js} +1 -1
  186. package/storybook-static/assets/{SoftAurora.stories--Rcyqxiu.js → SoftAurora.stories-ubq_KV8Q.js} +2 -2
  187. package/storybook-static/assets/{SoundDemo.stories-DvhKS2Fi.js → SoundDemo.stories-Cie-leKw.js} +1 -1
  188. package/storybook-static/assets/{SplashCursor.stories-FzRIUaX9.js → SplashCursor.stories-Clea3dMy.js} +2 -2
  189. package/storybook-static/assets/{SpotlightCard.stories-CifqsSUc.js → SpotlightCard.stories-BWv0AuTI.js} +1 -1
  190. package/storybook-static/assets/{Stack.stories-Dq82x0TG.js → Stack.stories-DxVGTJ6l.js} +1 -1
  191. package/storybook-static/assets/{StaggeredMenu.stories-CsiTDJGG.js → StaggeredMenu.stories-1UB8ravq.js} +1 -1
  192. package/storybook-static/assets/{StarBorder.stories-Ba14_TPk.js → StarBorder.stories-DiSAqN3r.js} +2 -2
  193. package/storybook-static/assets/{SunburstChart.stories-fREzDXM9.js → SunburstChart.stories-DLjQA_I1.js} +1 -1
  194. package/storybook-static/assets/Table-BFjXRRk3.css +1 -0
  195. package/storybook-static/assets/{Table.stories-CXsQAQrR.js → Table.stories-wQGb96WC.js} +6 -6
  196. package/storybook-static/assets/Tabs-CDVjuS9_.css +1 -0
  197. package/storybook-static/assets/{Tabs.stories-HeiG8gYN.js → Tabs.stories-jkioQ4xt.js} +4 -4
  198. package/storybook-static/assets/{TargetCursor.stories-B16pWZaP.js → TargetCursor.stories-B4ACbrmW.js} +1 -1
  199. package/storybook-static/assets/{TextArea-DKx3k6hV.js → TextArea-DN6IYITs.js} +1 -1
  200. package/storybook-static/assets/TextArea.stories-CwLLZFoD.js +118 -0
  201. package/storybook-static/assets/{TextCursor.stories-CY2eIn6Z.js → TextCursor.stories-NORQhkfy.js} +1 -1
  202. package/storybook-static/assets/TextInput-6V0mlIuS.css +1 -0
  203. package/storybook-static/assets/TextInput-CLgIGUn3.js +28 -0
  204. package/storybook-static/assets/TextInput.stories-BNooOWA2.js +89 -0
  205. package/storybook-static/assets/{TextPressure.stories-sH-cgdL2.js → TextPressure.stories-BaCAyBD4.js} +2 -2
  206. package/storybook-static/assets/{TextType.stories-B7Oy3P9u.js → TextType.stories-DG4mQ3HF.js} +1 -1
  207. package/storybook-static/assets/ThemeSwitcher.stories-slxIamHU.js +47 -0
  208. package/storybook-static/assets/{Threads.stories-e52ErKbM.js → Threads.stories-Rsg8lRsX.js} +2 -2
  209. package/storybook-static/assets/TimeInput-BT44V2P0.css +1 -0
  210. package/storybook-static/assets/TimeInput.stories-CaO8_PY2.js +13 -0
  211. package/storybook-static/assets/{Toggle-BntWdyUe.js → Toggle-CTTN-13k.js} +1 -1
  212. package/storybook-static/assets/Toggle.stories-DrNYDjFB.js +163 -0
  213. package/storybook-static/assets/{ToggleButton-BQqJdlB_.js → ToggleButton-CXK855yx.js} +1 -1
  214. package/storybook-static/assets/ToggleButton.stories-DNsNH9vH.js +103 -0
  215. package/storybook-static/assets/{TrueFocus.stories-wm4VXWCk.js → TrueFocus.stories-zG6Ml8RP.js} +1 -1
  216. package/storybook-static/assets/{VariableProximity.stories-BNSYs_rC.js → VariableProximity.stories-CMZW-Tov.js} +1 -1
  217. package/storybook-static/assets/{Waves.stories-Ce2ZJFsV.js → Waves.stories-CscXTp_S.js} +1 -1
  218. package/storybook-static/assets/{check-Cty-Z1Ib.js → check-DLeHG_Da.js} +1 -1
  219. package/storybook-static/assets/{chevron-down-OhqRl4eJ.js → chevron-down-Ciks5pXx.js} +1 -1
  220. package/storybook-static/assets/{chevron-right-CZm4bArI.js → chevron-right-DjeluSA0.js} +1 -1
  221. package/storybook-static/assets/client-D1KVnN68.js +1 -0
  222. package/storybook-static/assets/{createLucideIcon-BNUG5osq.js → createLucideIcon-dvowvj4F.js} +1 -1
  223. package/storybook-static/assets/{folder-BjriMpXc.js → folder-CCqkDvFG.js} +1 -1
  224. package/storybook-static/assets/{iconBase-DmcmY1l-.js → iconBase-nrk1zV8Q.js} +1 -1
  225. package/storybook-static/assets/iframe-CU5nRRrn.css +1 -0
  226. package/storybook-static/assets/{iframe-B8pH-Lvr.js → iframe-Cw8dCV4Z.js} +180 -181
  227. package/storybook-static/assets/{index-PY_vM88c.js → index-A7l1uA6_.js} +6 -6
  228. package/storybook-static/assets/{index-BN99WpBo.js → index-Bm5msOcI.js} +1 -1
  229. package/storybook-static/assets/{index-DBfrIdYd.js → index-CzApopWo.js} +1 -1
  230. package/storybook-static/assets/{proxy-BA3VZtN5.js → proxy-p8L3T_Zy.js} +1 -1
  231. package/storybook-static/assets/{react-18-7dGub68c.js → react-18-D7YhBYbX.js} +1 -1
  232. package/storybook-static/assets/{react-three-fiber.esm-DI-wNJmP.js → react-three-fiber.esm-BnMrba87.js} +1 -1
  233. package/storybook-static/assets/{search-2YqBkJlG.js → search-7V6DOf2z.js} +1 -1
  234. package/storybook-static/assets/{settings-DvzICcFU.js → settings-B8s5hJGs.js} +1 -1
  235. package/storybook-static/assets/{sun-DgDhCM_S.js → sun-5V6ee2LJ.js} +1 -1
  236. package/storybook-static/assets/{trash-2-BwI5jvsn.js → trash-2-DeQvYdO7.js} +1 -1
  237. package/storybook-static/assets/{use-animation-frame-CF42h0i5.js → use-animation-frame-DovyG_Es.js} +1 -1
  238. package/storybook-static/assets/{use-in-view-Zn8evg3J.js → use-in-view-Dv3LTdsl.js} +1 -1
  239. package/storybook-static/assets/{use-motion-value--XhiA2Gt.js → use-motion-value-BVm7csqA.js} +1 -1
  240. package/storybook-static/assets/{use-spring-CrWzlBMd.js → use-spring-BkrdNVnG.js} +1 -1
  241. package/storybook-static/assets/{use-transform-vyDqMhf-.js → use-transform-CQNghMvr.js} +1 -1
  242. package/storybook-static/assets/{useSound-Bk2W5gkV.js → useSound-D23BsIr4.js} +1 -1
  243. package/storybook-static/assets/{users-aNPxMiig.js → users-R6T-yLyH.js} +1 -1
  244. package/storybook-static/assets/{x-BC8LCdn9.js → x-CypMgsiv.js} +1 -1
  245. package/storybook-static/iframe.html +3 -3
  246. package/storybook-static/index.html +5 -19
  247. package/storybook-static/index.json +1 -1
  248. package/storybook-static/project.json +1 -1
  249. package/storybook-static/addon-visual-tests-assets/visual-test-illustration.mp4 +0 -0
  250. package/storybook-static/assets/ArrayInput.stories-Cshz2s-a.js +0 -232
  251. package/storybook-static/assets/BooleansHeatmap-BV4VTyo6.css +0 -1
  252. package/storybook-static/assets/BooleansHeatmap.stories-CpNxqSED.js +0 -123
  253. package/storybook-static/assets/Calendar-tbpzwSIm.css +0 -1
  254. package/storybook-static/assets/Calendar.stories-Cx2JEddO.js +0 -229
  255. package/storybook-static/assets/Checkbox.stories-BwsnN3CP.js +0 -83
  256. package/storybook-static/assets/Color-AVL7NMMY-CoWQkAiP.js +0 -1
  257. package/storybook-static/assets/DateInput-C4-Rlnpy.css +0 -1
  258. package/storybook-static/assets/DateInput.stories-d46zYiZA.js +0 -119
  259. package/storybook-static/assets/DocsRenderer-PQXLIZUC-C2AYT361.js +0 -1243
  260. package/storybook-static/assets/EditFAB.stories-DvtpW34v.js +0 -378
  261. package/storybook-static/assets/ImageSlideshow.stories-BasuECRV.js +0 -385
  262. package/storybook-static/assets/LoadingSpinner.stories-Dj0bMFhR.js +0 -169
  263. package/storybook-static/assets/MoodChart-2hr_Y2GI.css +0 -1
  264. package/storybook-static/assets/MoodChart.stories-Bk0jtB4g.js +0 -40
  265. package/storybook-static/assets/Navbar-BPWxCB-U.css +0 -1
  266. package/storybook-static/assets/Navbar.stories-Dos3kovt.js +0 -320
  267. package/storybook-static/assets/NumberStepper.stories-BvFwBEjt.js +0 -436
  268. package/storybook-static/assets/PieChart-OfDGlJ4g.css +0 -1
  269. package/storybook-static/assets/PieChart.stories-XZqxh_GW.js +0 -199
  270. package/storybook-static/assets/QuantifiableHabitsChart-Bam6n9X_.css +0 -1
  271. package/storybook-static/assets/SearchBar.stories-CGaj__zF.js +0 -169
  272. package/storybook-static/assets/SearchableDropdown.stories-CfeFR5Rk.js +0 -282
  273. package/storybook-static/assets/SelectInput.stories-DByYKCGI.js +0 -129
  274. package/storybook-static/assets/SleepChart-DBRb08s_.css +0 -1
  275. package/storybook-static/assets/SleepChart.stories-DcoBwiEm.js +0 -58
  276. package/storybook-static/assets/Slider-Bq7zObwV.css +0 -1
  277. package/storybook-static/assets/Table-DnhtoClE.css +0 -1
  278. package/storybook-static/assets/Tabs-D5ZPN7MM.css +0 -1
  279. package/storybook-static/assets/TextArea.stories-Bpqlv7j5.js +0 -155
  280. package/storybook-static/assets/TextInput-BjVJQEYN.css +0 -1
  281. package/storybook-static/assets/TextInput-CLyTHgK9.js +0 -28
  282. package/storybook-static/assets/TextInput.stories-BP1LSkLG.js +0 -203
  283. package/storybook-static/assets/ThemeSwitcher.stories-Bj0YQKM5.js +0 -62
  284. package/storybook-static/assets/TimeInput-C3enPYoV.css +0 -1
  285. package/storybook-static/assets/TimeInput.stories-Cd28zwwR.js +0 -55
  286. package/storybook-static/assets/Toggle.stories-DtqFmh3E.js +0 -199
  287. package/storybook-static/assets/ToggleButton.stories-DkN_4qpp.js +0 -163
  288. package/storybook-static/assets/client-0pKYCVHx.js +0 -1
  289. package/storybook-static/assets/iframe-B7RIyArP.css +0 -1
  290. package/storybook-static/assets/index-bi5z6E3I.js +0 -1
  291. package/storybook-static/assets/layout-grid-TssXYNzv.js +0 -6
  292. package/storybook-static/sb-addons/chromatic-com-storybook-4/manager-bundle.js +0 -356
  293. package/storybook-static/sb-addons/chromatic-com-storybook-4/manager-bundle.js.LEGAL.txt +0 -40
  294. package/storybook-static/sb-addons/docs-2/manager-bundle.js +0 -151
  295. package/storybook-static/sb-addons/onboarding-1/manager-bundle.js +0 -127
  296. /package/storybook-static/sb-addons/{links-3 → links-1}/manager-bundle.js +0 -0
  297. /package/storybook-static/sb-addons/{storybook-5 → storybook-2}/manager-bundle.js +0 -0
@@ -1,4 +1,4 @@
1
- import{r as l,j as a}from"./iframe-B8pH-Lvr.js";import{g as d}from"./index-C8pce-KX.js";import"./preload-helper-C1FmrZbK.js";const M="_role_1xucs_102",q="_handle_1xucs_103",t={"chroma-grid":"_chroma-grid_1xucs_1","chroma-card":"_chroma-card_1xucs_36","chroma-img-wrapper":"_chroma-img-wrapper_1xucs_72","chroma-info":"_chroma-info_1xucs_90",role:M,handle:q,"chroma-overlay":"_chroma-overlay_1xucs_107","chroma-fade":"_chroma-fade_1xucs_140"},b=({items:c,className:C="",radius:x=300,columns:y=3,rows:B=2,damping:_=.45,fadeOut:F=.6,ease:k="power3.out"})=>{const m=l.useRef(null),p=l.useRef(null),o=l.useRef(null),s=l.useRef(null),i=l.useRef({x:0,y:0}),E=[{image:"https://i.pravatar.cc/300?img=8",title:"Alex Rivera",subtitle:"Full Stack Developer",handle:"@alexrivera",borderColor:"#4F46E5",gradient:"linear-gradient(145deg, #4F46E5, #000)",url:"https://github.com/"},{image:"https://i.pravatar.cc/300?img=11",title:"Jordan Chen",subtitle:"DevOps Engineer",handle:"@jordanchen",borderColor:"#10B981",gradient:"linear-gradient(210deg, #10B981, #000)",url:"https://linkedin.com/in/"},{image:"https://i.pravatar.cc/300?img=3",title:"Morgan Blake",subtitle:"UI/UX Designer",handle:"@morganblake",borderColor:"#F59E0B",gradient:"linear-gradient(165deg, #F59E0B, #000)",url:"https://dribbble.com/"},{image:"https://i.pravatar.cc/300?img=16",title:"Casey Park",subtitle:"Data Scientist",handle:"@caseypark",borderColor:"#EF4444",gradient:"linear-gradient(195deg, #EF4444, #000)",url:"https://kaggle.com/"},{image:"https://i.pravatar.cc/300?img=25",title:"Sam Kim",subtitle:"Mobile Developer",handle:"@thesamkim",borderColor:"#8B5CF6",gradient:"linear-gradient(225deg, #8B5CF6, #000)",url:"https://github.com/"},{image:"https://i.pravatar.cc/300?img=60",title:"Tyler Rodriguez",subtitle:"Cloud Architect",handle:"@tylerrod",borderColor:"#06B6D4",gradient:"linear-gradient(135deg, #06B6D4, #000)",url:"https://aws.amazon.com/"}],D=c!=null&&c.length?c:E;l.useEffect(()=>{const e=m.current;if(!e)return;o.current=d.quickSetter(e,"--x","px"),s.current=d.quickSetter(e,"--y","px");const{width:r,height:n}=e.getBoundingClientRect();i.current={x:r/2,y:n/2},o.current(i.current.x),s.current(i.current.y)},[]);const w=(e,r)=>{d.to(i.current,{x:e,y:r,duration:_,ease:k,onUpdate:()=>{var n,u;(n=o.current)==null||n.call(o,i.current.x),(u=s.current)==null||u.call(s,i.current.y)},overwrite:!0})},R=e=>{const r=m.current.getBoundingClientRect();w(e.clientX-r.left,e.clientY-r.top),d.to(p.current,{opacity:0,duration:.25,overwrite:!0})},j=()=>{d.to(p.current,{opacity:1,duration:F,overwrite:!0})},S=e=>{e&&window.open(e,"_blank","noopener,noreferrer")},N=e=>{const r=e.currentTarget,n=r.getBoundingClientRect(),u=e.clientX-n.left,$=e.clientY-n.top;r.style.setProperty("--mouse-x",`${u}px`),r.style.setProperty("--mouse-y",`${$}px`)};return a.jsxs("div",{ref:m,className:`${t["chroma-grid"]} ${C}`,style:{"--r":`${x}px`,"--cols":y,"--rows":B},onPointerMove:R,onPointerLeave:j,children:[D.map((e,r)=>a.jsxs("article",{className:`${t["chroma-card"]}`,onMouseMove:N,onClick:()=>S(e.url),style:{"--card-border":e.borderColor||"transparent","--card-gradient":e.gradient,cursor:e.url?"pointer":"default"},children:[a.jsx("div",{className:`${t["chroma-img-wrapper"]}`,children:a.jsx("img",{src:e.image,alt:e.title,loading:"lazy"})}),a.jsxs("footer",{className:`${t["chroma-info"]}`,children:[a.jsx("h3",{className:"name",children:e.title}),e.handle&&a.jsx("span",{className:`${t.handle}`,children:e.handle}),a.jsx("p",{className:`${t.role}`,children:e.subtitle}),e.location&&a.jsx("span",{className:"location",children:e.location})]})]},r)),a.jsx("div",{className:`${t["chroma-overlay"]}`}),a.jsx("div",{ref:p,className:`${t["chroma-fade"]}`})]})};b.__docgenInfo={description:"",methods:[],displayName:"ChromaGrid",props:{className:{defaultValue:{value:"''",computed:!1},required:!1},radius:{defaultValue:{value:"300",computed:!1},required:!1},columns:{defaultValue:{value:"3",computed:!1},required:!1},rows:{defaultValue:{value:"2",computed:!1},required:!1},damping:{defaultValue:{value:"0.45",computed:!1},required:!1},fadeOut:{defaultValue:{value:"0.6",computed:!1},required:!1},ease:{defaultValue:{value:"'power3.out'",computed:!1},required:!1}}};const V={title:"ReactBits/Components/ChromaGrid",component:b,parameters:{layout:"fullscreen"},tags:["autodocs"]},g={args:{items:[{image:"https://i.pravatar.cc/300?img=8",title:"Alex Rivera",subtitle:"Full Stack Developer",handle:"@alexrivera",borderColor:"#4F46E5",gradient:"linear-gradient(145deg, #4F46E5, #000)",url:"#"},{image:"https://i.pravatar.cc/300?img=11",title:"Jordan Chen",subtitle:"DevOps Engineer",handle:"@jordanchen",borderColor:"#10B981",gradient:"linear-gradient(210deg, #10B981, #000)",url:"#"},{image:"https://i.pravatar.cc/300?img=3",title:"Morgan Blake",subtitle:"UI/UX Designer",handle:"@morganblake",borderColor:"#F59E0B",gradient:"linear-gradient(165deg, #F59E0B, #000)",url:"#"},{image:"https://i.pravatar.cc/300?img=16",title:"Casey Park",subtitle:"Data Scientist",handle:"@caseypark",borderColor:"#EF4444",gradient:"linear-gradient(195deg, #EF4444, #000)",url:"#"},{image:"https://i.pravatar.cc/300?img=25",title:"Sam Kim",subtitle:"Mobile Developer",handle:"@thesamkim",borderColor:"#8B5CF6",gradient:"linear-gradient(225deg, #8B5CF6, #000)",url:"#"},{image:"https://i.pravatar.cc/300?img=60",title:"Tyler Rodriguez",subtitle:"Cloud Architect",handle:"@tylerrod",borderColor:"#06B6D4",gradient:"linear-gradient(135deg, #06B6D4, #000)",url:"#"}],radius:300,columns:3,rows:2,damping:.45,fadeOut:.6,ease:"power3.out"}};var h,v,f;g.parameters={...g.parameters,docs:{...(h=g.parameters)==null?void 0:h.docs,source:{originalSource:`{
1
+ import{r as l,j as a}from"./iframe-Cw8dCV4Z.js";import{g as d}from"./index-C8pce-KX.js";import"./preload-helper-C1FmrZbK.js";const M="_role_1xucs_102",q="_handle_1xucs_103",t={"chroma-grid":"_chroma-grid_1xucs_1","chroma-card":"_chroma-card_1xucs_36","chroma-img-wrapper":"_chroma-img-wrapper_1xucs_72","chroma-info":"_chroma-info_1xucs_90",role:M,handle:q,"chroma-overlay":"_chroma-overlay_1xucs_107","chroma-fade":"_chroma-fade_1xucs_140"},b=({items:c,className:C="",radius:x=300,columns:y=3,rows:B=2,damping:_=.45,fadeOut:F=.6,ease:k="power3.out"})=>{const m=l.useRef(null),p=l.useRef(null),o=l.useRef(null),s=l.useRef(null),i=l.useRef({x:0,y:0}),E=[{image:"https://i.pravatar.cc/300?img=8",title:"Alex Rivera",subtitle:"Full Stack Developer",handle:"@alexrivera",borderColor:"#4F46E5",gradient:"linear-gradient(145deg, #4F46E5, #000)",url:"https://github.com/"},{image:"https://i.pravatar.cc/300?img=11",title:"Jordan Chen",subtitle:"DevOps Engineer",handle:"@jordanchen",borderColor:"#10B981",gradient:"linear-gradient(210deg, #10B981, #000)",url:"https://linkedin.com/in/"},{image:"https://i.pravatar.cc/300?img=3",title:"Morgan Blake",subtitle:"UI/UX Designer",handle:"@morganblake",borderColor:"#F59E0B",gradient:"linear-gradient(165deg, #F59E0B, #000)",url:"https://dribbble.com/"},{image:"https://i.pravatar.cc/300?img=16",title:"Casey Park",subtitle:"Data Scientist",handle:"@caseypark",borderColor:"#EF4444",gradient:"linear-gradient(195deg, #EF4444, #000)",url:"https://kaggle.com/"},{image:"https://i.pravatar.cc/300?img=25",title:"Sam Kim",subtitle:"Mobile Developer",handle:"@thesamkim",borderColor:"#8B5CF6",gradient:"linear-gradient(225deg, #8B5CF6, #000)",url:"https://github.com/"},{image:"https://i.pravatar.cc/300?img=60",title:"Tyler Rodriguez",subtitle:"Cloud Architect",handle:"@tylerrod",borderColor:"#06B6D4",gradient:"linear-gradient(135deg, #06B6D4, #000)",url:"https://aws.amazon.com/"}],D=c!=null&&c.length?c:E;l.useEffect(()=>{const e=m.current;if(!e)return;o.current=d.quickSetter(e,"--x","px"),s.current=d.quickSetter(e,"--y","px");const{width:r,height:n}=e.getBoundingClientRect();i.current={x:r/2,y:n/2},o.current(i.current.x),s.current(i.current.y)},[]);const w=(e,r)=>{d.to(i.current,{x:e,y:r,duration:_,ease:k,onUpdate:()=>{var n,u;(n=o.current)==null||n.call(o,i.current.x),(u=s.current)==null||u.call(s,i.current.y)},overwrite:!0})},R=e=>{const r=m.current.getBoundingClientRect();w(e.clientX-r.left,e.clientY-r.top),d.to(p.current,{opacity:0,duration:.25,overwrite:!0})},j=()=>{d.to(p.current,{opacity:1,duration:F,overwrite:!0})},S=e=>{e&&window.open(e,"_blank","noopener,noreferrer")},N=e=>{const r=e.currentTarget,n=r.getBoundingClientRect(),u=e.clientX-n.left,$=e.clientY-n.top;r.style.setProperty("--mouse-x",`${u}px`),r.style.setProperty("--mouse-y",`${$}px`)};return a.jsxs("div",{ref:m,className:`${t["chroma-grid"]} ${C}`,style:{"--r":`${x}px`,"--cols":y,"--rows":B},onPointerMove:R,onPointerLeave:j,children:[D.map((e,r)=>a.jsxs("article",{className:`${t["chroma-card"]}`,onMouseMove:N,onClick:()=>S(e.url),style:{"--card-border":e.borderColor||"transparent","--card-gradient":e.gradient,cursor:e.url?"pointer":"default"},children:[a.jsx("div",{className:`${t["chroma-img-wrapper"]}`,children:a.jsx("img",{src:e.image,alt:e.title,loading:"lazy"})}),a.jsxs("footer",{className:`${t["chroma-info"]}`,children:[a.jsx("h3",{className:"name",children:e.title}),e.handle&&a.jsx("span",{className:`${t.handle}`,children:e.handle}),a.jsx("p",{className:`${t.role}`,children:e.subtitle}),e.location&&a.jsx("span",{className:"location",children:e.location})]})]},r)),a.jsx("div",{className:`${t["chroma-overlay"]}`}),a.jsx("div",{ref:p,className:`${t["chroma-fade"]}`})]})};b.__docgenInfo={description:"",methods:[],displayName:"ChromaGrid",props:{className:{defaultValue:{value:"''",computed:!1},required:!1},radius:{defaultValue:{value:"300",computed:!1},required:!1},columns:{defaultValue:{value:"3",computed:!1},required:!1},rows:{defaultValue:{value:"2",computed:!1},required:!1},damping:{defaultValue:{value:"0.45",computed:!1},required:!1},fadeOut:{defaultValue:{value:"0.6",computed:!1},required:!1},ease:{defaultValue:{value:"'power3.out'",computed:!1},required:!1}}};const V={title:"ReactBits/Components/ChromaGrid",component:b,parameters:{layout:"fullscreen"}},g={args:{items:[{image:"https://i.pravatar.cc/300?img=8",title:"Alex Rivera",subtitle:"Full Stack Developer",handle:"@alexrivera",borderColor:"#4F46E5",gradient:"linear-gradient(145deg, #4F46E5, #000)",url:"#"},{image:"https://i.pravatar.cc/300?img=11",title:"Jordan Chen",subtitle:"DevOps Engineer",handle:"@jordanchen",borderColor:"#10B981",gradient:"linear-gradient(210deg, #10B981, #000)",url:"#"},{image:"https://i.pravatar.cc/300?img=3",title:"Morgan Blake",subtitle:"UI/UX Designer",handle:"@morganblake",borderColor:"#F59E0B",gradient:"linear-gradient(165deg, #F59E0B, #000)",url:"#"},{image:"https://i.pravatar.cc/300?img=16",title:"Casey Park",subtitle:"Data Scientist",handle:"@caseypark",borderColor:"#EF4444",gradient:"linear-gradient(195deg, #EF4444, #000)",url:"#"},{image:"https://i.pravatar.cc/300?img=25",title:"Sam Kim",subtitle:"Mobile Developer",handle:"@thesamkim",borderColor:"#8B5CF6",gradient:"linear-gradient(225deg, #8B5CF6, #000)",url:"#"},{image:"https://i.pravatar.cc/300?img=60",title:"Tyler Rodriguez",subtitle:"Cloud Architect",handle:"@tylerrod",borderColor:"#06B6D4",gradient:"linear-gradient(135deg, #06B6D4, #000)",url:"#"}],radius:300,columns:3,rows:2,damping:.45,fadeOut:.6,ease:"power3.out"}};var h,v,f;g.parameters={...g.parameters,docs:{...(h=g.parameters)==null?void 0:h.docs,source:{originalSource:`{
2
2
  args: {
3
3
  items: [{
4
4
  image: 'https://i.pravatar.cc/300?img=8',
@@ -1,4 +1,4 @@
1
- import{r as S,j as A}from"./iframe-B8pH-Lvr.js";import{G as V,R as j,T as _,P as C,M as R}from"./Mesh-CwXV3WjE.js";import{C as G}from"./Camera-BM3HOhP6.js";import{T as D}from"./Texture-BkQWYNP2.js";import"./preload-helper-C1FmrZbK.js";class b extends V{constructor(e,{width:t=1,height:i=1,widthSegments:s=1,heightSegments:n=1,attributes:a={}}={}){const r=s,o=n,h=(r+1)*(o+1),l=r*o*6,m=new Float32Array(h*3),g=new Float32Array(h*3),v=new Float32Array(h*2),w=l>65536?new Uint32Array(l):new Uint16Array(l);b.buildPlane(m,g,v,w,t,i,0,r,o),Object.assign(a,{position:{size:3,data:m},normal:{size:3,data:g},uv:{size:2,data:v},index:{data:w}}),super(e,a)}static buildPlane(e,t,i,s,n,a,r,o,h,l=0,m=1,g=2,v=1,w=-1,d=0,f=0){const x=d,P=n/o,U=a/h;for(let u=0;u<=h;u++){let I=u*U-a/2;for(let p=0;p<=o;p++,d++){let B=p*P-n/2;if(e[d*3+l]=B*v,e[d*3+m]=I*w,e[d*3+g]=r/2,t[d*3+l]=0,t[d*3+m]=0,t[d*3+g]=r>=0?1:-1,i[d*2]=p/o,i[d*2+1]=1-u/h,u===h||p===o)continue;let F=x+p+u*(o+1),M=x+p+(u+1)*(o+1),W=x+p+(u+1)*(o+1)+1,T=x+p+u*(o+1)+1;s[f*6]=F,s[f*6+1]=M,s[f*6+2]=T,s[f*6+3]=M,s[f*6+4]=W,s[f*6+5]=T,f++}}}}const q={"circular-gallery":"_circular-gallery_p9017_1"};function k(c,e){let t;return function(...i){clearTimeout(t),t=setTimeout(()=>c.apply(this,i),e)}}function H(c,e,t){return c+(e-c)*t}function N(c){const e=Object.getPrototypeOf(c);Object.getOwnPropertyNames(e).forEach(t=>{t!=="constructor"&&typeof c[t]=="function"&&(c[t]=c[t].bind(c))})}function X(c,e,t="bold 30px monospace",i="black"){const s=document.createElement("canvas"),n=s.getContext("2d");n.font=t;const a=n.measureText(e),r=Math.ceil(a.width),o=Math.ceil(parseInt(t,10)*1.2);s.width=r+20,s.height=o+20,n.font=t,n.fillStyle=i,n.textBaseline="middle",n.textAlign="center",n.clearRect(0,0,s.width,s.height),n.fillText(e,s.width/2,s.height/2);const h=new D(c,{generateMipmaps:!1});return h.image=s,{texture:h,width:s.width,height:s.height}}class Y{constructor({gl:e,plane:t,renderer:i,text:s,textColor:n="#545050",font:a="30px sans-serif"}){N(this),this.gl=e,this.plane=t,this.renderer=i,this.text=s,this.textColor=n,this.font=a,this.createMesh()}createMesh(){const{texture:e,width:t,height:i}=X(this.gl,this.text,this.font,this.textColor),s=new b(this.gl),n=new C(this.gl,{vertex:`
1
+ import{r as S,j as A}from"./iframe-Cw8dCV4Z.js";import{G as V,R as j,T as _,P as C,M as R}from"./Mesh-CwXV3WjE.js";import{C as G}from"./Camera-BM3HOhP6.js";import{T as D}from"./Texture-BkQWYNP2.js";import"./preload-helper-C1FmrZbK.js";class b extends V{constructor(e,{width:t=1,height:i=1,widthSegments:s=1,heightSegments:n=1,attributes:a={}}={}){const r=s,o=n,h=(r+1)*(o+1),l=r*o*6,m=new Float32Array(h*3),g=new Float32Array(h*3),v=new Float32Array(h*2),w=l>65536?new Uint32Array(l):new Uint16Array(l);b.buildPlane(m,g,v,w,t,i,0,r,o),Object.assign(a,{position:{size:3,data:m},normal:{size:3,data:g},uv:{size:2,data:v},index:{data:w}}),super(e,a)}static buildPlane(e,t,i,s,n,a,r,o,h,l=0,m=1,g=2,v=1,w=-1,d=0,f=0){const x=d,P=n/o,U=a/h;for(let u=0;u<=h;u++){let I=u*U-a/2;for(let p=0;p<=o;p++,d++){let B=p*P-n/2;if(e[d*3+l]=B*v,e[d*3+m]=I*w,e[d*3+g]=r/2,t[d*3+l]=0,t[d*3+m]=0,t[d*3+g]=r>=0?1:-1,i[d*2]=p/o,i[d*2+1]=1-u/h,u===h||p===o)continue;let F=x+p+u*(o+1),M=x+p+(u+1)*(o+1),W=x+p+(u+1)*(o+1)+1,T=x+p+u*(o+1)+1;s[f*6]=F,s[f*6+1]=M,s[f*6+2]=T,s[f*6+3]=M,s[f*6+4]=W,s[f*6+5]=T,f++}}}}const q={"circular-gallery":"_circular-gallery_p9017_1"};function k(c,e){let t;return function(...i){clearTimeout(t),t=setTimeout(()=>c.apply(this,i),e)}}function H(c,e,t){return c+(e-c)*t}function N(c){const e=Object.getPrototypeOf(c);Object.getOwnPropertyNames(e).forEach(t=>{t!=="constructor"&&typeof c[t]=="function"&&(c[t]=c[t].bind(c))})}function X(c,e,t="bold 30px monospace",i="black"){const s=document.createElement("canvas"),n=s.getContext("2d");n.font=t;const a=n.measureText(e),r=Math.ceil(a.width),o=Math.ceil(parseInt(t,10)*1.2);s.width=r+20,s.height=o+20,n.font=t,n.fillStyle=i,n.textBaseline="middle",n.textAlign="center",n.clearRect(0,0,s.width,s.height),n.fillText(e,s.width/2,s.height/2);const h=new D(c,{generateMipmaps:!1});return h.image=s,{texture:h,width:s.width,height:s.height}}class Y{constructor({gl:e,plane:t,renderer:i,text:s,textColor:n="#545050",font:a="30px sans-serif"}){N(this),this.gl=e,this.plane=t,this.renderer=i,this.text=s,this.textColor=n,this.font=a,this.createMesh()}createMesh(){const{texture:e,width:t,height:i}=X(this.gl,this.text,this.font,this.textColor),s=new b(this.gl),n=new C(this.gl,{vertex:`
2
2
  attribute vec3 position;
3
3
  attribute vec2 uv;
4
4
  uniform mat4 modelViewMatrix;
@@ -64,7 +64,7 @@ import{r as S,j as A}from"./iframe-B8pH-Lvr.js";import{G as V,R as j,T as _,P as
64
64
 
65
65
  gl_FragColor = vec4(color.rgb, alpha);
66
66
  }
67
- `,uniforms:{tMap:{value:e},uPlaneSizes:{value:[0,0]},uImageSizes:{value:[0,0]},uSpeed:{value:0},uTime:{value:100*Math.random()},uBorderRadius:{value:this.borderRadius}},transparent:!0});const t=new Image;t.crossOrigin="anonymous",t.src=this.image,t.onload=()=>{e.image=t,this.program.uniforms.uImageSizes.value=[t.naturalWidth,t.naturalHeight]}}createMesh(){this.plane=new R(this.gl,{geometry:this.geometry,program:this.program}),this.plane.setParent(this.scene)}createTitle(){this.title=new Y({gl:this.gl,plane:this.plane,renderer:this.renderer,text:this.text,textColor:this.textColor,fontFamily:this.font})}update(e,t){this.plane.position.x=this.x-e.current-this.extra;const i=this.plane.position.x,s=this.viewport.width/2;if(this.bend===0)this.plane.position.y=0,this.plane.rotation.z=0;else{const r=Math.abs(this.bend),o=(s*s+r*r)/(2*r),h=Math.min(Math.abs(i),s),l=o-Math.sqrt(o*o-h*h);this.bend>0?(this.plane.position.y=-l,this.plane.rotation.z=-Math.sign(i)*Math.asin(h/o)):(this.plane.position.y=l,this.plane.rotation.z=Math.sign(i)*Math.asin(h/o))}this.speed=e.current-e.last,this.program.uniforms.uTime.value+=.04,this.program.uniforms.uSpeed.value=this.speed;const n=this.plane.scale.x/2,a=this.viewport.width/2;this.isBefore=this.plane.position.x+n<-a,this.isAfter=this.plane.position.x-n>a,t==="right"&&this.isBefore&&(this.extra-=this.widthTotal,this.isBefore=this.isAfter=!1),t==="left"&&this.isAfter&&(this.extra+=this.widthTotal,this.isBefore=this.isAfter=!1)}onResize({screen:e,viewport:t}={}){e&&(this.screen=e),t&&(this.viewport=t,this.plane.program.uniforms.uViewportSizes&&(this.plane.program.uniforms.uViewportSizes.value=[this.viewport.width,this.viewport.height])),this.scale=this.screen.height/1500,this.plane.scale.y=this.viewport.height*(900*this.scale)/this.screen.height,this.plane.scale.x=this.viewport.width*(700*this.scale)/this.screen.width,this.plane.program.uniforms.uPlaneSizes.value=[this.plane.scale.x,this.plane.scale.y],this.padding=2,this.width=this.plane.scale.x+this.padding,this.widthTotal=this.width*this.length,this.x=this.width*this.index}}class J{constructor(e,{items:t,bend:i,textColor:s="#ffffff",borderRadius:n=0,font:a="bold 30px Figtree",scrollSpeed:r=2,scrollEase:o=.05}={}){document.documentElement.classList.remove("no-js"),this.container=e,this.scrollSpeed=r,this.scroll={ease:o,current:0,target:0,last:0},this.onCheckDebounce=k(this.onCheck,200),this.createRenderer(),this.createCamera(),this.createScene(),this.onResize(),this.createGeometry(),this.createMedias(t,i,s,n,a),this.update(),this.addEventListeners()}createRenderer(){this.renderer=new j({alpha:!0,antialias:!0,dpr:Math.min(window.devicePixelRatio||1,2)}),this.gl=this.renderer.gl,this.gl.clearColor(0,0,0,0),this.container.appendChild(this.gl.canvas)}createCamera(){this.camera=new G(this.gl),this.camera.fov=45,this.camera.position.z=20}createScene(){this.scene=new _}createGeometry(){this.planeGeometry=new b(this.gl,{heightSegments:50,widthSegments:100})}createMedias(e,t=1,i,s,n){const a=[{image:"https://picsum.photos/seed/1/800/600?grayscale",text:"Bridge"},{image:"https://picsum.photos/seed/2/800/600?grayscale",text:"Desk Setup"},{image:"https://picsum.photos/seed/3/800/600?grayscale",text:"Waterfall"},{image:"https://picsum.photos/seed/4/800/600?grayscale",text:"Strawberries"},{image:"https://picsum.photos/seed/5/800/600?grayscale",text:"Deep Diving"},{image:"https://picsum.photos/seed/16/800/600?grayscale",text:"Train Track"},{image:"https://picsum.photos/seed/17/800/600?grayscale",text:"Santorini"},{image:"https://picsum.photos/seed/8/800/600?grayscale",text:"Blurry Lights"},{image:"https://picsum.photos/seed/9/800/600?grayscale",text:"New York"},{image:"https://picsum.photos/seed/10/800/600?grayscale",text:"Good Boy"},{image:"https://picsum.photos/seed/21/800/600?grayscale",text:"Coastline"},{image:"https://picsum.photos/seed/12/800/600?grayscale",text:"Palm Trees"}],r=e&&e.length?e:a;this.mediasImages=r.concat(r),this.medias=this.mediasImages.map((o,h)=>new $({geometry:this.planeGeometry,gl:this.gl,image:o.image,index:h,length:this.mediasImages.length,renderer:this.renderer,scene:this.scene,screen:this.screen,text:o.text,viewport:this.viewport,bend:t,textColor:i,borderRadius:s,font:n}))}onTouchDown(e){this.isDown=!0,this.scroll.position=this.scroll.current,this.start=e.touches?e.touches[0].clientX:e.clientX}onTouchMove(e){if(!this.isDown)return;const t=e.touches?e.touches[0].clientX:e.clientX,i=(this.start-t)*(this.scrollSpeed*.025);this.scroll.target=this.scroll.position+i}onTouchUp(){this.isDown=!1,this.onCheck()}onWheel(e){const t=e.deltaY||e.wheelDelta||e.detail;this.scroll.target+=(t>0?this.scrollSpeed:-this.scrollSpeed)*.2,this.onCheckDebounce()}onCheck(){if(!this.medias||!this.medias[0])return;const e=this.medias[0].width,t=Math.round(Math.abs(this.scroll.target)/e),i=e*t;this.scroll.target=this.scroll.target<0?-i:i}onResize(){this.screen={width:this.container.clientWidth,height:this.container.clientHeight},this.renderer.setSize(this.screen.width,this.screen.height),this.camera.perspective({aspect:this.screen.width/this.screen.height});const e=this.camera.fov*Math.PI/180,t=2*Math.tan(e/2)*this.camera.position.z,i=t*this.camera.aspect;this.viewport={width:i,height:t},this.medias&&this.medias.forEach(s=>s.onResize({screen:this.screen,viewport:this.viewport}))}update(){this.scroll.current=H(this.scroll.current,this.scroll.target,this.scroll.ease);const e=this.scroll.current>this.scroll.last?"right":"left";this.medias&&this.medias.forEach(t=>t.update(this.scroll,e)),this.renderer.render({scene:this.scene,camera:this.camera}),this.scroll.last=this.scroll.current,this.raf=window.requestAnimationFrame(this.update.bind(this))}addEventListeners(){this.boundOnResize=this.onResize.bind(this),this.boundOnWheel=this.onWheel.bind(this),this.boundOnTouchDown=this.onTouchDown.bind(this),this.boundOnTouchMove=this.onTouchMove.bind(this),this.boundOnTouchUp=this.onTouchUp.bind(this),window.addEventListener("resize",this.boundOnResize),window.addEventListener("mousewheel",this.boundOnWheel),window.addEventListener("wheel",this.boundOnWheel),window.addEventListener("mousedown",this.boundOnTouchDown),window.addEventListener("mousemove",this.boundOnTouchMove),window.addEventListener("mouseup",this.boundOnTouchUp),window.addEventListener("touchstart",this.boundOnTouchDown),window.addEventListener("touchmove",this.boundOnTouchMove),window.addEventListener("touchend",this.boundOnTouchUp)}destroy(){window.cancelAnimationFrame(this.raf),window.removeEventListener("resize",this.boundOnResize),window.removeEventListener("mousewheel",this.boundOnWheel),window.removeEventListener("wheel",this.boundOnWheel),window.removeEventListener("mousedown",this.boundOnTouchDown),window.removeEventListener("mousemove",this.boundOnTouchMove),window.removeEventListener("mouseup",this.boundOnTouchUp),window.removeEventListener("touchstart",this.boundOnTouchDown),window.removeEventListener("touchmove",this.boundOnTouchMove),window.removeEventListener("touchend",this.boundOnTouchUp),this.renderer&&this.renderer.gl&&this.renderer.gl.canvas.parentNode&&this.renderer.gl.canvas.parentNode.removeChild(this.renderer.gl.canvas)}}function L({items:c,bend:e=3,textColor:t="#ffffff",borderRadius:i=.05,font:s="bold 30px Figtree",scrollSpeed:n=2,scrollEase:a=.05}){const r=S.useRef(null);return S.useEffect(()=>{const o=new J(r.current,{items:c,bend:e,textColor:t,borderRadius:i,font:s,scrollSpeed:n,scrollEase:a});return()=>{o.destroy()}},[c,e,t,i,s,n,a]),A.jsx("div",{className:`${q["circular-gallery"]}`,ref:r})}L.__docgenInfo={description:"",methods:[],displayName:"CircularGallery",props:{bend:{defaultValue:{value:"3",computed:!1},required:!1},textColor:{defaultValue:{value:"'#ffffff'",computed:!1},required:!1},borderRadius:{defaultValue:{value:"0.05",computed:!1},required:!1},font:{defaultValue:{value:"'bold 30px Figtree'",computed:!1},required:!1},scrollSpeed:{defaultValue:{value:"2",computed:!1},required:!1},scrollEase:{defaultValue:{value:"0.05",computed:!1},required:!1}}};const se={title:"ReactBits/Components/CircularGallery",component:L,parameters:{layout:"fullscreen"},tags:["autodocs"]},y={args:{items:[{image:"https://picsum.photos/seed/1/800/600",text:"Mountains"},{image:"https://picsum.photos/seed/2/800/600",text:"Ocean"},{image:"https://picsum.photos/seed/3/800/600",text:"Forest"},{image:"https://picsum.photos/seed/4/800/600",text:"Desert"},{image:"https://picsum.photos/seed/5/800/600",text:"Cityscape"},{image:"https://picsum.photos/seed/6/800/600",text:"Sunset"}],bend:3,textColor:"#ffffff",borderRadius:.05,font:"bold 30px Figtree",scrollSpeed:2,scrollEase:.05}};var z,O,E;y.parameters={...y.parameters,docs:{...(z=y.parameters)==null?void 0:z.docs,source:{originalSource:`{
67
+ `,uniforms:{tMap:{value:e},uPlaneSizes:{value:[0,0]},uImageSizes:{value:[0,0]},uSpeed:{value:0},uTime:{value:100*Math.random()},uBorderRadius:{value:this.borderRadius}},transparent:!0});const t=new Image;t.crossOrigin="anonymous",t.src=this.image,t.onload=()=>{e.image=t,this.program.uniforms.uImageSizes.value=[t.naturalWidth,t.naturalHeight]}}createMesh(){this.plane=new R(this.gl,{geometry:this.geometry,program:this.program}),this.plane.setParent(this.scene)}createTitle(){this.title=new Y({gl:this.gl,plane:this.plane,renderer:this.renderer,text:this.text,textColor:this.textColor,fontFamily:this.font})}update(e,t){this.plane.position.x=this.x-e.current-this.extra;const i=this.plane.position.x,s=this.viewport.width/2;if(this.bend===0)this.plane.position.y=0,this.plane.rotation.z=0;else{const r=Math.abs(this.bend),o=(s*s+r*r)/(2*r),h=Math.min(Math.abs(i),s),l=o-Math.sqrt(o*o-h*h);this.bend>0?(this.plane.position.y=-l,this.plane.rotation.z=-Math.sign(i)*Math.asin(h/o)):(this.plane.position.y=l,this.plane.rotation.z=Math.sign(i)*Math.asin(h/o))}this.speed=e.current-e.last,this.program.uniforms.uTime.value+=.04,this.program.uniforms.uSpeed.value=this.speed;const n=this.plane.scale.x/2,a=this.viewport.width/2;this.isBefore=this.plane.position.x+n<-a,this.isAfter=this.plane.position.x-n>a,t==="right"&&this.isBefore&&(this.extra-=this.widthTotal,this.isBefore=this.isAfter=!1),t==="left"&&this.isAfter&&(this.extra+=this.widthTotal,this.isBefore=this.isAfter=!1)}onResize({screen:e,viewport:t}={}){e&&(this.screen=e),t&&(this.viewport=t,this.plane.program.uniforms.uViewportSizes&&(this.plane.program.uniforms.uViewportSizes.value=[this.viewport.width,this.viewport.height])),this.scale=this.screen.height/1500,this.plane.scale.y=this.viewport.height*(900*this.scale)/this.screen.height,this.plane.scale.x=this.viewport.width*(700*this.scale)/this.screen.width,this.plane.program.uniforms.uPlaneSizes.value=[this.plane.scale.x,this.plane.scale.y],this.padding=2,this.width=this.plane.scale.x+this.padding,this.widthTotal=this.width*this.length,this.x=this.width*this.index}}class J{constructor(e,{items:t,bend:i,textColor:s="#ffffff",borderRadius:n=0,font:a="bold 30px Figtree",scrollSpeed:r=2,scrollEase:o=.05}={}){document.documentElement.classList.remove("no-js"),this.container=e,this.scrollSpeed=r,this.scroll={ease:o,current:0,target:0,last:0},this.onCheckDebounce=k(this.onCheck,200),this.createRenderer(),this.createCamera(),this.createScene(),this.onResize(),this.createGeometry(),this.createMedias(t,i,s,n,a),this.update(),this.addEventListeners()}createRenderer(){this.renderer=new j({alpha:!0,antialias:!0,dpr:Math.min(window.devicePixelRatio||1,2)}),this.gl=this.renderer.gl,this.gl.clearColor(0,0,0,0),this.container.appendChild(this.gl.canvas)}createCamera(){this.camera=new G(this.gl),this.camera.fov=45,this.camera.position.z=20}createScene(){this.scene=new _}createGeometry(){this.planeGeometry=new b(this.gl,{heightSegments:50,widthSegments:100})}createMedias(e,t=1,i,s,n){const a=[{image:"https://picsum.photos/seed/1/800/600?grayscale",text:"Bridge"},{image:"https://picsum.photos/seed/2/800/600?grayscale",text:"Desk Setup"},{image:"https://picsum.photos/seed/3/800/600?grayscale",text:"Waterfall"},{image:"https://picsum.photos/seed/4/800/600?grayscale",text:"Strawberries"},{image:"https://picsum.photos/seed/5/800/600?grayscale",text:"Deep Diving"},{image:"https://picsum.photos/seed/16/800/600?grayscale",text:"Train Track"},{image:"https://picsum.photos/seed/17/800/600?grayscale",text:"Santorini"},{image:"https://picsum.photos/seed/8/800/600?grayscale",text:"Blurry Lights"},{image:"https://picsum.photos/seed/9/800/600?grayscale",text:"New York"},{image:"https://picsum.photos/seed/10/800/600?grayscale",text:"Good Boy"},{image:"https://picsum.photos/seed/21/800/600?grayscale",text:"Coastline"},{image:"https://picsum.photos/seed/12/800/600?grayscale",text:"Palm Trees"}],r=e&&e.length?e:a;this.mediasImages=r.concat(r),this.medias=this.mediasImages.map((o,h)=>new $({geometry:this.planeGeometry,gl:this.gl,image:o.image,index:h,length:this.mediasImages.length,renderer:this.renderer,scene:this.scene,screen:this.screen,text:o.text,viewport:this.viewport,bend:t,textColor:i,borderRadius:s,font:n}))}onTouchDown(e){this.isDown=!0,this.scroll.position=this.scroll.current,this.start=e.touches?e.touches[0].clientX:e.clientX}onTouchMove(e){if(!this.isDown)return;const t=e.touches?e.touches[0].clientX:e.clientX,i=(this.start-t)*(this.scrollSpeed*.025);this.scroll.target=this.scroll.position+i}onTouchUp(){this.isDown=!1,this.onCheck()}onWheel(e){const t=e.deltaY||e.wheelDelta||e.detail;this.scroll.target+=(t>0?this.scrollSpeed:-this.scrollSpeed)*.2,this.onCheckDebounce()}onCheck(){if(!this.medias||!this.medias[0])return;const e=this.medias[0].width,t=Math.round(Math.abs(this.scroll.target)/e),i=e*t;this.scroll.target=this.scroll.target<0?-i:i}onResize(){this.screen={width:this.container.clientWidth,height:this.container.clientHeight},this.renderer.setSize(this.screen.width,this.screen.height),this.camera.perspective({aspect:this.screen.width/this.screen.height});const e=this.camera.fov*Math.PI/180,t=2*Math.tan(e/2)*this.camera.position.z,i=t*this.camera.aspect;this.viewport={width:i,height:t},this.medias&&this.medias.forEach(s=>s.onResize({screen:this.screen,viewport:this.viewport}))}update(){this.scroll.current=H(this.scroll.current,this.scroll.target,this.scroll.ease);const e=this.scroll.current>this.scroll.last?"right":"left";this.medias&&this.medias.forEach(t=>t.update(this.scroll,e)),this.renderer.render({scene:this.scene,camera:this.camera}),this.scroll.last=this.scroll.current,this.raf=window.requestAnimationFrame(this.update.bind(this))}addEventListeners(){this.boundOnResize=this.onResize.bind(this),this.boundOnWheel=this.onWheel.bind(this),this.boundOnTouchDown=this.onTouchDown.bind(this),this.boundOnTouchMove=this.onTouchMove.bind(this),this.boundOnTouchUp=this.onTouchUp.bind(this),window.addEventListener("resize",this.boundOnResize),window.addEventListener("mousewheel",this.boundOnWheel),window.addEventListener("wheel",this.boundOnWheel),window.addEventListener("mousedown",this.boundOnTouchDown),window.addEventListener("mousemove",this.boundOnTouchMove),window.addEventListener("mouseup",this.boundOnTouchUp),window.addEventListener("touchstart",this.boundOnTouchDown),window.addEventListener("touchmove",this.boundOnTouchMove),window.addEventListener("touchend",this.boundOnTouchUp)}destroy(){window.cancelAnimationFrame(this.raf),window.removeEventListener("resize",this.boundOnResize),window.removeEventListener("mousewheel",this.boundOnWheel),window.removeEventListener("wheel",this.boundOnWheel),window.removeEventListener("mousedown",this.boundOnTouchDown),window.removeEventListener("mousemove",this.boundOnTouchMove),window.removeEventListener("mouseup",this.boundOnTouchUp),window.removeEventListener("touchstart",this.boundOnTouchDown),window.removeEventListener("touchmove",this.boundOnTouchMove),window.removeEventListener("touchend",this.boundOnTouchUp),this.renderer&&this.renderer.gl&&this.renderer.gl.canvas.parentNode&&this.renderer.gl.canvas.parentNode.removeChild(this.renderer.gl.canvas)}}function L({items:c,bend:e=3,textColor:t="#ffffff",borderRadius:i=.05,font:s="bold 30px Figtree",scrollSpeed:n=2,scrollEase:a=.05}){const r=S.useRef(null);return S.useEffect(()=>{const o=new J(r.current,{items:c,bend:e,textColor:t,borderRadius:i,font:s,scrollSpeed:n,scrollEase:a});return()=>{o.destroy()}},[c,e,t,i,s,n,a]),A.jsx("div",{className:`${q["circular-gallery"]}`,ref:r})}L.__docgenInfo={description:"",methods:[],displayName:"CircularGallery",props:{bend:{defaultValue:{value:"3",computed:!1},required:!1},textColor:{defaultValue:{value:"'#ffffff'",computed:!1},required:!1},borderRadius:{defaultValue:{value:"0.05",computed:!1},required:!1},font:{defaultValue:{value:"'bold 30px Figtree'",computed:!1},required:!1},scrollSpeed:{defaultValue:{value:"2",computed:!1},required:!1},scrollEase:{defaultValue:{value:"0.05",computed:!1},required:!1}}};const se={title:"ReactBits/Components/CircularGallery",component:L,parameters:{layout:"fullscreen"}},y={args:{items:[{image:"https://picsum.photos/seed/1/800/600",text:"Mountains"},{image:"https://picsum.photos/seed/2/800/600",text:"Ocean"},{image:"https://picsum.photos/seed/3/800/600",text:"Forest"},{image:"https://picsum.photos/seed/4/800/600",text:"Desert"},{image:"https://picsum.photos/seed/5/800/600",text:"Cityscape"},{image:"https://picsum.photos/seed/6/800/600",text:"Sunset"}],bend:3,textColor:"#ffffff",borderRadius:.05,font:"bold 30px Figtree",scrollSpeed:2,scrollEase:.05}};var z,O,E;y.parameters={...y.parameters,docs:{...(z=y.parameters)==null?void 0:z.docs,source:{originalSource:`{
68
68
  args: {
69
69
  items: [{
70
70
  image: 'https://picsum.photos/seed/1/800/600',
@@ -1,4 +1,4 @@
1
- import{r as A,j as g}from"./iframe-B8pH-Lvr.js";import{U as _,u as k}from"./MotionConfigContext-D5hZdVGx.js";import{g as w,s as b,m as U}from"./proxy-BA3VZtN5.js";import{u as H}from"./use-motion-value--XhiA2Gt.js";import"./preload-helper-C1FmrZbK.js";function $(t){t.values.forEach(e=>e.stop())}function f(t,e){[...e].reverse().forEach(c=>{const o=t.getVariant(c);o&&b(t,o),t.variantChildren&&t.variantChildren.forEach(n=>{f(n,e)})})}function j(t,e){if(Array.isArray(e))return f(t,e);if(typeof e=="string")return f(t,[e]);b(t,e)}function I(){const t=new Set,e={subscribe(s){return t.add(s),()=>void t.delete(s)},start(s,c){const o=[];return t.forEach(n=>{o.push(w(n,s,{transitionOverride:c}))}),Promise.all(o)},set(s){return t.forEach(c=>{j(c,s)})},stop(){t.forEach(s=>{$(s)})},mount(){return()=>{e.stop()}}};return e}function M(){const t=_(I);return k(t.mount,[]),t}const q=M,L={"circular-text":"_circular-text_2sef0_1"},N=(t,e,s=!0)=>({from:e,to:e+360,ease:"linear",duration:t,type:"tween",repeat:s?1/0:0}),i=(t,e)=>({rotate:N(t,e),scale:{type:"spring",damping:20,stiffness:300}}),C=({text:t,spinDuration:e=20,onHover:s="speedUp",className:c=""})=>{const o=Array.from(t),n=q(),l=H(0);A.useEffect(()=>{const r=l.get();n.start({rotate:r+360,scale:1,transition:i(e,r)})},[e,t,s,n,l]);const v=()=>{const r=l.get();if(console.log("CircularText mounted with text:",t),!s)return;let a,u=1;switch(s){case"slowDown":a=i(e*2,r);break;case"speedUp":a=i(e/4,r);break;case"pause":a={rotate:{type:"spring",damping:20,stiffness:300},scale:{type:"spring",damping:20,stiffness:300}},u=1;break;case"goBonkers":a=i(e/20,r),u=.8;break;default:a=i(e,r)}n.start({rotate:r+360,scale:u,transition:a})},T=()=>{const r=l.get();n.start({rotate:r+360,scale:1,transition:i(e,r)})};return g.jsx(U.div,{className:`${L["circular-text"]} ${c}`,style:{rotate:l},initial:{rotate:0},animate:n,onMouseEnter:v,onMouseLeave:T,children:o.map((r,a)=>{const u=360/o.length*a,d=Math.PI/o.length,V=d*a,E=d*a,m=`rotateZ(${u}deg) translate3d(${V}px, ${E}px, 0)`;return g.jsx("span",{style:{transform:m,WebkitTransform:m},children:r},a)})})};C.__docgenInfo={description:"",methods:[],displayName:"CircularText",props:{spinDuration:{defaultValue:{value:"20",computed:!1},required:!1},onHover:{defaultValue:{value:"'speedUp'",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1}}};const D={title:"ReactBits/TextAnimations/CircularText",component:C,parameters:{layout:"fullscreen"},tags:["autodocs"]},p={args:{text:"Hello World",spinDuration:20,onHover:"speedUp"}};var h,x,y;p.parameters={...p.parameters,docs:{...(h=p.parameters)==null?void 0:h.docs,source:{originalSource:`{
1
+ import{r as A,j as g}from"./iframe-Cw8dCV4Z.js";import{U as _,u as k}from"./MotionConfigContext-BCa1jVYq.js";import{g as w,s as b,m as U}from"./proxy-p8L3T_Zy.js";import{u as H}from"./use-motion-value-BVm7csqA.js";import"./preload-helper-C1FmrZbK.js";function $(t){t.values.forEach(e=>e.stop())}function f(t,e){[...e].reverse().forEach(c=>{const o=t.getVariant(c);o&&b(t,o),t.variantChildren&&t.variantChildren.forEach(n=>{f(n,e)})})}function j(t,e){if(Array.isArray(e))return f(t,e);if(typeof e=="string")return f(t,[e]);b(t,e)}function I(){const t=new Set,e={subscribe(s){return t.add(s),()=>void t.delete(s)},start(s,c){const o=[];return t.forEach(n=>{o.push(w(n,s,{transitionOverride:c}))}),Promise.all(o)},set(s){return t.forEach(c=>{j(c,s)})},stop(){t.forEach(s=>{$(s)})},mount(){return()=>{e.stop()}}};return e}function M(){const t=_(I);return k(t.mount,[]),t}const q=M,L={"circular-text":"_circular-text_2sef0_1"},N=(t,e,s=!0)=>({from:e,to:e+360,ease:"linear",duration:t,type:"tween",repeat:s?1/0:0}),i=(t,e)=>({rotate:N(t,e),scale:{type:"spring",damping:20,stiffness:300}}),C=({text:t,spinDuration:e=20,onHover:s="speedUp",className:c=""})=>{const o=Array.from(t),n=q(),l=H(0);A.useEffect(()=>{const r=l.get();n.start({rotate:r+360,scale:1,transition:i(e,r)})},[e,t,s,n,l]);const v=()=>{const r=l.get();if(console.log("CircularText mounted with text:",t),!s)return;let a,u=1;switch(s){case"slowDown":a=i(e*2,r);break;case"speedUp":a=i(e/4,r);break;case"pause":a={rotate:{type:"spring",damping:20,stiffness:300},scale:{type:"spring",damping:20,stiffness:300}},u=1;break;case"goBonkers":a=i(e/20,r),u=.8;break;default:a=i(e,r)}n.start({rotate:r+360,scale:u,transition:a})},T=()=>{const r=l.get();n.start({rotate:r+360,scale:1,transition:i(e,r)})};return g.jsx(U.div,{className:`${L["circular-text"]} ${c}`,style:{rotate:l},initial:{rotate:0},animate:n,onMouseEnter:v,onMouseLeave:T,children:o.map((r,a)=>{const u=360/o.length*a,d=Math.PI/o.length,V=d*a,E=d*a,m=`rotateZ(${u}deg) translate3d(${V}px, ${E}px, 0)`;return g.jsx("span",{style:{transform:m,WebkitTransform:m},children:r},a)})})};C.__docgenInfo={description:"",methods:[],displayName:"CircularText",props:{spinDuration:{defaultValue:{value:"20",computed:!1},required:!1},onHover:{defaultValue:{value:"'speedUp'",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1}}};const D={title:"ReactBits/TextAnimations/CircularText",component:C,parameters:{layout:"fullscreen"}},p={args:{text:"Hello World",spinDuration:20,onHover:"speedUp"}};var h,x,y;p.parameters={...p.parameters,docs:{...(h=p.parameters)==null?void 0:h.docs,source:{originalSource:`{
2
2
  args: {
3
3
  text: 'Hello World',
4
4
  spinDuration: 20,
@@ -1,4 +1,4 @@
1
- import{r as l,j as S}from"./iframe-B8pH-Lvr.js";import"./preload-helper-C1FmrZbK.js";const V=({sparkColor:g="#fff",sparkSize:v=10,sparkRadius:x=15,sparkCount:m=8,duration:p=400,easing:R="ease-out",extraScale:k=1,children:b})=>{const i=l.useRef(null),h=l.useRef([]),C=l.useRef(null);l.useEffect(()=>{const e=i.current;if(!e)return;const t=e.parentElement;if(!t)return;let a;const s=()=>{const{width:r,height:c}=t.getBoundingClientRect();(e.width!==r||e.height!==c)&&(e.width=r,e.height=c)},o=()=>{clearTimeout(a),a=setTimeout(s,100)},n=new ResizeObserver(o);return n.observe(t),s(),()=>{n.disconnect(),clearTimeout(a)}},[]);const w=l.useCallback(e=>{switch(R){case"linear":return e;case"ease-in":return e*e;case"ease-in-out":return e<.5?2*e*e:-1+(4-2*e)*e;default:return e*(2-e)}},[R]);l.useEffect(()=>{const e=i.current;if(!e)return;const t=e.getContext("2d");let a;const s=o=>{C.current||(C.current=o),t.clearRect(0,0,e.width,e.height),h.current=h.current.filter(n=>{const r=o-n.startTime;if(r>=p)return!1;const c=r/p,u=w(c),f=u*x*k,y=v*(1-u),A=n.x+f*Math.cos(n.angle),M=n.y+f*Math.sin(n.angle),_=n.x+(f+y)*Math.cos(n.angle),j=n.y+(f+y)*Math.sin(n.angle);return t.strokeStyle=g,t.lineWidth=2,t.beginPath(),t.moveTo(A,M),t.lineTo(_,j),t.stroke(),!0}),a=requestAnimationFrame(s)};return a=requestAnimationFrame(s),()=>{cancelAnimationFrame(a)}},[g,v,x,m,p,w,k]);const z=e=>{const t=i.current;if(!t)return;const a=t.getBoundingClientRect(),s=e.clientX-a.left,o=e.clientY-a.top,n=performance.now(),r=Array.from({length:m},(c,u)=>({x:s,y:o,angle:2*Math.PI*u/m,startTime:n}));h.current.push(...r)};return S.jsxs("div",{style:{position:"relative",width:"100%",height:"100%"},onClick:z,children:[S.jsx("canvas",{ref:i,style:{width:"100%",height:"100%",display:"block",userSelect:"none",position:"absolute",top:0,left:0,pointerEvents:"none"}}),b]})};V.__docgenInfo={description:"",methods:[],displayName:"ClickSpark",props:{sparkColor:{defaultValue:{value:"'#fff'",computed:!1},required:!1},sparkSize:{defaultValue:{value:"10",computed:!1},required:!1},sparkRadius:{defaultValue:{value:"15",computed:!1},required:!1},sparkCount:{defaultValue:{value:"8",computed:!1},required:!1},duration:{defaultValue:{value:"400",computed:!1},required:!1},easing:{defaultValue:{value:"'ease-out'",computed:!1},required:!1},extraScale:{defaultValue:{value:"1.0",computed:!1},required:!1}}};const I={title:"ReactBits/Animations/ClickSpark",component:V,parameters:{layout:"fullscreen"},tags:["autodocs"]},d={args:{sparkColor:"#fff",sparkSize:10,sparkRadius:15,sparkCount:8,duration:400,easing:"ease-out",extraScale:1,children:"Hello World"}};var q,T,E;d.parameters={...d.parameters,docs:{...(q=d.parameters)==null?void 0:q.docs,source:{originalSource:`{
1
+ import{r as l,j as S}from"./iframe-Cw8dCV4Z.js";import"./preload-helper-C1FmrZbK.js";const V=({sparkColor:g="#fff",sparkSize:v=10,sparkRadius:x=15,sparkCount:m=8,duration:p=400,easing:R="ease-out",extraScale:k=1,children:b})=>{const i=l.useRef(null),h=l.useRef([]),C=l.useRef(null);l.useEffect(()=>{const e=i.current;if(!e)return;const t=e.parentElement;if(!t)return;let a;const s=()=>{const{width:r,height:c}=t.getBoundingClientRect();(e.width!==r||e.height!==c)&&(e.width=r,e.height=c)},o=()=>{clearTimeout(a),a=setTimeout(s,100)},n=new ResizeObserver(o);return n.observe(t),s(),()=>{n.disconnect(),clearTimeout(a)}},[]);const w=l.useCallback(e=>{switch(R){case"linear":return e;case"ease-in":return e*e;case"ease-in-out":return e<.5?2*e*e:-1+(4-2*e)*e;default:return e*(2-e)}},[R]);l.useEffect(()=>{const e=i.current;if(!e)return;const t=e.getContext("2d");let a;const s=o=>{C.current||(C.current=o),t.clearRect(0,0,e.width,e.height),h.current=h.current.filter(n=>{const r=o-n.startTime;if(r>=p)return!1;const c=r/p,u=w(c),f=u*x*k,y=v*(1-u),A=n.x+f*Math.cos(n.angle),M=n.y+f*Math.sin(n.angle),_=n.x+(f+y)*Math.cos(n.angle),j=n.y+(f+y)*Math.sin(n.angle);return t.strokeStyle=g,t.lineWidth=2,t.beginPath(),t.moveTo(A,M),t.lineTo(_,j),t.stroke(),!0}),a=requestAnimationFrame(s)};return a=requestAnimationFrame(s),()=>{cancelAnimationFrame(a)}},[g,v,x,m,p,w,k]);const z=e=>{const t=i.current;if(!t)return;const a=t.getBoundingClientRect(),s=e.clientX-a.left,o=e.clientY-a.top,n=performance.now(),r=Array.from({length:m},(c,u)=>({x:s,y:o,angle:2*Math.PI*u/m,startTime:n}));h.current.push(...r)};return S.jsxs("div",{style:{position:"relative",width:"100%",height:"100%"},onClick:z,children:[S.jsx("canvas",{ref:i,style:{width:"100%",height:"100%",display:"block",userSelect:"none",position:"absolute",top:0,left:0,pointerEvents:"none"}}),b]})};V.__docgenInfo={description:"",methods:[],displayName:"ClickSpark",props:{sparkColor:{defaultValue:{value:"'#fff'",computed:!1},required:!1},sparkSize:{defaultValue:{value:"10",computed:!1},required:!1},sparkRadius:{defaultValue:{value:"15",computed:!1},required:!1},sparkCount:{defaultValue:{value:"8",computed:!1},required:!1},duration:{defaultValue:{value:"400",computed:!1},required:!1},easing:{defaultValue:{value:"'ease-out'",computed:!1},required:!1},extraScale:{defaultValue:{value:"1.0",computed:!1},required:!1}}};const I={title:"ReactBits/Animations/ClickSpark",component:V,parameters:{layout:"fullscreen"}},d={args:{sparkColor:"#fff",sparkSize:10,sparkRadius:15,sparkCount:8,duration:400,easing:"ease-out",extraScale:1,children:"Hello World"}};var q,T,E;d.parameters={...d.parameters,docs:{...(q=d.parameters)==null?void 0:q.docs,source:{originalSource:`{
2
2
  args: {
3
3
  sparkColor: '#fff',
4
4
  sparkSize: 10,
@@ -1,4 +1,4 @@
1
- import{r as n,j as K}from"./iframe-B8pH-Lvr.js";import{d as m,S as Q,a as Z,q as ee,e as L,i as re,M as te,W as oe,s as ne,f as ae}from"./three.module--_vTUKhS.js";import"./preload-helper-C1FmrZbK.js";const ue={"color-bends-container":"_color-bends-container_1e02y_1"},q=8,se=`
1
+ import{r as n,j as K}from"./iframe-Cw8dCV4Z.js";import{d as m,S as Q,a as Z,q as ee,e as L,i as re,M as te,W as oe,s as ne,f as ae}from"./three.module--_vTUKhS.js";import"./preload-helper-C1FmrZbK.js";const ue={"color-bends-container":"_color-bends-container_1e02y_1"},q=8,se=`
2
2
  #define MAX_COLORS ${q}
3
3
  uniform vec2 uCanvas;
4
4
  uniform float uTime;
@@ -86,7 +86,7 @@ void main() {
86
86
  vUv = uv;
87
87
  gl_Position = vec4(position, 1.0);
88
88
  }
89
- `;function X({className:D,style:U,rotation:S=45,speed:d=.2,colors:P=[],transparent:c=!0,autoRotate:k=0,scale:p=1,frequency:v=1,warpStrength:g=1,mouseInfluence:h=1,parallax:w=.5,noise:C=.1}){const M=n.useRef(null),B=n.useRef(null),R=n.useRef(null),E=n.useRef(null),F=n.useRef(null),V=n.useRef(S),_=n.useRef(k),b=n.useRef(new m(0,0)),j=n.useRef(new m(0,0)),G=n.useRef(8);return n.useEffect(()=>{const r=M.current,a=new Q,i=new Z(-1,1,1,-1,0,1),u=new ee(2,2),o=Array.from({length:q},()=>new L(0,0,0)),e=new re({vertexShader:le,fragmentShader:se,uniforms:{uCanvas:{value:new m(1,1)},uTime:{value:0},uSpeed:{value:d},uRot:{value:new m(1,0)},uColorCount:{value:0},uColors:{value:o},uTransparent:{value:c?1:0},uScale:{value:p},uFrequency:{value:v},uWarpStrength:{value:g},uPointer:{value:new m(0,0)},uMouseInfluence:{value:h},uParallax:{value:w},uNoise:{value:C}},premultipliedAlpha:!0,transparent:!0});E.current=e;const s=new te(u,e);a.add(s);const t=new oe({antialias:!1,powerPreference:"high-performance",alpha:!0});B.current=t,t.outputColorSpace=ne,t.setPixelRatio(Math.min(window.devicePixelRatio||1,2)),t.setClearColor(0,c?0:1),t.domElement.style.width="100%",t.domElement.style.height="100%",t.domElement.style.display="block",r.appendChild(t.domElement);const O=new ae,y=()=>{const l=r.clientWidth||1,f=r.clientHeight||1;t.setSize(l,f,!1),e.uniforms.uCanvas.value.set(l,f)};if(y(),"ResizeObserver"in window){const l=new ResizeObserver(y);l.observe(r),F.current=l}else window.addEventListener("resize",y);const T=()=>{const l=O.getDelta(),f=O.elapsedTime;e.uniforms.uTime.value=f;const I=(V.current%360+_.current*f)*Math.PI/180,$=Math.cos(I),H=Math.sin(I);e.uniforms.uRot.value.set($,H);const A=j.current,Y=b.current,J=Math.min(1,l*G.current);A.lerp(Y,J),e.uniforms.uPointer.value.copy(A),t.render(a,i),R.current=requestAnimationFrame(T)};return R.current=requestAnimationFrame(T),()=>{R.current!==null&&cancelAnimationFrame(R.current),F.current?F.current.disconnect():window.removeEventListener("resize",y),u.dispose(),e.dispose(),t.dispose(),t.forceContextLoss(),t.domElement&&t.domElement.parentElement===r&&r.removeChild(t.domElement)}},[v,h,C,w,p,d,c,g]),n.useEffect(()=>{const r=E.current,a=B.current;if(!r)return;V.current=S,_.current=k,r.uniforms.uSpeed.value=d,r.uniforms.uScale.value=p,r.uniforms.uFrequency.value=v,r.uniforms.uWarpStrength.value=g,r.uniforms.uMouseInfluence.value=h,r.uniforms.uParallax.value=w,r.uniforms.uNoise.value=C;const i=o=>{const e=o.replace("#","").trim(),s=e.length===3?[parseInt(e[0]+e[0],16),parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16)]:[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)];return new L(s[0]/255,s[1]/255,s[2]/255)},u=(P||[]).filter(Boolean).slice(0,q).map(i);for(let o=0;o<q;o++){const e=r.uniforms.uColors.value[o];o<u.length?e.copy(u[o]):e.set(0,0,0)}r.uniforms.uColorCount.value=u.length,r.uniforms.uTransparent.value=c?1:0,a&&a.setClearColor(0,c?0:1)},[S,k,d,p,v,g,h,w,C,P,c]),n.useEffect(()=>{const r=E.current,a=M.current;if(!r||!a)return;const i=u=>{const o=a.getBoundingClientRect(),e=(u.clientX-o.left)/(o.width||1)*2-1,s=-((u.clientY-o.top)/(o.height||1)*2-1);b.current.set(e,s)};return a.addEventListener("pointermove",i),()=>{a.removeEventListener("pointermove",i)}},[]),K.jsx("div",{ref:M,className:`${ue["color-bends-container"]} ${D}`,style:U})}X.__docgenInfo={description:"",methods:[],displayName:"ColorBends",props:{rotation:{defaultValue:{value:"45",computed:!1},required:!1},speed:{defaultValue:{value:"0.2",computed:!1},required:!1},colors:{defaultValue:{value:"[]",computed:!1},required:!1},transparent:{defaultValue:{value:"true",computed:!1},required:!1},autoRotate:{defaultValue:{value:"0",computed:!1},required:!1},scale:{defaultValue:{value:"1",computed:!1},required:!1},frequency:{defaultValue:{value:"1",computed:!1},required:!1},warpStrength:{defaultValue:{value:"1",computed:!1},required:!1},mouseInfluence:{defaultValue:{value:"1",computed:!1},required:!1},parallax:{defaultValue:{value:"0.5",computed:!1},required:!1},noise:{defaultValue:{value:"0.1",computed:!1},required:!1}}};const de={title:"ReactBits/Backgrounds/ColorBends",component:X,parameters:{layout:"fullscreen"},tags:["autodocs"]},x={args:{rotation:45,speed:.2,colors:[],transparent:!0,autoRotate:0,scale:1,frequency:1,warpStrength:1,mouseInfluence:1,parallax:.5,noise:.1}};var W,N,z;x.parameters={...x.parameters,docs:{...(W=x.parameters)==null?void 0:W.docs,source:{originalSource:`{
89
+ `;function X({className:D,style:U,rotation:S=45,speed:d=.2,colors:P=[],transparent:c=!0,autoRotate:k=0,scale:p=1,frequency:v=1,warpStrength:g=1,mouseInfluence:h=1,parallax:w=.5,noise:C=.1}){const M=n.useRef(null),B=n.useRef(null),R=n.useRef(null),E=n.useRef(null),F=n.useRef(null),V=n.useRef(S),_=n.useRef(k),b=n.useRef(new m(0,0)),j=n.useRef(new m(0,0)),G=n.useRef(8);return n.useEffect(()=>{const r=M.current,a=new Q,i=new Z(-1,1,1,-1,0,1),u=new ee(2,2),o=Array.from({length:q},()=>new L(0,0,0)),e=new re({vertexShader:le,fragmentShader:se,uniforms:{uCanvas:{value:new m(1,1)},uTime:{value:0},uSpeed:{value:d},uRot:{value:new m(1,0)},uColorCount:{value:0},uColors:{value:o},uTransparent:{value:c?1:0},uScale:{value:p},uFrequency:{value:v},uWarpStrength:{value:g},uPointer:{value:new m(0,0)},uMouseInfluence:{value:h},uParallax:{value:w},uNoise:{value:C}},premultipliedAlpha:!0,transparent:!0});E.current=e;const s=new te(u,e);a.add(s);const t=new oe({antialias:!1,powerPreference:"high-performance",alpha:!0});B.current=t,t.outputColorSpace=ne,t.setPixelRatio(Math.min(window.devicePixelRatio||1,2)),t.setClearColor(0,c?0:1),t.domElement.style.width="100%",t.domElement.style.height="100%",t.domElement.style.display="block",r.appendChild(t.domElement);const O=new ae,y=()=>{const l=r.clientWidth||1,f=r.clientHeight||1;t.setSize(l,f,!1),e.uniforms.uCanvas.value.set(l,f)};if(y(),"ResizeObserver"in window){const l=new ResizeObserver(y);l.observe(r),F.current=l}else window.addEventListener("resize",y);const T=()=>{const l=O.getDelta(),f=O.elapsedTime;e.uniforms.uTime.value=f;const I=(V.current%360+_.current*f)*Math.PI/180,$=Math.cos(I),H=Math.sin(I);e.uniforms.uRot.value.set($,H);const A=j.current,Y=b.current,J=Math.min(1,l*G.current);A.lerp(Y,J),e.uniforms.uPointer.value.copy(A),t.render(a,i),R.current=requestAnimationFrame(T)};return R.current=requestAnimationFrame(T),()=>{R.current!==null&&cancelAnimationFrame(R.current),F.current?F.current.disconnect():window.removeEventListener("resize",y),u.dispose(),e.dispose(),t.dispose(),t.forceContextLoss(),t.domElement&&t.domElement.parentElement===r&&r.removeChild(t.domElement)}},[v,h,C,w,p,d,c,g]),n.useEffect(()=>{const r=E.current,a=B.current;if(!r)return;V.current=S,_.current=k,r.uniforms.uSpeed.value=d,r.uniforms.uScale.value=p,r.uniforms.uFrequency.value=v,r.uniforms.uWarpStrength.value=g,r.uniforms.uMouseInfluence.value=h,r.uniforms.uParallax.value=w,r.uniforms.uNoise.value=C;const i=o=>{const e=o.replace("#","").trim(),s=e.length===3?[parseInt(e[0]+e[0],16),parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16)]:[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)];return new L(s[0]/255,s[1]/255,s[2]/255)},u=(P||[]).filter(Boolean).slice(0,q).map(i);for(let o=0;o<q;o++){const e=r.uniforms.uColors.value[o];o<u.length?e.copy(u[o]):e.set(0,0,0)}r.uniforms.uColorCount.value=u.length,r.uniforms.uTransparent.value=c?1:0,a&&a.setClearColor(0,c?0:1)},[S,k,d,p,v,g,h,w,C,P,c]),n.useEffect(()=>{const r=E.current,a=M.current;if(!r||!a)return;const i=u=>{const o=a.getBoundingClientRect(),e=(u.clientX-o.left)/(o.width||1)*2-1,s=-((u.clientY-o.top)/(o.height||1)*2-1);b.current.set(e,s)};return a.addEventListener("pointermove",i),()=>{a.removeEventListener("pointermove",i)}},[]),K.jsx("div",{ref:M,className:`${ue["color-bends-container"]} ${D}`,style:U})}X.__docgenInfo={description:"",methods:[],displayName:"ColorBends",props:{rotation:{defaultValue:{value:"45",computed:!1},required:!1},speed:{defaultValue:{value:"0.2",computed:!1},required:!1},colors:{defaultValue:{value:"[]",computed:!1},required:!1},transparent:{defaultValue:{value:"true",computed:!1},required:!1},autoRotate:{defaultValue:{value:"0",computed:!1},required:!1},scale:{defaultValue:{value:"1",computed:!1},required:!1},frequency:{defaultValue:{value:"1",computed:!1},required:!1},warpStrength:{defaultValue:{value:"1",computed:!1},required:!1},mouseInfluence:{defaultValue:{value:"1",computed:!1},required:!1},parallax:{defaultValue:{value:"0.5",computed:!1},required:!1},noise:{defaultValue:{value:"0.1",computed:!1},required:!1}}};const de={title:"ReactBits/Backgrounds/ColorBends",component:X,parameters:{layout:"fullscreen"}},x={args:{rotation:45,speed:.2,colors:[],transparent:!0,autoRotate:0,scale:1,frequency:1,warpStrength:1,mouseInfluence:1,parallax:.5,noise:.1}};var W,N,z;x.parameters={...x.parameters,docs:{...(W=x.parameters)==null?void 0:W.docs,source:{originalSource:`{
90
90
  args: {
91
91
  rotation: 45,
92
92
  speed: 0.2,
@@ -1,4 +1,4 @@
1
- import{r as n,j as N}from"./iframe-B8pH-Lvr.js";import{u as U}from"./use-motion-value--XhiA2Gt.js";import{u as _}from"./use-spring-CrWzlBMd.js";import{u as j}from"./use-in-view-Zn8evg3J.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-D5hZdVGx.js";import"./use-transform-vyDqMhf-.js";function b({to:s,from:u=0,direction:r="up",delay:p=0,duration:o=2,className:w="",startWhen:V=!0,separator:i="",onStart:d,onEnd:g}){const a=n.useRef(null),x=U(r==="down"?s:u),y=20+40*(1/o),E=100*(1/o),h=_(x,{damping:y,stiffness:E}),q=j(a,{once:!0,margin:"0px"}),v=t=>{const e=t.toString();if(e.includes(".")){const m=e.split(".")[1];if(parseInt(m)!==0)return m.length}return 0},l=Math.max(v(u),v(s)),c=n.useCallback(t=>{const e=l>0,m={useGrouping:!!i,minimumFractionDigits:e?l:0,maximumFractionDigits:e?l:0},D=Intl.NumberFormat("en-US",m).format(t);return i?D.replace(/,/g,i):D},[l,i]);return n.useEffect(()=>{a.current&&(a.current.textContent=c(r==="down"?s:u))},[u,s,r,c]),n.useEffect(()=>{if(q&&V){typeof d=="function"&&d();const t=setTimeout(()=>{x.set(r==="down"?u:s)},p*1e3),e=setTimeout(()=>{typeof g=="function"&&g()},p*1e3+o*1e3);return()=>{clearTimeout(t),clearTimeout(e)}}},[q,V,x,r,u,s,p,d,g,o]),n.useEffect(()=>{const t=h.on("change",e=>{a.current&&(a.current.textContent=c(e))});return()=>t()},[h,c]),N.jsx("span",{className:w,ref:a})}b.__docgenInfo={description:"",methods:[],displayName:"CountUp",props:{from:{defaultValue:{value:"0",computed:!1},required:!1},direction:{defaultValue:{value:"'up'",computed:!1},required:!1},delay:{defaultValue:{value:"0",computed:!1},required:!1},duration:{defaultValue:{value:"2",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},startWhen:{defaultValue:{value:"true",computed:!1},required:!1},separator:{defaultValue:{value:"''",computed:!1},required:!1}}};const B={title:"ReactBits/TextAnimations/CountUp",component:b,parameters:{layout:"fullscreen"},tags:["autodocs"]},f={args:{from:0,to:500,direction:"up",delay:0,duration:2,startWhen:!0,separator:""}};var I,C,T;f.parameters={...f.parameters,docs:{...(I=f.parameters)==null?void 0:I.docs,source:{originalSource:`{
1
+ import{r as n,j as N}from"./iframe-Cw8dCV4Z.js";import{u as U}from"./use-motion-value-BVm7csqA.js";import{u as _}from"./use-spring-BkrdNVnG.js";import{u as j}from"./use-in-view-Dv3LTdsl.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-BCa1jVYq.js";import"./use-transform-CQNghMvr.js";function b({to:u,from:s=0,direction:r="up",delay:p=0,duration:o=2,className:w="",startWhen:V=!0,separator:i="",onStart:d,onEnd:g}){const a=n.useRef(null),x=U(r==="down"?u:s),y=20+40*(1/o),E=100*(1/o),h=_(x,{damping:y,stiffness:E}),q=j(a,{once:!0,margin:"0px"}),v=t=>{const e=t.toString();if(e.includes(".")){const m=e.split(".")[1];if(parseInt(m)!==0)return m.length}return 0},l=Math.max(v(s),v(u)),c=n.useCallback(t=>{const e=l>0,m={useGrouping:!!i,minimumFractionDigits:e?l:0,maximumFractionDigits:e?l:0},D=Intl.NumberFormat("en-US",m).format(t);return i?D.replace(/,/g,i):D},[l,i]);return n.useEffect(()=>{a.current&&(a.current.textContent=c(r==="down"?u:s))},[s,u,r,c]),n.useEffect(()=>{if(q&&V){typeof d=="function"&&d();const t=setTimeout(()=>{x.set(r==="down"?s:u)},p*1e3),e=setTimeout(()=>{typeof g=="function"&&g()},p*1e3+o*1e3);return()=>{clearTimeout(t),clearTimeout(e)}}},[q,V,x,r,s,u,p,d,g,o]),n.useEffect(()=>{const t=h.on("change",e=>{a.current&&(a.current.textContent=c(e))});return()=>t()},[h,c]),N.jsx("span",{className:w,ref:a})}b.__docgenInfo={description:"",methods:[],displayName:"CountUp",props:{from:{defaultValue:{value:"0",computed:!1},required:!1},direction:{defaultValue:{value:"'up'",computed:!1},required:!1},delay:{defaultValue:{value:"0",computed:!1},required:!1},duration:{defaultValue:{value:"2",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},startWhen:{defaultValue:{value:"true",computed:!1},required:!1},separator:{defaultValue:{value:"''",computed:!1},required:!1}}};const B={title:"ReactBits/TextAnimations/CountUp",component:b,parameters:{layout:"fullscreen"}},f={args:{from:0,to:500,direction:"up",delay:0,duration:2,startWhen:!0,separator:""}};var I,C,T;f.parameters={...f.parameters,docs:{...(I=f.parameters)==null?void 0:I.docs,source:{originalSource:`{
2
2
  args: {
3
3
  from: 0,
4
4
  to: 500,
@@ -1,4 +1,4 @@
1
- import{j as r,r as R}from"./iframe-B8pH-Lvr.js";import{u as M}from"./use-spring-CrWzlBMd.js";import{u as k}from"./use-transform-vyDqMhf-.js";import{m as D}from"./proxy-BA3VZtN5.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-D5hZdVGx.js";import"./use-motion-value--XhiA2Gt.js";const l={"counter-container":"_counter-container_1x3ml_1","counter-counter":"_counter-counter_1x3ml_6","counter-digit":"_counter-digit_1x3ml_12","counter-number":"_counter-number_1x3ml_18","gradient-container":"_gradient-container_1x3ml_29","bottom-gradient":"_bottom-gradient_1x3ml_38"};function E({mv:e,number:t,height:a}){let i=k(e,o=>{let s=o%10,n=(10+t-s)%10,d=n*a;return n>5&&(d-=10*a),d});return r.jsx(D.span,{className:`${l["counter-number"]}`,style:{y:i},children:t})}function S(e){const t=Math.round(e),a=1e-9*Math.max(1,Math.abs(e));return Math.abs(e-t)<a?t:e}function T(e,t){const a=e/t;return Math.floor(S(a))}function B({place:e,value:t,height:a,digitStyle:i}){const o=e===".",s=o?0:T(t,e),n=M(s);return R.useEffect(()=>{o||n.set(s)},[n,s,o]),o?r.jsx("span",{className:`${l["counter-digit"]}`,style:{height:a,...i,width:"fit-content"},children:"."}):r.jsx("span",{className:`${l["counter-digit"]}`,style:{height:a,...i},children:Array.from({length:10},(d,f)=>r.jsx(E,{mv:n,number:f,height:a},f))})}function q({value:e,fontSize:t=100,padding:a=0,places:i=[...e.toString()].map((p,c,u)=>p==="."?".":10**(u.indexOf(".")===-1?u.length-c-1:c<u.indexOf(".")?u.indexOf(".")-c-1:-(c-u.indexOf(".")))),gap:o=8,borderRadius:s=4,horizontalPadding:n=8,textColor:d="inherit",fontWeight:f="inherit",containerStyle:N,counterStyle:$,digitStyle:O,gradientHeight:g=16,gradientFrom:x="black",gradientTo:h="transparent",topGradientStyle:_,bottomGradientStyle:v}){const p=t+a,c={fontSize:t,gap:o,borderRadius:s,paddingLeft:n,paddingRight:n,color:d,fontWeight:f},u={height:g,background:`linear-gradient(to bottom, ${x}, ${h})`},C={height:g,background:`linear-gradient(to top, ${x}, ${h})`};return r.jsxs("span",{className:`${l["counter-container"]}`,style:N,children:[r.jsx("span",{className:`${l["counter-counter"]}`,style:{...c,...$},children:i.map(b=>r.jsx(B,{place:b,value:e,height:p,digitStyle:O},b))}),r.jsxs("span",{className:`${l["gradient-container"]}`,children:[r.jsx("span",{className:"top-gradient",style:_||u}),r.jsx("span",{className:`${l["bottom-gradient"]}`,style:v||C})]})]})}q.__docgenInfo={description:"",methods:[],displayName:"Counter",props:{fontSize:{defaultValue:{value:"100",computed:!1},required:!1},padding:{defaultValue:{value:"0",computed:!1},required:!1},places:{defaultValue:{value:`[...value.toString()].map((ch, i, a) => {
1
+ import{j as r,r as R}from"./iframe-Cw8dCV4Z.js";import{u as M}from"./use-spring-BkrdNVnG.js";import{u as k}from"./use-transform-CQNghMvr.js";import{m as D}from"./proxy-p8L3T_Zy.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-BCa1jVYq.js";import"./use-motion-value-BVm7csqA.js";const u={"counter-container":"_counter-container_1x3ml_1","counter-counter":"_counter-counter_1x3ml_6","counter-digit":"_counter-digit_1x3ml_12","counter-number":"_counter-number_1x3ml_18","gradient-container":"_gradient-container_1x3ml_29","bottom-gradient":"_bottom-gradient_1x3ml_38"};function E({mv:e,number:t,height:a}){let i=k(e,o=>{let s=o%10,n=(10+t-s)%10,d=n*a;return n>5&&(d-=10*a),d});return r.jsx(D.span,{className:`${u["counter-number"]}`,style:{y:i},children:t})}function S(e){const t=Math.round(e),a=1e-9*Math.max(1,Math.abs(e));return Math.abs(e-t)<a?t:e}function T(e,t){const a=e/t;return Math.floor(S(a))}function B({place:e,value:t,height:a,digitStyle:i}){const o=e===".",s=o?0:T(t,e),n=M(s);return R.useEffect(()=>{o||n.set(s)},[n,s,o]),o?r.jsx("span",{className:`${u["counter-digit"]}`,style:{height:a,...i,width:"fit-content"},children:"."}):r.jsx("span",{className:`${u["counter-digit"]}`,style:{height:a,...i},children:Array.from({length:10},(d,f)=>r.jsx(E,{mv:n,number:f,height:a},f))})}function q({value:e,fontSize:t=100,padding:a=0,places:i=[...e.toString()].map((p,c,l)=>p==="."?".":10**(l.indexOf(".")===-1?l.length-c-1:c<l.indexOf(".")?l.indexOf(".")-c-1:-(c-l.indexOf(".")))),gap:o=8,borderRadius:s=4,horizontalPadding:n=8,textColor:d="inherit",fontWeight:f="inherit",containerStyle:N,counterStyle:$,digitStyle:O,gradientHeight:g=16,gradientFrom:x="black",gradientTo:h="transparent",topGradientStyle:_,bottomGradientStyle:v}){const p=t+a,c={fontSize:t,gap:o,borderRadius:s,paddingLeft:n,paddingRight:n,color:d,fontWeight:f},l={height:g,background:`linear-gradient(to bottom, ${x}, ${h})`},C={height:g,background:`linear-gradient(to top, ${x}, ${h})`};return r.jsxs("span",{className:`${u["counter-container"]}`,style:N,children:[r.jsx("span",{className:`${u["counter-counter"]}`,style:{...c,...$},children:i.map(b=>r.jsx(B,{place:b,value:e,height:p,digitStyle:O},b))}),r.jsxs("span",{className:`${u["gradient-container"]}`,children:[r.jsx("span",{className:"top-gradient",style:_||l}),r.jsx("span",{className:`${u["bottom-gradient"]}`,style:v||C})]})]})}q.__docgenInfo={description:"",methods:[],displayName:"Counter",props:{fontSize:{defaultValue:{value:"100",computed:!1},required:!1},padding:{defaultValue:{value:"0",computed:!1},required:!1},places:{defaultValue:{value:`[...value.toString()].map((ch, i, a) => {
2
2
  ch == '.';
3
3
  if (ch === '.') {
4
4
  return '.';
@@ -8,7 +8,7 @@ import{j as r,r as R}from"./iframe-B8pH-Lvr.js";import{u as M}from"./use-spring-
8
8
  (a.indexOf('.') === -1 ? a.length - i - 1 : i < a.indexOf('.') ? a.indexOf('.') - i - 1 : -(i - a.indexOf('.')))
9
9
  );
10
10
  }
11
- })`,computed:!0},required:!1},gap:{defaultValue:{value:"8",computed:!1},required:!1},borderRadius:{defaultValue:{value:"4",computed:!1},required:!1},horizontalPadding:{defaultValue:{value:"8",computed:!1},required:!1},textColor:{defaultValue:{value:"'inherit'",computed:!1},required:!1},fontWeight:{defaultValue:{value:"'inherit'",computed:!1},required:!1},gradientHeight:{defaultValue:{value:"16",computed:!1},required:!1},gradientFrom:{defaultValue:{value:"'black'",computed:!1},required:!1},gradientTo:{defaultValue:{value:"'transparent'",computed:!1},required:!1}}};const F={title:"ReactBits/Components/Counter",component:q,parameters:{layout:"fullscreen"},tags:["autodocs"]},m={args:{value:1234}};var V,j,y;m.parameters={...m.parameters,docs:{...(V=m.parameters)==null?void 0:V.docs,source:{originalSource:`{
11
+ })`,computed:!0},required:!1},gap:{defaultValue:{value:"8",computed:!1},required:!1},borderRadius:{defaultValue:{value:"4",computed:!1},required:!1},horizontalPadding:{defaultValue:{value:"8",computed:!1},required:!1},textColor:{defaultValue:{value:"'inherit'",computed:!1},required:!1},fontWeight:{defaultValue:{value:"'inherit'",computed:!1},required:!1},gradientHeight:{defaultValue:{value:"16",computed:!1},required:!1},gradientFrom:{defaultValue:{value:"'black'",computed:!1},required:!1},gradientTo:{defaultValue:{value:"'transparent'",computed:!1},required:!1}}};const F={title:"ReactBits/Components/Counter",component:q,parameters:{layout:"fullscreen"}},m={args:{value:1234}};var V,j,y;m.parameters={...m.parameters,docs:{...(V=m.parameters)==null?void 0:V.docs,source:{originalSource:`{
12
12
  args: {
13
13
  value: 1234
14
14
  }
@@ -1,6 +1,6 @@
1
- import{r as c,j as n}from"./iframe-B8pH-Lvr.js";import{g as i}from"./index-C8pce-KX.js";import"./preload-helper-C1FmrZbK.js";const C=(o,e,l)=>(1-l)*o+l*e,M=(o,e)=>{if(e){const l=e.getBoundingClientRect();return{x:o.clientX-l.left,y:o.clientY-l.top}}return{x:o.clientX,y:o.clientY}},A=({color:o="white",containerRef:e=null})=>{const l=c.useRef(null),s=c.useRef(null),u=c.useRef(null),f=c.useRef(null),v=c.useRef(null);let a={x:0,y:0};return c.useEffect(()=>{const h=t=>{if(a=M(t,e==null?void 0:e.current),e!=null&&e.current){const d=e.current.getBoundingClientRect();t.clientX<d.left||t.clientX>d.right||t.clientY<d.top||t.clientY>d.bottom?i.to([s.current,u.current],{opacity:0}):i.to([s.current,u.current],{opacity:1})}},p=(e==null?void 0:e.current)||window;p.addEventListener("mousemove",h);const r={tx:{previous:0,current:0,amt:.15},ty:{previous:0,current:0,amt:.15}};i.set([s.current,u.current],{opacity:0});const y=()=>{r.tx.previous=r.tx.current=a.x,r.ty.previous=r.ty.current=a.y,i.to([s.current,u.current],{duration:.9,ease:"Power3.easeOut",opacity:1}),requestAnimationFrame(j),p.removeEventListener("mousemove",y)};p.addEventListener("mousemove",y);const x={turbulence:0},b=i.timeline({paused:!0,onStart:()=>{s.current.style.filter="url(#filter-noise-x)",u.current.style.filter="url(#filter-noise-y)"},onUpdate:()=>{f.current&&v.current&&(f.current.setAttribute("baseFrequency",x.turbulence),v.current.setAttribute("baseFrequency",x.turbulence))},onComplete:()=>{s.current&&u.current&&(s.current.style.filter=u.current.style.filter="none")}}).to(x,{duration:.5,ease:"power1",startAt:{turbulence:1},turbulence:0}),g=()=>b.restart(),E=()=>b.progress(1).kill(),j=()=>{r.tx.current=a.x,r.ty.current=a.y;for(const t in r)r[t].previous=C(r[t].previous,r[t].current,r[t].amt);s.current&&s.current&&(i.set(u.current,{x:r.tx.previous}),i.set(s.current,{y:r.ty.previous})),requestAnimationFrame(j)},w=e!=null&&e.current?e.current.querySelectorAll("a"):document.querySelectorAll("a");return w.forEach(t=>{t.addEventListener("mouseenter",g),t.addEventListener("mouseleave",E)}),()=>{p.removeEventListener("mousemove",h),p.removeEventListener("mousemove",y),w.forEach(t=>{t.removeEventListener("mouseenter",g),t.removeEventListener("mouseleave",E)})}},[e]),n.jsxs("div",{ref:l,className:"cursor",style:{position:e?"absolute":"fixed",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:1e4},children:[n.jsx("svg",{style:{position:"absolute",left:0,top:0,width:"100%",height:"100%"},children:n.jsxs("defs",{children:[n.jsxs("filter",{id:"filter-noise-x",children:[n.jsx("feTurbulence",{type:"fractalNoise",baseFrequency:"0.000001",numOctaves:"1",ref:f}),n.jsx("feDisplacementMap",{in:"SourceGraphic",scale:"40"})]}),n.jsxs("filter",{id:"filter-noise-y",children:[n.jsx("feTurbulence",{type:"fractalNoise",baseFrequency:"0.000001",numOctaves:"1",ref:v}),n.jsx("feDisplacementMap",{in:"SourceGraphic",scale:"40"})]})]})}),n.jsx("div",{ref:s,style:{position:"absolute",width:"100%",height:"1px",background:o,pointerEvents:"none",transform:"translateY(50%)",opacity:0}}),n.jsx("div",{ref:u,style:{position:"absolute",height:"100%",width:"1px",background:o,pointerEvents:"none",transform:"translateX(50%)",opacity:0}})]})};A.__docgenInfo={description:"",methods:[],displayName:"Crosshair",props:{color:{defaultValue:{value:"'white'",computed:!1},required:!1},containerRef:{defaultValue:{value:"null",computed:!1},required:!1}}};const D={title:"ReactBits/Animations/Crosshair",component:A,parameters:{layout:"fullscreen"},tags:["autodocs"]},m={args:{color:"white",containerRef:null}};var q,L,S;m.parameters={...m.parameters,docs:{...(q=m.parameters)==null?void 0:q.docs,source:{originalSource:`{
1
+ import{r as c,j as n}from"./iframe-Cw8dCV4Z.js";import{g as i}from"./index-C8pce-KX.js";import"./preload-helper-C1FmrZbK.js";const C=(o,e,l)=>(1-l)*o+l*e,M=(o,e)=>{if(e){const l=e.getBoundingClientRect();return{x:o.clientX-l.left,y:o.clientY-l.top}}return{x:o.clientX,y:o.clientY}},A=({color:o="white",containerRef:e=null})=>{const l=c.useRef(null),s=c.useRef(null),u=c.useRef(null),f=c.useRef(null),v=c.useRef(null);let a={x:0,y:0};return c.useEffect(()=>{const h=t=>{if(a=M(t,e==null?void 0:e.current),e!=null&&e.current){const m=e.current.getBoundingClientRect();t.clientX<m.left||t.clientX>m.right||t.clientY<m.top||t.clientY>m.bottom?i.to([s.current,u.current],{opacity:0}):i.to([s.current,u.current],{opacity:1})}},p=(e==null?void 0:e.current)||window;p.addEventListener("mousemove",h);const r={tx:{previous:0,current:0,amt:.15},ty:{previous:0,current:0,amt:.15}};i.set([s.current,u.current],{opacity:0});const y=()=>{r.tx.previous=r.tx.current=a.x,r.ty.previous=r.ty.current=a.y,i.to([s.current,u.current],{duration:.9,ease:"Power3.easeOut",opacity:1}),requestAnimationFrame(j),p.removeEventListener("mousemove",y)};p.addEventListener("mousemove",y);const x={turbulence:0},b=i.timeline({paused:!0,onStart:()=>{s.current.style.filter="url(#filter-noise-x)",u.current.style.filter="url(#filter-noise-y)"},onUpdate:()=>{f.current&&v.current&&(f.current.setAttribute("baseFrequency",x.turbulence),v.current.setAttribute("baseFrequency",x.turbulence))},onComplete:()=>{s.current&&u.current&&(s.current.style.filter=u.current.style.filter="none")}}).to(x,{duration:.5,ease:"power1",startAt:{turbulence:1},turbulence:0}),g=()=>b.restart(),E=()=>b.progress(1).kill(),j=()=>{r.tx.current=a.x,r.ty.current=a.y;for(const t in r)r[t].previous=C(r[t].previous,r[t].current,r[t].amt);s.current&&s.current&&(i.set(u.current,{x:r.tx.previous}),i.set(s.current,{y:r.ty.previous})),requestAnimationFrame(j)},w=e!=null&&e.current?e.current.querySelectorAll("a"):document.querySelectorAll("a");return w.forEach(t=>{t.addEventListener("mouseenter",g),t.addEventListener("mouseleave",E)}),()=>{p.removeEventListener("mousemove",h),p.removeEventListener("mousemove",y),w.forEach(t=>{t.removeEventListener("mouseenter",g),t.removeEventListener("mouseleave",E)})}},[e]),n.jsxs("div",{ref:l,className:"cursor",style:{position:e?"absolute":"fixed",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:1e4},children:[n.jsx("svg",{style:{position:"absolute",left:0,top:0,width:"100%",height:"100%"},children:n.jsxs("defs",{children:[n.jsxs("filter",{id:"filter-noise-x",children:[n.jsx("feTurbulence",{type:"fractalNoise",baseFrequency:"0.000001",numOctaves:"1",ref:f}),n.jsx("feDisplacementMap",{in:"SourceGraphic",scale:"40"})]}),n.jsxs("filter",{id:"filter-noise-y",children:[n.jsx("feTurbulence",{type:"fractalNoise",baseFrequency:"0.000001",numOctaves:"1",ref:v}),n.jsx("feDisplacementMap",{in:"SourceGraphic",scale:"40"})]})]})}),n.jsx("div",{ref:s,style:{position:"absolute",width:"100%",height:"1px",background:o,pointerEvents:"none",transform:"translateY(50%)",opacity:0}}),n.jsx("div",{ref:u,style:{position:"absolute",height:"100%",width:"1px",background:o,pointerEvents:"none",transform:"translateX(50%)",opacity:0}})]})};A.__docgenInfo={description:"",methods:[],displayName:"Crosshair",props:{color:{defaultValue:{value:"'white'",computed:!1},required:!1},containerRef:{defaultValue:{value:"null",computed:!1},required:!1}}};const D={title:"ReactBits/Animations/Crosshair",component:A,parameters:{layout:"fullscreen"}},d={args:{color:"white",containerRef:null}};var q,L,S;d.parameters={...d.parameters,docs:{...(q=d.parameters)==null?void 0:q.docs,source:{originalSource:`{
2
2
  args: {
3
3
  color: 'white',
4
4
  containerRef: null
5
5
  }
6
- }`,...(S=(L=m.parameters)==null?void 0:L.docs)==null?void 0:S.source}}};const N=["Default"];export{m as Default,N as __namedExportsOrder,D as default};
6
+ }`,...(S=(L=d.parameters)==null?void 0:L.docs)==null?void 0:S.source}}};const N=["Default"];export{d as Default,N as __namedExportsOrder,D as default};
@@ -1 +1 @@
1
- import{r as c,j as l}from"./iframe-B8pH-Lvr.js";import{g as $}from"./index-C8pce-KX.js";import"./preload-helper-C1FmrZbK.js";const fe="_cube_lig8l_26",n={"default-animation":"_default-animation_lig8l_9","default-animation--scene":"_default-animation--scene_lig8l_16",cube:fe,"cube-face":"_cube-face_lig8l_43","cube-face--top":"_cube-face--top_lig8l_55","cube-face--bottom":"_cube-face--bottom_lig8l_59","cube-face--left":"_cube-face--left_lig8l_63","cube-face--right":"_cube-face--right_lig8l_67","cube-face--back":"_cube-face--back_lig8l_71","cube-face--front":"_cube-face--front_lig8l_72"},z=({gridSize:t=10,cubeSize:b,maxAngle:H=45,radius:k=3,easing:B="power3.out",duration:W={enter:.3,leave:.6},cellGap:s,borderStyle:ee="1px solid #fff",faceColor:M="#060010",shadow:O=!1,autoAnimate:P=!0,rippleOnClick:I=!0,rippleColor:J="#fff",rippleSpeed:w=2})=>{const u=c.useRef(null),f=c.useRef(null),i=c.useRef(null),v=c.useRef(!1),K=c.useRef({x:0,y:0}),T=c.useRef({x:0,y:0}),E=c.useRef(null),te=typeof s=="number"?`${s}px`:(s==null?void 0:s.col)!==void 0?`${s.col}px`:"5%",ae=typeof s=="number"?`${s}px`:(s==null?void 0:s.row)!==void 0?`${s.row}px`:"5%",Q=W.enter,R=W.leave,h=c.useCallback((e,a)=>{u.current&&u.current.querySelectorAll("[data-cube]").forEach(r=>{const o=+r.dataset.row,d=+r.dataset.col,m=Math.hypot(o-e,d-a);if(m<=k){const q=(1-m/k)*H;$.to(r,{duration:Q,ease:B,overwrite:!0,rotateX:-q,rotateY:q})}else $.to(r,{duration:R,ease:"power3.out",overwrite:!0,rotateX:0,rotateY:0})})},[k,H,Q,R,B]),j=c.useCallback(e=>{v.current=!0,i.current&&clearTimeout(i.current);const a=u.current.getBoundingClientRect(),r=a.width/t,o=a.height/t,d=(e.clientX-a.left)/r,m=(e.clientY-a.top)/o;f.current&&cancelAnimationFrame(f.current),f.current=requestAnimationFrame(()=>h(m,d)),i.current=setTimeout(()=>{v.current=!1},3e3)},[t,h]),x=c.useCallback(()=>{u.current&&u.current.querySelectorAll("[data-cube]").forEach(e=>$.to(e,{duration:R,rotateX:0,rotateY:0,ease:"power3.out"}))},[R]),L=c.useCallback(e=>{e.preventDefault(),v.current=!0,i.current&&clearTimeout(i.current);const a=u.current.getBoundingClientRect(),r=a.width/t,o=a.height/t,d=e.touches[0],m=(d.clientX-a.left)/r,C=(d.clientY-a.top)/o;f.current&&cancelAnimationFrame(f.current),f.current=requestAnimationFrame(()=>h(C,m)),i.current=setTimeout(()=>{v.current=!1},3e3)},[t,h]),V=c.useCallback(()=>{v.current=!0},[]),N=c.useCallback(()=>{u.current&&x()},[x]),D=c.useCallback(e=>{if(!I||!u.current)return;const a=u.current.getBoundingClientRect(),r=a.width/t,o=a.height/t,d=e.clientX||e.touches&&e.touches[0].clientX,m=e.clientY||e.touches&&e.touches[0].clientY,C=Math.floor((d-a.left)/r),q=Math.floor((m-a.top)/o),oe=.15,ne=.3,ue=.6,se=oe/w,F=ne/w,le=ue/w,y={};u.current.querySelectorAll("[data-cube]").forEach(p=>{const _=+p.dataset.row,A=+p.dataset.col,X=Math.hypot(_-q,A-C),Y=Math.round(X);y[Y]||(y[Y]=[]),y[Y].push(p)}),Object.keys(y).map(Number).sort((p,_)=>p-_).forEach(p=>{const _=p*se,A=y[p].flatMap(X=>Array.from(X.querySelectorAll("[data-cube-face]")));$.to(A,{backgroundColor:J,duration:F,delay:_,ease:"power3.out"}),$.to(A,{backgroundColor:M,duration:F,delay:_+F+le,ease:"power3.out"})})},[I,t,M,J,w]);c.useEffect(()=>{if(!P||!u.current)return;K.current={x:Math.random()*t,y:Math.random()*t},T.current={x:Math.random()*t,y:Math.random()*t};const e=.02,a=()=>{if(!v.current){const r=K.current,o=T.current;r.x+=(o.x-r.x)*e,r.y+=(o.y-r.y)*e,h(r.y,r.x),Math.hypot(r.x-o.x,r.y-o.y)<.1&&(T.current={x:Math.random()*t,y:Math.random()*t})}E.current=requestAnimationFrame(a)};return E.current=requestAnimationFrame(a),()=>{E.current!=null&&cancelAnimationFrame(E.current)}},[P,t,h]),c.useEffect(()=>{const e=u.current;if(e)return e.addEventListener("pointermove",j),e.addEventListener("pointerleave",x),e.addEventListener("click",D),e.addEventListener("touchmove",L,{passive:!1}),e.addEventListener("touchstart",V,{passive:!0}),e.addEventListener("touchend",N,{passive:!0}),()=>{e.removeEventListener("pointermove",j),e.removeEventListener("pointerleave",x),e.removeEventListener("click",D),e.removeEventListener("touchmove",L),e.removeEventListener("touchstart",V),e.removeEventListener("touchend",N),f.current!=null&&cancelAnimationFrame(f.current),i.current&&clearTimeout(i.current)}},[j,x,D,L,V,N]);const U=Array.from({length:t}),re={gridTemplateColumns:b?`repeat(${t}, ${b}px)`:`repeat(${t}, 1fr)`,gridTemplateRows:b?`repeat(${t}, ${b}px)`:`repeat(${t}, 1fr)`,columnGap:te,rowGap:ae},ce={"--cube-face-border":ee,"--cube-face-bg":M,"--cube-face-shadow":O===!0?"0 0 6px rgba(0,0,0,.5)":O||"none",...b?{width:`${t*b}px`,height:`${t*b}px`}:{}};return l.jsx("div",{className:`${n["default-animation"]}`,style:ce,children:l.jsx("div",{ref:u,className:`${n["default-animation--scene"]}`,style:re,children:U.map((e,a)=>U.map((r,o)=>l.jsxs("div",{className:`${n.cube}`,"data-cube":!0,"data-row":a,"data-col":o,children:[l.jsx("div",{className:`${n["cube-face"]} ${n["cube-face--top"]}`,"data-cube-face":!0}),l.jsx("div",{className:`${n["cube-face"]} ${n["cube-face--bottom"]}`,"data-cube-face":!0}),l.jsx("div",{className:`${n["cube-face"]} ${n["cube-face--left"]}`,"data-cube-face":!0}),l.jsx("div",{className:`${n["cube-face"]} ${n["cube-face--right"]}`,"data-cube-face":!0}),l.jsx("div",{className:`${n["cube-face"]} ${n["cube-face--front"]}`,"data-cube-face":!0}),l.jsx("div",{className:`${n["cube-face"]} ${n["cube-face--back"]}`,"data-cube-face":!0})]},`${a}-${o}`)))})})};z.__docgenInfo={description:"",methods:[],displayName:"Cubes",props:{gridSize:{defaultValue:{value:"10",computed:!1},required:!1},maxAngle:{defaultValue:{value:"45",computed:!1},required:!1},radius:{defaultValue:{value:"3",computed:!1},required:!1},easing:{defaultValue:{value:"'power3.out'",computed:!1},required:!1},duration:{defaultValue:{value:"{ enter: 0.3, leave: 0.6 }",computed:!1},required:!1},borderStyle:{defaultValue:{value:"'1px solid #fff'",computed:!1},required:!1},faceColor:{defaultValue:{value:"'#060010'",computed:!1},required:!1},shadow:{defaultValue:{value:"false",computed:!1},required:!1},autoAnimate:{defaultValue:{value:"true",computed:!1},required:!1},rippleOnClick:{defaultValue:{value:"true",computed:!1},required:!1},rippleColor:{defaultValue:{value:"'#fff'",computed:!1},required:!1},rippleSpeed:{defaultValue:{value:"2",computed:!1},required:!1}}};const pe={title:"ReactBits/Animations/Cubes",component:z,parameters:{layout:"fullscreen"},tags:["autodocs"]},g={};var Z,G,S;g.parameters={...g.parameters,docs:{...(Z=g.parameters)==null?void 0:Z.docs,source:{originalSource:"{}",...(S=(G=g.parameters)==null?void 0:G.docs)==null?void 0:S.source}}};const be=["Default"];export{g as Default,be as __namedExportsOrder,pe as default};
1
+ import{r as c,j as l}from"./iframe-Cw8dCV4Z.js";import{g as $}from"./index-C8pce-KX.js";import"./preload-helper-C1FmrZbK.js";const fe="_cube_lig8l_26",n={"default-animation":"_default-animation_lig8l_9","default-animation--scene":"_default-animation--scene_lig8l_16",cube:fe,"cube-face":"_cube-face_lig8l_43","cube-face--top":"_cube-face--top_lig8l_55","cube-face--bottom":"_cube-face--bottom_lig8l_59","cube-face--left":"_cube-face--left_lig8l_63","cube-face--right":"_cube-face--right_lig8l_67","cube-face--back":"_cube-face--back_lig8l_71","cube-face--front":"_cube-face--front_lig8l_72"},z=({gridSize:t=10,cubeSize:b,maxAngle:H=45,radius:k=3,easing:B="power3.out",duration:W={enter:.3,leave:.6},cellGap:s,borderStyle:ee="1px solid #fff",faceColor:M="#060010",shadow:O=!1,autoAnimate:P=!0,rippleOnClick:I=!0,rippleColor:J="#fff",rippleSpeed:w=2})=>{const u=c.useRef(null),f=c.useRef(null),i=c.useRef(null),v=c.useRef(!1),K=c.useRef({x:0,y:0}),T=c.useRef({x:0,y:0}),E=c.useRef(null),te=typeof s=="number"?`${s}px`:(s==null?void 0:s.col)!==void 0?`${s.col}px`:"5%",ae=typeof s=="number"?`${s}px`:(s==null?void 0:s.row)!==void 0?`${s.row}px`:"5%",Q=W.enter,R=W.leave,h=c.useCallback((e,a)=>{u.current&&u.current.querySelectorAll("[data-cube]").forEach(r=>{const o=+r.dataset.row,d=+r.dataset.col,m=Math.hypot(o-e,d-a);if(m<=k){const q=(1-m/k)*H;$.to(r,{duration:Q,ease:B,overwrite:!0,rotateX:-q,rotateY:q})}else $.to(r,{duration:R,ease:"power3.out",overwrite:!0,rotateX:0,rotateY:0})})},[k,H,Q,R,B]),j=c.useCallback(e=>{v.current=!0,i.current&&clearTimeout(i.current);const a=u.current.getBoundingClientRect(),r=a.width/t,o=a.height/t,d=(e.clientX-a.left)/r,m=(e.clientY-a.top)/o;f.current&&cancelAnimationFrame(f.current),f.current=requestAnimationFrame(()=>h(m,d)),i.current=setTimeout(()=>{v.current=!1},3e3)},[t,h]),x=c.useCallback(()=>{u.current&&u.current.querySelectorAll("[data-cube]").forEach(e=>$.to(e,{duration:R,rotateX:0,rotateY:0,ease:"power3.out"}))},[R]),L=c.useCallback(e=>{e.preventDefault(),v.current=!0,i.current&&clearTimeout(i.current);const a=u.current.getBoundingClientRect(),r=a.width/t,o=a.height/t,d=e.touches[0],m=(d.clientX-a.left)/r,C=(d.clientY-a.top)/o;f.current&&cancelAnimationFrame(f.current),f.current=requestAnimationFrame(()=>h(C,m)),i.current=setTimeout(()=>{v.current=!1},3e3)},[t,h]),V=c.useCallback(()=>{v.current=!0},[]),N=c.useCallback(()=>{u.current&&x()},[x]),D=c.useCallback(e=>{if(!I||!u.current)return;const a=u.current.getBoundingClientRect(),r=a.width/t,o=a.height/t,d=e.clientX||e.touches&&e.touches[0].clientX,m=e.clientY||e.touches&&e.touches[0].clientY,C=Math.floor((d-a.left)/r),q=Math.floor((m-a.top)/o),oe=.15,ne=.3,ue=.6,se=oe/w,F=ne/w,le=ue/w,y={};u.current.querySelectorAll("[data-cube]").forEach(p=>{const _=+p.dataset.row,A=+p.dataset.col,X=Math.hypot(_-q,A-C),Y=Math.round(X);y[Y]||(y[Y]=[]),y[Y].push(p)}),Object.keys(y).map(Number).sort((p,_)=>p-_).forEach(p=>{const _=p*se,A=y[p].flatMap(X=>Array.from(X.querySelectorAll("[data-cube-face]")));$.to(A,{backgroundColor:J,duration:F,delay:_,ease:"power3.out"}),$.to(A,{backgroundColor:M,duration:F,delay:_+F+le,ease:"power3.out"})})},[I,t,M,J,w]);c.useEffect(()=>{if(!P||!u.current)return;K.current={x:Math.random()*t,y:Math.random()*t},T.current={x:Math.random()*t,y:Math.random()*t};const e=.02,a=()=>{if(!v.current){const r=K.current,o=T.current;r.x+=(o.x-r.x)*e,r.y+=(o.y-r.y)*e,h(r.y,r.x),Math.hypot(r.x-o.x,r.y-o.y)<.1&&(T.current={x:Math.random()*t,y:Math.random()*t})}E.current=requestAnimationFrame(a)};return E.current=requestAnimationFrame(a),()=>{E.current!=null&&cancelAnimationFrame(E.current)}},[P,t,h]),c.useEffect(()=>{const e=u.current;if(e)return e.addEventListener("pointermove",j),e.addEventListener("pointerleave",x),e.addEventListener("click",D),e.addEventListener("touchmove",L,{passive:!1}),e.addEventListener("touchstart",V,{passive:!0}),e.addEventListener("touchend",N,{passive:!0}),()=>{e.removeEventListener("pointermove",j),e.removeEventListener("pointerleave",x),e.removeEventListener("click",D),e.removeEventListener("touchmove",L),e.removeEventListener("touchstart",V),e.removeEventListener("touchend",N),f.current!=null&&cancelAnimationFrame(f.current),i.current&&clearTimeout(i.current)}},[j,x,D,L,V,N]);const U=Array.from({length:t}),re={gridTemplateColumns:b?`repeat(${t}, ${b}px)`:`repeat(${t}, 1fr)`,gridTemplateRows:b?`repeat(${t}, ${b}px)`:`repeat(${t}, 1fr)`,columnGap:te,rowGap:ae},ce={"--cube-face-border":ee,"--cube-face-bg":M,"--cube-face-shadow":O===!0?"0 0 6px rgba(0,0,0,.5)":O||"none",...b?{width:`${t*b}px`,height:`${t*b}px`}:{}};return l.jsx("div",{className:`${n["default-animation"]}`,style:ce,children:l.jsx("div",{ref:u,className:`${n["default-animation--scene"]}`,style:re,children:U.map((e,a)=>U.map((r,o)=>l.jsxs("div",{className:`${n.cube}`,"data-cube":!0,"data-row":a,"data-col":o,children:[l.jsx("div",{className:`${n["cube-face"]} ${n["cube-face--top"]}`,"data-cube-face":!0}),l.jsx("div",{className:`${n["cube-face"]} ${n["cube-face--bottom"]}`,"data-cube-face":!0}),l.jsx("div",{className:`${n["cube-face"]} ${n["cube-face--left"]}`,"data-cube-face":!0}),l.jsx("div",{className:`${n["cube-face"]} ${n["cube-face--right"]}`,"data-cube-face":!0}),l.jsx("div",{className:`${n["cube-face"]} ${n["cube-face--front"]}`,"data-cube-face":!0}),l.jsx("div",{className:`${n["cube-face"]} ${n["cube-face--back"]}`,"data-cube-face":!0})]},`${a}-${o}`)))})})};z.__docgenInfo={description:"",methods:[],displayName:"Cubes",props:{gridSize:{defaultValue:{value:"10",computed:!1},required:!1},maxAngle:{defaultValue:{value:"45",computed:!1},required:!1},radius:{defaultValue:{value:"3",computed:!1},required:!1},easing:{defaultValue:{value:"'power3.out'",computed:!1},required:!1},duration:{defaultValue:{value:"{ enter: 0.3, leave: 0.6 }",computed:!1},required:!1},borderStyle:{defaultValue:{value:"'1px solid #fff'",computed:!1},required:!1},faceColor:{defaultValue:{value:"'#060010'",computed:!1},required:!1},shadow:{defaultValue:{value:"false",computed:!1},required:!1},autoAnimate:{defaultValue:{value:"true",computed:!1},required:!1},rippleOnClick:{defaultValue:{value:"true",computed:!1},required:!1},rippleColor:{defaultValue:{value:"'#fff'",computed:!1},required:!1},rippleSpeed:{defaultValue:{value:"2",computed:!1},required:!1}}};const pe={title:"ReactBits/Animations/Cubes",component:z,parameters:{layout:"fullscreen"}},g={};var Z,G,S;g.parameters={...g.parameters,docs:{...(Z=g.parameters)==null?void 0:Z.docs,source:{originalSource:"{}",...(S=(G=g.parameters)==null?void 0:G.docs)==null?void 0:S.source}}};const be=["Default"];export{g as Default,be as __namedExportsOrder,pe as default};
@@ -1,4 +1,4 @@
1
- import{r as t,j as u}from"./iframe-B8pH-Lvr.js";import"./preload-helper-C1FmrZbK.js";const P={"curved-loop-jacket":"_curved-loop-jacket_1xrkt_1","curved-loop-svg":"_curved-loop-svg_1xrkt_9"},C=({marqueeText:i="",speed:m=2,className:A,curveAmount:E=400,direction:T="left",interactive:f=!0})=>{const l=t.useMemo(()=>(/\s|\u00A0$/.test(i)?i.replace(/\s+$/,""):i)+" ",[i]),v=t.useRef(null),s=t.useRef(null),$=t.useRef(null),[n,k]=t.useState(0),[w,x]=t.useState(0),O=`curve-${t.useId()}`,D=`M-100,40 Q500,${40+E} 1540,40`,a=t.useRef(!1),g=t.useRef(0),j=t.useRef(T),h=t.useRef(0),b=n,F=b?Array(Math.ceil(1800/b)+2).fill(l).join(""):l,d=n>0;t.useEffect(()=>{v.current&&k(v.current.getComputedTextLength())},[l,A]),t.useEffect(()=>{if(n&&s.current){const e=-n;s.current.setAttribute("startOffset",e+"px"),x(e)}},[n]),t.useEffect(()=>{if(!n||!d)return;let e=0;const c=()=>{if(!a.current&&s.current){const _=j.current==="right"?m:-m;let r=parseFloat(s.current.getAttribute("startOffset")||"0")+_;const R=n;r<=-R&&(r+=R),r>0&&(r-=R),s.current.setAttribute("startOffset",r+"px"),x(r)}e=requestAnimationFrame(c)};return e=requestAnimationFrame(c),()=>cancelAnimationFrame(e)},[n,m,d]);const V=e=>{f&&(a.current=!0,g.current=e.clientX,h.current=0,e.target.setPointerCapture(e.pointerId))},B=e=>{if(!f||!a.current||!s.current)return;const c=e.clientX-g.current;g.current=e.clientX,h.current=c;let o=parseFloat(s.current.getAttribute("startOffset")||"0")+c;const r=n;o<=-r&&(o+=r),o>0&&(o-=r),s.current.setAttribute("startOffset",o+"px"),x(o)},y=()=>{f&&(a.current=!1,j.current=h.current>0?"right":"left")},I=f?a.current?"grabbing":"grab":"auto";return u.jsx("div",{className:`${P["curved-loop-jacket"]}`,style:{visibility:d?"visible":"hidden",cursor:I},onPointerDown:V,onPointerMove:B,onPointerUp:y,onPointerLeave:y,children:u.jsxs("svg",{className:`${P["curved-loop-svg"]}`,viewBox:"0 0 1440 120",children:[u.jsx("text",{ref:v,xmlSpace:"preserve",style:{visibility:"hidden",opacity:0,pointerEvents:"none"},children:l}),u.jsx("defs",{children:u.jsx("path",{ref:$,id:O,d:D,fill:"none",stroke:"transparent"})}),d&&u.jsx("text",{fontWeight:"bold",xmlSpace:"preserve",className:A,children:u.jsx("textPath",{ref:s,href:`#${O}`,startOffset:w+"px",xmlSpace:"preserve",children:F})})]})})};C.__docgenInfo={description:"",methods:[],displayName:"CurvedLoop",props:{marqueeText:{defaultValue:{value:"''",computed:!1},required:!1},speed:{defaultValue:{value:"2",computed:!1},required:!1},curveAmount:{defaultValue:{value:"400",computed:!1},required:!1},direction:{defaultValue:{value:"'left'",computed:!1},required:!1},interactive:{defaultValue:{value:"true",computed:!1},required:!1}}};const Q={title:"ReactBits/TextAnimations/CurvedLoop",component:C,parameters:{layout:"fullscreen"},tags:["autodocs"]},p={args:{marqueeText:"React Bits - Curved Loop Text Animation - ",speed:2,curveAmount:400,direction:"left",interactive:!0}};var L,S,q;p.parameters={...p.parameters,docs:{...(L=p.parameters)==null?void 0:L.docs,source:{originalSource:`{
1
+ import{r as t,j as u}from"./iframe-Cw8dCV4Z.js";import"./preload-helper-C1FmrZbK.js";const P={"curved-loop-jacket":"_curved-loop-jacket_1xrkt_1","curved-loop-svg":"_curved-loop-svg_1xrkt_9"},C=({marqueeText:i="",speed:m=2,className:A,curveAmount:E=400,direction:T="left",interactive:f=!0})=>{const l=t.useMemo(()=>(/\s|\u00A0$/.test(i)?i.replace(/\s+$/,""):i)+" ",[i]),v=t.useRef(null),s=t.useRef(null),$=t.useRef(null),[n,k]=t.useState(0),[w,x]=t.useState(0),O=`curve-${t.useId()}`,D=`M-100,40 Q500,${40+E} 1540,40`,c=t.useRef(!1),g=t.useRef(0),j=t.useRef(T),h=t.useRef(0),b=n,F=b?Array(Math.ceil(1800/b)+2).fill(l).join(""):l,d=n>0;t.useEffect(()=>{v.current&&k(v.current.getComputedTextLength())},[l,A]),t.useEffect(()=>{if(n&&s.current){const e=-n;s.current.setAttribute("startOffset",e+"px"),x(e)}},[n]),t.useEffect(()=>{if(!n||!d)return;let e=0;const a=()=>{if(!c.current&&s.current){const _=j.current==="right"?m:-m;let r=parseFloat(s.current.getAttribute("startOffset")||"0")+_;const R=n;r<=-R&&(r+=R),r>0&&(r-=R),s.current.setAttribute("startOffset",r+"px"),x(r)}e=requestAnimationFrame(a)};return e=requestAnimationFrame(a),()=>cancelAnimationFrame(e)},[n,m,d]);const V=e=>{f&&(c.current=!0,g.current=e.clientX,h.current=0,e.target.setPointerCapture(e.pointerId))},B=e=>{if(!f||!c.current||!s.current)return;const a=e.clientX-g.current;g.current=e.clientX,h.current=a;let o=parseFloat(s.current.getAttribute("startOffset")||"0")+a;const r=n;o<=-r&&(o+=r),o>0&&(o-=r),s.current.setAttribute("startOffset",o+"px"),x(o)},y=()=>{f&&(c.current=!1,j.current=h.current>0?"right":"left")},I=f?c.current?"grabbing":"grab":"auto";return u.jsx("div",{className:`${P["curved-loop-jacket"]}`,style:{visibility:d?"visible":"hidden",cursor:I},onPointerDown:V,onPointerMove:B,onPointerUp:y,onPointerLeave:y,children:u.jsxs("svg",{className:`${P["curved-loop-svg"]}`,viewBox:"0 0 1440 120",children:[u.jsx("text",{ref:v,xmlSpace:"preserve",style:{visibility:"hidden",opacity:0,pointerEvents:"none"},children:l}),u.jsx("defs",{children:u.jsx("path",{ref:$,id:O,d:D,fill:"none",stroke:"transparent"})}),d&&u.jsx("text",{fontWeight:"bold",xmlSpace:"preserve",className:A,children:u.jsx("textPath",{ref:s,href:`#${O}`,startOffset:w+"px",xmlSpace:"preserve",children:F})})]})})};C.__docgenInfo={description:"",methods:[],displayName:"CurvedLoop",props:{marqueeText:{defaultValue:{value:"''",computed:!1},required:!1},speed:{defaultValue:{value:"2",computed:!1},required:!1},curveAmount:{defaultValue:{value:"400",computed:!1},required:!1},direction:{defaultValue:{value:"'left'",computed:!1},required:!1},interactive:{defaultValue:{value:"true",computed:!1},required:!1}}};const Q={title:"ReactBits/TextAnimations/CurvedLoop",component:C,parameters:{layout:"fullscreen"}},p={args:{marqueeText:"React Bits - Curved Loop Text Animation - ",speed:2,curveAmount:400,direction:"left",interactive:!0}};var L,S,q;p.parameters={...p.parameters,docs:{...(L=p.parameters)==null?void 0:L.docs,source:{originalSource:`{
2
2
  args: {
3
3
  marqueeText: 'React Bits - Curved Loop Text Animation - ',
4
4
  speed: 2,
@@ -1,4 +1,4 @@
1
- import{r as q,j as V}from"./iframe-B8pH-Lvr.js";import{R as F,P as C,M as E}from"./Mesh-CwXV3WjE.js";import{T as k}from"./Triangle-64ffRKNB.js";import{V as z}from"./Vec2-Cf1C3GIc.js";import"./preload-helper-C1FmrZbK.js";const N={"darkveil-canvas":"_darkveil-canvas_1jcqg_1"},D=`
1
+ import{r as q,j as V}from"./iframe-Cw8dCV4Z.js";import{R as F,P as C,M as E}from"./Mesh-CwXV3WjE.js";import{T as k}from"./Triangle-64ffRKNB.js";import{V as z}from"./Vec2-Cf1C3GIc.js";import"./preload-helper-C1FmrZbK.js";const N={"darkveil-canvas":"_darkveil-canvas_1jcqg_1"},D=`
2
2
  attribute vec2 position;
3
3
  void main(){gl_Position=vec4(position,0.0,1.0);}
4
4
  `,H=`
@@ -66,7 +66,7 @@ void main(){
66
66
  col.rgb+=(rand(gl_FragCoord.xy+uTime)-0.5)*uNoise;
67
67
  gl_FragColor=vec4(clamp(col.rgb,0.0,1.0),1.0);
68
68
  }
69
- `;function _({hueShift:a=0,noiseIntensity:v=0,scanlineIntensity:u=0,speed:s=.5,scanlineFrequency:o=0,warpAmount:t=0,resolutionScale:i=1}){const l=q.useRef(null);return q.useEffect(()=>{const m=l.current,d=m.parentElement,n=new F({dpr:Math.min(window.devicePixelRatio,2),canvas:m}),r=n.gl,w=new k(r),e=new C(r,{vertex:D,fragment:H,uniforms:{uTime:{value:0},uResolution:{value:new z},uHueShift:{value:a},uNoise:{value:v},uScan:{value:u},uScanFreq:{value:o},uWarp:{value:t}}}),R=new E(r,{geometry:w,program:e}),f=()=>{const p=d.clientWidth,y=d.clientHeight;n.setSize(p*i,y*i),e.uniforms.uResolution.value.set(p,y)};window.addEventListener("resize",f),f();const T=performance.now();let b=0;const g=()=>{e.uniforms.uTime.value=(performance.now()-T)/1e3*s,e.uniforms.uHueShift.value=a,e.uniforms.uNoise.value=v,e.uniforms.uScan.value=u,e.uniforms.uScanFreq.value=o,e.uniforms.uWarp.value=t,n.render({scene:R}),b=requestAnimationFrame(g)};return g(),()=>{cancelAnimationFrame(b),window.removeEventListener("resize",f)}},[a,v,u,s,o,t,i]),V.jsx("canvas",{ref:l,className:`${N["darkveil-canvas"]}`})}_.__docgenInfo={description:"",methods:[],displayName:"DarkVeil",props:{hueShift:{defaultValue:{value:"0",computed:!1},required:!1},noiseIntensity:{defaultValue:{value:"0",computed:!1},required:!1},scanlineIntensity:{defaultValue:{value:"0",computed:!1},required:!1},speed:{defaultValue:{value:"0.5",computed:!1},required:!1},scanlineFrequency:{defaultValue:{value:"0",computed:!1},required:!1},warpAmount:{defaultValue:{value:"0",computed:!1},required:!1},resolutionScale:{defaultValue:{value:"1",computed:!1},required:!1}}};const A={title:"ReactBits/Backgrounds/DarkVeil",component:_,parameters:{layout:"fullscreen"},tags:["autodocs"]},c={args:{hueShift:0,noiseIntensity:0,scanlineIntensity:0,speed:.5,scanlineFrequency:0,warpAmount:0,resolutionScale:1}};var h,S,x;c.parameters={...c.parameters,docs:{...(h=c.parameters)==null?void 0:h.docs,source:{originalSource:`{
69
+ `;function _({hueShift:a=0,noiseIntensity:v=0,scanlineIntensity:u=0,speed:s=.5,scanlineFrequency:o=0,warpAmount:t=0,resolutionScale:i=1}){const l=q.useRef(null);return q.useEffect(()=>{const m=l.current,d=m.parentElement,n=new F({dpr:Math.min(window.devicePixelRatio,2),canvas:m}),r=n.gl,w=new k(r),e=new C(r,{vertex:D,fragment:H,uniforms:{uTime:{value:0},uResolution:{value:new z},uHueShift:{value:a},uNoise:{value:v},uScan:{value:u},uScanFreq:{value:o},uWarp:{value:t}}}),R=new E(r,{geometry:w,program:e}),f=()=>{const g=d.clientWidth,y=d.clientHeight;n.setSize(g*i,y*i),e.uniforms.uResolution.value.set(g,y)};window.addEventListener("resize",f),f();const T=performance.now();let b=0;const p=()=>{e.uniforms.uTime.value=(performance.now()-T)/1e3*s,e.uniforms.uHueShift.value=a,e.uniforms.uNoise.value=v,e.uniforms.uScan.value=u,e.uniforms.uScanFreq.value=o,e.uniforms.uWarp.value=t,n.render({scene:R}),b=requestAnimationFrame(p)};return p(),()=>{cancelAnimationFrame(b),window.removeEventListener("resize",f)}},[a,v,u,s,o,t,i]),V.jsx("canvas",{ref:l,className:`${N["darkveil-canvas"]}`})}_.__docgenInfo={description:"",methods:[],displayName:"DarkVeil",props:{hueShift:{defaultValue:{value:"0",computed:!1},required:!1},noiseIntensity:{defaultValue:{value:"0",computed:!1},required:!1},scanlineIntensity:{defaultValue:{value:"0",computed:!1},required:!1},speed:{defaultValue:{value:"0.5",computed:!1},required:!1},scanlineFrequency:{defaultValue:{value:"0",computed:!1},required:!1},warpAmount:{defaultValue:{value:"0",computed:!1},required:!1},resolutionScale:{defaultValue:{value:"1",computed:!1},required:!1}}};const A={title:"ReactBits/Backgrounds/DarkVeil",component:_,parameters:{layout:"fullscreen"}},c={args:{hueShift:0,noiseIntensity:0,scanlineIntensity:0,speed:.5,scanlineFrequency:0,warpAmount:0,resolutionScale:1}};var h,S,x;c.parameters={...c.parameters,docs:{...(h=c.parameters)==null?void 0:h.docs,source:{originalSource:`{
70
70
  args: {
71
71
  hueShift: 0,
72
72
  noiseIntensity: 0,
@@ -1,9 +1,9 @@
1
- import{r as k,j as o}from"./iframe-B8pH-Lvr.js";import{u as N}from"./useSound-Bk2W5gkV.js";import{c as C}from"./createLucideIcon-BNUG5osq.js";/**
1
+ import{r as v,j as o}from"./iframe-Cw8dCV4Z.js";import{u as k}from"./useSound-D23BsIr4.js";import{c as N}from"./createLucideIcon-dvowvj4F.js";/**
2
2
  * @license lucide-react v0.539.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const S=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],j=C("calendar",S),w=r=>{if(!r)return"";const a=new Date(r);if(isNaN(a.getTime()))return"";const s=a.getDate().toString().padStart(2,"0"),i=(a.getMonth()+1).toString().padStart(2,"0"),u=a.getFullYear();return`${s}/${i}/${u}`},m=r=>{if(!r)return"";const s=r.replace(/[^\d/]/g,"").split("/");if(s.length===3){const[i,u,d]=s,p=`${d.length===2?`20${d}`:d}-${u.padStart(2,"0")}-${i.padStart(2,"0")}`,l=new Date(p);if(!isNaN(l.getTime()))return p}return""},E="_dateInput_1ef9d_1",B="_label_1ef9d_6",M="_inputWrapper_1ef9d_16",Y="_textInput_1ef9d_43",$="_calendarButton_1ef9d_70",q="_hiddenDateInput_1ef9d_122",A="_error_1ef9d_133",V="_success_1ef9d_158",W="_loading_1ef9d_243",n={dateInput:E,label:B,inputWrapper:M,textInput:Y,calendarButton:$,hiddenDateInput:q,error:A,success:V,loading:W};function F({label:r,value:a,onChange:s,placeholder:i="25/12/2024",onFocus:u,onBlur:d,error:h=!1,success:p=!1,loading:l=!1,disabled:f=!1,soundConfig:g}){const c=k.useRef(null),{handlers:D,playSound:_}=N(g),y=t=>{let e=t.replace(/[^\d/]/g,"");if(e.length>=2&&e.charAt(2)!=="/"&&(e=e.substring(0,2)+"/"+e.substring(2)),e.length>=5&&e.charAt(5)!=="/"&&(e=e.substring(0,5)+"/"+e.substring(5)),e.length>10&&(e=e.substring(0,10)),e.length===10){const v=m(e);s(v||e)}else s(e)},x=()=>{if(_("click"),c.current){const t=a.includes("-")?a:m(a);t&&(c.current.value=t),c.current.showPicker?c.current.showPicker():c.current.click()}},I=t=>{const e=t.target.value;e&&s(e)},b=()=>{const t=[n.dateInput];return h&&t.push(n.error),p&&t.push(n.success),l&&t.push(n.loading),t.join(" ")};return o.jsxs("div",{className:b(),children:[o.jsx("label",{className:n.label,children:r}),o.jsxs("div",{className:n.inputWrapper,children:[o.jsx("input",{type:"text",value:a.includes("-")?w(a):a,onChange:t=>y(t.target.value),onFocus:u,onBlur:d,placeholder:i,className:n.textInput,disabled:f||l,...D}),o.jsx("button",{type:"button",onClick:x,className:n.calendarButton,title:"Select date from calendar",disabled:f||l,children:o.jsx(j,{})}),o.jsx("input",{ref:c,type:"date",onChange:I,className:n.hiddenDateInput,tabIndex:-1,disabled:f||l})]})]})}F.__docgenInfo={description:`DateInput component - European format date picker with manual input support
6
+ */const C=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],S=N("calendar",C),w=r=>{if(!r)return"";const a=new Date(r);if(isNaN(a.getTime()))return"";const s=a.getDate().toString().padStart(2,"0"),i=(a.getMonth()+1).toString().padStart(2,"0"),u=a.getFullYear();return`${s}/${i}/${u}`},m=r=>{if(!r)return"";const s=r.replace(/[^\d/]/g,"").split("/");if(s.length===3){const[i,u,d]=s,p=`${d.length===2?`20${d}`:d}-${u.padStart(2,"0")}-${i.padStart(2,"0")}`,l=new Date(p);if(!isNaN(l.getTime()))return p}return""},E="_dateInput_jmd9h_1",B="_label_jmd9h_6",M="_inputWrapper_jmd9h_16",Y="_textInput_jmd9h_43",$="_calendarButton_jmd9h_70",q="_hiddenDateInput_jmd9h_122",A="_error_jmd9h_133",V="_success_jmd9h_158",W="_loading_jmd9h_243",n={dateInput:E,label:B,inputWrapper:M,textInput:Y,calendarButton:$,hiddenDateInput:q,error:A,success:V,loading:W};function F({label:r,value:a,onChange:s,placeholder:i="25/12/2024",onFocus:u,onBlur:d,error:f=!1,success:p=!1,loading:l=!1,disabled:h=!1,soundConfig:g}){const c=v.useRef(null),{handlers:D,playSound:_}=k(g),y=t=>{let e=t.replace(/[^\d/]/g,"");if(e.length>=2&&e.charAt(2)!=="/"&&(e=e.substring(0,2)+"/"+e.substring(2)),e.length>=5&&e.charAt(5)!=="/"&&(e=e.substring(0,5)+"/"+e.substring(5)),e.length>10&&(e=e.substring(0,10)),e.length===10){const j=m(e);s(j||e)}else s(e)},x=()=>{if(_("click"),c.current){const t=a.includes("-")?a:m(a);t&&(c.current.value=t),c.current.showPicker?c.current.showPicker():c.current.click()}},I=t=>{const e=t.target.value;e&&s(e)},b=()=>{const t=[n.dateInput];return f&&t.push(n.error),p&&t.push(n.success),l&&t.push(n.loading),t.join(" ")};return o.jsxs("div",{className:b(),children:[o.jsx("label",{className:n.label,children:r}),o.jsxs("div",{className:n.inputWrapper,children:[o.jsx("input",{type:"text",value:a.includes("-")?w(a):a,onChange:t=>y(t.target.value),onFocus:u,onBlur:d,placeholder:i,className:n.textInput,disabled:h||l,...D}),o.jsx("button",{type:"button",onClick:x,className:n.calendarButton,title:"Select date from calendar",disabled:h||l,children:o.jsx(S,{})}),o.jsx("input",{ref:c,type:"date",onChange:I,className:n.hiddenDateInput,tabIndex:-1,disabled:h||l})]})]})}F.__docgenInfo={description:`DateInput component - European format date picker with manual input support
7
7
 
8
8
  @component
9
9
  @description
@@ -0,0 +1 @@
1
+ ._dateInput_jmd9h_1{margin-bottom:var(--spacing-lg);position:relative}._label_jmd9h_6{display:block;font-size:var(--font-size-sm);font-weight:var(--font-weight-semibold);color:var(--color-text);margin-bottom:var(--spacing-sm);letter-spacing:var(--letter-spacing-wide);transition:color var(--transition-base)}._inputWrapper_jmd9h_16{position:relative;display:flex;align-items:stretch;background:linear-gradient(135deg,var(--color-background),var(--color-background-secondary));border:2px solid var(--color-border);border-radius:var(--radius-lg);overflow:hidden;transition:all var(--transition-base)}._inputWrapper_jmd9h_16:hover{border-color:var(--color-border-hover);box-shadow:var(--shadow-sm);transform:translateY(-1px)}._inputWrapper_jmd9h_16:focus-within{border-color:var(--color-primary);box-shadow:0 0 0 3px #7c3aed1a;transform:translateY(-2px);background:var(--color-background)}._textInput_jmd9h_43{flex:1;padding:var(--spacing-sm) var(--spacing-md);border:none;background:transparent;font-size:var(--font-size-base);font-family:var(--font-family-mono);letter-spacing:.05em;font-weight:var(--font-weight-medium);color:var(--color-text);outline:none;min-height:44px}._textInput_jmd9h_43::placeholder{color:var(--color-text-secondary);opacity:.6;font-family:inherit}._textInput_jmd9h_43:disabled{background:var(--color-background-tertiary);color:var(--color-text-tertiary);cursor:not-allowed;opacity:.6}._calendarButton_jmd9h_70{position:relative;background:linear-gradient(135deg,var(--color-primary),var(--color-primary-hover));border:none;border-left:1px solid rgba(124,58,237,.2);color:var(--color-text-inverse);cursor:pointer;padding:0 var(--spacing-md);display:flex;align-items:center;justify-content:center;font-size:18px;transition:all var(--transition-base);outline:none;min-width:44px}._calendarButton_jmd9h_70:hover{background:linear-gradient(135deg,var(--color-primary-hover),var(--color-primary-active));filter:brightness(1.1)}._calendarButton_jmd9h_70:active{transform:scale(.95)}._calendarButton_jmd9h_70:focus-visible{box-shadow:inset 0 0 0 2px #ffffff4d}._calendarButton_jmd9h_70 svg{width:20px;height:20px;display:block}._inputWrapper_jmd9h_16:hover ._calendarButton_jmd9h_70 svg{animation:_calendarPulse_jmd9h_1 .5s ease-in-out}@keyframes _calendarPulse_jmd9h_1{0%,to{transform:scale(1) rotate(0)}50%{transform:scale(1.2) rotate(5deg)}}._hiddenDateInput_jmd9h_122{position:absolute;opacity:0;width:1px;height:1px;top:0;left:0;z-index:-1}._error_jmd9h_133 ._inputWrapper_jmd9h_16{border-color:var(--color-error);background:linear-gradient(135deg,var(--color-error-bg),var(--color-background));animation:_shake_jmd9h_1 .3s cubic-bezier(.36,.07,.19,.97) both}._error_jmd9h_133 ._label_jmd9h_6{color:var(--color-error)}._error_jmd9h_133 ._inputWrapper_jmd9h_16:focus-within{box-shadow:0 0 0 3px #f43f5e26}@keyframes _shake_jmd9h_1{10%,90%{transform:translate(-1px)}20%,80%{transform:translate(2px)}30%,50%,70%{transform:translate(-3px)}40%,60%{transform:translate(3px)}}._success_jmd9h_158 ._inputWrapper_jmd9h_16{border-color:var(--color-success)}._success_jmd9h_158 ._inputWrapper_jmd9h_16:after{content:"✓";position:absolute;right:calc(var(--spacing-md) + 44px);top:50%;transform:translateY(-50%);color:var(--color-success);font-weight:700;animation:_checkIn_jmd9h_1 .3s ease-out}@keyframes _checkIn_jmd9h_1{0%{opacity:0;transform:translateY(-50%) scale(0)}to{opacity:1;transform:translateY(-50%) scale(1)}}[data-theme=dark] ._inputWrapper_jmd9h_16{background:linear-gradient(135deg,var(--color-background-secondary),var(--color-background-tertiary));border-color:var(--color-border)}[data-theme=dark] ._inputWrapper_jmd9h_16:focus-within{background:var(--color-background-secondary);border-color:var(--color-primary-light);box-shadow:0 0 0 3px #a78bfa1a}[data-theme=dark] ._calendarButton_jmd9h_70{background:linear-gradient(135deg,var(--color-primary-light),var(--color-primary));border-left-color:#a78bfa33}[data-theme=dark] ._calendarButton_jmd9h_70:hover{background:linear-gradient(135deg,var(--color-primary),var(--color-primary-hover))}@media (max-width: 768px){._dateInput_jmd9h_1{margin-bottom:var(--spacing-md)}._label_jmd9h_6{font-size:var(--font-size-base);margin-bottom:var(--spacing-xs)}._textInput_jmd9h_43{font-size:16px;padding:var(--spacing-md);min-height:48px}._calendarButton_jmd9h_70{min-width:48px;font-size:20px}._calendarButton_jmd9h_70 svg{width:22px;height:22px}}._loading_jmd9h_243 ._inputWrapper_jmd9h_16{position:relative;overflow:hidden}._loading_jmd9h_243 ._inputWrapper_jmd9h_16:before{content:"";position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(124,58,237,.1),transparent);animation:_shimmer_jmd9h_1 2s infinite}@keyframes _shimmer_jmd9h_1{to{left:100%}}
@@ -0,0 +1,51 @@
1
+ import{r as c,j as e}from"./iframe-Cw8dCV4Z.js";import{D as n}from"./DateInput-DfGES3te.js";import"./preload-helper-C1FmrZbK.js";import"./useSound-D23BsIr4.js";import"./createLucideIcon-dvowvj4F.js";const b={title:"Atoms/DateInput",component:n,parameters:{layout:"centered",docs:{description:{component:"A date input component with European format (dd/mm/yyyy) and calendar picker support."}}},tags:["autodocs"],argTypes:{label:{control:"text"},value:{control:"text"},placeholder:{control:"text"},onChange:{action:"changed"},onFocus:{action:"focused"},onBlur:{action:"blurred"}}},a={args:{label:"Select Date",value:"",placeholder:"25/12/2024",onChange:()=>{}}},r={args:{label:"Check-in",value:"",placeholder:"dd/mm/yyyy",onChange:()=>{}},render:()=>{const[t,p]=c.useState(""),[o,h]=c.useState("");return e.jsxs("div",{style:{padding:"1.5rem",background:"var(--color-background)",border:"1px solid var(--color-border)",borderRadius:"var(--radius-md)",maxWidth:"400px"},children:[e.jsx("h3",{style:{marginTop:0,marginBottom:"1rem"},children:"Hotel Booking"}),e.jsxs("div",{style:{display:"flex",gap:"1rem",marginBottom:"1rem"},children:[e.jsx(n,{label:"Check-in",value:t,onChange:p,placeholder:"dd/mm/yyyy"}),e.jsx(n,{label:"Check-out",value:o,onChange:h,placeholder:"dd/mm/yyyy"})]}),t&&o&&e.jsxs("p",{style:{margin:0,fontSize:"0.875rem",color:"var(--color-text-secondary)"},children:["Your stay: ",new Date(t).toLocaleDateString("en-GB")," - ",new Date(o).toLocaleDateString("en-GB")]})]})},parameters:{controls:{disable:!0}}};var l,s,d;a.parameters={...a.parameters,docs:{...(l=a.parameters)==null?void 0:l.docs,source:{originalSource:`{
2
+ args: {
3
+ label: 'Select Date',
4
+ value: '',
5
+ placeholder: '25/12/2024',
6
+ onChange: () => {}
7
+ }
8
+ }`,...(d=(s=a.parameters)==null?void 0:s.docs)==null?void 0:d.source}}};var m,i,u;r.parameters={...r.parameters,docs:{...(m=r.parameters)==null?void 0:m.docs,source:{originalSource:`{
9
+ args: {
10
+ label: 'Check-in',
11
+ value: '',
12
+ placeholder: 'dd/mm/yyyy',
13
+ onChange: () => {}
14
+ },
15
+ render: () => {
16
+ const [checkIn, setCheckIn] = useState('');
17
+ const [checkOut, setCheckOut] = useState('');
18
+ return <div style={{
19
+ padding: '1.5rem',
20
+ background: 'var(--color-background)',
21
+ border: '1px solid var(--color-border)',
22
+ borderRadius: 'var(--radius-md)',
23
+ maxWidth: '400px'
24
+ }}>
25
+ <h3 style={{
26
+ marginTop: 0,
27
+ marginBottom: '1rem'
28
+ }}>Hotel Booking</h3>
29
+ <div style={{
30
+ display: 'flex',
31
+ gap: '1rem',
32
+ marginBottom: '1rem'
33
+ }}>
34
+ <DateInput label="Check-in" value={checkIn} onChange={setCheckIn} placeholder="dd/mm/yyyy" />
35
+ <DateInput label="Check-out" value={checkOut} onChange={setCheckOut} placeholder="dd/mm/yyyy" />
36
+ </div>
37
+ {checkIn && checkOut && <p style={{
38
+ margin: 0,
39
+ fontSize: '0.875rem',
40
+ color: 'var(--color-text-secondary)'
41
+ }}>
42
+ Your stay: {new Date(checkIn).toLocaleDateString('en-GB')} - {new Date(checkOut).toLocaleDateString('en-GB')}
43
+ </p>}
44
+ </div>;
45
+ },
46
+ parameters: {
47
+ controls: {
48
+ disable: true
49
+ }
50
+ }
51
+ }`,...(u=(i=r.parameters)==null?void 0:i.docs)==null?void 0:u.source}}};const C=["Default","DateRangePicker"];export{r as DateRangePicker,a as Default,C as __namedExportsOrder,b as default};
@@ -1,4 +1,4 @@
1
- import{r as c,j as a}from"./iframe-B8pH-Lvr.js";import{g as v}from"./index-C8pce-KX.js";import"./preload-helper-C1FmrZbK.js";const D="_content_deiue_1",W="_svg_deiue_5",f={content:D,svg:W,"card-text":"_card-text_deiue_13"},j=({width:M=300,height:S=400,image:z="https://picsum.photos/300/400?grayscale",children:C})=>{const h=c.useRef(null),p=c.useRef(null),n=c.useRef({x:window.innerWidth/2,y:window.innerHeight/2}),g=c.useRef({...n.current}),l=c.useRef({width:window.innerWidth,height:window.innerHeight});return c.useEffect(()=>{const d=(t,r,i)=>(1-i)*t+i*r,u=(t,r,i,e,o)=>(t-r)*(o-e)/(i-r)+e,E=(t,r,i,e)=>{const o=t-r,b=i-e;return Math.hypot(o,b)},x=()=>{l.current={width:window.innerWidth,height:window.innerHeight}},w=t=>{n.current={x:t.clientX,y:t.clientY}};window.addEventListener("resize",x),window.addEventListener("mousemove",w);const s={imgTransforms:{x:0,y:0,rz:0},displacementScale:0},y=()=>{let t=d(s.imgTransforms.x,u(n.current.x,0,l.current.width,-120,120),.1),r=d(s.imgTransforms.y,u(n.current.y,0,l.current.height,-120,120),.1),i=d(s.imgTransforms.rz,u(n.current.x,0,l.current.width,-10,10),.1);const e=50;t>e&&(t=e+(t-e)*.2),t<-e&&(t=-e+(t+e)*.2),r>e&&(r=e+(r-e)*.2),r<-e&&(r=-e+(r+e)*.2),s.imgTransforms.x=t,s.imgTransforms.y=r,s.imgTransforms.rz=i,h.current&&v.set(h.current,{x:s.imgTransforms.x,y:s.imgTransforms.y,rotateZ:s.imgTransforms.rz});const o=E(g.current.x,n.current.x,g.current.y,n.current.y);s.displacementScale=d(s.displacementScale,u(o,0,200,0,400),.06),p.current&&v.set(p.current,{attr:{scale:s.displacementScale}}),g.current={...n.current},requestAnimationFrame(y)};return y(),()=>{window.removeEventListener("resize",x),window.removeEventListener("mousemove",w)}},[]),a.jsxs("div",{className:`${f.content}`,style:{width:`${M}px`,height:`${S}px`},ref:h,children:[a.jsxs("svg",{viewBox:"-60 -75 720 900",preserveAspectRatio:"xMidYMid slice",className:`${f.svg}`,children:[a.jsxs("filter",{id:"imgFilter",children:[a.jsx("feTurbulence",{type:"turbulence",baseFrequency:"0.015",numOctaves:"5",seed:"4",stitchTiles:"stitch",x:"0%",y:"0%",width:"100%",height:"100%",result:"turbulence1"}),a.jsx("feDisplacementMap",{ref:p,in:"SourceGraphic",in2:"turbulence1",scale:"0",xChannelSelector:"R",yChannelSelector:"B",x:"0%",y:"0%",width:"100%",height:"100%",result:"displacementMap3"})]}),a.jsx("g",{children:a.jsx("image",{href:z,x:"0",y:"0",width:"600",height:"750",filter:"url(#imgFilter)",preserveAspectRatio:"xMidYMid slice"})})]}),a.jsx("div",{className:`${f["card-text"]}`,children:C})]})};j.__docgenInfo={description:"",methods:[],displayName:"DecayCard",props:{width:{defaultValue:{value:"300",computed:!1},required:!1},height:{defaultValue:{value:"400",computed:!1},required:!1},image:{defaultValue:{value:"'https://picsum.photos/300/400?grayscale'",computed:!1},required:!1}}};const F={title:"ReactBits/Components/DecayCard",component:j,parameters:{layout:"fullscreen"},tags:["autodocs"]},m={args:{width:300,height:400,image:"https://picsum.photos/300/400?grayscale",children:"Hello World"}};var R,T,_;m.parameters={...m.parameters,docs:{...(R=m.parameters)==null?void 0:R.docs,source:{originalSource:`{
1
+ import{r as c,j as a}from"./iframe-Cw8dCV4Z.js";import{g as v}from"./index-C8pce-KX.js";import"./preload-helper-C1FmrZbK.js";const D="_content_deiue_1",W="_svg_deiue_5",f={content:D,svg:W,"card-text":"_card-text_deiue_13"},j=({width:M=300,height:S=400,image:z="https://picsum.photos/300/400?grayscale",children:C})=>{const h=c.useRef(null),p=c.useRef(null),n=c.useRef({x:window.innerWidth/2,y:window.innerHeight/2}),g=c.useRef({...n.current}),l=c.useRef({width:window.innerWidth,height:window.innerHeight});return c.useEffect(()=>{const d=(t,r,i)=>(1-i)*t+i*r,u=(t,r,i,e,o)=>(t-r)*(o-e)/(i-r)+e,E=(t,r,i,e)=>{const o=t-r,b=i-e;return Math.hypot(o,b)},x=()=>{l.current={width:window.innerWidth,height:window.innerHeight}},w=t=>{n.current={x:t.clientX,y:t.clientY}};window.addEventListener("resize",x),window.addEventListener("mousemove",w);const s={imgTransforms:{x:0,y:0,rz:0},displacementScale:0},y=()=>{let t=d(s.imgTransforms.x,u(n.current.x,0,l.current.width,-120,120),.1),r=d(s.imgTransforms.y,u(n.current.y,0,l.current.height,-120,120),.1),i=d(s.imgTransforms.rz,u(n.current.x,0,l.current.width,-10,10),.1);const e=50;t>e&&(t=e+(t-e)*.2),t<-e&&(t=-e+(t+e)*.2),r>e&&(r=e+(r-e)*.2),r<-e&&(r=-e+(r+e)*.2),s.imgTransforms.x=t,s.imgTransforms.y=r,s.imgTransforms.rz=i,h.current&&v.set(h.current,{x:s.imgTransforms.x,y:s.imgTransforms.y,rotateZ:s.imgTransforms.rz});const o=E(g.current.x,n.current.x,g.current.y,n.current.y);s.displacementScale=d(s.displacementScale,u(o,0,200,0,400),.06),p.current&&v.set(p.current,{attr:{scale:s.displacementScale}}),g.current={...n.current},requestAnimationFrame(y)};return y(),()=>{window.removeEventListener("resize",x),window.removeEventListener("mousemove",w)}},[]),a.jsxs("div",{className:`${f.content}`,style:{width:`${M}px`,height:`${S}px`},ref:h,children:[a.jsxs("svg",{viewBox:"-60 -75 720 900",preserveAspectRatio:"xMidYMid slice",className:`${f.svg}`,children:[a.jsxs("filter",{id:"imgFilter",children:[a.jsx("feTurbulence",{type:"turbulence",baseFrequency:"0.015",numOctaves:"5",seed:"4",stitchTiles:"stitch",x:"0%",y:"0%",width:"100%",height:"100%",result:"turbulence1"}),a.jsx("feDisplacementMap",{ref:p,in:"SourceGraphic",in2:"turbulence1",scale:"0",xChannelSelector:"R",yChannelSelector:"B",x:"0%",y:"0%",width:"100%",height:"100%",result:"displacementMap3"})]}),a.jsx("g",{children:a.jsx("image",{href:z,x:"0",y:"0",width:"600",height:"750",filter:"url(#imgFilter)",preserveAspectRatio:"xMidYMid slice"})})]}),a.jsx("div",{className:`${f["card-text"]}`,children:C})]})};j.__docgenInfo={description:"",methods:[],displayName:"DecayCard",props:{width:{defaultValue:{value:"300",computed:!1},required:!1},height:{defaultValue:{value:"400",computed:!1},required:!1},image:{defaultValue:{value:"'https://picsum.photos/300/400?grayscale'",computed:!1},required:!1}}};const F={title:"ReactBits/Components/DecayCard",component:j,parameters:{layout:"fullscreen"}},m={args:{width:300,height:400,image:"https://picsum.photos/300/400?grayscale",children:"Hello World"}};var R,T,_;m.parameters={...m.parameters,docs:{...(R=m.parameters)==null?void 0:R.docs,source:{originalSource:`{
2
2
  args: {
3
3
  width: 300,
4
4
  height: 400,
@@ -1,4 +1,4 @@
1
- import{r as n,j as N}from"./iframe-B8pH-Lvr.js";import{m as te}from"./proxy-BA3VZtN5.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-D5hZdVGx.js";const P={wrapper:{display:"inline-block",whiteSpace:"pre-wrap"},srOnly:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",border:0}};function G({text:t,speed:j=50,maxIterations:I=10,sequential:w=!1,revealDirection:y="start",useOriginalCharsOnly:z=!1,characters:T="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*()_+",className:J="",parentClassName:K="",encryptedClassName:Q="",animateOn:i="hover",clickMode:x="once",...U}){const[R,c]=n.useState(t),[v,f]=n.useState(!1),[X,d]=n.useState(new Set),[H,Y]=n.useState(!1),[A,p]=n.useState(i!=="click"),[C,h]=n.useState("forward"),_=n.useRef(null),b=n.useRef([]),k=n.useRef(0),E=n.useMemo(()=>z?Array.from(new Set(t.split(""))).filter(r=>r!==" "):T.split(""),[z,t,T]),u=n.useCallback((r,a)=>r.split("").map((l,e)=>l===" "?" ":a.has(e)?r[e]:E[Math.floor(Math.random()*E.length)]).join(""),[E]),S=n.useCallback(r=>{const a=[];if(r<=0)return a;if(y==="start"){for(let s=0;s<r;s++)a.push(s);return a}if(y==="end"){for(let s=r-1;s>=0;s--)a.push(s);return a}const l=Math.floor(r/2);let e=0;for(;a.length<r;){if(e%2===0){const s=l+e/2;s>=0&&s<r&&a.push(s)}else{const s=l-Math.ceil(e/2);s>=0&&s<r&&a.push(s)}e++}return a.slice(0,r)},[y]),m=n.useCallback(()=>{const r=new Set;for(let a=0;a<t.length;a++)r.add(a);return r},[t]),O=n.useCallback((r,a)=>{const l=Array.from(r);for(let e=0;e<a&&l.length>0;e++){const s=Math.floor(Math.random()*l.length);l.splice(s,1)}return new Set(l)},[]),L=n.useCallback(()=>{const r=new Set;d(r),c(u(t,r)),p(!1)},[t,u]),M=n.useCallback(()=>{w?(b.current=S(t.length),k.current=0,d(new Set)):d(new Set),h("forward"),f(!0)},[w,S,t.length]),Z=n.useCallback(()=>{w?(b.current=S(t.length).slice().reverse(),k.current=0,d(m()),c(u(t,m()))):(d(m()),c(u(t,m()))),h("reverse"),f(!0)},[w,S,m,u,t]);n.useEffect(()=>{if(!v)return;let r,a=0;const l=e=>{const s=t.length;switch(y){case"start":return e.size;case"end":return s-1-e.size;case"center":{const o=Math.floor(s/2),g=Math.floor(e.size/2),V=e.size%2===0?o+g:o-g-1;if(V>=0&&V<s&&!e.has(V))return V;for(let D=0;D<s;D++)if(!e.has(D))return D;return 0}default:return e.size}};return r=setInterval(()=>{d(e=>{if(w){if(C==="forward")if(e.size<t.length){const s=l(e),o=new Set(e);return o.add(s),c(u(t,o)),o}else return clearInterval(r),f(!1),p(!0),e;if(C==="reverse")if(k.current<b.current.length){const s=b.current[k.current++],o=new Set(e);return o.delete(s),c(u(t,o)),o.size===0&&(clearInterval(r),f(!1),p(!1)),o}else return clearInterval(r),f(!1),p(!1),e}else{if(C==="forward")return c(u(t,e)),a++,a>=I&&(clearInterval(r),f(!1),c(t),p(!0)),e;if(C==="reverse"){let s=e;s.size===0&&(s=m());const o=Math.max(1,Math.ceil(t.length/Math.max(1,I))),g=O(s,o);return c(u(t,g)),a++,g.size===0||a>=I?(clearInterval(r),f(!1),p(!1),c(u(t,new Set)),new Set):g}}return e})},j),()=>clearInterval(r)},[v,t,j,I,w,y,u,C,m,O,T,z]);const $=()=>{if(i==="click"){if(x==="once"){if(A)return;h("forward"),M()}x==="toggle"&&(A?Z():(h("forward"),M()))}},ee=n.useCallback(()=>{v||(d(new Set),p(!1),c(t),h("forward"),f(!0))},[v,t]),re=n.useCallback(()=>{f(!1),d(new Set),c(t),p(!0),h("forward")},[t]);n.useEffect(()=>{if(i!=="view"&&i!=="inViewHover")return;const r=s=>{s.forEach(o=>{o.isIntersecting&&!H&&(M(),Y(!0))})},a={root:null,rootMargin:"0px",threshold:.1},l=new IntersectionObserver(r,a),e=_.current;return e&&l.observe(e),()=>{e&&l.unobserve(e)}},[i,H,M]),n.useEffect(()=>{i==="click"?L():(c(t),p(!0)),d(new Set),h("forward")},[i,t,L]);const se=i==="hover"||i==="inViewHover"?{onMouseEnter:ee,onMouseLeave:re}:i==="click"?{onClick:$}:{};return N.jsxs(te.span,{className:K,ref:_,style:P.wrapper,...se,...U,children:[N.jsx("span",{style:P.srOnly,children:R}),N.jsx("span",{"aria-hidden":"true",children:R.split("").map((r,a)=>{const l=X.has(a)||!v&&A;return N.jsx("span",{className:l?J:Q,children:r},a)})})]})}G.__docgenInfo={description:"",methods:[],displayName:"DecryptedText",props:{speed:{defaultValue:{value:"50",computed:!1},required:!1},maxIterations:{defaultValue:{value:"10",computed:!1},required:!1},sequential:{defaultValue:{value:"false",computed:!1},required:!1},revealDirection:{defaultValue:{value:"'start'",computed:!1},required:!1},useOriginalCharsOnly:{defaultValue:{value:"false",computed:!1},required:!1},characters:{defaultValue:{value:"'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*()_+'",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},parentClassName:{defaultValue:{value:"''",computed:!1},required:!1},encryptedClassName:{defaultValue:{value:"''",computed:!1},required:!1},animateOn:{defaultValue:{value:"'hover'",computed:!1},required:!1},clickMode:{defaultValue:{value:"'once'",computed:!1},required:!1}}};const ce={title:"ReactBits/TextAnimations/DecryptedText",component:G,parameters:{layout:"fullscreen"},tags:["autodocs"]},q={args:{text:"Hello World",speed:50,maxIterations:10,sequential:!1,revealDirection:"start",useOriginalCharsOnly:!1,characters:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*()_+",parentClassName:"",encryptedClassName:"",animateOn:"hover",clickMode:"once"}};var W,B,F;q.parameters={...q.parameters,docs:{...(W=q.parameters)==null?void 0:W.docs,source:{originalSource:`{
1
+ import{r as n,j as N}from"./iframe-Cw8dCV4Z.js";import{m as te}from"./proxy-p8L3T_Zy.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-BCa1jVYq.js";const P={wrapper:{display:"inline-block",whiteSpace:"pre-wrap"},srOnly:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)",border:0}};function G({text:t,speed:j=50,maxIterations:I=10,sequential:w=!1,revealDirection:y="start",useOriginalCharsOnly:z=!1,characters:T="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*()_+",className:J="",parentClassName:K="",encryptedClassName:Q="",animateOn:i="hover",clickMode:x="once",...U}){const[R,c]=n.useState(t),[v,f]=n.useState(!1),[X,d]=n.useState(new Set),[H,Y]=n.useState(!1),[A,p]=n.useState(i!=="click"),[C,h]=n.useState("forward"),_=n.useRef(null),b=n.useRef([]),k=n.useRef(0),E=n.useMemo(()=>z?Array.from(new Set(t.split(""))).filter(r=>r!==" "):T.split(""),[z,t,T]),u=n.useCallback((r,a)=>r.split("").map((l,e)=>l===" "?" ":a.has(e)?r[e]:E[Math.floor(Math.random()*E.length)]).join(""),[E]),S=n.useCallback(r=>{const a=[];if(r<=0)return a;if(y==="start"){for(let s=0;s<r;s++)a.push(s);return a}if(y==="end"){for(let s=r-1;s>=0;s--)a.push(s);return a}const l=Math.floor(r/2);let e=0;for(;a.length<r;){if(e%2===0){const s=l+e/2;s>=0&&s<r&&a.push(s)}else{const s=l-Math.ceil(e/2);s>=0&&s<r&&a.push(s)}e++}return a.slice(0,r)},[y]),m=n.useCallback(()=>{const r=new Set;for(let a=0;a<t.length;a++)r.add(a);return r},[t]),O=n.useCallback((r,a)=>{const l=Array.from(r);for(let e=0;e<a&&l.length>0;e++){const s=Math.floor(Math.random()*l.length);l.splice(s,1)}return new Set(l)},[]),L=n.useCallback(()=>{const r=new Set;d(r),c(u(t,r)),p(!1)},[t,u]),M=n.useCallback(()=>{w?(b.current=S(t.length),k.current=0,d(new Set)):d(new Set),h("forward"),f(!0)},[w,S,t.length]),Z=n.useCallback(()=>{w?(b.current=S(t.length).slice().reverse(),k.current=0,d(m()),c(u(t,m()))):(d(m()),c(u(t,m()))),h("reverse"),f(!0)},[w,S,m,u,t]);n.useEffect(()=>{if(!v)return;let r,a=0;const l=e=>{const s=t.length;switch(y){case"start":return e.size;case"end":return s-1-e.size;case"center":{const o=Math.floor(s/2),g=Math.floor(e.size/2),V=e.size%2===0?o+g:o-g-1;if(V>=0&&V<s&&!e.has(V))return V;for(let D=0;D<s;D++)if(!e.has(D))return D;return 0}default:return e.size}};return r=setInterval(()=>{d(e=>{if(w){if(C==="forward")if(e.size<t.length){const s=l(e),o=new Set(e);return o.add(s),c(u(t,o)),o}else return clearInterval(r),f(!1),p(!0),e;if(C==="reverse")if(k.current<b.current.length){const s=b.current[k.current++],o=new Set(e);return o.delete(s),c(u(t,o)),o.size===0&&(clearInterval(r),f(!1),p(!1)),o}else return clearInterval(r),f(!1),p(!1),e}else{if(C==="forward")return c(u(t,e)),a++,a>=I&&(clearInterval(r),f(!1),c(t),p(!0)),e;if(C==="reverse"){let s=e;s.size===0&&(s=m());const o=Math.max(1,Math.ceil(t.length/Math.max(1,I))),g=O(s,o);return c(u(t,g)),a++,g.size===0||a>=I?(clearInterval(r),f(!1),p(!1),c(u(t,new Set)),new Set):g}}return e})},j),()=>clearInterval(r)},[v,t,j,I,w,y,u,C,m,O,T,z]);const $=()=>{if(i==="click"){if(x==="once"){if(A)return;h("forward"),M()}x==="toggle"&&(A?Z():(h("forward"),M()))}},ee=n.useCallback(()=>{v||(d(new Set),p(!1),c(t),h("forward"),f(!0))},[v,t]),re=n.useCallback(()=>{f(!1),d(new Set),c(t),p(!0),h("forward")},[t]);n.useEffect(()=>{if(i!=="view"&&i!=="inViewHover")return;const r=s=>{s.forEach(o=>{o.isIntersecting&&!H&&(M(),Y(!0))})},a={root:null,rootMargin:"0px",threshold:.1},l=new IntersectionObserver(r,a),e=_.current;return e&&l.observe(e),()=>{e&&l.unobserve(e)}},[i,H,M]),n.useEffect(()=>{i==="click"?L():(c(t),p(!0)),d(new Set),h("forward")},[i,t,L]);const se=i==="hover"||i==="inViewHover"?{onMouseEnter:ee,onMouseLeave:re}:i==="click"?{onClick:$}:{};return N.jsxs(te.span,{className:K,ref:_,style:P.wrapper,...se,...U,children:[N.jsx("span",{style:P.srOnly,children:R}),N.jsx("span",{"aria-hidden":"true",children:R.split("").map((r,a)=>{const l=X.has(a)||!v&&A;return N.jsx("span",{className:l?J:Q,children:r},a)})})]})}G.__docgenInfo={description:"",methods:[],displayName:"DecryptedText",props:{speed:{defaultValue:{value:"50",computed:!1},required:!1},maxIterations:{defaultValue:{value:"10",computed:!1},required:!1},sequential:{defaultValue:{value:"false",computed:!1},required:!1},revealDirection:{defaultValue:{value:"'start'",computed:!1},required:!1},useOriginalCharsOnly:{defaultValue:{value:"false",computed:!1},required:!1},characters:{defaultValue:{value:"'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*()_+'",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},parentClassName:{defaultValue:{value:"''",computed:!1},required:!1},encryptedClassName:{defaultValue:{value:"''",computed:!1},required:!1},animateOn:{defaultValue:{value:"'hover'",computed:!1},required:!1},clickMode:{defaultValue:{value:"'once'",computed:!1},required:!1}}};const ce={title:"ReactBits/TextAnimations/DecryptedText",component:G,parameters:{layout:"fullscreen"}},q={args:{text:"Hello World",speed:50,maxIterations:10,sequential:!1,revealDirection:"start",useOriginalCharsOnly:!1,characters:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*()_+",parentClassName:"",encryptedClassName:"",animateOn:"hover",clickMode:"once"}};var W,B,F;q.parameters={...q.parameters,docs:{...(W=q.parameters)==null?void 0:W.docs,source:{originalSource:`{
2
2
  args: {
3
3
  text: 'Hello World',
4
4
  speed: 50,
@@ -1,4 +1,4 @@
1
- import{R as D,r as i,j as n}from"./iframe-B8pH-Lvr.js";import{u as I,a as $,e as K,C as Q}from"./react-three-fiber.esm-DI-wNJmP.js";import{H as Z,N as ee,d as V,G as p,n as oe}from"./three.module--_vTUKhS.js";import{E as te,R as ae,N as re,D as ne,a as F,b as se,c as L,P as ie}from"./index-DcRHiSf7.js";import"./preload-helper-C1FmrZbK.js";let _;function le(){var a;if(_!==void 0)return _;try{let o;const v=document.createElement("canvas");return _=!!(window.WebGL2RenderingContext&&(o=v.getContext("webgl2"))),o&&((a=o.getExtension("WEBGL_lose_context"))==null||a.loseContext()),_}catch{return _=!1}}const ue=i.createContext(null),T=a=>(a.getAttributes()&L.CONVOLUTION)===L.CONVOLUTION,ce=D.memo(i.forwardRef(({children:a,camera:o,scene:v,resolutionScale:r,enabled:y=!0,renderPriority:x=1,autoClear:P=!0,depthBuffer:u,enableNormalPass:w,stencilBuffer:C,multisampling:l=8,frameBufferType:g=Z},z)=>{const{gl:s,scene:E,camera:j,size:N}=I(),c=v||E,e=o||j,[t,f,S]=i.useMemo(()=>{const b=le(),d=new te(s,{depthBuffer:u,stencilBuffer:C,multisampling:l>0&&b?l:0,frameBufferType:g});d.addPass(new ae(c,e));let h=null,m=null;return w&&(m=new re(c,e),m.enabled=!1,d.addPass(m),r!==void 0&&b&&(h=new ne({normalBuffer:m.texture,resolutionScale:r}),h.enabled=!1,d.addPass(h))),[d,m,h]},[e,s,u,C,l,g,c,w,r]);i.useEffect(()=>t==null?void 0:t.setSize(N.width,N.height),[t,N]),$((b,d)=>{if(y){const h=s.autoClear;s.autoClear=P,C&&!P&&s.clearStencil(),t.render(d),s.autoClear=h}},y?x:0);const O=i.useRef(null);i.useLayoutEffect(()=>{var b;const d=[],h=(b=O.current)==null?void 0:b.__r3f;if(h&&t){const m=h.objects;for(let R=0;R<m.length;R++){const M=m[R];if(M instanceof F){const G=[M];if(!T(M)){let A=null;for(;(A=m[R+1])instanceof F&&!T(A);)G.push(A),R++}const Y=new se(e,...G);d.push(Y)}else M instanceof ie&&d.push(M)}for(const R of d)t==null||t.addPass(R);f&&(f.enabled=!0),S&&(S.enabled=!0)}return()=>{for(const m of d)t==null||t.removePass(m);f&&(f.enabled=!1),S&&(S.enabled=!1)}},[t,a,e,f,S]),i.useEffect(()=>{const b=s.toneMapping;return s.toneMapping=ee,()=>{s.toneMapping=b}},[s]);const X=i.useMemo(()=>({composer:t,normalPass:f,downSamplingPass:S,resolutionScale:r,camera:e,scene:c}),[t,f,S,r,e,c]);return i.useImperativeHandle(z,()=>t,[t]),n.jsx(ue.Provider,{value:X,children:n.jsx("group",{ref:O,children:a})})}));let fe=0;const U=new WeakMap,ve=(a,o)=>D.forwardRef(function({blendFunction:r=void 0,opacity:y=void 0,...x},P){let u=U.get(a);if(!u){const l=`@react-three/postprocessing/${a.name}-${fe++}`;K({[l]:a}),U.set(a,u=l)}const w=I(l=>l.camera),C=D.useMemo(()=>{var l,g;return[...(l=void 0)!=null?l:[],...(g=x.args)!=null?g:[{...o,...x}]]},[JSON.stringify(x)]);return n.jsx(u,{camera:w,"blendMode-blendFunction":r,"blendMode-opacity-value":y,...x,ref:P,args:C})}),de={"dither-container":"_dither-container_8gdcp_1"},me=`
1
+ import{R as D,r as i,j as n}from"./iframe-Cw8dCV4Z.js";import{u as I,a as $,e as K,C as Q}from"./react-three-fiber.esm-BnMrba87.js";import{H as Z,N as ee,d as V,G as p,n as oe}from"./three.module--_vTUKhS.js";import{E as te,R as ae,N as re,D as ne,a as F,b as se,c as L,P as ie}from"./index-DcRHiSf7.js";import"./preload-helper-C1FmrZbK.js";let _;function le(){var a;if(_!==void 0)return _;try{let o;const v=document.createElement("canvas");return _=!!(window.WebGL2RenderingContext&&(o=v.getContext("webgl2"))),o&&((a=o.getExtension("WEBGL_lose_context"))==null||a.loseContext()),_}catch{return _=!1}}const ue=i.createContext(null),T=a=>(a.getAttributes()&L.CONVOLUTION)===L.CONVOLUTION,ce=D.memo(i.forwardRef(({children:a,camera:o,scene:v,resolutionScale:r,enabled:y=!0,renderPriority:x=1,autoClear:P=!0,depthBuffer:u,enableNormalPass:w,stencilBuffer:C,multisampling:l=8,frameBufferType:g=Z},z)=>{const{gl:s,scene:E,camera:j,size:N}=I(),c=v||E,e=o||j,[t,f,S]=i.useMemo(()=>{const b=le(),d=new te(s,{depthBuffer:u,stencilBuffer:C,multisampling:l>0&&b?l:0,frameBufferType:g});d.addPass(new ae(c,e));let h=null,m=null;return w&&(m=new re(c,e),m.enabled=!1,d.addPass(m),r!==void 0&&b&&(h=new ne({normalBuffer:m.texture,resolutionScale:r}),h.enabled=!1,d.addPass(h))),[d,m,h]},[e,s,u,C,l,g,c,w,r]);i.useEffect(()=>t==null?void 0:t.setSize(N.width,N.height),[t,N]),$((b,d)=>{if(y){const h=s.autoClear;s.autoClear=P,C&&!P&&s.clearStencil(),t.render(d),s.autoClear=h}},y?x:0);const O=i.useRef(null);i.useLayoutEffect(()=>{var b;const d=[],h=(b=O.current)==null?void 0:b.__r3f;if(h&&t){const m=h.objects;for(let R=0;R<m.length;R++){const M=m[R];if(M instanceof F){const G=[M];if(!T(M)){let A=null;for(;(A=m[R+1])instanceof F&&!T(A);)G.push(A),R++}const Y=new se(e,...G);d.push(Y)}else M instanceof ie&&d.push(M)}for(const R of d)t==null||t.addPass(R);f&&(f.enabled=!0),S&&(S.enabled=!0)}return()=>{for(const m of d)t==null||t.removePass(m);f&&(f.enabled=!1),S&&(S.enabled=!1)}},[t,a,e,f,S]),i.useEffect(()=>{const b=s.toneMapping;return s.toneMapping=ee,()=>{s.toneMapping=b}},[s]);const X=i.useMemo(()=>({composer:t,normalPass:f,downSamplingPass:S,resolutionScale:r,camera:e,scene:c}),[t,f,S,r,e,c]);return i.useImperativeHandle(z,()=>t,[t]),n.jsx(ue.Provider,{value:X,children:n.jsx("group",{ref:O,children:a})})}));let fe=0;const U=new WeakMap,ve=(a,o)=>D.forwardRef(function({blendFunction:r=void 0,opacity:y=void 0,...x},P){let u=U.get(a);if(!u){const l=`@react-three/postprocessing/${a.name}-${fe++}`;K({[l]:a}),U.set(a,u=l)}const w=I(l=>l.camera),C=D.useMemo(()=>{var l,g;return[...(l=void 0)!=null?l:[],...(g=x.args)!=null?g:[{...o,...x}]]},[JSON.stringify(x)]);return n.jsx(u,{camera:w,"blendMode-blendFunction":r,"blendMode-opacity-value":y,...x,ref:P,args:C})}),de={"dither-container":"_dither-container_8gdcp_1"},me=`
2
2
  precision highp float;
3
3
  varying vec2 vUv;
4
4
  void main() {
@@ -119,7 +119,7 @@ void mainImage(in vec4 inputColor, in vec2 uv, out vec4 outputColor) {
119
119
  color.rgb = dither(uv, color.rgb);
120
120
  outputColor = color;
121
121
  }
122
- `;class ge extends F{constructor(){const o=new Map([["colorNum",new p(4)],["pixelSize",new p(2)]]);super("RetroEffect",xe,{uniforms:o}),this.uniforms=o}set colorNum(o){this.uniforms.get("colorNum").value=o}get colorNum(){return this.uniforms.get("colorNum").value}set pixelSize(o){this.uniforms.get("pixelSize").value=o}get pixelSize(){return this.uniforms.get("pixelSize").value}}const we=ve(ge),H=i.forwardRef((a,o)=>{const{colorNum:v,pixelSize:r}=a;return n.jsx(we,{ref:o,colorNum:v,pixelSize:r})});H.displayName="RetroEffect";function he({waveSpeed:a,waveFrequency:o,waveAmplitude:v,waveColor:r,colorNum:y,pixelSize:x,disableAnimation:P,enableMouseInteraction:u,mouseRadius:w}){const C=i.useRef(null),l=i.useRef(new V),{viewport:g,size:z,gl:s}=I(),E=i.useRef({time:new p(0),resolution:new p(new V(0,0)),waveSpeed:new p(a),waveFrequency:new p(o),waveAmplitude:new p(v),waveColor:new p(new oe(...r)),mousePos:new p(new V(0,0)),enableMouseInteraction:new p(u?1:0),mouseRadius:new p(w)});i.useEffect(()=>{const c=s.getPixelRatio(),e=Math.floor(z.width*c),t=Math.floor(z.height*c),f=E.current.resolution.value;(f.x!==e||f.y!==t)&&f.set(e,t)},[z,s]);const j=i.useRef([...r]);$(({clock:c})=>{const e=E.current;P||(e.time.value=c.getElapsedTime()),e.waveSpeed.value!==a&&(e.waveSpeed.value=a),e.waveFrequency.value!==o&&(e.waveFrequency.value=o),e.waveAmplitude.value!==v&&(e.waveAmplitude.value=v),j.current.every((t,f)=>t===r[f])||(e.waveColor.value.set(...r),j.current=[...r]),e.enableMouseInteraction.value=u?1:0,e.mouseRadius.value=w,u&&e.mousePos.value.copy(l.current)});const N=c=>{if(!u)return;const e=s.domElement.getBoundingClientRect(),t=s.getPixelRatio();l.current.set((c.clientX-e.left)*t,(c.clientY-e.top)*t)};return n.jsxs(n.Fragment,{children:[n.jsxs("mesh",{ref:C,scale:[g.width,g.height,1],children:[n.jsx("planeGeometry",{args:[1,1]}),n.jsx("shaderMaterial",{vertexShader:me,fragmentShader:pe,uniforms:E.current})]}),n.jsx(ce,{children:n.jsx(H,{colorNum:y,pixelSize:x})}),n.jsxs("mesh",{onPointerMove:N,position:[0,0,.01],scale:[g.width,g.height,1],visible:!1,children:[n.jsx("planeGeometry",{args:[1,1]}),n.jsx("meshBasicMaterial",{transparent:!0,opacity:0})]})]})}function J({waveSpeed:a=.05,waveFrequency:o=3,waveAmplitude:v=.3,waveColor:r=[.5,.5,.5],colorNum:y=4,pixelSize:x=2,disableAnimation:P=!1,enableMouseInteraction:u=!0,mouseRadius:w=1}){return n.jsx(Q,{className:`${de["dither-container"]}`,camera:{position:[0,0,6]},dpr:1,gl:{antialias:!0,preserveDrawingBuffer:!0},children:n.jsx(he,{waveSpeed:a,waveFrequency:o,waveAmplitude:v,waveColor:r,colorNum:y,pixelSize:x,disableAnimation:P,enableMouseInteraction:u,mouseRadius:w})})}J.__docgenInfo={description:"",methods:[],displayName:"Dither",props:{waveSpeed:{defaultValue:{value:"0.05",computed:!1},required:!1},waveFrequency:{defaultValue:{value:"3",computed:!1},required:!1},waveAmplitude:{defaultValue:{value:"0.3",computed:!1},required:!1},waveColor:{defaultValue:{value:"[0.5, 0.5, 0.5]",computed:!1},required:!1},colorNum:{defaultValue:{value:"4",computed:!1},required:!1},pixelSize:{defaultValue:{value:"2",computed:!1},required:!1},disableAnimation:{defaultValue:{value:"false",computed:!1},required:!1},enableMouseInteraction:{defaultValue:{value:"true",computed:!1},required:!1},mouseRadius:{defaultValue:{value:"1",computed:!1},required:!1}}};const Re={title:"ReactBits/Backgrounds/Dither",component:J,parameters:{layout:"fullscreen"},tags:["autodocs"]},q={args:{waveSpeed:.05,waveFrequency:3,waveAmplitude:.3,waveColor:[.5,.5,.5],colorNum:4,pixelSize:2,disableAnimation:!1,enableMouseInteraction:!0,mouseRadius:1}};var W,k,B;q.parameters={...q.parameters,docs:{...(W=q.parameters)==null?void 0:W.docs,source:{originalSource:`{
122
+ `;class ge extends F{constructor(){const o=new Map([["colorNum",new p(4)],["pixelSize",new p(2)]]);super("RetroEffect",xe,{uniforms:o}),this.uniforms=o}set colorNum(o){this.uniforms.get("colorNum").value=o}get colorNum(){return this.uniforms.get("colorNum").value}set pixelSize(o){this.uniforms.get("pixelSize").value=o}get pixelSize(){return this.uniforms.get("pixelSize").value}}const we=ve(ge),H=i.forwardRef((a,o)=>{const{colorNum:v,pixelSize:r}=a;return n.jsx(we,{ref:o,colorNum:v,pixelSize:r})});H.displayName="RetroEffect";function he({waveSpeed:a,waveFrequency:o,waveAmplitude:v,waveColor:r,colorNum:y,pixelSize:x,disableAnimation:P,enableMouseInteraction:u,mouseRadius:w}){const C=i.useRef(null),l=i.useRef(new V),{viewport:g,size:z,gl:s}=I(),E=i.useRef({time:new p(0),resolution:new p(new V(0,0)),waveSpeed:new p(a),waveFrequency:new p(o),waveAmplitude:new p(v),waveColor:new p(new oe(...r)),mousePos:new p(new V(0,0)),enableMouseInteraction:new p(u?1:0),mouseRadius:new p(w)});i.useEffect(()=>{const c=s.getPixelRatio(),e=Math.floor(z.width*c),t=Math.floor(z.height*c),f=E.current.resolution.value;(f.x!==e||f.y!==t)&&f.set(e,t)},[z,s]);const j=i.useRef([...r]);$(({clock:c})=>{const e=E.current;P||(e.time.value=c.getElapsedTime()),e.waveSpeed.value!==a&&(e.waveSpeed.value=a),e.waveFrequency.value!==o&&(e.waveFrequency.value=o),e.waveAmplitude.value!==v&&(e.waveAmplitude.value=v),j.current.every((t,f)=>t===r[f])||(e.waveColor.value.set(...r),j.current=[...r]),e.enableMouseInteraction.value=u?1:0,e.mouseRadius.value=w,u&&e.mousePos.value.copy(l.current)});const N=c=>{if(!u)return;const e=s.domElement.getBoundingClientRect(),t=s.getPixelRatio();l.current.set((c.clientX-e.left)*t,(c.clientY-e.top)*t)};return n.jsxs(n.Fragment,{children:[n.jsxs("mesh",{ref:C,scale:[g.width,g.height,1],children:[n.jsx("planeGeometry",{args:[1,1]}),n.jsx("shaderMaterial",{vertexShader:me,fragmentShader:pe,uniforms:E.current})]}),n.jsx(ce,{children:n.jsx(H,{colorNum:y,pixelSize:x})}),n.jsxs("mesh",{onPointerMove:N,position:[0,0,.01],scale:[g.width,g.height,1],visible:!1,children:[n.jsx("planeGeometry",{args:[1,1]}),n.jsx("meshBasicMaterial",{transparent:!0,opacity:0})]})]})}function J({waveSpeed:a=.05,waveFrequency:o=3,waveAmplitude:v=.3,waveColor:r=[.5,.5,.5],colorNum:y=4,pixelSize:x=2,disableAnimation:P=!1,enableMouseInteraction:u=!0,mouseRadius:w=1}){return n.jsx(Q,{className:`${de["dither-container"]}`,camera:{position:[0,0,6]},dpr:1,gl:{antialias:!0,preserveDrawingBuffer:!0},children:n.jsx(he,{waveSpeed:a,waveFrequency:o,waveAmplitude:v,waveColor:r,colorNum:y,pixelSize:x,disableAnimation:P,enableMouseInteraction:u,mouseRadius:w})})}J.__docgenInfo={description:"",methods:[],displayName:"Dither",props:{waveSpeed:{defaultValue:{value:"0.05",computed:!1},required:!1},waveFrequency:{defaultValue:{value:"3",computed:!1},required:!1},waveAmplitude:{defaultValue:{value:"0.3",computed:!1},required:!1},waveColor:{defaultValue:{value:"[0.5, 0.5, 0.5]",computed:!1},required:!1},colorNum:{defaultValue:{value:"4",computed:!1},required:!1},pixelSize:{defaultValue:{value:"2",computed:!1},required:!1},disableAnimation:{defaultValue:{value:"false",computed:!1},required:!1},enableMouseInteraction:{defaultValue:{value:"true",computed:!1},required:!1},mouseRadius:{defaultValue:{value:"1",computed:!1},required:!1}}};const Re={title:"ReactBits/Backgrounds/Dither",component:J,parameters:{layout:"fullscreen"}},q={args:{waveSpeed:.05,waveFrequency:3,waveAmplitude:.3,waveColor:[.5,.5,.5],colorNum:4,pixelSize:2,disableAnimation:!1,enableMouseInteraction:!0,mouseRadius:1}};var W,k,B;q.parameters={...q.parameters,docs:{...(W=q.parameters)==null?void 0:W.docs,source:{originalSource:`{
123
123
  args: {
124
124
  waveSpeed: 0.05,
125
125
  waveFrequency: 3,