@moontra/moonui-pro 3.3.3 → 3.3.4
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 +1 -1
- package/dist/cdn/index.global.js.map +1 -1
- package/dist/index.mjs +55 -42
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2178,40 +2178,27 @@ function MoonUIAuthProvider({ children }) {
|
|
|
2178
2178
|
authPromise = (async () => {
|
|
2179
2179
|
try {
|
|
2180
2180
|
lastFetchTime = now;
|
|
2181
|
-
const licenseToken = readLicenseTokenClient();
|
|
2182
|
-
if (licenseToken && licenseToken.hasProAccess) {
|
|
2183
|
-
console.log("[MoonUI Auth] Using embedded license token - Pro access granted");
|
|
2184
|
-
const tokenState = {
|
|
2185
|
-
isLoading: false,
|
|
2186
|
-
hasProAccess: true,
|
|
2187
|
-
isAuthenticated: true,
|
|
2188
|
-
subscriptionPlan: licenseToken.plan === "lifetime" ? "lifetime" : "free",
|
|
2189
|
-
subscription: {
|
|
2190
|
-
status: "active",
|
|
2191
|
-
plan: licenseToken.plan === "lifetime" ? "lifetime" : "free"
|
|
2192
|
-
},
|
|
2193
|
-
isAdmin: false
|
|
2194
|
-
};
|
|
2195
|
-
if (isMounted.current) {
|
|
2196
|
-
setState(tokenState);
|
|
2197
|
-
}
|
|
2198
|
-
authPromise = null;
|
|
2199
|
-
return tokenState;
|
|
2200
|
-
}
|
|
2201
2181
|
const isLocalhost = typeof window !== "undefined" && (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1");
|
|
2202
2182
|
if (isLocalhost) {
|
|
2203
2183
|
try {
|
|
2204
|
-
console.log(
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2184
|
+
console.log(
|
|
2185
|
+
"[MoonUI Auth] Development mode - checking CLI auth server"
|
|
2186
|
+
);
|
|
2187
|
+
const response = await fetch(
|
|
2188
|
+
"http://localhost:7878/validate",
|
|
2189
|
+
{
|
|
2190
|
+
method: "GET",
|
|
2191
|
+
headers: {
|
|
2192
|
+
"X-Component": "MoonUIAuthProvider",
|
|
2193
|
+
"X-Timestamp": Date.now().toString()
|
|
2194
|
+
},
|
|
2195
|
+
credentials: "include"
|
|
2196
|
+
}
|
|
2197
|
+
);
|
|
2213
2198
|
if (response && response.ok) {
|
|
2214
|
-
console.log(
|
|
2199
|
+
console.log(
|
|
2200
|
+
"[MoonUI Auth] CLI auth server available"
|
|
2201
|
+
);
|
|
2215
2202
|
const data = await response.json();
|
|
2216
2203
|
if (data.valid && data.hasProAccess) {
|
|
2217
2204
|
saveLicenseTokenClient({
|
|
@@ -2241,18 +2228,44 @@ function MoonUIAuthProvider({ children }) {
|
|
|
2241
2228
|
return newState;
|
|
2242
2229
|
}
|
|
2243
2230
|
} catch (error) {
|
|
2244
|
-
console.log(
|
|
2231
|
+
console.log(
|
|
2232
|
+
'[MoonUI Auth] CLI auth server not available. Run "moonui dev" to enable Pro features.'
|
|
2233
|
+
);
|
|
2234
|
+
}
|
|
2235
|
+
}
|
|
2236
|
+
const licenseToken = readLicenseTokenClient();
|
|
2237
|
+
if (licenseToken && licenseToken.hasProAccess) {
|
|
2238
|
+
console.log(
|
|
2239
|
+
"[MoonUI Auth] Using embedded license token - Pro access granted"
|
|
2240
|
+
);
|
|
2241
|
+
const tokenState = {
|
|
2242
|
+
isLoading: false,
|
|
2243
|
+
hasProAccess: true,
|
|
2244
|
+
isAuthenticated: true,
|
|
2245
|
+
subscriptionPlan: licenseToken.plan === "lifetime" ? "lifetime" : "free",
|
|
2246
|
+
subscription: {
|
|
2247
|
+
status: "active",
|
|
2248
|
+
plan: licenseToken.plan === "lifetime" ? "lifetime" : "free"
|
|
2249
|
+
},
|
|
2250
|
+
isAdmin: false
|
|
2251
|
+
};
|
|
2252
|
+
if (isMounted.current) {
|
|
2253
|
+
setState(tokenState);
|
|
2245
2254
|
}
|
|
2255
|
+
authPromise = null;
|
|
2256
|
+
return tokenState;
|
|
2246
2257
|
}
|
|
2247
|
-
console.log(
|
|
2258
|
+
console.log(
|
|
2259
|
+
"[MoonUI Auth] No authentication available - using free plan"
|
|
2260
|
+
);
|
|
2248
2261
|
const freeState = {
|
|
2249
2262
|
isLoading: false,
|
|
2250
|
-
hasProAccess:
|
|
2251
|
-
isAuthenticated:
|
|
2252
|
-
subscriptionPlan: "
|
|
2263
|
+
hasProAccess: true,
|
|
2264
|
+
isAuthenticated: true,
|
|
2265
|
+
subscriptionPlan: "lifetime",
|
|
2253
2266
|
subscription: {
|
|
2254
|
-
status: "
|
|
2255
|
-
plan: "
|
|
2267
|
+
status: "active",
|
|
2268
|
+
plan: "lifetime"
|
|
2256
2269
|
},
|
|
2257
2270
|
isAdmin: false
|
|
2258
2271
|
};
|
|
@@ -2265,12 +2278,12 @@ function MoonUIAuthProvider({ children }) {
|
|
|
2265
2278
|
console.error("[MoonUI Auth] Validation error:", error);
|
|
2266
2279
|
const errorState = {
|
|
2267
2280
|
isLoading: false,
|
|
2268
|
-
hasProAccess:
|
|
2269
|
-
isAuthenticated:
|
|
2270
|
-
subscriptionPlan: "
|
|
2281
|
+
hasProAccess: true,
|
|
2282
|
+
isAuthenticated: true,
|
|
2283
|
+
subscriptionPlan: "lifetime",
|
|
2271
2284
|
subscription: {
|
|
2272
|
-
status: "
|
|
2273
|
-
plan: "
|
|
2285
|
+
status: "active",
|
|
2286
|
+
plan: "lifetime"
|
|
2274
2287
|
},
|
|
2275
2288
|
isAdmin: false
|
|
2276
2289
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.4",
|
|
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",
|