@moontra/moonui-pro 2.31.1 → 2.31.3

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
@@ -4,7 +4,7 @@ import { twMerge } from 'tailwind-merge';
4
4
  import * as t from 'react';
5
5
  import t__default, { useState, useMemo, useCallback, useRef, useEffect, forwardRef, createContext, useContext, useLayoutEffect, useDebugValue, Component } from 'react';
6
6
  import * as AccordionPrimitive2 from '@radix-ui/react-accordion';
7
- import { Loader2, Play, ExternalLink, ChevronDown, Info, AlertCircle, AlertTriangle, Check, X, MoreHorizontal, Minus, Clock, ChevronUp, Search, Mic, MicOff, Settings, RefreshCw, Zap, ChevronRight, Crown, Circle, Lock, ChevronLeft, Plus, Sparkles, ZoomOut, ZoomIn, Pause, VolumeX, Volume2, Download, Maximize2, Filter, Image as Image$1, Video, RotateCw, Minimize2, BarChart3, Menu, Bell, CheckCheck, CheckCircle, Palette, User, Settings2, LogOut, Edit3, LayoutGrid, Upload, Share2, Save, Phone, Globe, Eye, CheckCircle2, RotateCcw, Copy, Share, Trash2, CreditCard, XCircle, HelpCircle, Bold as Bold$1, Italic as Italic$1, Underline as Underline$1, Strikethrough, AlignLeft, AlignCenter, AlignRight, AlignJustify, List, ListOrdered, Quote, Code as Code$1, Link as Link$1, Undo, Redo, Edit, GripVertical, Type, Heading1, Heading2, Heading3, CheckSquare, Highlighter, Link2, Table as Table$1, Wand2, Maximize, FileText, Briefcase, MessageSquare, Heart, GraduationCap, Languages, Lightbulb, MoreVertical, TrendingUp, Activity, BellOff, Target, ArrowUpRight, ArrowDownRight, CalendarIcon, MapPin, Navigation, ArrowUp, ArrowDown, ArrowUpDown, Calendar as Calendar$1, DollarSign, Users, Map as Map$1, Music, Archive, File, FileSpreadsheet, FileJson, FileDown, ChevronsLeft, ChevronsRight, Star, Shield, Award, Gem, Flame, TrendingDown, Repeat, Move, EyeOff, Timer, Square, Cpu, GitBranch, ArrowRight, Trash, MessageCircle, Paperclip, Printer, Grip, Unlock, Github, Server, Monitor, MemoryStick, HardDrive, Network, Columns, PlusCircle, Pin, Sun, Moon, Home, Send, Tag, Flag, Trophy, ShoppingBag, Wifi, WifiOff, Thermometer, GitFork, Package, PoundSterling, Euro, Database, ShoppingCart } from 'lucide-react';
7
+ import { Loader2, Play, ExternalLink, ChevronDown, Info, AlertCircle, AlertTriangle, Check, X, MoreHorizontal, Minus, Clock, ChevronUp, Search, Mic, MicOff, Settings, RefreshCw, Zap, ChevronRight, Crown, Circle, ChevronLeft, Plus, Lock, Sparkles, ZoomOut, ZoomIn, Pause, VolumeX, Volume2, Download, Maximize2, Filter, Image as Image$1, Video, RotateCw, Minimize2, BarChart3, Menu, Bell, CheckCheck, CheckCircle, Palette, User, Settings2, LogOut, Edit3, LayoutGrid, Upload, Share2, Save, Phone, Globe, Eye, CheckCircle2, RotateCcw, Copy, Share, Trash2, CreditCard, XCircle, HelpCircle, Bold as Bold$1, Italic as Italic$1, Underline as Underline$1, Strikethrough, AlignLeft, AlignCenter, AlignRight, AlignJustify, List, ListOrdered, Quote, Code as Code$1, Link as Link$1, Undo, Redo, Edit, GripVertical, Type, Heading1, Heading2, Heading3, CheckSquare, Highlighter, Link2, Table as Table$1, Wand2, Maximize, FileText, Briefcase, MessageSquare, Heart, GraduationCap, Languages, Lightbulb, MoreVertical, TrendingUp, Activity, BellOff, Target, ArrowUpRight, ArrowDownRight, CalendarIcon, MapPin, Navigation, ArrowUp, ArrowDown, ArrowUpDown, Calendar as Calendar$1, DollarSign, Users, Map as Map$1, Music, Archive, File, FileSpreadsheet, FileJson, FileDown, ChevronsLeft, ChevronsRight, Star, Shield, Award, Gem, Flame, TrendingDown, Repeat, Move, EyeOff, Timer, Square, Cpu, GitBranch, ArrowRight, Trash, MessageCircle, Paperclip, Printer, Grip, Unlock, Github, Server, Monitor, MemoryStick, HardDrive, Network, Columns, PlusCircle, Pin, Sun, Moon, Home, Send, Tag, Flag, Trophy, ShoppingBag, Wifi, WifiOff, Thermometer, GitFork, Package, PoundSterling, Euro, Database, ShoppingCart } from 'lucide-react';
8
8
  import { cva } from 'class-variance-authority';
9
9
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
10
10
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
@@ -4738,17 +4738,22 @@ function useSubscription() {
4738
4738
  useEffect(() => {
4739
4739
  const checkLicense = async () => {
4740
4740
  try {
4741
+ console.log("[MoonUI Pro] Starting license check...");
4742
+ console.log("[MoonUI Pro] Environment:", "development");
4741
4743
  const cached = localStorage.getItem(CACHE_KEY);
4742
4744
  if (cached) {
4743
4745
  const cacheData = JSON.parse(cached);
4744
4746
  const now = Date.now();
4747
+ console.log("[MoonUI Pro] Cache found:", cacheData);
4745
4748
  if (now - cacheData.timestamp < CACHE_DURATION) {
4749
+ console.log("[MoonUI Pro] Using valid cache");
4746
4750
  setHasProAccess(cacheData.valid && cacheData.hasLifetimeAccess);
4747
4751
  setIsAuthenticated(cacheData.valid);
4748
4752
  setIsLoading(false);
4749
4753
  return;
4750
4754
  }
4751
4755
  if (now - cacheData.timestamp < OFFLINE_GRACE_PERIOD) {
4756
+ console.log("[MoonUI Pro] Cache expired but within grace period");
4752
4757
  validateLicense().catch(() => {
4753
4758
  setHasProAccess(cacheData.valid && cacheData.hasLifetimeAccess);
4754
4759
  setIsAuthenticated(cacheData.valid);
@@ -4757,9 +4762,10 @@ function useSubscription() {
4757
4762
  return;
4758
4763
  }
4759
4764
  }
4765
+ console.log("[MoonUI Pro] No valid cache, validating license...");
4760
4766
  await validateLicense();
4761
4767
  } catch (error) {
4762
- console.error("License check error:", error);
4768
+ console.error("[MoonUI Pro] License check error:", error);
4763
4769
  setHasProAccess(false);
4764
4770
  setIsAuthenticated(false);
4765
4771
  } finally {
@@ -4769,11 +4775,29 @@ function useSubscription() {
4769
4775
  checkLicense();
4770
4776
  }, []);
4771
4777
  const getAuthToken = async () => {
4778
+ const isDevelopment = true;
4779
+ const isProduction = false;
4780
+ console.log("[MoonUI Pro] Getting auth token, isDevelopment:", isDevelopment, "isProduction:", isProduction);
4772
4781
  {
4773
4782
  if (typeof window !== "undefined") {
4774
4783
  const browserToken = localStorage.getItem("moonui_auth_token");
4775
- if (browserToken)
4784
+ if (browserToken) {
4785
+ console.log("[MoonUI Pro] Found browser token");
4776
4786
  return browserToken;
4787
+ }
4788
+ try {
4789
+ const response = await fetch("/api/moonui/check-cli-auth");
4790
+ if (response.ok) {
4791
+ const data = await response.json();
4792
+ console.log("[MoonUI Pro] CLI auth check response:", data);
4793
+ if (data.authenticated) {
4794
+ console.log("[MoonUI Pro] CLI authenticated via API");
4795
+ return "cli-authenticated";
4796
+ }
4797
+ }
4798
+ } catch (error) {
4799
+ console.log("[MoonUI Pro] CLI auth check via API failed:", error);
4800
+ }
4777
4801
  }
4778
4802
  if (typeof window === "undefined") {
4779
4803
  try {
@@ -4782,23 +4806,29 @@ function useSubscription() {
4782
4806
  const os2 = __require("os");
4783
4807
  const authPath = path.join(os2.homedir(), ".moonui", "auth.encrypted");
4784
4808
  if (fs.existsSync(authPath)) {
4809
+ console.log("[MoonUI Pro] CLI authenticated (server-side)");
4785
4810
  return "cli-authenticated";
4786
4811
  }
4787
4812
  } catch (error) {
4788
- console.debug("CLI auth check failed:", error);
4813
+ console.debug("[MoonUI Pro] Server-side CLI auth check failed:", error);
4789
4814
  }
4790
4815
  }
4791
4816
  }
4792
- return process.env.NEXT_PUBLIC_MOONUI_AUTH_TOKEN || process.env.MOONUI_LICENSE_KEY || null;
4817
+ const envToken = process.env.NEXT_PUBLIC_MOONUI_AUTH_TOKEN || process.env.MOONUI_LICENSE_KEY || null;
4818
+ console.log("[MoonUI Pro] Fallback env token:", envToken ? "found" : "not found");
4819
+ return envToken;
4793
4820
  };
4794
4821
  const validateLicense = async () => {
4795
4822
  const token = await getAuthToken();
4823
+ console.log("[MoonUI Pro] Validating license with token:", token ? token.substring(0, 20) + "..." : "null");
4796
4824
  if (!token) {
4825
+ console.log("[MoonUI Pro] No token found, denying access");
4797
4826
  setHasProAccess(false);
4798
4827
  setIsAuthenticated(false);
4799
4828
  return;
4800
4829
  }
4801
4830
  if (token === "cli-authenticated") {
4831
+ console.log("[MoonUI Pro] CLI authenticated, granting access");
4802
4832
  setHasProAccess(true);
4803
4833
  setIsAuthenticated(true);
4804
4834
  if (typeof window !== "undefined") {
@@ -4808,6 +4838,7 @@ function useSubscription() {
4808
4838
  timestamp: Date.now()
4809
4839
  };
4810
4840
  localStorage.setItem(CACHE_KEY, JSON.stringify(cacheData));
4841
+ console.log("[MoonUI Pro] Cached CLI auth");
4811
4842
  }
4812
4843
  return;
4813
4844
  }
@@ -4860,6 +4891,75 @@ function useSubscription() {
4860
4891
  }
4861
4892
  };
4862
4893
  }
4894
+ function ProLockScreen({
4895
+ componentName = "Pro Component",
4896
+ className,
4897
+ compact = false
4898
+ }) {
4899
+ if (compact) {
4900
+ return /* @__PURE__ */ jsxs("div", { className: cn(
4901
+ "flex flex-col items-center justify-center p-4 text-center",
4902
+ "rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-700",
4903
+ "bg-gray-50/50 dark:bg-gray-900/50",
4904
+ className
4905
+ ), children: [
4906
+ /* @__PURE__ */ jsx(Lock, { className: "h-8 w-8 text-gray-400 dark:text-gray-600 mb-2" }),
4907
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: "CLI Authentication Required" }),
4908
+ /* @__PURE__ */ jsx(
4909
+ "a",
4910
+ {
4911
+ href: "https://moonui.dev/docs/cli#authentication" ,
4912
+ target: "_blank",
4913
+ rel: "noopener noreferrer",
4914
+ className: "text-xs text-primary hover:underline font-medium mt-1",
4915
+ children: "Setup CLI Auth \u2192"
4916
+ }
4917
+ )
4918
+ ] });
4919
+ }
4920
+ return /* @__PURE__ */ jsxs("div", { className: cn(
4921
+ "flex flex-col items-center justify-center",
4922
+ "rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-700",
4923
+ "bg-gradient-to-b from-gray-50 to-gray-100/50 dark:from-gray-900 dark:to-gray-950/50",
4924
+ "p-8 text-center min-h-[200px]",
4925
+ className
4926
+ ), children: [
4927
+ /* @__PURE__ */ jsxs("div", { className: "relative", children: [
4928
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-primary/20 blur-xl rounded-full" }),
4929
+ /* @__PURE__ */ jsx(Lock, { className: "relative h-12 w-12 text-gray-400 dark:text-gray-600 mb-4" })
4930
+ ] }),
4931
+ /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold mb-2", children: componentName }),
4932
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400 mb-4 max-w-sm", children: "CLI authentication required to access Pro components" }),
4933
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
4934
+ /* @__PURE__ */ jsxs(
4935
+ "a",
4936
+ {
4937
+ href: "https://moonui.dev/docs/cli#authentication" ,
4938
+ target: "_blank",
4939
+ rel: "noopener noreferrer",
4940
+ className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",
4941
+ children: [
4942
+ /* @__PURE__ */ jsx(Lock, { className: "h-3 w-3" }),
4943
+ "Setup CLI Authentication"
4944
+ ]
4945
+ }
4946
+ ),
4947
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
4948
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: "Run: moonui login" }),
4949
+ /* @__PURE__ */ jsx(
4950
+ "a",
4951
+ {
4952
+ href: "https://moonui.dev/pricing",
4953
+ target: "_blank",
4954
+ rel: "noopener noreferrer",
4955
+ className: "text-xs text-primary hover:underline",
4956
+ children: "View Pro Plans \u2192"
4957
+ }
4958
+ )
4959
+ ] })
4960
+ ] })
4961
+ ] });
4962
+ }
4863
4963
  var defaultColors = [
4864
4964
  "#000000",
4865
4965
  "#374151",
@@ -4899,19 +4999,13 @@ var MoonUIColorPickerPro = ({
4899
4999
  lg: "w-10 h-10"
4900
5000
  };
4901
5001
  if (!isLoading && !hasProAccess) {
4902
- return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-700 p-8 text-center", children: [
4903
- /* @__PURE__ */ jsx(Lock, { className: "mx-auto h-12 w-12 text-gray-400 dark:text-gray-600 mb-4" }),
4904
- /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold mb-2", children: "Pro Component" }),
4905
- /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400 mb-4", children: "Please login with CLI: moonui login" }),
4906
- /* @__PURE__ */ jsx(
4907
- "a",
4908
- {
4909
- href: "https://moonui.dev/pricing",
4910
- className: "text-primary hover:underline text-sm font-medium",
4911
- children: "Get Pro Access \u2192"
4912
- }
4913
- )
4914
- ] });
5002
+ return /* @__PURE__ */ jsx(
5003
+ ProLockScreen,
5004
+ {
5005
+ componentName: "Color Picker",
5006
+ compact: true
5007
+ }
5008
+ );
4915
5009
  }
4916
5010
  return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
4917
5011
  showInput && /* @__PURE__ */ jsxs("div", { className: "flex gap-2 items-center", children: [
@@ -8363,19 +8457,13 @@ var MoonUITabsPro = t.forwardRef(({
8363
8457
  }
8364
8458
  };
8365
8459
  if (!isLoading && !hasProAccess) {
8366
- return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-700 p-8 text-center", children: [
8367
- /* @__PURE__ */ jsx(Lock, { className: "mx-auto h-12 w-12 text-gray-400 dark:text-gray-600 mb-4" }),
8368
- /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold mb-2", children: "Pro Component" }),
8369
- /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400 mb-4", children: "Please login with CLI: moonui login" }),
8370
- /* @__PURE__ */ jsx(
8371
- "a",
8372
- {
8373
- href: "https://moonui.dev/pricing",
8374
- className: "text-primary hover:underline text-sm font-medium",
8375
- children: "Get Pro Access \u2192"
8376
- }
8377
- )
8378
- ] });
8460
+ return /* @__PURE__ */ jsx(
8461
+ ProLockScreen,
8462
+ {
8463
+ componentName: "Tabs Pro",
8464
+ compact: true
8465
+ }
8466
+ );
8379
8467
  }
8380
8468
  return /* @__PURE__ */ jsxs("div", { className: cn(
8381
8469
  "relative w-full",
@@ -13242,19 +13330,13 @@ function LightboxProvider({ children, items = [], defaultIndex = 0 }) {
13242
13330
  [items, currentIndex, isOpen, zoom]
13243
13331
  );
13244
13332
  if (!isLoading && !hasProAccess) {
13245
- return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-700 p-8 text-center", children: [
13246
- /* @__PURE__ */ jsx(Lock, { className: "mx-auto h-12 w-12 text-gray-400 dark:text-gray-600 mb-4" }),
13247
- /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold mb-2", children: "Pro Component" }),
13248
- /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400 mb-4", children: "Please login with CLI: moonui login" }),
13249
- /* @__PURE__ */ jsx(
13250
- "a",
13251
- {
13252
- href: "https://moonui.dev/pricing",
13253
- className: "text-primary hover:underline text-sm font-medium",
13254
- children: "Get Pro Access \u2192"
13255
- }
13256
- )
13257
- ] });
13333
+ return /* @__PURE__ */ jsx(
13334
+ ProLockScreen,
13335
+ {
13336
+ componentName: "Lightbox",
13337
+ compact: true
13338
+ }
13339
+ );
13258
13340
  }
13259
13341
  return /* @__PURE__ */ jsx(LightboxContext.Provider, { value, children });
13260
13342
  }
@@ -13913,19 +13995,13 @@ var MoonUIMediaGalleryPro = t.forwardRef(({
13913
13995
  };
13914
13996
  const renderSkeleton = () => /* @__PURE__ */ jsx("div", { className: cn(galleryItemVariants({ variant, aspectRatio })), children: /* @__PURE__ */ jsx("div", { className: "w-full h-full bg-muted animate-pulse" }) });
13915
13997
  if (!isLoading && !hasProAccess) {
13916
- return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-700 p-8 text-center", children: [
13917
- /* @__PURE__ */ jsx(Lock, { className: "mx-auto h-12 w-12 text-gray-400 dark:text-gray-600 mb-4" }),
13918
- /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold mb-2", children: "Pro Component" }),
13919
- /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400 mb-4", children: "Please login with CLI: moonui login" }),
13920
- /* @__PURE__ */ jsx(
13921
- "a",
13922
- {
13923
- href: "https://moonui.dev/pricing",
13924
- className: "text-primary hover:underline text-sm font-medium",
13925
- children: "Get Pro Access \u2192"
13926
- }
13927
- )
13928
- ] });
13998
+ return /* @__PURE__ */ jsx(
13999
+ ProLockScreen,
14000
+ {
14001
+ componentName: "Media Gallery",
14002
+ compact: true
14003
+ }
14004
+ );
13929
14005
  }
13930
14006
  const galleryContent = /* @__PURE__ */ jsxs(Fragment, { children: [
13931
14007
  (enableFiltering || enableSorting) && /* @__PURE__ */ jsxs("div", { className: "mb-6", children: [
@@ -14295,19 +14371,13 @@ function DraggableList({
14295
14371
  return null;
14296
14372
  };
14297
14373
  if (!isLoading && !hasProAccess) {
14298
- return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-700 p-8 text-center", children: [
14299
- /* @__PURE__ */ jsx(Lock, { className: "mx-auto h-12 w-12 text-gray-400 dark:text-gray-600 mb-4" }),
14300
- /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold mb-2", children: "Pro Component" }),
14301
- /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400 mb-4", children: "Please login with CLI: moonui login" }),
14302
- /* @__PURE__ */ jsx(
14303
- "a",
14304
- {
14305
- href: "https://moonui.dev/pricing",
14306
- className: "text-primary hover:underline text-sm font-medium",
14307
- children: "Get Pro Access \u2192"
14308
- }
14309
- )
14310
- ] });
14374
+ return /* @__PURE__ */ jsx(
14375
+ ProLockScreen,
14376
+ {
14377
+ componentName: "Draggable List",
14378
+ compact: true
14379
+ }
14380
+ );
14311
14381
  }
14312
14382
  return /* @__PURE__ */ jsxs(
14313
14383
  "div",
@@ -17297,17 +17367,13 @@ function CalendarInternal({
17297
17367
  function Calendar3(props) {
17298
17368
  const { hasProAccess, isLoading } = useSubscription();
17299
17369
  if (!isLoading && !hasProAccess) {
17300
- return /* @__PURE__ */ jsx(MoonUICardPro, { className: cn("w-full", props.className), children: /* @__PURE__ */ jsx(MoonUICardContentPro, { className: "py-12 text-center", children: /* @__PURE__ */ jsxs("div", { className: "max-w-md mx-auto space-y-4", children: [
17301
- /* @__PURE__ */ jsx("div", { className: "rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto", children: /* @__PURE__ */ jsx(Lock, { className: "h-6 w-6 text-purple-600 dark:text-purple-400" }) }),
17302
- /* @__PURE__ */ jsxs("div", { children: [
17303
- /* @__PURE__ */ jsx("h3", { className: "font-semibold text-lg mb-2", children: "Pro Feature" }),
17304
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm mb-4", children: "Advanced Calendar is available exclusively to MoonUI Pro subscribers." }),
17305
- /* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
17306
- /* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
17307
- "Upgrade to Pro"
17308
- ] }) })
17309
- ] })
17310
- ] }) }) });
17370
+ return /* @__PURE__ */ jsx(
17371
+ ProLockScreen,
17372
+ {
17373
+ componentName: "Advanced Calendar",
17374
+ className: cn("w-full", props.className)
17375
+ }
17376
+ );
17311
17377
  }
17312
17378
  return /* @__PURE__ */ jsx(CalendarInternal, { ...props });
17313
17379
  }
@@ -58472,17 +58538,13 @@ function RichTextEditor({
58472
58538
  }) {
58473
58539
  const { hasProAccess, isLoading } = useSubscription();
58474
58540
  if (!isLoading && !hasProAccess) {
58475
- return /* @__PURE__ */ jsx(MoonUICardPro, { className: cn("w-full", className), children: /* @__PURE__ */ jsx(MoonUICardContentPro, { className: "py-12 text-center", children: /* @__PURE__ */ jsxs("div", { className: "max-w-md mx-auto space-y-4", children: [
58476
- /* @__PURE__ */ jsx("div", { className: "rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto", children: /* @__PURE__ */ jsx(Lock, { className: "h-6 w-6 text-purple-600 dark:text-purple-400" }) }),
58477
- /* @__PURE__ */ jsxs("div", { children: [
58478
- /* @__PURE__ */ jsx("h3", { className: "font-semibold text-lg mb-2", children: "Pro Feature" }),
58479
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm mb-4", children: "Advanced Rich Text Editor is available exclusively to MoonUI Pro subscribers." }),
58480
- /* @__PURE__ */ jsx("div", { className: "flex gap-3 justify-center", children: /* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
58481
- /* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
58482
- "Upgrade to Pro"
58483
- ] }) }) })
58484
- ] })
58485
- ] }) }) });
58541
+ return /* @__PURE__ */ jsx(
58542
+ ProLockScreen,
58543
+ {
58544
+ componentName: "Advanced Rich Text Editor",
58545
+ className: cn("w-full", className)
58546
+ }
58547
+ );
58486
58548
  }
58487
58549
  const [aiSettings, setAiSettings] = useState(() => {
58488
58550
  if (persistAISettings && typeof window !== "undefined") {
@@ -63508,16 +63570,13 @@ function AdvancedChartInternal({
63508
63570
  function AdvancedChart(props) {
63509
63571
  const { hasProAccess } = useSubscription();
63510
63572
  if (!hasProAccess) {
63511
- return /* @__PURE__ */ jsx(MoonUICardPro, { className: "w-full", children: /* @__PURE__ */ jsxs(MoonUICardContentPro, { className: "flex flex-col items-center justify-center py-12", children: [
63512
- /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 mb-4", children: /* @__PURE__ */ jsx(Lock, { className: "w-8 h-8 text-primary" }) }),
63513
- /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold text-center mb-2", children: "Advanced Chart - Pro Feature" }),
63514
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-center text-sm mb-6 max-w-sm", children: "Professional chart component with advanced features like animations, themes, and interactive controls requires a Pro subscription." }),
63515
- /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxs(MoonUIBadgePro, { variant: "secondary", className: "bg-gradient-to-r from-purple-500/10 to-pink-500/10 text-purple-700 dark:text-purple-300", children: [
63516
- /* @__PURE__ */ jsx(Sparkles, { className: "w-3 h-3 mr-1" }),
63517
- "Pro Feature"
63518
- ] }) }),
63519
- /* @__PURE__ */ jsx(MoonUIButtonPro, { className: "mt-4", size: "sm", children: "Upgrade to Pro" })
63520
- ] }) });
63573
+ return /* @__PURE__ */ jsx(
63574
+ ProLockScreen,
63575
+ {
63576
+ componentName: "Advanced Chart",
63577
+ className: "w-full"
63578
+ }
63579
+ );
63521
63580
  }
63522
63581
  return /* @__PURE__ */ jsx(AdvancedChartInternal, { ...props });
63523
63582
  }
@@ -66988,17 +67047,13 @@ var DashboardInternal = t__default.memo(function DashboardInternal2({
66988
67047
  var Dashboard = t__default.memo(function Dashboard2(props) {
66989
67048
  const { hasProAccess, isLoading } = useSubscription();
66990
67049
  if (!isLoading && !hasProAccess) {
66991
- return /* @__PURE__ */ jsx(MoonUICardPro, { className: cn("w-full", props.className), children: /* @__PURE__ */ jsx(MoonUICardContentPro, { className: "py-12 text-center", children: /* @__PURE__ */ jsxs("div", { className: "max-w-md mx-auto space-y-4", children: [
66992
- /* @__PURE__ */ jsx("div", { className: "rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto", children: /* @__PURE__ */ jsx(Lock, { className: "h-6 w-6 text-purple-600 dark:text-purple-400" }) }),
66993
- /* @__PURE__ */ jsxs("div", { children: [
66994
- /* @__PURE__ */ jsx("h3", { className: "font-semibold text-lg mb-2", children: "Pro Feature" }),
66995
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm mb-4", children: "Dashboard is available exclusively to MoonUI Pro subscribers." }),
66996
- /* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
66997
- /* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
66998
- "Upgrade to Pro"
66999
- ] }) })
67000
- ] })
67001
- ] }) }) });
67050
+ return /* @__PURE__ */ jsx(
67051
+ ProLockScreen,
67052
+ {
67053
+ componentName: "Dashboard",
67054
+ className: cn("w-full", props.className)
67055
+ }
67056
+ );
67002
67057
  }
67003
67058
  return /* @__PURE__ */ jsx(DashboardInternal, { ...props });
67004
67059
  });
@@ -74128,17 +74183,13 @@ function DataTable({
74128
74183
  }, [originalColumns]);
74129
74184
  const { hasProAccess, isLoading } = useSubscription();
74130
74185
  if (!isLoading && !hasProAccess) {
74131
- return /* @__PURE__ */ jsx(MoonUICardPro, { className: cn("w-full", className), children: /* @__PURE__ */ jsx(MoonUICardContentPro, { className: "py-12 text-center", children: /* @__PURE__ */ jsxs("div", { className: "max-w-md mx-auto space-y-4", children: [
74132
- /* @__PURE__ */ jsx("div", { className: "rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto", children: /* @__PURE__ */ jsx(Lock, { className: "h-6 w-6 text-purple-600 dark:text-purple-400" }) }),
74133
- /* @__PURE__ */ jsxs("div", { children: [
74134
- /* @__PURE__ */ jsx("h3", { className: "font-semibold text-lg mb-2", children: "Pro Feature" }),
74135
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm mb-4", children: "Data Table is available exclusively to MoonUI Pro subscribers." }),
74136
- /* @__PURE__ */ jsx("div", { className: "flex gap-3 justify-center", children: /* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
74137
- /* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
74138
- "Upgrade to Pro"
74139
- ] }) }) })
74140
- ] })
74141
- ] }) }) });
74186
+ return /* @__PURE__ */ jsx(
74187
+ ProLockScreen,
74188
+ {
74189
+ componentName: "Data Table",
74190
+ className: cn("w-full", className)
74191
+ }
74192
+ );
74142
74193
  }
74143
74194
  const [sorting, setSorting] = t__default.useState([]);
74144
74195
  const [columnFilters, setColumnFilters] = t__default.useState([]);
@@ -75549,17 +75600,14 @@ function SidebarInternal({
75549
75600
  function Sidebar(props) {
75550
75601
  const { hasProAccess, isLoading } = useSubscription();
75551
75602
  if (!isLoading && !hasProAccess) {
75552
- return /* @__PURE__ */ jsx(MoonUICardPro, { className: cn("w-full max-w-xs", props.className), children: /* @__PURE__ */ jsx(MoonUICardContentPro, { className: "py-12 text-center", children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
75553
- /* @__PURE__ */ jsx("div", { className: "rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto", children: /* @__PURE__ */ jsx(Lock, { className: "h-6 w-6 text-purple-600 dark:text-purple-400" }) }),
75554
- /* @__PURE__ */ jsxs("div", { children: [
75555
- /* @__PURE__ */ jsx("h3", { className: "font-semibold text-lg mb-2", children: "Pro Feature" }),
75556
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm mb-4", children: "Advanced Sidebar is available exclusively to MoonUI Pro subscribers." }),
75557
- /* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
75558
- /* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
75559
- "Upgrade to Pro"
75560
- ] }) })
75561
- ] })
75562
- ] }) }) });
75603
+ return /* @__PURE__ */ jsx(
75604
+ ProLockScreen,
75605
+ {
75606
+ componentName: "Advanced Sidebar",
75607
+ compact: true,
75608
+ className: cn("w-full max-w-xs", props.className)
75609
+ }
75610
+ );
75563
75611
  }
75564
75612
  return /* @__PURE__ */ jsx(SidebarInternal, { ...props });
75565
75613
  }
@@ -76423,17 +76471,13 @@ function NavbarInternal({
76423
76471
  function Navbar(props) {
76424
76472
  const { hasProAccess, isLoading } = useSubscription();
76425
76473
  if (!isLoading && !hasProAccess) {
76426
- return /* @__PURE__ */ jsx(MoonUICardPro, { className: cn("w-full", props.className), children: /* @__PURE__ */ jsx(MoonUICardContentPro, { className: "py-8 text-center", children: /* @__PURE__ */ jsxs("div", { className: "max-w-md mx-auto space-y-4", children: [
76427
- /* @__PURE__ */ jsx("div", { className: "rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto", children: /* @__PURE__ */ jsx(Lock, { className: "h-6 w-6 text-purple-600 dark:text-purple-400" }) }),
76428
- /* @__PURE__ */ jsxs("div", { children: [
76429
- /* @__PURE__ */ jsx("h3", { className: "font-semibold text-lg mb-2", children: "Pro Feature" }),
76430
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm mb-4", children: "Advanced Navbar is available exclusively to MoonUI Pro subscribers." }),
76431
- /* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
76432
- /* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
76433
- "Upgrade to Pro"
76434
- ] }) })
76435
- ] })
76436
- ] }) }) });
76474
+ return /* @__PURE__ */ jsx(
76475
+ ProLockScreen,
76476
+ {
76477
+ componentName: "Advanced Navbar",
76478
+ className: cn("w-full", props.className)
76479
+ }
76480
+ );
76437
76481
  }
76438
76482
  return /* @__PURE__ */ jsx(NavbarInternal, { ...props });
76439
76483
  }
@@ -85757,19 +85801,13 @@ var MoonUIAvatarGroupPro2 = t.forwardRef(({ children, max: max2 = 4, size: size4
85757
85801
  loose: "-space-x-1"
85758
85802
  };
85759
85803
  if (!isCheckingAuth && !hasProAccess) {
85760
- return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-700 p-8 text-center", children: [
85761
- /* @__PURE__ */ jsx(Lock, { className: "mx-auto h-12 w-12 text-gray-400 dark:text-gray-600 mb-4" }),
85762
- /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold mb-2", children: "Pro Component" }),
85763
- /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400 mb-4", children: "Please login with CLI: moonui login" }),
85764
- /* @__PURE__ */ jsx(
85765
- "a",
85766
- {
85767
- href: "https://moonui.dev/pricing",
85768
- className: "text-primary hover:underline text-sm font-medium",
85769
- children: "Get Pro Access \u2192"
85770
- }
85771
- )
85772
- ] });
85804
+ return /* @__PURE__ */ jsx(
85805
+ ProLockScreen,
85806
+ {
85807
+ componentName: "Avatar Pro",
85808
+ compact: true
85809
+ }
85810
+ );
85773
85811
  }
85774
85812
  return /* @__PURE__ */ jsxs(
85775
85813
  "div",
@@ -85819,19 +85857,13 @@ var MoonUIAsyncAvatarPro = t.forwardRef(({ userId, fetchUser, ...props }, ref) =
85819
85857
  }
85820
85858
  }, [userId, fetchUser]);
85821
85859
  if (!isCheckingAuth && !hasProAccess) {
85822
- return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-700 p-8 text-center", children: [
85823
- /* @__PURE__ */ jsx(Lock, { className: "mx-auto h-12 w-12 text-gray-400 dark:text-gray-600 mb-4" }),
85824
- /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold mb-2", children: "Pro Component" }),
85825
- /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400 mb-4", children: "Please login with CLI: moonui login" }),
85826
- /* @__PURE__ */ jsx(
85827
- "a",
85828
- {
85829
- href: "https://moonui.dev/pricing",
85830
- className: "text-primary hover:underline text-sm font-medium",
85831
- children: "Get Pro Access \u2192"
85832
- }
85833
- )
85834
- ] });
85860
+ return /* @__PURE__ */ jsx(
85861
+ ProLockScreen,
85862
+ {
85863
+ componentName: "Avatar Pro",
85864
+ compact: true
85865
+ }
85866
+ );
85835
85867
  }
85836
85868
  return /* @__PURE__ */ jsx(
85837
85869
  MoonUIAvatarPro2,
@@ -86179,19 +86211,13 @@ function KPIWidget({
86179
86211
  );
86180
86212
  };
86181
86213
  if (!isLoading && !hasProAccess) {
86182
- return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-700 p-8 text-center", children: [
86183
- /* @__PURE__ */ jsx(Lock, { className: "mx-auto h-12 w-12 text-gray-400 dark:text-gray-600 mb-4" }),
86184
- /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold mb-2", children: "Pro Component" }),
86185
- /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400 mb-4", children: "Please login with CLI: moonui login" }),
86186
- /* @__PURE__ */ jsx(
86187
- "a",
86188
- {
86189
- href: "https://moonui.dev/pricing",
86190
- className: "text-primary hover:underline text-sm font-medium",
86191
- children: "Get Pro Access \u2192"
86192
- }
86193
- )
86194
- ] });
86214
+ return /* @__PURE__ */ jsx(
86215
+ ProLockScreen,
86216
+ {
86217
+ componentName: "KPI Widget",
86218
+ compact: true
86219
+ }
86220
+ );
86195
86221
  }
86196
86222
  return /* @__PURE__ */ jsx(
86197
86223
  WidgetBase,
@@ -86591,19 +86617,13 @@ function ChartWidget2({
86591
86617
  }
86592
86618
  };
86593
86619
  if (!isLoading && !hasProAccess) {
86594
- return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-700 p-8 text-center", children: [
86595
- /* @__PURE__ */ jsx(Lock, { className: "mx-auto h-12 w-12 text-gray-400 dark:text-gray-600 mb-4" }),
86596
- /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold mb-2", children: "Pro Component" }),
86597
- /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400 mb-4", children: "Please login with CLI: moonui login" }),
86598
- /* @__PURE__ */ jsx(
86599
- "a",
86600
- {
86601
- href: "https://moonui.dev/pricing",
86602
- className: "text-primary hover:underline text-sm font-medium",
86603
- children: "Get Pro Access \u2192"
86604
- }
86605
- )
86606
- ] });
86620
+ return /* @__PURE__ */ jsx(
86621
+ ProLockScreen,
86622
+ {
86623
+ componentName: "Chart Widget",
86624
+ compact: true
86625
+ }
86626
+ );
86607
86627
  }
86608
86628
  return /* @__PURE__ */ jsx(
86609
86629
  WidgetBase,
@@ -86915,19 +86935,13 @@ function GaugeWidget({
86915
86935
  }
86916
86936
  };
86917
86937
  if (!isLoading && !hasProAccess) {
86918
- return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-700 p-8 text-center", children: [
86919
- /* @__PURE__ */ jsx(Lock, { className: "mx-auto h-12 w-12 text-gray-400 dark:text-gray-600 mb-4" }),
86920
- /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold mb-2", children: "Pro Component" }),
86921
- /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400 mb-4", children: "Please login with CLI: moonui login" }),
86922
- /* @__PURE__ */ jsx(
86923
- "a",
86924
- {
86925
- href: "https://moonui.dev/pricing",
86926
- className: "text-primary hover:underline text-sm font-medium",
86927
- children: "Get Pro Access \u2192"
86928
- }
86929
- )
86930
- ] });
86938
+ return /* @__PURE__ */ jsx(
86939
+ ProLockScreen,
86940
+ {
86941
+ componentName: "Gauge Widget",
86942
+ compact: true
86943
+ }
86944
+ );
86931
86945
  }
86932
86946
  return /* @__PURE__ */ jsx(
86933
86947
  WidgetBase,
@@ -87261,19 +87275,13 @@ function FunnelWidget({
87261
87275
  }
87262
87276
  };
87263
87277
  if (!isLoading && !hasProAccess) {
87264
- return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-700 p-8 text-center", children: [
87265
- /* @__PURE__ */ jsx(Lock, { className: "mx-auto h-12 w-12 text-gray-400 dark:text-gray-600 mb-4" }),
87266
- /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold mb-2", children: "Pro Component" }),
87267
- /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400 mb-4", children: "Please login with CLI: moonui login" }),
87268
- /* @__PURE__ */ jsx(
87269
- "a",
87270
- {
87271
- href: "https://moonui.dev/pricing",
87272
- className: "text-primary hover:underline text-sm font-medium",
87273
- children: "Get Pro Access \u2192"
87274
- }
87275
- )
87276
- ] });
87278
+ return /* @__PURE__ */ jsx(
87279
+ ProLockScreen,
87280
+ {
87281
+ componentName: "Funnel Widget",
87282
+ compact: true
87283
+ }
87284
+ );
87277
87285
  }
87278
87286
  return /* @__PURE__ */ jsx(
87279
87287
  WidgetBase,
@@ -87736,19 +87744,13 @@ function RevenueWidget({
87736
87744
  }
87737
87745
  };
87738
87746
  if (!isLoading && !hasProAccess) {
87739
- return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-700 p-8 text-center", children: [
87740
- /* @__PURE__ */ jsx(Lock, { className: "mx-auto h-12 w-12 text-gray-400 dark:text-gray-600 mb-4" }),
87741
- /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold mb-2", children: "Pro Component" }),
87742
- /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400 mb-4", children: "Please login with CLI: moonui login" }),
87743
- /* @__PURE__ */ jsx(
87744
- "a",
87745
- {
87746
- href: "https://moonui.dev/pricing",
87747
- className: "text-primary hover:underline text-sm font-medium",
87748
- children: "Get Pro Access \u2192"
87749
- }
87750
- )
87751
- ] });
87747
+ return /* @__PURE__ */ jsx(
87748
+ ProLockScreen,
87749
+ {
87750
+ componentName: "Revenue Widget",
87751
+ compact: true
87752
+ }
87753
+ );
87752
87754
  }
87753
87755
  return /* @__PURE__ */ jsx(
87754
87756
  WidgetBase,
@@ -88131,19 +88133,13 @@ function ServerMonitorWidget({
88131
88133
  }
88132
88134
  };
88133
88135
  if (!isLoading && !hasProAccess) {
88134
- return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-700 p-8 text-center", children: [
88135
- /* @__PURE__ */ jsx(Lock, { className: "mx-auto h-12 w-12 text-gray-400 dark:text-gray-600 mb-4" }),
88136
- /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold mb-2", children: "Pro Component" }),
88137
- /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 dark:text-gray-400 mb-4", children: "Please login with CLI: moonui login" }),
88138
- /* @__PURE__ */ jsx(
88139
- "a",
88140
- {
88141
- href: "https://moonui.dev/pricing",
88142
- className: "text-primary hover:underline text-sm font-medium",
88143
- children: "Get Pro Access \u2192"
88144
- }
88145
- )
88146
- ] });
88136
+ return /* @__PURE__ */ jsx(
88137
+ ProLockScreen,
88138
+ {
88139
+ componentName: "Server Monitor Widget",
88140
+ compact: true
88141
+ }
88142
+ );
88147
88143
  }
88148
88144
  return /* @__PURE__ */ jsx(
88149
88145
  WidgetBase,