@moontra/moonui-pro 3.4.4 → 3.4.6
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 +143 -125
- package/dist/cdn/index.global.js.map +1 -1
- package/dist/index.d.ts +21 -3
- package/dist/index.mjs +77 -37
- package/dist/next-config-plugin.mjs +3 -19
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -7348,11 +7348,29 @@ interface MagneticElementsProps {
|
|
|
7348
7348
|
declare const MagneticElements: React__default.FC<MagneticElementsProps>;
|
|
7349
7349
|
|
|
7350
7350
|
/**
|
|
7351
|
-
* ScrollReveal Component
|
|
7351
|
+
* ScrollReveal Pro Component
|
|
7352
|
+
*
|
|
7353
|
+
* Advanced scroll-triggered animations with professional features
|
|
7354
|
+
* Guarantees children rendering even when animations are disabled
|
|
7355
|
+
*
|
|
7356
|
+
* Pro Features:
|
|
7357
|
+
* - 7 animation types (fade, slide, zoom, flip, bounce, rotate, blur)
|
|
7358
|
+
* - Parallax scrolling effects with optimized performance
|
|
7359
|
+
* - Cascade/stagger animations for multiple children
|
|
7360
|
+
* - Custom animation keyframes support
|
|
7361
|
+
* - Mobile/desktop specific animations
|
|
7362
|
+
* - Debug mode for testing
|
|
7363
|
+
* - Lifecycle callbacks (onReveal, onComplete)
|
|
7364
|
+
* - RequestAnimationFrame optimizations for 60fps
|
|
7365
|
+
*
|
|
7366
|
+
* Performance Optimizations:
|
|
7367
|
+
* - Batched state updates
|
|
7368
|
+
* - RAF-based parallax calculations
|
|
7369
|
+
* - Proper cleanup to prevent memory leaks
|
|
7370
|
+
* - Children always render (animations are visual only)
|
|
7352
7371
|
*
|
|
7353
|
-
* Reveals content with animations when scrolling into view
|
|
7354
7372
|
* Derived from React Bits (https://github.com/DavidHDev/react-bits)
|
|
7355
|
-
*
|
|
7373
|
+
* Enhanced for MoonUI Pro with TypeScript and performance improvements
|
|
7356
7374
|
*
|
|
7357
7375
|
* @author MoonUI Team
|
|
7358
7376
|
* @license MIT
|
package/dist/index.mjs
CHANGED
|
@@ -96614,7 +96614,8 @@ var ScrollRevealInternal = ({
|
|
|
96614
96614
|
duration = 600,
|
|
96615
96615
|
delay = 0,
|
|
96616
96616
|
easing = "cubic-bezier(0.25, 0.46, 0.45, 0.94)",
|
|
96617
|
-
threshold = 0.
|
|
96617
|
+
threshold = 0.3,
|
|
96618
|
+
// Increased from 0.1 for better visibility (aligned with Free version)
|
|
96618
96619
|
once = true,
|
|
96619
96620
|
initialOpacity = 0,
|
|
96620
96621
|
initialScale = 0.9,
|
|
@@ -96652,8 +96653,13 @@ var ScrollRevealInternal = ({
|
|
|
96652
96653
|
return true;
|
|
96653
96654
|
};
|
|
96654
96655
|
const getAnimationStyles = useCallback(() => {
|
|
96655
|
-
if (!shouldAnimate())
|
|
96656
|
-
return {
|
|
96656
|
+
if (!shouldAnimate()) {
|
|
96657
|
+
return {
|
|
96658
|
+
opacity: 1,
|
|
96659
|
+
transform: "none",
|
|
96660
|
+
filter: "none"
|
|
96661
|
+
};
|
|
96662
|
+
}
|
|
96657
96663
|
const baseStyles = {
|
|
96658
96664
|
transition: `all ${duration}ms ${easing} ${delay}ms`,
|
|
96659
96665
|
willChange: "transform, opacity"
|
|
@@ -96747,36 +96753,46 @@ var ScrollRevealInternal = ({
|
|
|
96747
96753
|
parallax,
|
|
96748
96754
|
parallaxOffset
|
|
96749
96755
|
]);
|
|
96756
|
+
const rafRef = useRef(void 0);
|
|
96750
96757
|
const handleParallax = useCallback(() => {
|
|
96751
96758
|
if (!parallax || !elementRef.current)
|
|
96752
96759
|
return;
|
|
96753
|
-
|
|
96754
|
-
|
|
96755
|
-
|
|
96756
|
-
|
|
96757
|
-
|
|
96758
|
-
|
|
96759
|
-
|
|
96760
|
-
|
|
96760
|
+
if (rafRef.current) {
|
|
96761
|
+
cancelAnimationFrame(rafRef.current);
|
|
96762
|
+
}
|
|
96763
|
+
rafRef.current = requestAnimationFrame(() => {
|
|
96764
|
+
if (!elementRef.current)
|
|
96765
|
+
return;
|
|
96766
|
+
const element = elementRef.current;
|
|
96767
|
+
const rect = element.getBoundingClientRect();
|
|
96768
|
+
const windowHeight = window.innerHeight;
|
|
96769
|
+
const elementTop = rect.top;
|
|
96770
|
+
const elementHeight = rect.height;
|
|
96771
|
+
const scrollProgress = (windowHeight - elementTop) / (windowHeight + elementHeight);
|
|
96772
|
+
const offset5 = scrollProgress * 100 * parallaxSpeed;
|
|
96773
|
+
setParallaxOffset(offset5);
|
|
96774
|
+
});
|
|
96761
96775
|
}, [parallax, parallaxSpeed]);
|
|
96762
96776
|
const handleIntersection = useCallback((entries) => {
|
|
96763
|
-
|
|
96764
|
-
|
|
96765
|
-
if (
|
|
96766
|
-
|
|
96767
|
-
|
|
96768
|
-
|
|
96769
|
-
|
|
96770
|
-
|
|
96771
|
-
|
|
96772
|
-
|
|
96773
|
-
|
|
96777
|
+
requestAnimationFrame(() => {
|
|
96778
|
+
entries.forEach((entry) => {
|
|
96779
|
+
if (entry.isIntersecting) {
|
|
96780
|
+
if (!hasAnimated || !once) {
|
|
96781
|
+
setIsVisible(true);
|
|
96782
|
+
setHasAnimated(true);
|
|
96783
|
+
onReveal?.();
|
|
96784
|
+
if (onComplete) {
|
|
96785
|
+
setTimeout(() => {
|
|
96786
|
+
animationCompleteRef.current = true;
|
|
96787
|
+
onComplete();
|
|
96788
|
+
}, duration + delay);
|
|
96789
|
+
}
|
|
96774
96790
|
}
|
|
96791
|
+
} else if (!once) {
|
|
96792
|
+
setIsVisible(false);
|
|
96793
|
+
animationCompleteRef.current = false;
|
|
96775
96794
|
}
|
|
96776
|
-
}
|
|
96777
|
-
setIsVisible(false);
|
|
96778
|
-
animationCompleteRef.current = false;
|
|
96779
|
-
}
|
|
96795
|
+
});
|
|
96780
96796
|
});
|
|
96781
96797
|
}, [hasAnimated, once, onReveal, onComplete, duration, delay]);
|
|
96782
96798
|
useEffect(() => {
|
|
@@ -96798,6 +96814,9 @@ var ScrollRevealInternal = ({
|
|
|
96798
96814
|
if (parallax) {
|
|
96799
96815
|
window.removeEventListener("scroll", handleParallax);
|
|
96800
96816
|
}
|
|
96817
|
+
if (rafRef.current) {
|
|
96818
|
+
cancelAnimationFrame(rafRef.current);
|
|
96819
|
+
}
|
|
96801
96820
|
};
|
|
96802
96821
|
}, [threshold, offset4, handleIntersection, parallax, handleParallax]);
|
|
96803
96822
|
const processChildren = () => {
|
|
@@ -96900,14 +96919,17 @@ var ScrollRevealInternal = ({
|
|
|
96900
96919
|
var ScrollReveal = (props) => {
|
|
96901
96920
|
const { hasProAccess, isLoading } = useSubscription();
|
|
96902
96921
|
if (!isLoading && !hasProAccess) {
|
|
96903
|
-
return /* @__PURE__ */
|
|
96904
|
-
|
|
96905
|
-
{
|
|
96906
|
-
|
|
96907
|
-
|
|
96908
|
-
|
|
96909
|
-
|
|
96910
|
-
|
|
96922
|
+
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
96923
|
+
/* @__PURE__ */ jsx(ScrollRevealInternal, { ...props }),
|
|
96924
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 pointer-events-none bg-background/80 backdrop-blur-sm flex items-center justify-center z-50", children: /* @__PURE__ */ jsx(
|
|
96925
|
+
ProLockScreen,
|
|
96926
|
+
{
|
|
96927
|
+
componentName: "ScrollReveal",
|
|
96928
|
+
compact: true,
|
|
96929
|
+
className: "inline-block pointer-events-auto"
|
|
96930
|
+
}
|
|
96931
|
+
) })
|
|
96932
|
+
] });
|
|
96911
96933
|
}
|
|
96912
96934
|
return /* @__PURE__ */ jsx(ScrollRevealInternal, { ...props });
|
|
96913
96935
|
};
|
|
@@ -100810,11 +100832,29 @@ FocusTransitions.displayName = "FocusTransitions";
|
|
|
100810
100832
|
* @license Commercial
|
|
100811
100833
|
*/
|
|
100812
100834
|
/**
|
|
100813
|
-
* ScrollReveal Component
|
|
100835
|
+
* ScrollReveal Pro Component
|
|
100836
|
+
*
|
|
100837
|
+
* Advanced scroll-triggered animations with professional features
|
|
100838
|
+
* Guarantees children rendering even when animations are disabled
|
|
100839
|
+
*
|
|
100840
|
+
* Pro Features:
|
|
100841
|
+
* - 7 animation types (fade, slide, zoom, flip, bounce, rotate, blur)
|
|
100842
|
+
* - Parallax scrolling effects with optimized performance
|
|
100843
|
+
* - Cascade/stagger animations for multiple children
|
|
100844
|
+
* - Custom animation keyframes support
|
|
100845
|
+
* - Mobile/desktop specific animations
|
|
100846
|
+
* - Debug mode for testing
|
|
100847
|
+
* - Lifecycle callbacks (onReveal, onComplete)
|
|
100848
|
+
* - RequestAnimationFrame optimizations for 60fps
|
|
100849
|
+
*
|
|
100850
|
+
* Performance Optimizations:
|
|
100851
|
+
* - Batched state updates
|
|
100852
|
+
* - RAF-based parallax calculations
|
|
100853
|
+
* - Proper cleanup to prevent memory leaks
|
|
100854
|
+
* - Children always render (animations are visual only)
|
|
100814
100855
|
*
|
|
100815
|
-
* Reveals content with animations when scrolling into view
|
|
100816
100856
|
* Derived from React Bits (https://github.com/DavidHDev/react-bits)
|
|
100817
|
-
*
|
|
100857
|
+
* Enhanced for MoonUI Pro with TypeScript and performance improvements
|
|
100818
100858
|
*
|
|
100819
100859
|
* @author MoonUI Team
|
|
100820
100860
|
* @license MIT
|
|
@@ -158,24 +158,8 @@ function withMoonUIProToken(nextConfig = {}) {
|
|
|
158
158
|
} else {
|
|
159
159
|
const licenseKey = getLicenseKeyFromEnv();
|
|
160
160
|
if (licenseKey) {
|
|
161
|
-
console.log("[MoonUI Next.js Plugin] License key found,
|
|
162
|
-
|
|
163
|
-
const path2 = __require("path");
|
|
164
|
-
try {
|
|
165
|
-
const postInstallPath = path2.join(__dirname, "../scripts/postinstall.cjs");
|
|
166
|
-
execSync(`node ${postInstallPath}`, {
|
|
167
|
-
env: { ...process.env },
|
|
168
|
-
stdio: "inherit"
|
|
169
|
-
});
|
|
170
|
-
token = resolveTokenSync();
|
|
171
|
-
if (token) {
|
|
172
|
-
console.log("[MoonUI Next.js Plugin] \u2713 Token generated successfully");
|
|
173
|
-
} else {
|
|
174
|
-
console.log("[MoonUI Next.js Plugin] \u26A0 Token generation attempted but token not found");
|
|
175
|
-
}
|
|
176
|
-
} catch (error) {
|
|
177
|
-
console.error("[MoonUI Next.js Plugin] Failed to generate token:", error.message);
|
|
178
|
-
}
|
|
161
|
+
console.log("[MoonUI Next.js Plugin] License key found, will attempt runtime generation...");
|
|
162
|
+
console.log("[MoonUI Next.js Plugin] \u2139 Token will be generated on first use (runtime fallback)");
|
|
179
163
|
} else {
|
|
180
164
|
console.log("[MoonUI Next.js Plugin] No license key found in environment");
|
|
181
165
|
console.log("[MoonUI Next.js Plugin] Set MOONUI_LICENSE_KEY to enable Pro features");
|
|
@@ -191,7 +175,7 @@ function withMoonUIProToken(nextConfig = {}) {
|
|
|
191
175
|
if (token) {
|
|
192
176
|
console.log("[MoonUI Next.js Plugin] \u2713 Token injected into NEXT_PUBLIC_MOONUI_PRO_TOKEN");
|
|
193
177
|
} else {
|
|
194
|
-
console.log("[MoonUI Next.js Plugin] Running without Pro
|
|
178
|
+
console.log("[MoonUI Next.js Plugin] Running without Pro token (will use runtime fallback)");
|
|
195
179
|
}
|
|
196
180
|
console.log("[MoonUI Next.js Plugin] === INITIALIZATION COMPLETE ===");
|
|
197
181
|
return enhancedConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.6",
|
|
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",
|