@zm-editor/react 0.1.0

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.
Files changed (3) hide show
  1. package/dist/index.d.ts +1483 -0
  2. package/dist/index.js +12158 -0
  3. package/package.json +77 -0
@@ -0,0 +1,1483 @@
1
+ import * as react from 'react';
2
+ import react__default, { ReactNode } from 'react';
3
+ import { Editor, NodeViewProps, UseEditorOptions } from '@tiptap/react';
4
+ export { Editor, EditorContent, useEditor } from '@tiptap/react';
5
+ import * as _tiptap_core from '@tiptap/core';
6
+ import { JSONContent, Extension, Node } from '@tiptap/core';
7
+ import { SlashCommandItem, TocOptions, TocItem } from '@zm-editor/core';
8
+ export * from '@zm-editor/core';
9
+ import * as react_jsx_runtime from 'react/jsx-runtime';
10
+
11
+ interface MentionItem {
12
+ id: string;
13
+ label: string;
14
+ avatar?: string;
15
+ description?: string;
16
+ }
17
+ interface MentionListProps {
18
+ items: MentionItem[];
19
+ command: (item: MentionItem) => void;
20
+ }
21
+ interface MentionListRef {
22
+ onKeyDown: (props: {
23
+ event: KeyboardEvent;
24
+ }) => boolean;
25
+ }
26
+ /**
27
+ * MentionList - @ 멘션 제안 목록 컴포넌트
28
+ */
29
+ declare const MentionList: react.ForwardRefExoticComponent<MentionListProps & react.RefAttributes<MentionListRef>>;
30
+
31
+ /**
32
+ * zm-editor 다국어 지원 타입 정의
33
+ */
34
+ /**
35
+ * 슬래시 명령어 번역
36
+ */
37
+ interface SlashCommandLocale {
38
+ title: string;
39
+ description: string;
40
+ }
41
+ /**
42
+ * 슬래시 메뉴 번역
43
+ */
44
+ interface SlashMenuLocale {
45
+ noResults: string;
46
+ commands: {
47
+ text: SlashCommandLocale;
48
+ heading1: SlashCommandLocale;
49
+ heading2: SlashCommandLocale;
50
+ heading3: SlashCommandLocale;
51
+ bulletList: SlashCommandLocale;
52
+ numberedList: SlashCommandLocale;
53
+ taskList: SlashCommandLocale;
54
+ quote: SlashCommandLocale;
55
+ codeBlock: SlashCommandLocale;
56
+ divider: SlashCommandLocale;
57
+ table: SlashCommandLocale;
58
+ image: SlashCommandLocale;
59
+ file: SlashCommandLocale;
60
+ embed: SlashCommandLocale;
61
+ callout: SlashCommandLocale;
62
+ toggle: SlashCommandLocale;
63
+ bookmark: SlashCommandLocale;
64
+ math: SlashCommandLocale;
65
+ toc: SlashCommandLocale;
66
+ terminal: SlashCommandLocale;
67
+ apiBlock: SlashCommandLocale;
68
+ mermaid: SlashCommandLocale;
69
+ errorMessage: SlashCommandLocale;
70
+ osCommand: SlashCommandLocale;
71
+ changelog: SlashCommandLocale;
72
+ envBlock: SlashCommandLocale;
73
+ gist: SlashCommandLocale;
74
+ diffBlock: SlashCommandLocale;
75
+ footnote: SlashCommandLocale;
76
+ logBlock: SlashCommandLocale;
77
+ stackTrace: SlashCommandLocale;
78
+ metadata: SlashCommandLocale;
79
+ graphql: SlashCommandLocale;
80
+ openapi: SlashCommandLocale;
81
+ diagram: SlashCommandLocale;
82
+ emoji: SlashCommandLocale;
83
+ };
84
+ }
85
+ /**
86
+ * 버블 메뉴 번역
87
+ */
88
+ interface BubbleMenuLocale {
89
+ bold: string;
90
+ italic: string;
91
+ underline: string;
92
+ strikethrough: string;
93
+ code: string;
94
+ keyboard: string;
95
+ highlight: string;
96
+ link: string;
97
+ }
98
+ /**
99
+ * 에디터 번역
100
+ */
101
+ interface EditorLocale {
102
+ placeholder: string;
103
+ loading: string;
104
+ uploading: string;
105
+ }
106
+ /**
107
+ * 다이얼로그 번역
108
+ */
109
+ interface DialogLocale {
110
+ linkUrlPrompt: string;
111
+ unsafeUrlError: string;
112
+ }
113
+ /**
114
+ * 테이블 버블 메뉴 번역
115
+ */
116
+ interface TableBubbleMenuLocale {
117
+ addColumnBefore: string;
118
+ addColumnAfter: string;
119
+ deleteColumn: string;
120
+ addRowBefore: string;
121
+ addRowAfter: string;
122
+ deleteRow: string;
123
+ deleteTable: string;
124
+ mergeCells: string;
125
+ splitCell: string;
126
+ toggleHeaderColumn: string;
127
+ toggleHeaderRow: string;
128
+ toggleHeaderCell: string;
129
+ cellBackground: string;
130
+ clearBackground: string;
131
+ }
132
+ /**
133
+ * 북마크 노드 번역
134
+ */
135
+ interface BookmarkNodeLocale {
136
+ placeholder: string;
137
+ editUrl: string;
138
+ openInNewTab: string;
139
+ addCaption: string;
140
+ }
141
+ /**
142
+ * 임베드 노드 번역
143
+ */
144
+ interface EmbedNodeLocale {
145
+ placeholder: string;
146
+ hint: string;
147
+ editUrl: string;
148
+ openInNewTab: string;
149
+ addCaption: string;
150
+ viewOnTwitter: string;
151
+ unableToEmbed: string;
152
+ }
153
+ /**
154
+ * 수학 수식 노드 번역
155
+ */
156
+ interface MathNodeLocale {
157
+ label: string;
158
+ placeholder: string;
159
+ hint: string;
160
+ edit: string;
161
+ }
162
+ /**
163
+ * 파일 첨부 노드 번역
164
+ */
165
+ interface FileAttachmentNodeLocale {
166
+ download: string;
167
+ addCaption: string;
168
+ uploadingFile: string;
169
+ pdfPreview: string;
170
+ pdfLoading: string;
171
+ pdfError: string;
172
+ pdfNotInstalled: string;
173
+ pdfPage: string;
174
+ pdfPrevPage: string;
175
+ pdfNextPage: string;
176
+ pdfClose: string;
177
+ }
178
+ /**
179
+ * 이미지 노드 번역
180
+ */
181
+ interface ImageNodeLocale {
182
+ invalidUrl: string;
183
+ altTextLabel: string;
184
+ altTextPlaceholder: string;
185
+ addCaption: string;
186
+ }
187
+ /**
188
+ * 터미널 노드 번역
189
+ */
190
+ interface TerminalNodeLocale {
191
+ title: string;
192
+ commandPlaceholder: string;
193
+ output: string;
194
+ outputPlaceholder: string;
195
+ copyCommand: string;
196
+ copyOutput: string;
197
+ copied: string;
198
+ clickToEdit: string;
199
+ }
200
+ /**
201
+ * API 블록 노드 번역
202
+ */
203
+ interface ApiBlockNodeLocale {
204
+ urlPlaceholder: string;
205
+ requestBody: string;
206
+ responseBody: string;
207
+ requestPlaceholder: string;
208
+ responsePlaceholder: string;
209
+ copy: string;
210
+ copied: string;
211
+ }
212
+ /**
213
+ * Mermaid 다이어그램 노드 번역
214
+ */
215
+ interface MermaidNodeLocale {
216
+ label: string;
217
+ placeholder: string;
218
+ hint: string;
219
+ edit: string;
220
+ }
221
+ /**
222
+ * 에러 메시지 노드 번역
223
+ */
224
+ interface ErrorMessageNodeLocale {
225
+ titlePlaceholder: string;
226
+ messagePlaceholder: string;
227
+ hint: string;
228
+ edit: string;
229
+ }
230
+ /**
231
+ * OS 명령어 노드 번역
232
+ */
233
+ interface OsCommandNodeLocale {
234
+ macos: string;
235
+ linux: string;
236
+ windows: string;
237
+ commandPlaceholder: string;
238
+ copyCommand: string;
239
+ copied: string;
240
+ clickToEdit: string;
241
+ }
242
+ /**
243
+ * Changelog 노드 번역
244
+ */
245
+ interface ChangelogNodeLocale {
246
+ version: string;
247
+ date: string;
248
+ versionPlaceholder: string;
249
+ datePlaceholder: string;
250
+ added: string;
251
+ changed: string;
252
+ fixed: string;
253
+ removed: string;
254
+ addEntry: string;
255
+ removeEntry: string;
256
+ save: string;
257
+ cancel: string;
258
+ clickToEdit: string;
259
+ entryPlaceholder: string;
260
+ noChanges: string;
261
+ hint: string;
262
+ }
263
+ /**
264
+ * 환경변수 블록 노드 번역
265
+ */
266
+ interface EnvBlockNodeLocale {
267
+ title: string;
268
+ titlePlaceholder: string;
269
+ defaultTitle: string;
270
+ keyPlaceholder: string;
271
+ valuePlaceholder: string;
272
+ addVariable: string;
273
+ removeVariable: string;
274
+ showValue: string;
275
+ hideValue: string;
276
+ showValues: string;
277
+ hideValues: string;
278
+ masked: string;
279
+ visible: string;
280
+ copy: string;
281
+ copied: string;
282
+ save: string;
283
+ clickToEdit: string;
284
+ clickToAdd: string;
285
+ hint: string;
286
+ }
287
+ /**
288
+ * GitHub Gist 노드 번역
289
+ */
290
+ interface GistNodeLocale {
291
+ placeholder: string;
292
+ hint: string;
293
+ openInGithub: string;
294
+ invalidUrl: string;
295
+ loading: string;
296
+ notFound: string;
297
+ embed: string;
298
+ edit: string;
299
+ openInNewTab: string;
300
+ }
301
+ /**
302
+ * Diff 블록 노드 번역
303
+ */
304
+ interface DiffBlockNodeLocale {
305
+ title: string;
306
+ filename: string;
307
+ filenamePlaceholder: string;
308
+ languagePlaceholder: string;
309
+ contentPlaceholder: string;
310
+ placeholder: string;
311
+ additions: string;
312
+ deletions: string;
313
+ copy: string;
314
+ copied: string;
315
+ save: string;
316
+ clickToEdit: string;
317
+ hint: string;
318
+ }
319
+ /**
320
+ * Footnote 노드 번역
321
+ */
322
+ interface FootnoteNodeLocale {
323
+ title: string;
324
+ placeholder: string;
325
+ add: string;
326
+ remove: string;
327
+ save: string;
328
+ clickToAdd: string;
329
+ hint: string;
330
+ }
331
+ /**
332
+ * Log 블록 노드 번역
333
+ */
334
+ interface LogBlockNodeLocale {
335
+ timestampPlaceholder: string;
336
+ sourcePlaceholder: string;
337
+ messagePlaceholder: string;
338
+ copy: string;
339
+ edit: string;
340
+ hint: string;
341
+ }
342
+ /**
343
+ * Stack Trace 노드 번역
344
+ */
345
+ interface StackTraceNodeLocale {
346
+ errorTypePlaceholder: string;
347
+ errorMessagePlaceholder: string;
348
+ stackPlaceholder: string;
349
+ copy: string;
350
+ edit: string;
351
+ hint: string;
352
+ }
353
+ /**
354
+ * Metadata 노드 번역
355
+ */
356
+ interface MetadataNodeLocale {
357
+ title: string;
358
+ author: string;
359
+ authorPlaceholder: string;
360
+ difficulty: string;
361
+ beginner: string;
362
+ intermediate: string;
363
+ advanced: string;
364
+ duration: string;
365
+ durationPlaceholder: string;
366
+ lastUpdated: string;
367
+ datePlaceholder: string;
368
+ tags: string;
369
+ tagsPlaceholder: string;
370
+ customFields: string;
371
+ customFieldsPlaceholder: string;
372
+ edit: string;
373
+ clickToAdd: string;
374
+ hint: string;
375
+ }
376
+ /**
377
+ * GraphQL 노드 번역
378
+ */
379
+ interface GraphQLNodeLocale {
380
+ endpointPlaceholder: string;
381
+ query: string;
382
+ variables: string;
383
+ response: string;
384
+ queryPlaceholder: string;
385
+ variablesPlaceholder: string;
386
+ responsePlaceholder: string;
387
+ copy: string;
388
+ edit: string;
389
+ hint: string;
390
+ }
391
+ /**
392
+ * OpenAPI 노드 번역
393
+ */
394
+ interface OpenAPINodeLocale {
395
+ urlPlaceholder: string;
396
+ displayMode: string;
397
+ minimal: string;
398
+ openInSwagger: string;
399
+ openInRedoc: string;
400
+ openSpec: string;
401
+ edit: string;
402
+ hint: string;
403
+ }
404
+ /**
405
+ * Diagram 노드 번역 (PlantUML/D2)
406
+ */
407
+ interface DiagramNodeLocale {
408
+ plantumlPlaceholder: string;
409
+ d2Placeholder: string;
410
+ theme: string;
411
+ themePlaceholder: string;
412
+ copy: string;
413
+ edit: string;
414
+ hint: string;
415
+ d2Hint: string;
416
+ d2Note: string;
417
+ openInPlayground: string;
418
+ renderError: string;
419
+ }
420
+ /**
421
+ * NodeView 컴포넌트 번역
422
+ */
423
+ interface NodesLocale {
424
+ bookmark: BookmarkNodeLocale;
425
+ embed: EmbedNodeLocale;
426
+ math: MathNodeLocale;
427
+ fileAttachment: FileAttachmentNodeLocale;
428
+ image: ImageNodeLocale;
429
+ terminal: TerminalNodeLocale;
430
+ apiBlock: ApiBlockNodeLocale;
431
+ mermaid: MermaidNodeLocale;
432
+ errorMessage: ErrorMessageNodeLocale;
433
+ osCommand: OsCommandNodeLocale;
434
+ changelog: ChangelogNodeLocale;
435
+ envBlock: EnvBlockNodeLocale;
436
+ gist: GistNodeLocale;
437
+ diffBlock: DiffBlockNodeLocale;
438
+ footnote: FootnoteNodeLocale;
439
+ logBlock: LogBlockNodeLocale;
440
+ stackTrace: StackTraceNodeLocale;
441
+ metadata: MetadataNodeLocale;
442
+ graphql: GraphQLNodeLocale;
443
+ openapi: OpenAPINodeLocale;
444
+ diagram: DiagramNodeLocale;
445
+ }
446
+ /**
447
+ * zm-editor 전체 로케일 인터페이스
448
+ */
449
+ interface ZmEditorLocale {
450
+ editor: EditorLocale;
451
+ slashMenu: SlashMenuLocale;
452
+ bubbleMenu: BubbleMenuLocale;
453
+ tableBubbleMenu: TableBubbleMenuLocale;
454
+ dialogs: DialogLocale;
455
+ nodes: NodesLocale;
456
+ }
457
+
458
+ /**
459
+ * 영어 로케일 (기본값)
460
+ */
461
+ declare const enLocale: ZmEditorLocale;
462
+
463
+ /**
464
+ * 한국어 로케일
465
+ */
466
+ declare const koLocale: ZmEditorLocale;
467
+
468
+ /** 이미지 업로드 결과 */
469
+ interface ImageUploadResult {
470
+ /** 업로드된 이미지 URL (필수) */
471
+ url: string;
472
+ /** alt 텍스트 (선택) */
473
+ alt?: string;
474
+ /** 이미지 제목 (선택) */
475
+ title?: string;
476
+ }
477
+ /** 이미지 업로드 옵션 */
478
+ interface ImageUploadOptions {
479
+ /** 업로드할 파일 */
480
+ file: File;
481
+ /** 업로드 진행률 콜백 (0-100) */
482
+ onProgress?: (percent: number) => void;
483
+ }
484
+ /** 이미지 업로드 핸들러 타입 */
485
+ type ImageUploadHandler = (options: ImageUploadOptions) => Promise<ImageUploadResult>;
486
+ /** 이미지 업로드 설정 */
487
+ interface ImageUploadConfig {
488
+ /** 최대 파일 크기 (바이트, 기본: 5MB) */
489
+ maxSizeBytes?: number;
490
+ /** 허용 MIME 타입 (기본: png, jpeg, gif, webp) */
491
+ allowedMimeTypes?: string[];
492
+ /** 클립보드 붙여넣기 허용 (기본: true) */
493
+ enablePaste?: boolean;
494
+ /** 드래그앤드롭 허용 (기본: true) */
495
+ enableDrop?: boolean;
496
+ /** onImageUpload 없을 때 Base64 폴백 사용 (기본: true) */
497
+ fallbackToBase64?: boolean;
498
+ }
499
+ /** 파일 업로드 결과 */
500
+ interface FileUploadResult {
501
+ /** 업로드된 파일 URL (필수) */
502
+ url: string;
503
+ /** 파일명 (선택, 없으면 원본 파일명 사용) */
504
+ fileName?: string;
505
+ /** 파일 크기 (바이트) */
506
+ fileSize?: number;
507
+ /** MIME 타입 */
508
+ mimeType?: string;
509
+ }
510
+ /** 파일 업로드 옵션 */
511
+ interface FileUploadOptions {
512
+ /** 업로드할 파일 */
513
+ file: File;
514
+ /** 업로드 진행률 콜백 (0-100) */
515
+ onProgress?: (percent: number) => void;
516
+ }
517
+ /** 파일 업로드 핸들러 타입 */
518
+ type FileUploadHandler = (options: FileUploadOptions) => Promise<FileUploadResult>;
519
+ /** 파일 업로드 설정 */
520
+ interface FileUploadConfig {
521
+ /** 최대 파일 크기 (바이트, 기본: 50MB) */
522
+ maxSizeBytes?: number;
523
+ /** 허용 MIME 타입 (기본: 문서, 압축파일 등) */
524
+ allowedMimeTypes?: string[];
525
+ /** 허용 확장자 (기본: pdf, doc, docx 등) */
526
+ allowedExtensions?: string[];
527
+ /** 드래그앤드롭 허용 (기본: true) */
528
+ enableDrop?: boolean;
529
+ }
530
+ interface ZmEditorProps {
531
+ /** 초기 콘텐츠 (JSON) */
532
+ initialContent?: JSONContent;
533
+ /** 콘텐츠 변경 콜백 */
534
+ onChange?: (content: JSONContent) => void;
535
+ /** HTML 변경 콜백 */
536
+ onHtmlChange?: (html: string) => void;
537
+ /** 읽기 전용 모드 */
538
+ readOnly?: boolean;
539
+ /** 에디터 클래스명 */
540
+ className?: string;
541
+ /** 플레이스홀더 텍스트 (locale 사용 시 무시됨) */
542
+ placeholder?: string;
543
+ /** 글자 수 제한 */
544
+ characterLimit?: number;
545
+ /** 슬래시 명령어 활성화 */
546
+ enableSlashCommand?: boolean;
547
+ /** 버블 메뉴 활성화 */
548
+ enableBubbleMenu?: boolean;
549
+ /** 테이블 버블 메뉴 활성화 */
550
+ enableTableBubbleMenu?: boolean;
551
+ /** 커스텀 슬래시 명령어 (locale 기반 명령어 대신 사용) */
552
+ slashCommands?: SlashCommandItem[];
553
+ /** 자동 포커스 */
554
+ autoFocus?: boolean;
555
+ /** 추가 확장 기능 */
556
+ extensions?: Extension[];
557
+ /** 트랜잭션마다 리렌더링 여부 (성능 최적화) */
558
+ shouldRerenderOnTransaction?: boolean;
559
+ /** 다국어 로케일 (기본값: enLocale) */
560
+ locale?: ZmEditorLocale;
561
+ /** 이미지 업로드 핸들러 (없으면 Base64 폴백 또는 비활성화) */
562
+ onImageUpload?: ImageUploadHandler;
563
+ /** 이미지 업로드 설정 */
564
+ imageConfig?: ImageUploadConfig;
565
+ /** 이미지 업로드 에러 핸들러 */
566
+ onImageUploadError?: (error: Error, file: File) => void;
567
+ /** 파일 업로드 핸들러 */
568
+ onFileUpload?: FileUploadHandler;
569
+ /** 파일 업로드 설정 */
570
+ fileConfig?: FileUploadConfig;
571
+ /** 파일 업로드 에러 핸들러 */
572
+ onFileUploadError?: (error: Error, file: File) => void;
573
+ /** 멘션 기능 활성화 */
574
+ enableMention?: boolean;
575
+ /** 멘션 사용자 검색 (query로 사용자 목록 반환) */
576
+ onMentionSearch?: (query: string) => MentionItem[] | Promise<MentionItem[]>;
577
+ /** 드래그 핸들 활성화 (블록 이동) */
578
+ enableDragHandle?: boolean;
579
+ }
580
+ interface ZmEditorRef {
581
+ /** Tiptap 에디터 인스턴스 */
582
+ editor: Editor | null;
583
+ /** JSON 콘텐츠 가져오기 */
584
+ getJSON: () => JSONContent | undefined;
585
+ /** HTML 콘텐츠 가져오기 */
586
+ getHTML: () => string | undefined;
587
+ /** 텍스트 콘텐츠 가져오기 */
588
+ getText: () => string | undefined;
589
+ /** 마크다운 콘텐츠 가져오기 */
590
+ getMarkdown: () => string | undefined;
591
+ /** 목차(TOC) 가져오기 */
592
+ getTableOfContents: (options?: TocOptions) => TocItem[];
593
+ /** 콘텐츠 설정 (JSON 또는 HTML) */
594
+ setContent: (content: JSONContent | string) => void;
595
+ /** 마크다운 콘텐츠 설정 */
596
+ setMarkdownContent: (markdown: string) => void;
597
+ /** 에디터 포커스 */
598
+ focus: () => void;
599
+ /** 에디터 초기화 */
600
+ clear: () => void;
601
+ }
602
+ /**
603
+ * ZmEditor - Notion-like Rich Text Editor
604
+ *
605
+ * React/Next.js용 Notion 스타일 에디터 컴포넌트
606
+ */
607
+ declare const ZmEditor: react.ForwardRefExoticComponent<ZmEditorProps & react.RefAttributes<ZmEditorRef>>;
608
+
609
+ interface BubbleMenuProps {
610
+ editor: Editor;
611
+ /** 버블 메뉴 번역 */
612
+ locale?: BubbleMenuLocale;
613
+ /** 다이얼로그 번역 */
614
+ dialogLocale?: DialogLocale;
615
+ }
616
+ /**
617
+ * BubbleMenu - 텍스트 선택 시 나타나는 서식 도구 메뉴
618
+ */
619
+ declare function BubbleMenu({ editor, locale, dialogLocale, }: BubbleMenuProps): react_jsx_runtime.JSX.Element;
620
+
621
+ interface TableBubbleMenuProps {
622
+ editor: Editor;
623
+ /** 테이블 버블 메뉴 번역 */
624
+ locale?: TableBubbleMenuLocale;
625
+ }
626
+ /**
627
+ * TableBubbleMenu - 테이블 내 커서 시 나타나는 테이블 제어 메뉴
628
+ */
629
+ declare function TableBubbleMenu({ editor, locale, }: TableBubbleMenuProps): react_jsx_runtime.JSX.Element;
630
+
631
+ interface SlashMenuProps {
632
+ items: SlashCommandItem[];
633
+ onSelect: (item: SlashCommandItem) => void;
634
+ }
635
+ interface SlashMenuRef {
636
+ onKeyDown: (event: KeyboardEvent) => boolean;
637
+ }
638
+ /**
639
+ * SlashMenu - 슬래시 명령어 메뉴 컴포넌트
640
+ *
641
+ * 이 컴포넌트는 독립적으로 사용하거나,
642
+ * ZmEditor 내부에서 자동으로 렌더링됩니다.
643
+ */
644
+ declare const SlashMenu: react.ForwardRefExoticComponent<SlashMenuProps & react.RefAttributes<SlashMenuRef>>;
645
+
646
+ /**
647
+ * CodeBlock - 라인 넘버, 파일명, 복사, 라인 하이라이트 기능이 있는 코드 블록 컴포넌트
648
+ */
649
+ declare function CodeBlock({ node, updateAttributes }: NodeViewProps): react_jsx_runtime.JSX.Element;
650
+
651
+ type ImageNodeProps = NodeViewProps;
652
+ /**
653
+ * ImageNode - Notion-like 이미지 리사이즈 가능한 NodeView
654
+ */
655
+ declare function ImageNode({ node, updateAttributes, selected }: ImageNodeProps): react_jsx_runtime.JSX.Element;
656
+
657
+ interface ResizableImageOptions {
658
+ /** 인라인 이미지 허용 여부 */
659
+ inline: boolean;
660
+ /** Base64 이미지 허용 여부 */
661
+ allowBase64: boolean;
662
+ /** HTML 속성 */
663
+ HTMLAttributes: Record<string, unknown>;
664
+ }
665
+ /**
666
+ * ResizableImage - Notion-like 리사이즈 가능한 이미지 확장
667
+ *
668
+ * 기본 @tiptap/extension-image를 확장하여:
669
+ * - 드래그로 크기 조절
670
+ * - 정렬 옵션 (좌/중앙/우)
671
+ * - 선택 시 컨트롤 UI 표시
672
+ */
673
+ declare const ResizableImage: _tiptap_core.Node<ResizableImageOptions, any>;
674
+
675
+ type EmbedNodeProps = NodeViewProps;
676
+ /**
677
+ * EmbedNode - YouTube, Vimeo, Twitter 등 임베드 NodeView
678
+ */
679
+ declare function EmbedNode({ node, updateAttributes, selected }: EmbedNodeProps): react_jsx_runtime.JSX.Element;
680
+
681
+ interface EmbedOptions {
682
+ HTMLAttributes: Record<string, unknown>;
683
+ }
684
+ declare module '@tiptap/core' {
685
+ interface Commands<ReturnType> {
686
+ embed: {
687
+ /**
688
+ * Insert an embed block
689
+ */
690
+ setEmbed: (options: {
691
+ src: string;
692
+ }) => ReturnType;
693
+ };
694
+ }
695
+ }
696
+ /**
697
+ * Embed Extension - YouTube, Vimeo, Twitter 등 임베드 지원
698
+ */
699
+ declare const Embed: Node<EmbedOptions, any>;
700
+
701
+ /**
702
+ * Embed URL 파싱 유틸리티
703
+ */
704
+ type EmbedType = 'youtube' | 'vimeo' | 'twitter' | 'codepen' | 'codesandbox' | 'stackblitz' | 'replit' | 'unknown';
705
+ interface EmbedInfo {
706
+ type: EmbedType;
707
+ embedUrl: string | null;
708
+ originalUrl: string;
709
+ videoId?: string;
710
+ aspectRatio?: string;
711
+ }
712
+ /**
713
+ * URL을 분석하여 임베드 정보 반환
714
+ */
715
+ declare function parseEmbedUrl(url: string): EmbedInfo;
716
+ /**
717
+ * 임베드 타입별 아이콘/라벨 반환
718
+ */
719
+ declare function getEmbedLabel(type: EmbedType): string;
720
+ /**
721
+ * URL이 유효한 임베드 URL인지 확인
722
+ */
723
+ declare function isValidEmbedUrl(url: string): boolean;
724
+
725
+ type CalloutNodeProps = NodeViewProps;
726
+ /**
727
+ * CalloutNode - Notion-like 강조 박스 NodeView
728
+ */
729
+ declare function CalloutNode({ node, updateAttributes, selected }: CalloutNodeProps): react_jsx_runtime.JSX.Element;
730
+
731
+ type CalloutColor = 'gray' | 'blue' | 'green' | 'yellow' | 'red' | 'purple';
732
+ interface CalloutOptions {
733
+ HTMLAttributes: Record<string, unknown>;
734
+ }
735
+ declare module '@tiptap/core' {
736
+ interface Commands<ReturnType> {
737
+ callout: {
738
+ /**
739
+ * Insert a callout block
740
+ */
741
+ setCallout: (options?: {
742
+ emoji?: string;
743
+ color?: CalloutColor;
744
+ }) => ReturnType;
745
+ /**
746
+ * Toggle callout block
747
+ */
748
+ toggleCallout: (options?: {
749
+ emoji?: string;
750
+ color?: CalloutColor;
751
+ }) => ReturnType;
752
+ };
753
+ }
754
+ }
755
+ /**
756
+ * Callout Extension - Notion-like 강조 박스
757
+ */
758
+ declare const Callout: Node<CalloutOptions, any>;
759
+
760
+ type ToggleNodeProps = NodeViewProps;
761
+ /**
762
+ * ToggleNode - Notion-like 접기/펼치기 블록 NodeView
763
+ */
764
+ declare function ToggleNode({ node, updateAttributes, selected }: ToggleNodeProps): react_jsx_runtime.JSX.Element;
765
+
766
+ interface ToggleOptions {
767
+ HTMLAttributes: Record<string, unknown>;
768
+ }
769
+ declare module '@tiptap/core' {
770
+ interface Commands<ReturnType> {
771
+ toggle: {
772
+ /**
773
+ * Insert a toggle block
774
+ */
775
+ setToggle: () => ReturnType;
776
+ };
777
+ }
778
+ }
779
+ /**
780
+ * Toggle Extension - Notion-like 접기/펼치기 블록
781
+ */
782
+ declare const Toggle: Node<ToggleOptions, any>;
783
+
784
+ type BookmarkNodeProps = NodeViewProps;
785
+ /**
786
+ * BookmarkNode - 링크 미리보기 카드 NodeView
787
+ */
788
+ declare function BookmarkNode({ node, updateAttributes, selected }: BookmarkNodeProps): react_jsx_runtime.JSX.Element;
789
+
790
+ interface BookmarkOptions {
791
+ HTMLAttributes: Record<string, unknown>;
792
+ }
793
+ interface BookmarkMetadata {
794
+ title?: string;
795
+ description?: string;
796
+ image?: string;
797
+ favicon?: string;
798
+ siteName?: string;
799
+ }
800
+ declare module '@tiptap/core' {
801
+ interface Commands<ReturnType> {
802
+ bookmark: {
803
+ /**
804
+ * Insert a bookmark block
805
+ */
806
+ setBookmark: (options?: {
807
+ url?: string;
808
+ }) => ReturnType;
809
+ };
810
+ }
811
+ }
812
+ /**
813
+ * Bookmark Extension - 링크 미리보기 카드
814
+ */
815
+ declare const Bookmark: Node<BookmarkOptions, any>;
816
+
817
+ type MathNodeProps = NodeViewProps;
818
+ /**
819
+ * MathNode - KaTeX를 이용한 수학 수식 NodeView
820
+ */
821
+ declare function MathNode({ node, updateAttributes, selected }: MathNodeProps): react_jsx_runtime.JSX.Element;
822
+
823
+ interface MathOptions {
824
+ HTMLAttributes: Record<string, unknown>;
825
+ }
826
+ declare module '@tiptap/core' {
827
+ interface Commands<ReturnType> {
828
+ math: {
829
+ /**
830
+ * Insert a math block
831
+ */
832
+ setMath: (options?: {
833
+ latex?: string;
834
+ displayMode?: boolean;
835
+ }) => ReturnType;
836
+ };
837
+ }
838
+ }
839
+ /**
840
+ * Math Extension - KaTeX를 이용한 수학 수식 렌더링
841
+ */
842
+ declare const Math: Node<MathOptions, any>;
843
+
844
+ type FileAttachmentNodeProps = NodeViewProps;
845
+ /**
846
+ * FileAttachmentNode - 파일 첨부 NodeView
847
+ *
848
+ * 파일 아이콘, 파일명, 크기, 다운로드 버튼을 표시하는 노드
849
+ * PDF 파일의 경우 미리보기 기능 제공 (pdfjs-dist 설치 필요)
850
+ */
851
+ declare function FileAttachmentNode({ node, updateAttributes, selected }: FileAttachmentNodeProps): react_jsx_runtime.JSX.Element;
852
+
853
+ interface FileAttachmentOptions {
854
+ /** HTML 속성 */
855
+ HTMLAttributes: Record<string, unknown>;
856
+ }
857
+ interface FileAttachmentAttributes {
858
+ url: string;
859
+ fileName: string;
860
+ fileSize: number;
861
+ mimeType: string;
862
+ caption: string;
863
+ }
864
+ declare module '@tiptap/core' {
865
+ interface Commands<ReturnType> {
866
+ fileAttachment: {
867
+ /**
868
+ * Insert a file attachment
869
+ */
870
+ setFileAttachment: (options: Partial<FileAttachmentAttributes>) => ReturnType;
871
+ };
872
+ }
873
+ }
874
+ /**
875
+ * FileAttachment - 파일 첨부 노드 확장
876
+ *
877
+ * 파일을 첨부하고 다운로드 링크를 제공하는 노드
878
+ * - 파일 타입별 아이콘 표시
879
+ * - 파일명, 크기 표시
880
+ * - 다운로드 버튼
881
+ * - 캡션 편집
882
+ */
883
+ declare const FileAttachment: Node<FileAttachmentOptions, any>;
884
+
885
+ /**
886
+ * 파일 타입별 아이콘 반환
887
+ */
888
+ declare function getFileIcon(mimeType: string, fileName?: string): react__default.ReactNode;
889
+ /**
890
+ * 파일 크기를 사람이 읽기 쉬운 형식으로 변환
891
+ */
892
+ declare function formatFileSize(bytes: number): string;
893
+
894
+ interface TocNodeProps extends NodeViewProps {
895
+ }
896
+ /**
897
+ * TocNode - 자동 목차 생성 컴포넌트
898
+ *
899
+ * 에디터 내의 제목(heading)을 자동으로 수집하여 목차를 렌더링합니다.
900
+ */
901
+ declare function TocNode({ editor, node, selected }: TocNodeProps): react_jsx_runtime.JSX.Element;
902
+
903
+ interface TocNodeOptions {
904
+ HTMLAttributes: Record<string, unknown>;
905
+ }
906
+ declare module '@tiptap/core' {
907
+ interface Commands<ReturnType> {
908
+ toc: {
909
+ /**
910
+ * Insert a table of contents block
911
+ */
912
+ setToc: () => ReturnType;
913
+ };
914
+ }
915
+ }
916
+ /**
917
+ * Toc Extension - 자동 목차 생성 노드
918
+ *
919
+ * 에디터 내의 제목(h1-h3)을 자동으로 수집하여 목차를 렌더링합니다.
920
+ */
921
+ declare const Toc: Node<TocNodeOptions, any>;
922
+
923
+ interface TerminalOptions {
924
+ HTMLAttributes: Record<string, unknown>;
925
+ }
926
+ declare module '@tiptap/core' {
927
+ interface Commands<ReturnType> {
928
+ terminal: {
929
+ /**
930
+ * Insert a terminal block
931
+ */
932
+ setTerminal: (options?: {
933
+ command?: string;
934
+ output?: string;
935
+ }) => ReturnType;
936
+ };
937
+ }
938
+ }
939
+ /**
940
+ * Terminal Extension - 터미널/CLI 블록
941
+ *
942
+ * 명령어와 출력을 표시하는 터미널 스타일 블록
943
+ */
944
+ declare const Terminal: Node<TerminalOptions, any>;
945
+
946
+ type TerminalNodeProps = NodeViewProps;
947
+ /**
948
+ * TerminalNode - 터미널/CLI 블록 NodeView
949
+ *
950
+ * 명령어 입력과 출력을 터미널 스타일로 표시합니다.
951
+ */
952
+ declare function TerminalNode({ node, updateAttributes, selected }: TerminalNodeProps): react_jsx_runtime.JSX.Element;
953
+
954
+ type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
955
+ interface ApiBlockOptions {
956
+ HTMLAttributes: Record<string, unknown>;
957
+ }
958
+ declare module '@tiptap/core' {
959
+ interface Commands<ReturnType> {
960
+ apiBlock: {
961
+ /**
962
+ * Insert an API block
963
+ */
964
+ setApiBlock: (options?: {
965
+ method?: HttpMethod;
966
+ url?: string;
967
+ requestBody?: string;
968
+ responseBody?: string;
969
+ statusCode?: number;
970
+ }) => ReturnType;
971
+ };
972
+ }
973
+ }
974
+ /**
975
+ * ApiBlock Extension - API Request/Response 블록
976
+ *
977
+ * HTTP 요청/응답을 문서화하는 블록
978
+ */
979
+ declare const ApiBlock: Node<ApiBlockOptions, any>;
980
+
981
+ type ApiBlockNodeProps = NodeViewProps;
982
+ /**
983
+ * ApiBlockNode - API Request/Response 블록 NodeView
984
+ *
985
+ * HTTP 요청과 응답을 문서화합니다.
986
+ */
987
+ declare function ApiBlockNode({ node, updateAttributes, selected }: ApiBlockNodeProps): react_jsx_runtime.JSX.Element;
988
+
989
+ type MermaidNodeProps = NodeViewProps;
990
+ /**
991
+ * MermaidNode - Mermaid.js를 이용한 다이어그램 NodeView
992
+ */
993
+ declare function MermaidNode({ node, updateAttributes, selected }: MermaidNodeProps): react_jsx_runtime.JSX.Element;
994
+
995
+ interface MermaidOptions {
996
+ HTMLAttributes: Record<string, unknown>;
997
+ }
998
+ declare module '@tiptap/core' {
999
+ interface Commands<ReturnType> {
1000
+ mermaid: {
1001
+ /**
1002
+ * Insert a mermaid diagram block
1003
+ */
1004
+ setMermaid: (options?: {
1005
+ code?: string;
1006
+ }) => ReturnType;
1007
+ };
1008
+ }
1009
+ }
1010
+ /**
1011
+ * Mermaid Extension - Mermaid.js를 이용한 다이어그램 렌더링
1012
+ */
1013
+ declare const Mermaid: Node<MermaidOptions, any>;
1014
+
1015
+ type ErrorMessageNodeProps = NodeViewProps;
1016
+ /**
1017
+ * ErrorMessageNode - 에러/경고/정보/성공 메시지 블록
1018
+ */
1019
+ declare function ErrorMessageNode({ node, updateAttributes, selected }: ErrorMessageNodeProps): react_jsx_runtime.JSX.Element;
1020
+
1021
+ interface ErrorMessageOptions {
1022
+ HTMLAttributes: Record<string, unknown>;
1023
+ }
1024
+ declare module '@tiptap/core' {
1025
+ interface Commands<ReturnType> {
1026
+ errorMessage: {
1027
+ /**
1028
+ * Insert an error message block
1029
+ */
1030
+ setErrorMessage: (options?: {
1031
+ title?: string;
1032
+ message?: string;
1033
+ type?: string;
1034
+ }) => ReturnType;
1035
+ };
1036
+ }
1037
+ }
1038
+ declare const ErrorMessage: Node<ErrorMessageOptions, any>;
1039
+
1040
+ type OsCommandNodeProps = NodeViewProps;
1041
+ /**
1042
+ * OsCommandNode - OS별 명령어 탭 블록 NodeView
1043
+ *
1044
+ * macOS, Linux, Windows 명령어를 탭으로 전환하며 표시
1045
+ */
1046
+ declare function OsCommandNode({ node, updateAttributes, selected }: OsCommandNodeProps): react_jsx_runtime.JSX.Element;
1047
+
1048
+ interface OsCommandOptions {
1049
+ HTMLAttributes: Record<string, unknown>;
1050
+ }
1051
+ declare module '@tiptap/core' {
1052
+ interface Commands<ReturnType> {
1053
+ osCommand: {
1054
+ /**
1055
+ * Insert an OS command block
1056
+ */
1057
+ setOsCommand: (options?: {
1058
+ macosCommand?: string;
1059
+ linuxCommand?: string;
1060
+ windowsCommand?: string;
1061
+ }) => ReturnType;
1062
+ };
1063
+ }
1064
+ }
1065
+ /**
1066
+ * OsCommand Extension - OS별 명령어 탭 블록
1067
+ *
1068
+ * macOS, Linux, Windows 세 가지 OS에 대한 명령어를 탭으로 표시
1069
+ */
1070
+ declare const OsCommand: Node<OsCommandOptions, any>;
1071
+
1072
+ type ChangelogNodeProps = NodeViewProps;
1073
+ type ChangeType = 'added' | 'changed' | 'fixed' | 'removed';
1074
+ interface ChangeEntry {
1075
+ id: string;
1076
+ type: ChangeType;
1077
+ text: string;
1078
+ }
1079
+ /**
1080
+ * ChangelogNode - Changelog/Release notes block
1081
+ * Following Keep a Changelog format
1082
+ */
1083
+ declare function ChangelogNode({ node, updateAttributes, selected }: ChangelogNodeProps): react_jsx_runtime.JSX.Element;
1084
+
1085
+ interface ChangelogOptions {
1086
+ HTMLAttributes: Record<string, unknown>;
1087
+ }
1088
+ declare module '@tiptap/core' {
1089
+ interface Commands<ReturnType> {
1090
+ changelog: {
1091
+ /**
1092
+ * Insert a changelog block
1093
+ */
1094
+ setChangelog: (options?: {
1095
+ version?: string;
1096
+ date?: string;
1097
+ changes?: string;
1098
+ }) => ReturnType;
1099
+ };
1100
+ }
1101
+ }
1102
+ declare const Changelog: Node<ChangelogOptions, any>;
1103
+
1104
+ interface EnvBlockOptions {
1105
+ HTMLAttributes: Record<string, unknown>;
1106
+ }
1107
+ declare module '@tiptap/core' {
1108
+ interface Commands<ReturnType> {
1109
+ envBlock: {
1110
+ setEnvBlock: () => ReturnType;
1111
+ };
1112
+ }
1113
+ }
1114
+ declare const EnvBlock: Node<EnvBlockOptions, any>;
1115
+
1116
+ interface EnvVariable {
1117
+ key: string;
1118
+ value: string;
1119
+ masked: boolean;
1120
+ }
1121
+ interface EnvBlockNodeProps extends NodeViewProps {
1122
+ }
1123
+ declare function EnvBlockNode({ node, updateAttributes, selected }: EnvBlockNodeProps): react_jsx_runtime.JSX.Element;
1124
+
1125
+ interface GistOptions {
1126
+ HTMLAttributes: Record<string, unknown>;
1127
+ }
1128
+ declare module '@tiptap/core' {
1129
+ interface Commands<ReturnType> {
1130
+ gist: {
1131
+ setGist: (attrs?: {
1132
+ gistId?: string;
1133
+ gistFile?: string;
1134
+ }) => ReturnType;
1135
+ };
1136
+ }
1137
+ }
1138
+ declare const Gist: Node<GistOptions, any>;
1139
+
1140
+ interface GistNodeProps extends NodeViewProps {
1141
+ }
1142
+ declare function GistNode({ node, updateAttributes, selected }: GistNodeProps): react_jsx_runtime.JSX.Element;
1143
+
1144
+ interface DiffBlockOptions {
1145
+ HTMLAttributes: Record<string, unknown>;
1146
+ }
1147
+ declare module '@tiptap/core' {
1148
+ interface Commands<ReturnType> {
1149
+ diffBlock: {
1150
+ setDiffBlock: () => ReturnType;
1151
+ };
1152
+ }
1153
+ }
1154
+ declare const DiffBlock: Node<DiffBlockOptions, any>;
1155
+
1156
+ interface DiffLine {
1157
+ type: 'added' | 'removed' | 'unchanged';
1158
+ content: string;
1159
+ }
1160
+ interface DiffBlockNodeProps extends NodeViewProps {
1161
+ }
1162
+ declare function DiffBlockNode({ node, updateAttributes, selected }: DiffBlockNodeProps): react_jsx_runtime.JSX.Element;
1163
+
1164
+ interface FootnoteOptions {
1165
+ HTMLAttributes: Record<string, unknown>;
1166
+ }
1167
+ declare module '@tiptap/core' {
1168
+ interface Commands<ReturnType> {
1169
+ footnoteBlock: {
1170
+ setFootnoteBlock: () => ReturnType;
1171
+ };
1172
+ }
1173
+ }
1174
+ declare const FootnoteBlock: Node<FootnoteOptions, any>;
1175
+
1176
+ interface FootnoteItem {
1177
+ id: string;
1178
+ content: string;
1179
+ }
1180
+ interface FootnoteNodeProps extends NodeViewProps {
1181
+ }
1182
+ declare function FootnoteNode({ node, updateAttributes, selected }: FootnoteNodeProps): react_jsx_runtime.JSX.Element;
1183
+
1184
+ type LogBlockNodeProps = NodeViewProps;
1185
+ /**
1186
+ * LogBlockNode - 로그 메시지 블록
1187
+ */
1188
+ declare function LogBlockNode({ node, updateAttributes, selected }: LogBlockNodeProps): react_jsx_runtime.JSX.Element;
1189
+
1190
+ type LogLevel = 'debug' | 'info' | 'warn' | 'error';
1191
+ interface LogBlockOptions {
1192
+ HTMLAttributes: Record<string, unknown>;
1193
+ }
1194
+ declare module '@tiptap/core' {
1195
+ interface Commands<ReturnType> {
1196
+ logBlock: {
1197
+ /**
1198
+ * Insert a log block
1199
+ */
1200
+ setLogBlock: (options?: {
1201
+ level?: LogLevel;
1202
+ message?: string;
1203
+ timestamp?: string;
1204
+ source?: string;
1205
+ }) => ReturnType;
1206
+ };
1207
+ }
1208
+ }
1209
+ declare const LogBlock: Node<LogBlockOptions, any>;
1210
+
1211
+ type StackTraceNodeProps = NodeViewProps;
1212
+ type StackTraceLanguage$1 = 'javascript' | 'typescript' | 'python' | 'java' | 'go' | 'rust' | 'csharp' | 'ruby' | 'php' | 'other';
1213
+ /**
1214
+ * StackTraceNode - 스택 트레이스 블록
1215
+ */
1216
+ declare function StackTraceNode({ node, updateAttributes, selected }: StackTraceNodeProps): react_jsx_runtime.JSX.Element;
1217
+
1218
+ type StackTraceLanguage = 'javascript' | 'typescript' | 'python' | 'java' | 'go' | 'rust' | 'csharp' | 'ruby' | 'php' | 'other';
1219
+ interface StackTraceOptions {
1220
+ HTMLAttributes: Record<string, unknown>;
1221
+ }
1222
+ declare module '@tiptap/core' {
1223
+ interface Commands<ReturnType> {
1224
+ stackTrace: {
1225
+ /**
1226
+ * Insert a stack trace block
1227
+ */
1228
+ setStackTrace: (options?: {
1229
+ language?: StackTraceLanguage;
1230
+ errorType?: string;
1231
+ errorMessage?: string;
1232
+ stackTrace?: string;
1233
+ }) => ReturnType;
1234
+ };
1235
+ }
1236
+ }
1237
+ declare const StackTrace: Node<StackTraceOptions, any>;
1238
+
1239
+ type MetadataNodeProps = NodeViewProps;
1240
+ type DifficultyLevel$1 = 'beginner' | 'intermediate' | 'advanced';
1241
+ /**
1242
+ * MetadataNode - 문서 메타데이터 블록
1243
+ */
1244
+ declare function MetadataNode({ node, updateAttributes, selected }: MetadataNodeProps): react_jsx_runtime.JSX.Element;
1245
+
1246
+ type DifficultyLevel = 'beginner' | 'intermediate' | 'advanced';
1247
+ interface MetadataOptions {
1248
+ HTMLAttributes: Record<string, unknown>;
1249
+ }
1250
+ declare module '@tiptap/core' {
1251
+ interface Commands<ReturnType> {
1252
+ metadata: {
1253
+ /**
1254
+ * Insert a metadata block
1255
+ */
1256
+ setMetadata: (options?: {
1257
+ author?: string;
1258
+ difficulty?: DifficultyLevel;
1259
+ duration?: string;
1260
+ lastUpdated?: string;
1261
+ tags?: string;
1262
+ customFields?: string;
1263
+ }) => ReturnType;
1264
+ };
1265
+ }
1266
+ }
1267
+ declare const Metadata: Node<MetadataOptions, any>;
1268
+
1269
+ type GraphQLNodeProps = NodeViewProps;
1270
+ /**
1271
+ * GraphQLNode - GraphQL 쿼리/응답 블록
1272
+ */
1273
+ declare function GraphQLNode({ node, updateAttributes, selected }: GraphQLNodeProps): react_jsx_runtime.JSX.Element;
1274
+
1275
+ interface GraphQLOptions {
1276
+ HTMLAttributes: Record<string, unknown>;
1277
+ }
1278
+ declare module '@tiptap/core' {
1279
+ interface Commands<ReturnType> {
1280
+ graphql: {
1281
+ /**
1282
+ * Insert a GraphQL query block
1283
+ */
1284
+ setGraphQL: (options?: {
1285
+ endpoint?: string;
1286
+ query?: string;
1287
+ variables?: string;
1288
+ response?: string;
1289
+ }) => ReturnType;
1290
+ };
1291
+ }
1292
+ }
1293
+ declare const GraphQL: Node<GraphQLOptions, any>;
1294
+
1295
+ type OpenAPINodeProps = NodeViewProps;
1296
+ type DisplayMode$1 = 'swagger-ui' | 'redoc' | 'minimal';
1297
+ /**
1298
+ * OpenAPINode - OpenAPI/Swagger 스펙 임베드 블록
1299
+ */
1300
+ declare function OpenAPINode({ node, updateAttributes, selected }: OpenAPINodeProps): react_jsx_runtime.JSX.Element;
1301
+
1302
+ type DisplayMode = 'swagger-ui' | 'redoc' | 'minimal';
1303
+ interface OpenAPIOptions {
1304
+ HTMLAttributes: Record<string, unknown>;
1305
+ }
1306
+ declare module '@tiptap/core' {
1307
+ interface Commands<ReturnType> {
1308
+ openapi: {
1309
+ /**
1310
+ * Insert an OpenAPI/Swagger block
1311
+ */
1312
+ setOpenAPI: (options?: {
1313
+ specUrl?: string;
1314
+ displayMode?: DisplayMode;
1315
+ }) => ReturnType;
1316
+ };
1317
+ }
1318
+ }
1319
+ declare const OpenAPI: Node<OpenAPIOptions, any>;
1320
+
1321
+ type DiagramNodeProps = NodeViewProps;
1322
+ type DiagramType$1 = 'plantuml' | 'd2';
1323
+ /**
1324
+ * DiagramNode - PlantUML / D2 다이어그램 블록
1325
+ */
1326
+ declare function DiagramNode({ node, updateAttributes, selected }: DiagramNodeProps): react_jsx_runtime.JSX.Element;
1327
+
1328
+ type DiagramType = 'plantuml' | 'd2';
1329
+ interface DiagramOptions {
1330
+ HTMLAttributes: Record<string, unknown>;
1331
+ }
1332
+ declare module '@tiptap/core' {
1333
+ interface Commands<ReturnType> {
1334
+ diagram: {
1335
+ /**
1336
+ * Insert a diagram block (PlantUML or D2)
1337
+ */
1338
+ setDiagram: (options?: {
1339
+ type?: DiagramType;
1340
+ code?: string;
1341
+ theme?: string;
1342
+ }) => ReturnType;
1343
+ };
1344
+ }
1345
+ }
1346
+ declare const Diagram: Node<DiagramOptions, any>;
1347
+
1348
+ interface EmojiCategory {
1349
+ name: string;
1350
+ icon: string;
1351
+ emojis: string[];
1352
+ }
1353
+ interface EmojiPickerProps {
1354
+ onSelect: (emoji: string) => void;
1355
+ onClose?: () => void;
1356
+ }
1357
+ /**
1358
+ * EmojiPicker - 이모지 선택 컴포넌트
1359
+ */
1360
+ declare function EmojiPicker({ onSelect, onClose }: EmojiPickerProps): react_jsx_runtime.JSX.Element;
1361
+
1362
+ interface DragHandleProps {
1363
+ editor: Editor;
1364
+ }
1365
+ /**
1366
+ * DragHandle - 블록 드래그 핸들 컴포넌트
1367
+ */
1368
+ declare function DragHandle({ editor }: DragHandleProps): react_jsx_runtime.JSX.Element | null;
1369
+
1370
+ interface YDoc {
1371
+ destroy: () => void;
1372
+ }
1373
+ interface WebsocketProvider {
1374
+ destroy: () => void;
1375
+ awareness: Awareness;
1376
+ on: (event: string, callback: (...args: unknown[]) => void) => void;
1377
+ off: (event: string, callback: (...args: unknown[]) => void) => void;
1378
+ }
1379
+ interface Awareness {
1380
+ setLocalStateField: (field: string, value: unknown) => void;
1381
+ getLocalState: () => Record<string, unknown> | null;
1382
+ getStates: () => Map<number, Record<string, unknown>>;
1383
+ on: (event: string, callback: (...args: unknown[]) => void) => void;
1384
+ off: (event: string, callback: (...args: unknown[]) => void) => void;
1385
+ }
1386
+ interface CollaborationUser {
1387
+ name: string;
1388
+ color: string;
1389
+ avatar?: string;
1390
+ }
1391
+ interface CollaborationConfig {
1392
+ /** 문서 이름 (고유 식별자) */
1393
+ documentName: string;
1394
+ /** WebSocket 서버 URL */
1395
+ websocketUrl: string;
1396
+ /** 현재 사용자 정보 */
1397
+ user: CollaborationUser;
1398
+ /** 연결 시 콜백 */
1399
+ onConnect?: () => void;
1400
+ /** 연결 해제 시 콜백 */
1401
+ onDisconnect?: () => void;
1402
+ /** 다른 사용자 상태 변경 시 콜백 */
1403
+ onAwarenessChange?: (users: CollaborationUser[]) => void;
1404
+ }
1405
+ interface CollaborationContextValue {
1406
+ /** Y.js 문서 */
1407
+ ydoc: YDoc | null;
1408
+ /** WebSocket 제공자 */
1409
+ provider: WebsocketProvider | null;
1410
+ /** 연결 상태 */
1411
+ isConnected: boolean;
1412
+ /** 접속 중인 사용자 목록 */
1413
+ connectedUsers: CollaborationUser[];
1414
+ /** 현재 사용자 */
1415
+ currentUser: CollaborationUser | null;
1416
+ }
1417
+ declare function useCollaboration(): CollaborationContextValue;
1418
+ interface CollaborationProviderProps {
1419
+ config: CollaborationConfig;
1420
+ children: ReactNode;
1421
+ }
1422
+ /**
1423
+ * CollaborationProvider - Y.js 기반 실시간 협업 제공자
1424
+ *
1425
+ * 이 컴포넌트를 사용하려면 다음 패키지를 설치해야 합니다:
1426
+ * - yjs
1427
+ * - y-websocket
1428
+ * - @tiptap/extension-collaboration
1429
+ * - @tiptap/extension-collaboration-cursor
1430
+ *
1431
+ * @example
1432
+ * ```tsx
1433
+ * import { CollaborationProvider, ZmEditor } from '@zm-editor/react';
1434
+ * import { Collaboration } from '@tiptap/extension-collaboration';
1435
+ * import { CollaborationCursor } from '@tiptap/extension-collaboration-cursor';
1436
+ * import * as Y from 'yjs';
1437
+ *
1438
+ * function App() {
1439
+ * return (
1440
+ * <CollaborationProvider
1441
+ * config={{
1442
+ * documentName: 'my-document',
1443
+ * websocketUrl: 'wss://your-server.com',
1444
+ * user: { name: 'John', color: '#3b82f6' },
1445
+ * }}
1446
+ * >
1447
+ * <ZmEditor
1448
+ * extensions={[
1449
+ * Collaboration.configure({ document: ydoc }),
1450
+ * CollaborationCursor.configure({ provider, user }),
1451
+ * ]}
1452
+ * />
1453
+ * </CollaborationProvider>
1454
+ * );
1455
+ * }
1456
+ * ```
1457
+ */
1458
+ declare function CollaborationProvider({ config, children, }: CollaborationProviderProps): react_jsx_runtime.JSX.Element;
1459
+ /**
1460
+ * 협업 커서 색상 팔레트
1461
+ */
1462
+ declare const COLLABORATION_COLORS: string[];
1463
+ /**
1464
+ * 랜덤 협업 색상 생성
1465
+ */
1466
+ declare function getRandomCollaborationColor(): string;
1467
+
1468
+ interface UseZmEditorOptions extends Omit<UseEditorOptions, 'extensions'> {
1469
+ /** 플레이스홀더 텍스트 */
1470
+ placeholder?: string;
1471
+ /** 글자 수 제한 */
1472
+ characterLimit?: number;
1473
+ /** 슬래시 명령어 활성화 */
1474
+ enableSlashCommand?: boolean;
1475
+ }
1476
+ /**
1477
+ * useZmEditor - zm-editor용 커스텀 훅
1478
+ *
1479
+ * Tiptap useEditor 훅을 zm-editor 기본 설정으로 래핑합니다.
1480
+ */
1481
+ declare function useZmEditor(options?: UseZmEditorOptions): _tiptap_core.Editor | null;
1482
+
1483
+ export { ApiBlock, ApiBlockNode, type ApiBlockNodeProps, type ApiBlockOptions, Bookmark, type BookmarkMetadata, BookmarkNode, type BookmarkNodeProps, type BookmarkOptions, BubbleMenu, type BubbleMenuLocale, COLLABORATION_COLORS, Callout, type CalloutColor, CalloutNode, type CalloutNodeProps, type CalloutOptions, type ChangeEntry, type ChangeType, Changelog, ChangelogNode, type ChangelogNodeProps, type ChangelogOptions, CodeBlock, type CollaborationConfig, CollaborationProvider, type CollaborationProviderProps, type CollaborationUser, Diagram, DiagramNode, type DiagramNodeProps, type DiagramOptions, type DiagramType$1 as DiagramType, type DialogLocale, DiffBlock, DiffBlockNode, type DiffBlockNodeProps, type DiffBlockOptions, type DiffLine, type DifficultyLevel$1 as DifficultyLevel, type DisplayMode$1 as DisplayMode, DragHandle, type DragHandleProps, type EditorLocale, Embed, type EmbedInfo, EmbedNode, type EmbedNodeProps, type EmbedOptions, type EmbedType, type EmojiCategory, EmojiPicker, type EmojiPickerProps, EnvBlock, EnvBlockNode, type EnvBlockNodeProps, type EnvBlockOptions, type EnvVariable, ErrorMessage, ErrorMessageNode, type ErrorMessageNodeProps, type ErrorMessageOptions, FileAttachment, type FileAttachmentAttributes, FileAttachmentNode, type FileAttachmentNodeProps, type FileAttachmentOptions, type FileUploadConfig, type FileUploadHandler, type FileUploadOptions, type FileUploadResult, FootnoteBlock, type FootnoteItem, FootnoteNode, type FootnoteNodeProps, type FootnoteOptions, Gist, GistNode, type GistNodeProps, type GistOptions, GraphQL, GraphQLNode, type GraphQLNodeProps, type GraphQLOptions, type HttpMethod, ImageNode, type ImageNodeProps, type ImageUploadConfig, type ImageUploadHandler, type ImageUploadOptions, type ImageUploadResult, LogBlock, LogBlockNode, type LogBlockNodeProps, type LogBlockOptions, type LogLevel, Math as MathExtension, MathNode, type MathNodeProps, type MathOptions, type MentionItem, MentionList, type MentionListProps, type MentionListRef, Mermaid as MermaidExtension, MermaidNode, type MermaidNodeProps, type MermaidOptions, Metadata, MetadataNode, type MetadataNodeProps, type MetadataOptions, OpenAPI, OpenAPINode, type OpenAPINodeProps, type OpenAPIOptions, OsCommand, OsCommandNode, type OsCommandNodeProps, type OsCommandOptions, ResizableImage, type ResizableImageOptions, type SlashCommandLocale, SlashMenu, type SlashMenuLocale, type SlashMenuProps, type SlashMenuRef, StackTrace, type StackTraceLanguage$1 as StackTraceLanguage, StackTraceNode, type StackTraceNodeProps, type StackTraceOptions, TableBubbleMenu, type TableBubbleMenuLocale, Terminal, TerminalNode, type TerminalNodeProps, type TerminalOptions, Toc, TocNode, type TocNodeOptions, type TocNodeProps, Toggle, ToggleNode, type ToggleNodeProps, type ToggleOptions, type UseZmEditorOptions, ZmEditor, type ZmEditorLocale, type ZmEditorProps, type ZmEditorRef, enLocale, formatFileSize, getEmbedLabel, getFileIcon, getRandomCollaborationColor, isValidEmbedUrl, koLocale, parseEmbedUrl, useCollaboration, useZmEditor };