@abduljebar/text-editor 2.4.0 → 2.4.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/README.md +260 -68
- package/dist/index.css +1 -1
- package/dist/index.umd.cjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
```tsx
|
|
2
|
-
import '@abduljebar/text-editor/dist/index.css';
|
|
3
|
-
import { TextEditor } from "@abduljebar/text-editor";
|
|
4
|
-
```
|
|
5
|
-
|
|
6
1
|
# @abduljebar/text-editor
|
|
7
2
|
|
|
8
3
|
A modern, feature-rich React text editor component with beautiful styling and extensive customization options. Perfect for blogs, content management systems, and any application requiring rich text editing capabilities.
|
|
@@ -11,18 +6,27 @@ A modern, feature-rich React text editor component with beautiful styling and ex
|
|
|
11
6
|
|
|
12
7
|
### 🎨 Rich Text Editing
|
|
13
8
|
- **Text Formatting**: Bold, italic, underline, strikethrough
|
|
14
|
-
- **
|
|
15
|
-
- **Headings**: H1, H2, H3 with automatic styling
|
|
9
|
+
- **Headings**: H1, H2 with automatic styling
|
|
16
10
|
- **Lists**: Bulleted and numbered lists
|
|
17
|
-
- **
|
|
11
|
+
- **Alignment**: Left, center, right alignment
|
|
12
|
+
- **Block Elements**: Quotes and code blocks
|
|
18
13
|
- **Undo/Redo**: Full history support
|
|
14
|
+
- **Additional Formatting**: Superscript, subscript, indentation
|
|
15
|
+
|
|
16
|
+
### 📁 File Management
|
|
17
|
+
- **Image Upload**: Drag & drop, paste, or file picker
|
|
18
|
+
- **Image Validation**: File type and size validation
|
|
19
|
+
- **Pending Images**: Track and upload pending images
|
|
20
|
+
- **HTML Export**: Generate complete HTML documents with styling
|
|
21
|
+
- **Auto-save**: Debounced content changes with configurable delay
|
|
19
22
|
|
|
20
23
|
### 🎯 Smart UX
|
|
21
|
-
- **Auto-styling**: Automatic application of beautiful Tailwind CSS styles
|
|
22
24
|
- **Contextual Toolbar**: Appears only when focused and editable
|
|
23
25
|
- **Real-time Stats**: Word and character count in status bar
|
|
24
26
|
- **Smart Format Detection**: Visual indicators for active text formats
|
|
25
|
-
- **
|
|
27
|
+
- **Keyboard Shortcuts**: Ctrl+S (save), Ctrl+E (export)
|
|
28
|
+
- **Auto-focus**: Automatic focus on load
|
|
29
|
+
- **Placeholder Support**: Visual placeholder when empty
|
|
26
30
|
|
|
27
31
|
### 🔧 Flexible Configuration
|
|
28
32
|
- **Read-only Mode**: Display content without editing capabilities
|
|
@@ -30,13 +34,15 @@ A modern, feature-rich React text editor component with beautiful styling and ex
|
|
|
30
34
|
- **Title Support**: Optional document title with real-time updates
|
|
31
35
|
- **Action Buttons**: Built-in save and export functionality
|
|
32
36
|
- **Event Handling**: Comprehensive callback system
|
|
37
|
+
- **Debounce Control**: Configurable change debouncing
|
|
33
38
|
|
|
34
39
|
### 🚀 Advanced Features
|
|
35
40
|
- **React Hook**: `useTextEditor` for custom implementations
|
|
36
|
-
- **
|
|
37
|
-
- **
|
|
38
|
-
- **
|
|
41
|
+
- **Ref API**: Exposed methods for programmatic control
|
|
42
|
+
- **Selection Management**: Proper cursor and selection handling
|
|
43
|
+
- **Paste/Upload Handling**: Smart image and content paste handling
|
|
39
44
|
- **TypeScript**: Fully typed for better development experience
|
|
45
|
+
- **Validation**: Built-in content validation
|
|
40
46
|
|
|
41
47
|
## 📦 Installation
|
|
42
48
|
|
|
@@ -57,7 +63,7 @@ import { TextEditor } from "@abduljebar/text-editor";
|
|
|
57
63
|
function App() {
|
|
58
64
|
return (
|
|
59
65
|
<TextEditor
|
|
60
|
-
height="
|
|
66
|
+
height="500px"
|
|
61
67
|
onChange={(content, html, title) => {
|
|
62
68
|
console.log("Content:", content);
|
|
63
69
|
console.log("HTML:", html);
|
|
@@ -126,6 +132,38 @@ function ReadOnlyView() {
|
|
|
126
132
|
}
|
|
127
133
|
```
|
|
128
134
|
|
|
135
|
+
### With Image Upload
|
|
136
|
+
|
|
137
|
+
```tsx
|
|
138
|
+
import '@abduljebar/text-editor/dist/index.css';
|
|
139
|
+
import { TextEditor } from "@abduljebar/text-editor";
|
|
140
|
+
|
|
141
|
+
function EditorWithImages() {
|
|
142
|
+
const handleImageUpload = async (file: File) => {
|
|
143
|
+
// Upload to your backend
|
|
144
|
+
const formData = new FormData();
|
|
145
|
+
formData.append('image', file);
|
|
146
|
+
|
|
147
|
+
const response = await fetch('/api/upload', {
|
|
148
|
+
method: 'POST',
|
|
149
|
+
body: formData,
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
const data = await response.json();
|
|
153
|
+
return data.url; // Return the uploaded image URL
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
return (
|
|
157
|
+
<TextEditor
|
|
158
|
+
showButtons={true}
|
|
159
|
+
onImageUpload={handleImageUpload}
|
|
160
|
+
allowedImageTypes={['image/jpeg', 'image/png', 'image/webp']}
|
|
161
|
+
maxImageSize={10 * 1024 * 1024} // 10MB
|
|
162
|
+
/>
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
129
167
|
## ⚙️ API Reference
|
|
130
168
|
|
|
131
169
|
### TextEditor Props
|
|
@@ -136,11 +174,62 @@ function ReadOnlyView() {
|
|
|
136
174
|
| `onChange` | `(content: string, html: string, title?: string) => void` | `undefined` | Callback when content changes |
|
|
137
175
|
| `onSave` | `(content: string, html: string) => void` | `undefined` | Callback when save is triggered |
|
|
138
176
|
| `onExport` | `(html: string) => void` | `undefined` | Callback when export is triggered |
|
|
177
|
+
| `onImageUpload` | `(file: File) => Promise<string>` | `undefined` | Custom image upload handler |
|
|
178
|
+
| `imageUploadEndpoint` | `string` | `undefined` | Endpoint for default image upload |
|
|
139
179
|
| `readOnly` | `boolean` | `false` | Disable editing when true |
|
|
140
180
|
| `showButtons` | `boolean` | `false` | Show save/export buttons |
|
|
141
181
|
| `showSaveTitle` | `boolean` | `false` | Show document title input |
|
|
142
182
|
| `showStatusBar` | `boolean` | `false` | Show word/character count |
|
|
143
183
|
| `height` | `string` | `"500px"` | Editor height (any CSS value) |
|
|
184
|
+
| `allowedImageTypes` | `string[]` | `["image/jpeg","image/png","image/gif","image/webp"]` | Allowed image MIME types |
|
|
185
|
+
| `maxImageSize` | `number` | `5242880` (5MB) | Maximum image size in bytes |
|
|
186
|
+
| `debounceDelay` | `number` | `300` | Debounce delay for onChange in ms |
|
|
187
|
+
| `className` | `string` | `""` | Additional CSS class name |
|
|
188
|
+
| `placeholder` | `string` | `"Start typing here..."` | Placeholder text when empty |
|
|
189
|
+
| `autoFocus` | `boolean` | `false` | Auto-focus editor on load |
|
|
190
|
+
| `onInit` | `(editor: HTMLDivElement) => void` | `undefined` | Callback after editor initialization |
|
|
191
|
+
|
|
192
|
+
### TextEditor Ref API
|
|
193
|
+
|
|
194
|
+
The component exposes a ref with the following methods:
|
|
195
|
+
|
|
196
|
+
```typescript
|
|
197
|
+
interface TextEditorRef {
|
|
198
|
+
getContent: () => string;
|
|
199
|
+
getHTML: () => string;
|
|
200
|
+
getTitle: () => string;
|
|
201
|
+
clear: () => void;
|
|
202
|
+
focus: () => void;
|
|
203
|
+
insertText: (text: string) => void;
|
|
204
|
+
insertHTML: (html: string) => void;
|
|
205
|
+
executeCommand: (command: string, value?: string) => void;
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Example usage:
|
|
210
|
+
```tsx
|
|
211
|
+
import { useRef } from 'react';
|
|
212
|
+
import { TextEditor, TextEditorRef } from "@abduljebar/text-editor";
|
|
213
|
+
|
|
214
|
+
function EditorWithRef() {
|
|
215
|
+
const editorRef = useRef<TextEditorRef>(null);
|
|
216
|
+
|
|
217
|
+
const handleGetContent = () => {
|
|
218
|
+
if (editorRef.current) {
|
|
219
|
+
const content = editorRef.current.getContent();
|
|
220
|
+
const html = editorRef.current.getHTML();
|
|
221
|
+
console.log({ content, html });
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
return (
|
|
226
|
+
<>
|
|
227
|
+
<TextEditor ref={editorRef} />
|
|
228
|
+
<button onClick={handleGetContent}>Get Content</button>
|
|
229
|
+
</>
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
```
|
|
144
233
|
|
|
145
234
|
### useTextEditor Hook
|
|
146
235
|
|
|
@@ -160,12 +249,20 @@ function CustomEditor() {
|
|
|
160
249
|
getValidationResult,
|
|
161
250
|
exportToHTML,
|
|
162
251
|
clearEditor,
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
252
|
+
handlePaste,
|
|
253
|
+
handleDrop,
|
|
254
|
+
insertImage,
|
|
255
|
+
uploadPendingImages,
|
|
256
|
+
} = useTextEditor({
|
|
257
|
+
initialContent: "Initial content",
|
|
258
|
+
onImageUpload: async (file) => {
|
|
259
|
+
// Custom upload logic
|
|
260
|
+
return "https://example.com/image.jpg";
|
|
261
|
+
},
|
|
262
|
+
allowedImageTypes: ["image/jpeg", "image/png"],
|
|
263
|
+
maxImageSize: 10 * 1024 * 1024,
|
|
264
|
+
});
|
|
167
265
|
|
|
168
|
-
// Use the state and methods to build custom UI
|
|
169
266
|
return (
|
|
170
267
|
<div>
|
|
171
268
|
<div
|
|
@@ -173,43 +270,60 @@ function CustomEditor() {
|
|
|
173
270
|
contentEditable
|
|
174
271
|
onInput={(e) => updateContent(e.currentTarget.innerHTML)}
|
|
175
272
|
className="border p-4 min-h-[200px]"
|
|
273
|
+
onPaste={handlePaste}
|
|
274
|
+
onDrop={handleDrop}
|
|
176
275
|
/>
|
|
177
276
|
<button onClick={() => executeCommand('bold')}>
|
|
178
277
|
Bold
|
|
179
278
|
</button>
|
|
279
|
+
<button onClick={() => insertImage(someFile)}>
|
|
280
|
+
Insert Image
|
|
281
|
+
</button>
|
|
180
282
|
</div>
|
|
181
283
|
);
|
|
182
284
|
}
|
|
183
285
|
```
|
|
184
286
|
|
|
287
|
+
#### Hook Parameters
|
|
288
|
+
|
|
289
|
+
| Parameter | Type | Default | Description |
|
|
290
|
+
|-----------|------|---------|-------------|
|
|
291
|
+
| `initialContent` | `string` | `""` | Initial HTML content |
|
|
292
|
+
| `onImageUpload` | `(file: File) => Promise<string>` | `undefined` | Custom image upload handler |
|
|
293
|
+
| `imageUploadEndpoint` | `string` | `undefined` | Endpoint for default image upload |
|
|
294
|
+
| `allowedImageTypes` | `string[]` | `["image/jpeg","image/png","image/gif","image/webp"]` | Allowed image types |
|
|
295
|
+
| `maxImageSize` | `number` | `5242880` | Max image size in bytes |
|
|
296
|
+
|
|
185
297
|
#### Hook Return Values
|
|
186
298
|
|
|
187
299
|
| Property | Type | Description |
|
|
188
300
|
|----------|------|-------------|
|
|
189
|
-
| `editorState` | `object` | Current editor state
|
|
190
|
-
| `editorRef` | `RefObject
|
|
301
|
+
| `editorState` | `object` | Current editor state with content, title, counts, pending images |
|
|
302
|
+
| `editorRef` | `RefObject<HTMLDivElement>` | Reference to the editable element |
|
|
191
303
|
| `updateContent` | `(content: string) => void` | Update editor content |
|
|
192
304
|
| `updateTitle` | `(title: string) => void` | Update document title |
|
|
193
305
|
| `executeCommand` | `(command: string, value?: string) => void` | Execute formatting commands |
|
|
194
306
|
| `getValidationResult` | `() => ValidationResult` | Validate and get editor data |
|
|
195
307
|
| `exportToHTML` | `(options?) => string` | Generate HTML export |
|
|
196
308
|
| `clearEditor` | `() => void` | Clear all content |
|
|
197
|
-
| `
|
|
198
|
-
| `
|
|
199
|
-
| `
|
|
309
|
+
| `handlePaste` | `(e: React.ClipboardEvent) => void` | Handle paste events |
|
|
310
|
+
| `handleDrop` | `(e: React.DragEvent) => void` | Handle drop events |
|
|
311
|
+
| `insertImage` | `(file: File, atCursor?: boolean) => Promise<void>` | Insert image into editor |
|
|
312
|
+
| `uploadPendingImages` | `() => Promise<void>` | Upload all pending images |
|
|
200
313
|
|
|
201
314
|
## 🎨 Styling & Customization
|
|
202
315
|
|
|
203
316
|
### Default Styling
|
|
204
317
|
|
|
205
|
-
The editor comes with beautiful default styling
|
|
318
|
+
The editor comes with beautiful default styling:
|
|
206
319
|
|
|
207
|
-
- **Headings**: Proper hierarchy with
|
|
320
|
+
- **Headings**: Proper hierarchy with appropriate sizing
|
|
208
321
|
- **Paragraphs**: Optimal line height and margins
|
|
209
322
|
- **Lists**: Clean indentation and spacing
|
|
210
|
-
- **Code Blocks**:
|
|
323
|
+
- **Code Blocks**: Proper monospace fonts
|
|
211
324
|
- **Quotes**: Elegant bordered design
|
|
212
|
-
- **Links**:
|
|
325
|
+
- **Links**: Proper styling with hover effects
|
|
326
|
+
- **Images**: Responsive with rounded corners
|
|
213
327
|
|
|
214
328
|
### Custom Styling
|
|
215
329
|
|
|
@@ -220,18 +334,25 @@ import '@abduljebar/text-editor/dist/index.css';
|
|
|
220
334
|
import { TextEditor } from "@abduljebar/text-editor";
|
|
221
335
|
|
|
222
336
|
<TextEditor
|
|
223
|
-
className="custom-editor
|
|
337
|
+
className="my-custom-editor"
|
|
224
338
|
// ... other props
|
|
225
339
|
/>
|
|
226
340
|
```
|
|
227
341
|
|
|
228
342
|
```css
|
|
229
|
-
.custom-editor
|
|
230
|
-
|
|
343
|
+
.my-custom-editor {
|
|
344
|
+
border: 2px solid #4f46e5;
|
|
345
|
+
border-radius: 12px;
|
|
346
|
+
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.my-custom-editor h1 {
|
|
350
|
+
color: #4f46e5;
|
|
351
|
+
border-bottom: 2px solid #e0e7ff;
|
|
231
352
|
}
|
|
232
353
|
|
|
233
|
-
.custom-editor
|
|
234
|
-
|
|
354
|
+
.my-custom-editor .toolbar {
|
|
355
|
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
235
356
|
}
|
|
236
357
|
```
|
|
237
358
|
|
|
@@ -275,24 +396,25 @@ import '@abduljebar/text-editor/dist/index.css';
|
|
|
275
396
|
import { useTextEditor } from "@abduljebar/text-editor";
|
|
276
397
|
|
|
277
398
|
function CustomToolbarEditor() {
|
|
278
|
-
const { executeCommand,
|
|
399
|
+
const { executeCommand, editorRef, insertImage } = useTextEditor({
|
|
400
|
+
initialContent: "Start typing...",
|
|
401
|
+
});
|
|
402
|
+
|
|
403
|
+
const handleFileSelect = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
404
|
+
const file = e.target.files?.[0];
|
|
405
|
+
if (file) {
|
|
406
|
+
insertImage(file);
|
|
407
|
+
}
|
|
408
|
+
};
|
|
279
409
|
|
|
280
410
|
return (
|
|
281
411
|
<div className="editor-container">
|
|
282
412
|
<div className="custom-toolbar">
|
|
283
|
-
<button
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
>
|
|
287
|
-
|
|
288
|
-
</button>
|
|
289
|
-
<button
|
|
290
|
-
onClick={() => executeCommand('italic')}
|
|
291
|
-
className={activeFormats.italic ? 'active' : ''}
|
|
292
|
-
>
|
|
293
|
-
I
|
|
294
|
-
</button>
|
|
295
|
-
{/* Add more custom buttons */}
|
|
413
|
+
<button onClick={() => executeCommand('bold')}>Bold</button>
|
|
414
|
+
<button onClick={() => executeCommand('italic')}>Italic</button>
|
|
415
|
+
<button onClick={() => executeCommand('formatBlock', 'h1')}>H1</button>
|
|
416
|
+
<button onClick={() => executeCommand('formatBlock', 'h2')}>H2</button>
|
|
417
|
+
<input type="file" accept="image/*" onChange={handleFileSelect} />
|
|
296
418
|
</div>
|
|
297
419
|
<div
|
|
298
420
|
ref={editorRef}
|
|
@@ -304,17 +426,44 @@ function CustomToolbarEditor() {
|
|
|
304
426
|
}
|
|
305
427
|
```
|
|
306
428
|
|
|
307
|
-
|
|
429
|
+
### Programmatic Control
|
|
308
430
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
431
|
+
```tsx
|
|
432
|
+
import { useRef, useEffect } from 'react';
|
|
433
|
+
import { TextEditor, TextEditorRef } from "@abduljebar/text-editor";
|
|
434
|
+
|
|
435
|
+
function ProgrammaticEditor() {
|
|
436
|
+
const editorRef = useRef<TextEditorRef>(null);
|
|
437
|
+
|
|
438
|
+
useEffect(() => {
|
|
439
|
+
// Example: Auto-insert content after 2 seconds
|
|
440
|
+
const timer = setTimeout(() => {
|
|
441
|
+
if (editorRef.current) {
|
|
442
|
+
editorRef.current.insertText("Hello, world!");
|
|
443
|
+
editorRef.current.focus();
|
|
444
|
+
}
|
|
445
|
+
}, 2000);
|
|
446
|
+
|
|
447
|
+
return () => clearTimeout(timer);
|
|
448
|
+
}, []);
|
|
449
|
+
|
|
450
|
+
const handleCommand = (command: string) => {
|
|
451
|
+
if (editorRef.current) {
|
|
452
|
+
editorRef.current.executeCommand(command);
|
|
453
|
+
}
|
|
454
|
+
};
|
|
314
455
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
456
|
+
return (
|
|
457
|
+
<div>
|
|
458
|
+
<TextEditor ref={editorRef} />
|
|
459
|
+
<div className="mt-4">
|
|
460
|
+
<button onClick={() => handleCommand('bold')}>Make Selection Bold</button>
|
|
461
|
+
<button onClick={() => editorRef.current?.clear()}>Clear Editor</button>
|
|
462
|
+
</div>
|
|
463
|
+
</div>
|
|
464
|
+
);
|
|
465
|
+
}
|
|
466
|
+
```
|
|
318
467
|
|
|
319
468
|
## 📋 Browser Support
|
|
320
469
|
|
|
@@ -322,6 +471,7 @@ function CustomToolbarEditor() {
|
|
|
322
471
|
- Firefox 55+
|
|
323
472
|
- Safari 12+
|
|
324
473
|
- Edge 79+
|
|
474
|
+
- Opera 47+
|
|
325
475
|
|
|
326
476
|
## 🔒 Accessibility
|
|
327
477
|
|
|
@@ -329,25 +479,48 @@ function CustomToolbarEditor() {
|
|
|
329
479
|
- ARIA labels for toolbar buttons
|
|
330
480
|
- Focus management
|
|
331
481
|
- Screen reader compatible
|
|
482
|
+
- Proper semantic HTML structure
|
|
332
483
|
|
|
333
484
|
## 🐛 Troubleshooting
|
|
334
485
|
|
|
335
486
|
### Common Issues
|
|
336
487
|
|
|
337
|
-
1. **
|
|
338
|
-
2. **
|
|
339
|
-
3. **
|
|
488
|
+
1. **Toolbar buttons not working**: Ensure the editor is focused and content is selected
|
|
489
|
+
2. **Images not uploading**: Check CORS settings and upload endpoint configuration
|
|
490
|
+
3. **Styles not appearing**: Import the CSS file: `import '@abduljebar/text-editor/dist/index.css';`
|
|
491
|
+
4. **Content not saving**: Check `onSave` callback and validation messages
|
|
492
|
+
5. **Formatting lost on paste**: Use the built-in `handlePaste` function
|
|
340
493
|
|
|
341
494
|
### Performance Tips
|
|
342
495
|
|
|
343
|
-
- Use `
|
|
344
|
-
-
|
|
345
|
-
- Consider using
|
|
496
|
+
- Use appropriate `debounceDelay` for `onChange` to prevent excessive updates
|
|
497
|
+
- Implement proper image compression before upload
|
|
498
|
+
- Consider using `React.memo` if embedding in frequently re-rendering components
|
|
499
|
+
- Use the ref API for programmatic control instead of frequent state updates
|
|
500
|
+
|
|
501
|
+
## 📄 Supported Commands
|
|
502
|
+
|
|
503
|
+
The editor supports standard `document.execCommand` APIs:
|
|
504
|
+
|
|
505
|
+
- **Formatting**: `bold`, `italic`, `underline`, `strikeThrough`
|
|
506
|
+
- **Headings**: `formatBlock` (with `h1`, `h2`, `h3`, `p` values)
|
|
507
|
+
- **Lists**: `insertUnorderedList`, `insertOrderedList`
|
|
508
|
+
- **Alignment**: `justifyLeft`, `justifyCenter`, `justifyRight`
|
|
509
|
+
- **Indentation**: `indent`, `outdent`
|
|
510
|
+
- **Links**: `createLink` (with URL value)
|
|
511
|
+
- **History**: `undo`, `redo`
|
|
512
|
+
- **Special**: `superscript`, `subscript`, `formatBlock` (with `blockquote`, `pre` values)
|
|
346
513
|
|
|
347
514
|
## 🤝 Contributing
|
|
348
515
|
|
|
349
516
|
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
|
|
350
517
|
|
|
518
|
+
1. Fork the repository
|
|
519
|
+
2. Create a feature branch
|
|
520
|
+
3. Make your changes
|
|
521
|
+
4. Add tests if applicable
|
|
522
|
+
5. Submit a pull request
|
|
523
|
+
|
|
351
524
|
## 📄 License
|
|
352
525
|
|
|
353
526
|
MIT License - see the [LICENSE](LICENSE) file for details.
|
|
@@ -356,18 +529,37 @@ MIT License - see the [LICENSE](LICENSE) file for details.
|
|
|
356
529
|
|
|
357
530
|
If you encounter any issues or have questions:
|
|
358
531
|
|
|
359
|
-
1. Check the
|
|
360
|
-
2. Search
|
|
361
|
-
3. Create a
|
|
532
|
+
1. Check the documentation above
|
|
533
|
+
2. Search existing GitHub issues
|
|
534
|
+
3. Create a new issue with:
|
|
535
|
+
- A clear description of the problem
|
|
536
|
+
- Steps to reproduce
|
|
537
|
+
- Expected vs actual behavior
|
|
538
|
+
- Code examples if applicable
|
|
362
539
|
|
|
363
540
|
## 🚀 Changelog
|
|
364
541
|
|
|
542
|
+
### v1.1.0
|
|
543
|
+
- Added image upload support with drag & drop
|
|
544
|
+
- Improved toolbar with better selection tracking
|
|
545
|
+
- Added ref API for programmatic control
|
|
546
|
+
- Enhanced keyboard shortcuts
|
|
547
|
+
- Better validation and error handling
|
|
548
|
+
- Added pending images tracking
|
|
549
|
+
|
|
365
550
|
### v1.0.0
|
|
366
551
|
- Initial release with core editing features
|
|
367
|
-
-
|
|
368
|
-
-
|
|
552
|
+
- Basic text formatting and styling
|
|
553
|
+
- HTML export functionality
|
|
369
554
|
- React hook for advanced usage
|
|
370
555
|
|
|
371
556
|
---
|
|
372
557
|
|
|
373
|
-
Built with ❤️ by [AbdulJebar Sani](https://github.com/abduljebar49)
|
|
558
|
+
Built with ❤️ by [AbdulJebar Sani](https://github.com/abduljebar49)
|
|
559
|
+
|
|
560
|
+
## 🔗 Links
|
|
561
|
+
|
|
562
|
+
- [GitHub Repository](https://github.com/abduljebar/text-editor)
|
|
563
|
+
- [npm Package](https://www.npmjs.com/package/@abduljebar/text-editor)
|
|
564
|
+
- [Issue Tracker](https://github.com/abduljebar/text-editor/issues)
|
|
565
|
+
- [Documentation](https://github.com/abduljebar/text-editor#readme)
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-orange-600:oklch(64.6% .222 41.116);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-medium:500;--font-weight-bold:700;--radius-md:.375rem;--radius-lg:.5rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.-top-2{top:calc(var(--spacing)*-2)}.top-6{top:calc(var(--spacing)*6)}.-right-2{right:calc(var(--spacing)*-2)}.right-2{right:calc(var(--spacing)*2)}.bottom-2{bottom:calc(var(--spacing)*2)}.left-6{left:calc(var(--spacing)*6)}.order-1{order:1}.order-2{order:2}.order-3{order:3}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-0\.5{margin-inline:calc(var(--spacing)*.5)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-2{margin-right:calc(var(--spacing)*2)}.block{display:block}.flex{display:flex}.hidden{display:none}.inline{display:inline}.h-2{height:calc(var(--spacing)*2)}.h-4{height:calc(var(--spacing)*4)}.h-6{height:calc(var(--spacing)*6)}.h-9{height:calc(var(--spacing)*9)}.h-auto{height:auto}.min-h-\[200px\]{min-height:200px}.min-h-\[400px\]{min-height:400px}.w-2{width:calc(var(--spacing)*2)}.w-4{width:calc(var(--spacing)*4)}.w-full{width:100%}.w-px{width:1px}.max-w-full{max-width:100%}.min-w-\[36px\]{min-width:36px}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-text{cursor:text}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-6{gap:calc(var(--spacing)*6)}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-blue-100{border-color:var(--color-blue-100)}.border-blue-300{border-color:var(--color-blue-300)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-green-100{border-color:var(--color-green-100)}.border-red-100{border-color:var(--color-red-100)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-600{background-color:var(--color-green-600)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-600{background-color:var(--color-red-600)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.bg-white\/80{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-gray-50{--tw-gradient-from:var(--color-gray-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-white{--tw-gradient-to:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.pr-2{padding-right:calc(var(--spacing)*2)}.text-right{text-align:right}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-amber-600{color:var(--color-amber-600)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-orange-600{color:var(--color-orange-600)}.text-red-700{color:var(--color-red-700)}.text-white{color:var(--color-white)}.italic{font-style:italic}.underline{text-decoration-line:underline}.opacity-80{opacity:.8}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.placeholder\:text-gray-400::-moz-placeholder{color:var(--color-gray-400)}.placeholder\:text-gray-400::placeholder{color:var(--color-gray-400)}.last\:mr-0:last-child{margin-right:calc(var(--spacing)*0)}.last\:border-r-0:last-child{border-right-style:var(--tw-border-style);border-right-width:0}.last\:pr-0:last-child{padding-right:calc(var(--spacing)*0)}@media(hover:hover){.hover\:border-gray-400:hover{border-color:var(--color-gray-400)}.hover\:bg-blue-200:hover{background-color:var(--color-blue-200)}.hover\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:bg-green-700:hover{background-color:var(--color-green-700)}.hover\:bg-red-700:hover{background-color:var(--color-red-700)}}.active\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-blue-300:disabled{background-color:var(--color-blue-300)}.disabled\:opacity-50:disabled{opacity:.5}@media(min-width:40rem){.sm\:order-2{order:2}.sm\:order-3{order:3}.sm\:mt-0{margin-top:calc(var(--spacing)*0)}.sm\:inline{display:inline}.sm\:w-auto{width:auto}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}}@media(min-width:48rem){.md\:block{display:block}.md\:p-6{padding:calc(var(--spacing)*6)}.md\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}
|
|
1
|
+
@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-orange-600:oklch(64.6% .222 41.116);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-medium:500;--font-weight-bold:700;--radius-md:.375rem;--radius-lg:.5rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.-top-2{top:calc(var(--spacing)*-2)}.top-6{top:calc(var(--spacing)*6)}.-right-2{right:calc(var(--spacing)*-2)}.right-2{right:calc(var(--spacing)*2)}.bottom-2{bottom:calc(var(--spacing)*2)}.left-6{left:calc(var(--spacing)*6)}.order-1{order:1}.order-2{order:2}.order-3{order:3}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-0\.5{margin-inline:calc(var(--spacing)*.5)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mr-2{margin-right:calc(var(--spacing)*2)}.block{display:block}.flex{display:flex}.hidden{display:none}.inline{display:inline}.h-2{height:calc(var(--spacing)*2)}.h-4{height:calc(var(--spacing)*4)}.h-6{height:calc(var(--spacing)*6)}.h-9{height:calc(var(--spacing)*9)}.h-auto{height:auto}.min-h-\[200px\]{min-height:200px}.min-h-\[400px\]{min-height:400px}.w-2{width:calc(var(--spacing)*2)}.w-4{width:calc(var(--spacing)*4)}.w-full{width:100%}.w-px{width:1px}.max-w-full{max-width:100%}.min-w-\[36px\]{min-width:36px}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-text{cursor:text}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-6{gap:calc(var(--spacing)*6)}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-blue-100{border-color:var(--color-blue-100)}.border-blue-300{border-color:var(--color-blue-300)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-green-100{border-color:var(--color-green-100)}.border-red-100{border-color:var(--color-red-100)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-600{background-color:var(--color-green-600)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-600{background-color:var(--color-red-600)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.bg-white\/80{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-gray-50{--tw-gradient-from:var(--color-gray-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-white{--tw-gradient-to:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.pr-2{padding-right:calc(var(--spacing)*2)}.text-right{text-align:right}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-amber-600{color:var(--color-amber-600)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-orange-600{color:var(--color-orange-600)}.text-red-700{color:var(--color-red-700)}.text-white{color:var(--color-white)}.italic{font-style:italic}.underline{text-decoration-line:underline}.opacity-80{opacity:.8}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.placeholder\:text-gray-400::-moz-placeholder{color:var(--color-gray-400)}.placeholder\:text-gray-400::placeholder{color:var(--color-gray-400)}.last\:mr-0:last-child{margin-right:calc(var(--spacing)*0)}.last\:border-r-0:last-child{border-right-style:var(--tw-border-style);border-right-width:0}.last\:pr-0:last-child{padding-right:calc(var(--spacing)*0)}@media(hover:hover){.hover\:border-gray-400:hover{border-color:var(--color-gray-400)}.hover\:bg-blue-200:hover{background-color:var(--color-blue-200)}.hover\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:bg-green-700:hover{background-color:var(--color-green-700)}.hover\:bg-red-700:hover{background-color:var(--color-red-700)}}.active\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-blue-300:disabled{background-color:var(--color-blue-300)}.disabled\:opacity-50:disabled{opacity:.5}@media(min-width:40rem){.sm\:order-2{order:2}.sm\:order-3{order:3}.sm\:mt-0{margin-top:calc(var(--spacing)*0)}.sm\:inline{display:inline}.sm\:w-auto{width:auto}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}}@media(min-width:48rem){.md\:block{display:block}.md\:p-6{padding:calc(var(--spacing)*6)}.md\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(se,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react"),require("lucide-react")):typeof define=="function"&&define.amd?define(["exports","react","lucide-react"],y):(se=typeof globalThis<"u"?globalThis:se||self,y(se.TextEditor={},se.React,se.LucideReact))})(this,(function(se,y,N){"use strict";var Ge=document.createElement("style");Ge.textContent=`@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-orange-600:oklch(64.6% .222 41.116);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-medium:500;--font-weight-bold:700;--radius-md:.375rem;--radius-lg:.5rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.-top-2{top:calc(var(--spacing)*-2)}.top-6{top:calc(var(--spacing)*6)}.-right-2{right:calc(var(--spacing)*-2)}.right-2{right:calc(var(--spacing)*2)}.bottom-2{bottom:calc(var(--spacing)*2)}.left-6{left:calc(var(--spacing)*6)}.order-1{order:1}.order-2{order:2}.order-3{order:3}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-0\\.5{margin-inline:calc(var(--spacing)*.5)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-2{margin-right:calc(var(--spacing)*2)}.block{display:block}.flex{display:flex}.hidden{display:none}.inline{display:inline}.h-2{height:calc(var(--spacing)*2)}.h-4{height:calc(var(--spacing)*4)}.h-6{height:calc(var(--spacing)*6)}.h-9{height:calc(var(--spacing)*9)}.h-auto{height:auto}.min-h-\\[200px\\]{min-height:200px}.min-h-\\[400px\\]{min-height:400px}.w-2{width:calc(var(--spacing)*2)}.w-4{width:calc(var(--spacing)*4)}.w-full{width:100%}.w-px{width:1px}.max-w-full{max-width:100%}.min-w-\\[36px\\]{min-width:36px}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-text{cursor:text}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-6{gap:calc(var(--spacing)*6)}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-blue-100{border-color:var(--color-blue-100)}.border-blue-300{border-color:var(--color-blue-300)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-green-100{border-color:var(--color-green-100)}.border-red-100{border-color:var(--color-red-100)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-600{background-color:var(--color-green-600)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-600{background-color:var(--color-red-600)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.bg-white\\/80{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-gray-50{--tw-gradient-from:var(--color-gray-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-white{--tw-gradient-to:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.pr-2{padding-right:calc(var(--spacing)*2)}.text-right{text-align:right}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-amber-600{color:var(--color-amber-600)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-orange-600{color:var(--color-orange-600)}.text-red-700{color:var(--color-red-700)}.text-white{color:var(--color-white)}.italic{font-style:italic}.underline{text-decoration-line:underline}.opacity-80{opacity:.8}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.placeholder\\:text-gray-400::-moz-placeholder{color:var(--color-gray-400)}.placeholder\\:text-gray-400::placeholder{color:var(--color-gray-400)}.last\\:mr-0:last-child{margin-right:calc(var(--spacing)*0)}.last\\:border-r-0:last-child{border-right-style:var(--tw-border-style);border-right-width:0}.last\\:pr-0:last-child{padding-right:calc(var(--spacing)*0)}@media(hover:hover){.hover\\:border-gray-400:hover{border-color:var(--color-gray-400)}.hover\\:bg-blue-200:hover{background-color:var(--color-blue-200)}.hover\\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\\:bg-green-700:hover{background-color:var(--color-green-700)}.hover\\:bg-red-700:hover{background-color:var(--color-red-700)}}.active\\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-blue-300:disabled{background-color:var(--color-blue-300)}.disabled\\:opacity-50:disabled{opacity:.5}@media(min-width:40rem){.sm\\:order-2{order:2}.sm\\:order-3{order:3}.sm\\:mt-0{margin-top:calc(var(--spacing)*0)}.sm\\:inline{display:inline}.sm\\:w-auto{width:auto}.sm\\:flex-row{flex-direction:row}.sm\\:items-center{align-items:center}}@media(min-width:48rem){.md\\:block{display:block}.md\\:p-6{padding:calc(var(--spacing)*6)}.md\\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}
|
|
1
|
+
(function(se,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react"),require("lucide-react")):typeof define=="function"&&define.amd?define(["exports","react","lucide-react"],y):(se=typeof globalThis<"u"?globalThis:se||self,y(se.TextEditor={},se.React,se.LucideReact))})(this,(function(se,y,N){"use strict";var Ge=document.createElement("style");Ge.textContent=`@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-orange-600:oklch(64.6% .222 41.116);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--font-weight-medium:500;--font-weight-bold:700;--radius-md:.375rem;--radius-lg:.5rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.-top-2{top:calc(var(--spacing)*-2)}.top-6{top:calc(var(--spacing)*6)}.-right-2{right:calc(var(--spacing)*-2)}.right-2{right:calc(var(--spacing)*2)}.bottom-2{bottom:calc(var(--spacing)*2)}.left-6{left:calc(var(--spacing)*6)}.order-1{order:1}.order-2{order:2}.order-3{order:3}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-0\\.5{margin-inline:calc(var(--spacing)*.5)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mr-2{margin-right:calc(var(--spacing)*2)}.block{display:block}.flex{display:flex}.hidden{display:none}.inline{display:inline}.h-2{height:calc(var(--spacing)*2)}.h-4{height:calc(var(--spacing)*4)}.h-6{height:calc(var(--spacing)*6)}.h-9{height:calc(var(--spacing)*9)}.h-auto{height:auto}.min-h-\\[200px\\]{min-height:200px}.min-h-\\[400px\\]{min-height:400px}.w-2{width:calc(var(--spacing)*2)}.w-4{width:calc(var(--spacing)*4)}.w-full{width:100%}.w-px{width:1px}.max-w-full{max-width:100%}.min-w-\\[36px\\]{min-width:36px}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-text{cursor:text}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-6{gap:calc(var(--spacing)*6)}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-blue-100{border-color:var(--color-blue-100)}.border-blue-300{border-color:var(--color-blue-300)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-green-100{border-color:var(--color-green-100)}.border-red-100{border-color:var(--color-red-100)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-600{background-color:var(--color-green-600)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-600{background-color:var(--color-red-600)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.bg-white\\/80{background-color:color-mix(in oklab,var(--color-white)80%,transparent)}}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-gray-50{--tw-gradient-from:var(--color-gray-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-white{--tw-gradient-to:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.pr-2{padding-right:calc(var(--spacing)*2)}.text-right{text-align:right}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-amber-600{color:var(--color-amber-600)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-orange-600{color:var(--color-orange-600)}.text-red-700{color:var(--color-red-700)}.text-white{color:var(--color-white)}.italic{font-style:italic}.underline{text-decoration-line:underline}.opacity-80{opacity:.8}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.placeholder\\:text-gray-400::-moz-placeholder{color:var(--color-gray-400)}.placeholder\\:text-gray-400::placeholder{color:var(--color-gray-400)}.last\\:mr-0:last-child{margin-right:calc(var(--spacing)*0)}.last\\:border-r-0:last-child{border-right-style:var(--tw-border-style);border-right-width:0}.last\\:pr-0:last-child{padding-right:calc(var(--spacing)*0)}@media(hover:hover){.hover\\:border-gray-400:hover{border-color:var(--color-gray-400)}.hover\\:bg-blue-200:hover{background-color:var(--color-blue-200)}.hover\\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\\:bg-green-700:hover{background-color:var(--color-green-700)}.hover\\:bg-red-700:hover{background-color:var(--color-red-700)}}.active\\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-blue-300:disabled{background-color:var(--color-blue-300)}.disabled\\:opacity-50:disabled{opacity:.5}@media(min-width:40rem){.sm\\:order-2{order:2}.sm\\:order-3{order:3}.sm\\:mt-0{margin-top:calc(var(--spacing)*0)}.sm\\:inline{display:inline}.sm\\:w-auto{width:auto}.sm\\:flex-row{flex-direction:row}.sm\\:items-center{align-items:center}}@media(min-width:48rem){.md\\:block{display:block}.md\\:p-6{padding:calc(var(--spacing)*6)}.md\\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}
|
|
2
2
|
/*$vite$:1*/`,document.head.appendChild(Ge);var be=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function At(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xe={exports:{}},ge={};var We;function zt(){if(We)return ge;We=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(o,a,u){var c=null;if(u!==void 0&&(c=""+u),a.key!==void 0&&(c=""+a.key),"key"in a){u={};for(var i in a)i!=="key"&&(u[i]=a[i])}else u=a;return a=u.ref,{$$typeof:e,type:o,key:c,ref:a!==void 0?a:null,props:u}}return ge.Fragment=t,ge.jsx=r,ge.jsxs=r,ge}var pe={};var Ve;function _t(){return Ve||(Ve=1,process.env.NODE_ENV!=="production"&&(function(){function e(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===S?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case O:return"Fragment";case W:return"Profiler";case J:return"StrictMode";case Y:return"Suspense";case X:return"SuspenseList";case w:return"Activity"}if(typeof n=="object")switch(typeof n.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),n.$$typeof){case B:return"Portal";case I:return n.displayName||"Context";case C:return(n._context.displayName||"Context")+".Consumer";case K:var j=n.render;return n=n.displayName,n||(n=j.displayName||j.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case h:return j=n.displayName||null,j!==null?j:e(n.type)||"Memo";case d:j=n._payload,n=n._init;try{return e(n(j))}catch{}}return null}function t(n){return""+n}function r(n){try{t(n);var j=!1}catch{j=!0}if(j){j=console;var k=j.error,R=typeof Symbol=="function"&&Symbol.toStringTag&&n[Symbol.toStringTag]||n.constructor.name||"Object";return k.call(j,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",R),t(n)}}function o(n){if(n===O)return"<>";if(typeof n=="object"&&n!==null&&n.$$typeof===d)return"<...>";try{var j=e(n);return j?"<"+j+">":"<...>"}catch{return"<...>"}}function a(){var n=x.A;return n===null?null:n.getOwner()}function u(){return Error("react-stack-top-frame")}function c(n){if(v.call(n,"key")){var j=Object.getOwnPropertyDescriptor(n,"key").get;if(j&&j.isReactWarning)return!1}return n.key!==void 0}function i(n,j){function k(){M||(M=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",j))}k.isReactWarning=!0,Object.defineProperty(n,"key",{get:k,configurable:!0})}function m(){var n=e(this.type);return G[n]||(G[n]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),n=this.props.ref,n!==void 0?n:null}function f(n,j,k,R,ee,ne){var E=k.ref;return n={$$typeof:T,type:n,key:j,props:k,_owner:R},(E!==void 0?E:null)!==null?Object.defineProperty(n,"ref",{enumerable:!1,get:m}):Object.defineProperty(n,"ref",{enumerable:!1,value:null}),n._store={},Object.defineProperty(n._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(n,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(n,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ee}),Object.defineProperty(n,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ne}),Object.freeze&&(Object.freeze(n.props),Object.freeze(n)),n}function A(n,j,k,R,ee,ne){var E=j.children;if(E!==void 0)if(R)if(z(E)){for(R=0;R<E.length;R++)L(E[R]);Object.freeze&&Object.freeze(E)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else L(E);if(v.call(j,"key")){E=e(n);var $=Object.keys(j).filter(function(ae){return ae!=="key"});R=0<$.length?"{key: someKey, "+$.join(": ..., ")+": ...}":"{key: someKey}",re[E+R]||($=0<$.length?"{"+$.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
3
3
|
let props = %s;
|
|
4
4
|
<%s {...props} />
|