@moontra/moonui-pro 2.20.0 → 2.20.2
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 +691 -261
- package/dist/index.mjs +7419 -4935
- package/package.json +4 -3
- package/scripts/postbuild.js +27 -0
- package/src/components/advanced-chart/index.tsx +5 -1
- package/src/components/advanced-forms/index.tsx +175 -16
- package/src/components/calendar/event-dialog.tsx +18 -13
- package/src/components/calendar/index.tsx +197 -50
- package/src/components/dashboard/dashboard-grid.tsx +21 -3
- package/src/components/dashboard/types.ts +3 -0
- package/src/components/dashboard/widgets/activity-feed.tsx +6 -1
- package/src/components/dashboard/widgets/comparison-widget.tsx +177 -0
- package/src/components/dashboard/widgets/index.ts +5 -0
- package/src/components/dashboard/widgets/metric-card.tsx +21 -1
- package/src/components/dashboard/widgets/progress-widget.tsx +113 -0
- package/src/components/error-boundary/index.tsx +160 -37
- package/src/components/form-wizard/form-wizard-context.tsx +54 -26
- package/src/components/form-wizard/form-wizard-progress.tsx +33 -2
- package/src/components/form-wizard/types.ts +2 -1
- package/src/components/github-stars/hooks.ts +1 -0
- package/src/components/github-stars/variants.tsx +3 -1
- package/src/components/health-check/index.tsx +14 -14
- package/src/components/hover-card-3d/index.tsx +2 -3
- package/src/components/index.ts +5 -3
- package/src/components/kanban/kanban.tsx +23 -18
- package/src/components/license-error/index.tsx +2 -0
- package/src/components/magnetic-button/index.tsx +56 -7
- package/src/components/memory-efficient-data/index.tsx +117 -115
- package/src/components/navbar/index.tsx +781 -0
- package/src/components/performance-debugger/index.tsx +62 -38
- package/src/components/performance-monitor/index.tsx +47 -33
- package/src/components/phone-number-input/index.tsx +32 -27
- package/src/components/phone-number-input/phone-number-input-simple.tsx +167 -0
- package/src/components/rich-text-editor/index.tsx +26 -28
- package/src/components/rich-text-editor/slash-commands-extension.ts +15 -5
- package/src/components/sidebar/index.tsx +32 -13
- package/src/components/timeline/index.tsx +84 -49
- package/src/components/ui/accordion.tsx +550 -42
- package/src/components/ui/avatar.tsx +2 -0
- package/src/components/ui/badge.tsx +2 -0
- package/src/components/ui/breadcrumb.tsx +2 -0
- package/src/components/ui/button.tsx +39 -33
- package/src/components/ui/card.tsx +2 -0
- package/src/components/ui/collapsible.tsx +546 -50
- package/src/components/ui/command.tsx +790 -67
- package/src/components/ui/dialog.tsx +510 -92
- package/src/components/ui/dropdown-menu.tsx +540 -52
- package/src/components/ui/index.ts +37 -5
- package/src/components/ui/input.tsx +2 -0
- package/src/components/ui/magnetic-button.tsx +1 -1
- package/src/components/ui/media-gallery.tsx +1 -2
- package/src/components/ui/navigation-menu.tsx +130 -0
- package/src/components/ui/pagination.tsx +2 -0
- package/src/components/ui/select.tsx +6 -2
- package/src/components/ui/spotlight-card.tsx +1 -1
- package/src/components/ui/table.tsx +2 -0
- package/src/components/ui/tabs-pro.tsx +542 -0
- package/src/components/ui/tabs.tsx +23 -167
- package/src/components/ui/toggle.tsx +13 -13
- package/src/index.ts +11 -3
- package/src/styles/index.css +596 -0
- package/src/use-performance-optimizer.ts +1 -1
- package/src/utils/chart-helpers.ts +1 -1
- package/src/__tests__/use-intersection-observer.test.tsx +0 -216
- package/src/__tests__/use-local-storage.test.tsx +0 -174
- package/src/__tests__/use-pro-access.test.tsx +0 -183
- package/src/components/advanced-chart/advanced-chart.test.tsx +0 -281
- package/src/components/data-table/data-table.test.tsx +0 -187
- package/src/components/enhanced/badge.tsx +0 -191
- package/src/components/enhanced/button.tsx +0 -362
- package/src/components/enhanced/card.tsx +0 -266
- package/src/components/enhanced/dialog.tsx +0 -246
- package/src/components/enhanced/index.ts +0 -4
- package/src/components/file-upload/file-upload.test.tsx +0 -243
- package/src/components/rich-text-editor/index-old-backup.tsx +0 -437
- package/src/types/moonui.d.ts +0 -22
|
@@ -1,437 +0,0 @@
|
|
|
1
|
-
// BACKUP - OLD RICH TEXT EDITOR IMPLEMENTATION
|
|
2
|
-
// This was the previous implementation before the advanced Tiptap-based version
|
|
3
|
-
// Kept for reference and potential markdown editor features
|
|
4
|
-
|
|
5
|
-
"use client"
|
|
6
|
-
|
|
7
|
-
import React from 'react'
|
|
8
|
-
import { useSubscription } from '../../hooks/use-subscription'
|
|
9
|
-
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from './card'
|
|
10
|
-
import { Button } from './button'
|
|
11
|
-
import {
|
|
12
|
-
Bold,
|
|
13
|
-
Italic,
|
|
14
|
-
Underline,
|
|
15
|
-
AlignLeft,
|
|
16
|
-
AlignCenter,
|
|
17
|
-
AlignRight,
|
|
18
|
-
List,
|
|
19
|
-
ListOrdered,
|
|
20
|
-
Quote,
|
|
21
|
-
Link,
|
|
22
|
-
Image,
|
|
23
|
-
Code,
|
|
24
|
-
Undo,
|
|
25
|
-
Redo,
|
|
26
|
-
Type,
|
|
27
|
-
Lock,
|
|
28
|
-
Sparkles
|
|
29
|
-
} from 'lucide-react'
|
|
30
|
-
import { cn } from '../../lib/utils'
|
|
31
|
-
|
|
32
|
-
interface OldRichTextEditorProps {
|
|
33
|
-
value?: string
|
|
34
|
-
onChange?: (value: string) => void
|
|
35
|
-
placeholder?: string
|
|
36
|
-
className?: string
|
|
37
|
-
disabled?: boolean
|
|
38
|
-
minHeight?: number
|
|
39
|
-
maxHeight?: number
|
|
40
|
-
showToolbar?: boolean
|
|
41
|
-
readonly?: boolean
|
|
42
|
-
autoFocus?: boolean
|
|
43
|
-
features?: {
|
|
44
|
-
bold?: boolean
|
|
45
|
-
italic?: boolean
|
|
46
|
-
underline?: boolean
|
|
47
|
-
heading?: boolean
|
|
48
|
-
lists?: boolean
|
|
49
|
-
link?: boolean
|
|
50
|
-
image?: boolean
|
|
51
|
-
quote?: boolean
|
|
52
|
-
code?: boolean
|
|
53
|
-
undo?: boolean
|
|
54
|
-
redo?: boolean
|
|
55
|
-
ai?: boolean
|
|
56
|
-
}
|
|
57
|
-
height?: number
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export function OldRichTextEditor({
|
|
61
|
-
value = '',
|
|
62
|
-
onChange,
|
|
63
|
-
placeholder = 'Start typing...',
|
|
64
|
-
className,
|
|
65
|
-
disabled = false,
|
|
66
|
-
minHeight = 200,
|
|
67
|
-
maxHeight = 600,
|
|
68
|
-
showToolbar = true,
|
|
69
|
-
readonly = false,
|
|
70
|
-
autoFocus = false,
|
|
71
|
-
features = {},
|
|
72
|
-
height
|
|
73
|
-
}: OldRichTextEditorProps) {
|
|
74
|
-
const { hasProAccess, isLoading } = useSubscription()
|
|
75
|
-
|
|
76
|
-
// If no pro access, show upgrade prompt
|
|
77
|
-
if (!isLoading && !hasProAccess) {
|
|
78
|
-
return (
|
|
79
|
-
<Card className={cn("w-full", className)}>
|
|
80
|
-
<CardContent className="py-12 text-center">
|
|
81
|
-
<div className="max-w-md mx-auto space-y-4">
|
|
82
|
-
<div className="rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto">
|
|
83
|
-
<Lock className="h-6 w-6 text-purple-600 dark:text-purple-400" />
|
|
84
|
-
</div>
|
|
85
|
-
<div>
|
|
86
|
-
<h3 className="font-semibold text-lg mb-2">Pro Feature</h3>
|
|
87
|
-
<p className="text-muted-foreground text-sm mb-4">
|
|
88
|
-
Rich Text Editor is available exclusively to MoonUI Pro subscribers.
|
|
89
|
-
</p>
|
|
90
|
-
<div className="flex gap-3 justify-center">
|
|
91
|
-
<a href="/pricing">
|
|
92
|
-
<Button size="sm">
|
|
93
|
-
<Sparkles className="mr-2 h-4 w-4" />
|
|
94
|
-
Upgrade to Pro
|
|
95
|
-
</Button>
|
|
96
|
-
</a>
|
|
97
|
-
</div>
|
|
98
|
-
</div>
|
|
99
|
-
</div>
|
|
100
|
-
</CardContent>
|
|
101
|
-
</Card>
|
|
102
|
-
)
|
|
103
|
-
}
|
|
104
|
-
const [content, setContent] = React.useState(value)
|
|
105
|
-
const [isFormatting, setIsFormatting] = React.useState({
|
|
106
|
-
bold: false,
|
|
107
|
-
italic: false,
|
|
108
|
-
underline: false,
|
|
109
|
-
align: 'left' as 'left' | 'center' | 'right'
|
|
110
|
-
})
|
|
111
|
-
const editorRef = React.useRef<HTMLDivElement>(null)
|
|
112
|
-
|
|
113
|
-
React.useEffect(() => {
|
|
114
|
-
setContent(value)
|
|
115
|
-
}, [value])
|
|
116
|
-
|
|
117
|
-
React.useEffect(() => {
|
|
118
|
-
if (autoFocus && editorRef.current) {
|
|
119
|
-
editorRef.current.focus()
|
|
120
|
-
}
|
|
121
|
-
}, [autoFocus])
|
|
122
|
-
|
|
123
|
-
const handleContentChange = () => {
|
|
124
|
-
if (editorRef.current) {
|
|
125
|
-
const newContent = editorRef.current.innerHTML
|
|
126
|
-
setContent(newContent)
|
|
127
|
-
onChange?.(newContent)
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
const execCommand = (command: string, value: string = '') => {
|
|
132
|
-
document.execCommand(command, false, value)
|
|
133
|
-
editorRef.current?.focus()
|
|
134
|
-
handleContentChange()
|
|
135
|
-
updateFormattingState()
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
const updateFormattingState = () => {
|
|
139
|
-
setIsFormatting({
|
|
140
|
-
bold: document.queryCommandState('bold'),
|
|
141
|
-
italic: document.queryCommandState('italic'),
|
|
142
|
-
underline: document.queryCommandState('underline'),
|
|
143
|
-
align: document.queryCommandValue('justifyLeft') ? 'left' :
|
|
144
|
-
document.queryCommandValue('justifyCenter') ? 'center' :
|
|
145
|
-
document.queryCommandValue('justifyRight') ? 'right' : 'left'
|
|
146
|
-
})
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
const handleSelectionChange = () => {
|
|
150
|
-
updateFormattingState()
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
React.useEffect(() => {
|
|
154
|
-
document.addEventListener('selectionchange', handleSelectionChange)
|
|
155
|
-
return () => {
|
|
156
|
-
document.removeEventListener('selectionchange', handleSelectionChange)
|
|
157
|
-
}
|
|
158
|
-
}, [])
|
|
159
|
-
|
|
160
|
-
const insertLink = () => {
|
|
161
|
-
const url = prompt('Enter URL:')
|
|
162
|
-
if (url) {
|
|
163
|
-
execCommand('createLink', url)
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
const insertImage = () => {
|
|
168
|
-
const url = prompt('Enter image URL:')
|
|
169
|
-
if (url) {
|
|
170
|
-
execCommand('insertImage', url)
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
const formatText = (command: string) => {
|
|
175
|
-
execCommand(command)
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
const alignText = (alignment: 'left' | 'center' | 'right') => {
|
|
179
|
-
const commands = {
|
|
180
|
-
left: 'justifyLeft',
|
|
181
|
-
center: 'justifyCenter',
|
|
182
|
-
right: 'justifyRight'
|
|
183
|
-
}
|
|
184
|
-
execCommand(commands[alignment])
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
const handleKeyDown = (e: React.KeyboardEvent) => {
|
|
188
|
-
if (e.ctrlKey || e.metaKey) {
|
|
189
|
-
switch (e.key) {
|
|
190
|
-
case 'b':
|
|
191
|
-
e.preventDefault()
|
|
192
|
-
formatText('bold')
|
|
193
|
-
break
|
|
194
|
-
case 'i':
|
|
195
|
-
e.preventDefault()
|
|
196
|
-
formatText('italic')
|
|
197
|
-
break
|
|
198
|
-
case 'u':
|
|
199
|
-
e.preventDefault()
|
|
200
|
-
formatText('underline')
|
|
201
|
-
break
|
|
202
|
-
case 'z':
|
|
203
|
-
e.preventDefault()
|
|
204
|
-
if (e.shiftKey) {
|
|
205
|
-
execCommand('redo')
|
|
206
|
-
} else {
|
|
207
|
-
execCommand('undo')
|
|
208
|
-
}
|
|
209
|
-
break
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
return (
|
|
215
|
-
<Card className={cn("w-full", className)}>
|
|
216
|
-
<CardHeader className="pb-3">
|
|
217
|
-
<CardTitle className="flex items-center gap-2">
|
|
218
|
-
<Type className="h-5 w-5" />
|
|
219
|
-
Rich Text Editor (Old Version)
|
|
220
|
-
</CardTitle>
|
|
221
|
-
<CardDescription>
|
|
222
|
-
Create and edit rich text content with formatting options
|
|
223
|
-
</CardDescription>
|
|
224
|
-
</CardHeader>
|
|
225
|
-
<CardContent className="space-y-4">
|
|
226
|
-
{/* Toolbar */}
|
|
227
|
-
{showToolbar && (
|
|
228
|
-
<div className="flex flex-wrap items-center gap-1 p-2 border rounded-lg bg-muted/50">
|
|
229
|
-
{/* Text Formatting */}
|
|
230
|
-
<div className="flex items-center gap-1">
|
|
231
|
-
{features.bold !== false && (
|
|
232
|
-
<Button
|
|
233
|
-
variant={isFormatting.bold ? "default" : "ghost"}
|
|
234
|
-
size="sm"
|
|
235
|
-
onClick={() => formatText('bold')}
|
|
236
|
-
disabled={disabled || readonly}
|
|
237
|
-
>
|
|
238
|
-
<Bold className="h-4 w-4" />
|
|
239
|
-
</Button>
|
|
240
|
-
)}
|
|
241
|
-
{features.italic !== false && (
|
|
242
|
-
<Button
|
|
243
|
-
variant={isFormatting.italic ? "default" : "ghost"}
|
|
244
|
-
size="sm"
|
|
245
|
-
onClick={() => formatText('italic')}
|
|
246
|
-
disabled={disabled || readonly}
|
|
247
|
-
>
|
|
248
|
-
<Italic className="h-4 w-4" />
|
|
249
|
-
</Button>
|
|
250
|
-
)}
|
|
251
|
-
{features.underline !== false && (
|
|
252
|
-
<Button
|
|
253
|
-
variant={isFormatting.underline ? "default" : "ghost"}
|
|
254
|
-
size="sm"
|
|
255
|
-
onClick={() => formatText('underline')}
|
|
256
|
-
disabled={disabled || readonly}
|
|
257
|
-
>
|
|
258
|
-
<Underline className="h-4 w-4" />
|
|
259
|
-
</Button>
|
|
260
|
-
)}
|
|
261
|
-
</div>
|
|
262
|
-
|
|
263
|
-
<div className="h-4 w-px bg-border mx-1" />
|
|
264
|
-
|
|
265
|
-
{/* Alignment */}
|
|
266
|
-
<div className="flex items-center gap-1">
|
|
267
|
-
<Button
|
|
268
|
-
variant={isFormatting.align === 'left' ? "default" : "ghost"}
|
|
269
|
-
size="sm"
|
|
270
|
-
onClick={() => alignText('left')}
|
|
271
|
-
disabled={disabled || readonly}
|
|
272
|
-
>
|
|
273
|
-
<AlignLeft className="h-4 w-4" />
|
|
274
|
-
</Button>
|
|
275
|
-
<Button
|
|
276
|
-
variant={isFormatting.align === 'center' ? "default" : "ghost"}
|
|
277
|
-
size="sm"
|
|
278
|
-
onClick={() => alignText('center')}
|
|
279
|
-
disabled={disabled || readonly}
|
|
280
|
-
>
|
|
281
|
-
<AlignCenter className="h-4 w-4" />
|
|
282
|
-
</Button>
|
|
283
|
-
<Button
|
|
284
|
-
variant={isFormatting.align === 'right' ? "default" : "ghost"}
|
|
285
|
-
size="sm"
|
|
286
|
-
onClick={() => alignText('right')}
|
|
287
|
-
disabled={disabled || readonly}
|
|
288
|
-
>
|
|
289
|
-
<AlignRight className="h-4 w-4" />
|
|
290
|
-
</Button>
|
|
291
|
-
</div>
|
|
292
|
-
|
|
293
|
-
<div className="h-4 w-px bg-border mx-1" />
|
|
294
|
-
|
|
295
|
-
{/* Lists */}
|
|
296
|
-
{features.lists !== false && (
|
|
297
|
-
<div className="flex items-center gap-1">
|
|
298
|
-
<Button
|
|
299
|
-
variant="ghost"
|
|
300
|
-
size="sm"
|
|
301
|
-
onClick={() => execCommand('insertUnorderedList')}
|
|
302
|
-
disabled={disabled || readonly}
|
|
303
|
-
>
|
|
304
|
-
<List className="h-4 w-4" />
|
|
305
|
-
</Button>
|
|
306
|
-
<Button
|
|
307
|
-
variant="ghost"
|
|
308
|
-
size="sm"
|
|
309
|
-
onClick={() => execCommand('insertOrderedList')}
|
|
310
|
-
disabled={disabled || readonly}
|
|
311
|
-
>
|
|
312
|
-
<ListOrdered className="h-4 w-4" />
|
|
313
|
-
</Button>
|
|
314
|
-
</div>
|
|
315
|
-
)}
|
|
316
|
-
|
|
317
|
-
<div className="h-4 w-px bg-border mx-1" />
|
|
318
|
-
|
|
319
|
-
{/* Quote and Code */}
|
|
320
|
-
<div className="flex items-center gap-1">
|
|
321
|
-
{features.quote !== false && (
|
|
322
|
-
<Button
|
|
323
|
-
variant="ghost"
|
|
324
|
-
size="sm"
|
|
325
|
-
onClick={() => execCommand('formatBlock', 'blockquote')}
|
|
326
|
-
disabled={disabled || readonly}
|
|
327
|
-
>
|
|
328
|
-
<Quote className="h-4 w-4" />
|
|
329
|
-
</Button>
|
|
330
|
-
)}
|
|
331
|
-
{features.code !== false && (
|
|
332
|
-
<Button
|
|
333
|
-
variant="ghost"
|
|
334
|
-
size="sm"
|
|
335
|
-
onClick={() => execCommand('formatBlock', 'pre')}
|
|
336
|
-
disabled={disabled || readonly}
|
|
337
|
-
>
|
|
338
|
-
<Code className="h-4 w-4" />
|
|
339
|
-
</Button>
|
|
340
|
-
)}
|
|
341
|
-
</div>
|
|
342
|
-
|
|
343
|
-
<div className="h-4 w-px bg-border mx-1" />
|
|
344
|
-
|
|
345
|
-
{/* Insert */}
|
|
346
|
-
<div className="flex items-center gap-1">
|
|
347
|
-
{features.link !== false && (
|
|
348
|
-
<Button
|
|
349
|
-
variant="ghost"
|
|
350
|
-
size="sm"
|
|
351
|
-
onClick={insertLink}
|
|
352
|
-
disabled={disabled || readonly}
|
|
353
|
-
>
|
|
354
|
-
<Link className="h-4 w-4" />
|
|
355
|
-
</Button>
|
|
356
|
-
)}
|
|
357
|
-
{features.image !== false && (
|
|
358
|
-
<Button
|
|
359
|
-
variant="ghost"
|
|
360
|
-
size="sm"
|
|
361
|
-
onClick={insertImage}
|
|
362
|
-
disabled={disabled || readonly}
|
|
363
|
-
>
|
|
364
|
-
<Image className="h-4 w-4" />
|
|
365
|
-
</Button>
|
|
366
|
-
)}
|
|
367
|
-
</div>
|
|
368
|
-
|
|
369
|
-
<div className="h-4 w-px bg-border mx-1" />
|
|
370
|
-
|
|
371
|
-
{/* Undo/Redo */}
|
|
372
|
-
{(features.undo !== false || features.redo !== false) && (
|
|
373
|
-
<div className="flex items-center gap-1">
|
|
374
|
-
{features.undo !== false && (
|
|
375
|
-
<Button
|
|
376
|
-
variant="ghost"
|
|
377
|
-
size="sm"
|
|
378
|
-
onClick={() => execCommand('undo')}
|
|
379
|
-
disabled={disabled || readonly}
|
|
380
|
-
>
|
|
381
|
-
<Undo className="h-4 w-4" />
|
|
382
|
-
</Button>
|
|
383
|
-
)}
|
|
384
|
-
{features.redo !== false && (
|
|
385
|
-
<Button
|
|
386
|
-
variant="ghost"
|
|
387
|
-
size="sm"
|
|
388
|
-
onClick={() => execCommand('redo')}
|
|
389
|
-
disabled={disabled || readonly}
|
|
390
|
-
>
|
|
391
|
-
<Redo className="h-4 w-4" />
|
|
392
|
-
</Button>
|
|
393
|
-
)}
|
|
394
|
-
</div>
|
|
395
|
-
)}
|
|
396
|
-
</div>
|
|
397
|
-
)}
|
|
398
|
-
|
|
399
|
-
{/* Editor */}
|
|
400
|
-
<div className="border rounded-lg">
|
|
401
|
-
<div
|
|
402
|
-
ref={editorRef}
|
|
403
|
-
contentEditable={!disabled && !readonly}
|
|
404
|
-
onInput={handleContentChange}
|
|
405
|
-
onKeyDown={handleKeyDown}
|
|
406
|
-
className={cn(
|
|
407
|
-
"w-full p-4 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 rounded-lg",
|
|
408
|
-
"prose prose-sm max-w-none",
|
|
409
|
-
disabled && "cursor-not-allowed opacity-50",
|
|
410
|
-
readonly && "cursor-default"
|
|
411
|
-
)}
|
|
412
|
-
style={{
|
|
413
|
-
minHeight: height ? `${height}px` : `${minHeight}px`,
|
|
414
|
-
maxHeight: height ? `${height}px` : `${maxHeight}px`,
|
|
415
|
-
overflowY: 'auto'
|
|
416
|
-
}}
|
|
417
|
-
dangerouslySetInnerHTML={{ __html: content }}
|
|
418
|
-
data-placeholder={placeholder}
|
|
419
|
-
suppressContentEditableWarning={true}
|
|
420
|
-
/>
|
|
421
|
-
</div>
|
|
422
|
-
|
|
423
|
-
{/* Status */}
|
|
424
|
-
<div className="flex items-center justify-between text-xs text-muted-foreground">
|
|
425
|
-
<span>
|
|
426
|
-
{content.replace(/<[^>]*>/g, '').length} characters
|
|
427
|
-
</span>
|
|
428
|
-
<span>
|
|
429
|
-
Press Ctrl+B for bold, Ctrl+I for italic, Ctrl+U for underline
|
|
430
|
-
</span>
|
|
431
|
-
</div>
|
|
432
|
-
</CardContent>
|
|
433
|
-
</Card>
|
|
434
|
-
)
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
export default OldRichTextEditor
|
package/src/types/moonui.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
declare module '@moontra/moonui' {
|
|
2
|
-
export * from '@moontra/moonui/dist/types';
|
|
3
|
-
|
|
4
|
-
// Re-export commonly used components
|
|
5
|
-
export { Button } from '@moontra/moonui/dist/types';
|
|
6
|
-
export { Card } from '@moontra/moonui/dist/types';
|
|
7
|
-
export { Badge } from '@moontra/moonui/dist/types';
|
|
8
|
-
export { Input } from '@moontra/moonui/dist/types';
|
|
9
|
-
export { Label } from '@moontra/moonui/dist/types';
|
|
10
|
-
export { Tabs, TabsContent, TabsList, TabsTrigger } from '@moontra/moonui/dist/types';
|
|
11
|
-
export { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from '@moontra/moonui/dist/types';
|
|
12
|
-
export { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@moontra/moonui/dist/types';
|
|
13
|
-
export { Switch } from '@moontra/moonui/dist/types';
|
|
14
|
-
export { Slider } from '@moontra/moonui/dist/types';
|
|
15
|
-
export { Textarea } from '@moontra/moonui/dist/types';
|
|
16
|
-
export { Separator } from '@moontra/moonui/dist/types';
|
|
17
|
-
export { ScrollArea } from '@moontra/moonui/dist/types';
|
|
18
|
-
export { Popover, PopoverContent, PopoverTrigger } from '@moontra/moonui/dist/types';
|
|
19
|
-
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut } from '@moontra/moonui/dist/types';
|
|
20
|
-
export { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from '@moontra/moonui/dist/types';
|
|
21
|
-
export { cn } from '@moontra/moonui/dist/types';
|
|
22
|
-
}
|