@moontra/moonui-pro 2.1.0 → 2.1.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/dist/index.d.ts +790 -0
- package/dist/index.mjs +758 -326
- package/package.json +2 -3
- package/scripts/postinstall.js +144 -66
- package/src/components/advanced-chart/index.tsx +3 -3
- package/src/components/advanced-forms/index.tsx +4 -9
- package/src/components/animated-button/index.tsx +4 -8
- package/src/components/calendar/index.tsx +2 -28
- package/src/components/color-picker/index.tsx +2 -4
- package/src/components/dashboard/index.tsx +3 -3
- package/src/components/data-table/index.tsx +5 -8
- package/src/components/enhanced/badge.tsx +191 -0
- package/src/components/enhanced/button.tsx +7 -5
- package/src/components/enhanced/card.tsx +11 -17
- package/src/components/enhanced/dialog.tsx +26 -28
- package/src/components/enhanced/index.ts +2 -1
- package/src/components/error-boundary/index.tsx +2 -4
- package/src/components/file-upload/index.tsx +3 -5
- package/src/components/floating-action-button/index.tsx +1 -4
- package/src/components/github-stars/index.tsx +4 -6
- package/src/components/health-check/index.tsx +5 -7
- package/src/components/hover-card-3d/index.tsx +3 -6
- package/src/components/kanban/index.tsx +4 -6
- package/src/components/lazy-component/index.tsx +4 -7
- package/src/components/magnetic-button/index.tsx +3 -6
- package/src/components/memory-efficient-data/index.tsx +6 -6
- package/src/components/optimized-image/index.tsx +4 -6
- package/src/components/performance-debugger/index.tsx +8 -10
- package/src/components/performance-monitor/index.tsx +37 -18
- package/src/components/pinch-zoom/index.tsx +2 -4
- package/src/components/rich-text-editor/index-old-backup.tsx +3 -9
- package/src/components/rich-text-editor/index.tsx +75 -10
- package/src/components/rich-text-editor/slash-commands-extension.ts +1 -1
- package/src/components/spotlight-card/index.tsx +1 -4
- package/src/components/swipeable-card/index.tsx +1 -1
- package/src/components/timeline/index.tsx +2 -2
- package/src/components/ui/color-picker.tsx +1 -1
- package/src/components/ui/index.ts +2 -0
- package/src/components/ui/progress.tsx +27 -0
- package/src/components/ui/skeleton.tsx +17 -0
- package/src/components/ui/tooltip.tsx +1 -1
- package/src/components/virtual-list/index.tsx +3 -4
- package/src/hooks/use-chart.ts +2 -2
- package/src/index.ts +0 -3
- package/src/patterns/login-form/types.ts +6 -6
- package/src/use-pro-access.ts +2 -2
- package/src/utils/chart-helpers.ts +1 -1
- package/src/utils/license-guard.tsx +0 -177
- package/src/utils/package-guard.ts +0 -60
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { motion, AnimatePresence } from 'framer-motion'
|
|
3
|
+
import { cva, type VariantProps } from 'class-variance-authority'
|
|
4
|
+
import { cn } from '../../lib/utils'
|
|
5
|
+
|
|
6
|
+
const badgeVariants = cva(
|
|
7
|
+
["inline-flex items-center gap-1.5",
|
|
8
|
+
"font-medium transition-all duration-200",
|
|
9
|
+
"border focus:outline-none",
|
|
10
|
+
"focus-visible:ring-2 focus-visible:ring-offset-1"],
|
|
11
|
+
{
|
|
12
|
+
variants: {
|
|
13
|
+
variant: {
|
|
14
|
+
default: [
|
|
15
|
+
"border-transparent bg-primary text-primary-foreground",
|
|
16
|
+
"hover:bg-primary/90",
|
|
17
|
+
"focus-visible:ring-primary/30",
|
|
18
|
+
],
|
|
19
|
+
secondary: [
|
|
20
|
+
"border-transparent bg-secondary text-secondary-foreground",
|
|
21
|
+
"hover:bg-secondary/80",
|
|
22
|
+
"focus-visible:ring-gray-400/30",
|
|
23
|
+
],
|
|
24
|
+
destructive: [
|
|
25
|
+
"border-transparent bg-destructive text-destructive-foreground",
|
|
26
|
+
"hover:bg-destructive/90",
|
|
27
|
+
"focus-visible:ring-destructive/30",
|
|
28
|
+
],
|
|
29
|
+
outline: [
|
|
30
|
+
"border-input bg-transparent",
|
|
31
|
+
"hover:border-input/80",
|
|
32
|
+
"focus-visible:ring-gray-400/30",
|
|
33
|
+
],
|
|
34
|
+
success: [
|
|
35
|
+
"border-transparent bg-green-500 text-white",
|
|
36
|
+
"hover:bg-green-600",
|
|
37
|
+
"focus-visible:ring-green-500/30",
|
|
38
|
+
],
|
|
39
|
+
warning: [
|
|
40
|
+
"border-transparent bg-yellow-500 text-white",
|
|
41
|
+
"hover:bg-yellow-600",
|
|
42
|
+
"focus-visible:ring-yellow-500/30",
|
|
43
|
+
],
|
|
44
|
+
pro: [
|
|
45
|
+
"border-transparent bg-gradient-to-r from-purple-600 to-pink-600 text-white",
|
|
46
|
+
"hover:from-purple-700 hover:to-pink-700",
|
|
47
|
+
"focus-visible:ring-purple-400/30",
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
size: {
|
|
51
|
+
sm: "h-5 px-2 text-xs",
|
|
52
|
+
default: "h-6 px-3 text-sm",
|
|
53
|
+
lg: "h-8 px-4 text-base",
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
defaultVariants: {
|
|
57
|
+
variant: "default",
|
|
58
|
+
size: "default",
|
|
59
|
+
},
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
export interface BadgeProProps
|
|
64
|
+
extends React.HTMLAttributes<HTMLDivElement>,
|
|
65
|
+
VariantProps<typeof badgeVariants> {
|
|
66
|
+
enablePulse?: boolean
|
|
67
|
+
enableGlow?: boolean
|
|
68
|
+
enableShimmer?: boolean
|
|
69
|
+
removable?: boolean
|
|
70
|
+
onRemove?: () => void
|
|
71
|
+
leftIcon?: React.ReactNode
|
|
72
|
+
rightIcon?: React.ReactNode
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export const BadgePro = React.forwardRef<
|
|
76
|
+
HTMLDivElement,
|
|
77
|
+
BadgeProProps
|
|
78
|
+
>(({
|
|
79
|
+
className,
|
|
80
|
+
variant,
|
|
81
|
+
size,
|
|
82
|
+
enablePulse = false,
|
|
83
|
+
enableGlow = false,
|
|
84
|
+
enableShimmer = false,
|
|
85
|
+
removable = false,
|
|
86
|
+
onRemove,
|
|
87
|
+
leftIcon,
|
|
88
|
+
rightIcon,
|
|
89
|
+
children,
|
|
90
|
+
...props
|
|
91
|
+
}, ref) => {
|
|
92
|
+
const [isRemoving, setIsRemoving] = React.useState(false)
|
|
93
|
+
|
|
94
|
+
const handleRemove = () => {
|
|
95
|
+
setIsRemoving(true)
|
|
96
|
+
setTimeout(() => {
|
|
97
|
+
onRemove?.()
|
|
98
|
+
}, 300)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Auto-assign icons for special variants
|
|
102
|
+
let autoLeftIcon = leftIcon
|
|
103
|
+
let autoChildren = children
|
|
104
|
+
|
|
105
|
+
if (variant === 'pro' && !leftIcon) {
|
|
106
|
+
autoLeftIcon = (
|
|
107
|
+
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" className="w-3 h-3">
|
|
108
|
+
<path d="M12 0L13.09 8.26L22 9L13.09 9.74L12 18L10.91 9.74L2 9L10.91 8.26L12 0Z" fill="currentColor"/>
|
|
109
|
+
<path d="M19 5L19.5 7L21 7.5L19.5 8L19 10L18.5 8L17 7.5L18.5 7L19 5Z" fill="currentColor"/>
|
|
110
|
+
<path d="M19 15L19.5 17L21 17.5L19.5 18L19 20L18.5 18L17 17.5L18.5 17L19 15Z" fill="currentColor"/>
|
|
111
|
+
</svg>
|
|
112
|
+
)
|
|
113
|
+
autoChildren = children || 'Pro'
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return (
|
|
117
|
+
<AnimatePresence>
|
|
118
|
+
{!isRemoving && (
|
|
119
|
+
<motion.div
|
|
120
|
+
ref={ref}
|
|
121
|
+
className={cn(
|
|
122
|
+
badgeVariants({ variant, size }),
|
|
123
|
+
enablePulse && "animate-pulse",
|
|
124
|
+
enableGlow && "shadow-lg shadow-current/50",
|
|
125
|
+
enableShimmer && "relative overflow-hidden",
|
|
126
|
+
className
|
|
127
|
+
)}
|
|
128
|
+
initial={{ opacity: 0, scale: 0.8 }}
|
|
129
|
+
animate={{ opacity: 1, scale: 1 }}
|
|
130
|
+
exit={{ opacity: 0, scale: 0.8 }}
|
|
131
|
+
transition={{ duration: 0.2 }}
|
|
132
|
+
whileHover={{ scale: 1.05 }}
|
|
133
|
+
whileTap={{ scale: 0.95 }}
|
|
134
|
+
>
|
|
135
|
+
{enableShimmer && (
|
|
136
|
+
<motion.div
|
|
137
|
+
className="absolute inset-0 -translate-x-full bg-gradient-to-r from-transparent via-white/20 to-transparent"
|
|
138
|
+
animate={{ translateX: "200%" }}
|
|
139
|
+
transition={{ duration: 2, repeat: Infinity, ease: "linear" }}
|
|
140
|
+
/>
|
|
141
|
+
)}
|
|
142
|
+
|
|
143
|
+
{autoLeftIcon && (
|
|
144
|
+
<motion.span
|
|
145
|
+
className="inline-flex shrink-0"
|
|
146
|
+
animate={enablePulse ? { scale: [1, 1.2, 1] } : {}}
|
|
147
|
+
transition={{ duration: 2, repeat: Infinity }}
|
|
148
|
+
>
|
|
149
|
+
{autoLeftIcon}
|
|
150
|
+
</motion.span>
|
|
151
|
+
)}
|
|
152
|
+
|
|
153
|
+
<span className="truncate">{autoChildren}</span>
|
|
154
|
+
|
|
155
|
+
{rightIcon && (
|
|
156
|
+
<span className="inline-flex shrink-0">
|
|
157
|
+
{rightIcon}
|
|
158
|
+
</span>
|
|
159
|
+
)}
|
|
160
|
+
|
|
161
|
+
{removable && onRemove && (
|
|
162
|
+
<motion.button
|
|
163
|
+
type="button"
|
|
164
|
+
className="ml-1 -mr-1 h-3.5 w-3.5 rounded-full inline-flex items-center justify-center hover:bg-black/10 dark:hover:bg-white/10"
|
|
165
|
+
onClick={handleRemove}
|
|
166
|
+
whileHover={{ rotate: 90 }}
|
|
167
|
+
transition={{ type: "spring", stiffness: 300 }}
|
|
168
|
+
aria-label="Remove badge"
|
|
169
|
+
>
|
|
170
|
+
<svg
|
|
171
|
+
width="8"
|
|
172
|
+
height="8"
|
|
173
|
+
viewBox="0 0 8 8"
|
|
174
|
+
fill="none"
|
|
175
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
176
|
+
className="opacity-70"
|
|
177
|
+
aria-hidden="true"
|
|
178
|
+
>
|
|
179
|
+
<path d="M0.799988 7.19999L7.19999 0.799988M0.799988 0.799988L7.19999 7.19999" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round"/>
|
|
180
|
+
</svg>
|
|
181
|
+
</motion.button>
|
|
182
|
+
)}
|
|
183
|
+
</motion.div>
|
|
184
|
+
)}
|
|
185
|
+
</AnimatePresence>
|
|
186
|
+
)
|
|
187
|
+
})
|
|
188
|
+
|
|
189
|
+
BadgePro.displayName = 'BadgePro'
|
|
190
|
+
|
|
191
|
+
export { badgeVariants }
|
|
@@ -48,7 +48,7 @@ interface RippleEffect {
|
|
|
48
48
|
id: number
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
export interface
|
|
51
|
+
export interface ButtonProProps
|
|
52
52
|
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
53
53
|
VariantProps<typeof enhancedButtonVariants> {
|
|
54
54
|
state?: "idle" | "loading" | "success" | "error"
|
|
@@ -60,7 +60,7 @@ export interface EnhancedButtonProps
|
|
|
60
60
|
enableGlitch?: boolean
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
export const
|
|
63
|
+
export const ButtonPro = React.forwardRef<HTMLButtonElement, ButtonProProps>(
|
|
64
64
|
({
|
|
65
65
|
className,
|
|
66
66
|
variant,
|
|
@@ -75,6 +75,8 @@ export const EnhancedButton = React.forwardRef<HTMLButtonElement, EnhancedButton
|
|
|
75
75
|
enableParticles = false,
|
|
76
76
|
enableMagnetic = false,
|
|
77
77
|
enableGlitch = false,
|
|
78
|
+
disabled,
|
|
79
|
+
type = "button",
|
|
78
80
|
...props
|
|
79
81
|
}, ref) => {
|
|
80
82
|
const [internalState, setInternalState] = useState<"idle" | "loading" | "success" | "error">("idle")
|
|
@@ -211,7 +213,8 @@ export const EnhancedButton = React.forwardRef<HTMLButtonElement, EnhancedButton
|
|
|
211
213
|
onClick={handleClick}
|
|
212
214
|
onMouseMove={handleMouseMove}
|
|
213
215
|
onMouseLeave={handleMouseLeave}
|
|
214
|
-
disabled={currentState === "loading" ||
|
|
216
|
+
disabled={currentState === "loading" || disabled}
|
|
217
|
+
type={type}
|
|
215
218
|
animate={{
|
|
216
219
|
x: magneticPosition.x,
|
|
217
220
|
y: magneticPosition.y,
|
|
@@ -222,7 +225,6 @@ export const EnhancedButton = React.forwardRef<HTMLButtonElement, EnhancedButton
|
|
|
222
225
|
damping: 15,
|
|
223
226
|
mass: 0.1
|
|
224
227
|
}}
|
|
225
|
-
{...props}
|
|
226
228
|
>
|
|
227
229
|
{/* Ripple effects */}
|
|
228
230
|
<AnimatePresence>
|
|
@@ -355,6 +357,6 @@ export const EnhancedButton = React.forwardRef<HTMLButtonElement, EnhancedButton
|
|
|
355
357
|
}
|
|
356
358
|
)
|
|
357
359
|
|
|
358
|
-
|
|
360
|
+
ButtonPro.displayName = "ButtonPro"
|
|
359
361
|
|
|
360
362
|
export { enhancedButtonVariants }
|
|
@@ -4,7 +4,7 @@ import React, { useRef, useState } from "react"
|
|
|
4
4
|
import { motion, useMotionValue, useSpring, useTransform } from "framer-motion"
|
|
5
5
|
import { cn } from "../../lib/utils"
|
|
6
6
|
|
|
7
|
-
export interface
|
|
7
|
+
export interface CardProProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
8
|
enableGlassmorphism?: boolean
|
|
9
9
|
enableParallax?: boolean
|
|
10
10
|
enableTilt?: boolean
|
|
@@ -15,7 +15,7 @@ export interface EnhancedCardProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
15
15
|
parallaxOffset?: number
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
export const
|
|
18
|
+
export const CardPro = React.forwardRef<HTMLDivElement, CardProProps>(
|
|
19
19
|
({
|
|
20
20
|
className,
|
|
21
21
|
children,
|
|
@@ -100,11 +100,10 @@ export const EnhancedCard = React.forwardRef<HTMLDivElement, EnhancedCardProps>(
|
|
|
100
100
|
perspective: "1000px"
|
|
101
101
|
}}
|
|
102
102
|
animate={{
|
|
103
|
-
rotateX: enableTilt ? rotateX : 0,
|
|
104
|
-
rotateY: enableTilt ? rotateY : 0,
|
|
103
|
+
rotateX: enableTilt ? rotateX.get() : 0,
|
|
104
|
+
rotateY: enableTilt ? rotateY.get() : 0,
|
|
105
105
|
}}
|
|
106
106
|
transition={{ type: "spring", ...springConfig }}
|
|
107
|
-
{...props}
|
|
108
107
|
>
|
|
109
108
|
{/* Glow effect overlay */}
|
|
110
109
|
{enableGlow && (
|
|
@@ -190,10 +189,10 @@ export const EnhancedCard = React.forwardRef<HTMLDivElement, EnhancedCardProps>(
|
|
|
190
189
|
}
|
|
191
190
|
)
|
|
192
191
|
|
|
193
|
-
|
|
192
|
+
CardPro.displayName = "CardPro"
|
|
194
193
|
|
|
195
194
|
// Enhanced Card sub-components with animations
|
|
196
|
-
export const
|
|
195
|
+
export const CardProHeader = React.forwardRef<
|
|
197
196
|
HTMLDivElement,
|
|
198
197
|
React.HTMLAttributes<HTMLDivElement>
|
|
199
198
|
>(({ className, ...props }, ref) => (
|
|
@@ -203,10 +202,9 @@ export const EnhancedCardHeader = React.forwardRef<
|
|
|
203
202
|
initial={{ opacity: 0, y: -10 }}
|
|
204
203
|
animate={{ opacity: 1, y: 0 }}
|
|
205
204
|
transition={{ duration: 0.3, delay: 0.1 }}
|
|
206
|
-
{...props}
|
|
207
205
|
/>
|
|
208
206
|
))
|
|
209
|
-
|
|
207
|
+
CardProHeader.displayName = "CardProHeader"
|
|
210
208
|
|
|
211
209
|
export const EnhancedCardTitle = React.forwardRef<
|
|
212
210
|
HTMLParagraphElement,
|
|
@@ -221,7 +219,6 @@ export const EnhancedCardTitle = React.forwardRef<
|
|
|
221
219
|
initial={{ opacity: 0, x: -10 }}
|
|
222
220
|
animate={{ opacity: 1, x: 0 }}
|
|
223
221
|
transition={{ duration: 0.3, delay: 0.2 }}
|
|
224
|
-
{...props}
|
|
225
222
|
/>
|
|
226
223
|
))
|
|
227
224
|
EnhancedCardTitle.displayName = "EnhancedCardTitle"
|
|
@@ -236,12 +233,11 @@ export const EnhancedCardDescription = React.forwardRef<
|
|
|
236
233
|
initial={{ opacity: 0 }}
|
|
237
234
|
animate={{ opacity: 1 }}
|
|
238
235
|
transition={{ duration: 0.3, delay: 0.3 }}
|
|
239
|
-
{...props}
|
|
240
236
|
/>
|
|
241
237
|
))
|
|
242
238
|
EnhancedCardDescription.displayName = "EnhancedCardDescription"
|
|
243
239
|
|
|
244
|
-
export const
|
|
240
|
+
export const CardProContent = React.forwardRef<
|
|
245
241
|
HTMLDivElement,
|
|
246
242
|
React.HTMLAttributes<HTMLDivElement>
|
|
247
243
|
>(({ className, ...props }, ref) => (
|
|
@@ -251,12 +247,11 @@ export const EnhancedCardContent = React.forwardRef<
|
|
|
251
247
|
initial={{ opacity: 0 }}
|
|
252
248
|
animate={{ opacity: 1 }}
|
|
253
249
|
transition={{ duration: 0.3, delay: 0.4 }}
|
|
254
|
-
{...props}
|
|
255
250
|
/>
|
|
256
251
|
))
|
|
257
|
-
|
|
252
|
+
CardProContent.displayName = "CardProContent"
|
|
258
253
|
|
|
259
|
-
export const
|
|
254
|
+
export const CardProFooter = React.forwardRef<
|
|
260
255
|
HTMLDivElement,
|
|
261
256
|
React.HTMLAttributes<HTMLDivElement>
|
|
262
257
|
>(({ className, ...props }, ref) => (
|
|
@@ -266,7 +261,6 @@ export const EnhancedCardFooter = React.forwardRef<
|
|
|
266
261
|
initial={{ opacity: 0, y: 10 }}
|
|
267
262
|
animate={{ opacity: 1, y: 0 }}
|
|
268
263
|
transition={{ duration: 0.3, delay: 0.5 }}
|
|
269
|
-
{...props}
|
|
270
264
|
/>
|
|
271
265
|
))
|
|
272
|
-
|
|
266
|
+
CardProFooter.displayName = "CardProFooter"
|
|
@@ -11,15 +11,15 @@ const DialogTrigger = DialogPrimitive.Trigger
|
|
|
11
11
|
const DialogPortal = DialogPrimitive.Portal
|
|
12
12
|
const DialogClose = DialogPrimitive.Close
|
|
13
13
|
|
|
14
|
-
interface
|
|
14
|
+
interface DialogProOverlayProps
|
|
15
15
|
extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay> {
|
|
16
16
|
blur?: "none" | "sm" | "md" | "lg" | "xl"
|
|
17
17
|
variant?: "default" | "dark" | "light" | "gradient"
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
const
|
|
20
|
+
const DialogProOverlay = React.forwardRef<
|
|
21
21
|
React.ElementRef<typeof DialogPrimitive.Overlay>,
|
|
22
|
-
|
|
22
|
+
DialogProOverlayProps
|
|
23
23
|
>(({ className, blur = "md", variant = "default", ...props }, ref) => {
|
|
24
24
|
const blurClasses = {
|
|
25
25
|
none: "",
|
|
@@ -49,19 +49,19 @@ const EnhancedDialogOverlay = React.forwardRef<
|
|
|
49
49
|
/>
|
|
50
50
|
)
|
|
51
51
|
})
|
|
52
|
-
|
|
52
|
+
DialogProOverlay.displayName = DialogPrimitive.Overlay.displayName
|
|
53
53
|
|
|
54
|
-
interface
|
|
54
|
+
interface DialogProContentProps
|
|
55
55
|
extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
|
|
56
56
|
animation?: "fade" | "scale" | "slide" | "rotate" | "bounce"
|
|
57
57
|
animationDuration?: number
|
|
58
58
|
overlay?: boolean
|
|
59
|
-
overlayProps?:
|
|
59
|
+
overlayProps?: DialogProOverlayProps
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
const
|
|
62
|
+
const DialogProContent = React.forwardRef<
|
|
63
63
|
React.ElementRef<typeof DialogPrimitive.Content>,
|
|
64
|
-
|
|
64
|
+
DialogProContentProps
|
|
65
65
|
>(({
|
|
66
66
|
className,
|
|
67
67
|
children,
|
|
@@ -118,7 +118,7 @@ const EnhancedDialogContent = React.forwardRef<
|
|
|
118
118
|
exit={{ opacity: 0 }}
|
|
119
119
|
transition={{ duration: animationDuration * 0.8 }}
|
|
120
120
|
>
|
|
121
|
-
<
|
|
121
|
+
<DialogProOverlay {...overlayProps} />
|
|
122
122
|
</motion.div>
|
|
123
123
|
)}
|
|
124
124
|
<motion.div
|
|
@@ -173,9 +173,9 @@ const EnhancedDialogContent = React.forwardRef<
|
|
|
173
173
|
</AnimatePresence>
|
|
174
174
|
)
|
|
175
175
|
})
|
|
176
|
-
|
|
176
|
+
DialogProContent.displayName = DialogPrimitive.Content.displayName
|
|
177
177
|
|
|
178
|
-
const
|
|
178
|
+
const DialogProHeader = ({
|
|
179
179
|
className,
|
|
180
180
|
...props
|
|
181
181
|
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
@@ -187,12 +187,11 @@ const EnhancedDialogHeader = ({
|
|
|
187
187
|
initial={{ opacity: 0, y: -10 }}
|
|
188
188
|
animate={{ opacity: 1, y: 0 }}
|
|
189
189
|
transition={{ delay: 0.1, duration: 0.3 }}
|
|
190
|
-
{...props}
|
|
191
190
|
/>
|
|
192
191
|
)
|
|
193
|
-
|
|
192
|
+
DialogProHeader.displayName = "DialogProHeader"
|
|
194
193
|
|
|
195
|
-
const
|
|
194
|
+
const DialogProFooter = ({
|
|
196
195
|
className,
|
|
197
196
|
...props
|
|
198
197
|
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
@@ -204,12 +203,11 @@ const EnhancedDialogFooter = ({
|
|
|
204
203
|
initial={{ opacity: 0, y: 10 }}
|
|
205
204
|
animate={{ opacity: 1, y: 0 }}
|
|
206
205
|
transition={{ delay: 0.2, duration: 0.3 }}
|
|
207
|
-
{...props}
|
|
208
206
|
/>
|
|
209
207
|
)
|
|
210
|
-
|
|
208
|
+
DialogProFooter.displayName = "DialogProFooter"
|
|
211
209
|
|
|
212
|
-
const
|
|
210
|
+
const DialogProTitle = React.forwardRef<
|
|
213
211
|
React.ElementRef<typeof DialogPrimitive.Title>,
|
|
214
212
|
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>
|
|
215
213
|
>(({ className, ...props }, ref) => (
|
|
@@ -222,9 +220,9 @@ const EnhancedDialogTitle = React.forwardRef<
|
|
|
222
220
|
{...props}
|
|
223
221
|
/>
|
|
224
222
|
))
|
|
225
|
-
|
|
223
|
+
DialogProTitle.displayName = DialogPrimitive.Title.displayName
|
|
226
224
|
|
|
227
|
-
const
|
|
225
|
+
const DialogProDescription = React.forwardRef<
|
|
228
226
|
React.ElementRef<typeof DialogPrimitive.Description>,
|
|
229
227
|
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
|
|
230
228
|
>(({ className, ...props }, ref) => (
|
|
@@ -234,15 +232,15 @@ const EnhancedDialogDescription = React.forwardRef<
|
|
|
234
232
|
{...props}
|
|
235
233
|
/>
|
|
236
234
|
))
|
|
237
|
-
|
|
235
|
+
DialogProDescription.displayName = DialogPrimitive.Description.displayName
|
|
238
236
|
|
|
239
237
|
export {
|
|
240
|
-
Dialog as
|
|
241
|
-
DialogTrigger as
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
DialogClose as
|
|
238
|
+
Dialog as DialogPro,
|
|
239
|
+
DialogTrigger as DialogProTrigger,
|
|
240
|
+
DialogProContent,
|
|
241
|
+
DialogProHeader,
|
|
242
|
+
DialogProFooter,
|
|
243
|
+
DialogProTitle,
|
|
244
|
+
DialogProDescription,
|
|
245
|
+
DialogClose as DialogProClose,
|
|
248
246
|
}
|
|
@@ -7,7 +7,7 @@ import { AlertTriangle, RefreshCw, Lock, Sparkles } from "lucide-react"
|
|
|
7
7
|
import { cn } from "../../lib/utils"
|
|
8
8
|
import { useSubscription } from "../../hooks/use-subscription"
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
interface ErrorBoundaryProps {
|
|
11
11
|
children: ReactNode
|
|
12
12
|
fallback?: ReactNode
|
|
13
13
|
className?: string
|
|
@@ -72,14 +72,12 @@ class ErrorBoundaryInternal extends Component<ErrorBoundaryProps, ErrorBoundaryS
|
|
|
72
72
|
|
|
73
73
|
function ErrorBoundaryWrapper(props: ErrorBoundaryProps) {
|
|
74
74
|
// Check if we're in docs mode or have pro access
|
|
75
|
-
const docsProAccess = { hasAccess: true } // Pro access assumed in package
|
|
76
75
|
const { hasProAccess, isLoading } = useSubscription()
|
|
77
76
|
|
|
78
77
|
// In docs mode, always show the component
|
|
79
|
-
const canShowComponent = docsProAccess.isDocsMode || hasProAccess
|
|
80
78
|
|
|
81
79
|
// If not in docs mode and no pro access, show upgrade prompt
|
|
82
|
-
if (!
|
|
80
|
+
if (!isLoading && !hasProAccess) {
|
|
83
81
|
return (
|
|
84
82
|
<Card className={cn("w-fit", props.className)}>
|
|
85
83
|
<CardContent className="py-6 text-center">
|
|
@@ -25,7 +25,7 @@ import { cn } from '../../lib/utils'
|
|
|
25
25
|
import { useDocsProAccess } from '@/components/docs/docs-pro-provider'
|
|
26
26
|
import { useSubscription } from '../../hooks/use-subscription'
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
interface FileUploadProps {
|
|
29
29
|
accept?: string
|
|
30
30
|
multiple?: boolean
|
|
31
31
|
maxSize?: number // in MB
|
|
@@ -38,7 +38,7 @@ export interface FileUploadProps {
|
|
|
38
38
|
allowedTypes?: string[]
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
interface UploadedFile {
|
|
42
42
|
file: File
|
|
43
43
|
id: string
|
|
44
44
|
status: 'uploading' | 'success' | 'error'
|
|
@@ -77,14 +77,12 @@ export function FileUpload({
|
|
|
77
77
|
allowedTypes = []
|
|
78
78
|
}: FileUploadProps) {
|
|
79
79
|
// Check if we're in docs mode or have pro access
|
|
80
|
-
const docsProAccess = useDocsProAccess()
|
|
81
80
|
const { hasProAccess, isLoading } = useSubscription()
|
|
82
81
|
|
|
83
82
|
// In docs mode, always show the component
|
|
84
|
-
const canShowComponent = docsProAccess.isDocsMode || hasProAccess
|
|
85
83
|
|
|
86
84
|
// If not in docs mode and no pro access, show upgrade prompt
|
|
87
|
-
if (!
|
|
85
|
+
if (!isLoading && !hasProAccess) {
|
|
88
86
|
return (
|
|
89
87
|
<Card className={cn("w-full", className)}>
|
|
90
88
|
<CardContent className="py-12 text-center">
|
|
@@ -142,7 +142,6 @@ const FloatingActionButtonInternal = React.forwardRef<HTMLButtonElement, Floatin
|
|
|
142
142
|
whileTap={{ scale: 0.9 }}
|
|
143
143
|
animate={{ rotate: isOpen ? 45 : 0 }}
|
|
144
144
|
transition={{ duration: 0.2 }}
|
|
145
|
-
{...props}
|
|
146
145
|
>
|
|
147
146
|
{children || (actions.length > 0 ? <Plus className="h-5 w-5" /> : <Plus className="h-5 w-5" />)}
|
|
148
147
|
</motion.button>
|
|
@@ -169,14 +168,12 @@ FloatingActionButtonInternal.displayName = "FloatingActionButtonInternal"
|
|
|
169
168
|
export const FloatingActionButton = React.forwardRef<HTMLButtonElement, FloatingActionButtonProps>(
|
|
170
169
|
({ className, ...props }, ref) => {
|
|
171
170
|
// Check if we're in docs mode or have pro access
|
|
172
|
-
const docsProAccess = { hasAccess: true } // Pro access assumed in package
|
|
173
171
|
const { hasProAccess, isLoading } = useSubscription()
|
|
174
172
|
|
|
175
173
|
// In docs mode, always show the component
|
|
176
|
-
const canShowComponent = docsProAccess.isDocsMode || hasProAccess
|
|
177
174
|
|
|
178
175
|
// If not in docs mode and no pro access, show upgrade prompt
|
|
179
|
-
if (!
|
|
176
|
+
if (!isLoading && !hasProAccess) {
|
|
180
177
|
return (
|
|
181
178
|
<Card className={cn("w-fit", className)}>
|
|
182
179
|
<CardContent className="py-6 text-center">
|
|
@@ -5,12 +5,12 @@ import { motion, AnimatePresence } from "framer-motion"
|
|
|
5
5
|
import { Card, CardContent } from "../ui/card"
|
|
6
6
|
import { Button } from "../ui/button"
|
|
7
7
|
import { Badge } from "../ui/badge"
|
|
8
|
-
import { Skeleton } from "
|
|
8
|
+
import { Skeleton } from "../ui/skeleton"
|
|
9
9
|
import { cn } from "../../lib/utils"
|
|
10
10
|
import { Star, GitFork, Eye, Users, ExternalLink, Github, Lock, Sparkles, RefreshCw } from "lucide-react"
|
|
11
11
|
import { useSubscription } from "../../hooks/use-subscription"
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
interface GitHubRepository {
|
|
14
14
|
id: number
|
|
15
15
|
name: string
|
|
16
16
|
full_name: string
|
|
@@ -31,7 +31,7 @@ export interface GitHubRepository {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
interface GitHubStarsProps {
|
|
35
35
|
username: string
|
|
36
36
|
repositories?: string[]
|
|
37
37
|
showDescription?: boolean
|
|
@@ -375,14 +375,12 @@ const GitHubStarsInternal: React.FC<GitHubStarsProps> = ({
|
|
|
375
375
|
|
|
376
376
|
export const GitHubStars: React.FC<GitHubStarsProps> = ({ className, ...props }) => {
|
|
377
377
|
// Check if we're in docs mode or have pro access
|
|
378
|
-
const docsProAccess = { hasAccess: true } // Pro access assumed in package
|
|
379
378
|
const { hasProAccess, isLoading } = useSubscription()
|
|
380
379
|
|
|
381
380
|
// In docs mode, always show the component
|
|
382
|
-
const canShowComponent = docsProAccess.isDocsMode || hasProAccess
|
|
383
381
|
|
|
384
382
|
// If not in docs mode and no pro access, show upgrade prompt
|
|
385
|
-
if (!
|
|
383
|
+
if (!isLoading && !hasProAccess) {
|
|
386
384
|
return (
|
|
387
385
|
<Card className={cn("w-fit", className)}>
|
|
388
386
|
<CardContent className="py-6 text-center">
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
} from "lucide-react"
|
|
26
26
|
import { useSubscription } from "../../hooks/use-subscription"
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
interface HealthCheckEndpoint {
|
|
29
29
|
id: string
|
|
30
30
|
name: string
|
|
31
31
|
url: string
|
|
@@ -37,7 +37,7 @@ export interface HealthCheckEndpoint {
|
|
|
37
37
|
critical?: boolean
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
interface HealthCheckResult {
|
|
41
41
|
id: string
|
|
42
42
|
name: string
|
|
43
43
|
status: "healthy" | "unhealthy" | "warning" | "pending"
|
|
@@ -48,7 +48,7 @@ export interface HealthCheckResult {
|
|
|
48
48
|
uptime?: number
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
interface HealthCheckProps {
|
|
52
52
|
endpoints: HealthCheckEndpoint[]
|
|
53
53
|
interval?: number
|
|
54
54
|
autoRefresh?: boolean
|
|
@@ -242,7 +242,7 @@ const HealthCheckInternal: React.FC<HealthCheckProps> = ({
|
|
|
242
242
|
<CardTitle className="flex items-center gap-2">
|
|
243
243
|
System Health
|
|
244
244
|
<Badge
|
|
245
|
-
variant={overallStatus === "healthy" ? "
|
|
245
|
+
variant={overallStatus === "healthy" ? "secondary" : "destructive"}
|
|
246
246
|
className={cn(
|
|
247
247
|
"text-white",
|
|
248
248
|
overallStatus === "healthy" && "bg-green-500",
|
|
@@ -402,14 +402,12 @@ const HealthCheckInternal: React.FC<HealthCheckProps> = ({
|
|
|
402
402
|
|
|
403
403
|
export const HealthCheck: React.FC<HealthCheckProps> = ({ className, ...props }) => {
|
|
404
404
|
// Check if we're in docs mode or have pro access
|
|
405
|
-
const docsProAccess = { hasAccess: true } // Pro access assumed in package
|
|
406
405
|
const { hasProAccess, isLoading } = useSubscription()
|
|
407
406
|
|
|
408
407
|
// In docs mode, always show the component
|
|
409
|
-
const canShowComponent = docsProAccess.isDocsMode || hasProAccess
|
|
410
408
|
|
|
411
409
|
// If not in docs mode and no pro access, show upgrade prompt
|
|
412
|
-
if (!
|
|
410
|
+
if (!isLoading && !hasProAccess) {
|
|
413
411
|
return (
|
|
414
412
|
<Card className={cn("w-fit", className)}>
|
|
415
413
|
<CardContent className="py-6 text-center">
|