dune-react 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -0
- package/dist/_virtual/_commonjsHelpers.js +8 -0
- package/dist/_virtual/index.js +4 -0
- package/dist/_virtual/sha1.js +4 -0
- package/dist/_virtual/util.js +4 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/ui-custom/background.d.ts +8 -0
- package/dist/components/ui-custom/background.js +51 -0
- package/dist/components/ui-custom/cover.d.ts +17 -0
- package/dist/components/ui-custom/cover.js +231 -0
- package/dist/components/ui-custom/sparkles.d.ts +13 -0
- package/dist/components/ui-custom/sparkles.js +418 -0
- package/dist/components/ui-custom/spotlight-new.d.ts +13 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +40 -0
- package/dist/node_modules/.pnpm/@fluid-tailwind_tailwind-merge@0.0.3_tailwind-merge@3.3.1/node_modules/@fluid-tailwind/tailwind-merge/dist/index.js +50 -0
- package/dist/node_modules/.pnpm/@tsparticles_basic@3.9.1/node_modules/@tsparticles/basic/browser/index.js +25 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Canvas.js +510 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Container.js +463 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Engine.js +293 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Particle.js +355 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Particles.js +326 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Retina.js +37 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Constants.js +105 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/EventListeners.js +309 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/ExternalInteractorBase.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/InteractionManager.js +64 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/ParticlesInteractorBase.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Point.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/QuadTree.js +60 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Ranges.js +57 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Vectors.js +120 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/AnimationStatus.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Directions/MoveDirection.js +17 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Directions/OutModeDirection.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Directions/RotateDirection.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/InteractivityDetect.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/AnimationMode.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/CollisionMode.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/LimitMode.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/OutMode.js +11 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/PixelMode.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/ResponsiveMode.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/ThemeMode.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/AlterType.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/DestroyType.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/DivType.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/EasingType.js +33 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/EventType.js +18 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/GradientType.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/InteractorType.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/ParticleOutType.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/StartValueType.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/AnimatableColor.js +38 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/AnimationOptions.js +60 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Background/Background.js +39 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/BackgroundMask/BackgroundMask.js +27 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/BackgroundMask/BackgroundMaskCover.js +24 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/ColorAnimation.js +22 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/FullScreen/FullScreen.js +21 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/HslAnimation.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/ClickEvent.js +21 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/DivEvent.js +30 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/Events.js +33 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/HoverEvent.js +24 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/Parallax.js +25 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/ResizeEvent.js +21 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Interactivity.js +25 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Modes/Modes.js +28 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/ManualParticle.js +24 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Options.js +163 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/OptionsColor.js +29 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Bounce/ParticlesBounce.js +18 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Bounce/ParticlesBounceFactor.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Collisions/Collisions.js +36 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Collisions/CollisionsAbsorb.js +17 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Collisions/CollisionsOverlap.js +21 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Effect/Effect.js +36 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/Move.js +95 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveAngle.js +22 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveAttract.js +36 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveCenter.js +30 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveGravity.js +30 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveTrail.js +26 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveTrailFill.js +18 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/OutModes.js +22 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/Path/MovePath.js +30 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/Spin.js +26 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Number/ParticlesDensity.js +27 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Number/ParticlesNumber.js +23 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Number/ParticlesNumberLimit.js +22 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Opacity/Opacity.js +23 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Opacity/OpacityAnimation.js +22 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/ParticlesOptions.js +97 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Shadow.js +38 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Shape/Shape.js +36 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Size/Size.js +23 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Size/SizeAnimation.js +22 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Stroke.js +25 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/ZIndex/ZIndex.js +28 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Responsive.js +31 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Theme/Theme.js +24 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Theme/ThemeDefault.js +26 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/ValueWithRandom.js +46 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Types/RangeType.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/CanvasUtils.js +168 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/ColorUtils.js +316 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/EventDispatcher.js +47 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/NumberUtils.js +135 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/OptionsUtils.js +15 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/TypeUtils.js +26 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/Utils.js +475 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/index.js +82 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/init.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-attract@3.9.1/node_modules/@tsparticles/interaction-external-attract/browser/Attractor.js +81 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-attract@3.9.1/node_modules/@tsparticles/interaction-external-attract/browser/Options/Classes/Attract.js +38 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-attract@3.9.1/node_modules/@tsparticles/interaction-external-attract/browser/Utils.js +50 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-attract@3.9.1/node_modules/@tsparticles/interaction-external-attract/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bounce@3.9.1/node_modules/@tsparticles/interaction-external-bounce/browser/Bouncer.js +45 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bounce@3.9.1/node_modules/@tsparticles/interaction-external-bounce/browser/Options/Classes/Bounce.js +17 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bounce@3.9.1/node_modules/@tsparticles/interaction-external-bounce/browser/Utils.js +47 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bounce@3.9.1/node_modules/@tsparticles/interaction-external-bounce/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Bubbler.js +274 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Enums.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Options/Classes/Bubble.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Options/Classes/BubbleBase.js +39 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Options/Classes/BubbleDiv.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Utils.js +13 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-connect@3.9.1/node_modules/@tsparticles/interaction-external-connect/browser/Connector.js +59 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-connect@3.9.1/node_modules/@tsparticles/interaction-external-connect/browser/Options/Classes/Connect.js +24 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-connect@3.9.1/node_modules/@tsparticles/interaction-external-connect/browser/Options/Classes/ConnectLinks.js +17 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-connect@3.9.1/node_modules/@tsparticles/interaction-external-connect/browser/Utils.js +44 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-connect@3.9.1/node_modules/@tsparticles/interaction-external-connect/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-grab@3.9.1/node_modules/@tsparticles/interaction-external-grab/browser/Grabber.js +76 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-grab@3.9.1/node_modules/@tsparticles/interaction-external-grab/browser/Options/Classes/Grab.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-grab@3.9.1/node_modules/@tsparticles/interaction-external-grab/browser/Options/Classes/GrabLinks.js +29 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-grab@3.9.1/node_modules/@tsparticles/interaction-external-grab/browser/Utils.js +19 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-grab@3.9.1/node_modules/@tsparticles/interaction-external-grab/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-pause@3.9.1/node_modules/@tsparticles/interaction-external-pause/browser/Pauser.js +32 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-pause@3.9.1/node_modules/@tsparticles/interaction-external-pause/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-push@3.9.1/node_modules/@tsparticles/interaction-external-push/browser/Options/Classes/Push.js +34 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-push@3.9.1/node_modules/@tsparticles/interaction-external-push/browser/Pusher.js +47 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-push@3.9.1/node_modules/@tsparticles/interaction-external-push/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-remove@3.9.1/node_modules/@tsparticles/interaction-external-remove/browser/Options/Classes/Remove.js +19 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-remove@3.9.1/node_modules/@tsparticles/interaction-external-remove/browser/Remover.js +39 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-remove@3.9.1/node_modules/@tsparticles/interaction-external-remove/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-repulse@3.9.1/node_modules/@tsparticles/interaction-external-repulse/browser/Options/Classes/Repulse.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-repulse@3.9.1/node_modules/@tsparticles/interaction-external-repulse/browser/Options/Classes/RepulseBase.js +38 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-repulse@3.9.1/node_modules/@tsparticles/interaction-external-repulse/browser/Options/Classes/RepulseDiv.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-repulse@3.9.1/node_modules/@tsparticles/interaction-external-repulse/browser/Repulser.js +160 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-repulse@3.9.1/node_modules/@tsparticles/interaction-external-repulse/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-slow@3.9.1/node_modules/@tsparticles/interaction-external-slow/browser/Options/Classes/Slow.js +21 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-slow@3.9.1/node_modules/@tsparticles/interaction-external-slow/browser/Slower.js +53 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-slow@3.9.1/node_modules/@tsparticles/interaction-external-slow/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-attract@3.9.1/node_modules/@tsparticles/interaction-particles-attract/browser/Attractor.js +37 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-attract@3.9.1/node_modules/@tsparticles/interaction-particles-attract/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/Absorb.js +28 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/Bounce.js +18 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/Collider.js +41 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/Destroy.js +17 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/ResolveCollision.js +23 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/CircleWarp.js +33 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/LinkInstance.js +152 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/Linker.js +109 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/LinksPlugin.js +18 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/Options/Classes/Links.js +58 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/Options/Classes/LinksShadow.js +25 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/Options/Classes/LinksTriangle.js +28 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/Utils.js +106 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/interaction.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/plugin.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_move-base@3.9.1/node_modules/@tsparticles/move-base/browser/BaseMover.js +37 -0
- package/dist/node_modules/.pnpm/@tsparticles_move-base@3.9.1/node_modules/@tsparticles/move-base/browser/Utils.js +128 -0
- package/dist/node_modules/.pnpm/@tsparticles_move-base@3.9.1/node_modules/@tsparticles/move-base/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_move-parallax@3.9.1/node_modules/@tsparticles/move-parallax/browser/ParallaxMover.js +31 -0
- package/dist/node_modules/.pnpm/@tsparticles_move-parallax@3.9.1/node_modules/@tsparticles/move-parallax/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_plugin-easing-quad@3.9.1/node_modules/@tsparticles/plugin-easing-quad/browser/index.js +11 -0
- package/dist/node_modules/.pnpm/@tsparticles_plugin-hex-color@3.9.1/node_modules/@tsparticles/plugin-hex-color/browser/HexColorManager.js +43 -0
- package/dist/node_modules/.pnpm/@tsparticles_plugin-hex-color@3.9.1/node_modules/@tsparticles/plugin-hex-color/browser/index.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_plugin-hsl-color@3.9.1/node_modules/@tsparticles/plugin-hsl-color/browser/HslColorManager.js +46 -0
- package/dist/node_modules/.pnpm/@tsparticles_plugin-hsl-color@3.9.1/node_modules/@tsparticles/plugin-hsl-color/browser/index.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_plugin-rgb-color@3.9.1/node_modules/@tsparticles/plugin-rgb-color/browser/RgbColorManager.js +45 -0
- package/dist/node_modules/.pnpm/@tsparticles_plugin-rgb-color@3.9.1/node_modules/@tsparticles/plugin-rgb-color/browser/index.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_react@3.0.0_@tsparticles_engine@3.9.1_react-dom@18.3.1_react@18.3.1/node_modules/@tsparticles/react/dist/Particles.js +18 -0
- package/dist/node_modules/.pnpm/@tsparticles_react@3.0.0_@tsparticles_engine@3.9.1_react-dom@18.3.1_react@18.3.1/node_modules/@tsparticles/react/dist/index.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-circle@3.9.1/node_modules/@tsparticles/shape-circle/browser/CircleDrawer.js +28 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-circle@3.9.1/node_modules/@tsparticles/shape-circle/browser/Utils.js +12 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-circle@3.9.1/node_modules/@tsparticles/shape-circle/browser/index.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-emoji@3.9.1/node_modules/@tsparticles/shape-emoji/browser/EmojiDrawer.js +103 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-emoji@3.9.1/node_modules/@tsparticles/shape-emoji/browser/Utils.js +13 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-emoji@3.9.1/node_modules/@tsparticles/shape-emoji/browser/index.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/GifUtils/ByteStream.js +51 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/GifUtils/Constants.js +6 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/GifUtils/Enums/DisposalMethod.js +14 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/GifUtils/Types/GIFDataHeaders.js +13 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/GifUtils/Utils.js +419 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/ImageDrawer.js +130 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/ImagePreloader.js +36 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/Options/Classes/Preload.js +33 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/Utils.js +94 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/index.js +54 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-line@3.9.1/node_modules/@tsparticles/shape-line/browser/LineDrawer.js +16 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-line@3.9.1/node_modules/@tsparticles/shape-line/browser/Utils.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-line@3.9.1/node_modules/@tsparticles/shape-line/browser/index.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-polygon@3.9.1/node_modules/@tsparticles/shape-polygon/browser/PolygonDrawer.js +27 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-polygon@3.9.1/node_modules/@tsparticles/shape-polygon/browser/PolygonDrawerBase.js +16 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-polygon@3.9.1/node_modules/@tsparticles/shape-polygon/browser/TriangleDrawer.js +30 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-polygon@3.9.1/node_modules/@tsparticles/shape-polygon/browser/Utils.js +19 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-polygon@3.9.1/node_modules/@tsparticles/shape-polygon/browser/index.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-square@3.9.1/node_modules/@tsparticles/shape-square/browser/SquareDrawer.js +16 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-square@3.9.1/node_modules/@tsparticles/shape-square/browser/Utils.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-square@3.9.1/node_modules/@tsparticles/shape-square/browser/index.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-star@3.9.1/node_modules/@tsparticles/shape-star/browser/StarDrawer.js +22 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-star@3.9.1/node_modules/@tsparticles/shape-star/browser/Utils.js +14 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-star@3.9.1/node_modules/@tsparticles/shape-star/browser/index.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_slim@3.9.1/node_modules/@tsparticles/slim/browser/index.js +56 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-color@3.9.1/node_modules/@tsparticles/updater-color/browser/ColorUpdater.js +23 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-color@3.9.1/node_modules/@tsparticles/updater-color/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/LifeUpdater.js +52 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/Options/Classes/Life.js +23 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/Options/Classes/LifeDelay.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/Options/Classes/LifeDuration.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/Utils.js +58 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-opacity@3.9.1/node_modules/@tsparticles/updater-opacity/browser/OpacityUpdater.js +38 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-opacity@3.9.1/node_modules/@tsparticles/updater-opacity/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/BounceOutMode.js +36 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/DestroyOutMode.js +37 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/NoneOutMode.js +36 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/OutOfCanvasUpdater.js +45 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/OutOutMode.js +110 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/Utils.js +66 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-rotate@3.9.1/node_modules/@tsparticles/updater-rotate/browser/Options/Classes/Rotate.js +29 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-rotate@3.9.1/node_modules/@tsparticles/updater-rotate/browser/Options/Classes/RotateAnimation.js +30 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-rotate@3.9.1/node_modules/@tsparticles/updater-rotate/browser/RotateUpdater.js +77 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-rotate@3.9.1/node_modules/@tsparticles/updater-rotate/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-size@3.9.1/node_modules/@tsparticles/updater-size/browser/SizeUpdater.js +30 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-size@3.9.1/node_modules/@tsparticles/updater-size/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-stroke-color@3.9.1/node_modules/@tsparticles/updater-stroke-color/browser/StrokeColorUpdater.js +35 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-stroke-color@3.9.1/node_modules/@tsparticles/updater-stroke-color/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +17 -0
- package/dist/node_modules/.pnpm/file-type@12.4.1/node_modules/file-type/index.js +826 -0
- package/dist/node_modules/.pnpm/file-type@12.4.1/node_modules/file-type/supported.js +242 -0
- package/dist/node_modules/.pnpm/file-type@12.4.1/node_modules/file-type/util.js +64 -0
- package/dist/node_modules/.pnpm/js-sha1@0.6.0/node_modules/js-sha1/src/sha1.js +311 -0
- package/dist/node_modules/.pnpm/nanoid@5.1.5/node_modules/nanoid/index.browser.js +22 -0
- package/dist/node_modules/.pnpm/tailwind-merge@3.3.1/node_modules/tailwind-merge/dist/bundle-mjs.js +3007 -0
- package/dist/utils/css-utils.d.ts +10 -0
- package/dist/utils/css-utils.js +17 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/storage-qetag.d.ts +22 -0
- package/dist/utils/storage-qetag.js +3 -0
- package/dist/utils/utils-api.d.ts +17 -0
- package/dist/utils/utils-api.js +31 -0
- package/dist/utils/utils-canvas.d.ts +30 -0
- package/dist/utils/utils-canvas.js +54 -0
- package/dist/utils/utils-common.d.ts +6 -0
- package/dist/utils/utils-common.js +15 -0
- package/dist/utils/utils-image.d.ts +33 -0
- package/dist/utils/utils-image.js +57 -0
- package/dist/utils/utils-random.d.ts +1 -0
- package/dist/utils/utils-random.js +6 -0
- package/dist/utils/utils-time.d.ts +49 -0
- package/dist/utils/utils-time.js +112 -0
- package/package.json +81 -0
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
import { animate, getRangeValue, cancelAnimation } from "../Utils/NumberUtils.js";
|
|
2
|
+
import { millisecondsToSeconds, defaultFps, errorPrefix, removeMinIndex, removeDeleteCount, defaultFpsLimit, minFpsLimit, touchEndLengthOffset, minCoordinate, clickRadius } from "./Utils/Constants.js";
|
|
3
|
+
import { getLogger, safeIntersectionObserver } from "../Utils/Utils.js";
|
|
4
|
+
import { Canvas } from "./Canvas.js";
|
|
5
|
+
import { EventListeners } from "./Utils/EventListeners.js";
|
|
6
|
+
import { EventType } from "../Enums/Types/EventType.js";
|
|
7
|
+
import { Options } from "../Options/Classes/Options.js";
|
|
8
|
+
import { Particles } from "./Particles.js";
|
|
9
|
+
import { Retina } from "./Retina.js";
|
|
10
|
+
import { loadOptions } from "../Utils/OptionsUtils.js";
|
|
11
|
+
function guardCheck(container) {
|
|
12
|
+
return container && !container.destroyed;
|
|
13
|
+
}
|
|
14
|
+
function initDelta(value, fpsLimit = defaultFps, smooth = false) {
|
|
15
|
+
return {
|
|
16
|
+
value,
|
|
17
|
+
factor: smooth ? defaultFps / fpsLimit : defaultFps * value / millisecondsToSeconds
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function loadContainerOptions(engine, container, ...sourceOptionsArr) {
|
|
21
|
+
const options = new Options(engine, container);
|
|
22
|
+
loadOptions(options, ...sourceOptionsArr);
|
|
23
|
+
return options;
|
|
24
|
+
}
|
|
25
|
+
class Container {
|
|
26
|
+
constructor(engine, id, sourceOptions) {
|
|
27
|
+
this._intersectionManager = (entries) => {
|
|
28
|
+
if (!guardCheck(this) || !this.actualOptions.pauseOnOutsideViewport) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
for (const entry of entries) {
|
|
32
|
+
if (entry.target !== this.interactivity.element) {
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
if (entry.isIntersecting) {
|
|
36
|
+
void this.play();
|
|
37
|
+
} else {
|
|
38
|
+
this.pause();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
this._nextFrame = (timestamp) => {
|
|
43
|
+
try {
|
|
44
|
+
if (!this._smooth && this._lastFrameTime !== void 0 && timestamp < this._lastFrameTime + millisecondsToSeconds / this.fpsLimit) {
|
|
45
|
+
this.draw(false);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
this._lastFrameTime ?? (this._lastFrameTime = timestamp);
|
|
49
|
+
const delta = initDelta(timestamp - this._lastFrameTime, this.fpsLimit, this._smooth);
|
|
50
|
+
this.addLifeTime(delta.value);
|
|
51
|
+
this._lastFrameTime = timestamp;
|
|
52
|
+
if (delta.value > millisecondsToSeconds) {
|
|
53
|
+
this.draw(false);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
this.particles.draw(delta);
|
|
57
|
+
if (!this.alive()) {
|
|
58
|
+
this.destroy();
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (this.animationStatus) {
|
|
62
|
+
this.draw(false);
|
|
63
|
+
}
|
|
64
|
+
} catch (e) {
|
|
65
|
+
getLogger().error(`${errorPrefix} in animation loop`, e);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
this._engine = engine;
|
|
69
|
+
this.id = Symbol(id);
|
|
70
|
+
this.fpsLimit = 120;
|
|
71
|
+
this._smooth = false;
|
|
72
|
+
this._delay = 0;
|
|
73
|
+
this._duration = 0;
|
|
74
|
+
this._lifeTime = 0;
|
|
75
|
+
this._firstStart = true;
|
|
76
|
+
this.started = false;
|
|
77
|
+
this.destroyed = false;
|
|
78
|
+
this._paused = true;
|
|
79
|
+
this._lastFrameTime = 0;
|
|
80
|
+
this.zLayers = 100;
|
|
81
|
+
this.pageHidden = false;
|
|
82
|
+
this._clickHandlers = /* @__PURE__ */ new Map();
|
|
83
|
+
this._sourceOptions = sourceOptions;
|
|
84
|
+
this._initialSourceOptions = sourceOptions;
|
|
85
|
+
this.retina = new Retina(this);
|
|
86
|
+
this.canvas = new Canvas(this, this._engine);
|
|
87
|
+
this.particles = new Particles(this._engine, this);
|
|
88
|
+
this.pathGenerators = /* @__PURE__ */ new Map();
|
|
89
|
+
this.interactivity = {
|
|
90
|
+
mouse: {
|
|
91
|
+
clicking: false,
|
|
92
|
+
inside: false
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
this.plugins = /* @__PURE__ */ new Map();
|
|
96
|
+
this.effectDrawers = /* @__PURE__ */ new Map();
|
|
97
|
+
this.shapeDrawers = /* @__PURE__ */ new Map();
|
|
98
|
+
this._options = loadContainerOptions(this._engine, this);
|
|
99
|
+
this.actualOptions = loadContainerOptions(this._engine, this);
|
|
100
|
+
this._eventListeners = new EventListeners(this);
|
|
101
|
+
this._intersectionObserver = safeIntersectionObserver((entries) => this._intersectionManager(entries));
|
|
102
|
+
this._engine.dispatchEvent(EventType.containerBuilt, { container: this });
|
|
103
|
+
}
|
|
104
|
+
get animationStatus() {
|
|
105
|
+
return !this._paused && !this.pageHidden && guardCheck(this);
|
|
106
|
+
}
|
|
107
|
+
get options() {
|
|
108
|
+
return this._options;
|
|
109
|
+
}
|
|
110
|
+
get sourceOptions() {
|
|
111
|
+
return this._sourceOptions;
|
|
112
|
+
}
|
|
113
|
+
addClickHandler(callback) {
|
|
114
|
+
if (!guardCheck(this)) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const el = this.interactivity.element;
|
|
118
|
+
if (!el) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
const clickOrTouchHandler = (e, pos, radius) => {
|
|
122
|
+
if (!guardCheck(this)) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
const pxRatio = this.retina.pixelRatio, posRetina = {
|
|
126
|
+
x: pos.x * pxRatio,
|
|
127
|
+
y: pos.y * pxRatio
|
|
128
|
+
}, particles = this.particles.quadTree.queryCircle(posRetina, radius * pxRatio);
|
|
129
|
+
callback(e, particles);
|
|
130
|
+
}, clickHandler = (e) => {
|
|
131
|
+
if (!guardCheck(this)) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
const mouseEvent = e, pos = {
|
|
135
|
+
x: mouseEvent.offsetX || mouseEvent.clientX,
|
|
136
|
+
y: mouseEvent.offsetY || mouseEvent.clientY
|
|
137
|
+
};
|
|
138
|
+
clickOrTouchHandler(e, pos, clickRadius);
|
|
139
|
+
}, touchStartHandler = () => {
|
|
140
|
+
if (!guardCheck(this)) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
touched = true;
|
|
144
|
+
touchMoved = false;
|
|
145
|
+
}, touchMoveHandler = () => {
|
|
146
|
+
if (!guardCheck(this)) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
touchMoved = true;
|
|
150
|
+
}, touchEndHandler = (e) => {
|
|
151
|
+
if (!guardCheck(this)) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
if (touched && !touchMoved) {
|
|
155
|
+
const touchEvent = e;
|
|
156
|
+
let lastTouch = touchEvent.touches[touchEvent.touches.length - touchEndLengthOffset];
|
|
157
|
+
if (!lastTouch) {
|
|
158
|
+
lastTouch = touchEvent.changedTouches[touchEvent.changedTouches.length - touchEndLengthOffset];
|
|
159
|
+
if (!lastTouch) {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
const element = this.canvas.element, canvasRect = element ? element.getBoundingClientRect() : void 0, pos = {
|
|
164
|
+
x: lastTouch.clientX - (canvasRect ? canvasRect.left : minCoordinate),
|
|
165
|
+
y: lastTouch.clientY - (canvasRect ? canvasRect.top : minCoordinate)
|
|
166
|
+
};
|
|
167
|
+
clickOrTouchHandler(e, pos, Math.max(lastTouch.radiusX, lastTouch.radiusY));
|
|
168
|
+
}
|
|
169
|
+
touched = false;
|
|
170
|
+
touchMoved = false;
|
|
171
|
+
}, touchCancelHandler = () => {
|
|
172
|
+
if (!guardCheck(this)) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
touched = false;
|
|
176
|
+
touchMoved = false;
|
|
177
|
+
};
|
|
178
|
+
let touched = false, touchMoved = false;
|
|
179
|
+
this._clickHandlers.set("click", clickHandler);
|
|
180
|
+
this._clickHandlers.set("touchstart", touchStartHandler);
|
|
181
|
+
this._clickHandlers.set("touchmove", touchMoveHandler);
|
|
182
|
+
this._clickHandlers.set("touchend", touchEndHandler);
|
|
183
|
+
this._clickHandlers.set("touchcancel", touchCancelHandler);
|
|
184
|
+
for (const [key, handler] of this._clickHandlers) {
|
|
185
|
+
el.addEventListener(key, handler);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
addLifeTime(value) {
|
|
189
|
+
this._lifeTime += value;
|
|
190
|
+
}
|
|
191
|
+
addPath(key, generator, override = false) {
|
|
192
|
+
if (!guardCheck(this) || !override && this.pathGenerators.has(key)) {
|
|
193
|
+
return false;
|
|
194
|
+
}
|
|
195
|
+
this.pathGenerators.set(key, generator);
|
|
196
|
+
return true;
|
|
197
|
+
}
|
|
198
|
+
alive() {
|
|
199
|
+
return !this._duration || this._lifeTime <= this._duration;
|
|
200
|
+
}
|
|
201
|
+
clearClickHandlers() {
|
|
202
|
+
var _a;
|
|
203
|
+
if (!guardCheck(this)) {
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
for (const [key, handler] of this._clickHandlers) {
|
|
207
|
+
(_a = this.interactivity.element) == null ? void 0 : _a.removeEventListener(key, handler);
|
|
208
|
+
}
|
|
209
|
+
this._clickHandlers.clear();
|
|
210
|
+
}
|
|
211
|
+
destroy(remove = true) {
|
|
212
|
+
var _a, _b;
|
|
213
|
+
if (!guardCheck(this)) {
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
this.stop();
|
|
217
|
+
this.clearClickHandlers();
|
|
218
|
+
this.particles.destroy();
|
|
219
|
+
this.canvas.destroy();
|
|
220
|
+
for (const effectDrawer of this.effectDrawers.values()) {
|
|
221
|
+
(_a = effectDrawer.destroy) == null ? void 0 : _a.call(effectDrawer, this);
|
|
222
|
+
}
|
|
223
|
+
for (const shapeDrawer of this.shapeDrawers.values()) {
|
|
224
|
+
(_b = shapeDrawer.destroy) == null ? void 0 : _b.call(shapeDrawer, this);
|
|
225
|
+
}
|
|
226
|
+
for (const key of this.effectDrawers.keys()) {
|
|
227
|
+
this.effectDrawers.delete(key);
|
|
228
|
+
}
|
|
229
|
+
for (const key of this.shapeDrawers.keys()) {
|
|
230
|
+
this.shapeDrawers.delete(key);
|
|
231
|
+
}
|
|
232
|
+
this._engine.clearPlugins(this);
|
|
233
|
+
this.destroyed = true;
|
|
234
|
+
if (remove) {
|
|
235
|
+
const mainArr = this._engine.items, idx = mainArr.findIndex((t) => t === this);
|
|
236
|
+
if (idx >= removeMinIndex) {
|
|
237
|
+
mainArr.splice(idx, removeDeleteCount);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
this._engine.dispatchEvent(EventType.containerDestroyed, { container: this });
|
|
241
|
+
}
|
|
242
|
+
draw(force) {
|
|
243
|
+
if (!guardCheck(this)) {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
let refreshTime = force;
|
|
247
|
+
const frame = (timestamp) => {
|
|
248
|
+
if (refreshTime) {
|
|
249
|
+
this._lastFrameTime = void 0;
|
|
250
|
+
refreshTime = false;
|
|
251
|
+
}
|
|
252
|
+
this._nextFrame(timestamp);
|
|
253
|
+
};
|
|
254
|
+
this._drawAnimationFrame = animate((timestamp) => frame(timestamp));
|
|
255
|
+
}
|
|
256
|
+
async export(type, options = {}) {
|
|
257
|
+
for (const plugin of this.plugins.values()) {
|
|
258
|
+
if (!plugin.export) {
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
261
|
+
const res = await plugin.export(type, options);
|
|
262
|
+
if (!res.supported) {
|
|
263
|
+
continue;
|
|
264
|
+
}
|
|
265
|
+
return res.blob;
|
|
266
|
+
}
|
|
267
|
+
getLogger().error(`${errorPrefix} - Export plugin with type ${type} not found`);
|
|
268
|
+
}
|
|
269
|
+
handleClickMode(mode) {
|
|
270
|
+
var _a;
|
|
271
|
+
if (!guardCheck(this)) {
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
this.particles.handleClickMode(mode);
|
|
275
|
+
for (const plugin of this.plugins.values()) {
|
|
276
|
+
(_a = plugin.handleClickMode) == null ? void 0 : _a.call(plugin, mode);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
async init() {
|
|
280
|
+
var _a, _b, _c, _d;
|
|
281
|
+
if (!guardCheck(this)) {
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
const effects = this._engine.getSupportedEffects();
|
|
285
|
+
for (const type of effects) {
|
|
286
|
+
const drawer = this._engine.getEffectDrawer(type);
|
|
287
|
+
if (drawer) {
|
|
288
|
+
this.effectDrawers.set(type, drawer);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
const shapes = this._engine.getSupportedShapes();
|
|
292
|
+
for (const type of shapes) {
|
|
293
|
+
const drawer = this._engine.getShapeDrawer(type);
|
|
294
|
+
if (drawer) {
|
|
295
|
+
this.shapeDrawers.set(type, drawer);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
await this.particles.initPlugins();
|
|
299
|
+
this._options = loadContainerOptions(this._engine, this, this._initialSourceOptions, this.sourceOptions);
|
|
300
|
+
this.actualOptions = loadContainerOptions(this._engine, this, this._options);
|
|
301
|
+
const availablePlugins = await this._engine.getAvailablePlugins(this);
|
|
302
|
+
for (const [id, plugin] of availablePlugins) {
|
|
303
|
+
this.plugins.set(id, plugin);
|
|
304
|
+
}
|
|
305
|
+
this.retina.init();
|
|
306
|
+
await this.canvas.init();
|
|
307
|
+
this.updateActualOptions();
|
|
308
|
+
this.canvas.initBackground();
|
|
309
|
+
this.canvas.resize();
|
|
310
|
+
const { zLayers, duration, delay, fpsLimit, smooth } = this.actualOptions;
|
|
311
|
+
this.zLayers = zLayers;
|
|
312
|
+
this._duration = getRangeValue(duration) * millisecondsToSeconds;
|
|
313
|
+
this._delay = getRangeValue(delay) * millisecondsToSeconds;
|
|
314
|
+
this._lifeTime = 0;
|
|
315
|
+
this.fpsLimit = fpsLimit > minFpsLimit ? fpsLimit : defaultFpsLimit;
|
|
316
|
+
this._smooth = smooth;
|
|
317
|
+
for (const drawer of this.effectDrawers.values()) {
|
|
318
|
+
await ((_a = drawer.init) == null ? void 0 : _a.call(drawer, this));
|
|
319
|
+
}
|
|
320
|
+
for (const drawer of this.shapeDrawers.values()) {
|
|
321
|
+
await ((_b = drawer.init) == null ? void 0 : _b.call(drawer, this));
|
|
322
|
+
}
|
|
323
|
+
for (const plugin of this.plugins.values()) {
|
|
324
|
+
await ((_c = plugin.init) == null ? void 0 : _c.call(plugin));
|
|
325
|
+
}
|
|
326
|
+
this._engine.dispatchEvent(EventType.containerInit, { container: this });
|
|
327
|
+
await this.particles.init();
|
|
328
|
+
this.particles.setDensity();
|
|
329
|
+
for (const plugin of this.plugins.values()) {
|
|
330
|
+
(_d = plugin.particlesSetup) == null ? void 0 : _d.call(plugin);
|
|
331
|
+
}
|
|
332
|
+
this._engine.dispatchEvent(EventType.particlesSetup, { container: this });
|
|
333
|
+
}
|
|
334
|
+
async loadTheme(name) {
|
|
335
|
+
if (!guardCheck(this)) {
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
this._currentTheme = name;
|
|
339
|
+
await this.refresh();
|
|
340
|
+
}
|
|
341
|
+
pause() {
|
|
342
|
+
var _a;
|
|
343
|
+
if (!guardCheck(this)) {
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
346
|
+
if (this._drawAnimationFrame !== void 0) {
|
|
347
|
+
cancelAnimation(this._drawAnimationFrame);
|
|
348
|
+
delete this._drawAnimationFrame;
|
|
349
|
+
}
|
|
350
|
+
if (this._paused) {
|
|
351
|
+
return;
|
|
352
|
+
}
|
|
353
|
+
for (const plugin of this.plugins.values()) {
|
|
354
|
+
(_a = plugin.pause) == null ? void 0 : _a.call(plugin);
|
|
355
|
+
}
|
|
356
|
+
if (!this.pageHidden) {
|
|
357
|
+
this._paused = true;
|
|
358
|
+
}
|
|
359
|
+
this._engine.dispatchEvent(EventType.containerPaused, { container: this });
|
|
360
|
+
}
|
|
361
|
+
play(force) {
|
|
362
|
+
if (!guardCheck(this)) {
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
const needsUpdate = this._paused || force;
|
|
366
|
+
if (this._firstStart && !this.actualOptions.autoPlay) {
|
|
367
|
+
this._firstStart = false;
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
if (this._paused) {
|
|
371
|
+
this._paused = false;
|
|
372
|
+
}
|
|
373
|
+
if (needsUpdate) {
|
|
374
|
+
for (const plugin of this.plugins.values()) {
|
|
375
|
+
if (plugin.play) {
|
|
376
|
+
plugin.play();
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
this._engine.dispatchEvent(EventType.containerPlay, { container: this });
|
|
381
|
+
this.draw(needsUpdate ?? false);
|
|
382
|
+
}
|
|
383
|
+
async refresh() {
|
|
384
|
+
if (!guardCheck(this)) {
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
this.stop();
|
|
388
|
+
return this.start();
|
|
389
|
+
}
|
|
390
|
+
async reset(sourceOptions) {
|
|
391
|
+
if (!guardCheck(this)) {
|
|
392
|
+
return;
|
|
393
|
+
}
|
|
394
|
+
this._initialSourceOptions = sourceOptions;
|
|
395
|
+
this._sourceOptions = sourceOptions;
|
|
396
|
+
this._options = loadContainerOptions(this._engine, this, this._initialSourceOptions, this.sourceOptions);
|
|
397
|
+
this.actualOptions = loadContainerOptions(this._engine, this, this._options);
|
|
398
|
+
return this.refresh();
|
|
399
|
+
}
|
|
400
|
+
async start() {
|
|
401
|
+
if (!guardCheck(this) || this.started) {
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
await this.init();
|
|
405
|
+
this.started = true;
|
|
406
|
+
await new Promise((resolve) => {
|
|
407
|
+
const start = async () => {
|
|
408
|
+
var _a;
|
|
409
|
+
this._eventListeners.addListeners();
|
|
410
|
+
if (this.interactivity.element instanceof HTMLElement && this._intersectionObserver) {
|
|
411
|
+
this._intersectionObserver.observe(this.interactivity.element);
|
|
412
|
+
}
|
|
413
|
+
for (const plugin of this.plugins.values()) {
|
|
414
|
+
await ((_a = plugin.start) == null ? void 0 : _a.call(plugin));
|
|
415
|
+
}
|
|
416
|
+
this._engine.dispatchEvent(EventType.containerStarted, { container: this });
|
|
417
|
+
this.play();
|
|
418
|
+
resolve();
|
|
419
|
+
};
|
|
420
|
+
this._delayTimeout = setTimeout(() => void start(), this._delay);
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
stop() {
|
|
424
|
+
var _a;
|
|
425
|
+
if (!guardCheck(this) || !this.started) {
|
|
426
|
+
return;
|
|
427
|
+
}
|
|
428
|
+
if (this._delayTimeout) {
|
|
429
|
+
clearTimeout(this._delayTimeout);
|
|
430
|
+
delete this._delayTimeout;
|
|
431
|
+
}
|
|
432
|
+
this._firstStart = true;
|
|
433
|
+
this.started = false;
|
|
434
|
+
this._eventListeners.removeListeners();
|
|
435
|
+
this.pause();
|
|
436
|
+
this.particles.clear();
|
|
437
|
+
this.canvas.stop();
|
|
438
|
+
if (this.interactivity.element instanceof HTMLElement && this._intersectionObserver) {
|
|
439
|
+
this._intersectionObserver.unobserve(this.interactivity.element);
|
|
440
|
+
}
|
|
441
|
+
for (const plugin of this.plugins.values()) {
|
|
442
|
+
(_a = plugin.stop) == null ? void 0 : _a.call(plugin);
|
|
443
|
+
}
|
|
444
|
+
for (const key of this.plugins.keys()) {
|
|
445
|
+
this.plugins.delete(key);
|
|
446
|
+
}
|
|
447
|
+
this._sourceOptions = this._options;
|
|
448
|
+
this._engine.dispatchEvent(EventType.containerStopped, { container: this });
|
|
449
|
+
}
|
|
450
|
+
updateActualOptions() {
|
|
451
|
+
this.actualOptions.responsive = [];
|
|
452
|
+
const newMaxWidth = this.actualOptions.setResponsive(this.canvas.size.width, this.retina.pixelRatio, this._options);
|
|
453
|
+
this.actualOptions.setTheme(this._currentTheme);
|
|
454
|
+
if (this._responsiveMaxWidth === newMaxWidth) {
|
|
455
|
+
return false;
|
|
456
|
+
}
|
|
457
|
+
this._responsiveMaxWidth = newMaxWidth;
|
|
458
|
+
return true;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
export {
|
|
462
|
+
Container
|
|
463
|
+
};
|