@moontra/moonui-pro 3.2.0 → 3.2.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moontra/moonui-pro",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
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",
@@ -50,10 +50,31 @@ function encryptToken(token, key) {
50
50
  // Validate license with MoonUI API
51
51
  async function validateLicense(licenseKey) {
52
52
  return new Promise((resolve, reject) => {
53
+ // Determine the domain
54
+ let domain = 'unknown';
55
+
56
+ // Check for Vercel deployment
57
+ if (process.env.VERCEL_URL) {
58
+ domain = process.env.VERCEL_URL.replace(/^https?:\/\//, '');
59
+ } else if (process.env.VERCEL_PROJECT_PRODUCTION_URL) {
60
+ domain = process.env.VERCEL_PROJECT_PRODUCTION_URL.replace(/^https?:\/\//, '');
61
+ } else if (process.env.NEXT_PUBLIC_VERCEL_URL) {
62
+ domain = process.env.NEXT_PUBLIC_VERCEL_URL.replace(/^https?:\/\//, '');
63
+ } else if (process.env.DEPLOY_URL) {
64
+ domain = process.env.DEPLOY_URL.replace(/^https?:\/\//, '');
65
+ }
66
+
67
+ // For moonui.dev site, use special validation
68
+ const isMoonUISite = domain.includes('moonui.dev') ||
69
+ domain.includes('moonui-git') ||
70
+ domain.includes('moonui-') ||
71
+ process.env.MOONUI_SITE === 'true';
72
+
53
73
  const postData = JSON.stringify({
54
74
  licenseKey,
55
- domain: process.env.VERCEL_URL || process.env.DEPLOY_URL || 'unknown',
56
- environment: 'production'
75
+ domain: isMoonUISite ? 'moonui.dev' : domain,
76
+ environment: 'production',
77
+ isMoonUISite
57
78
  });
58
79
 
59
80
  const options = {
@@ -142,6 +163,24 @@ async function main() {
142
163
 
143
164
  console.log('[MoonUI Pro] Production environment detected, checking license...');
144
165
 
166
+ // Special case: moonui.dev site itself always has Pro access
167
+ const vercelUrl = process.env.VERCEL_URL || process.env.VERCEL_PROJECT_PRODUCTION_URL || '';
168
+ if (vercelUrl.includes('moonui.dev') || vercelUrl.includes('moonui-git') ||
169
+ process.env.MOONUI_SITE === 'true') {
170
+ console.log('[MoonUI Pro] MoonUI site detected - granting Pro access');
171
+ const token = {
172
+ valid: true,
173
+ hasProAccess: true,
174
+ plan: 'lifetime',
175
+ expiresAt: Date.now() + CACHE_DURATION,
176
+ domain: 'moonui.dev',
177
+ timestamp: Date.now()
178
+ };
179
+ saveLicenseToken(token);
180
+ console.log('[MoonUI Pro] ✓ Pro features enabled for moonui.dev');
181
+ return;
182
+ }
183
+
145
184
  // Check for license key in environment variables
146
185
  const licenseKey = process.env.MOONUI_LICENSE_KEY ||
147
186
  process.env.NEXT_PUBLIC_MOONUI_LICENSE_KEY ||