@igorao79/uivix 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1600,8 +1600,8 @@ var ParticleBackground = ({
1600
1600
  const onMouseLeave = () => {
1601
1601
  mouseRef.current = { x: -9999, y: -9999 };
1602
1602
  };
1603
- canvas.addEventListener("mousemove", onMouse);
1604
- canvas.addEventListener("mouseleave", onMouseLeave);
1603
+ window.addEventListener("mousemove", onMouse);
1604
+ window.addEventListener("mouseleave", onMouseLeave);
1605
1605
  const getColor = (shade, alpha) => {
1606
1606
  const v = 40;
1607
1607
  const r = Math.round(baseR + (shade - 0.5) * v);
@@ -1712,8 +1712,8 @@ var ParticleBackground = ({
1712
1712
  return () => {
1713
1713
  cancelAnimationFrame(rafRef.current);
1714
1714
  window.removeEventListener("resize", resize);
1715
- canvas.removeEventListener("mousemove", onMouse);
1716
- canvas.removeEventListener("mouseleave", onMouseLeave);
1715
+ window.removeEventListener("mousemove", onMouse);
1716
+ window.removeEventListener("mouseleave", onMouseLeave);
1717
1717
  };
1718
1718
  }, [items, count, connectionDistance, arrows, mouseDistance, color, speed, fontSize, imageSize, lineWidth, maxOpacity, normalize]);
1719
1719
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(