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.
Files changed (269) hide show
  1. package/README.md +49 -0
  2. package/dist/_virtual/_commonjsHelpers.js +8 -0
  3. package/dist/_virtual/index.js +4 -0
  4. package/dist/_virtual/sha1.js +4 -0
  5. package/dist/_virtual/util.js +4 -0
  6. package/dist/components/index.d.ts +4 -0
  7. package/dist/components/ui-custom/background.d.ts +8 -0
  8. package/dist/components/ui-custom/background.js +51 -0
  9. package/dist/components/ui-custom/cover.d.ts +17 -0
  10. package/dist/components/ui-custom/cover.js +231 -0
  11. package/dist/components/ui-custom/sparkles.d.ts +13 -0
  12. package/dist/components/ui-custom/sparkles.js +418 -0
  13. package/dist/components/ui-custom/spotlight-new.d.ts +13 -0
  14. package/dist/index.d.ts +2 -0
  15. package/dist/index.js +40 -0
  16. 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
  17. package/dist/node_modules/.pnpm/@tsparticles_basic@3.9.1/node_modules/@tsparticles/basic/browser/index.js +25 -0
  18. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Canvas.js +510 -0
  19. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Container.js +463 -0
  20. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Engine.js +293 -0
  21. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Particle.js +355 -0
  22. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Particles.js +326 -0
  23. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Retina.js +37 -0
  24. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Constants.js +105 -0
  25. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/EventListeners.js +309 -0
  26. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/ExternalInteractorBase.js +10 -0
  27. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/InteractionManager.js +64 -0
  28. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/ParticlesInteractorBase.js +10 -0
  29. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Point.js +9 -0
  30. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/QuadTree.js +60 -0
  31. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Ranges.js +57 -0
  32. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Vectors.js +120 -0
  33. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/AnimationStatus.js +8 -0
  34. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Directions/MoveDirection.js +17 -0
  35. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Directions/OutModeDirection.js +10 -0
  36. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Directions/RotateDirection.js +9 -0
  37. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/InteractivityDetect.js +9 -0
  38. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/AnimationMode.js +10 -0
  39. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/CollisionMode.js +9 -0
  40. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/LimitMode.js +8 -0
  41. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/OutMode.js +11 -0
  42. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/PixelMode.js +8 -0
  43. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/ResponsiveMode.js +8 -0
  44. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/ThemeMode.js +9 -0
  45. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/AlterType.js +8 -0
  46. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/DestroyType.js +9 -0
  47. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/DivType.js +8 -0
  48. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/EasingType.js +33 -0
  49. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/EventType.js +18 -0
  50. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/GradientType.js +9 -0
  51. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/InteractorType.js +8 -0
  52. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/ParticleOutType.js +9 -0
  53. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/StartValueType.js +9 -0
  54. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/AnimatableColor.js +38 -0
  55. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/AnimationOptions.js +60 -0
  56. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Background/Background.js +39 -0
  57. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/BackgroundMask/BackgroundMask.js +27 -0
  58. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/BackgroundMask/BackgroundMaskCover.js +24 -0
  59. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/ColorAnimation.js +22 -0
  60. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/FullScreen/FullScreen.js +21 -0
  61. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/HslAnimation.js +20 -0
  62. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/ClickEvent.js +21 -0
  63. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/DivEvent.js +30 -0
  64. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/Events.js +33 -0
  65. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/HoverEvent.js +24 -0
  66. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/Parallax.js +25 -0
  67. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/ResizeEvent.js +21 -0
  68. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Interactivity.js +25 -0
  69. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Modes/Modes.js +28 -0
  70. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/ManualParticle.js +24 -0
  71. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Options.js +163 -0
  72. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/OptionsColor.js +29 -0
  73. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Bounce/ParticlesBounce.js +18 -0
  74. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Bounce/ParticlesBounceFactor.js +10 -0
  75. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Collisions/Collisions.js +36 -0
  76. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Collisions/CollisionsAbsorb.js +17 -0
  77. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Collisions/CollisionsOverlap.js +21 -0
  78. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Effect/Effect.js +36 -0
  79. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/Move.js +95 -0
  80. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveAngle.js +22 -0
  81. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveAttract.js +36 -0
  82. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveCenter.js +30 -0
  83. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveGravity.js +30 -0
  84. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveTrail.js +26 -0
  85. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveTrailFill.js +18 -0
  86. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/OutModes.js +22 -0
  87. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/Path/MovePath.js +30 -0
  88. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/Spin.js +26 -0
  89. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Number/ParticlesDensity.js +27 -0
  90. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Number/ParticlesNumber.js +23 -0
  91. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Number/ParticlesNumberLimit.js +22 -0
  92. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Opacity/Opacity.js +23 -0
  93. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Opacity/OpacityAnimation.js +22 -0
  94. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/ParticlesOptions.js +97 -0
  95. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Shadow.js +38 -0
  96. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Shape/Shape.js +36 -0
  97. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Size/Size.js +23 -0
  98. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Size/SizeAnimation.js +22 -0
  99. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Stroke.js +25 -0
  100. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/ZIndex/ZIndex.js +28 -0
  101. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Responsive.js +31 -0
  102. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Theme/Theme.js +24 -0
  103. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Theme/ThemeDefault.js +26 -0
  104. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/ValueWithRandom.js +46 -0
  105. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Types/RangeType.js +8 -0
  106. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/CanvasUtils.js +168 -0
  107. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/ColorUtils.js +316 -0
  108. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/EventDispatcher.js +47 -0
  109. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/NumberUtils.js +135 -0
  110. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/OptionsUtils.js +15 -0
  111. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/TypeUtils.js +26 -0
  112. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/Utils.js +475 -0
  113. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/index.js +82 -0
  114. package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/init.js +9 -0
  115. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-attract@3.9.1/node_modules/@tsparticles/interaction-external-attract/browser/Attractor.js +81 -0
  116. 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
  117. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-attract@3.9.1/node_modules/@tsparticles/interaction-external-attract/browser/Utils.js +50 -0
  118. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-attract@3.9.1/node_modules/@tsparticles/interaction-external-attract/browser/index.js +10 -0
  119. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bounce@3.9.1/node_modules/@tsparticles/interaction-external-bounce/browser/Bouncer.js +45 -0
  120. 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
  121. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bounce@3.9.1/node_modules/@tsparticles/interaction-external-bounce/browser/Utils.js +47 -0
  122. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bounce@3.9.1/node_modules/@tsparticles/interaction-external-bounce/browser/index.js +10 -0
  123. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Bubbler.js +274 -0
  124. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Enums.js +9 -0
  125. 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
  126. 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
  127. 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
  128. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Utils.js +13 -0
  129. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/index.js +10 -0
  130. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-connect@3.9.1/node_modules/@tsparticles/interaction-external-connect/browser/Connector.js +59 -0
  131. 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
  132. 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
  133. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-connect@3.9.1/node_modules/@tsparticles/interaction-external-connect/browser/Utils.js +44 -0
  134. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-connect@3.9.1/node_modules/@tsparticles/interaction-external-connect/browser/index.js +10 -0
  135. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-grab@3.9.1/node_modules/@tsparticles/interaction-external-grab/browser/Grabber.js +76 -0
  136. 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
  137. 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
  138. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-grab@3.9.1/node_modules/@tsparticles/interaction-external-grab/browser/Utils.js +19 -0
  139. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-grab@3.9.1/node_modules/@tsparticles/interaction-external-grab/browser/index.js +10 -0
  140. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-pause@3.9.1/node_modules/@tsparticles/interaction-external-pause/browser/Pauser.js +32 -0
  141. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-pause@3.9.1/node_modules/@tsparticles/interaction-external-pause/browser/index.js +10 -0
  142. 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
  143. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-push@3.9.1/node_modules/@tsparticles/interaction-external-push/browser/Pusher.js +47 -0
  144. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-push@3.9.1/node_modules/@tsparticles/interaction-external-push/browser/index.js +10 -0
  145. 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
  146. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-remove@3.9.1/node_modules/@tsparticles/interaction-external-remove/browser/Remover.js +39 -0
  147. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-remove@3.9.1/node_modules/@tsparticles/interaction-external-remove/browser/index.js +10 -0
  148. 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
  149. 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
  150. 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
  151. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-repulse@3.9.1/node_modules/@tsparticles/interaction-external-repulse/browser/Repulser.js +160 -0
  152. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-repulse@3.9.1/node_modules/@tsparticles/interaction-external-repulse/browser/index.js +10 -0
  153. 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
  154. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-slow@3.9.1/node_modules/@tsparticles/interaction-external-slow/browser/Slower.js +53 -0
  155. package/dist/node_modules/.pnpm/@tsparticles_interaction-external-slow@3.9.1/node_modules/@tsparticles/interaction-external-slow/browser/index.js +10 -0
  156. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-attract@3.9.1/node_modules/@tsparticles/interaction-particles-attract/browser/Attractor.js +37 -0
  157. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-attract@3.9.1/node_modules/@tsparticles/interaction-particles-attract/browser/index.js +10 -0
  158. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/Absorb.js +28 -0
  159. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/Bounce.js +18 -0
  160. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/Collider.js +41 -0
  161. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/Destroy.js +17 -0
  162. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/ResolveCollision.js +23 -0
  163. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/index.js +10 -0
  164. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/CircleWarp.js +33 -0
  165. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/LinkInstance.js +152 -0
  166. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/Linker.js +109 -0
  167. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/LinksPlugin.js +18 -0
  168. 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
  169. 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
  170. 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
  171. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/Utils.js +106 -0
  172. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/index.js +10 -0
  173. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/interaction.js +9 -0
  174. package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/plugin.js +8 -0
  175. package/dist/node_modules/.pnpm/@tsparticles_move-base@3.9.1/node_modules/@tsparticles/move-base/browser/BaseMover.js +37 -0
  176. package/dist/node_modules/.pnpm/@tsparticles_move-base@3.9.1/node_modules/@tsparticles/move-base/browser/Utils.js +128 -0
  177. package/dist/node_modules/.pnpm/@tsparticles_move-base@3.9.1/node_modules/@tsparticles/move-base/browser/index.js +10 -0
  178. package/dist/node_modules/.pnpm/@tsparticles_move-parallax@3.9.1/node_modules/@tsparticles/move-parallax/browser/ParallaxMover.js +31 -0
  179. package/dist/node_modules/.pnpm/@tsparticles_move-parallax@3.9.1/node_modules/@tsparticles/move-parallax/browser/index.js +10 -0
  180. package/dist/node_modules/.pnpm/@tsparticles_plugin-easing-quad@3.9.1/node_modules/@tsparticles/plugin-easing-quad/browser/index.js +11 -0
  181. package/dist/node_modules/.pnpm/@tsparticles_plugin-hex-color@3.9.1/node_modules/@tsparticles/plugin-hex-color/browser/HexColorManager.js +43 -0
  182. package/dist/node_modules/.pnpm/@tsparticles_plugin-hex-color@3.9.1/node_modules/@tsparticles/plugin-hex-color/browser/index.js +8 -0
  183. package/dist/node_modules/.pnpm/@tsparticles_plugin-hsl-color@3.9.1/node_modules/@tsparticles/plugin-hsl-color/browser/HslColorManager.js +46 -0
  184. package/dist/node_modules/.pnpm/@tsparticles_plugin-hsl-color@3.9.1/node_modules/@tsparticles/plugin-hsl-color/browser/index.js +8 -0
  185. package/dist/node_modules/.pnpm/@tsparticles_plugin-rgb-color@3.9.1/node_modules/@tsparticles/plugin-rgb-color/browser/RgbColorManager.js +45 -0
  186. package/dist/node_modules/.pnpm/@tsparticles_plugin-rgb-color@3.9.1/node_modules/@tsparticles/plugin-rgb-color/browser/index.js +8 -0
  187. 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
  188. 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
  189. package/dist/node_modules/.pnpm/@tsparticles_shape-circle@3.9.1/node_modules/@tsparticles/shape-circle/browser/CircleDrawer.js +28 -0
  190. package/dist/node_modules/.pnpm/@tsparticles_shape-circle@3.9.1/node_modules/@tsparticles/shape-circle/browser/Utils.js +12 -0
  191. package/dist/node_modules/.pnpm/@tsparticles_shape-circle@3.9.1/node_modules/@tsparticles/shape-circle/browser/index.js +8 -0
  192. package/dist/node_modules/.pnpm/@tsparticles_shape-emoji@3.9.1/node_modules/@tsparticles/shape-emoji/browser/EmojiDrawer.js +103 -0
  193. package/dist/node_modules/.pnpm/@tsparticles_shape-emoji@3.9.1/node_modules/@tsparticles/shape-emoji/browser/Utils.js +13 -0
  194. package/dist/node_modules/.pnpm/@tsparticles_shape-emoji@3.9.1/node_modules/@tsparticles/shape-emoji/browser/index.js +8 -0
  195. package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/GifUtils/ByteStream.js +51 -0
  196. package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/GifUtils/Constants.js +6 -0
  197. package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/GifUtils/Enums/DisposalMethod.js +14 -0
  198. package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/GifUtils/Types/GIFDataHeaders.js +13 -0
  199. package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/GifUtils/Utils.js +419 -0
  200. package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/ImageDrawer.js +130 -0
  201. package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/ImagePreloader.js +36 -0
  202. package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/Options/Classes/Preload.js +33 -0
  203. package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/Utils.js +94 -0
  204. package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/index.js +54 -0
  205. package/dist/node_modules/.pnpm/@tsparticles_shape-line@3.9.1/node_modules/@tsparticles/shape-line/browser/LineDrawer.js +16 -0
  206. package/dist/node_modules/.pnpm/@tsparticles_shape-line@3.9.1/node_modules/@tsparticles/shape-line/browser/Utils.js +9 -0
  207. package/dist/node_modules/.pnpm/@tsparticles_shape-line@3.9.1/node_modules/@tsparticles/shape-line/browser/index.js +8 -0
  208. package/dist/node_modules/.pnpm/@tsparticles_shape-polygon@3.9.1/node_modules/@tsparticles/shape-polygon/browser/PolygonDrawer.js +27 -0
  209. package/dist/node_modules/.pnpm/@tsparticles_shape-polygon@3.9.1/node_modules/@tsparticles/shape-polygon/browser/PolygonDrawerBase.js +16 -0
  210. package/dist/node_modules/.pnpm/@tsparticles_shape-polygon@3.9.1/node_modules/@tsparticles/shape-polygon/browser/TriangleDrawer.js +30 -0
  211. package/dist/node_modules/.pnpm/@tsparticles_shape-polygon@3.9.1/node_modules/@tsparticles/shape-polygon/browser/Utils.js +19 -0
  212. package/dist/node_modules/.pnpm/@tsparticles_shape-polygon@3.9.1/node_modules/@tsparticles/shape-polygon/browser/index.js +20 -0
  213. package/dist/node_modules/.pnpm/@tsparticles_shape-square@3.9.1/node_modules/@tsparticles/shape-square/browser/SquareDrawer.js +16 -0
  214. package/dist/node_modules/.pnpm/@tsparticles_shape-square@3.9.1/node_modules/@tsparticles/shape-square/browser/Utils.js +8 -0
  215. package/dist/node_modules/.pnpm/@tsparticles_shape-square@3.9.1/node_modules/@tsparticles/shape-square/browser/index.js +8 -0
  216. package/dist/node_modules/.pnpm/@tsparticles_shape-star@3.9.1/node_modules/@tsparticles/shape-star/browser/StarDrawer.js +22 -0
  217. package/dist/node_modules/.pnpm/@tsparticles_shape-star@3.9.1/node_modules/@tsparticles/shape-star/browser/Utils.js +14 -0
  218. package/dist/node_modules/.pnpm/@tsparticles_shape-star@3.9.1/node_modules/@tsparticles/shape-star/browser/index.js +8 -0
  219. package/dist/node_modules/.pnpm/@tsparticles_slim@3.9.1/node_modules/@tsparticles/slim/browser/index.js +56 -0
  220. package/dist/node_modules/.pnpm/@tsparticles_updater-color@3.9.1/node_modules/@tsparticles/updater-color/browser/ColorUpdater.js +23 -0
  221. package/dist/node_modules/.pnpm/@tsparticles_updater-color@3.9.1/node_modules/@tsparticles/updater-color/browser/index.js +10 -0
  222. package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/LifeUpdater.js +52 -0
  223. package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/Options/Classes/Life.js +23 -0
  224. package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/Options/Classes/LifeDelay.js +20 -0
  225. package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/Options/Classes/LifeDuration.js +20 -0
  226. package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/Utils.js +58 -0
  227. package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/index.js +10 -0
  228. package/dist/node_modules/.pnpm/@tsparticles_updater-opacity@3.9.1/node_modules/@tsparticles/updater-opacity/browser/OpacityUpdater.js +38 -0
  229. package/dist/node_modules/.pnpm/@tsparticles_updater-opacity@3.9.1/node_modules/@tsparticles/updater-opacity/browser/index.js +10 -0
  230. package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/BounceOutMode.js +36 -0
  231. package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/DestroyOutMode.js +37 -0
  232. package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/NoneOutMode.js +36 -0
  233. package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/OutOfCanvasUpdater.js +45 -0
  234. package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/OutOutMode.js +110 -0
  235. package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/Utils.js +66 -0
  236. package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/index.js +10 -0
  237. package/dist/node_modules/.pnpm/@tsparticles_updater-rotate@3.9.1/node_modules/@tsparticles/updater-rotate/browser/Options/Classes/Rotate.js +29 -0
  238. package/dist/node_modules/.pnpm/@tsparticles_updater-rotate@3.9.1/node_modules/@tsparticles/updater-rotate/browser/Options/Classes/RotateAnimation.js +30 -0
  239. package/dist/node_modules/.pnpm/@tsparticles_updater-rotate@3.9.1/node_modules/@tsparticles/updater-rotate/browser/RotateUpdater.js +77 -0
  240. package/dist/node_modules/.pnpm/@tsparticles_updater-rotate@3.9.1/node_modules/@tsparticles/updater-rotate/browser/index.js +10 -0
  241. package/dist/node_modules/.pnpm/@tsparticles_updater-size@3.9.1/node_modules/@tsparticles/updater-size/browser/SizeUpdater.js +30 -0
  242. package/dist/node_modules/.pnpm/@tsparticles_updater-size@3.9.1/node_modules/@tsparticles/updater-size/browser/index.js +10 -0
  243. package/dist/node_modules/.pnpm/@tsparticles_updater-stroke-color@3.9.1/node_modules/@tsparticles/updater-stroke-color/browser/StrokeColorUpdater.js +35 -0
  244. package/dist/node_modules/.pnpm/@tsparticles_updater-stroke-color@3.9.1/node_modules/@tsparticles/updater-stroke-color/browser/index.js +10 -0
  245. package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +17 -0
  246. package/dist/node_modules/.pnpm/file-type@12.4.1/node_modules/file-type/index.js +826 -0
  247. package/dist/node_modules/.pnpm/file-type@12.4.1/node_modules/file-type/supported.js +242 -0
  248. package/dist/node_modules/.pnpm/file-type@12.4.1/node_modules/file-type/util.js +64 -0
  249. package/dist/node_modules/.pnpm/js-sha1@0.6.0/node_modules/js-sha1/src/sha1.js +311 -0
  250. package/dist/node_modules/.pnpm/nanoid@5.1.5/node_modules/nanoid/index.browser.js +22 -0
  251. package/dist/node_modules/.pnpm/tailwind-merge@3.3.1/node_modules/tailwind-merge/dist/bundle-mjs.js +3007 -0
  252. package/dist/utils/css-utils.d.ts +10 -0
  253. package/dist/utils/css-utils.js +17 -0
  254. package/dist/utils/index.d.ts +9 -0
  255. package/dist/utils/storage-qetag.d.ts +22 -0
  256. package/dist/utils/storage-qetag.js +3 -0
  257. package/dist/utils/utils-api.d.ts +17 -0
  258. package/dist/utils/utils-api.js +31 -0
  259. package/dist/utils/utils-canvas.d.ts +30 -0
  260. package/dist/utils/utils-canvas.js +54 -0
  261. package/dist/utils/utils-common.d.ts +6 -0
  262. package/dist/utils/utils-common.js +15 -0
  263. package/dist/utils/utils-image.d.ts +33 -0
  264. package/dist/utils/utils-image.js +57 -0
  265. package/dist/utils/utils-random.d.ts +1 -0
  266. package/dist/utils/utils-random.js +6 -0
  267. package/dist/utils/utils-time.d.ts +49 -0
  268. package/dist/utils/utils-time.js +112 -0
  269. package/package.json +81 -0
@@ -0,0 +1,326 @@
1
+ import { minLimit, defaultDensityFactor, squareExp, errorPrefix, deleteCount, qTreeCapacity, minCount, defaultRemoveQuantity, minIndex, lengthOffset, countOffset, posOffset, sizeFactor } from "./Utils/Constants.js";
2
+ import { getLogger, getPosition } from "../Utils/Utils.js";
3
+ import { EventType } from "../Enums/Types/EventType.js";
4
+ import { InteractionManager } from "./Utils/InteractionManager.js";
5
+ import { LimitMode } from "../Enums/Modes/LimitMode.js";
6
+ import { Particle } from "./Particle.js";
7
+ import { Point } from "./Utils/Point.js";
8
+ import { QuadTree } from "./Utils/QuadTree.js";
9
+ import { Rectangle } from "./Utils/Ranges.js";
10
+ const qTreeRectangle = (canvasSize) => {
11
+ const { height, width } = canvasSize;
12
+ return new Rectangle(posOffset * width, posOffset * height, sizeFactor * width, sizeFactor * height);
13
+ };
14
+ class Particles {
15
+ constructor(engine, container) {
16
+ this._addToPool = (...particles) => {
17
+ this._pool.push(...particles);
18
+ };
19
+ this._applyDensity = (options, manualCount, group, groupOptions) => {
20
+ var _a, _b, _c;
21
+ const numberOptions = options.number;
22
+ if (!((_a = options.number.density) == null ? void 0 : _a.enable)) {
23
+ if (group === void 0) {
24
+ this._limit = numberOptions.limit.value;
25
+ } else if (((_b = groupOptions == null ? void 0 : groupOptions.number.limit) == null ? void 0 : _b.value) ?? numberOptions.limit.value) {
26
+ this._groupLimits.set(group, ((_c = groupOptions == null ? void 0 : groupOptions.number.limit) == null ? void 0 : _c.value) ?? numberOptions.limit.value);
27
+ }
28
+ return;
29
+ }
30
+ const densityFactor = this._initDensityFactor(numberOptions.density), optParticlesNumber = numberOptions.value, optParticlesLimit = numberOptions.limit.value > minLimit ? numberOptions.limit.value : optParticlesNumber, particlesNumber = Math.min(optParticlesNumber, optParticlesLimit) * densityFactor + manualCount, particlesCount = Math.min(this.count, this.filter((t) => t.group === group).length);
31
+ if (group === void 0) {
32
+ this._limit = numberOptions.limit.value * densityFactor;
33
+ } else {
34
+ this._groupLimits.set(group, numberOptions.limit.value * densityFactor);
35
+ }
36
+ if (particlesCount < particlesNumber) {
37
+ this.push(Math.abs(particlesNumber - particlesCount), void 0, options, group);
38
+ } else if (particlesCount > particlesNumber) {
39
+ this.removeQuantity(particlesCount - particlesNumber, group);
40
+ }
41
+ };
42
+ this._initDensityFactor = (densityOptions) => {
43
+ const container2 = this._container;
44
+ if (!container2.canvas.element || !densityOptions.enable) {
45
+ return defaultDensityFactor;
46
+ }
47
+ const canvas = container2.canvas.element, pxRatio = container2.retina.pixelRatio;
48
+ return canvas.width * canvas.height / (densityOptions.height * densityOptions.width * pxRatio ** squareExp);
49
+ };
50
+ this._pushParticle = (position, overrideOptions, group, initializer) => {
51
+ try {
52
+ let particle = this._pool.pop();
53
+ if (!particle) {
54
+ particle = new Particle(this._engine, this._container);
55
+ }
56
+ particle.init(this._nextId, position, overrideOptions, group);
57
+ let canAdd = true;
58
+ if (initializer) {
59
+ canAdd = initializer(particle);
60
+ }
61
+ if (!canAdd) {
62
+ return;
63
+ }
64
+ this._array.push(particle);
65
+ this._zArray.push(particle);
66
+ this._nextId++;
67
+ this._engine.dispatchEvent(EventType.particleAdded, {
68
+ container: this._container,
69
+ data: {
70
+ particle
71
+ }
72
+ });
73
+ return particle;
74
+ } catch (e) {
75
+ getLogger().warning(`${errorPrefix} adding particle: ${e}`);
76
+ }
77
+ };
78
+ this._removeParticle = (index, group, override) => {
79
+ const particle = this._array[index];
80
+ if (!particle || particle.group !== group) {
81
+ return false;
82
+ }
83
+ const zIdx = this._zArray.indexOf(particle);
84
+ this._array.splice(index, deleteCount);
85
+ this._zArray.splice(zIdx, deleteCount);
86
+ particle.destroy(override);
87
+ this._engine.dispatchEvent(EventType.particleRemoved, {
88
+ container: this._container,
89
+ data: {
90
+ particle
91
+ }
92
+ });
93
+ this._addToPool(particle);
94
+ return true;
95
+ };
96
+ this._engine = engine;
97
+ this._container = container;
98
+ this._nextId = 0;
99
+ this._array = [];
100
+ this._zArray = [];
101
+ this._pool = [];
102
+ this._limit = 0;
103
+ this._groupLimits = /* @__PURE__ */ new Map();
104
+ this._needsSort = false;
105
+ this._lastZIndex = 0;
106
+ this._interactionManager = new InteractionManager(engine, container);
107
+ this._pluginsInitialized = false;
108
+ const canvasSize = container.canvas.size;
109
+ this.quadTree = new QuadTree(qTreeRectangle(canvasSize), qTreeCapacity);
110
+ this.movers = [];
111
+ this.updaters = [];
112
+ }
113
+ get count() {
114
+ return this._array.length;
115
+ }
116
+ addManualParticles() {
117
+ const container = this._container, options = container.actualOptions;
118
+ options.manualParticles.forEach((p) => this.addParticle(p.position ? getPosition(p.position, container.canvas.size) : void 0, p.options));
119
+ }
120
+ addParticle(position, overrideOptions, group, initializer) {
121
+ const limitMode = this._container.actualOptions.particles.number.limit.mode, limit = group === void 0 ? this._limit : this._groupLimits.get(group) ?? this._limit, currentCount = this.count;
122
+ if (limit > minLimit) {
123
+ switch (limitMode) {
124
+ case LimitMode.delete: {
125
+ const countToRemove = currentCount + countOffset - limit;
126
+ if (countToRemove > minCount) {
127
+ this.removeQuantity(countToRemove);
128
+ }
129
+ break;
130
+ }
131
+ case LimitMode.wait:
132
+ if (currentCount >= limit) {
133
+ return;
134
+ }
135
+ break;
136
+ }
137
+ }
138
+ return this._pushParticle(position, overrideOptions, group, initializer);
139
+ }
140
+ clear() {
141
+ this._array = [];
142
+ this._zArray = [];
143
+ this._pluginsInitialized = false;
144
+ }
145
+ destroy() {
146
+ this._array = [];
147
+ this._zArray = [];
148
+ this.movers = [];
149
+ this.updaters = [];
150
+ }
151
+ draw(delta) {
152
+ const container = this._container, canvas = container.canvas;
153
+ canvas.clear();
154
+ this.update(delta);
155
+ for (const plugin of container.plugins.values()) {
156
+ canvas.drawPlugin(plugin, delta);
157
+ }
158
+ for (const p of this._zArray) {
159
+ p.draw(delta);
160
+ }
161
+ }
162
+ filter(condition) {
163
+ return this._array.filter(condition);
164
+ }
165
+ find(condition) {
166
+ return this._array.find(condition);
167
+ }
168
+ get(index) {
169
+ return this._array[index];
170
+ }
171
+ handleClickMode(mode) {
172
+ this._interactionManager.handleClickMode(mode);
173
+ }
174
+ async init() {
175
+ var _a, _b;
176
+ const container = this._container, options = container.actualOptions;
177
+ this._lastZIndex = 0;
178
+ this._needsSort = false;
179
+ await this.initPlugins();
180
+ let handled = false;
181
+ for (const plugin of container.plugins.values()) {
182
+ handled = ((_a = plugin.particlesInitialization) == null ? void 0 : _a.call(plugin)) ?? handled;
183
+ if (handled) {
184
+ break;
185
+ }
186
+ }
187
+ this.addManualParticles();
188
+ if (!handled) {
189
+ const particlesOptions = options.particles, groups = particlesOptions.groups;
190
+ for (const group in groups) {
191
+ const groupOptions = groups[group];
192
+ for (let i = this.count, j = 0; j < ((_b = groupOptions.number) == null ? void 0 : _b.value) && i < particlesOptions.number.value; i++, j++) {
193
+ this.addParticle(void 0, groupOptions, group);
194
+ }
195
+ }
196
+ for (let i = this.count; i < particlesOptions.number.value; i++) {
197
+ this.addParticle();
198
+ }
199
+ }
200
+ }
201
+ async initPlugins() {
202
+ if (this._pluginsInitialized) {
203
+ return;
204
+ }
205
+ const container = this._container;
206
+ this.movers = await this._engine.getMovers(container, true);
207
+ this.updaters = await this._engine.getUpdaters(container, true);
208
+ await this._interactionManager.init();
209
+ for (const pathGenerator of container.pathGenerators.values()) {
210
+ pathGenerator.init(container);
211
+ }
212
+ }
213
+ push(nb, mouse, overrideOptions, group) {
214
+ for (let i = 0; i < nb; i++) {
215
+ this.addParticle(mouse == null ? void 0 : mouse.position, overrideOptions, group);
216
+ }
217
+ }
218
+ async redraw() {
219
+ this.clear();
220
+ await this.init();
221
+ this.draw({ value: 0, factor: 0 });
222
+ }
223
+ remove(particle, group, override) {
224
+ this.removeAt(this._array.indexOf(particle), void 0, group, override);
225
+ }
226
+ removeAt(index, quantity = defaultRemoveQuantity, group, override) {
227
+ if (index < minIndex || index > this.count) {
228
+ return;
229
+ }
230
+ let deleted = 0;
231
+ for (let i = index; deleted < quantity && i < this.count; i++) {
232
+ if (this._removeParticle(i, group, override)) {
233
+ i--;
234
+ deleted++;
235
+ }
236
+ }
237
+ }
238
+ removeQuantity(quantity, group) {
239
+ this.removeAt(minIndex, quantity, group);
240
+ }
241
+ setDensity() {
242
+ const options = this._container.actualOptions, groups = options.particles.groups, manualCount = options.manualParticles.length;
243
+ for (const group in groups) {
244
+ this._applyDensity(groups[group], manualCount, group);
245
+ }
246
+ this._applyDensity(options.particles, manualCount);
247
+ }
248
+ setLastZIndex(zIndex) {
249
+ this._lastZIndex = zIndex;
250
+ this._needsSort = this._needsSort || this._lastZIndex < zIndex;
251
+ }
252
+ setResizeFactor(factor) {
253
+ this._resizeFactor = factor;
254
+ }
255
+ update(delta) {
256
+ var _a, _b;
257
+ const container = this._container, particlesToDelete = /* @__PURE__ */ new Set();
258
+ this.quadTree = new QuadTree(qTreeRectangle(container.canvas.size), qTreeCapacity);
259
+ for (const pathGenerator of container.pathGenerators.values()) {
260
+ pathGenerator.update();
261
+ }
262
+ for (const plugin of container.plugins.values()) {
263
+ (_a = plugin.update) == null ? void 0 : _a.call(plugin, delta);
264
+ }
265
+ const resizeFactor = this._resizeFactor;
266
+ for (const particle of this._array) {
267
+ if (resizeFactor && !particle.ignoresResizeRatio) {
268
+ particle.position.x *= resizeFactor.width;
269
+ particle.position.y *= resizeFactor.height;
270
+ particle.initialPosition.x *= resizeFactor.width;
271
+ particle.initialPosition.y *= resizeFactor.height;
272
+ }
273
+ particle.ignoresResizeRatio = false;
274
+ this._interactionManager.reset(particle);
275
+ for (const plugin of this._container.plugins.values()) {
276
+ if (particle.destroyed) {
277
+ break;
278
+ }
279
+ (_b = plugin.particleUpdate) == null ? void 0 : _b.call(plugin, particle, delta);
280
+ }
281
+ for (const mover of this.movers) {
282
+ if (mover.isEnabled(particle)) {
283
+ mover.move(particle, delta);
284
+ }
285
+ }
286
+ if (particle.destroyed) {
287
+ particlesToDelete.add(particle);
288
+ continue;
289
+ }
290
+ this.quadTree.insert(new Point(particle.getPosition(), particle));
291
+ }
292
+ if (particlesToDelete.size) {
293
+ const checkDelete = (p) => !particlesToDelete.has(p);
294
+ this._array = this.filter(checkDelete);
295
+ this._zArray = this._zArray.filter(checkDelete);
296
+ for (const particle of particlesToDelete) {
297
+ this._engine.dispatchEvent(EventType.particleRemoved, {
298
+ container: this._container,
299
+ data: {
300
+ particle
301
+ }
302
+ });
303
+ }
304
+ this._addToPool(...particlesToDelete);
305
+ }
306
+ this._interactionManager.externalInteract(delta);
307
+ for (const particle of this._array) {
308
+ for (const updater of this.updaters) {
309
+ updater.update(particle, delta);
310
+ }
311
+ if (!particle.destroyed && !particle.spawning) {
312
+ this._interactionManager.particlesInteract(particle, delta);
313
+ }
314
+ }
315
+ delete this._resizeFactor;
316
+ if (this._needsSort) {
317
+ const zArray = this._zArray;
318
+ zArray.sort((a, b) => b.position.z - a.position.z || a.id - b.id);
319
+ this._lastZIndex = zArray[zArray.length - lengthOffset].position.z;
320
+ this._needsSort = false;
321
+ }
322
+ }
323
+ }
324
+ export {
325
+ Particles
326
+ };
@@ -0,0 +1,37 @@
1
+ import { defaultRatio, defaultReduceFactor } from "./Utils/Constants.js";
2
+ import { getRangeValue } from "../Utils/NumberUtils.js";
3
+ import { isSsr } from "../Utils/Utils.js";
4
+ class Retina {
5
+ constructor(container) {
6
+ this.container = container;
7
+ this.pixelRatio = defaultRatio;
8
+ this.reduceFactor = defaultReduceFactor;
9
+ }
10
+ init() {
11
+ const container = this.container, options = container.actualOptions;
12
+ this.pixelRatio = !options.detectRetina || isSsr() ? defaultRatio : devicePixelRatio;
13
+ this.reduceFactor = defaultReduceFactor;
14
+ const ratio = this.pixelRatio, canvas = container.canvas;
15
+ if (canvas.element) {
16
+ const element = canvas.element;
17
+ canvas.size.width = element.offsetWidth * ratio;
18
+ canvas.size.height = element.offsetHeight * ratio;
19
+ }
20
+ const particles = options.particles, moveOptions = particles.move;
21
+ this.maxSpeed = getRangeValue(moveOptions.gravity.maxSpeed) * ratio;
22
+ this.sizeAnimationSpeed = getRangeValue(particles.size.animation.speed) * ratio;
23
+ }
24
+ initParticle(particle) {
25
+ const options = particle.options, ratio = this.pixelRatio, moveOptions = options.move, moveDistance = moveOptions.distance, props = particle.retina;
26
+ props.moveDrift = getRangeValue(moveOptions.drift) * ratio;
27
+ props.moveSpeed = getRangeValue(moveOptions.speed) * ratio;
28
+ props.sizeAnimationSpeed = getRangeValue(options.size.animation.speed) * ratio;
29
+ const maxDistance = props.maxDistance;
30
+ maxDistance.horizontal = moveDistance.horizontal !== void 0 ? moveDistance.horizontal * ratio : void 0;
31
+ maxDistance.vertical = moveDistance.vertical !== void 0 ? moveDistance.vertical * ratio : void 0;
32
+ props.maxSpeed = getRangeValue(moveOptions.gravity.maxSpeed) * ratio;
33
+ }
34
+ }
35
+ export {
36
+ Retina
37
+ };
@@ -0,0 +1,105 @@
1
+ const generatedAttribute = "generated", mouseDownEvent = "pointerdown", mouseUpEvent = "pointerup", mouseLeaveEvent = "pointerleave", mouseOutEvent = "pointerout", mouseMoveEvent = "pointermove", touchStartEvent = "touchstart", touchEndEvent = "touchend", touchMoveEvent = "touchmove", touchCancelEvent = "touchcancel", resizeEvent = "resize", visibilityChangeEvent = "visibilitychange", errorPrefix = "tsParticles - Error", percentDenominator = 100, half = 0.5, millisecondsToSeconds = 1e3, originPoint = {
2
+ x: 0,
3
+ y: 0,
4
+ z: 0
5
+ }, defaultTransform = {
6
+ a: 1,
7
+ b: 0,
8
+ c: 0,
9
+ d: 1
10
+ }, randomColorValue = "random", midColorValue = "mid", double = 2, doublePI = Math.PI * double, defaultFps = 60, generatedTrue = "true", generatedFalse = "false", canvasTag = "canvas", defaultRetryCount = 0, squareExp = 2, qTreeCapacity = 4, defaultRemoveQuantity = 1, defaultRatio = 1, defaultReduceFactor = 1, subdivideCount = 4, inverseFactorNumerator = 1, rgbMax = 255, hMax = 360, sMax = 100, lMax = 100, hMin = 0, sMin = 0, hPhase = 60, empty = 0, quarter = 0.25, threeQuarter = half + quarter, minVelocity = 0, defaultTransformValue = 1, minimumSize = 0, minimumLength = 0, zIndexFactorOffset = 1, defaultOpacity = 1, clickRadius = 1, touchEndLengthOffset = 1, minCoordinate = 0, removeDeleteCount = 1, removeMinIndex = 0, defaultFpsLimit = 120, minFpsLimit = 0, canvasFirstIndex = 0, loadRandomFactor = 1e4, loadMinIndex = 0, one = 1, none = 0, decayOffset = 1, tryCountIncrement = 1, minRetries = 0, rollFactor = 1, minZ = 0, defaultRadius = 0, posOffset = -quarter, sizeFactor = 1.5, minLimit = 0, countOffset = 1, minCount = 0, minIndex = 0, lengthOffset = 1, defaultDensityFactor = 1, deleteCount = 1, touchDelay = 500, manualDefaultPosition = 50, defaultAngle = 0, identity = 1, minStrokeWidth = 0, lFactor = 1, lMin = 0, rgbFactor = 255, triple = 3, sextuple = 6, sNormalizedOffset = 1, phaseNumerator = 1, defaultRgbMin = 0, defaultVelocity = 0, defaultLoops = 0, defaultTime = 0;
11
+ export {
12
+ canvasFirstIndex,
13
+ canvasTag,
14
+ clickRadius,
15
+ countOffset,
16
+ decayOffset,
17
+ defaultAngle,
18
+ defaultDensityFactor,
19
+ defaultFps,
20
+ defaultFpsLimit,
21
+ defaultLoops,
22
+ defaultOpacity,
23
+ defaultRadius,
24
+ defaultRatio,
25
+ defaultReduceFactor,
26
+ defaultRemoveQuantity,
27
+ defaultRetryCount,
28
+ defaultRgbMin,
29
+ defaultTime,
30
+ defaultTransform,
31
+ defaultTransformValue,
32
+ defaultVelocity,
33
+ deleteCount,
34
+ double,
35
+ doublePI,
36
+ empty,
37
+ errorPrefix,
38
+ generatedAttribute,
39
+ generatedFalse,
40
+ generatedTrue,
41
+ hMax,
42
+ hMin,
43
+ hPhase,
44
+ half,
45
+ identity,
46
+ inverseFactorNumerator,
47
+ lFactor,
48
+ lMax,
49
+ lMin,
50
+ lengthOffset,
51
+ loadMinIndex,
52
+ loadRandomFactor,
53
+ manualDefaultPosition,
54
+ midColorValue,
55
+ millisecondsToSeconds,
56
+ minCoordinate,
57
+ minCount,
58
+ minFpsLimit,
59
+ minIndex,
60
+ minLimit,
61
+ minRetries,
62
+ minStrokeWidth,
63
+ minVelocity,
64
+ minZ,
65
+ minimumLength,
66
+ minimumSize,
67
+ mouseDownEvent,
68
+ mouseLeaveEvent,
69
+ mouseMoveEvent,
70
+ mouseOutEvent,
71
+ mouseUpEvent,
72
+ none,
73
+ one,
74
+ originPoint,
75
+ percentDenominator,
76
+ phaseNumerator,
77
+ posOffset,
78
+ qTreeCapacity,
79
+ quarter,
80
+ randomColorValue,
81
+ removeDeleteCount,
82
+ removeMinIndex,
83
+ resizeEvent,
84
+ rgbFactor,
85
+ rgbMax,
86
+ rollFactor,
87
+ sMax,
88
+ sMin,
89
+ sNormalizedOffset,
90
+ sextuple,
91
+ sizeFactor,
92
+ squareExp,
93
+ subdivideCount,
94
+ threeQuarter,
95
+ touchCancelEvent,
96
+ touchDelay,
97
+ touchEndEvent,
98
+ touchEndLengthOffset,
99
+ touchMoveEvent,
100
+ touchStartEvent,
101
+ triple,
102
+ tryCountIncrement,
103
+ visibilityChangeEvent,
104
+ zIndexFactorOffset
105
+ };