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,510 @@
|
|
|
1
|
+
import { paintBase, paintImage, clear, drawParticle, drawParticlePlugin, drawPlugin } from "../Utils/CanvasUtils.js";
|
|
2
|
+
import { getFullScreenStyle, safeMutationObserver, getLogger, cloneStyle } from "../Utils/Utils.js";
|
|
3
|
+
import { inverseFactorNumerator, minimumLength, minimumSize, zIndexFactorOffset, defaultOpacity, generatedAttribute, defaultTransformValue } from "./Utils/Constants.js";
|
|
4
|
+
import { rangeColorToHsl, rangeColorToRgb, getStyleFromRgb, getStyleFromHsl } from "../Utils/ColorUtils.js";
|
|
5
|
+
function setTransformValue(factor, newFactor, key) {
|
|
6
|
+
const newValue = newFactor[key];
|
|
7
|
+
if (newValue !== void 0) {
|
|
8
|
+
factor[key] = (factor[key] ?? defaultTransformValue) * newValue;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
function setStyle(canvas, style, important = false) {
|
|
12
|
+
if (!style) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const element = canvas;
|
|
16
|
+
if (!element) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const elementStyle = element.style;
|
|
20
|
+
if (!elementStyle) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const keys = /* @__PURE__ */ new Set();
|
|
24
|
+
for (const key in elementStyle) {
|
|
25
|
+
if (!Object.prototype.hasOwnProperty.call(elementStyle, key)) {
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
keys.add(elementStyle[key]);
|
|
29
|
+
}
|
|
30
|
+
for (const key in style) {
|
|
31
|
+
if (!Object.prototype.hasOwnProperty.call(style, key)) {
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
keys.add(style[key]);
|
|
35
|
+
}
|
|
36
|
+
for (const key of keys) {
|
|
37
|
+
const value = style.getPropertyValue(key);
|
|
38
|
+
if (!value) {
|
|
39
|
+
elementStyle.removeProperty(key);
|
|
40
|
+
} else {
|
|
41
|
+
elementStyle.setProperty(key, value, important ? "important" : "");
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
class Canvas {
|
|
46
|
+
constructor(container, engine) {
|
|
47
|
+
this.container = container;
|
|
48
|
+
this._applyPostDrawUpdaters = (particle) => {
|
|
49
|
+
var _a;
|
|
50
|
+
for (const updater of this._postDrawUpdaters) {
|
|
51
|
+
(_a = updater.afterDraw) == null ? void 0 : _a.call(updater, particle);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
this._applyPreDrawUpdaters = (ctx, particle, radius, zOpacity, colorStyles, transform) => {
|
|
55
|
+
var _a;
|
|
56
|
+
for (const updater of this._preDrawUpdaters) {
|
|
57
|
+
if (updater.getColorStyles) {
|
|
58
|
+
const { fill, stroke } = updater.getColorStyles(particle, ctx, radius, zOpacity);
|
|
59
|
+
if (fill) {
|
|
60
|
+
colorStyles.fill = fill;
|
|
61
|
+
}
|
|
62
|
+
if (stroke) {
|
|
63
|
+
colorStyles.stroke = stroke;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (updater.getTransformValues) {
|
|
67
|
+
const updaterTransform = updater.getTransformValues(particle);
|
|
68
|
+
for (const key in updaterTransform) {
|
|
69
|
+
setTransformValue(transform, updaterTransform, key);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
(_a = updater.beforeDraw) == null ? void 0 : _a.call(updater, particle);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
this._applyResizePlugins = () => {
|
|
76
|
+
var _a;
|
|
77
|
+
for (const plugin of this._resizePlugins) {
|
|
78
|
+
(_a = plugin.resize) == null ? void 0 : _a.call(plugin);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
this._getPluginParticleColors = (particle) => {
|
|
82
|
+
let fColor, sColor;
|
|
83
|
+
for (const plugin of this._colorPlugins) {
|
|
84
|
+
if (!fColor && plugin.particleFillColor) {
|
|
85
|
+
fColor = rangeColorToHsl(this._engine, plugin.particleFillColor(particle));
|
|
86
|
+
}
|
|
87
|
+
if (!sColor && plugin.particleStrokeColor) {
|
|
88
|
+
sColor = rangeColorToHsl(this._engine, plugin.particleStrokeColor(particle));
|
|
89
|
+
}
|
|
90
|
+
if (fColor && sColor) {
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return [fColor, sColor];
|
|
95
|
+
};
|
|
96
|
+
this._initCover = async () => {
|
|
97
|
+
const options = this.container.actualOptions, cover = options.backgroundMask.cover, color = cover.color;
|
|
98
|
+
if (color) {
|
|
99
|
+
const coverRgb = rangeColorToRgb(this._engine, color);
|
|
100
|
+
if (coverRgb) {
|
|
101
|
+
const coverColor = {
|
|
102
|
+
...coverRgb,
|
|
103
|
+
a: cover.opacity
|
|
104
|
+
};
|
|
105
|
+
this._coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);
|
|
106
|
+
}
|
|
107
|
+
} else {
|
|
108
|
+
await new Promise((resolve, reject) => {
|
|
109
|
+
if (!cover.image) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
const img = document.createElement("img");
|
|
113
|
+
img.addEventListener("load", () => {
|
|
114
|
+
this._coverImage = {
|
|
115
|
+
image: img,
|
|
116
|
+
opacity: cover.opacity
|
|
117
|
+
};
|
|
118
|
+
resolve();
|
|
119
|
+
});
|
|
120
|
+
img.addEventListener("error", (evt) => {
|
|
121
|
+
reject(evt.error);
|
|
122
|
+
});
|
|
123
|
+
img.src = cover.image;
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
this._initStyle = () => {
|
|
128
|
+
const element = this.element, options = this.container.actualOptions;
|
|
129
|
+
if (!element) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
if (this._fullScreen) {
|
|
133
|
+
this._setFullScreenStyle();
|
|
134
|
+
} else {
|
|
135
|
+
this._resetOriginalStyle();
|
|
136
|
+
}
|
|
137
|
+
for (const key in options.style) {
|
|
138
|
+
if (!key || !options.style || !Object.prototype.hasOwnProperty.call(options.style, key)) {
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
const value = options.style[key];
|
|
142
|
+
if (!value) {
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
element.style.setProperty(key, value, "important");
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
this._initTrail = async () => {
|
|
149
|
+
const options = this.container.actualOptions, trail = options.particles.move.trail, trailFill = trail.fill;
|
|
150
|
+
if (!trail.enable) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
const opacity = inverseFactorNumerator / trail.length;
|
|
154
|
+
if (trailFill.color) {
|
|
155
|
+
const fillColor = rangeColorToRgb(this._engine, trailFill.color);
|
|
156
|
+
if (!fillColor) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
this._trailFill = {
|
|
160
|
+
color: {
|
|
161
|
+
...fillColor
|
|
162
|
+
},
|
|
163
|
+
opacity
|
|
164
|
+
};
|
|
165
|
+
} else {
|
|
166
|
+
await new Promise((resolve, reject) => {
|
|
167
|
+
if (!trailFill.image) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
const img = document.createElement("img");
|
|
171
|
+
img.addEventListener("load", () => {
|
|
172
|
+
this._trailFill = {
|
|
173
|
+
image: img,
|
|
174
|
+
opacity
|
|
175
|
+
};
|
|
176
|
+
resolve();
|
|
177
|
+
});
|
|
178
|
+
img.addEventListener("error", (evt) => {
|
|
179
|
+
reject(evt.error);
|
|
180
|
+
});
|
|
181
|
+
img.src = trailFill.image;
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
this._paintBase = (baseColor) => {
|
|
186
|
+
this.draw((ctx) => paintBase(ctx, this.size, baseColor));
|
|
187
|
+
};
|
|
188
|
+
this._paintImage = (image, opacity) => {
|
|
189
|
+
this.draw((ctx) => paintImage(ctx, this.size, image, opacity));
|
|
190
|
+
};
|
|
191
|
+
this._repairStyle = () => {
|
|
192
|
+
const element = this.element;
|
|
193
|
+
if (!element) {
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
this._safeMutationObserver((observer) => observer.disconnect());
|
|
197
|
+
this._initStyle();
|
|
198
|
+
this.initBackground();
|
|
199
|
+
const pointerEvents = this._pointerEvents;
|
|
200
|
+
element.style.pointerEvents = pointerEvents;
|
|
201
|
+
element.setAttribute("pointer-events", pointerEvents);
|
|
202
|
+
this._safeMutationObserver((observer) => {
|
|
203
|
+
if (!element || !(element instanceof Node)) {
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
observer.observe(element, { attributes: true });
|
|
207
|
+
});
|
|
208
|
+
};
|
|
209
|
+
this._resetOriginalStyle = () => {
|
|
210
|
+
const element = this.element, originalStyle = this._originalStyle;
|
|
211
|
+
if (!element || !originalStyle) {
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
setStyle(element, originalStyle, true);
|
|
215
|
+
};
|
|
216
|
+
this._safeMutationObserver = (callback) => {
|
|
217
|
+
if (!this._mutationObserver) {
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
callback(this._mutationObserver);
|
|
221
|
+
};
|
|
222
|
+
this._setFullScreenStyle = () => {
|
|
223
|
+
const element = this.element;
|
|
224
|
+
if (!element) {
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
setStyle(element, getFullScreenStyle(this.container.actualOptions.fullScreen.zIndex), true);
|
|
228
|
+
};
|
|
229
|
+
this._engine = engine;
|
|
230
|
+
this._standardSize = {
|
|
231
|
+
height: 0,
|
|
232
|
+
width: 0
|
|
233
|
+
};
|
|
234
|
+
const pxRatio = container.retina.pixelRatio, stdSize = this._standardSize;
|
|
235
|
+
this.size = {
|
|
236
|
+
height: stdSize.height * pxRatio,
|
|
237
|
+
width: stdSize.width * pxRatio
|
|
238
|
+
};
|
|
239
|
+
this._context = null;
|
|
240
|
+
this._generated = false;
|
|
241
|
+
this._preDrawUpdaters = [];
|
|
242
|
+
this._postDrawUpdaters = [];
|
|
243
|
+
this._resizePlugins = [];
|
|
244
|
+
this._colorPlugins = [];
|
|
245
|
+
this._pointerEvents = "none";
|
|
246
|
+
}
|
|
247
|
+
get _fullScreen() {
|
|
248
|
+
return this.container.actualOptions.fullScreen.enable;
|
|
249
|
+
}
|
|
250
|
+
clear() {
|
|
251
|
+
const options = this.container.actualOptions, trail = options.particles.move.trail, trailFill = this._trailFill;
|
|
252
|
+
if (options.backgroundMask.enable) {
|
|
253
|
+
this.paint();
|
|
254
|
+
} else if (trail.enable && trail.length > minimumLength && trailFill) {
|
|
255
|
+
if (trailFill.color) {
|
|
256
|
+
this._paintBase(getStyleFromRgb(trailFill.color, trailFill.opacity));
|
|
257
|
+
} else if (trailFill.image) {
|
|
258
|
+
this._paintImage(trailFill.image, trailFill.opacity);
|
|
259
|
+
}
|
|
260
|
+
} else if (options.clear) {
|
|
261
|
+
this.draw((ctx) => {
|
|
262
|
+
clear(ctx, this.size);
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
destroy() {
|
|
267
|
+
this.stop();
|
|
268
|
+
if (this._generated) {
|
|
269
|
+
const element = this.element;
|
|
270
|
+
element == null ? void 0 : element.remove();
|
|
271
|
+
this.element = void 0;
|
|
272
|
+
} else {
|
|
273
|
+
this._resetOriginalStyle();
|
|
274
|
+
}
|
|
275
|
+
this._preDrawUpdaters = [];
|
|
276
|
+
this._postDrawUpdaters = [];
|
|
277
|
+
this._resizePlugins = [];
|
|
278
|
+
this._colorPlugins = [];
|
|
279
|
+
}
|
|
280
|
+
draw(cb) {
|
|
281
|
+
const ctx = this._context;
|
|
282
|
+
if (!ctx) {
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
return cb(ctx);
|
|
286
|
+
}
|
|
287
|
+
drawAsync(cb) {
|
|
288
|
+
const ctx = this._context;
|
|
289
|
+
if (!ctx) {
|
|
290
|
+
return void 0;
|
|
291
|
+
}
|
|
292
|
+
return cb(ctx);
|
|
293
|
+
}
|
|
294
|
+
drawParticle(particle, delta) {
|
|
295
|
+
if (particle.spawning || particle.destroyed) {
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
const radius = particle.getRadius();
|
|
299
|
+
if (radius <= minimumSize) {
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
const pfColor = particle.getFillColor(), psColor = particle.getStrokeColor() ?? pfColor;
|
|
303
|
+
let [fColor, sColor] = this._getPluginParticleColors(particle);
|
|
304
|
+
if (!fColor) {
|
|
305
|
+
fColor = pfColor;
|
|
306
|
+
}
|
|
307
|
+
if (!sColor) {
|
|
308
|
+
sColor = psColor;
|
|
309
|
+
}
|
|
310
|
+
if (!fColor && !sColor) {
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
this.draw((ctx) => {
|
|
314
|
+
var _a;
|
|
315
|
+
const container = this.container, options = container.actualOptions, zIndexOptions = particle.options.zIndex, zIndexFactor = zIndexFactorOffset - particle.zIndexFactor, zOpacityFactor = zIndexFactor ** zIndexOptions.opacityRate, opacity = particle.bubble.opacity ?? ((_a = particle.opacity) == null ? void 0 : _a.value) ?? defaultOpacity, strokeOpacity = particle.strokeOpacity ?? opacity, zOpacity = opacity * zOpacityFactor, zStrokeOpacity = strokeOpacity * zOpacityFactor, transform = {}, colorStyles = {
|
|
316
|
+
fill: fColor ? getStyleFromHsl(fColor, zOpacity) : void 0
|
|
317
|
+
};
|
|
318
|
+
colorStyles.stroke = sColor ? getStyleFromHsl(sColor, zStrokeOpacity) : colorStyles.fill;
|
|
319
|
+
this._applyPreDrawUpdaters(ctx, particle, radius, zOpacity, colorStyles, transform);
|
|
320
|
+
drawParticle({
|
|
321
|
+
container,
|
|
322
|
+
context: ctx,
|
|
323
|
+
particle,
|
|
324
|
+
delta,
|
|
325
|
+
colorStyles,
|
|
326
|
+
backgroundMask: options.backgroundMask.enable,
|
|
327
|
+
composite: options.backgroundMask.composite,
|
|
328
|
+
radius: radius * zIndexFactor ** zIndexOptions.sizeRate,
|
|
329
|
+
opacity: zOpacity,
|
|
330
|
+
shadow: particle.options.shadow,
|
|
331
|
+
transform
|
|
332
|
+
});
|
|
333
|
+
this._applyPostDrawUpdaters(particle);
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
drawParticlePlugin(plugin, particle, delta) {
|
|
337
|
+
this.draw((ctx) => drawParticlePlugin(ctx, plugin, particle, delta));
|
|
338
|
+
}
|
|
339
|
+
drawPlugin(plugin, delta) {
|
|
340
|
+
this.draw((ctx) => drawPlugin(ctx, plugin, delta));
|
|
341
|
+
}
|
|
342
|
+
async init() {
|
|
343
|
+
this._safeMutationObserver((obs) => obs.disconnect());
|
|
344
|
+
this._mutationObserver = safeMutationObserver((records) => {
|
|
345
|
+
for (const record of records) {
|
|
346
|
+
if (record.type === "attributes" && record.attributeName === "style") {
|
|
347
|
+
this._repairStyle();
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
this.resize();
|
|
352
|
+
this._initStyle();
|
|
353
|
+
await this._initCover();
|
|
354
|
+
try {
|
|
355
|
+
await this._initTrail();
|
|
356
|
+
} catch (e) {
|
|
357
|
+
getLogger().error(e);
|
|
358
|
+
}
|
|
359
|
+
this.initBackground();
|
|
360
|
+
this._safeMutationObserver((obs) => {
|
|
361
|
+
if (!this.element || !(this.element instanceof Node)) {
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
obs.observe(this.element, { attributes: true });
|
|
365
|
+
});
|
|
366
|
+
this.initUpdaters();
|
|
367
|
+
this.initPlugins();
|
|
368
|
+
this.paint();
|
|
369
|
+
}
|
|
370
|
+
initBackground() {
|
|
371
|
+
const options = this.container.actualOptions, background = options.background, element = this.element;
|
|
372
|
+
if (!element) {
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
const elementStyle = element.style;
|
|
376
|
+
if (!elementStyle) {
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
if (background.color) {
|
|
380
|
+
const color = rangeColorToRgb(this._engine, background.color);
|
|
381
|
+
elementStyle.backgroundColor = color ? getStyleFromRgb(color, background.opacity) : "";
|
|
382
|
+
} else {
|
|
383
|
+
elementStyle.backgroundColor = "";
|
|
384
|
+
}
|
|
385
|
+
elementStyle.backgroundImage = background.image || "";
|
|
386
|
+
elementStyle.backgroundPosition = background.position || "";
|
|
387
|
+
elementStyle.backgroundRepeat = background.repeat || "";
|
|
388
|
+
elementStyle.backgroundSize = background.size || "";
|
|
389
|
+
}
|
|
390
|
+
initPlugins() {
|
|
391
|
+
this._resizePlugins = [];
|
|
392
|
+
for (const plugin of this.container.plugins.values()) {
|
|
393
|
+
if (plugin.resize) {
|
|
394
|
+
this._resizePlugins.push(plugin);
|
|
395
|
+
}
|
|
396
|
+
if (plugin.particleFillColor ?? plugin.particleStrokeColor) {
|
|
397
|
+
this._colorPlugins.push(plugin);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
initUpdaters() {
|
|
402
|
+
this._preDrawUpdaters = [];
|
|
403
|
+
this._postDrawUpdaters = [];
|
|
404
|
+
for (const updater of this.container.particles.updaters) {
|
|
405
|
+
if (updater.afterDraw) {
|
|
406
|
+
this._postDrawUpdaters.push(updater);
|
|
407
|
+
}
|
|
408
|
+
if (updater.getColorStyles ?? updater.getTransformValues ?? updater.beforeDraw) {
|
|
409
|
+
this._preDrawUpdaters.push(updater);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
loadCanvas(canvas) {
|
|
414
|
+
if (this._generated && this.element) {
|
|
415
|
+
this.element.remove();
|
|
416
|
+
}
|
|
417
|
+
this._generated = canvas.dataset && generatedAttribute in canvas.dataset ? canvas.dataset[generatedAttribute] === "true" : this._generated;
|
|
418
|
+
this.element = canvas;
|
|
419
|
+
this.element.ariaHidden = "true";
|
|
420
|
+
this._originalStyle = cloneStyle(this.element.style);
|
|
421
|
+
const standardSize = this._standardSize;
|
|
422
|
+
standardSize.height = canvas.offsetHeight;
|
|
423
|
+
standardSize.width = canvas.offsetWidth;
|
|
424
|
+
const pxRatio = this.container.retina.pixelRatio, retinaSize = this.size;
|
|
425
|
+
canvas.height = retinaSize.height = standardSize.height * pxRatio;
|
|
426
|
+
canvas.width = retinaSize.width = standardSize.width * pxRatio;
|
|
427
|
+
this._context = this.element.getContext("2d");
|
|
428
|
+
this._safeMutationObserver((obs) => obs.disconnect());
|
|
429
|
+
this.container.retina.init();
|
|
430
|
+
this.initBackground();
|
|
431
|
+
this._safeMutationObserver((obs) => {
|
|
432
|
+
if (!this.element || !(this.element instanceof Node)) {
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
435
|
+
obs.observe(this.element, { attributes: true });
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
paint() {
|
|
439
|
+
const options = this.container.actualOptions;
|
|
440
|
+
this.draw((ctx) => {
|
|
441
|
+
if (options.backgroundMask.enable && options.backgroundMask.cover) {
|
|
442
|
+
clear(ctx, this.size);
|
|
443
|
+
if (this._coverImage) {
|
|
444
|
+
this._paintImage(this._coverImage.image, this._coverImage.opacity);
|
|
445
|
+
} else if (this._coverColorStyle) {
|
|
446
|
+
this._paintBase(this._coverColorStyle);
|
|
447
|
+
} else {
|
|
448
|
+
this._paintBase();
|
|
449
|
+
}
|
|
450
|
+
} else {
|
|
451
|
+
this._paintBase();
|
|
452
|
+
}
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
resize() {
|
|
456
|
+
if (!this.element) {
|
|
457
|
+
return false;
|
|
458
|
+
}
|
|
459
|
+
const container = this.container, currentSize = container.canvas._standardSize, newSize = {
|
|
460
|
+
width: this.element.offsetWidth,
|
|
461
|
+
height: this.element.offsetHeight
|
|
462
|
+
}, pxRatio = container.retina.pixelRatio, retinaSize = {
|
|
463
|
+
width: newSize.width * pxRatio,
|
|
464
|
+
height: newSize.height * pxRatio
|
|
465
|
+
};
|
|
466
|
+
if (newSize.height === currentSize.height && newSize.width === currentSize.width && retinaSize.height === this.element.height && retinaSize.width === this.element.width) {
|
|
467
|
+
return false;
|
|
468
|
+
}
|
|
469
|
+
const oldSize = { ...currentSize };
|
|
470
|
+
currentSize.height = newSize.height;
|
|
471
|
+
currentSize.width = newSize.width;
|
|
472
|
+
const canvasSize = this.size;
|
|
473
|
+
this.element.width = canvasSize.width = retinaSize.width;
|
|
474
|
+
this.element.height = canvasSize.height = retinaSize.height;
|
|
475
|
+
if (this.container.started) {
|
|
476
|
+
container.particles.setResizeFactor({
|
|
477
|
+
width: currentSize.width / oldSize.width,
|
|
478
|
+
height: currentSize.height / oldSize.height
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
return true;
|
|
482
|
+
}
|
|
483
|
+
setPointerEvents(type) {
|
|
484
|
+
const element = this.element;
|
|
485
|
+
if (!element) {
|
|
486
|
+
return;
|
|
487
|
+
}
|
|
488
|
+
this._pointerEvents = type;
|
|
489
|
+
this._repairStyle();
|
|
490
|
+
}
|
|
491
|
+
stop() {
|
|
492
|
+
this._safeMutationObserver((obs) => obs.disconnect());
|
|
493
|
+
this._mutationObserver = void 0;
|
|
494
|
+
this.draw((ctx) => clear(ctx, this.size));
|
|
495
|
+
}
|
|
496
|
+
async windowResize() {
|
|
497
|
+
if (!this.element || !this.resize()) {
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
const container = this.container, needsRefresh = container.updateActualOptions();
|
|
501
|
+
container.particles.setDensity();
|
|
502
|
+
this._applyResizePlugins();
|
|
503
|
+
if (needsRefresh) {
|
|
504
|
+
await container.refresh();
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
export {
|
|
509
|
+
Canvas
|
|
510
|
+
};
|