@lumir-company/editor 0.4.1 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,6 +1,55 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { PartialBlock, DefaultBlockSchema, DefaultInlineContentSchema, DefaultStyleSchema, BlockNoteEditor } from '@blocknote/core';
2
+ import * as _blocknote_core from '@blocknote/core';
3
+ import { PartialBlock, DefaultBlockSchema, DefaultInlineContentSchema, DefaultStyleSchema, BlockNoteEditor, BlockNoteSchema } from '@blocknote/core';
3
4
  export { BlockNoteEditor, DefaultBlockSchema, DefaultInlineContentSchema, DefaultStyleSchema, PartialBlock } from '@blocknote/core';
5
+ import React from 'react';
6
+
7
+ /**
8
+ * LumirEditor 커스텀 에러 클래스
9
+ */
10
+ type LumirErrorCode = "UPLOAD_FAILED" | "INVALID_FILE_TYPE" | "S3_CONFIG_ERROR" | "PRESIGNED_URL_ERROR" | "NETWORK_ERROR" | "EDITOR_ERROR" | "UNKNOWN_ERROR";
11
+ interface LumirErrorDetails {
12
+ code: LumirErrorCode;
13
+ originalError?: Error;
14
+ context?: Record<string, unknown>;
15
+ }
16
+ /**
17
+ * LumirEditor에서 발생하는 에러를 위한 커스텀 에러 클래스
18
+ */
19
+ declare class LumirEditorError extends Error {
20
+ readonly code: LumirErrorCode;
21
+ readonly originalError?: Error;
22
+ readonly context?: Record<string, unknown>;
23
+ constructor(message: string, details?: Partial<LumirErrorDetails>);
24
+ /**
25
+ * 에러 정보를 JSON 형태로 반환
26
+ */
27
+ toJSON(): Record<string, unknown>;
28
+ /**
29
+ * 사용자 친화적 에러 메시지 반환
30
+ */
31
+ getUserMessage(): string;
32
+ /**
33
+ * 일반 Error를 LumirEditorError로 변환
34
+ */
35
+ static fromError(error: Error, code?: LumirErrorCode, context?: Record<string, unknown>): LumirEditorError;
36
+ /**
37
+ * 업로드 실패 에러 생성
38
+ */
39
+ static uploadFailed(message: string, originalError?: Error): LumirEditorError;
40
+ /**
41
+ * 잘못된 파일 형식 에러 생성
42
+ */
43
+ static invalidFileType(fileName: string): LumirEditorError;
44
+ /**
45
+ * S3 설정 에러 생성
46
+ */
47
+ static s3ConfigError(message: string): LumirEditorError;
48
+ /**
49
+ * 네트워크 에러 생성
50
+ */
51
+ static networkError(originalError?: Error): LumirEditorError;
52
+ }
4
53
 
5
54
  /**
6
55
  * LumirEditor에서 사용하는 BlockNote 에디터 타입
@@ -59,7 +108,22 @@ interface LumirEditorProps {
59
108
  onSelectionChange?: () => void;
60
109
  className?: string;
61
110
  sideMenuAddButton?: boolean;
111
+ floatingMenu?: boolean;
112
+ floatingMenuPosition?: "sticky" | "fixed";
113
+ linkPreview?: {
114
+ /** 링크 메타데이터를 가져올 API 엔드포인트 (예: "/api/link-preview") */
115
+ apiEndpoint: string;
116
+ };
62
117
  onContentChange?: (content: DefaultPartialBlock[]) => void;
118
+ /** 에러 발생 시 호출되는 콜백 */
119
+ onError?: (error: LumirEditorError) => void;
120
+ /**
121
+ * 이미지가 에디터에서 삭제될 때 호출되는 콜백
122
+ * - S3 등 외부 스토리지에서 이미지를 삭제하는 용도로 사용
123
+ * - Undo/Redo를 고려하여 지연 삭제를 권장
124
+ * @param imageUrl 삭제된 이미지의 URL
125
+ */
126
+ onImageDelete?: (imageUrl: string) => void;
63
127
  }
64
128
 
65
129
  /**
@@ -132,7 +196,7 @@ declare class EditorConfig {
132
196
  */
133
197
  static getDisabledExtensions(userExtensions?: string[], allowVideo?: boolean, allowAudio?: boolean, allowFile?: boolean): string[];
134
198
  }
135
- declare function LumirEditor({ initialContent, initialEmptyBlocks, uploadFile, s3Upload, tables, heading, defaultStyles, disableExtensions, tabBehavior, trailingBlock, allowVideoUpload, allowAudioUpload, allowFileUpload, editable, theme, formattingToolbar, linkToolbar, sideMenu, emojiPicker, filePanel, tableHandles, onSelectionChange, className, sideMenuAddButton, onContentChange, }: LumirEditorProps): react_jsx_runtime.JSX.Element;
199
+ declare function LumirEditor({ initialContent, initialEmptyBlocks, uploadFile, s3Upload, tables, heading, defaultStyles, disableExtensions, tabBehavior, trailingBlock, allowVideoUpload, allowAudioUpload, allowFileUpload, linkPreview, editable, theme, formattingToolbar, linkToolbar, sideMenu, emojiPicker, filePanel, tableHandles, onSelectionChange, className, placeholder, sideMenuAddButton, floatingMenu, floatingMenuPosition, onContentChange, onError, onImageDelete, }: LumirEditorProps): react_jsx_runtime.JSX.Element;
136
200
 
137
201
  declare function cn(...inputs: (string | undefined | null | false)[]): string;
138
202
 
@@ -149,4 +213,807 @@ interface S3UploaderConfig {
149
213
  }
150
214
  declare const createS3Uploader: (config: S3UploaderConfig) => (file: File) => Promise<string>;
151
215
 
152
- export { ContentUtils, type DefaultPartialBlock, EditorConfig, type EditorType, LumirEditor, type LumirEditorProps, type S3UploaderConfig, cn, createS3Uploader };
216
+ declare const HtmlPreviewBlock: {
217
+ config: {
218
+ readonly type: "htmlPreview";
219
+ readonly propSchema: {
220
+ readonly htmlContent: {
221
+ readonly default: "";
222
+ };
223
+ readonly fileName: {
224
+ readonly default: "";
225
+ };
226
+ readonly height: {
227
+ readonly default: "400px";
228
+ };
229
+ };
230
+ readonly content: "none";
231
+ };
232
+ implementation: _blocknote_core.TiptapBlockImplementation<{
233
+ readonly type: "htmlPreview";
234
+ readonly propSchema: {
235
+ readonly htmlContent: {
236
+ readonly default: "";
237
+ };
238
+ readonly fileName: {
239
+ readonly default: "";
240
+ };
241
+ readonly height: {
242
+ readonly default: "400px";
243
+ };
244
+ };
245
+ readonly content: "none";
246
+ }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
247
+ };
248
+ declare const schema: BlockNoteSchema<_blocknote_core.BlockSchemaFromSpecs<{
249
+ htmlPreview: {
250
+ config: {
251
+ readonly type: "htmlPreview";
252
+ readonly propSchema: {
253
+ readonly htmlContent: {
254
+ readonly default: "";
255
+ };
256
+ readonly fileName: {
257
+ readonly default: "";
258
+ };
259
+ readonly height: {
260
+ readonly default: "400px";
261
+ };
262
+ };
263
+ readonly content: "none";
264
+ };
265
+ implementation: _blocknote_core.TiptapBlockImplementation<{
266
+ readonly type: "htmlPreview";
267
+ readonly propSchema: {
268
+ readonly htmlContent: {
269
+ readonly default: "";
270
+ };
271
+ readonly fileName: {
272
+ readonly default: "";
273
+ };
274
+ readonly height: {
275
+ readonly default: "400px";
276
+ };
277
+ };
278
+ readonly content: "none";
279
+ }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
280
+ };
281
+ linkPreview: {
282
+ config: {
283
+ readonly type: "linkPreview";
284
+ readonly propSchema: {
285
+ readonly url: {
286
+ readonly default: "";
287
+ };
288
+ readonly title: {
289
+ readonly default: "";
290
+ };
291
+ readonly description: {
292
+ readonly default: "";
293
+ };
294
+ readonly image: {
295
+ readonly default: "";
296
+ };
297
+ readonly domain: {
298
+ readonly default: "";
299
+ };
300
+ readonly previewWidth: {
301
+ readonly default: 400;
302
+ };
303
+ readonly previewHeight: {
304
+ readonly default: 200;
305
+ };
306
+ };
307
+ readonly content: "none";
308
+ };
309
+ implementation: _blocknote_core.TiptapBlockImplementation<{
310
+ readonly type: "linkPreview";
311
+ readonly propSchema: {
312
+ readonly url: {
313
+ readonly default: "";
314
+ };
315
+ readonly title: {
316
+ readonly default: "";
317
+ };
318
+ readonly description: {
319
+ readonly default: "";
320
+ };
321
+ readonly image: {
322
+ readonly default: "";
323
+ };
324
+ readonly domain: {
325
+ readonly default: "";
326
+ };
327
+ readonly previewWidth: {
328
+ readonly default: 400;
329
+ };
330
+ readonly previewHeight: {
331
+ readonly default: 200;
332
+ };
333
+ };
334
+ readonly content: "none";
335
+ }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
336
+ };
337
+ paragraph: {
338
+ config: {
339
+ type: "paragraph";
340
+ content: "inline";
341
+ propSchema: {
342
+ backgroundColor: {
343
+ default: "default";
344
+ };
345
+ textColor: {
346
+ default: "default";
347
+ };
348
+ textAlignment: {
349
+ default: "left";
350
+ values: readonly ["left", "center", "right", "justify"];
351
+ };
352
+ };
353
+ };
354
+ implementation: _blocknote_core.TiptapBlockImplementation<{
355
+ type: "paragraph";
356
+ content: "inline";
357
+ propSchema: {
358
+ backgroundColor: {
359
+ default: "default";
360
+ };
361
+ textColor: {
362
+ default: "default";
363
+ };
364
+ textAlignment: {
365
+ default: "left";
366
+ values: readonly ["left", "center", "right", "justify"];
367
+ };
368
+ };
369
+ }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
370
+ };
371
+ heading: {
372
+ config: {
373
+ type: "heading";
374
+ content: "inline";
375
+ propSchema: {
376
+ level: {
377
+ default: number;
378
+ values: readonly [1, 2, 3, 4, 5, 6];
379
+ };
380
+ isToggleable: {
381
+ default: false;
382
+ };
383
+ backgroundColor: {
384
+ default: "default";
385
+ };
386
+ textColor: {
387
+ default: "default";
388
+ };
389
+ textAlignment: {
390
+ default: "left";
391
+ values: readonly ["left", "center", "right", "justify"];
392
+ };
393
+ };
394
+ };
395
+ implementation: _blocknote_core.TiptapBlockImplementation<{
396
+ type: "heading";
397
+ content: "inline";
398
+ propSchema: {
399
+ level: {
400
+ default: number;
401
+ values: readonly [1, 2, 3, 4, 5, 6];
402
+ };
403
+ isToggleable: {
404
+ default: false;
405
+ };
406
+ backgroundColor: {
407
+ default: "default";
408
+ };
409
+ textColor: {
410
+ default: "default";
411
+ };
412
+ textAlignment: {
413
+ default: "left";
414
+ values: readonly ["left", "center", "right", "justify"];
415
+ };
416
+ };
417
+ }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
418
+ };
419
+ quote: {
420
+ config: {
421
+ type: "quote";
422
+ content: "inline";
423
+ propSchema: {
424
+ backgroundColor: {
425
+ default: "default";
426
+ };
427
+ textColor: {
428
+ default: "default";
429
+ };
430
+ textAlignment: {
431
+ default: "left";
432
+ values: readonly ["left", "center", "right", "justify"];
433
+ };
434
+ };
435
+ };
436
+ implementation: _blocknote_core.TiptapBlockImplementation<{
437
+ type: "quote";
438
+ content: "inline";
439
+ propSchema: {
440
+ backgroundColor: {
441
+ default: "default";
442
+ };
443
+ textColor: {
444
+ default: "default";
445
+ };
446
+ textAlignment: {
447
+ default: "left";
448
+ values: readonly ["left", "center", "right", "justify"];
449
+ };
450
+ };
451
+ }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
452
+ };
453
+ codeBlock: {
454
+ config: {
455
+ type: "codeBlock";
456
+ content: "inline";
457
+ propSchema: {
458
+ language: {
459
+ default: string;
460
+ };
461
+ };
462
+ };
463
+ implementation: _blocknote_core.TiptapBlockImplementation<{
464
+ type: "codeBlock";
465
+ content: "inline";
466
+ propSchema: {
467
+ language: {
468
+ default: string;
469
+ };
470
+ };
471
+ }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
472
+ };
473
+ toggleListItem: {
474
+ config: {
475
+ type: "toggleListItem";
476
+ content: "inline";
477
+ propSchema: {
478
+ backgroundColor: {
479
+ default: "default";
480
+ };
481
+ textColor: {
482
+ default: "default";
483
+ };
484
+ textAlignment: {
485
+ default: "left";
486
+ values: readonly ["left", "center", "right", "justify"];
487
+ };
488
+ };
489
+ };
490
+ implementation: _blocknote_core.TiptapBlockImplementation<{
491
+ type: "toggleListItem";
492
+ content: "inline";
493
+ propSchema: {
494
+ backgroundColor: {
495
+ default: "default";
496
+ };
497
+ textColor: {
498
+ default: "default";
499
+ };
500
+ textAlignment: {
501
+ default: "left";
502
+ values: readonly ["left", "center", "right", "justify"];
503
+ };
504
+ };
505
+ }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
506
+ };
507
+ bulletListItem: {
508
+ config: {
509
+ type: "bulletListItem";
510
+ content: "inline";
511
+ propSchema: {
512
+ backgroundColor: {
513
+ default: "default";
514
+ };
515
+ textColor: {
516
+ default: "default";
517
+ };
518
+ textAlignment: {
519
+ default: "left";
520
+ values: readonly ["left", "center", "right", "justify"];
521
+ };
522
+ };
523
+ };
524
+ implementation: _blocknote_core.TiptapBlockImplementation<{
525
+ type: "bulletListItem";
526
+ content: "inline";
527
+ propSchema: {
528
+ backgroundColor: {
529
+ default: "default";
530
+ };
531
+ textColor: {
532
+ default: "default";
533
+ };
534
+ textAlignment: {
535
+ default: "left";
536
+ values: readonly ["left", "center", "right", "justify"];
537
+ };
538
+ };
539
+ }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
540
+ };
541
+ numberedListItem: {
542
+ config: {
543
+ type: "numberedListItem";
544
+ content: "inline";
545
+ propSchema: {
546
+ start: {
547
+ default: undefined;
548
+ type: "number";
549
+ };
550
+ backgroundColor: {
551
+ default: "default";
552
+ };
553
+ textColor: {
554
+ default: "default";
555
+ };
556
+ textAlignment: {
557
+ default: "left";
558
+ values: readonly ["left", "center", "right", "justify"];
559
+ };
560
+ };
561
+ };
562
+ implementation: _blocknote_core.TiptapBlockImplementation<{
563
+ type: "numberedListItem";
564
+ content: "inline";
565
+ propSchema: {
566
+ start: {
567
+ default: undefined;
568
+ type: "number";
569
+ };
570
+ backgroundColor: {
571
+ default: "default";
572
+ };
573
+ textColor: {
574
+ default: "default";
575
+ };
576
+ textAlignment: {
577
+ default: "left";
578
+ values: readonly ["left", "center", "right", "justify"];
579
+ };
580
+ };
581
+ }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
582
+ };
583
+ checkListItem: {
584
+ config: {
585
+ type: "checkListItem";
586
+ content: "inline";
587
+ propSchema: {
588
+ checked: {
589
+ default: false;
590
+ };
591
+ backgroundColor: {
592
+ default: "default";
593
+ };
594
+ textColor: {
595
+ default: "default";
596
+ };
597
+ textAlignment: {
598
+ default: "left";
599
+ values: readonly ["left", "center", "right", "justify"];
600
+ };
601
+ };
602
+ };
603
+ implementation: _blocknote_core.TiptapBlockImplementation<{
604
+ type: "checkListItem";
605
+ content: "inline";
606
+ propSchema: {
607
+ checked: {
608
+ default: false;
609
+ };
610
+ backgroundColor: {
611
+ default: "default";
612
+ };
613
+ textColor: {
614
+ default: "default";
615
+ };
616
+ textAlignment: {
617
+ default: "left";
618
+ values: readonly ["left", "center", "right", "justify"];
619
+ };
620
+ };
621
+ }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
622
+ };
623
+ table: {
624
+ config: {
625
+ type: "table";
626
+ content: "table";
627
+ propSchema: {
628
+ textColor: {
629
+ default: "default";
630
+ };
631
+ };
632
+ };
633
+ implementation: _blocknote_core.TiptapBlockImplementation<{
634
+ type: "table";
635
+ content: "table";
636
+ propSchema: {
637
+ textColor: {
638
+ default: "default";
639
+ };
640
+ };
641
+ }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
642
+ };
643
+ file: {
644
+ config: {
645
+ type: "file";
646
+ propSchema: {
647
+ backgroundColor: {
648
+ default: "default";
649
+ };
650
+ name: {
651
+ default: "";
652
+ };
653
+ url: {
654
+ default: "";
655
+ };
656
+ caption: {
657
+ default: "";
658
+ };
659
+ };
660
+ content: "none";
661
+ isFileBlock: true;
662
+ };
663
+ implementation: _blocknote_core.TiptapBlockImplementation<{
664
+ type: "file";
665
+ propSchema: {
666
+ backgroundColor: {
667
+ default: "default";
668
+ };
669
+ name: {
670
+ default: "";
671
+ };
672
+ url: {
673
+ default: "";
674
+ };
675
+ caption: {
676
+ default: "";
677
+ };
678
+ };
679
+ content: "none";
680
+ isFileBlock: true;
681
+ }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
682
+ };
683
+ image: {
684
+ config: {
685
+ type: "image";
686
+ propSchema: {
687
+ textAlignment: {
688
+ default: "left";
689
+ values: readonly ["left", "center", "right", "justify"];
690
+ };
691
+ backgroundColor: {
692
+ default: "default";
693
+ };
694
+ name: {
695
+ default: "";
696
+ };
697
+ url: {
698
+ default: "";
699
+ };
700
+ caption: {
701
+ default: "";
702
+ };
703
+ showPreview: {
704
+ default: true;
705
+ };
706
+ previewWidth: {
707
+ default: undefined;
708
+ type: "number";
709
+ };
710
+ };
711
+ content: "none";
712
+ isFileBlock: true;
713
+ fileBlockAccept: string[];
714
+ };
715
+ implementation: _blocknote_core.TiptapBlockImplementation<{
716
+ type: "image";
717
+ propSchema: {
718
+ textAlignment: {
719
+ default: "left";
720
+ values: readonly ["left", "center", "right", "justify"];
721
+ };
722
+ backgroundColor: {
723
+ default: "default";
724
+ };
725
+ name: {
726
+ default: "";
727
+ };
728
+ url: {
729
+ default: "";
730
+ };
731
+ caption: {
732
+ default: "";
733
+ };
734
+ showPreview: {
735
+ default: true;
736
+ };
737
+ previewWidth: {
738
+ default: undefined;
739
+ type: "number";
740
+ };
741
+ };
742
+ content: "none";
743
+ isFileBlock: true;
744
+ fileBlockAccept: string[];
745
+ }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
746
+ };
747
+ video: {
748
+ config: {
749
+ type: "video";
750
+ propSchema: {
751
+ textAlignment: {
752
+ default: "left";
753
+ values: readonly ["left", "center", "right", "justify"];
754
+ };
755
+ backgroundColor: {
756
+ default: "default";
757
+ };
758
+ name: {
759
+ default: "";
760
+ };
761
+ url: {
762
+ default: "";
763
+ };
764
+ caption: {
765
+ default: "";
766
+ };
767
+ showPreview: {
768
+ default: true;
769
+ };
770
+ previewWidth: {
771
+ default: undefined;
772
+ type: "number";
773
+ };
774
+ };
775
+ content: "none";
776
+ isFileBlock: true;
777
+ fileBlockAccept: string[];
778
+ };
779
+ implementation: _blocknote_core.TiptapBlockImplementation<{
780
+ type: "video";
781
+ propSchema: {
782
+ textAlignment: {
783
+ default: "left";
784
+ values: readonly ["left", "center", "right", "justify"];
785
+ };
786
+ backgroundColor: {
787
+ default: "default";
788
+ };
789
+ name: {
790
+ default: "";
791
+ };
792
+ url: {
793
+ default: "";
794
+ };
795
+ caption: {
796
+ default: "";
797
+ };
798
+ showPreview: {
799
+ default: true;
800
+ };
801
+ previewWidth: {
802
+ default: undefined;
803
+ type: "number";
804
+ };
805
+ };
806
+ content: "none";
807
+ isFileBlock: true;
808
+ fileBlockAccept: string[];
809
+ }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
810
+ };
811
+ audio: {
812
+ config: {
813
+ type: "audio";
814
+ propSchema: {
815
+ backgroundColor: {
816
+ default: "default";
817
+ };
818
+ name: {
819
+ default: "";
820
+ };
821
+ url: {
822
+ default: "";
823
+ };
824
+ caption: {
825
+ default: "";
826
+ };
827
+ showPreview: {
828
+ default: true;
829
+ };
830
+ };
831
+ content: "none";
832
+ isFileBlock: true;
833
+ fileBlockAccept: string[];
834
+ };
835
+ implementation: _blocknote_core.TiptapBlockImplementation<{
836
+ type: "audio";
837
+ propSchema: {
838
+ backgroundColor: {
839
+ default: "default";
840
+ };
841
+ name: {
842
+ default: "";
843
+ };
844
+ url: {
845
+ default: "";
846
+ };
847
+ caption: {
848
+ default: "";
849
+ };
850
+ showPreview: {
851
+ default: true;
852
+ };
853
+ };
854
+ content: "none";
855
+ isFileBlock: true;
856
+ fileBlockAccept: string[];
857
+ }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
858
+ };
859
+ }>, _blocknote_core.InlineContentSchemaFromSpecs<{
860
+ text: {
861
+ config: "text";
862
+ implementation: any;
863
+ };
864
+ link: {
865
+ config: "link";
866
+ implementation: any;
867
+ };
868
+ }>, _blocknote_core.StyleSchemaFromSpecs<{
869
+ bold: {
870
+ config: {
871
+ type: string;
872
+ propSchema: "boolean";
873
+ };
874
+ implementation: _blocknote_core.StyleImplementation;
875
+ };
876
+ italic: {
877
+ config: {
878
+ type: string;
879
+ propSchema: "boolean";
880
+ };
881
+ implementation: _blocknote_core.StyleImplementation;
882
+ };
883
+ underline: {
884
+ config: {
885
+ type: string;
886
+ propSchema: "boolean";
887
+ };
888
+ implementation: _blocknote_core.StyleImplementation;
889
+ };
890
+ strike: {
891
+ config: {
892
+ type: string;
893
+ propSchema: "boolean";
894
+ };
895
+ implementation: _blocknote_core.StyleImplementation;
896
+ };
897
+ code: {
898
+ config: {
899
+ type: string;
900
+ propSchema: "boolean";
901
+ };
902
+ implementation: _blocknote_core.StyleImplementation;
903
+ };
904
+ textColor: {
905
+ config: {
906
+ type: string;
907
+ propSchema: "string";
908
+ };
909
+ implementation: _blocknote_core.StyleImplementation;
910
+ };
911
+ backgroundColor: {
912
+ config: {
913
+ type: string;
914
+ propSchema: "string";
915
+ };
916
+ implementation: _blocknote_core.StyleImplementation;
917
+ };
918
+ }>>;
919
+
920
+ interface LinkMetadata {
921
+ url: string;
922
+ title: string;
923
+ description?: string;
924
+ image?: string;
925
+ domain: string;
926
+ }
927
+ declare function fetchLinkMetadata(url: string, apiEndpoint: string): Promise<LinkMetadata>;
928
+ declare function clearMetadataCache(): void;
929
+ declare const LinkPreviewBlock: {
930
+ config: {
931
+ readonly type: "linkPreview";
932
+ readonly propSchema: {
933
+ readonly url: {
934
+ readonly default: "";
935
+ };
936
+ readonly title: {
937
+ readonly default: "";
938
+ };
939
+ readonly description: {
940
+ readonly default: "";
941
+ };
942
+ readonly image: {
943
+ readonly default: "";
944
+ };
945
+ readonly domain: {
946
+ readonly default: "";
947
+ };
948
+ readonly previewWidth: {
949
+ readonly default: 400;
950
+ };
951
+ readonly previewHeight: {
952
+ readonly default: 200;
953
+ };
954
+ };
955
+ readonly content: "none";
956
+ };
957
+ implementation: _blocknote_core.TiptapBlockImplementation<{
958
+ readonly type: "linkPreview";
959
+ readonly propSchema: {
960
+ readonly url: {
961
+ readonly default: "";
962
+ };
963
+ readonly title: {
964
+ readonly default: "";
965
+ };
966
+ readonly description: {
967
+ readonly default: "";
968
+ };
969
+ readonly image: {
970
+ readonly default: "";
971
+ };
972
+ readonly domain: {
973
+ readonly default: "";
974
+ };
975
+ readonly previewWidth: {
976
+ readonly default: 400;
977
+ };
978
+ readonly previewHeight: {
979
+ readonly default: 200;
980
+ };
981
+ };
982
+ readonly content: "none";
983
+ }, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
984
+ };
985
+
986
+ interface FloatingMenuProps {
987
+ editor: EditorType | any;
988
+ position?: "sticky" | "fixed";
989
+ className?: string;
990
+ onImageUpload?: () => void;
991
+ }
992
+ /**
993
+ * FloatingMenu - 에디터 상단 고정 툴바
994
+ */
995
+ declare const FloatingMenu: React.FC<FloatingMenuProps>;
996
+
997
+ /**
998
+ * 색상 팔레트 상수
999
+ * BlockNote 기본 색상 팔레트와 일치
1000
+ */
1001
+ interface ColorItem {
1002
+ name: string;
1003
+ value: string;
1004
+ hex: string;
1005
+ }
1006
+ /**
1007
+ * 텍스트 색상 팔레트
1008
+ */
1009
+ declare const TEXT_COLORS: ColorItem[];
1010
+ /**
1011
+ * 배경 색상 팔레트
1012
+ */
1013
+ declare const BACKGROUND_COLORS: ColorItem[];
1014
+ /**
1015
+ * 색상 값으로 hex 색상 코드 찾기
1016
+ */
1017
+ declare const getHexFromColorValue: (value: string, type: "text" | "background") => string;
1018
+
1019
+ export { BACKGROUND_COLORS, type ColorItem, ContentUtils, type DefaultPartialBlock, EditorConfig, type EditorType, FloatingMenu, HtmlPreviewBlock, schema as HtmlPreviewSchema, type LinkMetadata, LinkPreviewBlock, LumirEditor, LumirEditorError, type LumirEditorProps, type LumirErrorCode, type LumirErrorDetails, type S3UploaderConfig, TEXT_COLORS, clearMetadataCache, cn, createS3Uploader, fetchLinkMetadata, getHexFromColorValue };