@moontra/moonui-pro 3.4.33 → 3.4.35
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/cdn/index.global.js +171 -171
- package/dist/cdn/index.global.js.map +1 -1
- package/dist/index.d.ts +10 -2
- package/dist/index.mjs +68 -21
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -5277,8 +5277,10 @@ interface MeteorsProps {
|
|
|
5277
5277
|
containerClassName?: string;
|
|
5278
5278
|
/** Number of meteors */
|
|
5279
5279
|
number?: number;
|
|
5280
|
-
/** Meteor color */
|
|
5280
|
+
/** Meteor color for light mode */
|
|
5281
5281
|
color?: string;
|
|
5282
|
+
/** Meteor color for dark mode */
|
|
5283
|
+
darkColor?: string;
|
|
5282
5284
|
/** Animation duration range (seconds) */
|
|
5283
5285
|
duration?: {
|
|
5284
5286
|
min: number;
|
|
@@ -5327,12 +5329,18 @@ interface AuroraBackgroundProps {
|
|
|
5327
5329
|
className?: string;
|
|
5328
5330
|
/** Container CSS classes */
|
|
5329
5331
|
containerClassName?: string;
|
|
5330
|
-
/** Aurora gradient colors (hex or rgb) */
|
|
5332
|
+
/** Aurora gradient colors for light mode (hex or rgb) */
|
|
5331
5333
|
colors?: {
|
|
5332
5334
|
primary?: string;
|
|
5333
5335
|
secondary?: string;
|
|
5334
5336
|
tertiary?: string;
|
|
5335
5337
|
};
|
|
5338
|
+
/** Aurora gradient colors for dark mode (hex or rgb) */
|
|
5339
|
+
darkColors?: {
|
|
5340
|
+
primary?: string;
|
|
5341
|
+
secondary?: string;
|
|
5342
|
+
tertiary?: string;
|
|
5343
|
+
};
|
|
5336
5344
|
/** Animation speed */
|
|
5337
5345
|
speed?: 'slow' | 'normal' | 'fast';
|
|
5338
5346
|
/** Background opacity (0-1) */
|
package/dist/index.mjs
CHANGED
|
@@ -87501,7 +87501,8 @@ var MeteorsInternal = ({
|
|
|
87501
87501
|
className,
|
|
87502
87502
|
containerClassName,
|
|
87503
87503
|
number = 20,
|
|
87504
|
-
color
|
|
87504
|
+
color,
|
|
87505
|
+
darkColor,
|
|
87505
87506
|
duration = { min: 3, max: 7 },
|
|
87506
87507
|
size: size4 = { min: 0.5, max: 1 },
|
|
87507
87508
|
speed = "medium",
|
|
@@ -87513,6 +87514,18 @@ var MeteorsInternal = ({
|
|
|
87513
87514
|
glow = true,
|
|
87514
87515
|
glowSize = 10
|
|
87515
87516
|
}) => {
|
|
87517
|
+
const { theme, resolvedTheme } = useTheme();
|
|
87518
|
+
const [mounted, setMounted] = useState(false);
|
|
87519
|
+
useEffect(() => {
|
|
87520
|
+
setMounted(true);
|
|
87521
|
+
}, []);
|
|
87522
|
+
const currentTheme = mounted ? resolvedTheme || theme || "dark" : "dark";
|
|
87523
|
+
const defaultDarkColor = "#ffffff";
|
|
87524
|
+
const defaultLightColor = "#000000";
|
|
87525
|
+
const finalColor = currentTheme === "dark" ? darkColor || color || defaultDarkColor : color || defaultLightColor;
|
|
87526
|
+
if (!mounted) {
|
|
87527
|
+
return null;
|
|
87528
|
+
}
|
|
87516
87529
|
const meteors = new Array(number).fill(true);
|
|
87517
87530
|
const speedMultiplier = speed === "slow" ? 2 : speed === "fast" ? 0.5 : 1;
|
|
87518
87531
|
const random = (min2, max2) => {
|
|
@@ -87554,11 +87567,11 @@ var MeteorsInternal = ({
|
|
|
87554
87567
|
top: `${initialTop}%`,
|
|
87555
87568
|
width: `${tailLength}px`,
|
|
87556
87569
|
height: `${meteorSize * 2}px`,
|
|
87557
|
-
background: `linear-gradient(to right, ${
|
|
87570
|
+
background: `linear-gradient(to right, ${finalColor}, transparent)`,
|
|
87558
87571
|
transform: `rotate(${rotation}deg)`,
|
|
87559
87572
|
animation: `meteor ${animationDuration}s linear ${animationDelay}s infinite`,
|
|
87560
87573
|
opacity: meteorOpacity,
|
|
87561
|
-
filter: glow ? `drop-shadow(0 0 ${glowSize}px ${
|
|
87574
|
+
filter: glow ? `drop-shadow(0 0 ${glowSize}px ${finalColor})` : void 0
|
|
87562
87575
|
},
|
|
87563
87576
|
children: /* @__PURE__ */ jsx(
|
|
87564
87577
|
"span",
|
|
@@ -87569,8 +87582,8 @@ var MeteorsInternal = ({
|
|
|
87569
87582
|
height: `${meteorSize * 4}px`,
|
|
87570
87583
|
borderRadius: "50%",
|
|
87571
87584
|
marginTop: `-${meteorSize}px`,
|
|
87572
|
-
background:
|
|
87573
|
-
boxShadow: glow ? `0 0 ${glowSize}px ${meteorSize}px ${
|
|
87585
|
+
background: finalColor,
|
|
87586
|
+
boxShadow: glow ? `0 0 ${glowSize}px ${meteorSize}px ${finalColor}33` : void 0
|
|
87574
87587
|
}
|
|
87575
87588
|
}
|
|
87576
87589
|
)
|
|
@@ -87604,11 +87617,8 @@ var AuroraBackgroundInternal = ({
|
|
|
87604
87617
|
children,
|
|
87605
87618
|
className,
|
|
87606
87619
|
containerClassName,
|
|
87607
|
-
colors
|
|
87608
|
-
|
|
87609
|
-
secondary: "#8b5cf6",
|
|
87610
|
-
tertiary: "#06b6d4"
|
|
87611
|
-
},
|
|
87620
|
+
colors,
|
|
87621
|
+
darkColors,
|
|
87612
87622
|
speed = "normal",
|
|
87613
87623
|
opacity = 0.5,
|
|
87614
87624
|
blur: blur2 = 80,
|
|
@@ -87619,10 +87629,44 @@ var AuroraBackgroundInternal = ({
|
|
|
87619
87629
|
fixed = false,
|
|
87620
87630
|
pauseWhenHidden = false
|
|
87621
87631
|
}) => {
|
|
87632
|
+
const { theme, resolvedTheme } = useTheme();
|
|
87633
|
+
const [mounted, setMounted] = useState(false);
|
|
87622
87634
|
const [mousePosition, setMousePosition] = useState({ x: 50, y: 50 });
|
|
87623
87635
|
const [isVisible, setIsVisible] = useState(true);
|
|
87624
87636
|
const containerRef = useRef(null);
|
|
87625
87637
|
const observerTimeoutRef = useRef(null);
|
|
87638
|
+
useEffect(() => {
|
|
87639
|
+
setMounted(true);
|
|
87640
|
+
}, []);
|
|
87641
|
+
const currentTheme = mounted ? resolvedTheme || theme || "dark" : "dark";
|
|
87642
|
+
const themeDefaultColors = useMemo(() => {
|
|
87643
|
+
if (currentTheme === "dark") {
|
|
87644
|
+
return {
|
|
87645
|
+
primary: "#6B46C1",
|
|
87646
|
+
// Deep vibrant purple (darker, more saturated)
|
|
87647
|
+
secondary: "#4C7FE0",
|
|
87648
|
+
// Deep vibrant blue (darker, more saturated)
|
|
87649
|
+
tertiary: "#0891B2"
|
|
87650
|
+
// Deep vibrant cyan (darker, more saturated)
|
|
87651
|
+
};
|
|
87652
|
+
} else {
|
|
87653
|
+
return {
|
|
87654
|
+
primary: "#3D2680",
|
|
87655
|
+
// Moontra dark purple
|
|
87656
|
+
secondary: "#5B3FA0",
|
|
87657
|
+
// Moontra medium purple
|
|
87658
|
+
tertiary: "#00ACC1"
|
|
87659
|
+
// Moontra cyan
|
|
87660
|
+
};
|
|
87661
|
+
}
|
|
87662
|
+
}, [currentTheme]);
|
|
87663
|
+
const finalColors = useMemo(() => {
|
|
87664
|
+
if (currentTheme === "dark") {
|
|
87665
|
+
return darkColors || colors || themeDefaultColors;
|
|
87666
|
+
} else {
|
|
87667
|
+
return colors || themeDefaultColors;
|
|
87668
|
+
}
|
|
87669
|
+
}, [currentTheme, colors, darkColors, themeDefaultColors]);
|
|
87626
87670
|
const duration = useMemo(() => {
|
|
87627
87671
|
switch (speed) {
|
|
87628
87672
|
case "slow":
|
|
@@ -87637,26 +87681,26 @@ var AuroraBackgroundInternal = ({
|
|
|
87637
87681
|
switch (variant) {
|
|
87638
87682
|
case "subtle":
|
|
87639
87683
|
return {
|
|
87640
|
-
primary:
|
|
87641
|
-
secondary:
|
|
87642
|
-
tertiary:
|
|
87684
|
+
primary: finalColors.primary || "#94a3b8",
|
|
87685
|
+
secondary: finalColors.secondary || "#cbd5e1",
|
|
87686
|
+
tertiary: finalColors.tertiary || "#e2e8f0"
|
|
87643
87687
|
};
|
|
87644
87688
|
case "vibrant":
|
|
87645
87689
|
return {
|
|
87646
|
-
primary:
|
|
87647
|
-
secondary:
|
|
87648
|
-
tertiary:
|
|
87690
|
+
primary: finalColors.primary || "#f97316",
|
|
87691
|
+
secondary: finalColors.secondary || "#ec4899",
|
|
87692
|
+
tertiary: finalColors.tertiary || "#8b5cf6"
|
|
87649
87693
|
};
|
|
87650
87694
|
case "dark":
|
|
87651
87695
|
return {
|
|
87652
|
-
primary:
|
|
87653
|
-
secondary:
|
|
87654
|
-
tertiary:
|
|
87696
|
+
primary: finalColors.primary || "#1e293b",
|
|
87697
|
+
secondary: finalColors.secondary || "#334155",
|
|
87698
|
+
tertiary: finalColors.tertiary || "#475569"
|
|
87655
87699
|
};
|
|
87656
87700
|
default:
|
|
87657
|
-
return
|
|
87701
|
+
return finalColors;
|
|
87658
87702
|
}
|
|
87659
|
-
}, [variant,
|
|
87703
|
+
}, [variant, finalColors]);
|
|
87660
87704
|
const handleMouseMove2 = useCallback((e) => {
|
|
87661
87705
|
if (!interactive)
|
|
87662
87706
|
return;
|
|
@@ -87728,6 +87772,9 @@ var AuroraBackgroundInternal = ({
|
|
|
87728
87772
|
filter: `blur(${blur2 * 0.5}px)`,
|
|
87729
87773
|
mixBlendMode: "overlay"
|
|
87730
87774
|
}), [blur2]);
|
|
87775
|
+
if (!mounted) {
|
|
87776
|
+
return null;
|
|
87777
|
+
}
|
|
87731
87778
|
return /* @__PURE__ */ jsxs(
|
|
87732
87779
|
"div",
|
|
87733
87780
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.35",
|
|
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",
|