@moontra/moonui-pro 2.33.9 → 2.33.11

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.mjs CHANGED
@@ -2838,14 +2838,15 @@ function SubscriptionProvider({ children }) {
2838
2838
  if (response.ok) {
2839
2839
  const data = await response.json();
2840
2840
  console.log("[MoonUI Pro] Response data:", data);
2841
+ const planValue = typeof data.plan === "object" ? data.plan?.plan : data.plan;
2841
2842
  const cacheData = {
2842
2843
  valid: data.valid,
2843
- plan: data.plan,
2844
+ plan: planValue || "free",
2844
2845
  timestamp: Date.now()
2845
2846
  };
2846
2847
  localStorage.setItem(CLI_AUTH_CACHE_KEY, JSON.stringify(cacheData));
2847
- console.log("[MoonUI Pro] Cached CLI auth response for 1 hour");
2848
- if (data.valid && (data.plan === "lifetime" || data.plan === "pro_lifetime")) {
2848
+ console.log("[MoonUI Pro] Cached CLI auth response for 1 hour, plan:", planValue);
2849
+ if (data.valid && (planValue === "lifetime" || planValue === "pro_lifetime")) {
2849
2850
  return "cli-authenticated-pro";
2850
2851
  } else if (data.valid) {
2851
2852
  return null;
@@ -2867,6 +2868,7 @@ function SubscriptionProvider({ children }) {
2867
2868
  console.debug("[MoonUI Pro Context] CLI auth check via moonui.dev failed:", error);
2868
2869
  }
2869
2870
  }
2871
+ return null;
2870
2872
  }
2871
2873
  }
2872
2874
  }
@@ -2959,6 +2961,15 @@ function SubscriptionProvider({ children }) {
2959
2961
  localStorage.removeItem(CLI_AUTH_CACHE_KEY);
2960
2962
  }
2961
2963
  }
2964
+ console.log("[MoonUI Pro] No valid CLI cache, checking CLI auth...");
2965
+ const authToken = await getAuthToken2();
2966
+ if (authToken === "cli-authenticated-pro") {
2967
+ console.log("[MoonUI Pro] CLI authentication successful");
2968
+ setHasProAccess(true);
2969
+ setIsAuthenticated(true);
2970
+ setIsLoading(false);
2971
+ return;
2972
+ }
2962
2973
  }
2963
2974
  const cached = localStorage.getItem(CACHE_KEY2);
2964
2975
  if (cached) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moontra/moonui-pro",
3
- "version": "2.33.9",
3
+ "version": "2.33.11",
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",