@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.
- package/dist/components/atoms/Button/Button.stories.d.ts +0 -1
- package/dist/components/atoms/Button/Button.stories.d.ts.map +1 -1
- package/dist/components/atoms/Card/Card.stories.d.ts +0 -1
- package/dist/components/atoms/Card/Card.stories.d.ts.map +1 -1
- package/dist/components/atoms/Checkbox/Checkbox.stories.d.ts +0 -7
- package/dist/components/atoms/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/dist/components/atoms/DateInput/DateInput.stories.d.ts +0 -7
- package/dist/components/atoms/DateInput/DateInput.stories.d.ts.map +1 -1
- package/dist/components/atoms/LoadingSpinner/LoadingSpinner.stories.d.ts +1 -15
- package/dist/components/atoms/LoadingSpinner/LoadingSpinner.stories.d.ts.map +1 -1
- package/dist/components/atoms/NumberStepper/NumberStepper.stories.d.ts +0 -16
- package/dist/components/atoms/NumberStepper/NumberStepper.stories.d.ts.map +1 -1
- package/dist/components/atoms/SearchableDropdown/SearchableDropdown.stories.d.ts +0 -9
- package/dist/components/atoms/SearchableDropdown/SearchableDropdown.stories.d.ts.map +1 -1
- package/dist/components/atoms/SelectInput/SelectInput.stories.d.ts +0 -6
- package/dist/components/atoms/SelectInput/SelectInput.stories.d.ts.map +1 -1
- package/dist/components/atoms/Slider/Slider.stories.d.ts.map +1 -1
- package/dist/components/atoms/TextArea/TextArea.stories.d.ts +0 -10
- package/dist/components/atoms/TextArea/TextArea.stories.d.ts.map +1 -1
- package/dist/components/atoms/TextInput/TextInput.stories.d.ts +0 -14
- package/dist/components/atoms/TextInput/TextInput.stories.d.ts.map +1 -1
- package/dist/components/atoms/Toggle/Toggle.stories.d.ts +0 -8
- package/dist/components/atoms/Toggle/Toggle.stories.d.ts.map +1 -1
- package/dist/components/atoms/ToggleButton/ToggleButton.stories.d.ts +0 -7
- package/dist/components/atoms/ToggleButton/ToggleButton.stories.d.ts.map +1 -1
- package/dist/components/molecules/ArrayInput/ArrayInput.stories.d.ts +0 -9
- package/dist/components/molecules/ArrayInput/ArrayInput.stories.d.ts.map +1 -1
- package/dist/components/molecules/EditFAB/EditFAB.stories.d.ts +1 -12
- package/dist/components/molecules/EditFAB/EditFAB.stories.d.ts.map +1 -1
- package/dist/components/molecules/SearchBar/SearchBar.stories.d.ts +0 -8
- package/dist/components/molecules/SearchBar/SearchBar.stories.d.ts.map +1 -1
- package/dist/components/molecules/Tabs/Tabs.stories.d.ts.map +1 -1
- package/dist/components/molecules/ThemeSwitcher/ThemeSwitcher.stories.d.ts +0 -3
- package/dist/components/molecules/ThemeSwitcher/ThemeSwitcher.stories.d.ts.map +1 -1
- package/dist/components/molecules/TimeInput/TimeInput.stories.d.ts +0 -6
- package/dist/components/molecules/TimeInput/TimeInput.stories.d.ts.map +1 -1
- package/dist/components/organisms/Calendar/Calendar.d.ts +21 -1
- package/dist/components/organisms/Calendar/Calendar.d.ts.map +1 -1
- package/dist/components/organisms/Calendar/Calendar.stories.d.ts +1 -1
- package/dist/components/organisms/Calendar/Calendar.stories.d.ts.map +1 -1
- package/dist/components/organisms/Calendar/DayEventCard.d.ts +1 -1
- package/dist/components/organisms/Calendar/DayEventCard.d.ts.map +1 -1
- package/dist/components/organisms/ImageSlideshow/ImageSlideshow.stories.d.ts +0 -23
- package/dist/components/organisms/ImageSlideshow/ImageSlideshow.stories.d.ts.map +1 -1
- package/dist/components/organisms/Navbar/Navbar.d.ts +1 -0
- package/dist/components/organisms/Navbar/Navbar.d.ts.map +1 -1
- package/dist/components/organisms/Navbar/Navbar.stories.d.ts +1 -7
- package/dist/components/organisms/Navbar/Navbar.stories.d.ts.map +1 -1
- package/dist/components/organisms/charts/BooleansHeatmap/BooleansHeatmap.stories.d.ts +1 -4
- package/dist/components/organisms/charts/BooleansHeatmap/BooleansHeatmap.stories.d.ts.map +1 -1
- package/dist/components/organisms/charts/PieChart/PieChart.stories.d.ts +1 -5
- package/dist/components/organisms/charts/PieChart/PieChart.stories.d.ts.map +1 -1
- package/dist/index.esm.js +148 -60
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +147 -59
- package/dist/index.js.map +1 -1
- package/dist/stories/utils.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/dist/themes/dao.css +16 -1
- package/dist/themes/globals.css +2 -5
- package/package.json +1 -1
- package/storybook-static/assets/{ASCIIText.stories-LbmvFzzv.js → ASCIIText.stories-CsG3yKr5.js} +4 -4
- package/storybook-static/assets/{AllAtoms.stories-CLunFOjI.js → AllAtoms.stories-D2Pzz8c7.js} +1 -1
- package/storybook-static/assets/{AnimatedContent.stories-B8hBaVkK.js → AnimatedContent.stories-BP9feFGz.js} +1 -1
- package/storybook-static/assets/{AnimatedList.stories-D8a9eYqH.js → AnimatedList.stories-DQ8jdk44.js} +2 -2
- package/storybook-static/assets/{Antigravity.stories-D_mJbWK0.js → Antigravity.stories-BTIHyYKU.js} +1 -1
- package/storybook-static/assets/ArrayInput.stories-d5_OJJMu.js +138 -0
- package/storybook-static/assets/{Aurora.stories-BN4MataE.js → Aurora.stories-D_eQNPaB.js} +2 -2
- package/storybook-static/assets/{Beams.stories-CCtZOw8G.js → Beams.stories-VLKuYE0_.js} +6 -6
- package/storybook-static/assets/{BlobCursor.stories-CdB55R5G.js → BlobCursor.stories-BQJgTsuD.js} +1 -1
- package/storybook-static/assets/{BlurText.stories-Bg2Ih2Je.js → BlurText.stories-oSn5_w7h.js} +2 -2
- package/storybook-static/assets/BooleansHeatmap-C8cFXa7K.css +1 -0
- package/storybook-static/assets/BooleansHeatmap.stories-CHoCYK4N.js +63 -0
- package/storybook-static/assets/{BorderGlow.stories-CUxbrsvW.js → BorderGlow.stories-D-vgIU3S.js} +1 -1
- package/storybook-static/assets/{BubbleMenu.stories-DuVDLBsV.js → BubbleMenu.stories-DcWoqA7_.js} +1 -1
- package/storybook-static/assets/{Button-CQGdvhpN.js → Button-DgpqJWgD.js} +1 -1
- package/storybook-static/assets/{Button.stories-D8Xx3I9p.js → Button.stories-TQXKQagp.js} +2 -2
- package/storybook-static/assets/Calendar-BZCyXxvF.css +1 -0
- package/storybook-static/assets/Calendar.stories-D5CKBagI.js +321 -0
- package/storybook-static/assets/{Card-DNp-cUnt.js → Card-Bu54h8gN.js} +1 -1
- package/storybook-static/assets/{Card.stories-D1f1NTVU.js → Card.stories-Dw2bPvLo.js} +1 -1
- package/storybook-static/assets/{CardNav.stories-Cd4zEw8p.js → CardNav.stories-CnbwwAde.js} +1 -1
- package/storybook-static/assets/{Carousel.stories-BxbGwXE5.js → Carousel.stories-ChBLLqBg.js} +2 -2
- package/storybook-static/assets/{Checkbox-Dw8W2w74.js → Checkbox-Duyafa-Y.js} +1 -1
- package/storybook-static/assets/Checkbox.stories-Co7IxmK1.js +55 -0
- package/storybook-static/assets/{ChromaGrid.stories-DBHYiDPV.js → ChromaGrid.stories-68ukohGs.js} +1 -1
- package/storybook-static/assets/{CircularGallery.stories-TJN6o_RG.js → CircularGallery.stories-CV4iXVIX.js} +2 -2
- package/storybook-static/assets/{CircularText.stories-rNjRUNn2.js → CircularText.stories-DqYHtbPW.js} +1 -1
- package/storybook-static/assets/{ClickSpark.stories-BfqByoGe.js → ClickSpark.stories-DvAOxLjs.js} +1 -1
- package/storybook-static/assets/{ColorBends.stories-IEMOWAyf.js → ColorBends.stories-Dm4nxTTN.js} +2 -2
- package/storybook-static/assets/{CountUp.stories-DXPrKAQb.js → CountUp.stories-DTaL8Yfy.js} +1 -1
- package/storybook-static/assets/{Counter.stories-DMdecsw_.js → Counter.stories-Bf_2Js0l.js} +2 -2
- package/storybook-static/assets/{Crosshair.stories-CYzDxRSn.js → Crosshair.stories-DJjjCcED.js} +2 -2
- package/storybook-static/assets/{Cubes.stories-Drq4ULo3.js → Cubes.stories-Qh3JqlQW.js} +1 -1
- package/storybook-static/assets/{CurvedLoop.stories-C9GMKnIw.js → CurvedLoop.stories-BvyrCuM7.js} +1 -1
- package/storybook-static/assets/{DarkVeil.stories-BtLNfEH8.js → DarkVeil.stories-BVY870pm.js} +2 -2
- package/storybook-static/assets/{DateInput-CW4PsZAQ.js → DateInput-DfGES3te.js} +2 -2
- package/storybook-static/assets/DateInput-Dhcb9x13.css +1 -0
- package/storybook-static/assets/DateInput.stories-BXF8Ttde.js +51 -0
- package/storybook-static/assets/{DecayCard.stories-CAU_wTc7.js → DecayCard.stories-B0g2xWqX.js} +1 -1
- package/storybook-static/assets/{DecryptedText.stories-Dvba9C1V.js → DecryptedText.stories-fqDZfjv8.js} +1 -1
- package/storybook-static/assets/{Dither.stories-B5KfMprl.js → Dither.stories-B4N3Z5sW.js} +2 -2
- package/storybook-static/assets/{Dock.stories-oyQGRzlM.js → Dock.stories-f_YKz-pl.js} +1 -1
- package/storybook-static/assets/EditFAB.stories-LhVUDgtx.js +233 -0
- package/storybook-static/assets/{EvilEye.stories-C1820-DG.js → EvilEye.stories-BtBvvs31.js} +2 -2
- package/storybook-static/assets/{FadeContent.stories-B4z_JRy9.js → FadeContent.stories-oNqKrfSe.js} +1 -1
- package/storybook-static/assets/{FaultyTerminal.stories-DmkguJql.js → FaultyTerminal.stories-7nV4DvrW.js} +2 -2
- package/storybook-static/assets/{Fbo-CTQm-4Bw.js → Fbo-Clk04E0N.js} +1 -1
- package/storybook-static/assets/{FloatingLines.stories-CQvqKSpH.js → FloatingLines.stories-DgxhGl_b.js} +2 -2
- package/storybook-static/assets/{FlowingMenu.stories-DmOspv0B.js → FlowingMenu.stories-C5dfG25U.js} +1 -1
- package/storybook-static/assets/{FluidGlass.stories-CZSqxrNt.js → FluidGlass.stories-DGLlp1x1.js} +2 -2
- package/storybook-static/assets/{Folder.stories-7vb52Lfi.js → Folder.stories-BJGdA6Qb.js} +1 -1
- package/storybook-static/assets/{FuzzyText.stories-BdXN4VK1.js → FuzzyText.stories-DygRT6bB.js} +1 -1
- package/storybook-static/assets/{Galaxy.stories-BhT1GZh5.js → Galaxy.stories-BU6XCHeu.js} +2 -2
- package/storybook-static/assets/{GhostCursor.stories-DkXqCjE9.js → GhostCursor.stories-D_HIFPUl.js} +2 -2
- package/storybook-static/assets/{GlareHover.stories-CznX3yTV.js → GlareHover.stories-D5_-xnyP.js} +1 -1
- package/storybook-static/assets/{GlassSurface.stories-BnwwYK95.js → GlassSurface.stories-CrZqAGRq.js} +2 -2
- package/storybook-static/assets/{GlitchText.stories-CVcTBUVS.js → GlitchText.stories-BRqI-kBX.js} +2 -2
- package/storybook-static/assets/{GooeyNav.stories-C0abTHBc.js → GooeyNav.stories-DjR0-Th2.js} +1 -1
- package/storybook-static/assets/{GradientBlinds.stories-CpSguKtv.js → GradientBlinds.stories-CiIDtPz3.js} +2 -2
- package/storybook-static/assets/{GradientText.stories-B4hMx13h.js → GradientText.stories-pLA_An71.js} +1 -1
- package/storybook-static/assets/{Grainient.stories-5EakpvU2.js → Grainient.stories-BthRrRMd.js} +2 -2
- package/storybook-static/assets/{GridMotion.stories-Bm3DD7cb.js → GridMotion.stories-BSwjL8IE.js} +1 -1
- package/storybook-static/assets/ImageSlideshow.stories-BYAQMHlZ.js +108 -0
- package/storybook-static/assets/{Iridescence.stories-Cykk3hHZ.js → Iridescence.stories-ChHTH2TM.js} +2 -2
- package/storybook-static/assets/{LaserFlow.stories-CfiM4ZZ5.js → LaserFlow.stories-DlDx8Vr8.js} +2 -2
- package/storybook-static/assets/{LetterGlitch.stories-BXb7iSeX.js → LetterGlitch.stories-C-S2SRjU.js} +1 -1
- package/storybook-static/assets/{LightPillar.stories-CwI-8_BF.js → LightPillar.stories-D0PF-h7T.js} +3 -3
- package/storybook-static/assets/{LightRays.stories-BIIfv6Ky.js → LightRays.stories-Cbkl7wuP.js} +2 -2
- package/storybook-static/assets/{Lightning.stories-B8GNkzSN.js → Lightning.stories-BUs-gwYj.js} +2 -2
- package/storybook-static/assets/{LineWaves.stories-CjxdD_yt.js → LineWaves.stories-D2GXzteP.js} +2 -2
- package/storybook-static/assets/{LiquidChrome.stories-G7bVFJM9.js → LiquidChrome.stories-CtDp7th1.js} +2 -2
- package/storybook-static/assets/{LiquidEther.stories-C8n27zuA.js → LiquidEther.stories-DM2n5oEm.js} +2 -2
- package/storybook-static/assets/{LoadingSpinner-Br8TYFlF.js → LoadingSpinner-DaUSIVPY.js} +1 -1
- package/storybook-static/assets/LoadingSpinner.stories-Cx4_nNAf.js +21 -0
- package/storybook-static/assets/{MagicRings.stories-D50m_2UF.js → MagicRings.stories-CZt-cHcL.js} +2 -2
- package/storybook-static/assets/{Magnet.stories-BP9fjpzP.js → Magnet.stories-B6js1VeO.js} +1 -1
- package/storybook-static/assets/{MagnetLines.stories-DvbytV0Y.js → MagnetLines.stories-BKQ9YC_E.js} +1 -1
- package/storybook-static/assets/{Masonry.stories-xXYQw2uD.js → Masonry.stories-BGkTkNUa.js} +1 -1
- package/storybook-static/assets/{MetaBalls.stories-DKD3gVUH.js → MetaBalls.stories-Cao6Tqjg.js} +2 -2
- package/storybook-static/assets/{MetallicPaint.stories-Bz-uS-L_.js → MetallicPaint.stories-DF9qb3W_.js} +2 -2
- package/storybook-static/assets/MoodChart-ba3aY_qF.css +1 -0
- package/storybook-static/assets/MoodChart.stories-AGxwnR6s.js +40 -0
- package/storybook-static/assets/{MotionConfigContext-D5hZdVGx.js → MotionConfigContext-BCa1jVYq.js} +1 -1
- package/storybook-static/assets/Navbar-CH6O1IzY.css +1 -0
- package/storybook-static/assets/Navbar.stories-CFHb1c22.js +186 -0
- package/storybook-static/assets/{Noise.stories-D6C6-k8-.js → Noise.stories-ConXbyqm.js} +2 -2
- package/storybook-static/assets/{NumberStepper--0cJcLNZ.js → NumberStepper-DH9y3k8b.js} +1 -1
- package/storybook-static/assets/NumberStepper.stories-PMwPqbsn.js +88 -0
- package/storybook-static/assets/{Orb.stories-CS__2PJW.js → Orb.stories-DcXSWhV1.js} +2 -2
- package/storybook-static/assets/{OrbitImages.stories-CcaelcY5.js → OrbitImages.stories-Dk417qKA.js} +1 -1
- package/storybook-static/assets/PieChart-DXPBsaZR.css +1 -0
- package/storybook-static/assets/PieChart.stories-6sgfe6Xk.js +91 -0
- package/storybook-static/assets/{PixelBlast.stories-CyK8BxPq.js → PixelBlast.stories-_cBuognT.js} +2 -2
- package/storybook-static/assets/{PixelCard.stories-D_Og1Eve.js → PixelCard.stories-D_EZOUox.js} +1 -1
- package/storybook-static/assets/{PixelSnow.stories-CoCZucVV.js → PixelSnow.stories-DcD7737G.js} +2 -2
- package/storybook-static/assets/{PixelTransition.stories-DmVJ4jdu.js → PixelTransition.stories-BwNcUv5J.js} +1 -1
- package/storybook-static/assets/{Plasma.stories-DUqrW-qq.js → Plasma.stories-BLolMCfR.js} +2 -2
- package/storybook-static/assets/{Prism.stories-DWdVDcBG.js → Prism.stories-CG2_KGsq.js} +2 -2
- package/storybook-static/assets/{PrismaticBurst.stories-BEVYTjXo.js → PrismaticBurst.stories-DzS--Ffu.js} +2 -2
- package/storybook-static/assets/{ProfileCard.stories-CAoKQpAZ.js → ProfileCard.stories-vI_ispYe.js} +1 -1
- package/storybook-static/assets/QuantifiableHabitsChart-BiMp7Kkq.css +1 -0
- package/storybook-static/assets/{QuantifiableHabitsChart.stories-CMexb5Ij.js → QuantifiableHabitsChart.stories-D5yeGCZ5.js} +2 -2
- package/storybook-static/assets/{Radar.stories-Dcjnm9Bu.js → Radar.stories-DLv_hY9T.js} +2 -2
- package/storybook-static/assets/{Ribbons.stories-Cs3Eg2Gz.js → Ribbons.stories-4BbVINtW.js} +4 -4
- package/storybook-static/assets/{RippleGrid.stories-QV9Doq9P.js → RippleGrid.stories-CFh8tigy.js} +2 -2
- package/storybook-static/assets/{RotatingText.stories-DkntoAXJ.js → RotatingText.stories-AM4GcpU2.js} +2 -2
- package/storybook-static/assets/{ScrollFloat.stories-BaX43Ike.js → ScrollFloat.stories-Ct_ZkL7k.js} +1 -1
- package/storybook-static/assets/{ScrollReveal.stories-C2IWpLpI.js → ScrollReveal.stories-B7fcgLZ3.js} +1 -1
- package/storybook-static/assets/{ScrollVelocity.stories-LaYJ5WQN.js → ScrollVelocity.stories-BRDv3Fdk.js} +1 -1
- package/storybook-static/assets/SearchBar.stories-Dnmegbak.js +64 -0
- package/storybook-static/assets/{SearchableDropdown-4HgWY0Ck.js → SearchableDropdown-BtIsuxmT.js} +1 -1
- package/storybook-static/assets/SearchableDropdown.stories-DVub17TN.js +44 -0
- package/storybook-static/assets/{SelectInput-DvSeeIw5.js → SelectInput-C0kBLYgX.js} +1 -1
- package/storybook-static/assets/SelectInput.stories-HoF32-Km.js +94 -0
- package/storybook-static/assets/{ShapeBlur.stories-ZQV0yHkn.js → ShapeBlur.stories-C3RyLvBh.js} +2 -2
- package/storybook-static/assets/{ShapeGrid.stories-G_tZAcp9.js → ShapeGrid.stories-ltmu466o.js} +1 -1
- package/storybook-static/assets/{ShinyText.stories-C6BrLI0x.js → ShinyText.stories-JO2F4CpJ.js} +1 -1
- package/storybook-static/assets/{Silk.stories-BpsR4txJ.js → Silk.stories-CUzWiwqP.js} +2 -2
- package/storybook-static/assets/SleepChart-CjpdWR_T.css +1 -0
- package/storybook-static/assets/SleepChart.stories-YvCzf0BI.js +58 -0
- package/storybook-static/assets/Slider-BaDHm9m3.css +1 -0
- package/storybook-static/assets/{Slider-3iog5_du.js → Slider-CI9mXQSu.js} +1 -1
- package/storybook-static/assets/{Slider.stories-C8eUZ7Ne.js → Slider.stories-DQYlBjGq.js} +1 -1
- package/storybook-static/assets/{SoftAurora.stories--Rcyqxiu.js → SoftAurora.stories-ubq_KV8Q.js} +2 -2
- package/storybook-static/assets/{SoundDemo.stories-DvhKS2Fi.js → SoundDemo.stories-Cie-leKw.js} +1 -1
- package/storybook-static/assets/{SplashCursor.stories-FzRIUaX9.js → SplashCursor.stories-Clea3dMy.js} +2 -2
- package/storybook-static/assets/{SpotlightCard.stories-CifqsSUc.js → SpotlightCard.stories-BWv0AuTI.js} +1 -1
- package/storybook-static/assets/{Stack.stories-Dq82x0TG.js → Stack.stories-DxVGTJ6l.js} +1 -1
- package/storybook-static/assets/{StaggeredMenu.stories-CsiTDJGG.js → StaggeredMenu.stories-1UB8ravq.js} +1 -1
- package/storybook-static/assets/{StarBorder.stories-Ba14_TPk.js → StarBorder.stories-DiSAqN3r.js} +2 -2
- package/storybook-static/assets/{SunburstChart.stories-fREzDXM9.js → SunburstChart.stories-DLjQA_I1.js} +1 -1
- package/storybook-static/assets/Table-BFjXRRk3.css +1 -0
- package/storybook-static/assets/{Table.stories-CXsQAQrR.js → Table.stories-wQGb96WC.js} +6 -6
- package/storybook-static/assets/Tabs-CDVjuS9_.css +1 -0
- package/storybook-static/assets/{Tabs.stories-HeiG8gYN.js → Tabs.stories-jkioQ4xt.js} +4 -4
- package/storybook-static/assets/{TargetCursor.stories-B16pWZaP.js → TargetCursor.stories-B4ACbrmW.js} +1 -1
- package/storybook-static/assets/{TextArea-DKx3k6hV.js → TextArea-DN6IYITs.js} +1 -1
- package/storybook-static/assets/TextArea.stories-CwLLZFoD.js +118 -0
- package/storybook-static/assets/{TextCursor.stories-CY2eIn6Z.js → TextCursor.stories-NORQhkfy.js} +1 -1
- package/storybook-static/assets/TextInput-6V0mlIuS.css +1 -0
- package/storybook-static/assets/TextInput-CLgIGUn3.js +28 -0
- package/storybook-static/assets/TextInput.stories-BNooOWA2.js +89 -0
- package/storybook-static/assets/{TextPressure.stories-sH-cgdL2.js → TextPressure.stories-BaCAyBD4.js} +2 -2
- package/storybook-static/assets/{TextType.stories-B7Oy3P9u.js → TextType.stories-DG4mQ3HF.js} +1 -1
- package/storybook-static/assets/ThemeSwitcher.stories-slxIamHU.js +47 -0
- package/storybook-static/assets/{Threads.stories-e52ErKbM.js → Threads.stories-Rsg8lRsX.js} +2 -2
- package/storybook-static/assets/TimeInput-BT44V2P0.css +1 -0
- package/storybook-static/assets/TimeInput.stories-CaO8_PY2.js +13 -0
- package/storybook-static/assets/{Toggle-BntWdyUe.js → Toggle-CTTN-13k.js} +1 -1
- package/storybook-static/assets/Toggle.stories-DrNYDjFB.js +163 -0
- package/storybook-static/assets/{ToggleButton-BQqJdlB_.js → ToggleButton-CXK855yx.js} +1 -1
- package/storybook-static/assets/ToggleButton.stories-DNsNH9vH.js +103 -0
- package/storybook-static/assets/{TrueFocus.stories-wm4VXWCk.js → TrueFocus.stories-zG6Ml8RP.js} +1 -1
- package/storybook-static/assets/{VariableProximity.stories-BNSYs_rC.js → VariableProximity.stories-CMZW-Tov.js} +1 -1
- package/storybook-static/assets/{Waves.stories-Ce2ZJFsV.js → Waves.stories-CscXTp_S.js} +1 -1
- package/storybook-static/assets/{check-Cty-Z1Ib.js → check-DLeHG_Da.js} +1 -1
- package/storybook-static/assets/{chevron-down-OhqRl4eJ.js → chevron-down-Ciks5pXx.js} +1 -1
- package/storybook-static/assets/{chevron-right-CZm4bArI.js → chevron-right-DjeluSA0.js} +1 -1
- package/storybook-static/assets/client-D1KVnN68.js +1 -0
- package/storybook-static/assets/{createLucideIcon-BNUG5osq.js → createLucideIcon-dvowvj4F.js} +1 -1
- package/storybook-static/assets/{folder-BjriMpXc.js → folder-CCqkDvFG.js} +1 -1
- package/storybook-static/assets/{iconBase-DmcmY1l-.js → iconBase-nrk1zV8Q.js} +1 -1
- package/storybook-static/assets/iframe-CU5nRRrn.css +1 -0
- package/storybook-static/assets/{iframe-B8pH-Lvr.js → iframe-Cw8dCV4Z.js} +180 -181
- package/storybook-static/assets/{index-PY_vM88c.js → index-A7l1uA6_.js} +6 -6
- package/storybook-static/assets/{index-BN99WpBo.js → index-Bm5msOcI.js} +1 -1
- package/storybook-static/assets/{index-DBfrIdYd.js → index-CzApopWo.js} +1 -1
- package/storybook-static/assets/{proxy-BA3VZtN5.js → proxy-p8L3T_Zy.js} +1 -1
- package/storybook-static/assets/{react-18-7dGub68c.js → react-18-D7YhBYbX.js} +1 -1
- package/storybook-static/assets/{react-three-fiber.esm-DI-wNJmP.js → react-three-fiber.esm-BnMrba87.js} +1 -1
- package/storybook-static/assets/{search-2YqBkJlG.js → search-7V6DOf2z.js} +1 -1
- package/storybook-static/assets/{settings-DvzICcFU.js → settings-B8s5hJGs.js} +1 -1
- package/storybook-static/assets/{sun-DgDhCM_S.js → sun-5V6ee2LJ.js} +1 -1
- package/storybook-static/assets/{trash-2-BwI5jvsn.js → trash-2-DeQvYdO7.js} +1 -1
- package/storybook-static/assets/{use-animation-frame-CF42h0i5.js → use-animation-frame-DovyG_Es.js} +1 -1
- package/storybook-static/assets/{use-in-view-Zn8evg3J.js → use-in-view-Dv3LTdsl.js} +1 -1
- package/storybook-static/assets/{use-motion-value--XhiA2Gt.js → use-motion-value-BVm7csqA.js} +1 -1
- package/storybook-static/assets/{use-spring-CrWzlBMd.js → use-spring-BkrdNVnG.js} +1 -1
- package/storybook-static/assets/{use-transform-vyDqMhf-.js → use-transform-CQNghMvr.js} +1 -1
- package/storybook-static/assets/{useSound-Bk2W5gkV.js → useSound-D23BsIr4.js} +1 -1
- package/storybook-static/assets/{users-aNPxMiig.js → users-R6T-yLyH.js} +1 -1
- package/storybook-static/assets/{x-BC8LCdn9.js → x-CypMgsiv.js} +1 -1
- package/storybook-static/iframe.html +3 -3
- package/storybook-static/index.html +5 -19
- package/storybook-static/index.json +1 -1
- package/storybook-static/project.json +1 -1
- package/storybook-static/addon-visual-tests-assets/visual-test-illustration.mp4 +0 -0
- package/storybook-static/assets/ArrayInput.stories-Cshz2s-a.js +0 -232
- package/storybook-static/assets/BooleansHeatmap-BV4VTyo6.css +0 -1
- package/storybook-static/assets/BooleansHeatmap.stories-CpNxqSED.js +0 -123
- package/storybook-static/assets/Calendar-tbpzwSIm.css +0 -1
- package/storybook-static/assets/Calendar.stories-Cx2JEddO.js +0 -229
- package/storybook-static/assets/Checkbox.stories-BwsnN3CP.js +0 -83
- package/storybook-static/assets/Color-AVL7NMMY-CoWQkAiP.js +0 -1
- package/storybook-static/assets/DateInput-C4-Rlnpy.css +0 -1
- package/storybook-static/assets/DateInput.stories-d46zYiZA.js +0 -119
- package/storybook-static/assets/DocsRenderer-PQXLIZUC-C2AYT361.js +0 -1243
- package/storybook-static/assets/EditFAB.stories-DvtpW34v.js +0 -378
- package/storybook-static/assets/ImageSlideshow.stories-BasuECRV.js +0 -385
- package/storybook-static/assets/LoadingSpinner.stories-Dj0bMFhR.js +0 -169
- package/storybook-static/assets/MoodChart-2hr_Y2GI.css +0 -1
- package/storybook-static/assets/MoodChart.stories-Bk0jtB4g.js +0 -40
- package/storybook-static/assets/Navbar-BPWxCB-U.css +0 -1
- package/storybook-static/assets/Navbar.stories-Dos3kovt.js +0 -320
- package/storybook-static/assets/NumberStepper.stories-BvFwBEjt.js +0 -436
- package/storybook-static/assets/PieChart-OfDGlJ4g.css +0 -1
- package/storybook-static/assets/PieChart.stories-XZqxh_GW.js +0 -199
- package/storybook-static/assets/QuantifiableHabitsChart-Bam6n9X_.css +0 -1
- package/storybook-static/assets/SearchBar.stories-CGaj__zF.js +0 -169
- package/storybook-static/assets/SearchableDropdown.stories-CfeFR5Rk.js +0 -282
- package/storybook-static/assets/SelectInput.stories-DByYKCGI.js +0 -129
- package/storybook-static/assets/SleepChart-DBRb08s_.css +0 -1
- package/storybook-static/assets/SleepChart.stories-DcoBwiEm.js +0 -58
- package/storybook-static/assets/Slider-Bq7zObwV.css +0 -1
- package/storybook-static/assets/Table-DnhtoClE.css +0 -1
- package/storybook-static/assets/Tabs-D5ZPN7MM.css +0 -1
- package/storybook-static/assets/TextArea.stories-Bpqlv7j5.js +0 -155
- package/storybook-static/assets/TextInput-BjVJQEYN.css +0 -1
- package/storybook-static/assets/TextInput-CLyTHgK9.js +0 -28
- package/storybook-static/assets/TextInput.stories-BP1LSkLG.js +0 -203
- package/storybook-static/assets/ThemeSwitcher.stories-Bj0YQKM5.js +0 -62
- package/storybook-static/assets/TimeInput-C3enPYoV.css +0 -1
- package/storybook-static/assets/TimeInput.stories-Cd28zwwR.js +0 -55
- package/storybook-static/assets/Toggle.stories-DtqFmh3E.js +0 -199
- package/storybook-static/assets/ToggleButton.stories-DkN_4qpp.js +0 -163
- package/storybook-static/assets/client-0pKYCVHx.js +0 -1
- package/storybook-static/assets/iframe-B7RIyArP.css +0 -1
- package/storybook-static/assets/index-bi5z6E3I.js +0 -1
- package/storybook-static/assets/layout-grid-TssXYNzv.js +0 -6
- package/storybook-static/sb-addons/chromatic-com-storybook-4/manager-bundle.js +0 -356
- package/storybook-static/sb-addons/chromatic-com-storybook-4/manager-bundle.js.LEGAL.txt +0 -40
- package/storybook-static/sb-addons/docs-2/manager-bundle.js +0 -151
- package/storybook-static/sb-addons/onboarding-1/manager-bundle.js +0 -127
- /package/storybook-static/sb-addons/{links-3 → links-1}/manager-bundle.js +0 -0
- /package/storybook-static/sb-addons/{storybook-5 → storybook-2}/manager-bundle.js +0 -0
package/storybook-static/assets/{LiquidEther.stories-C8n27zuA.js → LiquidEther.stories-DM2n5oEm.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as d,j as Me}from"./iframe-
|
|
1
|
+
import{r as d,j as Me}from"./iframe-Cw8dCV4Z.js";import{n as te,a6 as Ee,g as Ae,z as q,a7 as L,d as a,W as Re,f as ke,S as ie,C as se,M as $,q as j,v as I,u as Ve,H as Be,E as qe,k as Le,h as Ie,t as Oe,a8 as Ue,o as He}from"./three.module--_vTUKhS.js";import"./preload-helper-C1FmrZbK.js";const Ge={"liquid-ether-container":"_liquid-ether-container_596kf_1"};function ae({mouseForce:_=20,cursorSize:w=100,isViscous:b=!1,viscous:S=30,iterationsViscous:D=32,iterationsPoisson:T=32,dt:z=.014,BFECC:C=!0,resolution:f=.5,isBounce:F=!1,colors:J=["#5227FF","#FF9FFC","#B19EEF"],style:ue={},className:ce="",autoDemo:M=!0,autoSpeed:E=.5,autoIntensity:A=2.2,takeoverDuration:R=.25,autoResumeDelay:k=1e3,autoRampDuration:V=.6}){const U=d.useRef(null),u=d.useRef(null),H=d.useRef(null),p=d.useRef(null),G=d.useRef(null),K=d.useRef(!0),N=d.useRef(null);return d.useEffect(()=>{if(!U.current)return;function c(s){let e;Array.isArray(s)&&s.length>0?s.length===1?e=[s[0],s[0]]:e=s:e=["#ffffff","#ffffff"];const t=e.length,i=new Uint8Array(t*4);for(let o=0;o<t;o++){const l=new te(e[o]);i[o*4+0]=Math.round(l.r*255),i[o*4+1]=Math.round(l.g*255),i[o*4+2]=Math.round(l.b*255),i[o*4+3]=255}const r=new Ee(i,t,1,Ae);return r.magFilter=q,r.minFilter=q,r.wrapS=L,r.wrapT=L,r.generateMipmaps=!1,r.needsUpdate=!0,r}const m=c(J),X=new Ve(0,0,0,0);class B{constructor(){this.width=0,this.height=0,this.aspect=1,this.pixelRatio=1,this.isMobile=!1,this.breakpoint=768,this.fboWidth=null,this.fboHeight=null,this.time=0,this.delta=0,this.container=null,this.renderer=null,this.clock=null}init(e){this.container=e,this.pixelRatio=Math.min(window.devicePixelRatio||1,2),this.resize(),this.renderer=new Re({antialias:!0,alpha:!0}),this.renderer.autoClear=!1,this.renderer.setClearColor(new te(0),0),this.renderer.setPixelRatio(this.pixelRatio),this.renderer.setSize(this.width,this.height),this.renderer.domElement.style.width="100%",this.renderer.domElement.style.height="100%",this.renderer.domElement.style.display="block",this.clock=new ke,this.clock.start()}resize(){if(!this.container)return;const e=this.container.getBoundingClientRect();this.width=Math.max(1,Math.floor(e.width)),this.height=Math.max(1,Math.floor(e.height)),this.aspect=this.width/this.height,this.renderer&&this.renderer.setSize(this.width,this.height,!1)}update(){this.delta=this.clock.getDelta(),this.time+=this.delta}}const n=new B;class le{constructor(){this.mouseMoved=!1,this.coords=new a,this.coords_old=new a,this.diff=new a,this.timer=null,this.container=null,this.docTarget=null,this.listenerTarget=null,this.isHoverInside=!1,this.hasUserControl=!1,this.isAutoActive=!1,this.autoIntensity=2,this.takeoverActive=!1,this.takeoverStartTime=0,this.takeoverDuration=.25,this.takeoverFrom=new a,this.takeoverTo=new a,this.onInteract=null,this._onMouseMove=this.onDocumentMouseMove.bind(this),this._onTouchStart=this.onDocumentTouchStart.bind(this),this._onTouchMove=this.onDocumentTouchMove.bind(this),this._onTouchEnd=this.onTouchEnd.bind(this),this._onDocumentLeave=this.onDocumentLeave.bind(this)}init(e){this.container=e,this.docTarget=e.ownerDocument||null;const t=this.docTarget&&this.docTarget.defaultView||(typeof window<"u"?window:null);t&&(this.listenerTarget=t,this.listenerTarget.addEventListener("mousemove",this._onMouseMove),this.listenerTarget.addEventListener("touchstart",this._onTouchStart,{passive:!0}),this.listenerTarget.addEventListener("touchmove",this._onTouchMove,{passive:!0}),this.listenerTarget.addEventListener("touchend",this._onTouchEnd),this.docTarget&&this.docTarget.addEventListener("mouseleave",this._onDocumentLeave))}dispose(){this.listenerTarget&&(this.listenerTarget.removeEventListener("mousemove",this._onMouseMove),this.listenerTarget.removeEventListener("touchstart",this._onTouchStart),this.listenerTarget.removeEventListener("touchmove",this._onTouchMove),this.listenerTarget.removeEventListener("touchend",this._onTouchEnd)),this.docTarget&&this.docTarget.removeEventListener("mouseleave",this._onDocumentLeave),this.listenerTarget=null,this.docTarget=null,this.container=null}isPointInside(e,t){if(!this.container)return!1;const i=this.container.getBoundingClientRect();return i.width===0||i.height===0?!1:e>=i.left&&e<=i.right&&t>=i.top&&t<=i.bottom}updateHoverState(e,t){return this.isHoverInside=this.isPointInside(e,t),this.isHoverInside}setCoords(e,t){if(!this.container)return;this.timer&&window.clearTimeout(this.timer);const i=this.container.getBoundingClientRect();if(i.width===0||i.height===0)return;const r=(e-i.left)/i.width,o=(t-i.top)/i.height;this.coords.set(r*2-1,-(o*2-1)),this.mouseMoved=!0,this.timer=window.setTimeout(()=>{this.mouseMoved=!1},100)}setNormalized(e,t){this.coords.set(e,t),this.mouseMoved=!0}onDocumentMouseMove(e){if(this.updateHoverState(e.clientX,e.clientY)){if(this.onInteract&&this.onInteract(),this.isAutoActive&&!this.hasUserControl&&!this.takeoverActive){if(!this.container)return;const t=this.container.getBoundingClientRect();if(t.width===0||t.height===0)return;const i=(e.clientX-t.left)/t.width,r=(e.clientY-t.top)/t.height;this.takeoverFrom.copy(this.coords),this.takeoverTo.set(i*2-1,-(r*2-1)),this.takeoverStartTime=performance.now(),this.takeoverActive=!0,this.hasUserControl=!0,this.isAutoActive=!1;return}this.setCoords(e.clientX,e.clientY),this.hasUserControl=!0}}onDocumentTouchStart(e){if(e.touches.length!==1)return;const t=e.touches[0];this.updateHoverState(t.clientX,t.clientY)&&(this.onInteract&&this.onInteract(),this.setCoords(t.clientX,t.clientY),this.hasUserControl=!0)}onDocumentTouchMove(e){if(e.touches.length!==1)return;const t=e.touches[0];this.updateHoverState(t.clientX,t.clientY)&&(this.onInteract&&this.onInteract(),this.setCoords(t.clientX,t.clientY))}onTouchEnd(){this.isHoverInside=!1}onDocumentLeave(){this.isHoverInside=!1}update(){if(this.takeoverActive){const e=(performance.now()-this.takeoverStartTime)/(this.takeoverDuration*1e3);if(e>=1)this.takeoverActive=!1,this.coords.copy(this.takeoverTo),this.coords_old.copy(this.coords),this.diff.set(0,0);else{const t=e*e*(3-2*e);this.coords.copy(this.takeoverFrom).lerp(this.takeoverTo,t)}}this.diff.subVectors(this.coords,this.coords_old),this.coords_old.copy(this.coords),this.coords_old.x===0&&this.coords_old.y===0&&this.diff.set(0,0),this.isAutoActive&&!this.takeoverActive&&this.diff.multiplyScalar(this.autoIntensity)}}const h=new le;class he{constructor(e,t,i){this.mouse=e,this.manager=t,this.enabled=i.enabled,this.speed=i.speed,this.resumeDelay=i.resumeDelay||3e3,this.rampDurationMs=(i.rampDuration||0)*1e3,this.active=!1,this.current=new a(0,0),this.target=new a,this.lastTime=performance.now(),this.activationTime=0,this.margin=.2,this._tmpDir=new a,this.pickNewTarget()}pickNewTarget(){const e=Math.random;this.target.set((e()*2-1)*(1-this.margin),(e()*2-1)*(1-this.margin))}forceStop(){this.active=!1,this.mouse.isAutoActive=!1}update(){if(!this.enabled)return;const e=performance.now();if(e-this.manager.lastUserInteraction<this.resumeDelay){this.active&&this.forceStop();return}if(this.mouse.isHoverInside){this.active&&this.forceStop();return}if(this.active||(this.active=!0,this.current.copy(this.mouse.coords),this.lastTime=e,this.activationTime=e),!this.active)return;this.mouse.isAutoActive=!0;let i=(e-this.lastTime)/1e3;this.lastTime=e,i>.2&&(i=.016);const r=this._tmpDir.subVectors(this.target,this.current),o=r.length();if(o<.01){this.pickNewTarget();return}r.normalize();let l=1;if(this.rampDurationMs>0){const W=Math.min(1,(e-this.activationTime)/this.rampDurationMs);l=W*W*(3-2*W)}const Y=this.speed*i*l,x=Math.min(Y,o);this.current.addScaledVector(r,x),this.mouse.setNormalized(this.current.x,this.current.y)}}const g=`
|
|
2
2
|
attribute vec3 position;
|
|
3
3
|
uniform vec2 px;
|
|
4
4
|
uniform vec2 boundarySpace;
|
|
@@ -158,4 +158,4 @@ import{r as d,j as Me}from"./iframe-B8pH-Lvr.js";import{n as te,a6 as Ee,g as Ae
|
|
|
158
158
|
newv /= 4.0 * (1.0 + v * dt);
|
|
159
159
|
gl_FragColor = vec4(newv, 0.0, 0.0);
|
|
160
160
|
}
|
|
161
|
-
`;class y{constructor(e){var t;this.props=e||{},this.uniforms=(t=this.props.material)==null?void 0:t.uniforms,this.scene=null,this.camera=null,this.material=null,this.geometry=null,this.plane=null}init(){this.scene=new ie,this.camera=new se,this.uniforms&&(this.material=new I(this.props.material),this.geometry=new j(2,2),this.plane=new $(this.geometry,this.material),this.scene.add(this.plane))}update(){n.renderer.setRenderTarget(this.props.output||null),n.renderer.render(this.scene,this.camera),n.renderer.setRenderTarget(null)}}class _e extends y{constructor(e){super({material:{vertexShader:g,fragmentShader:Q,uniforms:{boundarySpace:{value:e.cellScale},px:{value:e.cellScale},fboSize:{value:e.fboSize},velocity:{value:e.src.texture},dt:{value:e.dt},isBFECC:{value:!0}}},output:e.dst}),this.uniforms=this.props.material.uniforms,this.init()}init(){super.init(),this.createBoundary()}createBoundary(){const e=new Ie,t=new Float32Array([-1,-1,0,-1,1,0,-1,1,0,1,1,0,1,1,0,1,-1,0,1,-1,0,-1,-1,0]);e.setAttribute("position",new Oe(t,3));const i=new I({vertexShader:de,fragmentShader:Q,uniforms:this.uniforms});this.line=new Ue(e,i),this.scene.add(this.line)}update({dt:e,isBounce:t,BFECC:i}){this.uniforms.dt.value=e,this.line.visible=t,this.uniforms.isBFECC.value=i,super.update()}}class we extends y{constructor(e){super({output:e.dst}),this.init(e)}init(e){super.init();const t=new j(1,1),i=new I({vertexShader:ve,fragmentShader:me,blending:He,depthWrite:!1,uniforms:{px:{value:e.cellScale},force:{value:new a(0,0)},center:{value:new a(0,0)},scale:{value:new a(e.cursor_size,e.cursor_size)}}});this.mouse=new $(t,i),this.scene.add(this.mouse)}update(e){const t=h.diff.x/2*e.mouse_force,i=h.diff.y/2*e.mouse_force,r=e.cursor_size*e.cellScale.x,o=e.cursor_size*e.cellScale.y,l=Math.min(Math.max(h.coords.x,-1+r+e.cellScale.x*2),1-r-e.cellScale.x*2),Y=Math.min(Math.max(h.coords.y,-1+o+e.cellScale.y*2),1-o-e.cellScale.y*2),x=this.mouse.material.uniforms;x.force.value.set(t,i),x.center.value.set(l,Y),x.scale.value.set(e.cursor_size,e.cursor_size),super.update()}}class be extends y{constructor(e){super({material:{vertexShader:g,fragmentShader:xe,uniforms:{boundarySpace:{value:e.boundarySpace},velocity:{value:e.src.texture},velocity_new:{value:e.dst_.texture},v:{value:e.viscous},px:{value:e.cellScale},dt:{value:e.dt}}},output:e.dst,output0:e.dst_,output1:e.dst}),this.init()}update({viscous:e,iterations:t,dt:i}){let r,o;this.uniforms.v.value=e;for(let l=0;l<t;l++)l%2===0?(r=this.props.output0,o=this.props.output1):(r=this.props.output1,o=this.props.output0),this.uniforms.velocity_new.value=r.texture,this.props.output=o,this.uniforms.dt.value=i,super.update();return o}}class Se extends y{constructor(e){super({material:{vertexShader:g,fragmentShader:pe,uniforms:{boundarySpace:{value:e.boundarySpace},velocity:{value:e.src.texture},px:{value:e.cellScale},dt:{value:e.dt}}},output:e.dst}),this.init()}update({vel:e}){this.uniforms.velocity.value=e.texture,super.update()}}class De extends y{constructor(e){super({material:{vertexShader:g,fragmentShader:ge,uniforms:{boundarySpace:{value:e.boundarySpace},pressure:{value:e.dst_.texture},divergence:{value:e.src.texture},px:{value:e.cellScale}}},output:e.dst,output0:e.dst_,output1:e.dst}),this.init()}update({iterations:e}){let t,i;for(let r=0;r<e;r++)r%2===0?(t=this.props.output0,i=this.props.output1):(t=this.props.output1,i=this.props.output0),this.uniforms.pressure.value=t.texture,this.props.output=i,super.update();return i}}class Te extends y{constructor(e){super({material:{vertexShader:g,fragmentShader:ye,uniforms:{boundarySpace:{value:e.boundarySpace},pressure:{value:e.src_p.texture},velocity:{value:e.src_v.texture},px:{value:e.cellScale},dt:{value:e.dt}}},output:e.dst}),this.init()}update({vel:e,pressure:t}){this.uniforms.velocity.value=e.texture,this.uniforms.pressure.value=t.texture,super.update()}}class ze{constructor(e){this.options={iterations_poisson:32,iterations_viscous:32,mouse_force:20,resolution:.5,cursor_size:100,viscous:30,isBounce:!1,dt:.014,isViscous:!1,BFECC:!0,...e},this.fbos={vel_0:null,vel_1:null,vel_viscous0:null,vel_viscous1:null,div:null,pressure_0:null,pressure_1:null},this.fboSize=new a,this.cellScale=new a,this.boundarySpace=new a,this.init()}init(){this.calcSize(),this.createAllFBO(),this.createShaderPass()}getFloatType(){return/(iPad|iPhone|iPod)/i.test(navigator.userAgent)?Be:qe}createAllFBO(){const t={type:this.getFloatType(),depthBuffer:!1,stencilBuffer:!1,minFilter:q,magFilter:q,wrapS:L,wrapT:L};for(let i in this.fbos)this.fbos[i]=new Le(this.fboSize.x,this.fboSize.y,t)}createShaderPass(){this.advection=new _e({cellScale:this.cellScale,fboSize:this.fboSize,dt:this.options.dt,src:this.fbos.vel_0,dst:this.fbos.vel_1}),this.externalForce=new we({cellScale:this.cellScale,cursor_size:this.options.cursor_size,dst:this.fbos.vel_1}),this.viscous=new be({cellScale:this.cellScale,boundarySpace:this.boundarySpace,viscous:this.options.viscous,src:this.fbos.vel_1,dst:this.fbos.vel_viscous1,dst_:this.fbos.vel_viscous0,dt:this.options.dt}),this.divergence=new Se({cellScale:this.cellScale,boundarySpace:this.boundarySpace,src:this.fbos.vel_viscous0,dst:this.fbos.div,dt:this.options.dt}),this.poisson=new De({cellScale:this.cellScale,boundarySpace:this.boundarySpace,src:this.fbos.div,dst:this.fbos.pressure_1,dst_:this.fbos.pressure_0}),this.pressure=new Te({cellScale:this.cellScale,boundarySpace:this.boundarySpace,src_p:this.fbos.pressure_0,src_v:this.fbos.vel_viscous0,dst:this.fbos.vel_0,dt:this.options.dt})}calcSize(){const e=Math.max(1,Math.round(this.options.resolution*n.width)),t=Math.max(1,Math.round(this.options.resolution*n.height)),i=1/e,r=1/t;this.cellScale.set(i,r),this.fboSize.set(e,t)}resize(){this.calcSize();for(let e in this.fbos)this.fbos[e].setSize(this.fboSize.x,this.fboSize.y)}update(){this.options.isBounce?this.boundarySpace.set(0,0):this.boundarySpace.copy(this.cellScale),this.advection.update({dt:this.options.dt,isBounce:this.options.isBounce,BFECC:this.options.BFECC}),this.externalForce.update({cursor_size:this.options.cursor_size,mouse_force:this.options.mouse_force,cellScale:this.cellScale});let e=this.fbos.vel_1;this.options.isViscous&&(e=this.viscous.update({viscous:this.options.viscous,iterations:this.options.iterations_viscous,dt:this.options.dt})),this.divergence.update({vel:e});const t=this.poisson.update({iterations:this.options.iterations_poisson});this.pressure.update({vel:e,pressure:t})}}class Ce{constructor(){this.init()}init(){this.simulation=new ze,this.scene=new ie,this.camera=new se,this.output=new $(new j(2,2),new I({vertexShader:g,fragmentShader:fe,transparent:!0,depthWrite:!1,uniforms:{velocity:{value:this.simulation.fbos.vel_0.texture},boundarySpace:{value:new a},palette:{value:m},bgColor:{value:X}}})),this.scene.add(this.output)}addScene(e){this.scene.add(e)}resize(){this.simulation.resize()}render(){n.renderer.setRenderTarget(null),n.renderer.render(this.scene,this.camera)}update(){this.simulation.update(),this.render()}}class Fe{constructor(e){this.props=e,n.init(e.$wrapper),h.init(e.$wrapper),h.autoIntensity=e.autoIntensity,h.takeoverDuration=e.takeoverDuration,this.lastUserInteraction=performance.now(),h.onInteract=()=>{this.lastUserInteraction=performance.now(),this.autoDriver&&this.autoDriver.forceStop()},this.autoDriver=new he(h,this,{enabled:e.autoDemo,speed:e.autoSpeed,resumeDelay:e.autoResumeDelay,rampDuration:e.autoRampDuration}),this.init(),this._loop=this.loop.bind(this),this._resize=this.resize.bind(this),window.addEventListener("resize",this._resize),this._onVisibility=()=>{document.hidden?this.pause():K.current&&this.start()},document.addEventListener("visibilitychange",this._onVisibility),this.running=!1}init(){this.props.$wrapper.prepend(n.renderer.domElement),this.output=new Ce}resize(){n.resize(),this.output.resize()}render(){this.autoDriver&&this.autoDriver.update(),h.update(),n.update(),this.output.update()}loop(){this.running&&(this.render(),p.current=requestAnimationFrame(this._loop))}start(){this.running||(this.running=!0,this._loop())}pause(){this.running=!1,p.current&&(cancelAnimationFrame(p.current),p.current=null)}dispose(){try{if(window.removeEventListener("resize",this._resize),document.removeEventListener("visibilitychange",this._onVisibility),h.dispose(),n.renderer){const e=n.renderer.domElement;e&&e.parentNode&&e.parentNode.removeChild(e),n.renderer.dispose(),n.renderer.forceContextLoss()}}catch{}}}const v=U.current;v.style.position=v.style.position||"relative",v.style.overflow=v.style.overflow||"hidden";const Z=new Fe({$wrapper:v,autoDemo:M,autoSpeed:E,autoIntensity:A,takeoverDuration:R,autoResumeDelay:k,autoRampDuration:V});u.current=Z,(()=>{var t;if(!u.current)return;const s=(t=u.current.output)==null?void 0:t.simulation;if(!s)return;const e=s.options.resolution;Object.assign(s.options,{mouse_force:_,cursor_size:w,isViscous:b,viscous:S,iterations_viscous:D,iterations_poisson:T,dt:z,BFECC:C,resolution:f,isBounce:F}),f!==e&&s.resize()})(),Z.start();const P=new IntersectionObserver(s=>{const e=s[0],t=e.isIntersecting&&e.intersectionRatio>0;K.current=t,u.current&&(t&&!document.hidden?u.current.start():u.current.pause())},{threshold:[0,.01,.1]});P.observe(v),G.current=P;const ee=new ResizeObserver(()=>{u.current&&(N.current&&cancelAnimationFrame(N.current),N.current=requestAnimationFrame(()=>{u.current&&u.current.resize()}))});return ee.observe(v),H.current=ee,()=>{if(p.current&&cancelAnimationFrame(p.current),H.current)try{H.current.disconnect()}catch{}if(G.current)try{G.current.disconnect()}catch{}u.current&&u.current.dispose(),u.current=null}},[C,w,z,F,b,T,D,_,f,S,J,M,E,A,R,k,V]),d.useEffect(()=>{var B;const c=u.current;if(!c)return;const m=(B=c.output)==null?void 0:B.simulation;if(!m)return;const X=m.options.resolution;Object.assign(m.options,{mouse_force:_,cursor_size:w,isViscous:b,viscous:S,iterations_viscous:D,iterations_poisson:T,dt:z,BFECC:C,resolution:f,isBounce:F}),c.autoDriver&&(c.autoDriver.enabled=M,c.autoDriver.speed=E,c.autoDriver.resumeDelay=k,c.autoDriver.rampDurationMs=V*1e3,c.autoDriver.mouse&&(c.autoDriver.mouse.autoIntensity=A,c.autoDriver.mouse.takeoverDuration=R)),f!==X&&m.resize()},[_,w,b,S,D,T,z,C,f,F,M,E,A,R,k,V]),Me.jsx("div",{ref:U,className:`${Ge["liquid-ether-container"]} ${ce||""}`,style:ue})}ae.__docgenInfo={description:"",methods:[],displayName:"LiquidEther",props:{mouseForce:{defaultValue:{value:"20",computed:!1},required:!1},cursorSize:{defaultValue:{value:"100",computed:!1},required:!1},isViscous:{defaultValue:{value:"false",computed:!1},required:!1},viscous:{defaultValue:{value:"30",computed:!1},required:!1},iterationsViscous:{defaultValue:{value:"32",computed:!1},required:!1},iterationsPoisson:{defaultValue:{value:"32",computed:!1},required:!1},dt:{defaultValue:{value:"0.014",computed:!1},required:!1},BFECC:{defaultValue:{value:"true",computed:!1},required:!1},resolution:{defaultValue:{value:"0.5",computed:!1},required:!1},isBounce:{defaultValue:{value:"false",computed:!1},required:!1},colors:{defaultValue:{value:"['#5227FF', '#FF9FFC', '#B19EEF']",computed:!1},required:!1},style:{defaultValue:{value:"{}",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},autoDemo:{defaultValue:{value:"true",computed:!1},required:!1},autoSpeed:{defaultValue:{value:"0.5",computed:!1},required:!1},autoIntensity:{defaultValue:{value:"2.2",computed:!1},required:!1},takeoverDuration:{defaultValue:{value:"0.25",computed:!1},required:!1},autoResumeDelay:{defaultValue:{value:"1000",computed:!1},required:!1},autoRampDuration:{defaultValue:{value:"0.6",computed:!1},required:!1}}};const $e={title:"ReactBits/Backgrounds/LiquidEther",component:ae,parameters:{layout:"fullscreen"},tags:["autodocs"]},O={};var re,oe,ne;O.parameters={...O.parameters,docs:{...(re=O.parameters)==null?void 0:re.docs,source:{originalSource:"{}",...(ne=(oe=O.parameters)==null?void 0:oe.docs)==null?void 0:ne.source}}};const je=["Default"];export{O as Default,je as __namedExportsOrder,$e as default};
|
|
161
|
+
`;class y{constructor(e){var t;this.props=e||{},this.uniforms=(t=this.props.material)==null?void 0:t.uniforms,this.scene=null,this.camera=null,this.material=null,this.geometry=null,this.plane=null}init(){this.scene=new ie,this.camera=new se,this.uniforms&&(this.material=new I(this.props.material),this.geometry=new j(2,2),this.plane=new $(this.geometry,this.material),this.scene.add(this.plane))}update(){n.renderer.setRenderTarget(this.props.output||null),n.renderer.render(this.scene,this.camera),n.renderer.setRenderTarget(null)}}class _e extends y{constructor(e){super({material:{vertexShader:g,fragmentShader:Q,uniforms:{boundarySpace:{value:e.cellScale},px:{value:e.cellScale},fboSize:{value:e.fboSize},velocity:{value:e.src.texture},dt:{value:e.dt},isBFECC:{value:!0}}},output:e.dst}),this.uniforms=this.props.material.uniforms,this.init()}init(){super.init(),this.createBoundary()}createBoundary(){const e=new Ie,t=new Float32Array([-1,-1,0,-1,1,0,-1,1,0,1,1,0,1,1,0,1,-1,0,1,-1,0,-1,-1,0]);e.setAttribute("position",new Oe(t,3));const i=new I({vertexShader:de,fragmentShader:Q,uniforms:this.uniforms});this.line=new Ue(e,i),this.scene.add(this.line)}update({dt:e,isBounce:t,BFECC:i}){this.uniforms.dt.value=e,this.line.visible=t,this.uniforms.isBFECC.value=i,super.update()}}class we extends y{constructor(e){super({output:e.dst}),this.init(e)}init(e){super.init();const t=new j(1,1),i=new I({vertexShader:ve,fragmentShader:me,blending:He,depthWrite:!1,uniforms:{px:{value:e.cellScale},force:{value:new a(0,0)},center:{value:new a(0,0)},scale:{value:new a(e.cursor_size,e.cursor_size)}}});this.mouse=new $(t,i),this.scene.add(this.mouse)}update(e){const t=h.diff.x/2*e.mouse_force,i=h.diff.y/2*e.mouse_force,r=e.cursor_size*e.cellScale.x,o=e.cursor_size*e.cellScale.y,l=Math.min(Math.max(h.coords.x,-1+r+e.cellScale.x*2),1-r-e.cellScale.x*2),Y=Math.min(Math.max(h.coords.y,-1+o+e.cellScale.y*2),1-o-e.cellScale.y*2),x=this.mouse.material.uniforms;x.force.value.set(t,i),x.center.value.set(l,Y),x.scale.value.set(e.cursor_size,e.cursor_size),super.update()}}class be extends y{constructor(e){super({material:{vertexShader:g,fragmentShader:xe,uniforms:{boundarySpace:{value:e.boundarySpace},velocity:{value:e.src.texture},velocity_new:{value:e.dst_.texture},v:{value:e.viscous},px:{value:e.cellScale},dt:{value:e.dt}}},output:e.dst,output0:e.dst_,output1:e.dst}),this.init()}update({viscous:e,iterations:t,dt:i}){let r,o;this.uniforms.v.value=e;for(let l=0;l<t;l++)l%2===0?(r=this.props.output0,o=this.props.output1):(r=this.props.output1,o=this.props.output0),this.uniforms.velocity_new.value=r.texture,this.props.output=o,this.uniforms.dt.value=i,super.update();return o}}class Se extends y{constructor(e){super({material:{vertexShader:g,fragmentShader:pe,uniforms:{boundarySpace:{value:e.boundarySpace},velocity:{value:e.src.texture},px:{value:e.cellScale},dt:{value:e.dt}}},output:e.dst}),this.init()}update({vel:e}){this.uniforms.velocity.value=e.texture,super.update()}}class De extends y{constructor(e){super({material:{vertexShader:g,fragmentShader:ge,uniforms:{boundarySpace:{value:e.boundarySpace},pressure:{value:e.dst_.texture},divergence:{value:e.src.texture},px:{value:e.cellScale}}},output:e.dst,output0:e.dst_,output1:e.dst}),this.init()}update({iterations:e}){let t,i;for(let r=0;r<e;r++)r%2===0?(t=this.props.output0,i=this.props.output1):(t=this.props.output1,i=this.props.output0),this.uniforms.pressure.value=t.texture,this.props.output=i,super.update();return i}}class Te extends y{constructor(e){super({material:{vertexShader:g,fragmentShader:ye,uniforms:{boundarySpace:{value:e.boundarySpace},pressure:{value:e.src_p.texture},velocity:{value:e.src_v.texture},px:{value:e.cellScale},dt:{value:e.dt}}},output:e.dst}),this.init()}update({vel:e,pressure:t}){this.uniforms.velocity.value=e.texture,this.uniforms.pressure.value=t.texture,super.update()}}class ze{constructor(e){this.options={iterations_poisson:32,iterations_viscous:32,mouse_force:20,resolution:.5,cursor_size:100,viscous:30,isBounce:!1,dt:.014,isViscous:!1,BFECC:!0,...e},this.fbos={vel_0:null,vel_1:null,vel_viscous0:null,vel_viscous1:null,div:null,pressure_0:null,pressure_1:null},this.fboSize=new a,this.cellScale=new a,this.boundarySpace=new a,this.init()}init(){this.calcSize(),this.createAllFBO(),this.createShaderPass()}getFloatType(){return/(iPad|iPhone|iPod)/i.test(navigator.userAgent)?Be:qe}createAllFBO(){const t={type:this.getFloatType(),depthBuffer:!1,stencilBuffer:!1,minFilter:q,magFilter:q,wrapS:L,wrapT:L};for(let i in this.fbos)this.fbos[i]=new Le(this.fboSize.x,this.fboSize.y,t)}createShaderPass(){this.advection=new _e({cellScale:this.cellScale,fboSize:this.fboSize,dt:this.options.dt,src:this.fbos.vel_0,dst:this.fbos.vel_1}),this.externalForce=new we({cellScale:this.cellScale,cursor_size:this.options.cursor_size,dst:this.fbos.vel_1}),this.viscous=new be({cellScale:this.cellScale,boundarySpace:this.boundarySpace,viscous:this.options.viscous,src:this.fbos.vel_1,dst:this.fbos.vel_viscous1,dst_:this.fbos.vel_viscous0,dt:this.options.dt}),this.divergence=new Se({cellScale:this.cellScale,boundarySpace:this.boundarySpace,src:this.fbos.vel_viscous0,dst:this.fbos.div,dt:this.options.dt}),this.poisson=new De({cellScale:this.cellScale,boundarySpace:this.boundarySpace,src:this.fbos.div,dst:this.fbos.pressure_1,dst_:this.fbos.pressure_0}),this.pressure=new Te({cellScale:this.cellScale,boundarySpace:this.boundarySpace,src_p:this.fbos.pressure_0,src_v:this.fbos.vel_viscous0,dst:this.fbos.vel_0,dt:this.options.dt})}calcSize(){const e=Math.max(1,Math.round(this.options.resolution*n.width)),t=Math.max(1,Math.round(this.options.resolution*n.height)),i=1/e,r=1/t;this.cellScale.set(i,r),this.fboSize.set(e,t)}resize(){this.calcSize();for(let e in this.fbos)this.fbos[e].setSize(this.fboSize.x,this.fboSize.y)}update(){this.options.isBounce?this.boundarySpace.set(0,0):this.boundarySpace.copy(this.cellScale),this.advection.update({dt:this.options.dt,isBounce:this.options.isBounce,BFECC:this.options.BFECC}),this.externalForce.update({cursor_size:this.options.cursor_size,mouse_force:this.options.mouse_force,cellScale:this.cellScale});let e=this.fbos.vel_1;this.options.isViscous&&(e=this.viscous.update({viscous:this.options.viscous,iterations:this.options.iterations_viscous,dt:this.options.dt})),this.divergence.update({vel:e});const t=this.poisson.update({iterations:this.options.iterations_poisson});this.pressure.update({vel:e,pressure:t})}}class Ce{constructor(){this.init()}init(){this.simulation=new ze,this.scene=new ie,this.camera=new se,this.output=new $(new j(2,2),new I({vertexShader:g,fragmentShader:fe,transparent:!0,depthWrite:!1,uniforms:{velocity:{value:this.simulation.fbos.vel_0.texture},boundarySpace:{value:new a},palette:{value:m},bgColor:{value:X}}})),this.scene.add(this.output)}addScene(e){this.scene.add(e)}resize(){this.simulation.resize()}render(){n.renderer.setRenderTarget(null),n.renderer.render(this.scene,this.camera)}update(){this.simulation.update(),this.render()}}class Fe{constructor(e){this.props=e,n.init(e.$wrapper),h.init(e.$wrapper),h.autoIntensity=e.autoIntensity,h.takeoverDuration=e.takeoverDuration,this.lastUserInteraction=performance.now(),h.onInteract=()=>{this.lastUserInteraction=performance.now(),this.autoDriver&&this.autoDriver.forceStop()},this.autoDriver=new he(h,this,{enabled:e.autoDemo,speed:e.autoSpeed,resumeDelay:e.autoResumeDelay,rampDuration:e.autoRampDuration}),this.init(),this._loop=this.loop.bind(this),this._resize=this.resize.bind(this),window.addEventListener("resize",this._resize),this._onVisibility=()=>{document.hidden?this.pause():K.current&&this.start()},document.addEventListener("visibilitychange",this._onVisibility),this.running=!1}init(){this.props.$wrapper.prepend(n.renderer.domElement),this.output=new Ce}resize(){n.resize(),this.output.resize()}render(){this.autoDriver&&this.autoDriver.update(),h.update(),n.update(),this.output.update()}loop(){this.running&&(this.render(),p.current=requestAnimationFrame(this._loop))}start(){this.running||(this.running=!0,this._loop())}pause(){this.running=!1,p.current&&(cancelAnimationFrame(p.current),p.current=null)}dispose(){try{if(window.removeEventListener("resize",this._resize),document.removeEventListener("visibilitychange",this._onVisibility),h.dispose(),n.renderer){const e=n.renderer.domElement;e&&e.parentNode&&e.parentNode.removeChild(e),n.renderer.dispose(),n.renderer.forceContextLoss()}}catch{}}}const v=U.current;v.style.position=v.style.position||"relative",v.style.overflow=v.style.overflow||"hidden";const Z=new Fe({$wrapper:v,autoDemo:M,autoSpeed:E,autoIntensity:A,takeoverDuration:R,autoResumeDelay:k,autoRampDuration:V});u.current=Z,(()=>{var t;if(!u.current)return;const s=(t=u.current.output)==null?void 0:t.simulation;if(!s)return;const e=s.options.resolution;Object.assign(s.options,{mouse_force:_,cursor_size:w,isViscous:b,viscous:S,iterations_viscous:D,iterations_poisson:T,dt:z,BFECC:C,resolution:f,isBounce:F}),f!==e&&s.resize()})(),Z.start();const P=new IntersectionObserver(s=>{const e=s[0],t=e.isIntersecting&&e.intersectionRatio>0;K.current=t,u.current&&(t&&!document.hidden?u.current.start():u.current.pause())},{threshold:[0,.01,.1]});P.observe(v),G.current=P;const ee=new ResizeObserver(()=>{u.current&&(N.current&&cancelAnimationFrame(N.current),N.current=requestAnimationFrame(()=>{u.current&&u.current.resize()}))});return ee.observe(v),H.current=ee,()=>{if(p.current&&cancelAnimationFrame(p.current),H.current)try{H.current.disconnect()}catch{}if(G.current)try{G.current.disconnect()}catch{}u.current&&u.current.dispose(),u.current=null}},[C,w,z,F,b,T,D,_,f,S,J,M,E,A,R,k,V]),d.useEffect(()=>{var B;const c=u.current;if(!c)return;const m=(B=c.output)==null?void 0:B.simulation;if(!m)return;const X=m.options.resolution;Object.assign(m.options,{mouse_force:_,cursor_size:w,isViscous:b,viscous:S,iterations_viscous:D,iterations_poisson:T,dt:z,BFECC:C,resolution:f,isBounce:F}),c.autoDriver&&(c.autoDriver.enabled=M,c.autoDriver.speed=E,c.autoDriver.resumeDelay=k,c.autoDriver.rampDurationMs=V*1e3,c.autoDriver.mouse&&(c.autoDriver.mouse.autoIntensity=A,c.autoDriver.mouse.takeoverDuration=R)),f!==X&&m.resize()},[_,w,b,S,D,T,z,C,f,F,M,E,A,R,k,V]),Me.jsx("div",{ref:U,className:`${Ge["liquid-ether-container"]} ${ce||""}`,style:ue})}ae.__docgenInfo={description:"",methods:[],displayName:"LiquidEther",props:{mouseForce:{defaultValue:{value:"20",computed:!1},required:!1},cursorSize:{defaultValue:{value:"100",computed:!1},required:!1},isViscous:{defaultValue:{value:"false",computed:!1},required:!1},viscous:{defaultValue:{value:"30",computed:!1},required:!1},iterationsViscous:{defaultValue:{value:"32",computed:!1},required:!1},iterationsPoisson:{defaultValue:{value:"32",computed:!1},required:!1},dt:{defaultValue:{value:"0.014",computed:!1},required:!1},BFECC:{defaultValue:{value:"true",computed:!1},required:!1},resolution:{defaultValue:{value:"0.5",computed:!1},required:!1},isBounce:{defaultValue:{value:"false",computed:!1},required:!1},colors:{defaultValue:{value:"['#5227FF', '#FF9FFC', '#B19EEF']",computed:!1},required:!1},style:{defaultValue:{value:"{}",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},autoDemo:{defaultValue:{value:"true",computed:!1},required:!1},autoSpeed:{defaultValue:{value:"0.5",computed:!1},required:!1},autoIntensity:{defaultValue:{value:"2.2",computed:!1},required:!1},takeoverDuration:{defaultValue:{value:"0.25",computed:!1},required:!1},autoResumeDelay:{defaultValue:{value:"1000",computed:!1},required:!1},autoRampDuration:{defaultValue:{value:"0.6",computed:!1},required:!1}}};const $e={title:"ReactBits/Backgrounds/LiquidEther",component:ae,parameters:{layout:"fullscreen"}},O={};var re,oe,ne;O.parameters={...O.parameters,docs:{...(re=O.parameters)==null?void 0:re.docs,source:{originalSource:"{}",...(ne=(oe=O.parameters)==null?void 0:oe.docs)==null?void 0:ne.source}}};const je=["Default"];export{O as Default,je as __namedExportsOrder,$e as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as o,j as n}from"./iframe-
|
|
1
|
+
import{r as o,j as n}from"./iframe-Cw8dCV4Z.js";import{A as L}from"./index-CzApopWo.js";import{m as a}from"./proxy-p8L3T_Zy.js";const q="_loadingContainer_n9pf7_1",N="_fullScreen_n9pf7_17",A="_overlay_n9pf7_30",V="_shimmer_n9pf7_1",z="_small_n9pf7_58",M="_loadingText_n9pf7_63",P="_medium_n9pf7_67",O="_large_n9pf7_72",W="_dotsSpinner_n9pf7_82",E="_dot1_n9pf7_100",F="_dot2_n9pf7_101",G="_dot3_n9pf7_102",J="_circleSpinner_n9pf7_153",B="_pulseSpinner_n9pf7_175",D="_textGradient_n9pf7_1",R="_sparkleContainer_n9pf7_226",$="_sparkle_n9pf7_226",e={loadingContainer:q,fullScreen:N,overlay:A,shimmer:V,small:z,loadingText:M,medium:P,large:O,dotsSpinner:W,dot1:E,dot2:F,dot3:G,circleSpinner:J,pulseSpinner:B,textGradient:D,sparkleContainer:R,sparkle:$},U=["Loading your content...","Just a moment please...","Preparing something awesome...","Almost ready...","Working on it...","Just a sec...","Loading with care...","Getting things ready...","Almost there...","Polishing the details..."],X=({message:s,size:g="medium",variant:l="dots",className:y="",showMessage:r=!0,customMessages:_,messageRotationInterval:d=2500,showSparkles:h=!0,fullScreen:v=!1,overlay:S=!1,color:p,backgroundColor:c})=>{const i=_||U,[u,x]=o.useState(0),[m,C]=o.useState(s||i[0]);o.useEffect(()=>{if(!s&&r){const f=setInterval(()=>{x(t=>(t+1)%i.length)},d);return()=>clearInterval(f)}},[s,r,i.length,d]),o.useEffect(()=>{!s&&r&&C(i[u])},[u,s,i,r]);const T=[e.loadingContainer,e[g],e[l],v&&e.fullScreen,S&&e.overlay,y].filter(Boolean).join(" "),I={...p&&{"--spinner-color":p},...c&&{"--spinner-background":c}},b=()=>n.jsxs(a.div,{className:e.dotsSpinner,animate:{rotate:360},transition:{duration:2,repeat:1/0,ease:"linear"},children:[n.jsx(a.div,{className:e.dot1,animate:{scale:[1,1.3,1],y:[0,-6,0]},transition:{duration:1.5,repeat:1/0,ease:"easeInOut",delay:0}}),n.jsx(a.div,{className:e.dot2,animate:{scale:[1,1.3,1],y:[0,-6,0]},transition:{duration:1.5,repeat:1/0,ease:"easeInOut",delay:.5}}),n.jsx(a.div,{className:e.dot3,animate:{scale:[1,1.3,1],y:[0,-6,0]},transition:{duration:1.5,repeat:1/0,ease:"easeInOut",delay:1}})]}),k=()=>n.jsx(a.div,{className:e.circleSpinner,animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"}}),w=()=>n.jsx(a.div,{className:e.pulseSpinner,animate:{scale:[1,1.2,1],opacity:[1,.7,1]},transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}}),j=()=>{switch(l){case"spinner":return k();case"pulse":return w();case"dots":default:return b()}};return n.jsxs("div",{className:T,style:I,children:[j(),r&&n.jsx(L,{mode:"wait",children:n.jsx(a.p,{className:e.loadingText,initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.4,ease:"easeOut"},children:m},m)}),h&&n.jsx("div",{className:e.sparkleContainer,children:[...Array(4)].map((f,t)=>n.jsx(a.div,{className:e.sparkle,animate:{opacity:[0,1,0],scale:[.5,1,.5],rotate:[0,180,360]},transition:{duration:3,repeat:1/0,delay:t*.75,ease:"easeInOut"},style:{left:`${20+t%2*60}%`,top:`${20+Math.floor(t/2)*60}%`}},t))})]})};X.__docgenInfo={description:`LoadingSpinner Component
|
|
2
2
|
|
|
3
3
|
@component
|
|
4
4
|
@description
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import{L as u}from"./LoadingSpinner-DaUSIVPY.js";import"./iframe-Cw8dCV4Z.js";import"./preload-helper-C1FmrZbK.js";import"./index-CzApopWo.js";import"./proxy-p8L3T_Zy.js";import"./MotionConfigContext-BCa1jVYq.js";const f={title:"Atoms/LoadingSpinner",component:u,parameters:{layout:"centered",docs:{description:{component:"An animated loading spinner with multiple variants and customizable messages. Features smooth Framer Motion animations and accessibility support."}}},argTypes:{size:{control:{type:"select"},options:["small","medium","large"]},variant:{control:{type:"select"},options:["dots","spinner","pulse"]},message:{control:{type:"text"}},showMessage:{control:{type:"boolean"}},showSparkles:{control:{type:"boolean"}},fullScreen:{control:{type:"boolean"}},overlay:{control:{type:"boolean"}},color:{control:{type:"color"}},backgroundColor:{control:{type:"color"}},messageRotationInterval:{control:{type:"number",min:500,max:1e4,step:500}}}},e={args:{variant:"dots",size:"medium"}},o={args:{variant:"spinner",size:"medium",customMessages:["Processing your request...","Almost ready...","Just a few more seconds...","Finalizing details..."],messageRotationInterval:1500}},s={args:{variant:"dots",size:"large",message:"Loading application...",fullScreen:!0,overlay:!0}};var a,r,t;e.parameters={...e.parameters,docs:{...(a=e.parameters)==null?void 0:a.docs,source:{originalSource:`{
|
|
2
|
+
args: {
|
|
3
|
+
variant: 'dots',
|
|
4
|
+
size: 'medium'
|
|
5
|
+
}
|
|
6
|
+
}`,...(t=(r=e.parameters)==null?void 0:r.docs)==null?void 0:t.source}}};var n,i,l;o.parameters={...o.parameters,docs:{...(n=o.parameters)==null?void 0:n.docs,source:{originalSource:`{
|
|
7
|
+
args: {
|
|
8
|
+
variant: 'spinner',
|
|
9
|
+
size: 'medium',
|
|
10
|
+
customMessages: ['Processing your request...', 'Almost ready...', 'Just a few more seconds...', 'Finalizing details...'],
|
|
11
|
+
messageRotationInterval: 1500
|
|
12
|
+
}
|
|
13
|
+
}`,...(l=(i=o.parameters)==null?void 0:i.docs)==null?void 0:l.source}}};var c,m,p;s.parameters={...s.parameters,docs:{...(c=s.parameters)==null?void 0:c.docs,source:{originalSource:`{
|
|
14
|
+
args: {
|
|
15
|
+
variant: 'dots',
|
|
16
|
+
size: 'large',
|
|
17
|
+
message: 'Loading application...',
|
|
18
|
+
fullScreen: true,
|
|
19
|
+
overlay: true
|
|
20
|
+
}
|
|
21
|
+
}`,...(p=(m=s.parameters)==null?void 0:m.docs)==null?void 0:p.source}}};const b=["Default","RotatingMessages","FullScreenOverlay"];export{e as Default,s as FullScreenOverlay,o as RotatingMessages,b as __namedExportsOrder,f as default};
|
package/storybook-static/assets/{MagicRings.stories-D50m_2UF.js → MagicRings.stories-CZt-cHcL.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as o,j as ee}from"./iframe-
|
|
1
|
+
import{r as o,j as ee}from"./iframe-Cw8dCV4Z.js";import{W as ae,S as ue,a as te,d as E,n as L,i as oe,M as ne,q as le}from"./three.module--_vTUKhS.js";import"./preload-helper-C1FmrZbK.js";const re={"magic-rings-container":"_magic-rings-container_15l2r_1"},se=`
|
|
2
2
|
void main() {
|
|
3
3
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
4
4
|
}
|
|
@@ -54,7 +54,7 @@ void main() {
|
|
|
54
54
|
c += (n - 0.5) * uNoiseAmount;
|
|
55
55
|
gl_FragColor = vec4(c, max(c.r, max(c.g, c.b)) * uOpacity);
|
|
56
56
|
}
|
|
57
|
-
`;function b({color:k="#fc42ff",colorTwo:B="#42fcff",speed:F=1,ringCount:O=6,attenuation:H=10,lineThickness:G=2,baseRadius:P=.35,radiusStep:_=.1,scaleRate:z=.1,opacity:N=1,blur:p=0,noiseAmount:Y=.1,rotation:j=0,ringGap:W=1.5,fadeIn:D=.7,fadeOut:$=.5,followMouse:X=!1,mouseInfluence:J=.2,hoverScale:K=1.2,parallax:Q=.05,clickBurst:U=!1}){const R=o.useRef(null),g=o.useRef(null),l=o.useRef([0,0]),r=o.useRef([0,0]),f=o.useRef(0),d=o.useRef(!1),s=o.useRef(0);return g.current={color:k,colorTwo:B,speed:F,ringCount:O,attenuation:H,lineThickness:G,baseRadius:P,radiusStep:_,scaleRate:z,opacity:N,noiseAmount:Y,rotation:j,ringGap:W,fadeIn:D,fadeOut:$,followMouse:X,mouseInfluence:J,hoverScale:K,parallax:Q,clickBurst:U},o.useEffect(()=>{const u=R.current;if(!u)return;let t;try{t=new ae({alpha:!0})}catch{return}if(!t.capabilities.isWebGL2){t.dispose();return}t.setClearColor(0,0),u.appendChild(t.domElement);const h=new ue,x=new te(-.5,.5,.5,-.5,.1,10);x.position.z=1;const a={uTime:{value:0},uAttenuation:{value:0},uResolution:{value:new E},uColor:{value:new L},uColorTwo:{value:new L},uLineThickness:{value:0},uBaseRadius:{value:0},uRadiusStep:{value:0},uScaleRate:{value:0},uRingCount:{value:0},uOpacity:{value:1},uNoiseAmount:{value:0},uRotation:{value:0},uRingGap:{value:1.6},uFadeIn:{value:.5},uFadeOut:{value:.75},uMouse:{value:new E},uMouseInfluence:{value:0},uHoverAmount:{value:0},uHoverScale:{value:1},uParallax:{value:0},uBurst:{value:0}},C=new oe({vertexShader:se,fragmentShader:ie,uniforms:a,transparent:!0}),Z=new ne(new le(1,1),C);h.add(Z);const i=()=>{const n=u.clientWidth,e=u.clientHeight,v=Math.min(window.devicePixelRatio,2);t.setSize(n,e),t.setPixelRatio(v),a.uResolution.value.set(n*v,e*v)};i(),window.addEventListener("resize",i);const w=new ResizeObserver(i);w.observe(u);const M=n=>{const e=u.getBoundingClientRect();l.current[0]=(n.clientX-e.left)/e.width-.5,l.current[1]=-((n.clientY-e.top)/e.height-.5)},S=()=>{d.current=!0},q=()=>{d.current=!1,l.current[0]=0,l.current[1]=0},V=()=>{s.current=1};u.addEventListener("mousemove",M),u.addEventListener("mouseenter",S),u.addEventListener("mouseleave",q),u.addEventListener("click",V);let m;const A=n=>{m=requestAnimationFrame(A);const e=g.current;r.current[0]+=(l.current[0]-r.current[0])*.08,r.current[1]+=(l.current[1]-r.current[1])*.08,f.current+=((d.current?1:0)-f.current)*.08,s.current*=.95,s.current<.001&&(s.current=0),a.uTime.value=n*.001*e.speed,a.uAttenuation.value=e.attenuation,a.uColor.value.set(e.color),a.uColorTwo.value.set(e.colorTwo),a.uLineThickness.value=e.lineThickness,a.uBaseRadius.value=e.baseRadius,a.uRadiusStep.value=e.radiusStep,a.uScaleRate.value=e.scaleRate,a.uRingCount.value=e.ringCount,a.uOpacity.value=e.opacity,a.uNoiseAmount.value=e.noiseAmount,a.uRotation.value=e.rotation*Math.PI/180,a.uRingGap.value=e.ringGap,a.uFadeIn.value=e.fadeIn,a.uFadeOut.value=e.fadeOut,a.uMouse.value.set(r.current[0],r.current[1]),a.uMouseInfluence.value=e.followMouse?e.mouseInfluence:0,a.uHoverAmount.value=f.current,a.uHoverScale.value=e.hoverScale,a.uParallax.value=e.parallax,a.uBurst.value=e.clickBurst?s.current:0,t.render(h,x)};return m=requestAnimationFrame(A),()=>{cancelAnimationFrame(m),window.removeEventListener("resize",i),w.disconnect(),u.removeEventListener("mousemove",M),u.removeEventListener("mouseenter",S),u.removeEventListener("mouseleave",q),u.removeEventListener("click",V),u.removeChild(t.domElement),t.dispose(),C.dispose()}},[]),ee.jsx("div",{ref:R,className:`${re["magic-rings-container"]}`,style:p>0?{filter:`blur(${p}px)`}:void 0})}b.__docgenInfo={description:"",methods:[],displayName:"MagicRings",props:{color:{defaultValue:{value:"'#fc42ff'",computed:!1},required:!1},colorTwo:{defaultValue:{value:"'#42fcff'",computed:!1},required:!1},speed:{defaultValue:{value:"1",computed:!1},required:!1},ringCount:{defaultValue:{value:"6",computed:!1},required:!1},attenuation:{defaultValue:{value:"10",computed:!1},required:!1},lineThickness:{defaultValue:{value:"2",computed:!1},required:!1},baseRadius:{defaultValue:{value:"0.35",computed:!1},required:!1},radiusStep:{defaultValue:{value:"0.1",computed:!1},required:!1},scaleRate:{defaultValue:{value:"0.1",computed:!1},required:!1},opacity:{defaultValue:{value:"1",computed:!1},required:!1},blur:{defaultValue:{value:"0",computed:!1},required:!1},noiseAmount:{defaultValue:{value:"0.1",computed:!1},required:!1},rotation:{defaultValue:{value:"0",computed:!1},required:!1},ringGap:{defaultValue:{value:"1.5",computed:!1},required:!1},fadeIn:{defaultValue:{value:"0.7",computed:!1},required:!1},fadeOut:{defaultValue:{value:"0.5",computed:!1},required:!1},followMouse:{defaultValue:{value:"false",computed:!1},required:!1},mouseInfluence:{defaultValue:{value:"0.2",computed:!1},required:!1},hoverScale:{defaultValue:{value:"1.2",computed:!1},required:!1},parallax:{defaultValue:{value:"0.05",computed:!1},required:!1},clickBurst:{defaultValue:{value:"false",computed:!1},required:!1}}};const me={title:"ReactBits/Animations/MagicRings",component:b,parameters:{layout:"fullscreen"}
|
|
57
|
+
`;function b({color:k="#fc42ff",colorTwo:B="#42fcff",speed:F=1,ringCount:O=6,attenuation:H=10,lineThickness:G=2,baseRadius:P=.35,radiusStep:_=.1,scaleRate:z=.1,opacity:N=1,blur:p=0,noiseAmount:Y=.1,rotation:j=0,ringGap:W=1.5,fadeIn:D=.7,fadeOut:$=.5,followMouse:X=!1,mouseInfluence:J=.2,hoverScale:K=1.2,parallax:Q=.05,clickBurst:U=!1}){const R=o.useRef(null),g=o.useRef(null),l=o.useRef([0,0]),r=o.useRef([0,0]),f=o.useRef(0),d=o.useRef(!1),s=o.useRef(0);return g.current={color:k,colorTwo:B,speed:F,ringCount:O,attenuation:H,lineThickness:G,baseRadius:P,radiusStep:_,scaleRate:z,opacity:N,noiseAmount:Y,rotation:j,ringGap:W,fadeIn:D,fadeOut:$,followMouse:X,mouseInfluence:J,hoverScale:K,parallax:Q,clickBurst:U},o.useEffect(()=>{const u=R.current;if(!u)return;let t;try{t=new ae({alpha:!0})}catch{return}if(!t.capabilities.isWebGL2){t.dispose();return}t.setClearColor(0,0),u.appendChild(t.domElement);const h=new ue,x=new te(-.5,.5,.5,-.5,.1,10);x.position.z=1;const a={uTime:{value:0},uAttenuation:{value:0},uResolution:{value:new E},uColor:{value:new L},uColorTwo:{value:new L},uLineThickness:{value:0},uBaseRadius:{value:0},uRadiusStep:{value:0},uScaleRate:{value:0},uRingCount:{value:0},uOpacity:{value:1},uNoiseAmount:{value:0},uRotation:{value:0},uRingGap:{value:1.6},uFadeIn:{value:.5},uFadeOut:{value:.75},uMouse:{value:new E},uMouseInfluence:{value:0},uHoverAmount:{value:0},uHoverScale:{value:1},uParallax:{value:0},uBurst:{value:0}},C=new oe({vertexShader:se,fragmentShader:ie,uniforms:a,transparent:!0}),Z=new ne(new le(1,1),C);h.add(Z);const i=()=>{const n=u.clientWidth,e=u.clientHeight,v=Math.min(window.devicePixelRatio,2);t.setSize(n,e),t.setPixelRatio(v),a.uResolution.value.set(n*v,e*v)};i(),window.addEventListener("resize",i);const w=new ResizeObserver(i);w.observe(u);const M=n=>{const e=u.getBoundingClientRect();l.current[0]=(n.clientX-e.left)/e.width-.5,l.current[1]=-((n.clientY-e.top)/e.height-.5)},S=()=>{d.current=!0},q=()=>{d.current=!1,l.current[0]=0,l.current[1]=0},V=()=>{s.current=1};u.addEventListener("mousemove",M),u.addEventListener("mouseenter",S),u.addEventListener("mouseleave",q),u.addEventListener("click",V);let m;const A=n=>{m=requestAnimationFrame(A);const e=g.current;r.current[0]+=(l.current[0]-r.current[0])*.08,r.current[1]+=(l.current[1]-r.current[1])*.08,f.current+=((d.current?1:0)-f.current)*.08,s.current*=.95,s.current<.001&&(s.current=0),a.uTime.value=n*.001*e.speed,a.uAttenuation.value=e.attenuation,a.uColor.value.set(e.color),a.uColorTwo.value.set(e.colorTwo),a.uLineThickness.value=e.lineThickness,a.uBaseRadius.value=e.baseRadius,a.uRadiusStep.value=e.radiusStep,a.uScaleRate.value=e.scaleRate,a.uRingCount.value=e.ringCount,a.uOpacity.value=e.opacity,a.uNoiseAmount.value=e.noiseAmount,a.uRotation.value=e.rotation*Math.PI/180,a.uRingGap.value=e.ringGap,a.uFadeIn.value=e.fadeIn,a.uFadeOut.value=e.fadeOut,a.uMouse.value.set(r.current[0],r.current[1]),a.uMouseInfluence.value=e.followMouse?e.mouseInfluence:0,a.uHoverAmount.value=f.current,a.uHoverScale.value=e.hoverScale,a.uParallax.value=e.parallax,a.uBurst.value=e.clickBurst?s.current:0,t.render(h,x)};return m=requestAnimationFrame(A),()=>{cancelAnimationFrame(m),window.removeEventListener("resize",i),w.disconnect(),u.removeEventListener("mousemove",M),u.removeEventListener("mouseenter",S),u.removeEventListener("mouseleave",q),u.removeEventListener("click",V),u.removeChild(t.domElement),t.dispose(),C.dispose()}},[]),ee.jsx("div",{ref:R,className:`${re["magic-rings-container"]}`,style:p>0?{filter:`blur(${p}px)`}:void 0})}b.__docgenInfo={description:"",methods:[],displayName:"MagicRings",props:{color:{defaultValue:{value:"'#fc42ff'",computed:!1},required:!1},colorTwo:{defaultValue:{value:"'#42fcff'",computed:!1},required:!1},speed:{defaultValue:{value:"1",computed:!1},required:!1},ringCount:{defaultValue:{value:"6",computed:!1},required:!1},attenuation:{defaultValue:{value:"10",computed:!1},required:!1},lineThickness:{defaultValue:{value:"2",computed:!1},required:!1},baseRadius:{defaultValue:{value:"0.35",computed:!1},required:!1},radiusStep:{defaultValue:{value:"0.1",computed:!1},required:!1},scaleRate:{defaultValue:{value:"0.1",computed:!1},required:!1},opacity:{defaultValue:{value:"1",computed:!1},required:!1},blur:{defaultValue:{value:"0",computed:!1},required:!1},noiseAmount:{defaultValue:{value:"0.1",computed:!1},required:!1},rotation:{defaultValue:{value:"0",computed:!1},required:!1},ringGap:{defaultValue:{value:"1.5",computed:!1},required:!1},fadeIn:{defaultValue:{value:"0.7",computed:!1},required:!1},fadeOut:{defaultValue:{value:"0.5",computed:!1},required:!1},followMouse:{defaultValue:{value:"false",computed:!1},required:!1},mouseInfluence:{defaultValue:{value:"0.2",computed:!1},required:!1},hoverScale:{defaultValue:{value:"1.2",computed:!1},required:!1},parallax:{defaultValue:{value:"0.05",computed:!1},required:!1},clickBurst:{defaultValue:{value:"false",computed:!1},required:!1}}};const me={title:"ReactBits/Animations/MagicRings",component:b,parameters:{layout:"fullscreen"}},c={args:{color:"#fc42ff",colorTwo:"#42fcff",speed:1,ringCount:6,attenuation:10,lineThickness:2,baseRadius:.35,radiusStep:.1,scaleRate:.1,opacity:1,blur:0,noiseAmount:.1,rotation:0,ringGap:1.5,fadeIn:.7,fadeOut:.5,followMouse:!1,mouseInfluence:.2,hoverScale:1.2,parallax:.05,clickBurst:!1}};var T,I,y;c.parameters={...c.parameters,docs:{...(T=c.parameters)==null?void 0:T.docs,source:{originalSource:`{
|
|
58
58
|
args: {
|
|
59
59
|
color: '#fc42ff',
|
|
60
60
|
colorTwo: '#42fcff',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,j as v}from"./iframe-
|
|
1
|
+
import{r as t,j as v}from"./iframe-Cw8dCV4Z.js";import"./preload-helper-C1FmrZbK.js";const y=({children:w,padding:a=100,disabled:i=!1,magnetStrength:n=2,activeTransition:N="transform 0.3s ease-out",inactiveTransition:C="transform 0.5s ease-in-out",wrapperClassName:q="",innerClassName:M="",...V})=>{const[E,l]=t.useState(!1),[u,r]=t.useState({x:0,y:0}),o=t.useRef(null);t.useEffect(()=>{if(i){r({x:0,y:0});return}const c=e=>{if(!o.current)return;const{left:b,top:R,width:f,height:d}=o.current.getBoundingClientRect(),m=b+f/2,p=R+d/2,S=Math.abs(m-e.clientX),X=Math.abs(p-e.clientY);if(S<f/2+a&&X<d/2+a){l(!0);const Y=(e.clientX-m)/n,j=(e.clientY-p)/n;r({x:Y,y:j})}else l(!1),r({x:0,y:0})};return window.addEventListener("mousemove",c),()=>{window.removeEventListener("mousemove",c)}},[a,i,n]);const T=E?N:C;return v.jsx("div",{ref:o,className:q,style:{position:"relative",display:"inline-block"},...V,children:v.jsx("div",{className:M,style:{transform:`translate3d(${u.x}px, ${u.y}px, 0)`,transition:T,willChange:"transform"},children:w})})};y.__docgenInfo={description:"",methods:[],displayName:"Magnet",props:{padding:{defaultValue:{value:"100",computed:!1},required:!1},disabled:{defaultValue:{value:"false",computed:!1},required:!1},magnetStrength:{defaultValue:{value:"2",computed:!1},required:!1},activeTransition:{defaultValue:{value:"'transform 0.3s ease-out'",computed:!1},required:!1},inactiveTransition:{defaultValue:{value:"'transform 0.5s ease-in-out'",computed:!1},required:!1},wrapperClassName:{defaultValue:{value:"''",computed:!1},required:!1},innerClassName:{defaultValue:{value:"''",computed:!1},required:!1}}};const B={title:"ReactBits/Animations/Magnet",component:y,parameters:{layout:"fullscreen"}},s={args:{children:"Hello World",padding:100,disabled:!1,magnetStrength:2,activeTransition:"transform 0.3s ease-out",inactiveTransition:"transform 0.5s ease-in-out",wrapperClassName:"",innerClassName:""}};var g,x,h;s.parameters={...s.parameters,docs:{...(g=s.parameters)==null?void 0:g.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
children: 'Hello World',
|
|
4
4
|
padding: 100,
|
package/storybook-static/assets/{MagnetLines.stories-DvbytV0Y.js → MagnetLines.stories-BKQ9YC_E.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as p,j as g}from"./iframe-
|
|
1
|
+
import{r as p,j as g}from"./iframe-Cw8dCV4Z.js";import"./preload-helper-C1FmrZbK.js";const A={"magnetLines-container":"_magnetLines-container_gc84k_1"};function x({rows:i=9,columns:u=9,containerSize:c="80vmin",lineColor:q="#efefef",lineWidth:V="1vmin",lineHeight:w="6vmin",baseAngle:L=-10,className:M="",style:_={}}){const d=p.useRef(null);p.useEffect(()=>{const r=d.current;if(!r)return;const e=r.querySelectorAll("span"),l=t=>{e.forEach(a=>{const n=a.getBoundingClientRect(),$=n.x+n.width/2,f=n.y+n.height/2,o=t.x-$,m=t.y-f,C=Math.sqrt(m*m+o*o)||1,j=Math.acos(o/C)*180/Math.PI*(t.y>f?1:-1);a.style.setProperty("--rotate",`${j}deg`)})};if(window.addEventListener("pointermove",l),e.length){const t=Math.floor(e.length/2),a=e[t].getBoundingClientRect();l({x:a.x,y:a.y})}return()=>{window.removeEventListener("pointermove",l)}},[]);const E=i*u,R=Array.from({length:E},(r,e)=>g.jsx("span",{style:{"--rotate":`${L}deg`,backgroundColor:q,width:V,height:w}},e));return g.jsx("div",{ref:d,className:`${A["magnetLines-container"]} ${M}`,style:{display:"grid",gridTemplateColumns:`repeat(${u}, 1fr)`,gridTemplateRows:`repeat(${i}, 1fr)`,width:c,height:c,..._},children:R})}x.__docgenInfo={description:"",methods:[],displayName:"MagnetLines",props:{rows:{defaultValue:{value:"9",computed:!1},required:!1},columns:{defaultValue:{value:"9",computed:!1},required:!1},containerSize:{defaultValue:{value:"'80vmin'",computed:!1},required:!1},lineColor:{defaultValue:{value:"'#efefef'",computed:!1},required:!1},lineWidth:{defaultValue:{value:"'1vmin'",computed:!1},required:!1},lineHeight:{defaultValue:{value:"'6vmin'",computed:!1},required:!1},baseAngle:{defaultValue:{value:"-10",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},style:{defaultValue:{value:"{}",computed:!1},required:!1}}};const I={title:"ReactBits/Animations/MagnetLines",component:x,parameters:{layout:"fullscreen"}},s={};var v,h,y;s.parameters={...s.parameters,docs:{...(v=s.parameters)==null?void 0:v.docs,source:{originalSource:"{}",...(y=(h=s.parameters)==null?void 0:h.docs)==null?void 0:y.source}}};const N=["Default"];export{s as Default,N as __namedExportsOrder,I as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as i,j as f}from"./iframe-
|
|
1
|
+
import{r as i,j as f}from"./iframe-Cw8dCV4Z.js";import{g as m}from"./index-C8pce-KX.js";import"./preload-helper-C1FmrZbK.js";const H="_list_m346a_1",M={list:H,"item-wrapper":"_item-wrapper_m346a_7","item-img":"_item-img_m346a_16"},N=(o,u,c)=>{const n=()=>u[o.findIndex(l=>matchMedia(l).matches)]??c,[d,p]=i.useState(n);return i.useEffect(()=>{const l=()=>p(n);return o.forEach(h=>matchMedia(h).addEventListener("change",l)),()=>o.forEach(h=>matchMedia(h).removeEventListener("change",l))},[o]),d},P=()=>{const o=i.useRef(null),[u,c]=i.useState({width:0,height:0});return i.useLayoutEffect(()=>{if(!o.current)return;const n=new ResizeObserver(([d])=>{const{width:p,height:l}=d.contentRect;c({width:p,height:l})});return n.observe(o.current),()=>n.disconnect()},[]),[o,u]},C=async o=>{await Promise.all(o.map(u=>new Promise(c=>{const n=new Image;n.src=u,n.onload=n.onerror=()=>c()})))},q=({items:o,ease:u="power3.out",duration:c=.6,stagger:n=.05,animateFrom:d="bottom",scaleOnHover:p=!0,hoverScale:l=.95,blurToFocus:h=!0,colorShiftOnHover:w=!1})=>{const x=N(["(min-width:1500px)","(min-width:1000px)","(min-width:600px)","(min-width:400px)"],[5,4,3,2],1),[E,{width:v}]=P(),[S,I]=i.useState(!1),$=e=>{var s;const t=(s=E.current)==null?void 0:s.getBoundingClientRect();if(!t)return{x:e.x,y:e.y};let a=d;if(d==="random"){const r=["top","bottom","left","right"];a=r[Math.floor(Math.random()*r.length)]}switch(a){case"top":return{x:e.x,y:-200};case"bottom":return{x:e.x,y:window.innerHeight+200};case"left":return{x:-200,y:e.y};case"right":return{x:window.innerWidth+200,y:e.y};case"center":return{x:t.width/2-e.w/2,y:t.height/2-e.h/2};default:return{x:e.x,y:e.y+100}}};i.useEffect(()=>{C(o.map(e=>e.img)).then(()=>I(!0))},[o]);const b=i.useMemo(()=>{if(!v)return[];const e=new Array(x).fill(0),t=v/x;return o.map(a=>{const s=e.indexOf(Math.min(...e)),r=t*s,g=a.height/2,O=e[s];return e[s]+=g,{...a,x:r,y:O,w:t,h:g}})},[x,o,v]),_=i.useRef(!1);i.useLayoutEffect(()=>{S&&(b.forEach((e,t)=>{const a=`[data-key="${e.id}"]`,s={x:e.x,y:e.y,width:e.w,height:e.h};if(_.current)m.to(a,{...s,duration:c,ease:u,overwrite:"auto"});else{const r=$(e),g={opacity:0,x:r.x,y:r.y,width:e.w,height:e.h,...h&&{filter:"blur(10px)"}};m.fromTo(a,g,{opacity:1,...s,...h&&{filter:"blur(0px)"},duration:.8,ease:"power3.out",delay:t*n})}}),_.current=!0)},[b,S,n,d,h,c,u]);const j=(e,t)=>{const a=e.currentTarget,s=`[data-key="${t.id}"]`;if(p&&m.to(s,{scale:l,duration:.3,ease:"power2.out"}),w){const r=a.querySelector(".color-overlay");r&&m.to(r,{opacity:.3,duration:.3})}},L=(e,t)=>{const a=e.currentTarget,s=`[data-key="${t.id}"]`;if(p&&m.to(s,{scale:1,duration:.3,ease:"power2.out"}),w){const r=a.querySelector(".color-overlay");r&&m.to(r,{opacity:0,duration:.3})}};return f.jsx("div",{ref:E,className:`${M.list}`,children:b.map(e=>f.jsx("div",{"data-key":e.id,className:`${M["item-wrapper"]}`,onClick:()=>window.open(e.url,"_blank","noopener"),onMouseEnter:t=>j(t,e),onMouseLeave:t=>L(t,e),children:f.jsx("div",{className:`${M["item-img"]}`,style:{backgroundImage:`url(${e.img})`},children:w&&f.jsx("div",{className:"color-overlay",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"linear-gradient(45deg, rgba(255,0,150,0.5), rgba(0,150,255,0.5))",opacity:0,pointerEvents:"none",borderRadius:"8px"}})})},e.id))})};q.__docgenInfo={description:"",methods:[],displayName:"Masonry",props:{ease:{defaultValue:{value:"'power3.out'",computed:!1},required:!1},duration:{defaultValue:{value:"0.6",computed:!1},required:!1},stagger:{defaultValue:{value:"0.05",computed:!1},required:!1},animateFrom:{defaultValue:{value:"'bottom'",computed:!1},required:!1},scaleOnHover:{defaultValue:{value:"true",computed:!1},required:!1},hoverScale:{defaultValue:{value:"0.95",computed:!1},required:!1},blurToFocus:{defaultValue:{value:"true",computed:!1},required:!1},colorShiftOnHover:{defaultValue:{value:"false",computed:!1},required:!1}}};const B={title:"ReactBits/Components/Masonry",component:q,parameters:{layout:"fullscreen"}},y={args:{items:[{id:1,img:"https://picsum.photos/seed/a/400/600",height:600,url:"#"},{id:2,img:"https://picsum.photos/seed/b/400/400",height:400,url:"#"},{id:3,img:"https://picsum.photos/seed/c/400/500",height:500,url:"#"},{id:4,img:"https://picsum.photos/seed/d/400/350",height:350,url:"#"},{id:5,img:"https://picsum.photos/seed/e/400/450",height:450,url:"#"},{id:6,img:"https://picsum.photos/seed/f/400/550",height:550,url:"#"},{id:7,img:"https://picsum.photos/seed/g/400/380",height:380,url:"#"},{id:8,img:"https://picsum.photos/seed/h/400/480",height:480,url:"#"}],ease:"power3.out",duration:.6,stagger:.05,animateFrom:"bottom",scaleOnHover:!0,hoverScale:.95,blurToFocus:!0,colorShiftOnHover:!1}};var R,V,k;y.parameters={...y.parameters,docs:{...(R=y.parameters)==null?void 0:R.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
items: [{
|
|
4
4
|
id: 1,
|
package/storybook-static/assets/{MetaBalls.stories-DKD3gVUH.js → MetaBalls.stories-Cao6Tqjg.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as H,j as ie}from"./iframe-
|
|
1
|
+
import{r as H,j as ie}from"./iframe-Cw8dCV4Z.js";import{R as ce,V as C,P as ue,M as fe,T as me}from"./Mesh-CwXV3WjE.js";import{C as de}from"./Camera-BM3HOhP6.js";import{T as pe}from"./Triangle-64ffRKNB.js";import"./preload-helper-C1FmrZbK.js";const ve={"metaballs-container":"_metaballs-container_ari47_1"};function $(o){const e=o.replace("#",""),n=parseInt(e.substring(0,2),16)/255,c=parseInt(e.substring(2,4),16)/255,i=parseInt(e.substring(4,6),16)/255;return[n,c,i]}function y(o){return o-Math.floor(o)}function he(o){let e=[o*.1031,o*.103,o*.0973].map(y);const n=[e[1],e[2],e[0]],c=e[0]*(n[0]+33.33)+e[1]*(n[1]+33.33)+e[2]*(n[2]+33.33);for(let i=0;i<3;i++)e[i]=y(e[i]+c);return e}function ge(o){let e=[o[0]*.1031,o[1]*.103,o[2]*.0973].map(y);const n=[e[1],e[0],e[2]],c=e[0]*(n[0]+33.33)+e[1]*(n[1]+33.33)+e[2]*(n[2]+33.33);for(let r=0;r<3;r++)e[r]=y(e[r]+c);const i=[e[0],e[0],e[1]],B=[e[1],e[0],e[0]],x=[e[2],e[1],e[0]],d=[];for(let r=0;r<3;r++)d[r]=y((i[r]+B[r])*x[r]);return d}const xe=`#version 300 es
|
|
2
2
|
precision highp float;
|
|
3
3
|
layout(location = 0) in vec2 position;
|
|
4
4
|
void main() {
|
|
@@ -47,7 +47,7 @@ void main() {
|
|
|
47
47
|
}
|
|
48
48
|
outColor = vec4(cFinal * f, enableTransparency ? f : 1.0);
|
|
49
49
|
}
|
|
50
|
-
`,U=({className:o="",color:e="#ffffff",speed:n=.3,enableMouseInteraction:c=!0,hoverSmoothness:i=.05,animationSize:B=30,ballCount:x=15,clumpFactor:d=1,cursorBallSize:r=3,cursorBallColor:R="#ffffff",enableTransparency:b=!0})=>{const F=H.useRef(null);return H.useEffect(()=>{const l=F.current;if(!l)return;const z=1,V=new ce({dpr:z,alpha:!0,premultipliedAlpha:!1}),t=V.gl;t.clearColor(0,0,0,b?0:1),l.appendChild(t.canvas);const T=new de(t,{left:-1,right:1,top:1,bottom:-1,near:.1,far:10});T.position.z=1;const J=new pe(t),[K,Q,Z]=$(e),[ee,te,ae]=$(R),S=[];for(let a=0;a<50;a++)S.push(new C(0,0,0));const M=new ue(t,{vertex:xe,fragment:Ce,uniforms:{iTime:{value:0},iResolution:{value:new C(0,0,0)},iMouse:{value:new C(0,0,0)},iColor:{value:new C(K,Q,Z)},iCursorColor:{value:new C(ee,te,ae)},iAnimationSize:{value:B},iBallCount:{value:x},iCursorBallSize:{value:r},iMetaBalls:{value:S},iClumpFactor:{value:d},enableTransparency:{value:b}}}),oe=new fe(t,{geometry:J,program:M}),I=new me;oe.setParent(I);const L=Math.min(x,50),A=[];for(let a=0;a<L;a++){const s=a+1,u=he(s),p=u[0]*(2*Math.PI),m=.1*Math.PI+u[1]*(.4*Math.PI-.1*Math.PI),f=5+u[1]*5,v=ge(u),g=Math.floor(v[0]*2),q=.5+v[2]*(2-.5);A.push({st:p,dtFactor:m,baseScale:f,toggle:g,radius:q})}const h={x:0,y:0};let _=!1,W=0,X=0;function E(){if(!l)return;const a=l.clientWidth,s=l.clientHeight;V.setSize(a*z,s*z),t.canvas.style.width=a+"px",t.canvas.style.height=s+"px",M.uniforms.iResolution.value.set(t.canvas.width,t.canvas.height,0)}window.addEventListener("resize",E),E();function Y(a){if(!c)return;const s=l.getBoundingClientRect(),u=a.clientX-s.left,p=a.clientY-s.top;W=u/s.width*t.canvas.width,X=(1-p/s.height)*t.canvas.height}function j(){c&&(_=!0)}function N(){c&&(_=!1)}l.addEventListener("pointermove",Y),l.addEventListener("pointerenter",j),l.addEventListener("pointerleave",N);const ne=performance.now();let P;function D(a){P=requestAnimationFrame(D);const s=(a-ne)*.001;M.uniforms.iTime.value=s;for(let m=0;m<L;m++){const f=A[m],v=s*n*f.dtFactor,g=f.st+v,q=Math.cos(g),re=Math.sin(g+v*f.toggle),se=q*f.baseScale*d,le=re*f.baseScale*d;S[m].set(se,le,f.radius)}let u,p;if(_)u=W,p=X;else{const m=t.canvas.width*.5,f=t.canvas.height*.5,v=t.canvas.width*.15,g=t.canvas.height*.15;u=m+Math.cos(s*n)*v,p=f+Math.sin(s*n)*g}h.x+=(u-h.x)*i,h.y+=(p-h.y)*i,M.uniforms.iMouse.value.set(h.x,h.y,0),V.render({scene:I,camera:T})}return P=requestAnimationFrame(D),()=>{var a;cancelAnimationFrame(P),window.removeEventListener("resize",E),l.removeEventListener("pointermove",Y),l.removeEventListener("pointerenter",j),l.removeEventListener("pointerleave",N),l.removeChild(t.canvas),(a=t.getExtension("WEBGL_lose_context"))==null||a.loseContext()}},[e,R,n,c,i,B,x,d,r,b]),ie.jsx("div",{ref:F,className:`${ve["metaballs-container"]} ${o}`})};U.__docgenInfo={description:"",methods:[],displayName:"MetaBalls",props:{className:{defaultValue:{value:"''",computed:!1},required:!1},color:{defaultValue:{value:"'#ffffff'",computed:!1},required:!1},speed:{defaultValue:{value:"0.3",computed:!1},required:!1},enableMouseInteraction:{defaultValue:{value:"true",computed:!1},required:!1},hoverSmoothness:{defaultValue:{value:"0.05",computed:!1},required:!1},animationSize:{defaultValue:{value:"30",computed:!1},required:!1},ballCount:{defaultValue:{value:"15",computed:!1},required:!1},clumpFactor:{defaultValue:{value:"1",computed:!1},required:!1},cursorBallSize:{defaultValue:{value:"3",computed:!1},required:!1},cursorBallColor:{defaultValue:{value:"'#ffffff'",computed:!1},required:!1},enableTransparency:{defaultValue:{value:"true",computed:!1},required:!1}}};const Ve={title:"ReactBits/Animations/MetaBalls",component:U,parameters:{layout:"fullscreen"}
|
|
50
|
+
`,U=({className:o="",color:e="#ffffff",speed:n=.3,enableMouseInteraction:c=!0,hoverSmoothness:i=.05,animationSize:B=30,ballCount:x=15,clumpFactor:d=1,cursorBallSize:r=3,cursorBallColor:R="#ffffff",enableTransparency:b=!0})=>{const F=H.useRef(null);return H.useEffect(()=>{const l=F.current;if(!l)return;const z=1,V=new ce({dpr:z,alpha:!0,premultipliedAlpha:!1}),t=V.gl;t.clearColor(0,0,0,b?0:1),l.appendChild(t.canvas);const T=new de(t,{left:-1,right:1,top:1,bottom:-1,near:.1,far:10});T.position.z=1;const J=new pe(t),[K,Q,Z]=$(e),[ee,te,ae]=$(R),S=[];for(let a=0;a<50;a++)S.push(new C(0,0,0));const M=new ue(t,{vertex:xe,fragment:Ce,uniforms:{iTime:{value:0},iResolution:{value:new C(0,0,0)},iMouse:{value:new C(0,0,0)},iColor:{value:new C(K,Q,Z)},iCursorColor:{value:new C(ee,te,ae)},iAnimationSize:{value:B},iBallCount:{value:x},iCursorBallSize:{value:r},iMetaBalls:{value:S},iClumpFactor:{value:d},enableTransparency:{value:b}}}),oe=new fe(t,{geometry:J,program:M}),I=new me;oe.setParent(I);const L=Math.min(x,50),A=[];for(let a=0;a<L;a++){const s=a+1,u=he(s),p=u[0]*(2*Math.PI),m=.1*Math.PI+u[1]*(.4*Math.PI-.1*Math.PI),f=5+u[1]*5,v=ge(u),g=Math.floor(v[0]*2),q=.5+v[2]*(2-.5);A.push({st:p,dtFactor:m,baseScale:f,toggle:g,radius:q})}const h={x:0,y:0};let _=!1,W=0,X=0;function E(){if(!l)return;const a=l.clientWidth,s=l.clientHeight;V.setSize(a*z,s*z),t.canvas.style.width=a+"px",t.canvas.style.height=s+"px",M.uniforms.iResolution.value.set(t.canvas.width,t.canvas.height,0)}window.addEventListener("resize",E),E();function Y(a){if(!c)return;const s=l.getBoundingClientRect(),u=a.clientX-s.left,p=a.clientY-s.top;W=u/s.width*t.canvas.width,X=(1-p/s.height)*t.canvas.height}function j(){c&&(_=!0)}function N(){c&&(_=!1)}l.addEventListener("pointermove",Y),l.addEventListener("pointerenter",j),l.addEventListener("pointerleave",N);const ne=performance.now();let P;function D(a){P=requestAnimationFrame(D);const s=(a-ne)*.001;M.uniforms.iTime.value=s;for(let m=0;m<L;m++){const f=A[m],v=s*n*f.dtFactor,g=f.st+v,q=Math.cos(g),re=Math.sin(g+v*f.toggle),se=q*f.baseScale*d,le=re*f.baseScale*d;S[m].set(se,le,f.radius)}let u,p;if(_)u=W,p=X;else{const m=t.canvas.width*.5,f=t.canvas.height*.5,v=t.canvas.width*.15,g=t.canvas.height*.15;u=m+Math.cos(s*n)*v,p=f+Math.sin(s*n)*g}h.x+=(u-h.x)*i,h.y+=(p-h.y)*i,M.uniforms.iMouse.value.set(h.x,h.y,0),V.render({scene:I,camera:T})}return P=requestAnimationFrame(D),()=>{var a;cancelAnimationFrame(P),window.removeEventListener("resize",E),l.removeEventListener("pointermove",Y),l.removeEventListener("pointerenter",j),l.removeEventListener("pointerleave",N),l.removeChild(t.canvas),(a=t.getExtension("WEBGL_lose_context"))==null||a.loseContext()}},[e,R,n,c,i,B,x,d,r,b]),ie.jsx("div",{ref:F,className:`${ve["metaballs-container"]} ${o}`})};U.__docgenInfo={description:"",methods:[],displayName:"MetaBalls",props:{className:{defaultValue:{value:"''",computed:!1},required:!1},color:{defaultValue:{value:"'#ffffff'",computed:!1},required:!1},speed:{defaultValue:{value:"0.3",computed:!1},required:!1},enableMouseInteraction:{defaultValue:{value:"true",computed:!1},required:!1},hoverSmoothness:{defaultValue:{value:"0.05",computed:!1},required:!1},animationSize:{defaultValue:{value:"30",computed:!1},required:!1},ballCount:{defaultValue:{value:"15",computed:!1},required:!1},clumpFactor:{defaultValue:{value:"1",computed:!1},required:!1},cursorBallSize:{defaultValue:{value:"3",computed:!1},required:!1},cursorBallColor:{defaultValue:{value:"'#ffffff'",computed:!1},required:!1},enableTransparency:{defaultValue:{value:"true",computed:!1},required:!1}}};const Ve={title:"ReactBits/Animations/MetaBalls",component:U,parameters:{layout:"fullscreen"}},w={args:{color:"#ffffff",speed:.3,enableMouseInteraction:!0,hoverSmoothness:.05,animationSize:30,ballCount:15,clumpFactor:1,cursorBallSize:3,cursorBallColor:"#ffffff",enableTransparency:!0}};var k,G,O;w.parameters={...w.parameters,docs:{...(k=w.parameters)==null?void 0:k.docs,source:{originalSource:`{
|
|
51
51
|
args: {
|
|
52
52
|
color: '#ffffff',
|
|
53
53
|
speed: 0.3,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as c,j as ce}from"./iframe-
|
|
1
|
+
import{r as c,j as ce}from"./iframe-Cw8dCV4Z.js";import"./preload-helper-C1FmrZbK.js";const ne={"paint-container":"_paint-container_91c8o_1"},ue=`#version 300 es
|
|
2
2
|
precision highp float;
|
|
3
3
|
in vec2 a_position;
|
|
4
4
|
out vec2 vP;
|
|
@@ -133,7 +133,7 @@ void main(){
|
|
|
133
133
|
col=mix(col,1.-min(vec3(1.),(1.-col)/max(u_tint,vec3(.001))),length(u_tint-1.)*.5);
|
|
134
134
|
col=clamp(col,0.,1.);
|
|
135
135
|
oC=vec4(col*vs,vs);
|
|
136
|
-
}`;function fe(v){let a=v.naturalWidth||v.width,n=v.naturalHeight||v.height;if(a>1e3||n>1e3||a<500||n<500){const r=a>n?a>1e3?1e3/a:a<500?500/a:1:n>1e3?1e3/n:n<500?500/n:1;a=Math.round(a*r),n=Math.round(n*r)}const b=document.createElement("canvas");b.width=a,b.height=n;const y=b.getContext("2d");y.drawImage(v,0,0,a,n);const T=y.getImageData(0,0,a,n).data,_=a*n,I=new Float32Array(_),i=new Uint8Array(_),w=new Uint8Array(_);for(let r=0;r<_;r++){const s=r*4,u=T[s],o=T[s+1],V=T[s+2],h=T[s+3],C=u>250&&o>250&&V>250&&h===255||h<5;I[r]=C?0:h/255,i[r]=I[r]>.1?1:0}for(let r=0;r<n;r++)for(let s=0;s<a;s++){const u=r*a+s;i[u]&&(s===0||s===a-1||r===0||r===n-1||!i[u-1]||!i[u+1]||!i[u-a]||!i[u+a])&&(w[u]=1)}const d=new Float32Array(_),X=200,O=.01,P=1.85;for(let r=0;r<X;r++)for(let s=1;s<n-1;s++)for(let u=1;u<a-1;u++){const o=s*a+u;if(!i[o]||w[o])continue;const V=(i[o+1]?d[o+1]:0)+(i[o-1]?d[o-1]:0)+(i[o+a]?d[o+a]:0)+(i[o-a]?d[o-a]:0),h=(O+V)/4;d[o]=P*h+(1-P)*d[o]}let g=0;for(let r=0;r<_;r++)d[r]>g&&(g=d[r]);g===0&&(g=1);const R=y.createImageData(a,n);for(let r=0;r<_;r++){const s=r*4,u=d[r]/g,o=Math.round(255*(1-u*u));R.data[s]=R.data[s+1]=R.data[s+2]=o,R.data[s+3]=Math.round(I[r]*255)}return R}function Z(v){const x=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(v);return x?[parseInt(x[1],16)/255,parseInt(x[2],16)/255,parseInt(x[3],16)/255]:[1,1,1]}function ee({imageSrc:v,seed:x=42,scale:N=4,refraction:a=.01,blur:n=.015,liquid:b=.75,speed:y=.3,brightness:L=2,contrast:T=.5,angle:_=0,fresnel:I=1,lightColor:i="#ffffff",darkColor:w="#000000",patternSharpness:d=1,waveAmplitude:X=1,noiseScale:O=.5,chromaticSpread:P=2,mouseAnimation:g=!1,distortion:R=1,contour:r=.2,tintColor:s="#feb3ff"}){const u=c.useRef(null),o=c.useRef(null),V=c.useRef(null),h=c.useRef({}),C=c.useRef(null),B=c.useRef(0),k=c.useRef(0),M=c.useRef(null),te=c.useRef(null),G=c.useRef(y),re=c.useRef({x:.5,y:.5,targetX:.5,targetY:.5}),z=c.useRef(g),[S,ae]=c.useState(!1),[W,Y]=c.useState(!1);c.useEffect(()=>{G.current=y},[y]),c.useEffect(()=>{z.current=g},[g]);const j=c.useCallback(()=>{const t=u.current;if(!t)return!1;const e=t.getContext("webgl2",{antialias:!0,alpha:!0});if(!e)return!1;const f=(q,D)=>{const F=e.createShader(D);return e.shaderSource(F,q),e.compileShader(F),e.getShaderParameter(F,e.COMPILE_STATUS)?F:(console.error(e.getShaderInfoLog(F)),null)},l=f(ue,e.VERTEX_SHADER),p=f(le,e.FRAGMENT_SHADER);if(!l||!p)return!1;const m=e.createProgram();if(e.attachShader(m,l),e.attachShader(m,p),e.linkProgram(m),!e.getProgramParameter(m,e.LINK_STATUS))return console.error(e.getProgramInfoLog(m)),!1;const E={},A=e.getProgramParameter(m,e.ACTIVE_UNIFORMS);for(let q=0;q<A;q++){const D=e.getActiveUniform(m,q);D&&(E[D.name]=e.getUniformLocation(m,D.name))}const oe=new Float32Array([-1,-1,1,-1,-1,1,1,1]),se=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,se),e.bufferData(e.ARRAY_BUFFER,oe,e.STATIC_DRAW),e.useProgram(m);const $=e.getAttribLocation(m,"a_position");return e.enableVertexAttribArray($),e.vertexAttribPointer($,2,e.FLOAT,!1,0,0),o.current=e,V.current=m,h.current=E,!0},[]),H=c.useCallback(t=>{const e=o.current,f=h.current;if(!e||!t)return;C.current&&e.deleteTexture(C.current);const l=e.createTexture();e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,l),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,t.width,t.height,0,e.RGBA,e.UNSIGNED_BYTE,t.data),e.uniform1i(f.u_tex,0);const p=t.width/t.height;e.uniform1f(f.u_imgRatio,p),e.uniform1f(f.u_ratio,1),C.current=l,te.current=t},[]);return c.useEffect(()=>{if(!j())return;const t=u.current,e=o.current,f=1e3*devicePixelRatio;return t.width=f,t.height=f,e.viewport(0,0,f,f),ae(!0),()=>{M.current&&cancelAnimationFrame(M.current),C.current&&o.current&&o.current.deleteTexture(C.current)}},[j]),c.useEffect(()=>{if(!S||!v)return;Y(!1);const t=new Image;t.crossOrigin="anonymous",t.onload=()=>{const e=fe(t);H(e),Y(!0)},t.src=v},[S,v,H]),c.useEffect(()=>{const t=o.current,e=h.current;if(!t||!S)return;t.uniform1f(e.u_seed,x),t.uniform1f(e.u_scale,N),t.uniform1f(e.u_refract,a),t.uniform1f(e.u_blur,n),t.uniform1f(e.u_liquid,b),t.uniform1f(e.u_bright,L),t.uniform1f(e.u_contrast,T),t.uniform1f(e.u_angle,_),t.uniform1f(e.u_fresnel,I);const f=Z(i),l=Z(w),p=Z(s);t.uniform3f(e.u_lightColor,f[0],f[1],f[2]),t.uniform3f(e.u_darkColor,l[0],l[1],l[2]),t.uniform1f(e.u_sharp,d),t.uniform1f(e.u_wave,X),t.uniform1f(e.u_noise,O),t.uniform1f(e.u_chroma,P),t.uniform1f(e.u_distort,R),t.uniform1f(e.u_contour,r),t.uniform3f(e.u_tint,p[0],p[1],p[2])},[S,x,N,a,n,b,L,T,_,I,i,w,d,X,O,P,R,r,s]),c.useEffect(()=>{if(!S||!W)return;const t=o.current,e=h.current,f=u.current,l=re.current,p=E=>{const A=f.getBoundingClientRect();l.targetX=(E.clientX-A.left)/A.width,l.targetY=(E.clientY-A.top)/A.height};f.addEventListener("mousemove",p);const m=E=>{const A=E-k.current;k.current=E,z.current?(l.x+=(l.targetX-l.x)*.08,l.y+=(l.targetY-l.y)*.08,B.current=l.x*3e3+l.y*1500):B.current+=A*G.current,t.uniform1f(e.u_time,B.current),t.drawArrays(t.TRIANGLE_STRIP,0,4),M.current=requestAnimationFrame(m)};return k.current=performance.now(),M.current=requestAnimationFrame(m),()=>{M.current&&cancelAnimationFrame(M.current),f.removeEventListener("mousemove",p)}},[S,W]),ce.jsx("canvas",{ref:u,className:`${ne["paint-container"]}`})}ee.__docgenInfo={description:"",methods:[],displayName:"MetallicPaint",props:{seed:{defaultValue:{value:"42",computed:!1},required:!1},scale:{defaultValue:{value:"4",computed:!1},required:!1},refraction:{defaultValue:{value:"0.01",computed:!1},required:!1},blur:{defaultValue:{value:"0.015",computed:!1},required:!1},liquid:{defaultValue:{value:"0.75",computed:!1},required:!1},speed:{defaultValue:{value:"0.3",computed:!1},required:!1},brightness:{defaultValue:{value:"2",computed:!1},required:!1},contrast:{defaultValue:{value:"0.5",computed:!1},required:!1},angle:{defaultValue:{value:"0",computed:!1},required:!1},fresnel:{defaultValue:{value:"1",computed:!1},required:!1},lightColor:{defaultValue:{value:"'#ffffff'",computed:!1},required:!1},darkColor:{defaultValue:{value:"'#000000'",computed:!1},required:!1},patternSharpness:{defaultValue:{value:"1",computed:!1},required:!1},waveAmplitude:{defaultValue:{value:"1",computed:!1},required:!1},noiseScale:{defaultValue:{value:"0.5",computed:!1},required:!1},chromaticSpread:{defaultValue:{value:"2",computed:!1},required:!1},mouseAnimation:{defaultValue:{value:"false",computed:!1},required:!1},distortion:{defaultValue:{value:"1",computed:!1},required:!1},contour:{defaultValue:{value:"0.2",computed:!1},required:!1},tintColor:{defaultValue:{value:"'#feb3ff'",computed:!1},required:!1}}};const de={title:"ReactBits/Animations/MetallicPaint",component:ee,parameters:{layout:"fullscreen"}
|
|
136
|
+
}`;function fe(v){let a=v.naturalWidth||v.width,n=v.naturalHeight||v.height;if(a>1e3||n>1e3||a<500||n<500){const r=a>n?a>1e3?1e3/a:a<500?500/a:1:n>1e3?1e3/n:n<500?500/n:1;a=Math.round(a*r),n=Math.round(n*r)}const b=document.createElement("canvas");b.width=a,b.height=n;const y=b.getContext("2d");y.drawImage(v,0,0,a,n);const T=y.getImageData(0,0,a,n).data,_=a*n,I=new Float32Array(_),i=new Uint8Array(_),w=new Uint8Array(_);for(let r=0;r<_;r++){const s=r*4,u=T[s],o=T[s+1],V=T[s+2],h=T[s+3],C=u>250&&o>250&&V>250&&h===255||h<5;I[r]=C?0:h/255,i[r]=I[r]>.1?1:0}for(let r=0;r<n;r++)for(let s=0;s<a;s++){const u=r*a+s;i[u]&&(s===0||s===a-1||r===0||r===n-1||!i[u-1]||!i[u+1]||!i[u-a]||!i[u+a])&&(w[u]=1)}const d=new Float32Array(_),X=200,O=.01,P=1.85;for(let r=0;r<X;r++)for(let s=1;s<n-1;s++)for(let u=1;u<a-1;u++){const o=s*a+u;if(!i[o]||w[o])continue;const V=(i[o+1]?d[o+1]:0)+(i[o-1]?d[o-1]:0)+(i[o+a]?d[o+a]:0)+(i[o-a]?d[o-a]:0),h=(O+V)/4;d[o]=P*h+(1-P)*d[o]}let g=0;for(let r=0;r<_;r++)d[r]>g&&(g=d[r]);g===0&&(g=1);const R=y.createImageData(a,n);for(let r=0;r<_;r++){const s=r*4,u=d[r]/g,o=Math.round(255*(1-u*u));R.data[s]=R.data[s+1]=R.data[s+2]=o,R.data[s+3]=Math.round(I[r]*255)}return R}function Z(v){const x=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(v);return x?[parseInt(x[1],16)/255,parseInt(x[2],16)/255,parseInt(x[3],16)/255]:[1,1,1]}function ee({imageSrc:v,seed:x=42,scale:N=4,refraction:a=.01,blur:n=.015,liquid:b=.75,speed:y=.3,brightness:L=2,contrast:T=.5,angle:_=0,fresnel:I=1,lightColor:i="#ffffff",darkColor:w="#000000",patternSharpness:d=1,waveAmplitude:X=1,noiseScale:O=.5,chromaticSpread:P=2,mouseAnimation:g=!1,distortion:R=1,contour:r=.2,tintColor:s="#feb3ff"}){const u=c.useRef(null),o=c.useRef(null),V=c.useRef(null),h=c.useRef({}),C=c.useRef(null),B=c.useRef(0),k=c.useRef(0),M=c.useRef(null),te=c.useRef(null),G=c.useRef(y),re=c.useRef({x:.5,y:.5,targetX:.5,targetY:.5}),z=c.useRef(g),[S,ae]=c.useState(!1),[W,Y]=c.useState(!1);c.useEffect(()=>{G.current=y},[y]),c.useEffect(()=>{z.current=g},[g]);const j=c.useCallback(()=>{const t=u.current;if(!t)return!1;const e=t.getContext("webgl2",{antialias:!0,alpha:!0});if(!e)return!1;const f=(q,D)=>{const F=e.createShader(D);return e.shaderSource(F,q),e.compileShader(F),e.getShaderParameter(F,e.COMPILE_STATUS)?F:(console.error(e.getShaderInfoLog(F)),null)},l=f(ue,e.VERTEX_SHADER),p=f(le,e.FRAGMENT_SHADER);if(!l||!p)return!1;const m=e.createProgram();if(e.attachShader(m,l),e.attachShader(m,p),e.linkProgram(m),!e.getProgramParameter(m,e.LINK_STATUS))return console.error(e.getProgramInfoLog(m)),!1;const E={},A=e.getProgramParameter(m,e.ACTIVE_UNIFORMS);for(let q=0;q<A;q++){const D=e.getActiveUniform(m,q);D&&(E[D.name]=e.getUniformLocation(m,D.name))}const oe=new Float32Array([-1,-1,1,-1,-1,1,1,1]),se=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,se),e.bufferData(e.ARRAY_BUFFER,oe,e.STATIC_DRAW),e.useProgram(m);const $=e.getAttribLocation(m,"a_position");return e.enableVertexAttribArray($),e.vertexAttribPointer($,2,e.FLOAT,!1,0,0),o.current=e,V.current=m,h.current=E,!0},[]),H=c.useCallback(t=>{const e=o.current,f=h.current;if(!e||!t)return;C.current&&e.deleteTexture(C.current);const l=e.createTexture();e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,l),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,t.width,t.height,0,e.RGBA,e.UNSIGNED_BYTE,t.data),e.uniform1i(f.u_tex,0);const p=t.width/t.height;e.uniform1f(f.u_imgRatio,p),e.uniform1f(f.u_ratio,1),C.current=l,te.current=t},[]);return c.useEffect(()=>{if(!j())return;const t=u.current,e=o.current,f=1e3*devicePixelRatio;return t.width=f,t.height=f,e.viewport(0,0,f,f),ae(!0),()=>{M.current&&cancelAnimationFrame(M.current),C.current&&o.current&&o.current.deleteTexture(C.current)}},[j]),c.useEffect(()=>{if(!S||!v)return;Y(!1);const t=new Image;t.crossOrigin="anonymous",t.onload=()=>{const e=fe(t);H(e),Y(!0)},t.src=v},[S,v,H]),c.useEffect(()=>{const t=o.current,e=h.current;if(!t||!S)return;t.uniform1f(e.u_seed,x),t.uniform1f(e.u_scale,N),t.uniform1f(e.u_refract,a),t.uniform1f(e.u_blur,n),t.uniform1f(e.u_liquid,b),t.uniform1f(e.u_bright,L),t.uniform1f(e.u_contrast,T),t.uniform1f(e.u_angle,_),t.uniform1f(e.u_fresnel,I);const f=Z(i),l=Z(w),p=Z(s);t.uniform3f(e.u_lightColor,f[0],f[1],f[2]),t.uniform3f(e.u_darkColor,l[0],l[1],l[2]),t.uniform1f(e.u_sharp,d),t.uniform1f(e.u_wave,X),t.uniform1f(e.u_noise,O),t.uniform1f(e.u_chroma,P),t.uniform1f(e.u_distort,R),t.uniform1f(e.u_contour,r),t.uniform3f(e.u_tint,p[0],p[1],p[2])},[S,x,N,a,n,b,L,T,_,I,i,w,d,X,O,P,R,r,s]),c.useEffect(()=>{if(!S||!W)return;const t=o.current,e=h.current,f=u.current,l=re.current,p=E=>{const A=f.getBoundingClientRect();l.targetX=(E.clientX-A.left)/A.width,l.targetY=(E.clientY-A.top)/A.height};f.addEventListener("mousemove",p);const m=E=>{const A=E-k.current;k.current=E,z.current?(l.x+=(l.targetX-l.x)*.08,l.y+=(l.targetY-l.y)*.08,B.current=l.x*3e3+l.y*1500):B.current+=A*G.current,t.uniform1f(e.u_time,B.current),t.drawArrays(t.TRIANGLE_STRIP,0,4),M.current=requestAnimationFrame(m)};return k.current=performance.now(),M.current=requestAnimationFrame(m),()=>{M.current&&cancelAnimationFrame(M.current),f.removeEventListener("mousemove",p)}},[S,W]),ce.jsx("canvas",{ref:u,className:`${ne["paint-container"]}`})}ee.__docgenInfo={description:"",methods:[],displayName:"MetallicPaint",props:{seed:{defaultValue:{value:"42",computed:!1},required:!1},scale:{defaultValue:{value:"4",computed:!1},required:!1},refraction:{defaultValue:{value:"0.01",computed:!1},required:!1},blur:{defaultValue:{value:"0.015",computed:!1},required:!1},liquid:{defaultValue:{value:"0.75",computed:!1},required:!1},speed:{defaultValue:{value:"0.3",computed:!1},required:!1},brightness:{defaultValue:{value:"2",computed:!1},required:!1},contrast:{defaultValue:{value:"0.5",computed:!1},required:!1},angle:{defaultValue:{value:"0",computed:!1},required:!1},fresnel:{defaultValue:{value:"1",computed:!1},required:!1},lightColor:{defaultValue:{value:"'#ffffff'",computed:!1},required:!1},darkColor:{defaultValue:{value:"'#000000'",computed:!1},required:!1},patternSharpness:{defaultValue:{value:"1",computed:!1},required:!1},waveAmplitude:{defaultValue:{value:"1",computed:!1},required:!1},noiseScale:{defaultValue:{value:"0.5",computed:!1},required:!1},chromaticSpread:{defaultValue:{value:"2",computed:!1},required:!1},mouseAnimation:{defaultValue:{value:"false",computed:!1},required:!1},distortion:{defaultValue:{value:"1",computed:!1},required:!1},contour:{defaultValue:{value:"0.2",computed:!1},required:!1},tintColor:{defaultValue:{value:"'#feb3ff'",computed:!1},required:!1}}};const de={title:"ReactBits/Animations/MetallicPaint",component:ee,parameters:{layout:"fullscreen"}},U={args:{seed:42,scale:4,refraction:.01,blur:.015,liquid:.75,speed:.3,brightness:2,contrast:.5,angle:0,fresnel:1,lightColor:"#ffffff",darkColor:"#000000",patternSharpness:1,waveAmplitude:1,noiseScale:.5,chromaticSpread:2,mouseAnimation:!1,distortion:1,contour:.2,tintColor:"#feb3ff"}};var K,J,Q;U.parameters={...U.parameters,docs:{...(K=U.parameters)==null?void 0:K.docs,source:{originalSource:`{
|
|
137
137
|
args: {
|
|
138
138
|
seed: 42,
|
|
139
139
|
scale: 4,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._container_1reux_1{position:relative;background:transparent;border-radius:var(--radius-lg);padding:var(--spacing-xl);display:flex;flex-direction:column;align-items:center}._chart_1reux_11{display:block;margin:0 auto}._gridLine_1reux_16{stroke:var(--color-border);stroke-opacity:.15;stroke-dasharray:4,4}._line_1reux_22{fill:none;stroke:var(--color-primary);stroke-width:2.5;stroke-opacity:.8;filter:drop-shadow(0 2px 4px rgba(0,0,0,.1))}._xAxis_1reux_30,._yAxis_1reux_31{color:var(--color-text-secondary);font-size:11px;font-weight:500}._xAxis_1reux_30 line,._xAxis_1reux_30 path,._yAxis_1reux_31 line,._yAxis_1reux_31 path{stroke:var(--color-border);stroke-opacity:.3}._xAxis_1reux_30 text,._yAxis_1reux_31 text{fill:var(--color-text-secondary)}._dataPoint_1reux_50{cursor:pointer;stroke:var(--color-text-inverse);stroke-width:2;transition:all .3s ease;filter:drop-shadow(0 2px 4px rgba(0,0,0,.2))}._dataPoint_1reux_50:hover{filter:drop-shadow(0 4px 8px rgba(0,0,0,.3));transform:scale(1.2)}._tooltip_1reux_63{position:absolute;background:var(--color-background-secondary);border:2px solid var(--color-primary);border-radius:12px;padding:16px;box-shadow:0 8px 24px #00000026;pointer-events:none;z-index:10;min-width:280px;max-width:400px;animation:_fadeIn_1reux_1 .2s ease}@keyframes _fadeIn_1reux_1{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}._tooltipHeader_1reux_88{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid var(--color-border)}._tooltipDate_1reux_97{font-weight:600;color:var(--color-text);font-size:14px}._tooltipRating_1reux_103{display:flex;align-items:baseline;gap:2px;background:linear-gradient(135deg,var(--color-primary),var(--color-primary-hover));padding:4px 10px;border-radius:20px;color:var(--color-text-inverse)}._ratingValue_1reux_113{font-size:18px;font-weight:700}._ratingMax_1reux_118{font-size:12px;opacity:.9}._tooltipTags_1reux_123{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}._tag_1reux_130{display:inline-block;padding:4px 10px;background:var(--color-primary-lighter);color:var(--color-primary-active);border-radius:12px;font-size:12px;font-weight:500;border:1px solid var(--color-primary-light);animation:_tagBounce_1reux_1 .3s ease}@keyframes _tagBounce_1reux_1{0%{transform:scale(.8)}60%{transform:scale(1.05)}to{transform:scale(1)}}._tooltipComment_1reux_148{color:var(--color-text-secondary);font-size:13px;line-height:1.5;max-height:200px;overflow-y:auto;padding:12px;background:var(--color-background-tertiary);border-radius:8px;border:1px solid var(--color-border)}._tooltipComment_1reux_148::-webkit-scrollbar{width:4px}._tooltipComment_1reux_148::-webkit-scrollbar-track{background:var(--color-background-tertiary)}._tooltipComment_1reux_148::-webkit-scrollbar-thumb{background:var(--color-primary);border-radius:2px}._moodIndicator_1reux_174{display:inline-block;width:12px;height:12px;border-radius:50%;margin-right:8px}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import{r,j as n}from"./iframe-Cw8dCV4Z.js";import{s as j}from"./transform-BKmuZieF.js";import{l as H}from"./linear-dkJHgUri.js";import{e as et,t as at,l as ot,m as rt}from"./monotone-DHdPkfDP.js";import{a as nt,b as st}from"./axis-D3QohQNI.js";import{t as it}from"./defaultLocale-DJ2q5QjE.js";import"./preload-helper-C1FmrZbK.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";const lt="_container_1reux_1",ct="_chart_1reux_11",dt="_gridLine_1reux_16",mt="_line_1reux_22",pt="_xAxis_1reux_30",gt="_yAxis_1reux_31",ut="_dataPoint_1reux_50",ht="_tooltip_1reux_63",ft="_tooltipHeader_1reux_88",xt="_tooltipDate_1reux_97",_t="_tooltipRating_1reux_103",yt="_ratingValue_1reux_113",Mt="_ratingMax_1reux_118",Dt="_tooltipTags_1reux_123",vt="_tag_1reux_130",Nt="_tooltipComment_1reux_148",e={container:lt,chart:ct,gridLine:dt,line:mt,xAxis:pt,yAxis:gt,dataPoint:ut,tooltip:ht,tooltipHeader:ft,tooltipDate:xt,tooltipRating:_t,ratingValue:yt,ratingMax:Mt,tooltipTags:Dt,tag:vt,tooltipComment:Nt},G=({moodData:o,width:g=800,height:f=400})=>{const i=r.useRef(null),m=r.useRef(null),J=r.useRef(null),[c,x]=r.useState(null),[A,K]=r.useState({x:0,y:0}),[C,E]=r.useState(!1),l=r.useMemo(()=>({top:20,right:20,bottom:50,left:40}),[]),_=g-l.left-l.right,R=f-l.top-l.bottom,u=r.useMemo(()=>o.map(a=>{const s=a.tag?a.tag.split(",").map(d=>d.trim()).filter(d=>d):[];return{date:new Date(a.date),rating:a.rating,tags:s,comment:a.comment}}).filter(a=>!isNaN(a.date.getTime())&&isFinite(a.rating)),[o]),b=r.useMemo(()=>H().domain([1,5,10]).range(["#FF6B6B","#FFD93D","#6BCB77"]).clamp(!0),[]);return r.useEffect(()=>{if(!i.current||u.length===0)return;const a=j(i.current);a.selectAll("*").remove();const s=a.append("g").attr("transform",`translate(${l.left},${l.top})`),d=et(u,t=>t.date);if(!d[0]||!d[1])return;const T=at().domain(d).range([0,_]),p=H().domain([1,10]).range([R,0]),U=ot().x(t=>T(t.date)).y(t=>p(t.rating)).curve(rt);s.selectAll(".grid-line-y").data(p.ticks(5)).enter().append("line").attr("class",e.gridLine).attr("x1",0).attr("y1",t=>p(t)).attr("x2",_).attr("y2",t=>p(t)),s.append("path").datum(u).attr("class",e.line).attr("d",U),s.append("g").attr("class",e.xAxis).attr("transform",`translate(0,${R})`).call(nt(T).tickFormat(t=>it("%m/%d")(t))),s.append("g").attr("class",e.yAxis).call(st(p)),s.selectAll(".mood-circle").data(u).enter().append("circle").attr("class",e.dataPoint).attr("cx",t=>T(t.date)).attr("cy",t=>p(t.rating)).attr("r",5).attr("fill",t=>b(t.rating)).style("cursor","pointer").on("mouseenter",(t,Z)=>{var $,B;const y=($=i.current)==null?void 0:$.getBoundingClientRect(),tt=(B=m.current)==null?void 0:B.getBoundingClientRect();if(y&&tt){let h=t.clientX-y.left+10,S=t.clientY-y.top-10;const F=250;h+F>_+l.left-20&&(h=t.clientX-y.left-F-10,h<0&&(h=10)),S<0&&(S=10),K({x:h,y:S})}x(Z),j(t.currentTarget).transition().duration(200).attr("r",8)}).on("mouseleave",t=>{setTimeout(()=>{C||x(null)},250),j(t.currentTarget).transition().duration(200).attr("r",5)})},[u,_,R,b,l,C]),r.useEffect(()=>()=>{x(null)},[]),n.jsxs("div",{className:e.container,ref:m,children:[n.jsx("svg",{ref:i,width:g,height:f,className:e.chart}),c&&n.jsxs("div",{ref:J,className:e.tooltip,style:{position:"absolute",pointerEvents:"auto",left:A.x,top:A.y,zIndex:1e3},onMouseEnter:()=>E(!0),onMouseLeave:()=>{E(!1),x(null)},children:[n.jsxs("div",{className:e.tooltipHeader,children:[n.jsx("div",{className:e.tooltipDate,children:c.date.toLocaleDateString()}),n.jsxs("div",{className:e.tooltipRating,children:[n.jsx("span",{className:e.ratingValue,children:c.rating}),n.jsx("span",{className:e.ratingMax,children:"/10"})]})]}),c.tags.length>0&&n.jsx("div",{className:e.tooltipTags,children:c.tags.map((a,s)=>n.jsx("span",{className:e.tag,children:a},s))}),c.comment&&n.jsx("div",{className:e.tooltipComment,children:c.comment})]})]})};G.__docgenInfo={description:"",methods:[],displayName:"MoodChart",props:{moodData:{required:!0,tsType:{name:"Array",elements:[{name:"MoodNoteData"}],raw:"MoodNoteData[]"},description:""},width:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"800",computed:!1}},height:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"400",computed:!1}}}};const Bt={title:"Organisms/Charts/MoodChart",component:G,parameters:{layout:"centered"},argTypes:{width:{control:{type:"number",min:300,max:1200,step:50}},height:{control:{type:"number",min:200,max:800,step:50}}}},w=o=>{const g=[],f=new Date;for(let i=o-1;i>=0;i--){const m=new Date(f);m.setDate(m.getDate()-i),g.push(m.toISOString().split("T")[0])}return g},M={args:{moodData:w(30).map(o=>({date:o,rating:Math.floor(Math.random()*10)+1,tag:["happy","excited","calm","focused"][Math.floor(Math.random()*4)],comment:`Feeling ${Math.random()>.5?"good":"okay"} today`})),width:800,height:400}},D={args:{moodData:w(7).map(o=>({date:o,rating:Math.floor(Math.random()*10)+1,tag:["happy","calm","energetic","focused"][Math.floor(Math.random()*4)],comment:`Day ${o.split("-")[2]} mood note`})),width:600,height:300}},v={args:{moodData:w(90).map(o=>({date:o,rating:Math.floor(Math.random()*10)+1,tag:["productive","creative","stressed","relaxed","motivated"][Math.floor(Math.random()*5)],comment:Math.random()>.7?`Notable day - ${o}`:void 0})),width:1e3,height:400}},N={args:{moodData:[],width:800,height:400}};var L,k,P;M.parameters={...M.parameters,docs:{...(L=M.parameters)==null?void 0:L.docs,source:{originalSource:`{
|
|
2
|
+
args: {
|
|
3
|
+
moodData: generateDateRange(30).map(date => ({
|
|
4
|
+
date,
|
|
5
|
+
rating: Math.floor(Math.random() * 10) + 1,
|
|
6
|
+
tag: ['happy', 'excited', 'calm', 'focused'][Math.floor(Math.random() * 4)],
|
|
7
|
+
comment: \`Feeling \${Math.random() > 0.5 ? 'good' : 'okay'} today\`
|
|
8
|
+
})),
|
|
9
|
+
width: 800,
|
|
10
|
+
height: 400
|
|
11
|
+
}
|
|
12
|
+
}`,...(P=(k=M.parameters)==null?void 0:k.docs)==null?void 0:P.source}}};var V,I,W;D.parameters={...D.parameters,docs:{...(V=D.parameters)==null?void 0:V.docs,source:{originalSource:`{
|
|
13
|
+
args: {
|
|
14
|
+
moodData: generateDateRange(7).map(date => ({
|
|
15
|
+
date,
|
|
16
|
+
rating: Math.floor(Math.random() * 10) + 1,
|
|
17
|
+
tag: ['happy', 'calm', 'energetic', 'focused'][Math.floor(Math.random() * 4)],
|
|
18
|
+
comment: \`Day \${date.split('-')[2]} mood note\`
|
|
19
|
+
})),
|
|
20
|
+
width: 600,
|
|
21
|
+
height: 300
|
|
22
|
+
}
|
|
23
|
+
}`,...(W=(I=D.parameters)==null?void 0:I.docs)==null?void 0:W.source}}};var q,O,X;v.parameters={...v.parameters,docs:{...(q=v.parameters)==null?void 0:q.docs,source:{originalSource:`{
|
|
24
|
+
args: {
|
|
25
|
+
moodData: generateDateRange(90).map(date => ({
|
|
26
|
+
date,
|
|
27
|
+
rating: Math.floor(Math.random() * 10) + 1,
|
|
28
|
+
tag: ['productive', 'creative', 'stressed', 'relaxed', 'motivated'][Math.floor(Math.random() * 5)],
|
|
29
|
+
comment: Math.random() > 0.7 ? \`Notable day - \${date}\` : undefined
|
|
30
|
+
})),
|
|
31
|
+
width: 1000,
|
|
32
|
+
height: 400
|
|
33
|
+
}
|
|
34
|
+
}`,...(X=(O=v.parameters)==null?void 0:O.docs)==null?void 0:X.source}}};var Q,z,Y;N.parameters={...N.parameters,docs:{...(Q=N.parameters)==null?void 0:Q.docs,source:{originalSource:`{
|
|
35
|
+
args: {
|
|
36
|
+
moodData: [],
|
|
37
|
+
width: 800,
|
|
38
|
+
height: 400
|
|
39
|
+
}
|
|
40
|
+
}`,...(Y=(z=N.parameters)==null?void 0:z.docs)==null?void 0:Y.source}}};const Ft=["Default","Weekly","Quarterly","EmptyState"];export{M as Default,N as EmptyState,v as Quarterly,D as Weekly,Ft as __namedExportsOrder,Bt as default};
|
package/storybook-static/assets/{MotionConfigContext-D5hZdVGx.js → MotionConfigContext-BCa1jVYq.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as H}from"./iframe-B8pH-Lvr.js";function us(t){const e=H.useRef(null);return e.current===null&&(e.current=t()),e.current}const _t=typeof window<"u",hs=_t?H.useLayoutEffect:H.useEffect;function $t(t,e){t.indexOf(e)===-1&&t.push(e)}function zt(t,e){const s=t.indexOf(e);s>-1&&t.splice(s,1)}const O=(t,e,s)=>s>e?e:s<t?t:s;let Ft=()=>{};const ut={},tt=t=>t,jt=(t,e)=>s=>e(t(s)),ht=(...t)=>t.reduce(jt),St=(t,e,s)=>{const n=e-t;return n===0?1:(s-t)/n};class Zt{constructor(){this.subscriptions=[]}add(e){return $t(this.subscriptions,e),()=>zt(this.subscriptions,e)}notify(e,s,n){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,s,n);else for(let i=0;i<r;i++){const a=this.subscriptions[i];a&&a(e,s,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const U=t=>t*1e3,R=t=>t/1e3;function kt(t,e){return e?t*(1e3/e):0}const wt=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,Ht=1e-7,Jt=12;function Xt(t,e,s,n,r){let i,a,o=0;do a=e+(s-e)/2,i=wt(a,n,r)-t,i>0?s=a:e=a;while(Math.abs(i)>Ht&&++o<Jt);return a}function _(t,e,s,n){if(t===e&&s===n)return tt;const r=i=>Xt(i,0,1,t,s);return i=>i===0||i===1?i:wt(r(i),e,n)}const Ct=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Pt=t=>e=>1-t(1-e),Et=_(.33,1.53,.69,.99),ft=Pt(Et),Qt=Ct(ft),Yt=t=>t>=1?1:(t*=2)<1?.5*ft(t):.5*(2-Math.pow(2,-10*(t-1))),dt=t=>1-Math.sin(Math.acos(t)),te=Pt(dt),ee=Ct(dt),se=_(.42,0,1,1),ne=_(0,0,.58,1),Vt=_(.42,0,.58,1),re=t=>Array.isArray(t)&&typeof t[0]!="number",ie=t=>Array.isArray(t)&&typeof t[0]=="number",ae={linear:tt,easeIn:se,easeInOut:Vt,easeOut:ne,circIn:dt,circInOut:ee,circOut:te,backIn:ft,backInOut:Qt,backOut:Et,anticipate:Yt},oe=t=>typeof t=="string",vt=t=>{if(ie(t)){Ft(t.length===4);const[e,s,n,r]=t;return _(e,s,n,r)}else if(oe(t))return ae[t];return t},j=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ce(t,e){let s=new Set,n=new Set,r=!1,i=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function u(c){a.has(c)&&(h.schedule(c),t()),c(o)}const h={schedule:(c,f=!1,y=!1)=>{const M=y&&r?s:n;return f&&a.add(c),M.add(c),c},cancel:c=>{n.delete(c),a.delete(c)},process:c=>{if(o=c,r){i=!0;return}r=!0;const f=s;s=n,n=f,s.forEach(u),s.clear(),r=!1,i&&(i=!1,h.process(c))}};return h}const le=40;function ue(t,e){let s=!1,n=!0;const r={delta:0,timestamp:0,isProcessing:!1},i=()=>s=!0,a=j.reduce((x,b)=>(x[b]=ce(i),x),{}),{setup:o,read:u,resolveKeyframes:h,preUpdate:c,update:f,preRender:y,render:D,postRender:M}=a,p=()=>{const x=ut.useManualTiming,b=x?r.timestamp:performance.now();s=!1,x||(r.delta=n?1e3/60:Math.max(Math.min(b-r.timestamp,le),1)),r.timestamp=b,r.isProcessing=!0,o.process(r),u.process(r),h.process(r),c.process(r),f.process(r),y.process(r),D.process(r),M.process(r),r.isProcessing=!1,s&&e&&(n=!1,t(p))},v=()=>{s=!0,n=!0,r.isProcessing||t(p)};return{schedule:j.reduce((x,b)=>{const g=a[b];return x[b]=(F,k=!1,d=!1)=>(s||v(),g.schedule(F,k,d)),x},{}),cancel:x=>{for(let b=0;b<j.length;b++)a[j[b]].cancel(x)},state:r,steps:a}}const{schedule:Rt,cancel:he,state:J,steps:fs}=ue(typeof requestAnimationFrame<"u"?requestAnimationFrame:tt,!0);let Z;function fe(){Z=void 0}const C={now:()=>(Z===void 0&&C.set(J.isProcessing||ut.useManualTiming?J.timestamp:performance.now()),Z),set:t=>{Z=t,queueMicrotask(fe)}},It=t=>e=>typeof e=="string"&&e.startsWith(t),ds=It("--"),de=It("var(--"),pe=t=>de(t)?me.test(t.split("/*")[0].trim()):!1,me=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ps(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const pt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Nt={...pt,transform:t=>O(0,1,t)},ms={...pt,default:1},q=t=>Math.round(t*1e5)/1e5,Ot=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ge(t){return t==null}const ye=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,mt=(t,e)=>s=>!!(typeof s=="string"&&ye.test(s)&&s.startsWith(t)||e&&!ge(s)&&Object.prototype.hasOwnProperty.call(s,e)),Kt=(t,e,s)=>n=>{if(typeof n!="string")return n;const[r,i,a,o]=n.match(Ot);return{[t]:parseFloat(r),[e]:parseFloat(i),[s]:parseFloat(a),alpha:o!==void 0?parseFloat(o):1}},ve=t=>O(0,255,t),st={...pt,transform:t=>Math.round(ve(t))},N={test:mt("rgb","red"),parse:Kt("red","green","blue"),transform:({red:t,green:e,blue:s,alpha:n=1})=>"rgba("+st.transform(t)+", "+st.transform(e)+", "+st.transform(s)+", "+q(Nt.transform(n))+")"};function be(t){let e="",s="",n="",r="";return t.length>5?(e=t.substring(1,3),s=t.substring(3,5),n=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),s=t.substring(2,3),n=t.substring(3,4),r=t.substring(4,5),e+=e,s+=s,n+=n,r+=r),{red:parseInt(e,16),green:parseInt(s,16),blue:parseInt(n,16),alpha:r?parseInt(r,16)/255:1}}const at={test:mt("#"),parse:be,transform:N.transform},$=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),gs=$("deg"),L=$("%"),ys=$("px"),vs=$("vh"),bs=$("vw"),Ts={...L,parse:t=>L.parse(t)/100,transform:t=>L.transform(t*100)},G={test:mt("hsl","hue"),parse:Kt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:s,alpha:n=1})=>"hsla("+Math.round(t)+", "+L.transform(q(e))+", "+L.transform(q(s))+", "+q(Nt.transform(n))+")"},P={test:t=>N.test(t)||at.test(t)||G.test(t),parse:t=>N.test(t)?N.parse(t):G.test(t)?G.parse(t):at.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?N.transform(t):G.transform(t),getAnimatableNone:t=>{const e=P.parse(t);return e.alpha=0,P.transform(e)}},Te=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function xe(t){var e,s;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Ot))==null?void 0:e.length)||0)+(((s=t.match(Te))==null?void 0:s.length)||0)>0}const Gt="number",Ut="color",Me="var",Ae="var(",bt="${}",De=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function B(t){const e=t.toString(),s=[],n={color:[],number:[],var:[]},r=[];let i=0;const o=e.replace(De,u=>(P.test(u)?(n.color.push(i),r.push(Ut),s.push(P.parse(u))):u.startsWith(Ae)?(n.var.push(i),r.push(Me),s.push(u)):(n.number.push(i),r.push(Gt),s.push(parseFloat(u))),++i,bt)).split(bt);return{values:s,split:o,indexes:n,types:r}}function Fe(t){return B(t).values}function qt({split:t,types:e}){const s=t.length;return n=>{let r="";for(let i=0;i<s;i++)if(r+=t[i],n[i]!==void 0){const a=e[i];a===Gt?r+=q(n[i]):a===Ut?r+=P.transform(n[i]):r+=n[i]}return r}}function Se(t){return qt(B(t))}const ke=t=>typeof t=="number"?0:P.test(t)?P.getAnimatableNone(t):t,we=(t,e)=>typeof t=="number"?e!=null&&e.trim().endsWith("/")?t:0:ke(t);function Ce(t){const e=B(t);return qt(e)(e.values.map((n,r)=>we(n,e.split[r])))}const Pe={test:xe,parse:Fe,createTransformer:Se,getAnimatableNone:Ce};function nt(t,e,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?t+(e-t)*6*s:s<1/2?e:s<2/3?t+(e-t)*(2/3-s)*6:t}function Ee({hue:t,saturation:e,lightness:s,alpha:n}){t/=360,e/=100,s/=100;let r=0,i=0,a=0;if(!e)r=i=a=s;else{const o=s<.5?s*(1+e):s+e-s*e,u=2*s-o;r=nt(u,o,t+1/3),i=nt(u,o,t),a=nt(u,o,t-1/3)}return{red:Math.round(r*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:n}}function X(t,e){return s=>s>0?e:t}const et=(t,e,s)=>t+(e-t)*s,rt=(t,e,s)=>{const n=t*t,r=s*(e*e-n)+n;return r<0?0:Math.sqrt(r)},Ve=[at,N,G],Re=t=>Ve.find(e=>e.test(t));function Tt(t){const e=Re(t);if(!e)return!1;let s=e.parse(t);return e===G&&(s=Ee(s)),s}const xt=(t,e)=>{const s=Tt(t),n=Tt(e);if(!s||!n)return X(t,e);const r={...s};return i=>(r.red=rt(s.red,n.red,i),r.green=rt(s.green,n.green,i),r.blue=rt(s.blue,n.blue,i),r.alpha=et(s.alpha,n.alpha,i),N.transform(r))},ot=new Set(["none","hidden"]);function Ie(t,e){return ot.has(t)?s=>s<=0?t:e:s=>s>=1?e:t}function Ne(t,e){return s=>et(t,e,s)}function gt(t){return typeof t=="number"?Ne:typeof t=="string"?pe(t)?X:P.test(t)?xt:Ge:Array.isArray(t)?Lt:typeof t=="object"?P.test(t)?xt:Oe:X}function Lt(t,e){const s=[...t],n=s.length,r=t.map((i,a)=>gt(i)(i,e[a]));return i=>{for(let a=0;a<n;a++)s[a]=r[a](i);return s}}function Oe(t,e){const s={...t,...e},n={};for(const r in s)t[r]!==void 0&&e[r]!==void 0&&(n[r]=gt(t[r])(t[r],e[r]));return r=>{for(const i in n)s[i]=n[i](r);return s}}function Ke(t,e){const s=[],n={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const i=e.types[r],a=t.indexes[i][n[i]],o=t.values[a]??0;s[r]=o,n[i]++}return s}const Ge=(t,e)=>{const s=Pe.createTransformer(e),n=B(t),r=B(e);return n.indexes.var.length===r.indexes.var.length&&n.indexes.color.length===r.indexes.color.length&&n.indexes.number.length>=r.indexes.number.length?ot.has(t)&&!r.values.length||ot.has(e)&&!n.values.length?Ie(t,e):ht(Lt(Ke(n,r),r.values),s):X(t,e)};function Wt(t,e,s){return typeof t=="number"&&typeof e=="number"&&typeof s=="number"?et(t,e,s):gt(t)(t,e)}const Ue=t=>{const e=({timestamp:s})=>t(s);return{start:(s=!0)=>Rt.update(e,s),stop:()=>he(e),now:()=>J.isProcessing?J.timestamp:C.now()}},qe=(t,e,s=10)=>{let n="";const r=Math.max(Math.round(e/s),2);for(let i=0;i<r;i++)n+=Math.round(t(i/(r-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},Q=2e4;function yt(t){let e=0;const s=50;let n=t.next(e);for(;!n.done&&e<Q;)e+=s,n=t.next(e);return e>=Q?1/0:e}function Le(t,e=100,s){const n=s({...t,keyframes:[0,e]}),r=Math.min(yt(n),Q);return{type:"keyframes",ease:i=>n.next(r*i).value/e,duration:R(r)}}const T={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function ct(t,e){return t*Math.sqrt(1-e*e)}const We=12;function Be(t,e,s){let n=s;for(let r=1;r<We;r++)n=n-t(n)/e(n);return n}const it=.001;function _e({duration:t=T.duration,bounce:e=T.bounce,velocity:s=T.velocity,mass:n=T.mass}){let r,i,a=1-e;a=O(T.minDamping,T.maxDamping,a),t=O(T.minDuration,T.maxDuration,R(t)),a<1?(r=h=>{const c=h*a,f=c*t,y=c-s,D=ct(h,a),M=Math.exp(-f);return it-y/D*M},i=h=>{const f=h*a*t,y=f*s+s,D=Math.pow(a,2)*Math.pow(h,2)*t,M=Math.exp(-f),p=ct(Math.pow(h,2),a);return(-r(h)+it>0?-1:1)*((y-D)*M)/p}):(r=h=>{const c=Math.exp(-h*t),f=(h-s)*t+1;return-it+c*f},i=h=>{const c=Math.exp(-h*t),f=(s-h)*(t*t);return c*f});const o=5/t,u=Be(r,i,o);if(t=U(t),isNaN(u))return{stiffness:T.stiffness,damping:T.damping,duration:t};{const h=Math.pow(u,2)*n;return{stiffness:h,damping:a*2*Math.sqrt(n*h),duration:t}}}const $e=["duration","bounce"],ze=["stiffness","damping","mass"];function Mt(t,e){return e.some(s=>t[s]!==void 0)}function je(t){let e={velocity:T.velocity,stiffness:T.stiffness,damping:T.damping,mass:T.mass,isResolvedFromDuration:!1,...t};if(!Mt(t,ze)&&Mt(t,$e))if(e.velocity=0,t.visualDuration){const s=t.visualDuration,n=2*Math.PI/(s*1.2),r=n*n,i=2*O(.05,1,1-(t.bounce||0))*Math.sqrt(r);e={...e,mass:T.mass,stiffness:r,damping:i}}else{const s=_e({...t,velocity:0});e={...e,...s,mass:T.mass},e.isResolvedFromDuration=!0}return e}function Y(t=T.visualDuration,e=T.bounce){const s=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:n,restDelta:r}=s;const i=s.keyframes[0],a=s.keyframes[s.keyframes.length-1],o={done:!1,value:i},{stiffness:u,damping:h,mass:c,duration:f,velocity:y,isResolvedFromDuration:D}=je({...s,velocity:-R(s.velocity||0)}),M=y||0,p=h/(2*Math.sqrt(u*c)),v=a-i,m=R(Math.sqrt(u/c)),w=Math.abs(v)<5;n||(n=w?T.restSpeed.granular:T.restSpeed.default),r||(r=w?T.restDelta.granular:T.restDelta.default);let x,b,g,F,k,d;if(p<1)g=ct(m,p),F=(M+p*m*v)/g,x=l=>{const A=Math.exp(-p*m*l);return a-A*(F*Math.sin(g*l)+v*Math.cos(g*l))},k=p*m*F+v*g,d=p*m*v-F*g,b=l=>Math.exp(-p*m*l)*(k*Math.sin(g*l)+d*Math.cos(g*l));else if(p===1){x=A=>a-Math.exp(-m*A)*(v+(M+m*v)*A);const l=M+m*v;b=A=>Math.exp(-m*A)*(m*l*A-M)}else{const l=m*Math.sqrt(p*p-1);x=V=>{const K=Math.exp(-p*m*V),I=Math.min(l*V,300);return a-K*((M+p*m*v)*Math.sinh(I)+l*v*Math.cosh(I))/l};const A=(M+p*m*v)/l,E=p*m*A-v*l,z=p*m*v-A*l;b=V=>{const K=Math.exp(-p*m*V),I=Math.min(l*V,300);return K*(E*Math.sinh(I)+z*Math.cosh(I))}}const S={calculatedDuration:D&&f||null,velocity:l=>U(b(l)),next:l=>{if(!D&&p<1){const E=Math.exp(-p*m*l),z=Math.sin(g*l),V=Math.cos(g*l),K=a-E*(F*z+v*V),I=U(E*(k*z+d*V));return o.done=Math.abs(I)<=n&&Math.abs(a-K)<=r,o.value=o.done?a:K,o}const A=x(l);if(D)o.done=l>=f;else{const E=U(b(l));o.done=Math.abs(E)<=n&&Math.abs(a-A)<=r}return o.value=o.done?a:A,o},toString:()=>{const l=Math.min(yt(S),Q),A=qe(E=>S.next(l*E).value,l,30);return l+"ms "+A},toTransition:()=>{}};return S}Y.applyToOptions=t=>{const e=Le(t,100,Y);return t.ease=e.ease,t.duration=U(e.duration),t.type="keyframes",t};const Ze=5;function Bt(t,e,s){const n=Math.max(e-Ze,0);return kt(s-t(n),e-n)}function lt({keyframes:t,velocity:e=0,power:s=.8,timeConstant:n=325,bounceDamping:r=10,bounceStiffness:i=500,modifyTarget:a,min:o,max:u,restDelta:h=.5,restSpeed:c}){const f=t[0],y={done:!1,value:f},D=d=>o!==void 0&&d<o||u!==void 0&&d>u,M=d=>o===void 0?u:u===void 0||Math.abs(o-d)<Math.abs(u-d)?o:u;let p=s*e;const v=f+p,m=a===void 0?v:a(v);m!==v&&(p=m-f);const w=d=>-p*Math.exp(-d/n),x=d=>m+w(d),b=d=>{const S=w(d),l=x(d);y.done=Math.abs(S)<=h,y.value=y.done?m:l};let g,F;const k=d=>{D(y.value)&&(g=d,F=Y({keyframes:[y.value,M(y.value)],velocity:Bt(x,d,y.value),damping:r,stiffness:i,restDelta:h,restSpeed:c}))};return k(0),{calculatedDuration:null,next:d=>{let S=!1;return!F&&g===void 0&&(S=!0,b(d),k(d)),g!==void 0&&d>=g?F.next(d-g):(!S&&b(d),y)}}}function He(t,e,s){const n=[],r=s||ut.mix||Wt,i=t.length-1;for(let a=0;a<i;a++){let o=r(t[a],t[a+1]);if(e){const u=Array.isArray(e)?e[a]||tt:e;o=ht(u,o)}n.push(o)}return n}function Je(t,e,{clamp:s=!0,ease:n,mixer:r}={}){const i=t.length;if(Ft(i===e.length),i===1)return()=>e[0];if(i===2&&e[0]===e[1])return()=>e[1];const a=t[0]===t[1];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=He(e,n,r),u=o.length,h=c=>{if(a&&c<t[0])return e[0];let f=0;if(u>1)for(;f<t.length-2&&!(c<t[f+1]);f++);const y=St(t[f],t[f+1],c);return o[f](y)};return s?c=>h(O(t[0],t[i-1],c)):h}function Xe(t,e){const s=t[t.length-1];for(let n=1;n<=e;n++){const r=St(0,e,n);t.push(et(s,1,r))}}function Qe(t){const e=[0];return Xe(e,t.length-1),e}function Ye(t,e){return t.map(s=>s*e)}function ts(t,e){return t.map(()=>e||Vt).splice(0,t.length-1)}function W({duration:t=300,keyframes:e,times:s,ease:n="easeInOut"}){const r=re(n)?n.map(vt):vt(n),i={done:!1,value:e[0]},a=Ye(s&&s.length===e.length?s:Qe(e),t),o=Je(a,e,{ease:Array.isArray(r)?r:ts(e,r)});return{calculatedDuration:t,next:u=>(i.value=o(u),i.done=u>=t,i)}}const es=t=>t!==null;function ss(t,{repeat:e,repeatType:s="loop"},n,r=1){const i=t.filter(es),o=r<0||e&&s!=="loop"&&e%2===1?0:i.length-1;return!o||n===void 0?i[o]:n}const ns={decay:lt,inertia:lt,tween:W,keyframes:W,spring:Y};function rs(t){typeof t.type=="string"&&(t.type=ns[t.type])}class is{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,s){return this.finished.then(e,s)}}const as=t=>t/100;class xs extends is{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var n,r;const{motionValue:s}=this.options;s&&s.updatedAt!==C.now()&&this.tick(C.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(r=(n=this.options).onStop)==null||r.call(n))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;rs(e);const{type:s=W,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e;let{keyframes:o}=e;const u=s||W;u!==W&&typeof o[0]!="number"&&(this.mixKeyframes=ht(as,Wt(o[0],o[1])),o=[0,100]);const h=u({...e,keyframes:o});i==="mirror"&&(this.mirroredGenerator=u({...e,keyframes:[...o].reverse(),velocity:-a})),h.calculatedDuration===null&&(h.calculatedDuration=yt(h));const{calculatedDuration:c}=h;this.calculatedDuration=c,this.resolvedDuration=c+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=h}updateTime(e){const s=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(e,s=!1){const{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:u}=this;if(this.startTime===null)return n.next(0);const{delay:h=0,keyframes:c,repeat:f,repeatType:y,repeatDelay:D,type:M,onUpdate:p,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),s?this.currentTime=e:this.updateTime(e);const m=this.currentTime-h*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?m<0:m>r;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let x=this.currentTime,b=n;if(f){const d=Math.min(this.currentTime,r)/o;let S=Math.floor(d),l=d%1;!l&&d>=1&&(l=1),l===1&&S--,S=Math.min(S,f+1),!!(S%2)&&(y==="reverse"?(l=1-l,D&&(l-=D/o)):y==="mirror"&&(b=a)),x=O(0,1,l)*o}let g;w?(this.delayState.value=c[0],g=this.delayState):g=b.next(x),i&&!w&&(g.value=i(g.value));let{done:F}=g;!w&&u!==null&&(F=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&F);return k&&M!==lt&&(g.value=ss(c,this.options,v,this.speed)),p&&p(g.value),k&&this.finish(),g}then(e,s){return this.finished.then(e,s)}get duration(){return R(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+R(e)}get time(){return R(this.currentTime)}set time(e){e=U(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const s=this.generator.next(e).value;return Bt(n=>this.generator.next(n).value,e,s)}get speed(){return this.playbackSpeed}set speed(e){const s=this.playbackSpeed!==e;s&&this.driver&&this.updateTime(C.now()),this.playbackSpeed=e,s&&this.driver&&(this.time=R(this.currentTime))}play(){var r,i;if(this.isStopped)return;const{driver:e=Ue,startTime:s}=this.options;this.driver||(this.driver=e(a=>this.tick(a))),(i=(r=this.options).onPlay)==null||i.call(r);const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=s??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(C.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,s;this.notifyFinished(),this.teardown(),this.state="finished",(s=(e=this.options).onComplete)==null||s.call(e)}cancel(){var e,s;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(s=(e=this.options).onCancel)==null||s.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var s;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(s=this.driver)==null||s.stop(),e.observe(this)}}const At=30,os=t=>!isNaN(parseFloat(t)),Dt={current:void 0};class cs{constructor(e,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{var i;const r=C.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=s.owner}setCurrent(e){this.current=e,this.updatedAt=C.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=os(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,s){this.events[e]||(this.events[e]=new Zt);const n=this.events[e].add(s);return e==="change"?()=>{n(),Rt.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,s){this.passiveEffect=e,this.stopPassiveEffect=s}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,s,n){this.set(s),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,s=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Dt.current&&Dt.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=C.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>At)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,At);return kt(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(e){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=e(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,s;(e=this.dependents)==null||e.clear(),(s=this.events.destroy)==null||s.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ms(t,e){return new cs(t,e)}const As=t=>!!(t&&t.getVelocity);function Ds(t,e,s){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let n=document;e&&(n=e.current);const r=(s==null?void 0:s[t])??n.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t).filter(n=>n!=null)}const Fs=H.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});export{Qe as $,Ts as A,Nt as B,ms as C,P as D,B as E,ps as F,ue as G,Ds as H,he as I,xs as J,et as K,ds as L,ut as M,St as N,te as O,$t as P,zt as Q,J as R,Zt as S,fs as T,us as U,Fs as V,is as W,ht as X,Je as Y,Dt as Z,re as _,Ft as a,Le as a0,Xe as a1,Y as a2,kt as a3,ss as b,tt as c,ee as d,Qt as e,Rt as f,qe as g,Yt as h,ie as i,O as j,Pe as k,pe as l,R as m,pt as n,Ms as o,ys as p,As as q,rs as r,U as s,C as t,hs as u,L as v,gs as w,bs as x,vs as y,Ot as z};
|
|
1
|
+
import{r as H}from"./iframe-Cw8dCV4Z.js";function us(t){const e=H.useRef(null);return e.current===null&&(e.current=t()),e.current}const _t=typeof window<"u",hs=_t?H.useLayoutEffect:H.useEffect;function $t(t,e){t.indexOf(e)===-1&&t.push(e)}function zt(t,e){const s=t.indexOf(e);s>-1&&t.splice(s,1)}const O=(t,e,s)=>s>e?e:s<t?t:s;let Ft=()=>{};const ut={},tt=t=>t,jt=(t,e)=>s=>e(t(s)),ht=(...t)=>t.reduce(jt),St=(t,e,s)=>{const n=e-t;return n===0?1:(s-t)/n};class Zt{constructor(){this.subscriptions=[]}add(e){return $t(this.subscriptions,e),()=>zt(this.subscriptions,e)}notify(e,s,n){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,s,n);else for(let i=0;i<r;i++){const a=this.subscriptions[i];a&&a(e,s,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const U=t=>t*1e3,R=t=>t/1e3;function kt(t,e){return e?t*(1e3/e):0}const wt=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,Ht=1e-7,Jt=12;function Xt(t,e,s,n,r){let i,a,o=0;do a=e+(s-e)/2,i=wt(a,n,r)-t,i>0?s=a:e=a;while(Math.abs(i)>Ht&&++o<Jt);return a}function _(t,e,s,n){if(t===e&&s===n)return tt;const r=i=>Xt(i,0,1,t,s);return i=>i===0||i===1?i:wt(r(i),e,n)}const Ct=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Pt=t=>e=>1-t(1-e),Et=_(.33,1.53,.69,.99),ft=Pt(Et),Qt=Ct(ft),Yt=t=>t>=1?1:(t*=2)<1?.5*ft(t):.5*(2-Math.pow(2,-10*(t-1))),dt=t=>1-Math.sin(Math.acos(t)),te=Pt(dt),ee=Ct(dt),se=_(.42,0,1,1),ne=_(0,0,.58,1),Vt=_(.42,0,.58,1),re=t=>Array.isArray(t)&&typeof t[0]!="number",ie=t=>Array.isArray(t)&&typeof t[0]=="number",ae={linear:tt,easeIn:se,easeInOut:Vt,easeOut:ne,circIn:dt,circInOut:ee,circOut:te,backIn:ft,backInOut:Qt,backOut:Et,anticipate:Yt},oe=t=>typeof t=="string",vt=t=>{if(ie(t)){Ft(t.length===4);const[e,s,n,r]=t;return _(e,s,n,r)}else if(oe(t))return ae[t];return t},j=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ce(t,e){let s=new Set,n=new Set,r=!1,i=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function u(c){a.has(c)&&(h.schedule(c),t()),c(o)}const h={schedule:(c,f=!1,y=!1)=>{const M=y&&r?s:n;return f&&a.add(c),M.add(c),c},cancel:c=>{n.delete(c),a.delete(c)},process:c=>{if(o=c,r){i=!0;return}r=!0;const f=s;s=n,n=f,s.forEach(u),s.clear(),r=!1,i&&(i=!1,h.process(c))}};return h}const le=40;function ue(t,e){let s=!1,n=!0;const r={delta:0,timestamp:0,isProcessing:!1},i=()=>s=!0,a=j.reduce((x,b)=>(x[b]=ce(i),x),{}),{setup:o,read:u,resolveKeyframes:h,preUpdate:c,update:f,preRender:y,render:D,postRender:M}=a,p=()=>{const x=ut.useManualTiming,b=x?r.timestamp:performance.now();s=!1,x||(r.delta=n?1e3/60:Math.max(Math.min(b-r.timestamp,le),1)),r.timestamp=b,r.isProcessing=!0,o.process(r),u.process(r),h.process(r),c.process(r),f.process(r),y.process(r),D.process(r),M.process(r),r.isProcessing=!1,s&&e&&(n=!1,t(p))},v=()=>{s=!0,n=!0,r.isProcessing||t(p)};return{schedule:j.reduce((x,b)=>{const g=a[b];return x[b]=(F,k=!1,d=!1)=>(s||v(),g.schedule(F,k,d)),x},{}),cancel:x=>{for(let b=0;b<j.length;b++)a[j[b]].cancel(x)},state:r,steps:a}}const{schedule:Rt,cancel:he,state:J,steps:fs}=ue(typeof requestAnimationFrame<"u"?requestAnimationFrame:tt,!0);let Z;function fe(){Z=void 0}const C={now:()=>(Z===void 0&&C.set(J.isProcessing||ut.useManualTiming?J.timestamp:performance.now()),Z),set:t=>{Z=t,queueMicrotask(fe)}},It=t=>e=>typeof e=="string"&&e.startsWith(t),ds=It("--"),de=It("var(--"),pe=t=>de(t)?me.test(t.split("/*")[0].trim()):!1,me=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ps(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const pt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Nt={...pt,transform:t=>O(0,1,t)},ms={...pt,default:1},q=t=>Math.round(t*1e5)/1e5,Ot=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ge(t){return t==null}const ye=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,mt=(t,e)=>s=>!!(typeof s=="string"&&ye.test(s)&&s.startsWith(t)||e&&!ge(s)&&Object.prototype.hasOwnProperty.call(s,e)),Kt=(t,e,s)=>n=>{if(typeof n!="string")return n;const[r,i,a,o]=n.match(Ot);return{[t]:parseFloat(r),[e]:parseFloat(i),[s]:parseFloat(a),alpha:o!==void 0?parseFloat(o):1}},ve=t=>O(0,255,t),st={...pt,transform:t=>Math.round(ve(t))},N={test:mt("rgb","red"),parse:Kt("red","green","blue"),transform:({red:t,green:e,blue:s,alpha:n=1})=>"rgba("+st.transform(t)+", "+st.transform(e)+", "+st.transform(s)+", "+q(Nt.transform(n))+")"};function be(t){let e="",s="",n="",r="";return t.length>5?(e=t.substring(1,3),s=t.substring(3,5),n=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),s=t.substring(2,3),n=t.substring(3,4),r=t.substring(4,5),e+=e,s+=s,n+=n,r+=r),{red:parseInt(e,16),green:parseInt(s,16),blue:parseInt(n,16),alpha:r?parseInt(r,16)/255:1}}const at={test:mt("#"),parse:be,transform:N.transform},$=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),gs=$("deg"),L=$("%"),ys=$("px"),vs=$("vh"),bs=$("vw"),Ts={...L,parse:t=>L.parse(t)/100,transform:t=>L.transform(t*100)},G={test:mt("hsl","hue"),parse:Kt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:s,alpha:n=1})=>"hsla("+Math.round(t)+", "+L.transform(q(e))+", "+L.transform(q(s))+", "+q(Nt.transform(n))+")"},P={test:t=>N.test(t)||at.test(t)||G.test(t),parse:t=>N.test(t)?N.parse(t):G.test(t)?G.parse(t):at.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?N.transform(t):G.transform(t),getAnimatableNone:t=>{const e=P.parse(t);return e.alpha=0,P.transform(e)}},Te=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function xe(t){var e,s;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Ot))==null?void 0:e.length)||0)+(((s=t.match(Te))==null?void 0:s.length)||0)>0}const Gt="number",Ut="color",Me="var",Ae="var(",bt="${}",De=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function B(t){const e=t.toString(),s=[],n={color:[],number:[],var:[]},r=[];let i=0;const o=e.replace(De,u=>(P.test(u)?(n.color.push(i),r.push(Ut),s.push(P.parse(u))):u.startsWith(Ae)?(n.var.push(i),r.push(Me),s.push(u)):(n.number.push(i),r.push(Gt),s.push(parseFloat(u))),++i,bt)).split(bt);return{values:s,split:o,indexes:n,types:r}}function Fe(t){return B(t).values}function qt({split:t,types:e}){const s=t.length;return n=>{let r="";for(let i=0;i<s;i++)if(r+=t[i],n[i]!==void 0){const a=e[i];a===Gt?r+=q(n[i]):a===Ut?r+=P.transform(n[i]):r+=n[i]}return r}}function Se(t){return qt(B(t))}const ke=t=>typeof t=="number"?0:P.test(t)?P.getAnimatableNone(t):t,we=(t,e)=>typeof t=="number"?e!=null&&e.trim().endsWith("/")?t:0:ke(t);function Ce(t){const e=B(t);return qt(e)(e.values.map((n,r)=>we(n,e.split[r])))}const Pe={test:xe,parse:Fe,createTransformer:Se,getAnimatableNone:Ce};function nt(t,e,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?t+(e-t)*6*s:s<1/2?e:s<2/3?t+(e-t)*(2/3-s)*6:t}function Ee({hue:t,saturation:e,lightness:s,alpha:n}){t/=360,e/=100,s/=100;let r=0,i=0,a=0;if(!e)r=i=a=s;else{const o=s<.5?s*(1+e):s+e-s*e,u=2*s-o;r=nt(u,o,t+1/3),i=nt(u,o,t),a=nt(u,o,t-1/3)}return{red:Math.round(r*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:n}}function X(t,e){return s=>s>0?e:t}const et=(t,e,s)=>t+(e-t)*s,rt=(t,e,s)=>{const n=t*t,r=s*(e*e-n)+n;return r<0?0:Math.sqrt(r)},Ve=[at,N,G],Re=t=>Ve.find(e=>e.test(t));function Tt(t){const e=Re(t);if(!e)return!1;let s=e.parse(t);return e===G&&(s=Ee(s)),s}const xt=(t,e)=>{const s=Tt(t),n=Tt(e);if(!s||!n)return X(t,e);const r={...s};return i=>(r.red=rt(s.red,n.red,i),r.green=rt(s.green,n.green,i),r.blue=rt(s.blue,n.blue,i),r.alpha=et(s.alpha,n.alpha,i),N.transform(r))},ot=new Set(["none","hidden"]);function Ie(t,e){return ot.has(t)?s=>s<=0?t:e:s=>s>=1?e:t}function Ne(t,e){return s=>et(t,e,s)}function gt(t){return typeof t=="number"?Ne:typeof t=="string"?pe(t)?X:P.test(t)?xt:Ge:Array.isArray(t)?Lt:typeof t=="object"?P.test(t)?xt:Oe:X}function Lt(t,e){const s=[...t],n=s.length,r=t.map((i,a)=>gt(i)(i,e[a]));return i=>{for(let a=0;a<n;a++)s[a]=r[a](i);return s}}function Oe(t,e){const s={...t,...e},n={};for(const r in s)t[r]!==void 0&&e[r]!==void 0&&(n[r]=gt(t[r])(t[r],e[r]));return r=>{for(const i in n)s[i]=n[i](r);return s}}function Ke(t,e){const s=[],n={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const i=e.types[r],a=t.indexes[i][n[i]],o=t.values[a]??0;s[r]=o,n[i]++}return s}const Ge=(t,e)=>{const s=Pe.createTransformer(e),n=B(t),r=B(e);return n.indexes.var.length===r.indexes.var.length&&n.indexes.color.length===r.indexes.color.length&&n.indexes.number.length>=r.indexes.number.length?ot.has(t)&&!r.values.length||ot.has(e)&&!n.values.length?Ie(t,e):ht(Lt(Ke(n,r),r.values),s):X(t,e)};function Wt(t,e,s){return typeof t=="number"&&typeof e=="number"&&typeof s=="number"?et(t,e,s):gt(t)(t,e)}const Ue=t=>{const e=({timestamp:s})=>t(s);return{start:(s=!0)=>Rt.update(e,s),stop:()=>he(e),now:()=>J.isProcessing?J.timestamp:C.now()}},qe=(t,e,s=10)=>{let n="";const r=Math.max(Math.round(e/s),2);for(let i=0;i<r;i++)n+=Math.round(t(i/(r-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},Q=2e4;function yt(t){let e=0;const s=50;let n=t.next(e);for(;!n.done&&e<Q;)e+=s,n=t.next(e);return e>=Q?1/0:e}function Le(t,e=100,s){const n=s({...t,keyframes:[0,e]}),r=Math.min(yt(n),Q);return{type:"keyframes",ease:i=>n.next(r*i).value/e,duration:R(r)}}const T={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function ct(t,e){return t*Math.sqrt(1-e*e)}const We=12;function Be(t,e,s){let n=s;for(let r=1;r<We;r++)n=n-t(n)/e(n);return n}const it=.001;function _e({duration:t=T.duration,bounce:e=T.bounce,velocity:s=T.velocity,mass:n=T.mass}){let r,i,a=1-e;a=O(T.minDamping,T.maxDamping,a),t=O(T.minDuration,T.maxDuration,R(t)),a<1?(r=h=>{const c=h*a,f=c*t,y=c-s,D=ct(h,a),M=Math.exp(-f);return it-y/D*M},i=h=>{const f=h*a*t,y=f*s+s,D=Math.pow(a,2)*Math.pow(h,2)*t,M=Math.exp(-f),p=ct(Math.pow(h,2),a);return(-r(h)+it>0?-1:1)*((y-D)*M)/p}):(r=h=>{const c=Math.exp(-h*t),f=(h-s)*t+1;return-it+c*f},i=h=>{const c=Math.exp(-h*t),f=(s-h)*(t*t);return c*f});const o=5/t,u=Be(r,i,o);if(t=U(t),isNaN(u))return{stiffness:T.stiffness,damping:T.damping,duration:t};{const h=Math.pow(u,2)*n;return{stiffness:h,damping:a*2*Math.sqrt(n*h),duration:t}}}const $e=["duration","bounce"],ze=["stiffness","damping","mass"];function Mt(t,e){return e.some(s=>t[s]!==void 0)}function je(t){let e={velocity:T.velocity,stiffness:T.stiffness,damping:T.damping,mass:T.mass,isResolvedFromDuration:!1,...t};if(!Mt(t,ze)&&Mt(t,$e))if(e.velocity=0,t.visualDuration){const s=t.visualDuration,n=2*Math.PI/(s*1.2),r=n*n,i=2*O(.05,1,1-(t.bounce||0))*Math.sqrt(r);e={...e,mass:T.mass,stiffness:r,damping:i}}else{const s=_e({...t,velocity:0});e={...e,...s,mass:T.mass},e.isResolvedFromDuration=!0}return e}function Y(t=T.visualDuration,e=T.bounce){const s=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:n,restDelta:r}=s;const i=s.keyframes[0],a=s.keyframes[s.keyframes.length-1],o={done:!1,value:i},{stiffness:u,damping:h,mass:c,duration:f,velocity:y,isResolvedFromDuration:D}=je({...s,velocity:-R(s.velocity||0)}),M=y||0,p=h/(2*Math.sqrt(u*c)),v=a-i,m=R(Math.sqrt(u/c)),w=Math.abs(v)<5;n||(n=w?T.restSpeed.granular:T.restSpeed.default),r||(r=w?T.restDelta.granular:T.restDelta.default);let x,b,g,F,k,d;if(p<1)g=ct(m,p),F=(M+p*m*v)/g,x=l=>{const A=Math.exp(-p*m*l);return a-A*(F*Math.sin(g*l)+v*Math.cos(g*l))},k=p*m*F+v*g,d=p*m*v-F*g,b=l=>Math.exp(-p*m*l)*(k*Math.sin(g*l)+d*Math.cos(g*l));else if(p===1){x=A=>a-Math.exp(-m*A)*(v+(M+m*v)*A);const l=M+m*v;b=A=>Math.exp(-m*A)*(m*l*A-M)}else{const l=m*Math.sqrt(p*p-1);x=V=>{const K=Math.exp(-p*m*V),I=Math.min(l*V,300);return a-K*((M+p*m*v)*Math.sinh(I)+l*v*Math.cosh(I))/l};const A=(M+p*m*v)/l,E=p*m*A-v*l,z=p*m*v-A*l;b=V=>{const K=Math.exp(-p*m*V),I=Math.min(l*V,300);return K*(E*Math.sinh(I)+z*Math.cosh(I))}}const S={calculatedDuration:D&&f||null,velocity:l=>U(b(l)),next:l=>{if(!D&&p<1){const E=Math.exp(-p*m*l),z=Math.sin(g*l),V=Math.cos(g*l),K=a-E*(F*z+v*V),I=U(E*(k*z+d*V));return o.done=Math.abs(I)<=n&&Math.abs(a-K)<=r,o.value=o.done?a:K,o}const A=x(l);if(D)o.done=l>=f;else{const E=U(b(l));o.done=Math.abs(E)<=n&&Math.abs(a-A)<=r}return o.value=o.done?a:A,o},toString:()=>{const l=Math.min(yt(S),Q),A=qe(E=>S.next(l*E).value,l,30);return l+"ms "+A},toTransition:()=>{}};return S}Y.applyToOptions=t=>{const e=Le(t,100,Y);return t.ease=e.ease,t.duration=U(e.duration),t.type="keyframes",t};const Ze=5;function Bt(t,e,s){const n=Math.max(e-Ze,0);return kt(s-t(n),e-n)}function lt({keyframes:t,velocity:e=0,power:s=.8,timeConstant:n=325,bounceDamping:r=10,bounceStiffness:i=500,modifyTarget:a,min:o,max:u,restDelta:h=.5,restSpeed:c}){const f=t[0],y={done:!1,value:f},D=d=>o!==void 0&&d<o||u!==void 0&&d>u,M=d=>o===void 0?u:u===void 0||Math.abs(o-d)<Math.abs(u-d)?o:u;let p=s*e;const v=f+p,m=a===void 0?v:a(v);m!==v&&(p=m-f);const w=d=>-p*Math.exp(-d/n),x=d=>m+w(d),b=d=>{const S=w(d),l=x(d);y.done=Math.abs(S)<=h,y.value=y.done?m:l};let g,F;const k=d=>{D(y.value)&&(g=d,F=Y({keyframes:[y.value,M(y.value)],velocity:Bt(x,d,y.value),damping:r,stiffness:i,restDelta:h,restSpeed:c}))};return k(0),{calculatedDuration:null,next:d=>{let S=!1;return!F&&g===void 0&&(S=!0,b(d),k(d)),g!==void 0&&d>=g?F.next(d-g):(!S&&b(d),y)}}}function He(t,e,s){const n=[],r=s||ut.mix||Wt,i=t.length-1;for(let a=0;a<i;a++){let o=r(t[a],t[a+1]);if(e){const u=Array.isArray(e)?e[a]||tt:e;o=ht(u,o)}n.push(o)}return n}function Je(t,e,{clamp:s=!0,ease:n,mixer:r}={}){const i=t.length;if(Ft(i===e.length),i===1)return()=>e[0];if(i===2&&e[0]===e[1])return()=>e[1];const a=t[0]===t[1];t[0]>t[i-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=He(e,n,r),u=o.length,h=c=>{if(a&&c<t[0])return e[0];let f=0;if(u>1)for(;f<t.length-2&&!(c<t[f+1]);f++);const y=St(t[f],t[f+1],c);return o[f](y)};return s?c=>h(O(t[0],t[i-1],c)):h}function Xe(t,e){const s=t[t.length-1];for(let n=1;n<=e;n++){const r=St(0,e,n);t.push(et(s,1,r))}}function Qe(t){const e=[0];return Xe(e,t.length-1),e}function Ye(t,e){return t.map(s=>s*e)}function ts(t,e){return t.map(()=>e||Vt).splice(0,t.length-1)}function W({duration:t=300,keyframes:e,times:s,ease:n="easeInOut"}){const r=re(n)?n.map(vt):vt(n),i={done:!1,value:e[0]},a=Ye(s&&s.length===e.length?s:Qe(e),t),o=Je(a,e,{ease:Array.isArray(r)?r:ts(e,r)});return{calculatedDuration:t,next:u=>(i.value=o(u),i.done=u>=t,i)}}const es=t=>t!==null;function ss(t,{repeat:e,repeatType:s="loop"},n,r=1){const i=t.filter(es),o=r<0||e&&s!=="loop"&&e%2===1?0:i.length-1;return!o||n===void 0?i[o]:n}const ns={decay:lt,inertia:lt,tween:W,keyframes:W,spring:Y};function rs(t){typeof t.type=="string"&&(t.type=ns[t.type])}class is{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,s){return this.finished.then(e,s)}}const as=t=>t/100;class xs extends is{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var n,r;const{motionValue:s}=this.options;s&&s.updatedAt!==C.now()&&this.tick(C.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(r=(n=this.options).onStop)==null||r.call(n))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;rs(e);const{type:s=W,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e;let{keyframes:o}=e;const u=s||W;u!==W&&typeof o[0]!="number"&&(this.mixKeyframes=ht(as,Wt(o[0],o[1])),o=[0,100]);const h=u({...e,keyframes:o});i==="mirror"&&(this.mirroredGenerator=u({...e,keyframes:[...o].reverse(),velocity:-a})),h.calculatedDuration===null&&(h.calculatedDuration=yt(h));const{calculatedDuration:c}=h;this.calculatedDuration=c,this.resolvedDuration=c+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=h}updateTime(e){const s=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(e,s=!1){const{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:u}=this;if(this.startTime===null)return n.next(0);const{delay:h=0,keyframes:c,repeat:f,repeatType:y,repeatDelay:D,type:M,onUpdate:p,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),s?this.currentTime=e:this.updateTime(e);const m=this.currentTime-h*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?m<0:m>r;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let x=this.currentTime,b=n;if(f){const d=Math.min(this.currentTime,r)/o;let S=Math.floor(d),l=d%1;!l&&d>=1&&(l=1),l===1&&S--,S=Math.min(S,f+1),!!(S%2)&&(y==="reverse"?(l=1-l,D&&(l-=D/o)):y==="mirror"&&(b=a)),x=O(0,1,l)*o}let g;w?(this.delayState.value=c[0],g=this.delayState):g=b.next(x),i&&!w&&(g.value=i(g.value));let{done:F}=g;!w&&u!==null&&(F=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&F);return k&&M!==lt&&(g.value=ss(c,this.options,v,this.speed)),p&&p(g.value),k&&this.finish(),g}then(e,s){return this.finished.then(e,s)}get duration(){return R(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+R(e)}get time(){return R(this.currentTime)}set time(e){e=U(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const s=this.generator.next(e).value;return Bt(n=>this.generator.next(n).value,e,s)}get speed(){return this.playbackSpeed}set speed(e){const s=this.playbackSpeed!==e;s&&this.driver&&this.updateTime(C.now()),this.playbackSpeed=e,s&&this.driver&&(this.time=R(this.currentTime))}play(){var r,i;if(this.isStopped)return;const{driver:e=Ue,startTime:s}=this.options;this.driver||(this.driver=e(a=>this.tick(a))),(i=(r=this.options).onPlay)==null||i.call(r);const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=s??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(C.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,s;this.notifyFinished(),this.teardown(),this.state="finished",(s=(e=this.options).onComplete)==null||s.call(e)}cancel(){var e,s;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(s=(e=this.options).onCancel)==null||s.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var s;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(s=this.driver)==null||s.stop(),e.observe(this)}}const At=30,os=t=>!isNaN(parseFloat(t)),Dt={current:void 0};class cs{constructor(e,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{var i;const r=C.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=s.owner}setCurrent(e){this.current=e,this.updatedAt=C.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=os(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,s){this.events[e]||(this.events[e]=new Zt);const n=this.events[e].add(s);return e==="change"?()=>{n(),Rt.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,s){this.passiveEffect=e,this.stopPassiveEffect=s}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,s,n){this.set(s),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,s=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Dt.current&&Dt.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=C.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>At)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,At);return kt(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(e){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=e(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,s;(e=this.dependents)==null||e.clear(),(s=this.events.destroy)==null||s.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ms(t,e){return new cs(t,e)}const As=t=>!!(t&&t.getVelocity);function Ds(t,e,s){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let n=document;e&&(n=e.current);const r=(s==null?void 0:s[t])??n.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t).filter(n=>n!=null)}const Fs=H.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});export{Qe as $,Ts as A,Nt as B,ms as C,P as D,B as E,ps as F,ue as G,Ds as H,he as I,xs as J,et as K,ds as L,ut as M,St as N,te as O,$t as P,zt as Q,J as R,Zt as S,fs as T,us as U,Fs as V,is as W,ht as X,Je as Y,Dt as Z,re as _,Ft as a,Le as a0,Xe as a1,Y as a2,kt as a3,ss as b,tt as c,ee as d,Qt as e,Rt as f,qe as g,Yt as h,ie as i,O as j,Pe as k,pe as l,R as m,pt as n,Ms as o,ys as p,As as q,rs as r,U as s,C as t,hs as u,L as v,gs as w,bs as x,vs as y,Ot as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._navbar_1cr4i_1{position:fixed;background:var(--color-surface);padding:var(--spacing-md);z-index:var(--z-index-sticky);display:flex;flex-direction:column;transition:transform var(--transition-base)}._navbarSidebar_1cr4i_12{top:0;left:0;bottom:0;width:220px;box-shadow:var(--shadow-lg);overflow:hidden;background:var(--color-background-secondary);border-right:1px solid var(--color-border)}._navbarTop_1cr4i_24{top:0;left:0;right:0;height:auto;flex-direction:row;align-items:center;padding:var(--spacing-sm) var(--spacing-lg);box-shadow:var(--shadow-md)}._navbarTop_1cr4i_24 ._navList_1cr4i_35{flex-direction:row;gap:var(--spacing-md);margin:0}._navbarTop_1cr4i_24 ._navItem_1cr4i_41{margin:0}._navbarMinimal_1cr4i_46{background:transparent;box-shadow:none;position:relative;padding:0}._navbarMinimal_1cr4i_46 ._navList_1cr4i_35{flex-direction:row;gap:var(--spacing-sm)}._navLogo_1cr4i_59{margin-bottom:var(--spacing-xl)}._navbarTop_1cr4i_24 ._navLogo_1cr4i_59{margin-bottom:0;margin-right:auto}._logoContainer_1cr4i_68{display:flex;align-items:center;gap:var(--spacing-md)}._logoImage_1cr4i_74{width:48px;height:48px;object-fit:contain;border-radius:var(--radius-md)}._logoPlaceholder_1cr4i_81{width:48px;height:48px;background:var(--color-primary);color:var(--color-text-inverse);border-radius:var(--radius-md);display:flex;align-items:center;justify-content:center;font-weight:var(--font-weight-bold);font-size:var(--font-size-lg)}._logoContent_1cr4i_94{display:flex;flex-direction:column}._logoText_1cr4i_99{font-size:var(--font-size-xl);font-weight:var(--font-weight-bold);color:var(--color-text);line-height:var(--line-height-tight)}._logoSubtitle_1cr4i_106{font-size:var(--font-size-xs);color:var(--color-text-secondary);line-height:var(--line-height-tight)}._navList_1cr4i_35{list-style:none;padding:0;margin:0;flex:1;min-height:0;display:flex;flex-direction:column;overflow-y:auto;scrollbar-width:none}._navList_1cr4i_35::-webkit-scrollbar{display:none}._navItem_1cr4i_41{margin-bottom:var(--spacing-xs)}._subNavItem_1cr4i_133{margin-left:var(--spacing-lg)}._navLink_1cr4i_137{display:flex;align-items:center;width:100%;padding:1rem 1.5rem;border:none;background:none;color:var(--color-text);font-size:var(--font-size-base);font-weight:var(--font-weight-medium);text-align:left;text-decoration:none;border-radius:var(--radius-md);position:relative;cursor:pointer;transition:all var(--transition-fast)}._activeBackground_1cr4i_155{position:absolute;bottom:0;left:0;right:0;height:2px;background:var(--color-primary);border-radius:0;z-index:0}._navIcon_1cr4i_166{font-size:1.25rem;height:1.5rem;margin-right:var(--spacing-sm);position:relative;z-index:1;transition:color var(--transition-fast)}._navText_1cr4i_178{position:relative;z-index:1;flex:1;font-size:1.1rem;transition:color var(--transition-fast)}._navBadge_1cr4i_189{position:relative;z-index:1;padding:2px 6px;background:var(--color-accent);color:var(--color-text-inverse);border-radius:var(--radius-full);font-size:var(--font-size-xs);font-weight:var(--font-weight-semibold);margin-left:auto}._chevron_1cr4i_201{position:relative;z-index:1;margin-left:auto;font-size:var(--font-size-xs);color:var(--color-text-secondary)}._subNavList_1cr4i_210{list-style:none;padding:0;margin:var(--spacing-xs) 0 0 0;overflow:hidden}._subNavList_1cr4i_210 ._navLink_1cr4i_137{padding:var(--spacing-xs) var(--spacing-sm);font-size:var(--font-size-sm)}._navFooter_1cr4i_223{margin-top:auto;padding-top:var(--spacing-md)}._mobileMenuButton_1cr4i_229{display:none;position:fixed;top:var(--spacing-md);left:var(--spacing-md);z-index:calc(var(--z-index-sticky) + 1);background:var(--color-primary);color:var(--color-text-inverse);border:none;border-radius:var(--radius-md);width:48px;height:48px;align-items:center;justify-content:center;box-shadow:var(--shadow-lg);cursor:pointer}._mobileMenuButton_1cr4i_229:hover{background:var(--color-primary-hover)}._mobileMenuButton_1cr4i_229 svg{font-size:1.5rem}._mobileBackdrop_1cr4i_256{position:fixed;top:0;left:0;right:0;bottom:0;background:#00000080;z-index:calc(var(--z-index-sticky) - 1)}@media (max-width: 768px){._mobileMenuButton_1cr4i_229{display:flex}._navbarSidebar_1cr4i_12{transform:translate(-100%)}._navbarSidebar_1cr4i_12._mobileMenuOpen_1cr4i_276{transform:translate(0)}._navbarTop_1cr4i_24{padding:var(--spacing-sm) var(--spacing-md)}._navbarTop_1cr4i_24 ._navList_1cr4i_35{position:fixed;top:60px;left:0;right:0;background:var(--color-surface);flex-direction:column;padding:var(--spacing-md);box-shadow:var(--shadow-lg);transform:translateY(-100%);transition:transform var(--transition-base)}._navbarTop_1cr4i_24._mobileMenuOpen_1cr4i_276 ._navList_1cr4i_35{transform:translateY(0)}}[data-colored-icons=true] ._navItem_1cr4i_41:nth-child(1) ._navIcon_1cr4i_166{color:#ff6b6b}[data-colored-icons=true] ._navItem_1cr4i_41:nth-child(2) ._navIcon_1cr4i_166{color:orange}[data-colored-icons=true] ._navItem_1cr4i_41:nth-child(3) ._navIcon_1cr4i_166{color:gold}[data-colored-icons=true] ._navItem_1cr4i_41:nth-child(4) ._navIcon_1cr4i_166{color:#42a5f5}[data-colored-icons=true] ._navItem_1cr4i_41:nth-child(5) ._navIcon_1cr4i_166{color:#f9a825}[data-colored-icons=true] ._navItem_1cr4i_41:nth-child(6) ._navIcon_1cr4i_166{color:#4ade80}[data-colored-icons=true] ._navItem_1cr4i_41:nth-child(7) ._navIcon_1cr4i_166{color:#60a5fa}[data-colored-icons=true] ._navItem_1cr4i_41:nth-child(8) ._navIcon_1cr4i_166{color:#a78bfa}[data-colored-icons=true] ._navItem_1cr4i_41:nth-child(9) ._navIcon_1cr4i_166{color:#e879f9}[data-colored-icons=true] ._navItem_1cr4i_41:nth-child(10) ._navIcon_1cr4i_166{color:#26c6da}[data-colored-icons=true] ._navItem_1cr4i_41:nth-child(11) ._navIcon_1cr4i_166{color:#ec407a}[data-colored-icons=true] ._navItem_1cr4i_41:nth-child(12) ._navIcon_1cr4i_166{color:#ff7043}[data-colored-icons=true] ._navItem_1cr4i_41:nth-child(13) ._navIcon_1cr4i_166{color:#78909c}._navbar_cwgqa_4{position:fixed;top:0;left:0;right:0;display:flex;align-items:center;justify-content:space-between;padding:var(--spacing-sm) var(--spacing-md);background:var(--color-background-secondary);border-bottom:1px solid var(--color-border);z-index:var(--z-index-fixed);height:56px}._navLogo_cwgqa_20{margin:0}._logoContainer_cwgqa_24{display:flex;align-items:center;gap:var(--spacing-sm)}._logoImage_cwgqa_30{width:36px;height:36px;object-fit:contain;border-radius:var(--radius-sm)}._logoPlaceholder_cwgqa_37{width:36px;height:36px;background:var(--color-primary);color:var(--color-text-inverse);border-radius:var(--radius-sm);display:flex;align-items:center;justify-content:center;font-weight:var(--font-weight-bold);font-size:var(--font-size-base)}._logoContent_cwgqa_50{display:flex;flex-direction:column}._logoText_cwgqa_55{font-size:var(--font-size-lg);font-weight:var(--font-weight-bold);color:var(--color-text);line-height:var(--line-height-tight)}._logoSubtitle_cwgqa_62{display:none}._mobileMenuButton_cwgqa_67{display:flex;align-items:center;justify-content:center;background:none;border:none;cursor:pointer;padding:8px;font-size:24px;color:var(--color-text);z-index:calc(var(--z-index-modal) + 1);border-radius:8px;transition:color var(--transition-fast)}._mobileMenuButton_cwgqa_67._menuOpen_cwgqa_82{color:var(--color-text-inverse)}._mobileBackdrop_cwgqa_87{position:fixed;top:0;left:0;right:0;bottom:0;background:#000000d9;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);z-index:var(--z-index-modal);display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding-top:80px;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y}._navList_cwgqa_108{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;align-items:center;gap:var(--spacing-xs);width:90%;max-width:360px}._navItem_cwgqa_120{width:100%;margin:0}._subNavItem_cwgqa_125{margin-left:var(--spacing-lg)}._navLink_cwgqa_129{display:flex;align-items:center;width:100%;padding:var(--spacing-md) var(--spacing-lg);border:none;background:none;color:#fffc;font-size:var(--font-size-xl);font-weight:var(--font-weight-medium);text-align:left;text-decoration:none;border-radius:var(--radius-md);position:relative;cursor:pointer;transition:all var(--transition-fast)}._navLink_cwgqa_129:hover{color:#fff;background:#ffffff14}._navLink_cwgqa_129._active_cwgqa_152{color:var(--color-primary)}._activeBackground_cwgqa_156{display:none}._navIcon_cwgqa_160{font-size:1.4rem;width:1.4rem;height:1.4rem;min-width:1.4rem;margin-right:var(--spacing-md);transition:color var(--transition-fast)}._activeIcon_cwgqa_169{color:var(--color-primary)}._navText_cwgqa_173{font-size:var(--font-size-xl);letter-spacing:var(--letter-spacing-wide);transition:color var(--transition-fast)}._activeText_cwgqa_179{color:var(--color-primary)}._navBadge_cwgqa_183{padding:2px 8px;background:var(--color-accent);color:var(--color-text-inverse);border-radius:var(--radius-full);font-size:var(--font-size-xs);font-weight:var(--font-weight-semibold);margin-left:auto}._chevron_cwgqa_194,._subNavList_cwgqa_195{display:none}._navActions_cwgqa_200{display:flex;align-items:center;margin-left:auto;gap:0}[data-colored-icons=true] ._navItem_cwgqa_120:nth-child(1) ._navIcon_cwgqa_160{color:orange}[data-colored-icons=true] ._navItem_cwgqa_120:nth-child(2) ._navIcon_cwgqa_160{color:gold}[data-colored-icons=true] ._navItem_cwgqa_120:nth-child(3) ._navIcon_cwgqa_160{color:#42a5f5}[data-colored-icons=true] ._navItem_cwgqa_120:nth-child(4) ._navIcon_cwgqa_160{color:#f9a825}[data-colored-icons=true] ._navItem_cwgqa_120:nth-child(5) ._navIcon_cwgqa_160{color:#4ade80}[data-colored-icons=true] ._navItem_cwgqa_120:nth-child(6) ._navIcon_cwgqa_160{color:#60a5fa}[data-colored-icons=true] ._navItem_cwgqa_120:nth-child(7) ._navIcon_cwgqa_160{color:#a78bfa}[data-colored-icons=true] ._navItem_cwgqa_120:nth-child(8) ._navIcon_cwgqa_160{color:#e879f9}[data-colored-icons=true] ._navItem_cwgqa_120:nth-child(9) ._navIcon_cwgqa_160{color:#26c6da}[data-colored-icons=true] ._navItem_cwgqa_120:nth-child(10) ._navIcon_cwgqa_160{color:#ec407a}[data-colored-icons=true] ._navItem_cwgqa_120:nth-child(11) ._navIcon_cwgqa_160{color:#ff7043}[data-colored-icons=true] ._navItem_cwgqa_120:nth-child(12) ._navIcon_cwgqa_160{color:#78909c}
|