@moontra/moonui-pro 2.31.5 → 2.31.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/index.global.js +1 -1
- package/dist/index.global.js.map +1 -1
- package/dist/index.mjs +6 -24
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -50,14 +50,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
50
50
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
51
51
|
var __getProtoOf = Object.getPrototypeOf;
|
|
52
52
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
53
|
-
var
|
|
54
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
55
|
-
}) : x)(function(x) {
|
|
56
|
-
if (typeof require !== "undefined")
|
|
57
|
-
return require.apply(this, arguments);
|
|
58
|
-
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
59
|
-
});
|
|
60
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
53
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
61
54
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
62
55
|
};
|
|
63
56
|
var __copyProps = (to, from2, except, desc) => {
|
|
@@ -2079,27 +2072,16 @@ function SubscriptionProvider({ children }) {
|
|
|
2079
2072
|
const response = await fetch("/api/moonui/check-cli-auth");
|
|
2080
2073
|
if (response.ok) {
|
|
2081
2074
|
const data = await response.json();
|
|
2082
|
-
if (data.authenticated) {
|
|
2083
|
-
return "cli-authenticated";
|
|
2075
|
+
if (data.authenticated && data.hasProAccess) {
|
|
2076
|
+
return "cli-authenticated-pro";
|
|
2077
|
+
} else if (data.authenticated) {
|
|
2078
|
+
return null;
|
|
2084
2079
|
}
|
|
2085
2080
|
}
|
|
2086
2081
|
} catch (error) {
|
|
2087
2082
|
console.debug("[MoonUI Pro Context] CLI auth check via API failed:", error);
|
|
2088
2083
|
}
|
|
2089
2084
|
}
|
|
2090
|
-
if (typeof window === "undefined") {
|
|
2091
|
-
try {
|
|
2092
|
-
const fs = __require("fs");
|
|
2093
|
-
const path = __require("path");
|
|
2094
|
-
const os2 = __require("os");
|
|
2095
|
-
const authPath = path.join(os2.homedir(), ".moonui", "auth.encrypted");
|
|
2096
|
-
if (fs.existsSync(authPath)) {
|
|
2097
|
-
return "cli-authenticated";
|
|
2098
|
-
}
|
|
2099
|
-
} catch (error) {
|
|
2100
|
-
console.debug("[MoonUI Pro Context] Server-side CLI auth check failed:", error);
|
|
2101
|
-
}
|
|
2102
|
-
}
|
|
2103
2085
|
}
|
|
2104
2086
|
return process.env.NEXT_PUBLIC_MOONUI_AUTH_TOKEN || process.env.MOONUI_LICENSE_KEY || null;
|
|
2105
2087
|
};
|
|
@@ -2114,7 +2096,7 @@ function SubscriptionProvider({ children }) {
|
|
|
2114
2096
|
setIsAuthenticated(false);
|
|
2115
2097
|
return;
|
|
2116
2098
|
}
|
|
2117
|
-
if (token === "cli-authenticated") {
|
|
2099
|
+
if (token === "cli-authenticated-pro") {
|
|
2118
2100
|
setHasProAccess(true);
|
|
2119
2101
|
setIsAuthenticated(true);
|
|
2120
2102
|
if (typeof window !== "undefined") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "2.31.
|
|
3
|
+
"version": "2.31.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",
|