@moontra/moonui-pro 2.31.4 → 2.31.5
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.d.ts +1 -1
- package/dist/index.global.js +67 -67
- package/dist/index.global.js.map +1 -1
- package/dist/index.mjs +17 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2059,8 +2059,9 @@ function createAIProvider(provider, config) {
|
|
|
2059
2059
|
}
|
|
2060
2060
|
}
|
|
2061
2061
|
var CACHE_KEY = "moonui_license_cache";
|
|
2062
|
-
var CACHE_DURATION =
|
|
2063
|
-
var OFFLINE_GRACE_PERIOD =
|
|
2062
|
+
var CACHE_DURATION = 1 * 60 * 1e3 ;
|
|
2063
|
+
var OFFLINE_GRACE_PERIOD = 5 * 60 * 1e3 ;
|
|
2064
|
+
var CHECK_INTERVAL = 10 * 1e3;
|
|
2064
2065
|
var SubscriptionContext = createContext(void 0);
|
|
2065
2066
|
function SubscriptionProvider({ children }) {
|
|
2066
2067
|
const [isLoading, setIsLoading] = useState(true);
|
|
@@ -2105,6 +2106,10 @@ function SubscriptionProvider({ children }) {
|
|
|
2105
2106
|
const validateLicense = async () => {
|
|
2106
2107
|
const token = await getAuthToken();
|
|
2107
2108
|
if (!token) {
|
|
2109
|
+
console.log("[MoonUI Pro] No auth token found - clearing access");
|
|
2110
|
+
if (typeof window !== "undefined") {
|
|
2111
|
+
localStorage.removeItem(CACHE_KEY);
|
|
2112
|
+
}
|
|
2108
2113
|
setHasProAccess(false);
|
|
2109
2114
|
setIsAuthenticated(false);
|
|
2110
2115
|
return;
|
|
@@ -2196,6 +2201,16 @@ function SubscriptionProvider({ children }) {
|
|
|
2196
2201
|
};
|
|
2197
2202
|
useEffect(() => {
|
|
2198
2203
|
checkAccess();
|
|
2204
|
+
{
|
|
2205
|
+
const interval = setInterval(() => {
|
|
2206
|
+
console.log("[MoonUI Pro] Running periodic auth check...");
|
|
2207
|
+
if (typeof window !== "undefined") {
|
|
2208
|
+
localStorage.removeItem(CACHE_KEY);
|
|
2209
|
+
}
|
|
2210
|
+
validateLicense().catch(console.error);
|
|
2211
|
+
}, CHECK_INTERVAL);
|
|
2212
|
+
return () => clearInterval(interval);
|
|
2213
|
+
}
|
|
2199
2214
|
}, []);
|
|
2200
2215
|
const value = {
|
|
2201
2216
|
isLoading,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "2.31.
|
|
3
|
+
"version": "2.31.5",
|
|
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",
|