@moontra/moonui-pro 2.32.41 → 2.32.43
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 +8 -33
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3006,41 +3006,16 @@ function SubscriptionProvider({ children }) {
|
|
|
3006
3006
|
const [isAuthenticated, setIsAuthenticated] = useState(false);
|
|
3007
3007
|
const [lastCheckTime, setLastCheckTime] = useState(0);
|
|
3008
3008
|
const getAuthToken2 = async () => {
|
|
3009
|
-
if (
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
if (typeof window !== "undefined") {
|
|
3014
|
-
const browserToken = localStorage.getItem("moonui_auth_token");
|
|
3015
|
-
if (browserToken) {
|
|
3016
|
-
return browserToken;
|
|
3017
|
-
}
|
|
3018
|
-
try {
|
|
3019
|
-
const response = await fetch("https://moonui.dev/api/cli/validate-session", {
|
|
3020
|
-
method: "POST",
|
|
3021
|
-
headers: {
|
|
3022
|
-
"Content-Type": "application/json"
|
|
3023
|
-
},
|
|
3024
|
-
body: JSON.stringify({
|
|
3025
|
-
validationType: "browser-only"
|
|
3026
|
-
})
|
|
3027
|
-
});
|
|
3028
|
-
if (response.ok) {
|
|
3029
|
-
const data = await response.json();
|
|
3030
|
-
if (data.authenticated && data.hasProAccess) {
|
|
3031
|
-
return "cli-authenticated-pro";
|
|
3032
|
-
} else if (data.authenticated) {
|
|
3033
|
-
return null;
|
|
3034
|
-
}
|
|
3035
|
-
}
|
|
3036
|
-
} catch (error) {
|
|
3037
|
-
{
|
|
3038
|
-
console.debug("[MoonUI Pro Context] CLI auth check via moonui.dev failed:", error);
|
|
3039
|
-
}
|
|
3040
|
-
}
|
|
3009
|
+
if (typeof window !== "undefined") {
|
|
3010
|
+
const browserToken = localStorage.getItem("moonui_auth_token");
|
|
3011
|
+
if (browserToken) {
|
|
3012
|
+
return browserToken;
|
|
3041
3013
|
}
|
|
3042
3014
|
}
|
|
3043
|
-
|
|
3015
|
+
const devToken = process.env.NEXT_PUBLIC_MOONUI_DEV_TOKEN;
|
|
3016
|
+
const authToken = process.env.NEXT_PUBLIC_MOONUI_AUTH_TOKEN;
|
|
3017
|
+
const licenseKey = process.env.MOONUI_LICENSE_KEY;
|
|
3018
|
+
return devToken || authToken || licenseKey || null;
|
|
3044
3019
|
};
|
|
3045
3020
|
const validateLicense2 = async () => {
|
|
3046
3021
|
const token = await getAuthToken2();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "2.32.
|
|
3
|
+
"version": "2.32.43",
|
|
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",
|