@moontra/moonui-pro 3.4.33 → 3.4.34

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.mjs CHANGED
@@ -87501,7 +87501,7 @@ var MeteorsInternal = ({
87501
87501
  className,
87502
87502
  containerClassName,
87503
87503
  number = 20,
87504
- color = "#ffffff",
87504
+ color,
87505
87505
  duration = { min: 3, max: 7 },
87506
87506
  size: size4 = { min: 0.5, max: 1 },
87507
87507
  speed = "medium",
@@ -87513,6 +87513,17 @@ var MeteorsInternal = ({
87513
87513
  glow = true,
87514
87514
  glowSize = 10
87515
87515
  }) => {
87516
+ const { theme, resolvedTheme } = useTheme();
87517
+ const [mounted, setMounted] = useState(false);
87518
+ useEffect(() => {
87519
+ setMounted(true);
87520
+ }, []);
87521
+ const currentTheme = mounted ? resolvedTheme || theme || "dark" : "dark";
87522
+ const defaultColor = currentTheme === "dark" ? "#ffffff" : "#000000";
87523
+ const finalColor = color || defaultColor;
87524
+ if (!mounted) {
87525
+ return null;
87526
+ }
87516
87527
  const meteors = new Array(number).fill(true);
87517
87528
  const speedMultiplier = speed === "slow" ? 2 : speed === "fast" ? 0.5 : 1;
87518
87529
  const random = (min2, max2) => {
@@ -87554,11 +87565,11 @@ var MeteorsInternal = ({
87554
87565
  top: `${initialTop}%`,
87555
87566
  width: `${tailLength}px`,
87556
87567
  height: `${meteorSize * 2}px`,
87557
- background: `linear-gradient(to right, ${color}, transparent)`,
87568
+ background: `linear-gradient(to right, ${finalColor}, transparent)`,
87558
87569
  transform: `rotate(${rotation}deg)`,
87559
87570
  animation: `meteor ${animationDuration}s linear ${animationDelay}s infinite`,
87560
87571
  opacity: meteorOpacity,
87561
- filter: glow ? `drop-shadow(0 0 ${glowSize}px ${color})` : void 0
87572
+ filter: glow ? `drop-shadow(0 0 ${glowSize}px ${finalColor})` : void 0
87562
87573
  },
87563
87574
  children: /* @__PURE__ */ jsx(
87564
87575
  "span",
@@ -87569,8 +87580,8 @@ var MeteorsInternal = ({
87569
87580
  height: `${meteorSize * 4}px`,
87570
87581
  borderRadius: "50%",
87571
87582
  marginTop: `-${meteorSize}px`,
87572
- background: color,
87573
- boxShadow: glow ? `0 0 ${glowSize}px ${meteorSize}px ${color}33` : void 0
87583
+ background: finalColor,
87584
+ boxShadow: glow ? `0 0 ${glowSize}px ${meteorSize}px ${finalColor}33` : void 0
87574
87585
  }
87575
87586
  }
87576
87587
  )
@@ -87604,11 +87615,7 @@ var AuroraBackgroundInternal = ({
87604
87615
  children,
87605
87616
  className,
87606
87617
  containerClassName,
87607
- colors = {
87608
- primary: "#3b82f6",
87609
- secondary: "#8b5cf6",
87610
- tertiary: "#06b6d4"
87611
- },
87618
+ colors,
87612
87619
  speed = "normal",
87613
87620
  opacity = 0.5,
87614
87621
  blur: blur2 = 80,
@@ -87619,10 +87626,38 @@ var AuroraBackgroundInternal = ({
87619
87626
  fixed = false,
87620
87627
  pauseWhenHidden = false
87621
87628
  }) => {
87629
+ const { theme, resolvedTheme } = useTheme();
87630
+ const [mounted, setMounted] = useState(false);
87622
87631
  const [mousePosition, setMousePosition] = useState({ x: 50, y: 50 });
87623
87632
  const [isVisible, setIsVisible] = useState(true);
87624
87633
  const containerRef = useRef(null);
87625
87634
  const observerTimeoutRef = useRef(null);
87635
+ useEffect(() => {
87636
+ setMounted(true);
87637
+ }, []);
87638
+ const currentTheme = mounted ? resolvedTheme || theme || "dark" : "dark";
87639
+ const themeDefaultColors = useMemo(() => {
87640
+ if (currentTheme === "dark") {
87641
+ return {
87642
+ primary: "#9D7FD1",
87643
+ // Medium pastel purple
87644
+ secondary: "#7B9FF0",
87645
+ // Medium pastel blue
87646
+ tertiary: "#6BC9D4"
87647
+ // Medium pastel cyan
87648
+ };
87649
+ } else {
87650
+ return {
87651
+ primary: "#3D2680",
87652
+ // Moontra dark purple
87653
+ secondary: "#5B3FA0",
87654
+ // Moontra medium purple
87655
+ tertiary: "#00ACC1"
87656
+ // Moontra cyan
87657
+ };
87658
+ }
87659
+ }, [currentTheme]);
87660
+ const finalColors = colors || themeDefaultColors;
87626
87661
  const duration = useMemo(() => {
87627
87662
  switch (speed) {
87628
87663
  case "slow":
@@ -87637,26 +87672,26 @@ var AuroraBackgroundInternal = ({
87637
87672
  switch (variant) {
87638
87673
  case "subtle":
87639
87674
  return {
87640
- primary: colors.primary || "#94a3b8",
87641
- secondary: colors.secondary || "#cbd5e1",
87642
- tertiary: colors.tertiary || "#e2e8f0"
87675
+ primary: finalColors.primary || "#94a3b8",
87676
+ secondary: finalColors.secondary || "#cbd5e1",
87677
+ tertiary: finalColors.tertiary || "#e2e8f0"
87643
87678
  };
87644
87679
  case "vibrant":
87645
87680
  return {
87646
- primary: colors.primary || "#f97316",
87647
- secondary: colors.secondary || "#ec4899",
87648
- tertiary: colors.tertiary || "#8b5cf6"
87681
+ primary: finalColors.primary || "#f97316",
87682
+ secondary: finalColors.secondary || "#ec4899",
87683
+ tertiary: finalColors.tertiary || "#8b5cf6"
87649
87684
  };
87650
87685
  case "dark":
87651
87686
  return {
87652
- primary: colors.primary || "#1e293b",
87653
- secondary: colors.secondary || "#334155",
87654
- tertiary: colors.tertiary || "#475569"
87687
+ primary: finalColors.primary || "#1e293b",
87688
+ secondary: finalColors.secondary || "#334155",
87689
+ tertiary: finalColors.tertiary || "#475569"
87655
87690
  };
87656
87691
  default:
87657
- return colors;
87692
+ return finalColors;
87658
87693
  }
87659
- }, [variant, colors]);
87694
+ }, [variant, finalColors]);
87660
87695
  const handleMouseMove2 = useCallback((e) => {
87661
87696
  if (!interactive)
87662
87697
  return;
@@ -87728,6 +87763,9 @@ var AuroraBackgroundInternal = ({
87728
87763
  filter: `blur(${blur2 * 0.5}px)`,
87729
87764
  mixBlendMode: "overlay"
87730
87765
  }), [blur2]);
87766
+ if (!mounted) {
87767
+ return null;
87768
+ }
87731
87769
  return /* @__PURE__ */ jsxs(
87732
87770
  "div",
87733
87771
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moontra/moonui-pro",
3
- "version": "3.4.33",
3
+ "version": "3.4.34",
4
4
  "description": "Premium React components for MoonUI - Advanced UI library with 50+ pro components including performance, interactive, and gesture components",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",