daisy-tiptap-test 0.0.6

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 (202) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +441 -0
  3. package/dist/components/AddLinkButton.vue.d.ts +30 -0
  4. package/dist/components/AddLinkButton.vue.js +1 -0
  5. package/dist/components/BubbleMenu.vue.d.ts +25 -0
  6. package/dist/components/BubbleMenu.vue.js +1 -0
  7. package/dist/components/ColorDropdown.vue.d.ts +34 -0
  8. package/dist/components/ColorDropdown.vue.js +1 -0
  9. package/dist/components/DaisyTiptap.vue.d.ts +584 -0
  10. package/dist/components/DaisyTiptap.vue.js +1 -0
  11. package/dist/components/EditImageButton.vue.d.ts +24 -0
  12. package/dist/components/EditImageButton.vue.js +1 -0
  13. package/dist/components/EditLinkDialog.vue.d.ts +33 -0
  14. package/dist/components/EditLinkDialog.vue.js +1 -0
  15. package/dist/components/EmojiDropdown.vue.d.ts +33 -0
  16. package/dist/components/EmojiDropdown.vue.js +1 -0
  17. package/dist/components/FloatingMenu.vue.d.ts +24 -0
  18. package/dist/components/FloatingMenu.vue.js +1 -0
  19. package/dist/components/FontFamilyDropdown.vue.d.ts +30 -0
  20. package/dist/components/FontFamilyDropdown.vue.js +1 -0
  21. package/dist/components/FontSizeDropdown.vue.d.ts +30 -0
  22. package/dist/components/FontSizeDropdown.vue.js +1 -0
  23. package/dist/components/HeadingDropdown.vue.d.ts +32 -0
  24. package/dist/components/HeadingDropdown.vue.js +1 -0
  25. package/dist/components/Icon.vue.d.ts +12 -0
  26. package/dist/components/Icon.vue.js +1 -0
  27. package/dist/components/ImageBubbleMenu.vue.d.ts +23 -0
  28. package/dist/components/ImageBubbleMenu.vue.js +1 -0
  29. package/dist/components/ImageView.vue.d.ts +53 -0
  30. package/dist/components/ImageView.vue.js +1 -0
  31. package/dist/components/InsertImageButton.vue.d.ts +13 -0
  32. package/dist/components/InsertImageButton.vue.js +1 -0
  33. package/dist/components/LinkBubbleMenu.vue.d.ts +30 -0
  34. package/dist/components/LinkBubbleMenu.vue.js +1 -0
  35. package/dist/components/MentionView.vue.d.ts +34 -0
  36. package/dist/components/MentionView.vue.js +1 -0
  37. package/dist/components/MenuBar.vue.d.ts +24 -0
  38. package/dist/components/MenuBar.vue.js +1 -0
  39. package/dist/components/TableBubbleMenu.vue.d.ts +23 -0
  40. package/dist/components/TableBubbleMenu.vue.js +1 -0
  41. package/dist/components/TableDropdown.vue.d.ts +30 -0
  42. package/dist/components/TableDropdown.vue.js +1 -0
  43. package/dist/components/TaskItemView.vue.d.ts +20 -0
  44. package/dist/components/TaskItemView.vue.js +1 -0
  45. package/dist/components/UniversalToggleButton.vue.d.ts +39 -0
  46. package/dist/components/UniversalToggleButton.vue.js +1 -0
  47. package/dist/components/index.d.ts +51 -0
  48. package/dist/components/index.js +1 -0
  49. package/dist/extensions/blockquote.d.ts +25 -0
  50. package/dist/extensions/blockquote.js +1 -0
  51. package/dist/extensions/bold.d.ts +28 -0
  52. package/dist/extensions/bold.js +1 -0
  53. package/dist/extensions/bullet-list.d.ts +20 -0
  54. package/dist/extensions/bullet-list.js +1 -0
  55. package/dist/extensions/character-count.d.ts +28 -0
  56. package/dist/extensions/character-count.js +1 -0
  57. package/dist/extensions/code-block-lowlight.d.ts +8 -0
  58. package/dist/extensions/code-block-lowlight.js +1 -0
  59. package/dist/extensions/code-block.d.ts +43 -0
  60. package/dist/extensions/code-block.js +4 -0
  61. package/dist/extensions/code.d.ts +26 -0
  62. package/dist/extensions/code.js +1 -0
  63. package/dist/extensions/color.d.ts +21 -0
  64. package/dist/extensions/color.js +1 -0
  65. package/dist/extensions/document.d.ts +10 -0
  66. package/dist/extensions/document.js +1 -0
  67. package/dist/extensions/dropcursor.d.ts +7 -0
  68. package/dist/extensions/dropcursor.js +1 -0
  69. package/dist/extensions/emoji.d.ts +17 -0
  70. package/dist/extensions/emoji.js +1 -0
  71. package/dist/extensions/focus.d.ts +6 -0
  72. package/dist/extensions/focus.js +1 -0
  73. package/dist/extensions/font-family.d.ts +23 -0
  74. package/dist/extensions/font-family.js +1 -0
  75. package/dist/extensions/font-size.d.ts +20 -0
  76. package/dist/extensions/font-size.js +1 -0
  77. package/dist/extensions/gapcursor.d.ts +15 -0
  78. package/dist/extensions/gapcursor.js +1 -0
  79. package/dist/extensions/hard-break.d.ts +17 -0
  80. package/dist/extensions/hard-break.js +2 -0
  81. package/dist/extensions/heading.d.ts +26 -0
  82. package/dist/extensions/heading.js +1 -0
  83. package/dist/extensions/highlight.d.ts +32 -0
  84. package/dist/extensions/highlight.js +1 -0
  85. package/dist/extensions/history.d.ts +21 -0
  86. package/dist/extensions/history.js +1 -0
  87. package/dist/extensions/horizontal-rule.d.ts +16 -0
  88. package/dist/extensions/horizontal-rule.js +1 -0
  89. package/dist/extensions/image.d.ts +25 -0
  90. package/dist/extensions/image.js +1 -0
  91. package/dist/extensions/indent.d.ts +21 -0
  92. package/dist/extensions/indent.js +1 -0
  93. package/dist/extensions/index.d.ts +104 -0
  94. package/dist/extensions/index.js +1 -0
  95. package/dist/extensions/italic.d.ts +28 -0
  96. package/dist/extensions/italic.js +1 -0
  97. package/dist/extensions/link.d.ts +63 -0
  98. package/dist/extensions/link.js +1 -0
  99. package/dist/extensions/list-item.d.ts +7 -0
  100. package/dist/extensions/list-item.js +1 -0
  101. package/dist/extensions/mention.d.ts +14 -0
  102. package/dist/extensions/mention.js +1 -0
  103. package/dist/extensions/ordered-list.d.ts +20 -0
  104. package/dist/extensions/ordered-list.js +1 -0
  105. package/dist/extensions/paragraph.d.ts +15 -0
  106. package/dist/extensions/paragraph.js +1 -0
  107. package/dist/extensions/placeholder.d.ts +16 -0
  108. package/dist/extensions/placeholder.js +1 -0
  109. package/dist/extensions/strike.d.ts +26 -0
  110. package/dist/extensions/strike.js +1 -0
  111. package/dist/extensions/subscript.d.ts +24 -0
  112. package/dist/extensions/subscript.js +1 -0
  113. package/dist/extensions/superscript.d.ts +24 -0
  114. package/dist/extensions/superscript.js +1 -0
  115. package/dist/extensions/table-cell.d.ts +5 -0
  116. package/dist/extensions/table-cell.js +1 -0
  117. package/dist/extensions/table-header.d.ts +5 -0
  118. package/dist/extensions/table-header.js +1 -0
  119. package/dist/extensions/table-row.d.ts +5 -0
  120. package/dist/extensions/table-row.js +1 -0
  121. package/dist/extensions/table.d.ts +56 -0
  122. package/dist/extensions/table.js +1 -0
  123. package/dist/extensions/tableView.d.ts +17 -0
  124. package/dist/extensions/tableView.js +1 -0
  125. package/dist/extensions/task-item.d.ts +10 -0
  126. package/dist/extensions/task-item.js +1 -0
  127. package/dist/extensions/task-list.d.ts +17 -0
  128. package/dist/extensions/task-list.js +1 -0
  129. package/dist/extensions/text-align.d.ts +22 -0
  130. package/dist/extensions/text-align.js +1 -0
  131. package/dist/extensions/text-style.d.ts +16 -0
  132. package/dist/extensions/text-style.js +1 -0
  133. package/dist/extensions/text.d.ts +2 -0
  134. package/dist/extensions/text.js +1 -0
  135. package/dist/extensions/typography.d.ts +48 -0
  136. package/dist/extensions/typography.js +1 -0
  137. package/dist/extensions/underline.d.ts +24 -0
  138. package/dist/extensions/underline.js +1 -0
  139. package/dist/hooks/index.d.ts +3 -0
  140. package/dist/hooks/index.js +1 -0
  141. package/dist/hooks/useCharacterCount.d.ts +5 -0
  142. package/dist/hooks/useCharacterCount.js +1 -0
  143. package/dist/hooks/useCodeView.d.ts +6 -0
  144. package/dist/hooks/useCodeView.js +1 -0
  145. package/dist/hooks/useEditorStyle.d.ts +7 -0
  146. package/dist/hooks/useEditorStyle.js +1 -0
  147. package/dist/i18n/index.d.ts +4 -0
  148. package/dist/i18n/index.js +1 -0
  149. package/dist/i18n/locales/en/index.d.ts +237 -0
  150. package/dist/i18n/locales/en/index.js +1 -0
  151. package/dist/i18n/locales/index.d.ts +3 -0
  152. package/dist/i18n/locales/index.js +1 -0
  153. package/dist/i18n/locales/zh/index.d.ts +237 -0
  154. package/dist/i18n/locales/zh/index.js +1 -0
  155. package/dist/i18n/locales/zh-tw/index.d.ts +237 -0
  156. package/dist/i18n/locales/zh-tw/index.js +1 -0
  157. package/dist/index.d.ts +6 -0
  158. package/dist/index.js +1 -0
  159. package/dist/plugin/autolink.d.ts +10 -0
  160. package/dist/plugin/autolink.js +1 -0
  161. package/dist/plugin/clickHandler.d.ts +7 -0
  162. package/dist/plugin/clickHandler.js +1 -0
  163. package/dist/plugin/emojis.d.ts +1 -0
  164. package/dist/plugin/emojis.js +1 -0
  165. package/dist/plugin/icons.d.ts +5 -0
  166. package/dist/plugin/icons.js +1 -0
  167. package/dist/plugin/index.d.ts +7 -0
  168. package/dist/plugin/index.js +1 -0
  169. package/dist/plugin/lowlight.d.ts +6 -0
  170. package/dist/plugin/lowlight.js +1 -0
  171. package/dist/plugin/pasteHandler.d.ts +9 -0
  172. package/dist/plugin/pasteHandler.js +1 -0
  173. package/dist/plugin/suggestion.d.ts +2 -0
  174. package/dist/plugin/suggestion.js +1 -0
  175. package/dist/utils/color.d.ts +2 -0
  176. package/dist/utils/color.js +1 -0
  177. package/dist/utils/constants.d.ts +24 -0
  178. package/dist/utils/constants.js +1 -0
  179. package/dist/utils/createCell.d.ts +2 -0
  180. package/dist/utils/createCell.js +1 -0
  181. package/dist/utils/createTable.d.ts +2 -0
  182. package/dist/utils/createTable.js +1 -0
  183. package/dist/utils/deleteTableWhenAllCellsSelected.d.ts +2 -0
  184. package/dist/utils/deleteTableWhenAllCellsSelected.js +1 -0
  185. package/dist/utils/fontFamily.d.ts +3 -0
  186. package/dist/utils/fontFamily.js +1 -0
  187. package/dist/utils/fontSize.d.ts +2 -0
  188. package/dist/utils/fontSize.js +1 -0
  189. package/dist/utils/getTableNodeTypes.d.ts +4 -0
  190. package/dist/utils/getTableNodeTypes.js +1 -0
  191. package/dist/utils/image.d.ts +14 -0
  192. package/dist/utils/image.js +1 -0
  193. package/dist/utils/indent.d.ts +12 -0
  194. package/dist/utils/indent.js +1 -0
  195. package/dist/utils/index.d.ts +12 -0
  196. package/dist/utils/index.js +1 -0
  197. package/dist/utils/isCellSelection.d.ts +2 -0
  198. package/dist/utils/isCellSelection.js +1 -0
  199. package/dist/utils/shared.d.ts +20 -0
  200. package/dist/utils/shared.js +1 -0
  201. package/package.json +18 -0
  202. package/style.css +1 -0
@@ -0,0 +1,584 @@
1
+ import type { Extensions } from '@tiptap/core';
2
+ type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';
3
+ type Props = {
4
+ extensions: Extensions;
5
+ content?: string;
6
+ modelContent?: string;
7
+ placeholder?: string;
8
+ width?: string | number;
9
+ height?: string | number;
10
+ output?: 'html' | 'json';
11
+ readOnly?: boolean;
12
+ tooltip?: boolean;
13
+ tooltipPosition?: TooltipPosition;
14
+ enableCharCount?: boolean;
15
+ charCountMax?: number;
16
+ spellCheck?: boolean;
17
+ locale?: any;
18
+ showFloatingMenu?: boolean;
19
+ editorClass?: string | string[] | Record<string, boolean>;
20
+ editorContentClass?: string | string[] | Record<string, boolean>;
21
+ editorMenubarClass?: string | string[] | Record<string, boolean>;
22
+ editorBubbleMenuClass?: string | string[] | Record<string, boolean>;
23
+ editorFooterClass?: string | string[] | Record<string, boolean>;
24
+ };
25
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
26
+ content: string;
27
+ modelContent: string;
28
+ placeholder: string;
29
+ output: string;
30
+ readOnly: boolean;
31
+ tooltip: boolean;
32
+ tooltipPosition: string;
33
+ enableCharCount: boolean;
34
+ spellCheck: boolean;
35
+ locale: {
36
+ editor: {
37
+ extensions: {
38
+ Bold: {
39
+ tooltip: string;
40
+ };
41
+ Code: {
42
+ tooltip: string;
43
+ };
44
+ Underline: {
45
+ tooltip: string;
46
+ };
47
+ Italic: {
48
+ tooltip: string;
49
+ };
50
+ Strike: {
51
+ tooltip: string;
52
+ };
53
+ HardBreak: {
54
+ tooltip: string;
55
+ };
56
+ Heading: {
57
+ tooltip: string;
58
+ buttons: {
59
+ paragraph: string;
60
+ heading: string;
61
+ };
62
+ };
63
+ Blockquote: {
64
+ tooltip: string;
65
+ };
66
+ CodeBlock: {
67
+ tooltip: string;
68
+ };
69
+ Link: {
70
+ add: {
71
+ tooltip: string;
72
+ control: {
73
+ title: string;
74
+ href: string;
75
+ open_in_new_tab: string;
76
+ confirm: string;
77
+ cancel: string;
78
+ };
79
+ };
80
+ edit: {
81
+ tooltip: string;
82
+ control: {
83
+ title: string;
84
+ href: string;
85
+ open_in_new_tab: string;
86
+ confirm: string;
87
+ cancel: string;
88
+ };
89
+ };
90
+ unlink: {
91
+ tooltip: string;
92
+ };
93
+ open: {
94
+ tooltip: string;
95
+ };
96
+ back: {
97
+ tooltip: string;
98
+ };
99
+ };
100
+ Subscript: {
101
+ tooltip: string;
102
+ };
103
+ Superscript: {
104
+ tooltip: string;
105
+ };
106
+ Image: {
107
+ buttons: {
108
+ insert_image: {
109
+ tooltip: string;
110
+ external: string;
111
+ upload: string;
112
+ };
113
+ remove_image: {
114
+ tooltip: string;
115
+ };
116
+ image_options: {
117
+ tooltip: string;
118
+ };
119
+ display: {
120
+ tooltip: string;
121
+ inline: string;
122
+ block: string;
123
+ left: string;
124
+ right: string;
125
+ };
126
+ };
127
+ control: {
128
+ insert_by_url: {
129
+ title: string;
130
+ placeholder: string;
131
+ confirm: string;
132
+ cancel: string;
133
+ invalid_url: string;
134
+ };
135
+ upload_image: {
136
+ title: string;
137
+ button: string;
138
+ };
139
+ edit_image: {
140
+ title: string;
141
+ confirm: string;
142
+ cancel: string;
143
+ form: {
144
+ src: string;
145
+ alt: string;
146
+ width: string;
147
+ height: string;
148
+ };
149
+ };
150
+ };
151
+ };
152
+ Iframe: {
153
+ tooltip: string;
154
+ control: {
155
+ title: string;
156
+ placeholder: string;
157
+ confirm: string;
158
+ cancel: string;
159
+ };
160
+ };
161
+ BulletList: {
162
+ tooltip: string;
163
+ };
164
+ OrderedList: {
165
+ tooltip: string;
166
+ };
167
+ TodoList: {
168
+ tooltip: string;
169
+ };
170
+ TextAlign: {
171
+ buttons: {
172
+ align_left: {
173
+ tooltip: string;
174
+ };
175
+ align_center: {
176
+ tooltip: string;
177
+ };
178
+ align_right: {
179
+ tooltip: string;
180
+ };
181
+ align_justify: {
182
+ tooltip: string;
183
+ };
184
+ };
185
+ };
186
+ FontFamily: {
187
+ tooltip: string;
188
+ default: string;
189
+ };
190
+ FontSize: {
191
+ tooltip: string;
192
+ default: string;
193
+ };
194
+ TextColor: {
195
+ tooltip: string;
196
+ default: string;
197
+ };
198
+ TextHighlight: {
199
+ tooltip: string;
200
+ default: string;
201
+ };
202
+ LineHeight: {
203
+ tooltip: string;
204
+ default: string;
205
+ };
206
+ Table: {
207
+ tooltip: string;
208
+ buttons: {
209
+ more: string;
210
+ add_column_before: string;
211
+ add_column_after: string;
212
+ delete_column: string;
213
+ add_row_before: string;
214
+ add_row_after: string;
215
+ delete_row: string;
216
+ merge_cells: string;
217
+ split_cell: string;
218
+ delete_table: string;
219
+ };
220
+ };
221
+ Indent: {
222
+ buttons: {
223
+ indent: {
224
+ tooltip: string;
225
+ };
226
+ outdent: {
227
+ tooltip: string;
228
+ };
229
+ };
230
+ };
231
+ FormatClear: {
232
+ tooltip: string;
233
+ };
234
+ HorizontalRule: {
235
+ tooltip: string;
236
+ };
237
+ History: {
238
+ tooltip: {
239
+ undo: string;
240
+ redo: string;
241
+ };
242
+ };
243
+ Fullscreen: {
244
+ tooltip: {
245
+ fullscreen: string;
246
+ exit_fullscreen: string;
247
+ };
248
+ };
249
+ Print: {
250
+ tooltip: string;
251
+ };
252
+ Preview: {
253
+ tooltip: string;
254
+ dialog: {
255
+ title: string;
256
+ };
257
+ };
258
+ SelectAll: {
259
+ tooltip: string;
260
+ };
261
+ CodeView: {
262
+ tooltip: string;
263
+ };
264
+ Emoji: {
265
+ tooltip: string;
266
+ };
267
+ };
268
+ characters: string;
269
+ };
270
+ };
271
+ showFloatingMenu: boolean;
272
+ editorClass: string;
273
+ editorContentClass: string;
274
+ editorMenubarClass: string;
275
+ editorBubbleMenuClass: string;
276
+ editorFooterClass: string;
277
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
278
+ onBeforeCreate: (...args: any[]) => void;
279
+ onCreate: (...args: any[]) => void;
280
+ onUpdate: (...args: any[]) => void;
281
+ onSelectionUpdate: (...args: any[]) => void;
282
+ onTransaction: (...args: any[]) => void;
283
+ onFocus: (...args: any[]) => void;
284
+ onBlur: (...args: any[]) => void;
285
+ onDestroy: (...args: any[]) => void;
286
+ "update:content": (...args: any[]) => void;
287
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
288
+ content: string;
289
+ modelContent: string;
290
+ placeholder: string;
291
+ output: string;
292
+ readOnly: boolean;
293
+ tooltip: boolean;
294
+ tooltipPosition: string;
295
+ enableCharCount: boolean;
296
+ spellCheck: boolean;
297
+ locale: {
298
+ editor: {
299
+ extensions: {
300
+ Bold: {
301
+ tooltip: string;
302
+ };
303
+ Code: {
304
+ tooltip: string;
305
+ };
306
+ Underline: {
307
+ tooltip: string;
308
+ };
309
+ Italic: {
310
+ tooltip: string;
311
+ };
312
+ Strike: {
313
+ tooltip: string;
314
+ };
315
+ HardBreak: {
316
+ tooltip: string;
317
+ };
318
+ Heading: {
319
+ tooltip: string;
320
+ buttons: {
321
+ paragraph: string;
322
+ heading: string;
323
+ };
324
+ };
325
+ Blockquote: {
326
+ tooltip: string;
327
+ };
328
+ CodeBlock: {
329
+ tooltip: string;
330
+ };
331
+ Link: {
332
+ add: {
333
+ tooltip: string;
334
+ control: {
335
+ title: string;
336
+ href: string;
337
+ open_in_new_tab: string;
338
+ confirm: string;
339
+ cancel: string;
340
+ };
341
+ };
342
+ edit: {
343
+ tooltip: string;
344
+ control: {
345
+ title: string;
346
+ href: string;
347
+ open_in_new_tab: string;
348
+ confirm: string;
349
+ cancel: string;
350
+ };
351
+ };
352
+ unlink: {
353
+ tooltip: string;
354
+ };
355
+ open: {
356
+ tooltip: string;
357
+ };
358
+ back: {
359
+ tooltip: string;
360
+ };
361
+ };
362
+ Subscript: {
363
+ tooltip: string;
364
+ };
365
+ Superscript: {
366
+ tooltip: string;
367
+ };
368
+ Image: {
369
+ buttons: {
370
+ insert_image: {
371
+ tooltip: string;
372
+ external: string;
373
+ upload: string;
374
+ };
375
+ remove_image: {
376
+ tooltip: string;
377
+ };
378
+ image_options: {
379
+ tooltip: string;
380
+ };
381
+ display: {
382
+ tooltip: string;
383
+ inline: string;
384
+ block: string;
385
+ left: string;
386
+ right: string;
387
+ };
388
+ };
389
+ control: {
390
+ insert_by_url: {
391
+ title: string;
392
+ placeholder: string;
393
+ confirm: string;
394
+ cancel: string;
395
+ invalid_url: string;
396
+ };
397
+ upload_image: {
398
+ title: string;
399
+ button: string;
400
+ };
401
+ edit_image: {
402
+ title: string;
403
+ confirm: string;
404
+ cancel: string;
405
+ form: {
406
+ src: string;
407
+ alt: string;
408
+ width: string;
409
+ height: string;
410
+ };
411
+ };
412
+ };
413
+ };
414
+ Iframe: {
415
+ tooltip: string;
416
+ control: {
417
+ title: string;
418
+ placeholder: string;
419
+ confirm: string;
420
+ cancel: string;
421
+ };
422
+ };
423
+ BulletList: {
424
+ tooltip: string;
425
+ };
426
+ OrderedList: {
427
+ tooltip: string;
428
+ };
429
+ TodoList: {
430
+ tooltip: string;
431
+ };
432
+ TextAlign: {
433
+ buttons: {
434
+ align_left: {
435
+ tooltip: string;
436
+ };
437
+ align_center: {
438
+ tooltip: string;
439
+ };
440
+ align_right: {
441
+ tooltip: string;
442
+ };
443
+ align_justify: {
444
+ tooltip: string;
445
+ };
446
+ };
447
+ };
448
+ FontFamily: {
449
+ tooltip: string;
450
+ default: string;
451
+ };
452
+ FontSize: {
453
+ tooltip: string;
454
+ default: string;
455
+ };
456
+ TextColor: {
457
+ tooltip: string;
458
+ default: string;
459
+ };
460
+ TextHighlight: {
461
+ tooltip: string;
462
+ default: string;
463
+ };
464
+ LineHeight: {
465
+ tooltip: string;
466
+ default: string;
467
+ };
468
+ Table: {
469
+ tooltip: string;
470
+ buttons: {
471
+ more: string;
472
+ add_column_before: string;
473
+ add_column_after: string;
474
+ delete_column: string;
475
+ add_row_before: string;
476
+ add_row_after: string;
477
+ delete_row: string;
478
+ merge_cells: string;
479
+ split_cell: string;
480
+ delete_table: string;
481
+ };
482
+ };
483
+ Indent: {
484
+ buttons: {
485
+ indent: {
486
+ tooltip: string;
487
+ };
488
+ outdent: {
489
+ tooltip: string;
490
+ };
491
+ };
492
+ };
493
+ FormatClear: {
494
+ tooltip: string;
495
+ };
496
+ HorizontalRule: {
497
+ tooltip: string;
498
+ };
499
+ History: {
500
+ tooltip: {
501
+ undo: string;
502
+ redo: string;
503
+ };
504
+ };
505
+ Fullscreen: {
506
+ tooltip: {
507
+ fullscreen: string;
508
+ exit_fullscreen: string;
509
+ };
510
+ };
511
+ Print: {
512
+ tooltip: string;
513
+ };
514
+ Preview: {
515
+ tooltip: string;
516
+ dialog: {
517
+ title: string;
518
+ };
519
+ };
520
+ SelectAll: {
521
+ tooltip: string;
522
+ };
523
+ CodeView: {
524
+ tooltip: string;
525
+ };
526
+ Emoji: {
527
+ tooltip: string;
528
+ };
529
+ };
530
+ characters: string;
531
+ };
532
+ };
533
+ showFloatingMenu: boolean;
534
+ editorClass: string;
535
+ editorContentClass: string;
536
+ editorMenubarClass: string;
537
+ editorBubbleMenuClass: string;
538
+ editorFooterClass: string;
539
+ }>>> & {
540
+ onOnBeforeCreate?: ((...args: any[]) => any) | undefined;
541
+ onOnCreate?: ((...args: any[]) => any) | undefined;
542
+ onOnUpdate?: ((...args: any[]) => any) | undefined;
543
+ onOnSelectionUpdate?: ((...args: any[]) => any) | undefined;
544
+ onOnTransaction?: ((...args: any[]) => any) | undefined;
545
+ onOnFocus?: ((...args: any[]) => any) | undefined;
546
+ onOnBlur?: ((...args: any[]) => any) | undefined;
547
+ onOnDestroy?: ((...args: any[]) => any) | undefined;
548
+ "onUpdate:content"?: ((...args: any[]) => any) | undefined;
549
+ }, {
550
+ content: string;
551
+ output: "html" | "json";
552
+ tooltip: boolean;
553
+ tooltipPosition: TooltipPosition;
554
+ placeholder: string;
555
+ modelContent: string;
556
+ readOnly: boolean;
557
+ enableCharCount: boolean;
558
+ spellCheck: boolean;
559
+ locale: any;
560
+ showFloatingMenu: boolean;
561
+ editorClass: string | string[] | Record<string, boolean>;
562
+ editorContentClass: string | string[] | Record<string, boolean>;
563
+ editorMenubarClass: string | string[] | Record<string, boolean>;
564
+ editorBubbleMenuClass: string | string[] | Record<string, boolean>;
565
+ editorFooterClass: string | string[] | Record<string, boolean>;
566
+ }, {}>;
567
+ export default _default;
568
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
569
+ type __VLS_TypePropsToRuntimeProps<T> = {
570
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
571
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
572
+ } : {
573
+ type: import('vue').PropType<T[K]>;
574
+ required: true;
575
+ };
576
+ };
577
+ type __VLS_WithDefaults<P, D> = {
578
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
579
+ default: D[K];
580
+ }> : P[K];
581
+ };
582
+ type __VLS_Prettify<T> = {
583
+ [K in keyof T]: T[K];
584
+ } & {};
@@ -0,0 +1 @@
1
+ import{defineComponent as T,watch as b,watchEffect as O,unref as o,toRaw as E,ref as D,provide as s,computed as U,openBlock as i,createElementBlock as p,normalizeStyle as H,normalizeClass as d,createVNode as y,createBlock as x,createCommentVNode as c,createElementVNode as m,withDirectives as N,vShow as P,toDisplayString as g}from"vue";import{useEditor as z,EditorContent as V}from"@tiptap/vue-3";import{CharacterCount as L,Placeholder as R}from"../extensions";import{zh as A,Trans as v}from"../i18n";import{useCodeView as j,useCharacterCount as I,useEditorStyle as J}from"../hooks";import{BubbleMenu as q,FloatingMenu as G,MenuBar as K}from".";const Q={class:"daisy-tiptap-editor__wrapper"},W={class:"daisy-tiptap-editor__content text-left flex-1 overflow-hidden"},oe=T({__name:"DaisyTiptap",props:{extensions:{},content:{default:""},modelContent:{default:""},placeholder:{default:""},width:{},height:{},output:{default:"html"},readOnly:{type:Boolean,default:!1},tooltip:{type:Boolean,default:!0},tooltipPosition:{default:"top"},enableCharCount:{type:Boolean,default:!0},charCountMax:{},spellCheck:{type:Boolean,default:!0},locale:{default:A},showFloatingMenu:{type:Boolean,default:!1},editorClass:{default:""},editorContentClass:{default:""},editorMenubarClass:{default:""},editorBubbleMenuClass:{default:""},editorFooterClass:{default:""}},emits:["onBeforeCreate","onCreate","onUpdate","onSelectionUpdate","onTransaction","onFocus","onBlur","onDestroy","update:content"],setup(w,{emit:_}){const t=w,r=_,h=t.enableCharCount?t.extensions.concat([L.configure({limit:t.charCountMax})]):t.extensions,l=z({content:t.content||t.modelContent,editable:!t.readOnly,extensions:[...h,R.configure({emptyEditorClass:"daisy-tiptap-editor__placeholder",emptyNodeClass:"daisy-tiptap-editor__placeholder",showOnlyCurrent:!1,placeholder:()=>String(t.placeholder)})],onBeforeCreate:({editor:e})=>{r("onBeforeCreate",{editor:e})},onCreate:({editor:e})=>{b(()=>t.content,n=>{e.getHTML()!==n&&e.commands.setContent(n,!1)}),b(()=>t.modelContent,n=>{e.getHTML()!==n&&e.commands.setContent(n,!1)}),r("onCreate",{editor:e})},onUpdate:({editor:e})=>{let n;t.output==="html"?n=e.getHTML():n=e.getJSON(),r("update:content",n),r("onUpdate",{output:n,editor:e})},onSelectionUpdate:({editor:e})=>{r("onSelectionUpdate",{editor:e})},onTransaction:({editor:e})=>{r("onTransaction",{editor:e})},onFocus:({editor:e})=>{r("onFocus",{editor:e})},onBlur:({editor:e})=>{r("onBlur",{editor:e})},onDestroy:()=>{r("onDestroy")}});O(()=>{var e;(e=o(l))==null||e.setOptions({editorProps:{attributes:{spellCheck:String(t.spellCheck)}}})});const B=v.buildI18nHandler(E(t.locale)),C=(...e)=>B.apply(v,e),a=D(!1),M=e=>{a.value=e};s("readOnly",t.readOnly),s("isFullscreen",a),s("toggleFullscreen",M),s("enableTooltip",t.tooltip),s("tooltipPosition",t.tooltipPosition);const{isCodeViewMode:u,cmTextAreaRef:k}=j(l);s("isCodeViewMode",u);const{characters:F}=I(l),f=U(()=>t.enableCharCount&&!o(u)),S=J({width:t.width,height:t.height});return s("i18n",C),s("editor",l),(e,n)=>(i(),p("div",Q,[o(l)?(i(),p("div",{key:0,style:H(o(S)),class:d(["box-border flex flex-col min-w-0 max-w-full w-full max-h-full h-full border-2 border-solid, border-neutral-content",{"rounded-none fixed top-0 left-0 right-0 bottom-0 z-50 bg-base-200":a.value,"rounded-lg relative":!a.value},t.editorClass])},[y(o(q),{editor:o(l),extensions:o(h),class:d(t.editorBubbleMenuClass)},null,8,["editor","extensions","class"]),e.showFloatingMenu?(i(),x(o(G),{key:0,editor:o(l)},null,8,["editor"])):c("",!0),t.readOnly?c("",!0):(i(),x(o(K),{key:1,editor:o(l),extensions:t.extensions,class:d(["space-x-1 flex shrink-0 flex-wrap p-1.5 relative","before:bg-neutral-content before:absolute before:right-0 before:left-0 before:bottom-0 before:h-[1px] before:content-normal before:mx-2.5",{"rounded-none":a.value,"rounded-t-lg":!a.value},t.editorMenubarClass])},null,8,["editor","extensions","class"])),o(u)?(i(),p("div",{key:2,class:d({"daisy-tiptap-editor__codemirror":!0,"flex flex-grow text-base leading-6 overflow-scroll":!0,"border-bottom-radius":o(u)})},[m("textarea",{ref_key:"cmTextAreaRef",ref:k},null,512)],2)):c("",!0),m("div",W,[N(y(o(V),{editor:o(l),class:d(["prose max-w-none h-full overflow-auto p-4",{"rounded-b-lg":!f.value,"rounded-b-none":f.value,"rounded-none":a.value},t.editorContentClass])},null,8,["editor","class"]),[[P,!o(u)]])]),f.value?(i(),p("div",{key:3,class:d(["daisy-tiptap-editor__footer items-center border-t-2 border-solid border-neutral-content flex text-sm justify-end p-2.5",{"rounded-none":a.value,"rounded-b-lg":!a.value},t.editorFooterClass])},[m("span",null,g(C("editor.characters"))+": "+g(o(F)),1)],2)):c("",!0)],6)):c("",!0)]))}});export{oe as default};
@@ -0,0 +1,24 @@
1
+ import type { Editor } from '@tiptap/core';
2
+ type Props = {
3
+ editor: Editor;
4
+ tooltipClass: any;
5
+ };
6
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {}>>>, {}, {}>;
7
+ export default _default;
8
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
9
+ type __VLS_TypePropsToRuntimeProps<T> = {
10
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
11
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
12
+ } : {
13
+ type: import('vue').PropType<T[K]>;
14
+ required: true;
15
+ };
16
+ };
17
+ type __VLS_WithDefaults<P, D> = {
18
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
19
+ default: D[K];
20
+ }> : P[K];
21
+ };
22
+ type __VLS_Prettify<T> = {
23
+ [K in keyof T]: T[K];
24
+ } & {};
@@ -0,0 +1 @@
1
+ import{defineComponent as I,ref as y,inject as k,computed as C,openBlock as p,createElementBlock as _,Fragment as b,createElementVNode as t,createVNode as f,unref as l,toDisplayString as a,renderList as A,normalizeClass as T,withDirectives as c,vModelText as u}from"vue";import{ImageDisplay as m}from"../utils";import{UniversalToggleButton as E,Icon as B}from".";const L={class:"w-8 h-8"},V={class:"modal-box p-4"},D={class:"menu menu-horizontal bg-base-200 rounded-box mt-2 mb-6 ml-0"},F=["data-tip","onClick"],N={class:"form-control w-full max-w-none mb-2"},R={class:"label"},U={class:"label-text-alt"},M={class:"form-control w-full max-w-none mb-2"},$={class:"label"},j={class:"label-text-alt"},z={class:"form-control w-full max-w-none mb-2"},O={class:"label"},G={class:"label-text-alt"},H={class:"flex justify-end"},K=t("form",{method:"dialog",class:"modal-backdrop"},[t("button",{tabindex:"-1"},"close")],-1),P=I({__name:"EditImageButton",props:{editor:{},tooltipClass:{}},setup(g){const d=g,r=y();function x(){r.value.showModal()}const n=k("i18n"),v=[m.INLINE,m.BREAK_TEXT,m.FLOAT_LEFT,m.FLOAT_RIGHT];function h(e){r.value.close(),d.editor.commands.updateAttributes("image",{display:e}),d.editor.chain().focus().run()}function w(){r.value.close();let{width:e}=s.value;e=parseInt(e,10),d.editor.commands.updateAttributes("image",{alt:s.value.alt,width:e>=0?e:null}),d.editor.chain().focus().run()}const s=C(()=>{const e=d.editor.getAttributes("image");return{src:e.src,alt:e.alt,width:e.width,display:e.display}});return(e,i)=>(p(),_(b,null,[t("li",L,[f(l(E),{icon:"edit",tooltip:l(n)("editor.extensions.Image.buttons.image_options.tooltip"),onClick:x,"is-active":!1},null,8,["tooltip"])]),t("dialog",{ref_key:"editImageRef",ref:r,class:"modal text-left"},[t("div",V,[t("p",null,a(l(n)("editor.extensions.Image.buttons.display.tooltip")),1),t("ul",D,[(p(),_(b,null,A(v,o=>t("li",{key:o},[t("a",{class:T({tooltip:!0,active:s.value.display===o}),"data-tip":l(n)(`editor.extensions.Image.buttons.display.${o}`),onClick:S=>h(o)},[f(l(B),{name:`image/image-${o}`},null,8,["name"])],10,F)])),64))]),t("p",null,a(l(n)("editor.extensions.Image.control.edit_image.title")),1),t("label",N,[t("div",R,[t("span",U,a(l(n)("editor.extensions.Image.control.edit_image.form.src")),1)]),c(t("input",{type:"url",disabled:"",class:"input input-bordered input-sm w-full max-w-none","onUpdate:modelValue":i[0]||(i[0]=o=>s.value.src=o)},null,512),[[u,s.value.src]])]),t("label",M,[t("div",$,[t("span",j,a(l(n)("editor.extensions.Image.control.edit_image.form.alt")),1)]),c(t("input",{type:"text",class:"input input-bordered input-sm w-full max-w-none","onUpdate:modelValue":i[1]||(i[1]=o=>s.value.alt=o)},null,512),[[u,s.value.alt]])]),t("label",z,[t("div",O,[t("span",G,a(l(n)("editor.extensions.Image.control.edit_image.form.width")),1)]),c(t("input",{type:"number",class:"input input-bordered input-sm w-full max-w-none","onUpdate:modelValue":i[2]||(i[2]=o=>s.value.width=o)},null,512),[[u,s.value.width]])]),t("div",H,[t("div",{class:"btn btn-sm mr-2",onClick:i[3]||(i[3]=()=>r.value.close())},a(l(n)("editor.extensions.Image.control.edit_image.cancel")),1),t("div",{class:"btn btn-sm btn-primary",onClick:w},a(l(n)("editor.extensions.Image.control.edit_image.confirm")),1)])]),K],512)],64))}});export{P as default};
@@ -0,0 +1,33 @@
1
+ import type { Editor } from '@tiptap/core';
2
+ type Props = {
3
+ editor: Editor;
4
+ linkAttrs: {
5
+ href: string;
6
+ openInNewTab: boolean;
7
+ };
8
+ open: boolean;
9
+ tooltip: string;
10
+ };
11
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ "update:open": (...args: any[]) => void;
13
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {}>>> & {
14
+ "onUpdate:open"?: ((...args: any[]) => any) | undefined;
15
+ }, {}, {}>;
16
+ export default _default;
17
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
18
+ type __VLS_TypePropsToRuntimeProps<T> = {
19
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
20
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
21
+ } : {
22
+ type: import('vue').PropType<T[K]>;
23
+ required: true;
24
+ };
25
+ };
26
+ type __VLS_WithDefaults<P, D> = {
27
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
28
+ default: D[K];
29
+ }> : P[K];
30
+ };
31
+ type __VLS_Prettify<T> = {
32
+ [K in keyof T]: T[K];
33
+ } & {};
@@ -0,0 +1 @@
1
+ import{defineComponent as b,inject as _,computed as v,onMounted as x,watchEffect as w,ref as L,openBlock as y,createElementBlock as g,createElementVNode as e,toDisplayString as s,unref as i,withDirectives as u,vModelText as $,vModelCheckbox as A}from"vue";const D={class:"modal-box w-96"},N={class:"form-control w-full max-w-none my-4"},T={class:"label"},C={class:"form-control"},E={class:"label cursor-pointer justify-start"},I={class:"label-text ml-4"},M={class:"flex justify-end"},j=e("form",{method:"dialog",class:"modal-backdrop"},[e("button",null,"close")],-1),V=b({__name:"EditLinkDialog",props:{editor:{},linkAttrs:{},open:{type:Boolean},tooltip:{}},emits:["update:open"],setup(p,{emit:f}){const t=p,m=f,n=_("i18n"),o=v(()=>t.linkAttrs);x(()=>{w(()=>{t.open&&k()})});const r=L();function k(){r.value.showModal()}function d(){r.value.close(),o.value.href="",o.value.openInNewTab=!0,t.editor.chain().focus().run(),m("update:open",!1)}function h(){let l="";/^https?:\/\//.test(o.value.href)?l=o.value.href:l=`https://${o.value.href}`,o.value.openInNewTab?t.editor.commands.setLink({href:l,target:"_blank"}):t.editor.commands.setLink({href:l}),d()}return(l,a)=>(y(),g("dialog",{ref_key:"addLinkRef",ref:r,class:"modal text-left"},[e("div",D,[e("p",null,s(i(n)(`editor.extensions.Link.${t.tooltip}.control.title`)),1),e("label",N,[e("div",T,[e("span",null,s(i(n)(`editor.extensions.Link.${t.tooltip}.control.href`)),1)]),u(e("input",{type:"url",class:"input input-bordered input-sm w-full max-w-none","onUpdate:modelValue":a[0]||(a[0]=c=>o.value.href=c),autocomplete:"off"},null,512),[[$,o.value.href]])]),e("label",C,[e("div",E,[u(e("input",{type:"checkbox","onUpdate:modelValue":a[1]||(a[1]=c=>o.value.openInNewTab=c),class:"checkbox"},null,512),[[A,o.value.openInNewTab]]),e("span",I,s(i(n)(`editor.extensions.Link.${t.tooltip}.control.open_in_new_tab`)),1)])]),e("div",M,[e("div",{class:"btn btn-sm mr-2",onClick:d},s(i(n)(`editor.extensions.Link.${t.tooltip}.control.cancel`)),1),e("div",{class:"btn btn-sm btn-primary",onClick:h},s(i(n)(`editor.extensions.Link.${t.tooltip}.control.confirm`)),1)])]),j],512))}});export{V as default};