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,237 @@
1
+ declare const _default: {
2
+ editor: {
3
+ extensions: {
4
+ Bold: {
5
+ tooltip: string;
6
+ };
7
+ Code: {
8
+ tooltip: string;
9
+ };
10
+ Underline: {
11
+ tooltip: string;
12
+ };
13
+ Italic: {
14
+ tooltip: string;
15
+ };
16
+ Strike: {
17
+ tooltip: string;
18
+ };
19
+ HardBreak: {
20
+ tooltip: string;
21
+ };
22
+ Heading: {
23
+ tooltip: string;
24
+ buttons: {
25
+ paragraph: string;
26
+ heading: string;
27
+ };
28
+ };
29
+ Blockquote: {
30
+ tooltip: string;
31
+ };
32
+ CodeBlock: {
33
+ tooltip: string;
34
+ };
35
+ Link: {
36
+ add: {
37
+ tooltip: string;
38
+ control: {
39
+ title: string;
40
+ href: string;
41
+ open_in_new_tab: string;
42
+ confirm: string;
43
+ cancel: string;
44
+ };
45
+ };
46
+ edit: {
47
+ tooltip: string;
48
+ control: {
49
+ title: string;
50
+ href: string;
51
+ open_in_new_tab: string;
52
+ confirm: string;
53
+ cancel: string;
54
+ };
55
+ };
56
+ unlink: {
57
+ tooltip: string;
58
+ };
59
+ open: {
60
+ tooltip: string;
61
+ };
62
+ back: {
63
+ tooltip: string;
64
+ };
65
+ };
66
+ Subscript: {
67
+ tooltip: string;
68
+ };
69
+ Superscript: {
70
+ tooltip: string;
71
+ };
72
+ Image: {
73
+ buttons: {
74
+ insert_image: {
75
+ tooltip: string;
76
+ external: string;
77
+ upload: string;
78
+ };
79
+ remove_image: {
80
+ tooltip: string;
81
+ };
82
+ image_options: {
83
+ tooltip: string;
84
+ };
85
+ display: {
86
+ tooltip: string;
87
+ inline: string;
88
+ block: string;
89
+ left: string;
90
+ right: string;
91
+ };
92
+ };
93
+ control: {
94
+ insert_by_url: {
95
+ title: string;
96
+ placeholder: string;
97
+ confirm: string;
98
+ cancel: string;
99
+ invalid_url: string;
100
+ };
101
+ upload_image: {
102
+ title: string;
103
+ button: string;
104
+ };
105
+ edit_image: {
106
+ title: string;
107
+ confirm: string;
108
+ cancel: string;
109
+ form: {
110
+ src: string;
111
+ alt: string;
112
+ width: string;
113
+ height: string;
114
+ };
115
+ };
116
+ };
117
+ };
118
+ Iframe: {
119
+ tooltip: string;
120
+ control: {
121
+ title: string;
122
+ placeholder: string;
123
+ confirm: string;
124
+ cancel: string;
125
+ };
126
+ };
127
+ BulletList: {
128
+ tooltip: string;
129
+ };
130
+ OrderedList: {
131
+ tooltip: string;
132
+ };
133
+ TodoList: {
134
+ tooltip: string;
135
+ };
136
+ TextAlign: {
137
+ buttons: {
138
+ align_left: {
139
+ tooltip: string;
140
+ };
141
+ align_center: {
142
+ tooltip: string;
143
+ };
144
+ align_right: {
145
+ tooltip: string;
146
+ };
147
+ align_justify: {
148
+ tooltip: string;
149
+ };
150
+ };
151
+ };
152
+ FontFamily: {
153
+ tooltip: string;
154
+ default: string;
155
+ };
156
+ FontSize: {
157
+ tooltip: string;
158
+ default: string;
159
+ };
160
+ TextColor: {
161
+ tooltip: string;
162
+ default: string;
163
+ };
164
+ TextHighlight: {
165
+ tooltip: string;
166
+ default: string;
167
+ };
168
+ LineHeight: {
169
+ tooltip: string;
170
+ default: string;
171
+ };
172
+ Table: {
173
+ tooltip: string;
174
+ buttons: {
175
+ more: string;
176
+ add_column_before: string;
177
+ add_column_after: string;
178
+ delete_column: string;
179
+ add_row_before: string;
180
+ add_row_after: string;
181
+ delete_row: string;
182
+ merge_cells: string;
183
+ split_cell: string;
184
+ delete_table: string;
185
+ };
186
+ };
187
+ Indent: {
188
+ buttons: {
189
+ indent: {
190
+ tooltip: string;
191
+ };
192
+ outdent: {
193
+ tooltip: string;
194
+ };
195
+ };
196
+ };
197
+ FormatClear: {
198
+ tooltip: string;
199
+ };
200
+ HorizontalRule: {
201
+ tooltip: string;
202
+ };
203
+ History: {
204
+ tooltip: {
205
+ undo: string;
206
+ redo: string;
207
+ };
208
+ };
209
+ Fullscreen: {
210
+ tooltip: {
211
+ fullscreen: string;
212
+ exit_fullscreen: string;
213
+ };
214
+ };
215
+ Print: {
216
+ tooltip: string;
217
+ };
218
+ Preview: {
219
+ tooltip: string;
220
+ dialog: {
221
+ title: string;
222
+ };
223
+ };
224
+ SelectAll: {
225
+ tooltip: string;
226
+ };
227
+ CodeView: {
228
+ tooltip: string;
229
+ };
230
+ Emoji: {
231
+ tooltip: string;
232
+ };
233
+ };
234
+ characters: string;
235
+ };
236
+ };
237
+ export default _default;
@@ -0,0 +1 @@
1
+ const t={editor:{extensions:{Bold:{tooltip:"粗體"},Code:{tooltip:"行內代碼"},Underline:{tooltip:"底線"},Italic:{tooltip:"斜體"},Strike:{tooltip:"刪除線"},HardBreak:{tooltip:"強制換行"},Heading:{tooltip:"標題",buttons:{paragraph:"段落",heading:"標題"}},Blockquote:{tooltip:"引用"},CodeBlock:{tooltip:"程式碼"},Link:{add:{tooltip:"新增超連結",control:{title:"新增超連結",href:"超連結",open_in_new_tab:"在新分頁開啟",confirm:"新增",cancel:"取消"}},edit:{tooltip:"編輯超連結",control:{title:"編輯超連結",href:"超連結",open_in_new_tab:"在新分頁開啟",confirm:"更新",cancel:"取消"}},unlink:{tooltip:"取消超連結"},open:{tooltip:"打開超連結"},back:{tooltip:"返回"}},Subscript:{tooltip:"下標"},Superscript:{tooltip:"上標"},Image:{buttons:{insert_image:{tooltip:"新增圖片",external:"新增網路圖片",upload:"上傳本機圖片"},remove_image:{tooltip:"刪除"},image_options:{tooltip:"圖片屬性"},display:{tooltip:"佈局",inline:"内聯",block:"塊",left:"左浮動",right:"右浮動"}},control:{insert_by_url:{title:"新增網路圖片",placeholder:"輸入超連結",confirm:"新增",cancel:"取消",invalid_url:"請輸入正確的圖片連結"},upload_image:{title:"上傳本機圖片",button:"將圖片文件拖到此處或者點擊上傳"},edit_image:{title:"編輯圖片",confirm:"更新",cancel:"取消",form:{src:"圖片連結",alt:"替代文字",width:"寬度",height:"高度"}}}},Iframe:{tooltip:"新增影片",control:{title:"新增影片",placeholder:"輸入超連結",confirm:"確認",cancel:"取消"}},BulletList:{tooltip:"無序列表"},OrderedList:{tooltip:"有序列表"},TodoList:{tooltip:"任務列表"},TextAlign:{buttons:{align_left:{tooltip:"置左"},align_center:{tooltip:"置中"},align_right:{tooltip:"置右"},align_justify:{tooltip:"水平對齊"}}},FontFamily:{tooltip:"字體",default:"默認"},FontSize:{tooltip:"字體大小",default:"默認"},TextColor:{tooltip:"文字顏色",default:"默認顏色"},TextHighlight:{tooltip:"文字反白",default:"默認顏色"},LineHeight:{tooltip:"行距",default:"默認"},Table:{tooltip:"表格",buttons:{more:"更多設定",add_column_before:"向左新增一列",add_column_after:"向右新增一列",delete_column:"刪除列",add_row_before:"向上新增一行",add_row_after:"向下新增一行",delete_row:"删除行",merge_cells:"合併",split_cell:"分離儲存格",delete_table:"删除表格"}},Indent:{buttons:{indent:{tooltip:"增加縮排"},outdent:{tooltip:"减少縮排"}}},FormatClear:{tooltip:"清除格式"},HorizontalRule:{tooltip:"分隔線"},History:{tooltip:{undo:"復原",redo:"取消復原"}},Fullscreen:{tooltip:{fullscreen:"全螢幕",exit_fullscreen:"退出全螢幕"}},Print:{tooltip:"列印"},Preview:{tooltip:"預覽",dialog:{title:"預覽"}},SelectAll:{tooltip:"全選"},CodeView:{tooltip:"查看原始碼"},Emoji:{tooltip:"表情"}},characters:"字數"}};export{t as default};
@@ -0,0 +1,6 @@
1
+ import { Plugin } from 'vue';
2
+ import DaisyTiptap from './components';
3
+ declare const DaisyTiptapPlugin: Plugin;
4
+ export * from './extensions';
5
+ export { DaisyTiptap, DaisyTiptapPlugin };
6
+ export default DaisyTiptapPlugin;
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ import a from"./components";export*from"./extensions";const i={install(t){t.component("daisy-tiptap",a)}};export{a as DaisyTiptap,i as DaisyTiptapPlugin,i as default};
@@ -0,0 +1,10 @@
1
+ import { Editor } from '@tiptap/core';
2
+ import { MarkType } from '@tiptap/pm/model';
3
+ import { Plugin } from '@tiptap/pm/state';
4
+ type AutolinkOptions = {
5
+ editor: Editor;
6
+ type: MarkType;
7
+ validate?: (url: string) => boolean;
8
+ };
9
+ export declare function autolink(options: AutolinkOptions): Plugin;
10
+ export {};
@@ -0,0 +1 @@
1
+ import{combineTransactionSteps as B,getChangedRanges as k,findChildrenInRange as x,getMarksBetween as v}from"@tiptap/core";import{Plugin as y,PluginKey as C}from"@tiptap/pm/state";import{find as W}from"linkifyjs";function b(f){return new y({key:new C("autolink"),appendTransaction:(d,l,r)=>{const h=d.some(t=>t.docChanged)&&!l.doc.eq(r.doc),u=d.some(t=>t.getMeta("preventAutolink"));if(!h||u)return;const{tr:a}=r,p=B(l.doc,[...d]);if(k(p).forEach(({newRange:t})=>{const c=x(r.doc,t,s=>s.isTextblock);let o,n;if(c.length>1?(o=c[0],n=r.doc.textBetween(o.pos,o.pos+o.node.nodeSize,void 0," ")):c.length&&r.doc.textBetween(t.from,t.to," "," ").endsWith(" ")&&(o=c[0],n=r.doc.textBetween(o.pos,t.to,void 0," ")),o&&n){const s=n.split(" ").filter(e=>e!=="");if(s.length<=0)return!1;const i=s[s.length-1],m=o.pos+n.lastIndexOf(i);if(!i)return!1;W(i).filter(e=>e.isLink).map(e=>({...e,from:m+e.start+1,to:m+e.end+1})).filter(e=>r.schema.marks.code?!r.doc.rangeHasMark(e.from,e.to,r.schema.marks.code):!0).filter(e=>f.validate?f.validate(e.value):!0).forEach(e=>{v(e.from,e.to,r.doc).some(g=>g.mark.type===f.type)||a.addMark(e.from,e.to,f.type.create({href:e.href}))})}}),!!a.steps.length)return a}})}export{b as autolink};
@@ -0,0 +1,7 @@
1
+ import { MarkType } from '@tiptap/pm/model';
2
+ import { Plugin } from '@tiptap/pm/state';
3
+ type ClickHandlerOptions = {
4
+ type: MarkType;
5
+ };
6
+ export declare function clickHandler(options: ClickHandlerOptions): Plugin;
7
+ export {};
@@ -0,0 +1 @@
1
+ import{getAttributes as s}from"@tiptap/core";import{Plugin as i,PluginKey as u}from"@tiptap/pm/state";function d(o){return new i({key:new u("handleClickLink"),props:{handleClick:(r,c,e)=>{if(e.button!==0||e.target.nodeName!=="A")return!1;const n=s(r.state,o.type.name),t=e.target,a=(t==null?void 0:t.href)??n.href,f=(t==null?void 0:t.target)??n.target;return t&&a?(r.editable&&window.open(a,f),!0):!1}}})}export{d as clickHandler};
@@ -0,0 +1 @@
1
+ export declare const emojis: string[];
@@ -0,0 +1 @@
1
+ const i=[{title:"表情",type:"emoji",content:"😀 😃 😄 😁 😆 😅 😂 🤣 😊 😇 🙂 🙃 😉 😌 😍 🥰 😘 😗 😙 😚 😋 😛 😝 😜 🤪 🤨 🧐 🤓 😎 🤩 🥳 😏 😒 😞 😔 😟 😕 🙁 ☹️ 😣 😖 😫 😩 🥺 😢 😭 😤 😠 😡 🤬 🤯 😳 🥵 🥶 😱 😨 😰 😥 😓 🤗 🤔 🤭 🤫 🤥 😶 😐 😑 😬 🙄 😯 😦 😧 😮 😲 🥱 😴 🤤 😪 😵 🤐 🥴 🤢 🤮 🤧 😷 🤒 🤕 🤑 🤠 😈 👿 👹 👺 🤡 💩 👻 💀 ☠️ 👽 👾 🤖 🎃 😺 😸 😹 😻 😼 😽 🙀 😿 😾".split(/\s/)},{title:"手势",type:"emoji",content:"👋 🤚 🖐 ✋ 🖖 👌 🤏 ✌️ 🤞 🤟 🤘 🤙 👈 👉 👆 🖕 👇 ☝️ 👍 👎 ✊ 👊 🤛 🤜 👏 🙌 👐 🤲 🤝 🙏 ✍️ 💅 🤳 💪 🦾 🦵 🦿 🦶 👣 👂 🦻 👃 🧠 🦷 🦴 👀 👁️ 👅 👄 💋 🩸".split(/\s/)},{title:"配饰",type:"emoji",content:"🧳 🌂 ☂️ 🧵 🧶 👓 🕶️ 🥽 🥼 🦺 👔 👕 👖 🧣 🧤 🧥 🧦 👗 👘 🥻 🩱 🩲 🩳 👙 👚 👛 👜 👝 🎒 👞 👟 🥾 🥿 👠 👡 🩰 👢 👑 👒 🎩 🎓 🧢 ⛑️ 💄 💍 💼".split(/\s/)},{title:"动物",type:"emoji",content:"🐶 🐱 🐭 🐹 🐰 🦊 🐻 🐼 🐻‍❄️ 🐨 🐯 🦁 🐮 🐷 🐽 🐸 🐵 🙈 🙉 🙊 🐒 🐔 🐧 🐦 🐤 🐣 🐥 🦆 🦅 🦉 🦇 🐺 🐗 🐴 🦄 🐝 🐛 🦋 🐌 🐞 🐜 🦟 🦗 🕷️ 🕸️ 🦂 🐢 🐍 🦎 🦖 🦕 🐙 🦑 🦐 🦞 🦀 🐡 🐠 🐟 🐬 🐳 🐋 🦈 🐊 🐅 🐆 🦓 🦍 🦧 🐘 🦛 🦏 🐪 🐫 🦒 🦘 🐃 🐂 🐄 🐎 🐖 🐏 🐑 🦙 🐐 🦌 🐕 🐩 🦮 🐕‍🦺 🐈 🐈‍⬛ 🐓 🦃 🦚 🦜 🦢 🦩 🐇 🦝 🦨 🦡 🦦 🦥 🐁 🐀 🐿️ 🦔 🐾 🐉 🐲 🌵 🎄 🌲 🌳 🌴 🌱 🌿 ☘️ 🍀 🎍 🎋 🍃 🍂 🍁 🍄 🐚 🌾 💐 🌷 🌹 🥀 🌺 🌸 🌼 🌻 🌞 🌝 🌛 🌜 🌚 🌕 🌖 🌗 🌘 🌑 🌒 🌓 🌔 🌙 🌎 🌍 🌏 🪐 💫 ⭐️ 🌟 ✨ ⚡️ ☄️ 💥 🔥 🌪️ 🌈 ☀️ 🌤️ ⛅️ 🌥️ ☁️ 🌦️ 🌧️ ⛈️ 🌩️ 🌨️ ❄️ ☃️ ⛄️ 🌬️ 💨 💧 💦 ☔️ ☂️ 🌊 🌫️".split(/\s/)},{title:"食物",type:"emoji",content:"🍏 🍎 🍐 🍊 🍋 🍌 🍉 🍇 🍓 🍈 🍒 🍑 🥭 🍍 🥥 🥝 🍅 🍆 🥑 🥦 🥬 🥒 🌶 🌽 🥕 🧄 🧅 🥔 🍠 🥐 🥯 🍞 🥖 🥨 🧀 🥚 🍳 🧈 🥞 🧇 🥓 🥩 🍗 🍖 🦴 🌭 🍔 🍟 🍕 🥪 🥙 🧆 🌮 🌯 🥗 🥘 🥫 🍝 🍜 🍲 🍛 🍣 🍱 🥟 🦪 🍤 🍙 🍚 🍘 🍥 🥠 🥮 🍢 🍡 🍧 🍨 🍦 🥧 🧁 🍰 🎂 🍮 🍭 🍬 🍫 🍿 🍩 🍪 🌰 🥜 🍯 🥛 🍼 ☕️ 🍵 🧃 🥤 🍶 🍺 🍻 🥂 🍷 🥃 🍸 🍹 🧉 🍾 🧊 🥄 🍴 🍽️ 🥣 🥡 🥢 🧂".split(/\s/)},{title:"旅行",type:"emoji",content:"🚗 🚕 🚙 🚌 🚎 🏎️ 🚓 🚑 🚒 🚐 🚚 🚛 🚜 🦯 🦽 🦼 🛴 🚲 🛵 🏍️ 🛺 🚨 🚔 🚍 🚘 🚖 🚡 🚠 🚟 🚃 🚋 🚞 🚝 🚄 🚅 🚈 🚂 🚆 🚇 🚊 🚉 ✈️ 🛫 🛬 🛩️ 💺 🛰️ 🚀 🛸 🚁 🛶 ⛵️ 🚤 🛥️ 🛳️ ⛴️ 🚢 ⚓️ ⛽️ 🚧 🚦 🚥 🚏 🗺️ 🗿 🗽 🗼 🏰 🏯 🏟️ 🎡 🎢 🎠 ⛲️ ⛱️ 🏖️ 🏝️ 🏜️ 🌋 ⛰️ 🏔️ 🗻 🏕️ ⛺️ 🏠 🏡 🏘️ 🏚️ 🏗️ 🏭 🏢 🏬 🏣 🏤 🏥 🏦 🏨 🏪 🏫 🏩 💒 🏛️ ⛪️ 🕌 🕍 🛕 🕋 ⛩️ 🛤️ 🛣️ 🗾 🎑 🏞️ 🌅 🌄 🌠 🎇 🎆 🌇 🌆 🏙️ 🌃 🌌 🌉 🌁".split(/\s/)}],n=i.reduce((t,e)=>(e.content&&t.push(...e.content),t),[]);export{n as emojis};
@@ -0,0 +1,5 @@
1
+ type Icons = {
2
+ [key: string]: string;
3
+ };
4
+ export declare const icons: Icons;
5
+ export {};
@@ -0,0 +1 @@
1
+ const q={"heading/heading":"M420-680H260q-25 0-42.5-17.5T200-740q0-25 17.5-42.5T260-800h440q25 0 42.5 17.5T760-740q0 25-17.5 42.5T700-680H540v460q0 25-17.5 42.5T480-160q-25 0-42.5-17.5T420-220v-460Z","heading/heading-h1":"M240-280q-17 0-28.5-11.5T200-320v-320q0-17 11.5-28.5T240-680q17 0 28.5 11.5T280-640v120h160v-120q0-17 11.5-28.5T480-680q17 0 28.5 11.5T520-640v320q0 17-11.5 28.5T480-280q-17 0-28.5-11.5T440-320v-120H280v120q0 17-11.5 28.5T240-280Zm480 0q-17 0-28.5-11.5T680-320v-280h-40q-17 0-28.5-11.5T600-640q0-17 11.5-28.5T640-680h80q17 0 28.5 11.5T760-640v320q0 17-11.5 28.5T720-280Z","heading/heading-h2":"M160-280q-17 0-28.5-11.5T120-320v-320q0-17 11.5-28.5T160-680q17 0 28.5 11.5T200-640v120h160v-120q0-17 11.5-28.5T400-680q17 0 28.5 11.5T440-640v320q0 17-11.5 28.5T400-280q-17 0-28.5-11.5T360-320v-120H200v120q0 17-11.5 28.5T160-280Zm400 0q-17 0-28.5-11.5T520-320v-120q0-33 23.5-56.5T600-520h160v-80H560q-17 0-28.5-11.5T520-640q0-17 11.5-28.5T560-680h200q33 0 56.5 23.5T840-600v80q0 33-23.5 56.5T760-440H600v80h200q17 0 28.5 11.5T840-320q0 17-11.5 28.5T800-280H560Z","heading/heading-h3":"M160-280q-17 0-28.5-11.5T120-320v-320q0-17 11.5-28.5T160-680q17 0 28.5 11.5T200-640v120h160v-120q0-17 11.5-28.5T400-680q17 0 28.5 11.5T440-640v320q0 17-11.5 28.5T400-280q-17 0-28.5-11.5T360-320v-120H200v120q0 17-11.5 28.5T160-280Zm400 0q-17 0-28.5-11.5T520-320q0-17 11.5-28.5T560-360h200v-80H640q-17 0-28.5-11.5T600-480q0-17 11.5-28.5T640-520h120v-80H560q-17 0-28.5-11.5T520-640q0-17 11.5-28.5T560-680h200q33 0 56.5 23.5T840-600v240q0 33-23.5 56.5T760-280H560Z","heading/heading-h4":"M160-280q-17 0-28.5-11.5T120-320v-320q0-17 11.5-28.5T160-680q17 0 28.5 11.5T200-640v120h160v-120q0-17 11.5-28.5T400-680q17 0 28.5 11.5T440-640v320q0 17-11.5 28.5T400-280q-17 0-28.5-11.5T360-320v-120H200v120q0 17-11.5 28.5T160-280Zm600 0q-17 0-28.5-11.5T720-320v-80H560q-17 0-28.5-11.5T520-440v-200q0-17 11.5-28.5T560-680q17 0 28.5 11.5T600-640v160h120v-160q0-17 11.5-28.5T760-680q17 0 28.5 11.5T800-640v160h40q17 0 28.5 11.5T880-440q0 17-11.5 28.5T840-400h-40v80q0 17-11.5 28.5T760-280Z","heading/heading-h5":"M160-280q-17 0-28.5-11.5T120-320v-320q0-17 11.5-28.5T160-680q17 0 28.5 11.5T200-640v120h160v-120q0-17 11.5-28.5T400-680q17 0 28.5 11.5T440-640v320q0 17-11.5 28.5T400-280q-17 0-28.5-11.5T360-320v-120H200v120q0 17-11.5 28.5T160-280Zm400 0q-17 0-28.5-11.5T520-320q0-17 11.5-28.5T560-360h200v-80H560q-17 0-28.5-11.5T520-480v-160q0-17 11.5-28.5T560-680h240q17 0 28.5 11.5T840-640q0 17-11.5 28.5T800-600H600v80h160q33 0 56.5 23.5T840-440v80q0 33-23.5 56.5T760-280H560Z","heading/heading-h6":"M160-280q-17 0-28.5-11.5T120-320v-320q0-17 11.5-28.5T160-680q17 0 28.5 11.5T200-640v120h160v-120q0-17 11.5-28.5T400-680q17 0 28.5 11.5T440-640v320q0 17-11.5 28.5T400-280q-17 0-28.5-11.5T360-320v-120H200v120q0 17-11.5 28.5T160-280Zm440 0q-33 0-56.5-23.5T520-360v-240q0-33 23.5-56.5T600-680h200q17 0 28.5 11.5T840-640q0 17-11.5 28.5T800-600H600v80h160q33 0 56.5 23.5T840-440v80q0 33-23.5 56.5T760-280H600Zm0-160v80h160v-80H600Z","heading/paragraph":"M400-160q-17 0-28.5-11.5T360-200v-200q-83 0-141.5-58.5T160-600q0-83 58.5-141.5T360-800h320q17 0 28.5 11.5T720-760q0 17-11.5 28.5T680-720h-40v520q0 17-11.5 28.5T600-160q-17 0-28.5-11.5T560-200v-520H440v520q0 17-11.5 28.5T400-160Z","image/image":"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0 0v-560 560Zm80-80h400q12 0 18-11t-2-21L586-459q-6-8-16-8t-16 8L450-320l-74-99q-6-8-16-8t-16 8l-80 107q-8 10-2 21t18 11Zm60-280q25 0 42.5-17.5T400-620q0-25-17.5-42.5T340-680q-25 0-42.5 17.5T280-620q0 25 17.5 42.5T340-560Z","image/add-image":"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h320q17 0 28.5 11.5T560-800q0 17-11.5 28.5T520-760H200v560h560v-320q0-17 11.5-28.5T800-560q17 0 28.5 11.5T840-520v320q0 33-23.5 56.5T760-120H200Zm480-560h-40q-17 0-28.5-11.5T600-720q0-17 11.5-28.5T640-760h40v-40q0-17 11.5-28.5T720-840q17 0 28.5 11.5T760-800v40h40q17 0 28.5 11.5T840-720q0 17-11.5 28.5T800-680h-40v40q0 17-11.5 28.5T720-600q-17 0-28.5-11.5T680-640v-40ZM450-320l-74-99q-6-8-16-8t-16 8l-80 107q-8 10-2 21t18 11h400q12 0 18-11t-2-21L586-459q-6-8-16-8t-16 8L450-320Zm30-160Z","image/image-block":"M200-280q-33 0-56.5-23.5T120-360v-240q0-33 23.5-56.5T200-680h560q33 0 56.5 23.5T840-600v240q0 33-23.5 56.5T760-280H200Zm0-80h560v-240H200v240Zm-41-400q-17 0-28-11.5T120-800q0-17 11.5-28.5T160-840h641q17 0 28 11.5t11 28.5q0 17-11.5 28.5T800-760H159Zm0 640q-17 0-28-11.5T120-160q0-17 11.5-28.5T160-200h641q17 0 28 11.5t11 28.5q0 17-11.5 28.5T800-120H159Zm41-480v240-240Z","image/image-inline":"M120-160q-33 0-56.5-23.5T40-240v-480q0-33 23.5-56.5T120-800h80q33 0 56.5 23.5T280-720v480q0 33-23.5 56.5T200-160h-80Zm0-79h80v-482h-80v482Zm320 79q-33 0-56.5-23.5T360-240v-480q0-33 23.5-56.5T440-800h400q33 0 56.5 23.5T920-720v480q0 33-23.5 56.5T840-160H440Zm0-79h400v-482H440v482Zm-240 0v-482 482Zm240 0v-482 482Z","image/image-left":"M160-280q-17 0-28.5-11.5T120-320v-320q0-17 11.5-28.5T160-680h320q17 0 28.5 11.5T520-640v320q0 17-11.5 28.5T480-280H160Zm40-80h240v-240H200v240Zm-40-400q-17 0-28.5-11.5T120-800q0-17 11.5-28.5T160-840h640q17 0 28.5 11.5T840-800q0 17-11.5 28.5T800-760H160Zm480 160q-17 0-28.5-11.5T600-640q0-17 11.5-28.5T640-680h160q17 0 28.5 11.5T840-640q0 17-11.5 28.5T800-600H640Zm0 160q-17 0-28.5-11.5T600-480q0-17 11.5-28.5T640-520h160q17 0 28.5 11.5T840-480q0 17-11.5 28.5T800-440H640Zm0 160q-17 0-28.5-11.5T600-320q0-17 11.5-28.5T640-360h160q17 0 28.5 11.5T840-320q0 17-11.5 28.5T800-280H640ZM160-120q-17 0-28.5-11.5T120-160q0-17 11.5-28.5T160-200h640q17 0 28.5 11.5T840-160q0 17-11.5 28.5T800-120H160Z","image/image-right":"M480-280q-17 0-28.5-11.5T440-320v-320q0-17 11.5-28.5T480-680h320q17 0 28.5 11.5T840-640v320q0 17-11.5 28.5T800-280H480Zm40-80h240v-240H520v240ZM160-120q-17 0-28.5-11.5T120-160q0-17 11.5-28.5T160-200h640q17 0 28.5 11.5T840-160q0 17-11.5 28.5T800-120H160Zm0-160q-17 0-28.5-11.5T120-320q0-17 11.5-28.5T160-360h160q17 0 28.5 11.5T360-320q0 17-11.5 28.5T320-280H160Zm0-160q-17 0-28.5-11.5T120-480q0-17 11.5-28.5T160-520h160q17 0 28.5 11.5T360-480q0 17-11.5 28.5T320-440H160Zm0-160q-17 0-28.5-11.5T120-640q0-17 11.5-28.5T160-680h160q17 0 28.5 11.5T360-640q0 17-11.5 28.5T320-600H160Zm0-160q-17 0-28.5-11.5T120-800q0-17 11.5-28.5T160-840h640q17 0 28.5 11.5T840-800q0 17-11.5 28.5T800-760H160Z","block-quote":"m262-300 58-100q-66 0-113-47t-47-113q0-66 47-113t113-47q66 0 113 47t47 113q0 23-5.5 42.5T458-480L331-260q-5 9-14 14.5t-20 5.5q-23 0-34.5-20t-.5-40Zm360 0 58-100q-66 0-113-47t-47-113q0-66 47-113t113-47q66 0 113 47t47 113q0 23-5.5 42.5T818-480L691-260q-5 9-14 14.5t-20 5.5q-23 0-34.5-20t-.5-40ZM320-500q25 0 42.5-17.5T380-560q0-25-17.5-42.5T320-620q-25 0-42.5 17.5T260-560q0 25 17.5 42.5T320-500Zm360 0q25 0 42.5-17.5T740-560q0-25-17.5-42.5T680-620q-25 0-42.5 17.5T620-560q0 25 17.5 42.5T680-500Zm0-60Zm-360 0Z",bold:"M352-200q-33 0-56.5-23.5T272-280v-400q0-33 23.5-56.5T352-760h141q65 0 120 40t55 111q0 51-23 78.5T602-491q25 11 55.5 41t30.5 90q0 89-65 124.5T501-200H352Zm41-112h104q48 0 58.5-24.5T566-372q0-11-10.5-35.5T494-432H393v120Zm0-228h93q33 0 48-17t15-38q0-24-17-39t-44-15h-95v109Z","bullet-list":"M400-200q-17 0-28.5-11.5T360-240q0-17 11.5-28.5T400-280h400q17 0 28.5 11.5T840-240q0 17-11.5 28.5T800-200H400Zm0-240q-17 0-28.5-11.5T360-480q0-17 11.5-28.5T400-520h400q17 0 28.5 11.5T840-480q0 17-11.5 28.5T800-440H400Zm0-240q-17 0-28.5-11.5T360-720q0-17 11.5-28.5T400-760h400q17 0 28.5 11.5T840-720q0 17-11.5 28.5T800-680H400ZM200-160q-33 0-56.5-23.5T120-240q0-33 23.5-56.5T200-320q33 0 56.5 23.5T280-240q0 33-23.5 56.5T200-160Zm0-240q-33 0-56.5-23.5T120-480q0-33 23.5-56.5T200-560q33 0 56.5 23.5T280-480q0 33-23.5 56.5T200-400Zm0-240q-33 0-56.5-23.5T120-720q0-33 23.5-56.5T200-800q33 0 56.5 23.5T280-720q0 33-23.5 56.5T200-640Z",code:"m193-479 155 155q11 11 11 28t-11 28q-11 11-28 11t-28-11L108-452q-6-6-8.5-13T97-480q0-8 2.5-15t8.5-13l184-184q12-12 28.5-12t28.5 12q12 12 12 28.5T349-635L193-479Zm574-2L612-636q-11-11-11-28t11-28q11-11 28-11t28 11l184 184q6 6 8.5 13t2.5 15q0 8-2.5 15t-8.5 13L668-268q-12 12-28 11.5T612-269q-12-12-12-28.5t12-28.5l155-155Z","code-block":"M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm0-80h640v-400H160v400Zm187-200-76-76q-12-12-11.5-28t12.5-28q12-11 28-11.5t28 11.5l104 104q12 12 12 28t-12 28L328-308q-11 11-27.5 11.5T272-308q-11-11-11-28t11-28l75-76Zm173 160q-17 0-28.5-11.5T480-320q0-17 11.5-28.5T520-360h160q17 0 28.5 11.5T720-320q0 17-11.5 28.5T680-280H520Z",delete:"M280-120q-33 0-56.5-23.5T200-200v-520q-17 0-28.5-11.5T160-760q0-17 11.5-28.5T200-800h160q0-17 11.5-28.5T400-840h160q17 0 28.5 11.5T600-800h160q17 0 28.5 11.5T800-760q0 17-11.5 28.5T760-720v520q0 33-23.5 56.5T680-120H280Zm400-600H280v520h400v-520ZM400-280q17 0 28.5-11.5T440-320v-280q0-17-11.5-28.5T400-640q-17 0-28.5 11.5T360-600v280q0 17 11.5 28.5T400-280Zm160 0q17 0 28.5-11.5T600-320v-280q0-17-11.5-28.5T560-640q-17 0-28.5 11.5T520-600v280q0 17 11.5 28.5T560-280ZM280-720v520-520Z",edit:"M200-200h57l391-391-57-57-391 391v57Zm-40 80q-17 0-28.5-11.5T120-160v-97q0-16 6-30.5t17-25.5l505-504q12-11 26.5-17t30.5-6q16 0 31 6t26 18l55 56q12 11 17.5 26t5.5 30q0 16-5.5 30.5T817-647L313-143q-11 11-25.5 17t-30.5 6h-97Zm600-584-56-56 56 56Zm-141 85-28-29 57 57-29-28Z","horizontal-rule":"M200-440q-17 0-28.5-11.5T160-480q0-17 11.5-28.5T200-520h560q17 0 28.5 11.5T800-480q0 17-11.5 28.5T760-440H200Z",italic:"M250-200q-21 0-35.5-14.5T200-250q0-21 14.5-35.5T250-300h110l120-360H370q-21 0-35.5-14.5T320-710q0-21 14.5-35.5T370-760h300q21 0 35.5 14.5T720-710q0 21-14.5 35.5T670-660h-90L460-300h90q21 0 35.5 14.5T600-250q0 21-14.5 35.5T550-200H250Z",strikethrough:"M486-160q-76 0-135-45t-85-123l88-38q14 48 48.5 79t85.5 31q42 0 76-20t34-64q0-18-7-33t-19-27h112q5 14 7.5 28.5T694-340q0 86-61.5 133T486-160ZM120-480q-17 0-28.5-11.5T80-520q0-17 11.5-28.5T120-560h720q17 0 28.5 11.5T880-520q0 17-11.5 28.5T840-480H120Zm362-326q66 0 115.5 32.5T674-674l-88 39q-9-29-33.5-52T484-710q-41 0-68 18.5T386-640h-96q2-69 54.5-117.5T482-806Z",subscript:"M800-160q-17 0-28.5-11.5T760-200v-40q0-17 11.5-28.5T800-280h80v-40H780q-8 0-14-6t-6-14q0-8 6-14t14-6h100q17 0 28.5 11.5T920-320v40q0 17-11.5 28.5T880-240h-80v40h100q8 0 14 6t6 14q0 8-6 14t-14 6H800Zm-483-80q-27 0-39.5-23t1.5-46l141-222-128-201q-14-22-1.5-45t38.5-23q12 0 22 5.5t16 15.5l111 179h4l110-179q6-10 16.5-15.5T630-800q27 0 39 23t-2 46L539-531l142 222q14 23 1 46t-39 23q-12 0-22-5.5T605-261L482-457h-4L355-261q-6 10-16.5 15.5T317-240Z",superscript:"M800-600q-17 0-28.5-11.5T760-640v-40q0-17 11.5-28.5T800-720h80v-40H780q-8 0-14-6t-6-14q0-8 6-14t14-6h100q17 0 28.5 11.5T920-760v40q0 17-11.5 28.5T880-680h-80v40h100q8 0 14 6t6 14q0 8-6 14t-14 6H800ZM317-160q-27 0-39.5-23t1.5-46l141-222-128-201q-14-22-1.5-45t38.5-23q12 0 22 5.5t16 15.5l111 179h4l110-179q6-10 16.5-15.5T630-720q27 0 39 23t-2 46L539-451l142 222q14 23 1 46t-39 23q-12 0-22-5.5T605-181L482-377h-4L355-181q-6 10-16.5 15.5T317-160Z",underline:"M240-120q-17 0-28.5-11.5T200-160q0-17 11.5-28.5T240-200h480q17 0 28.5 11.5T760-160q0 17-11.5 28.5T720-120H240Zm240-160q-101 0-157-63t-56-167v-279q0-21 15.5-36t36.5-15q21 0 36 15t15 36v285q0 56 28 91t82 35q54 0 82-35t28-91v-285q0-21 15.5-36t36.5-15q21 0 36 15t15 36v279q0 104-56 167t-157 63Z","list-ol":"M150-80q-13 0-21.5-8.5T120-110q0-13 8.5-21.5T150-140h70v-30h-30q-13 0-21.5-8.5T160-200q0-13 8.5-21.5T190-230h30v-30h-70q-13 0-21.5-8.5T120-290q0-13 8.5-21.5T150-320h90q17 0 28.5 11.5T280-280v40q0 17-11.5 28.5T240-200q17 0 28.5 11.5T280-160v40q0 17-11.5 28.5T240-80h-90Zm0-280q-13 0-21.5-8.5T120-390v-80q0-17 11.5-28.5T160-510h60v-30h-70q-13 0-21.5-8.5T120-570q0-13 8.5-21.5T150-600h90q17 0 28.5 11.5T280-560v70q0 17-11.5 28.5T240-450h-60v30h70q13 0 21.5 8.5T280-390q0 13-8.5 21.5T250-360H150Zm60-280q-13 0-21.5-8.5T180-670v-150h-30q-13 0-21.5-8.5T120-850q0-13 8.5-21.5T150-880h60q13 0 21.5 8.5T240-850v180q0 13-8.5 21.5T210-640Zm190 440q-17 0-28.5-11.5T360-240q0-17 11.5-28.5T400-280h400q17 0 28.5 11.5T840-240q0 17-11.5 28.5T800-200H400Zm0-240q-17 0-28.5-11.5T360-480q0-17 11.5-28.5T400-520h400q17 0 28.5 11.5T840-480q0 17-11.5 28.5T800-440H400Zm0-240q-17 0-28.5-11.5T360-720q0-17 11.5-28.5T400-760h400q17 0 28.5 11.5T840-720q0 17-11.5 28.5T800-680H400Z","align-left":"M160-120q-17 0-28.5-11.5T120-160q0-17 11.5-28.5T160-200h640q17 0 28.5 11.5T840-160q0 17-11.5 28.5T800-120H160Zm0-160q-17 0-28.5-11.5T120-320q0-17 11.5-28.5T160-360h400q17 0 28.5 11.5T600-320q0 17-11.5 28.5T560-280H160Zm0-160q-17 0-28.5-11.5T120-480q0-17 11.5-28.5T160-520h640q17 0 28.5 11.5T840-480q0 17-11.5 28.5T800-440H160Zm0-160q-17 0-28.5-11.5T120-640q0-17 11.5-28.5T160-680h400q17 0 28.5 11.5T600-640q0 17-11.5 28.5T560-600H160Zm0-160q-17 0-28.5-11.5T120-800q0-17 11.5-28.5T160-840h640q17 0 28.5 11.5T840-800q0 17-11.5 28.5T800-760H160Z","align-center":"M160-120q-17 0-28.5-11.5T120-160q0-17 11.5-28.5T160-200h640q17 0 28.5 11.5T840-160q0 17-11.5 28.5T800-120H160Zm160-160q-17 0-28.5-11.5T280-320q0-17 11.5-28.5T320-360h320q17 0 28.5 11.5T680-320q0 17-11.5 28.5T640-280H320ZM160-440q-17 0-28.5-11.5T120-480q0-17 11.5-28.5T160-520h640q17 0 28.5 11.5T840-480q0 17-11.5 28.5T800-440H160Zm160-160q-17 0-28.5-11.5T280-640q0-17 11.5-28.5T320-680h320q17 0 28.5 11.5T680-640q0 17-11.5 28.5T640-600H320ZM160-760q-17 0-28.5-11.5T120-800q0-17 11.5-28.5T160-840h640q17 0 28.5 11.5T840-800q0 17-11.5 28.5T800-760H160Z","align-right":"M160-760q-17 0-28.5-11.5T120-800q0-17 11.5-28.5T160-840h640q17 0 28.5 11.5T840-800q0 17-11.5 28.5T800-760H160Zm240 160q-17 0-28.5-11.5T360-640q0-17 11.5-28.5T400-680h400q17 0 28.5 11.5T840-640q0 17-11.5 28.5T800-600H400ZM160-440q-17 0-28.5-11.5T120-480q0-17 11.5-28.5T160-520h640q17 0 28.5 11.5T840-480q0 17-11.5 28.5T800-440H160Zm240 160q-17 0-28.5-11.5T360-320q0-17 11.5-28.5T400-360h400q17 0 28.5 11.5T840-320q0 17-11.5 28.5T800-280H400ZM160-120q-17 0-28.5-11.5T120-160q0-17 11.5-28.5T160-200h640q17 0 28.5 11.5T840-160q0 17-11.5 28.5T800-120H160Z","align-justify":"M160-120q-17 0-28.5-11.5T120-160q0-17 11.5-28.5T160-200h640q17 0 28.5 11.5T840-160q0 17-11.5 28.5T800-120H160Zm0-160q-17 0-28.5-11.5T120-320q0-17 11.5-28.5T160-360h640q17 0 28.5 11.5T840-320q0 17-11.5 28.5T800-280H160Zm0-160q-17 0-28.5-11.5T120-480q0-17 11.5-28.5T160-520h640q17 0 28.5 11.5T840-480q0 17-11.5 28.5T800-440H160Zm0-160q-17 0-28.5-11.5T120-640q0-17 11.5-28.5T160-680h640q17 0 28.5 11.5T840-640q0 17-11.5 28.5T800-600H160Zm0-160q-17 0-28.5-11.5T120-800q0-17 11.5-28.5T160-840h640q17 0 28.5 11.5T840-800q0 17-11.5 28.5T800-760H160Z",undo:"M320-200q-17 0-28.5-11.5T280-240q0-17 11.5-28.5T320-280h244q63 0 109.5-40T720-420q0-60-46.5-100T564-560H312l76 76q11 11 11 28t-11 28q-11 11-28 11t-28-11L188-572q-6-6-8.5-13t-2.5-15q0-8 2.5-15t8.5-13l144-144q11-11 28-11t28 11q11 11 11 28t-11 28l-76 76h252q97 0 166.5 63T800-420q0 94-69.5 157T564-200H320Z",redo:"M648-560H396q-63 0-109.5 40T240-420q0 60 46.5 100T396-280h244q17 0 28.5 11.5T680-240q0 17-11.5 28.5T640-200H396q-97 0-166.5-63T160-420q0-94 69.5-157T396-640h252l-76-76q-11-11-11-28t11-28q11-11 28-11t28 11l144 144q6 6 8.5 13t2.5 15q0 8-2.5 15t-8.5 13L628-428q-11 11-28 11t-28-11q-11-11-11-28t11-28l76-76Z","hard-break":"M200-460q-17 0-28.5-11.5T160-500q0-17 11.5-28.5T200-540h490q63 0 106.5 43.5T840-390q0 63-43.5 106.5T690-240h-96l22 22q12 12 11.5 28T616-162q-12 12-28.5 12.5T559-161l-91-91q-6-6-8.5-13t-2.5-15q0-8 2.5-15t8.5-13l91-91q12-12 28.5-12t28.5 12q11 12 11.5 28.5T616-342l-22 22h96q29 0 49.5-20.5T760-390q0-29-20.5-49.5T690-460H200Zm0 220q-17 0-28.5-11.5T160-280q0-17 11.5-28.5T200-320h120q17 0 28.5 11.5T360-280q0 17-11.5 28.5T320-240H200Zm0-440q-17 0-28.5-11.5T160-720q0-17 11.5-28.5T200-760h560q17 0 28.5 11.5T800-720q0 17-11.5 28.5T760-680H200Z","font-size":"M560-680H420q-25 0-42.5-17.5T360-740q0-25 17.5-42.5T420-800h400q25 0 42.5 17.5T880-740q0 25-17.5 42.5T820-680H680v460q0 25-17.5 42.5T620-160q-25 0-42.5-17.5T560-220v-460ZM200-480h-60q-25 0-42.5-17.5T80-540q0-25 17.5-42.5T140-600h240q25 0 42.5 17.5T440-540q0 25-17.5 42.5T380-480h-60v260q0 25-17.5 42.5T260-160q-25 0-42.5-17.5T200-220v-260Z","font-family":"m264-382-29 81q-3 10-11 15.5t-18 5.5q-17 0-27-14t-4-30l126-334q4-10 12-16t19-6h26q11 0 19 6t12 16l126 335q6 16-3.5 29.5T485-280q-11 0-19-6t-12-16l-28-80H264Zm21-58h120l-58-166h-4l-58 166Zm369 171q-49 0-77-25.5T549-364q0-42 32.5-68.5T665-459q23 0 42.5 3.5T741-444v-14q0-27-18.5-43T672-517q-15 0-28.5 4.5T619-500q-9 7-20 8t-20-6q-9-7-10.5-17.5T575-534q19-17 43-26t55-9q62 0 95 29.5t33 85.5v152q0 12-8.5 20.5T772-273q-12 0-21-9t-9-21v-9h-3q-13 20-35 31.5T654-269Zm10-50q32 0 54.5-22.5T741-396q-14-8-32-12t-33-4q-32 0-49 12.5T610-364q0 20 15 32.5t39 12.5Z",color:"M440-80q-33 0-56.5-23.5T360-160v-160H240q-33 0-56.5-23.5T160-400v-280q0-66 47-113t113-47h440q17 0 28.5 11.5T800-800v400q0 33-23.5 56.5T720-320H600v160q0 33-23.5 56.5T520-80h-80ZM240-560h480v-200h-40v120q0 17-11.5 28.5T640-600q-17 0-28.5-11.5T600-640v-120h-40v40q0 17-11.5 28.5T520-680q-17 0-28.5-11.5T480-720v-40H320q-33 0-56.5 23.5T240-680v120Zm0 160h480v-80H240v80Zm0 0v-80 80Z","background-color":"M480-80q-82 0-155-31.5t-127.5-86Q143-252 111.5-325T80-480q0-83 32.5-156t88-127Q256-817 330-848.5T488-880q80 0 151 27.5t124.5 76q53.5 48.5 85 115T880-518q0 115-70 176.5T640-280h-74q-9 0-12.5 5t-3.5 11q0 12 15 34.5t15 51.5q0 50-27.5 74T480-80Zm0-400Zm-220 40q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17Zm120-160q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17Zm200 0q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17Zm120 160q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17ZM480-160q9 0 14.5-5t5.5-13q0-14-15-33t-15-57q0-42 29-67t71-25h70q66 0 113-38.5T800-518q0-121-92.5-201.5T488-800q-136 0-232 93t-96 227q0 133 93.5 226.5T480-160Z",link:"M280-280q-83 0-141.5-58.5T80-480q0-83 58.5-141.5T280-680h120q17 0 28.5 11.5T440-640q0 17-11.5 28.5T400-600H280q-50 0-85 35t-35 85q0 50 35 85t85 35h120q17 0 28.5 11.5T440-320q0 17-11.5 28.5T400-280H280Zm80-160q-17 0-28.5-11.5T320-480q0-17 11.5-28.5T360-520h240q17 0 28.5 11.5T640-480q0 17-11.5 28.5T600-440H360Zm200 160q-17 0-28.5-11.5T520-320q0-17 11.5-28.5T560-360h120q50 0 85-35t35-85q0-50-35-85t-85-35H560q-17 0-28.5-11.5T520-640q0-17 11.5-28.5T560-680h120q83 0 141.5 58.5T880-480q0 83-58.5 141.5T680-280H560Z",emoji:"M620-520q25 0 42.5-17.5T680-580q0-25-17.5-42.5T620-640q-25 0-42.5 17.5T560-580q0 25 17.5 42.5T620-520Zm-280 0q25 0 42.5-17.5T400-580q0-25-17.5-42.5T340-640q-25 0-42.5 17.5T280-580q0 25 17.5 42.5T340-520ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 320q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-100q58 0 107-28t79-76q6-12-1-24t-21-12H316q-14 0-21 12t-1 24q30 48 79.5 76T480-260Z",table:"M120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200q-33 0-56.5-23.5T120-200Zm80-400h560v-160H200v160Zm213 200h134v-120H413v120Zm0 200h134v-120H413v120ZM200-400h133v-120H200v120Zm427 0h133v-120H627v120ZM200-200h133v-120H200v120Zm427 0h133v-120H627v120Z","task-list":"M222-200 80-342l56-56 85 85 170-170 56 57-225 226Zm0-320L80-662l56-56 85 85 170-170 56 57-225 226Zm298 240v-80h360v80H520Zm0-320v-80h360v80H520Z","arrow-back":"m313-440 196 196q12 12 11.5 28T508-188q-12 11-28 11.5T452-188L188-452q-6-6-8.5-13t-2.5-15q0-8 2.5-15t8.5-13l264-264q11-11 27.5-11t28.5 11q12 12 12 28.5T508-715L313-520h447q17 0 28.5 11.5T800-480q0 17-11.5 28.5T760-440H313Z","open-link":"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h240q17 0 28.5 11.5T480-800q0 17-11.5 28.5T440-760H200v560h560v-240q0-17 11.5-28.5T800-480q17 0 28.5 11.5T840-440v240q0 33-23.5 56.5T760-120H200Zm560-584L416-360q-11 11-28 11t-28-11q-11-11-11-28t11-28l344-344H600q-17 0-28.5-11.5T560-800q0-17 11.5-28.5T600-840h240v240q0 17-11.5 28.5T800-560q-17 0-28.5-11.5T760-600v-104Z","link-off":"m770-302-60-62q40-11 65-42.5t25-73.5q0-50-35-85t-85-35H560q-17 0-28.5-11.5T520-640q0-17 11.5-28.5T560-680h120q83 0 141.5 58.5T880-480q0 57-29.5 105T770-302ZM625-449l-71-71h46q17 0 28.5 11.5T640-480q0 10-4 18t-11 13ZM820-84q-11 11-28 11t-28-11L84-764q-11-11-11-28t11-28q11-11 28-11t28 11l680 680q11 11 11 28t-11 28ZM280-280q-83 0-141.5-58.5T80-480q0-69 42-123t108-71l74 74h-24q-50 0-85 35t-35 85q0 50 35 85t85 35h120q17 0 28.5 11.5T440-320q0 17-11.5 28.5T400-280H280Zm80-160q-17 0-28.5-11.5T320-480q0-17 11.5-28.5T360-520h25l79 80H360Z",more:"M240-400q-33 0-56.5-23.5T160-480q0-33 23.5-56.5T240-560q33 0 56.5 23.5T320-480q0 33-23.5 56.5T240-400Zm240 0q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm240 0q-33 0-56.5-23.5T640-480q0-33 23.5-56.5T720-560q33 0 56.5 23.5T800-480q0 33-23.5 56.5T720-400Z",indent:"M160-120q-17 0-28.5-11.5T120-160q0-17 11.5-28.5T160-200h640q17 0 28.5 11.5T840-160q0 17-11.5 28.5T800-120H160Zm320-160q-17 0-28.5-11.5T440-320q0-17 11.5-28.5T480-360h320q17 0 28.5 11.5T840-320q0 17-11.5 28.5T800-280H480Zm0-160q-17 0-28.5-11.5T440-480q0-17 11.5-28.5T480-520h320q17 0 28.5 11.5T840-480q0 17-11.5 28.5T800-440H480Zm0-160q-17 0-28.5-11.5T440-640q0-17 11.5-28.5T480-680h320q17 0 28.5 11.5T840-640q0 17-11.5 28.5T800-600H480ZM160-760q-17 0-28.5-11.5T120-800q0-17 11.5-28.5T160-840h640q17 0 28.5 11.5T840-800q0 17-11.5 28.5T800-760H160Zm-6 406q-10 10-22 5t-12-19v-224q0-14 12-19t22 5l112 112q6 6 6 14t-6 14L154-354Z",outdent:"M160-120q-17 0-28.5-11.5T120-160q0-17 11.5-28.5T160-200h640q17 0 28.5 11.5T840-160q0 17-11.5 28.5T800-120H160Zm320-160q-17 0-28.5-11.5T440-320q0-17 11.5-28.5T480-360h320q17 0 28.5 11.5T840-320q0 17-11.5 28.5T800-280H480Zm0-160q-17 0-28.5-11.5T440-480q0-17 11.5-28.5T480-520h320q17 0 28.5 11.5T840-480q0 17-11.5 28.5T800-440H480Zm0-160q-17 0-28.5-11.5T440-640q0-17 11.5-28.5T480-680h320q17 0 28.5 11.5T840-640q0 17-11.5 28.5T800-600H480ZM160-760q-17 0-28.5-11.5T120-800q0-17 11.5-28.5T160-840h640q17 0 28.5 11.5T840-800q0 17-11.5 28.5T800-760H160Zm86 406L134-466q-6-6-6-14t6-14l112-112q10-10 22-5t12 19v224q0 14-12 19t-22-5Z"};export{q as icons};
@@ -0,0 +1,7 @@
1
+ export * from './autolink';
2
+ export * from './clickHandler';
3
+ export * from './emojis';
4
+ export * from './icons';
5
+ export * from './lowlight';
6
+ export * from './pasteHandler';
7
+ export * from './suggestion';
@@ -0,0 +1 @@
1
+ import{autolink as e}from"./autolink.js";import{clickHandler as m}from"./clickHandler.js";import{emojis as f}from"./emojis.js";import{icons as x}from"./icons.js";import{LowlightPlugin as n}from"./lowlight.js";import{pasteHandler as a}from"./pasteHandler.js";import{suggestion as c}from"./suggestion.js";export{n as LowlightPlugin,e as autolink,m as clickHandler,f as emojis,x as icons,a as pasteHandler,c as suggestion};
@@ -0,0 +1,6 @@
1
+ import { Plugin } from '@tiptap/pm/state';
2
+ export declare function LowlightPlugin({ name, lowlight, defaultLanguage, }: {
3
+ name: string;
4
+ lowlight: any;
5
+ defaultLanguage: string | null | undefined;
6
+ }): Plugin<any>;
@@ -0,0 +1 @@
1
+ import{findChildren as d}from"@tiptap/core";import{Plugin as N,PluginKey as v}from"@tiptap/pm/state";import{Decoration as x,DecorationSet as w}from"@tiptap/pm/view";import C from"highlight.js/lib/core";function y(e,i=[]){return e.map(o=>{const s=[...i,...o.properties?o.properties.className:[]];return o.children?y(o.children,s):{text:o.value,classes:s}}).flat()}function f(e){return e.value||e.children||[]}function P(e){return!!C.getLanguage(e)}function m({doc:e,name:i,lowlight:o,defaultLanguage:s}){const t=[];return d(e,n=>n.type.name===i).forEach(n=>{let g=n.pos+1;const c=n.node.attrs.language||s,a=o.listLanguages(),h=c&&(a.includes(c)||P(c))?f(o.highlight(c,n.node.textContent)):f(o.highlightAuto(n.node.textContent));y(h).forEach(l=>{const u=g+l.text.length;if(l.classes.length){const r=x.inline(g,u,{class:l.classes.join(" ")});t.push(r)}g=u})}),w.create(e,t)}function D(e){return typeof e=="function"}function j({name:e,lowlight:i,defaultLanguage:o}){if(!["highlight","highlightAuto","listLanguages"].every(t=>D(i[t])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");const s=new N({key:new v("lowlight"),state:{init:(t,{doc:n})=>m({doc:n,name:e,lowlight:i,defaultLanguage:o}),apply:(t,n,g,c)=>{const a=g.selection.$head.parent.type.name,h=c.selection.$head.parent.type.name,l=d(g.doc,r=>r.type.name===e),u=d(c.doc,r=>r.type.name===e);return t.docChanged&&([a,h].includes(e)||u.length!==l.length||t.steps.some(r=>r.from!==void 0&&r.to!==void 0&&l.some(p=>p.pos>=r.from&&p.pos+p.node.nodeSize<=r.to)))?m({doc:t.doc,name:e,lowlight:i,defaultLanguage:o}):n.map(t.mapping,t.doc)}},props:{decorations(t){return s.getState(t)}}});return s}export{j as LowlightPlugin};
@@ -0,0 +1,9 @@
1
+ import { Editor } from '@tiptap/core';
2
+ import { MarkType } from '@tiptap/pm/model';
3
+ import { Plugin } from '@tiptap/pm/state';
4
+ type PasteHandlerOptions = {
5
+ editor: Editor;
6
+ type: MarkType;
7
+ };
8
+ export declare function pasteHandler(options: PasteHandlerOptions): Plugin;
9
+ export {};
@@ -0,0 +1 @@
1
+ import{Plugin as k,PluginKey as x}from"@tiptap/pm/state";import{find as g}from"linkifyjs";function P(e){return new k({key:new x("handlePasteLink"),props:{handlePaste:(a,f,l)=>{var s;const{state:d}=a,{selection:u}=d,{empty:m}=u;if(m)return!1;let t="";l.content.forEach(n=>{t+=n.textContent});const i=g(t).find(n=>n.isLink&&n.value===t);if(!t||!i)return!1;const r=(s=f.clipboardData)==null?void 0:s.getData("text/html"),h=/href="([^"]*)"/,o=r==null?void 0:r.match(h),c=o?o[1]:i.href;return e.editor.isActive("code")||e.editor.isActive("codeBlock")?e.editor.commands.insertContent(c):e.editor.commands.setMark(e.type,{href:c}),!0}}})}export{P as pasteHandler};
@@ -0,0 +1,2 @@
1
+ import type { SuggestionOptions } from '@tiptap/suggestion';
2
+ export declare const suggestion: Omit<SuggestionOptions, 'editor'>;
@@ -0,0 +1 @@
1
+ import{VueRenderer as i}from"@tiptap/vue-3";import o from"tippy.js";import{MentionView as c}from"../components";const l={render:()=>{let t,n;return{onStart:e=>{t=new i(c,{props:e,editor:e.editor}),e.clientRect&&(n=o(".daisy-tiptap-editor__content",{getReferenceClientRect:e.clientRect,content:t.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"}))},onUpdate(e){t.updateProps(e),e.clientRect&&n[0].setProps({getReferenceClientRect:e.clientRect})},onKeyDown(e){var r;return e.event.key==="Escape"?(n[0].hide(),!0):(r=t.ref)==null?void 0:r.onKeyDown(e)},onExit(){n[0].destroy(),t.destroy()}}}};export{l as suggestion};
@@ -0,0 +1,2 @@
1
+ export declare const COLOR_SET: string[];
2
+ export declare function isHexColor(color: string): boolean;
@@ -0,0 +1 @@
1
+ function e(){return/#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})\b/gi}const c=["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722","#000000"];function b(f){return e().test(f)}export{c as COLOR_SET,b as isHexColor};
@@ -0,0 +1,24 @@
1
+ import { ImageDisplay } from './';
2
+ export declare const ELEMENT_TIPTAP_TIP = "[Element-Tiptap Tip]";
3
+ export declare const enum Alignment {
4
+ left = "left",
5
+ center = "center",
6
+ right = "right",
7
+ justify = "justify"
8
+ }
9
+ export declare const ALIGN_PATTERN: RegExp;
10
+ export declare const DEFAULT_IMAGE_URL_REGEX: RegExp;
11
+ export declare const DEFAULT_IMAGE_WIDTH = 200;
12
+ export declare const DEFAULT_IMAGE_DISPLAY = ImageDisplay.INLINE;
13
+ export declare const LINE_HEIGHT_100 = 1.7;
14
+ export declare const DEFAULT_LINE_HEIGHT = "100%";
15
+ export declare const enum EVENTS {
16
+ INIT = "init",
17
+ TRANSACTION = "transaction",
18
+ FOCUS = "focus",
19
+ BLUR = "blur",
20
+ PASTE = "paste",
21
+ DROP = "drop",
22
+ UPDATE = "update"
23
+ }
24
+ export declare const PREVIEW_WINDOW_WIDTH: string;
@@ -0,0 +1 @@
1
+ import{ImageDisplay as I}from".";const a="[Element-Tiptap Tip]";var w=(t=>(t.left="left",t.center="center",t.right="right",t.justify="justify",t))(w||{});const e=new RegExp("(left|center|right|justify)"),_=/(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/,T=200;var s;const o=(s=I)==null?void 0:s.INLINE,c=1.7,n="100%";var A=(t=>(t.INIT="init",t.TRANSACTION="transaction",t.FOCUS="focus",t.BLUR="blur",t.PASTE="paste",t.DROP="drop",t.UPDATE="update",t))(A||{});const p="80vw";export{e as ALIGN_PATTERN,w as Alignment,o as DEFAULT_IMAGE_DISPLAY,_ as DEFAULT_IMAGE_URL_REGEX,T as DEFAULT_IMAGE_WIDTH,n as DEFAULT_LINE_HEIGHT,a as ELEMENT_TIPTAP_TIP,A as EVENTS,c as LINE_HEIGHT_100,p as PREVIEW_WINDOW_WIDTH};
@@ -0,0 +1,2 @@
1
+ import { Fragment, Node as ProsemirrorNode, NodeType } from '@tiptap/pm/model';
2
+ export declare function createCell(cellType: NodeType, cellContent?: Fragment | ProsemirrorNode | Array<ProsemirrorNode>): ProsemirrorNode | null | undefined;
@@ -0,0 +1 @@
1
+ function t(e,r){return r?e.createChecked(null,r):e.createAndFill()}export{t as createCell};
@@ -0,0 +1,2 @@
1
+ import { Fragment, Node as ProsemirrorNode, Schema } from '@tiptap/pm/model';
2
+ export declare function createTable(schema: Schema, rowsCount: number, colsCount: number, withHeaderRow: boolean, cellContent?: Fragment | ProsemirrorNode | Array<ProsemirrorNode>): ProsemirrorNode;
@@ -0,0 +1 @@
1
+ import{getTableNodeTypes as u,createCell as d}from".";function C(f,h,p,c,t){const l=u(f),r=[],s=[];for(let e=0;e<p;e+=1){const n=d(l.cell,t);if(n&&s.push(n),c){const a=d(l.header_cell,t);a&&r.push(a)}}const o=[];for(let e=0;e<h;e+=1)o.push(l.row.createChecked(null,c&&e===0?r:s));return l.table.createChecked(null,o)}export{C as createTable};
@@ -0,0 +1,2 @@
1
+ import { KeyboardShortcutCommand } from '@tiptap/core';
2
+ export declare const deleteTableWhenAllCellsSelected: KeyboardShortcutCommand;
@@ -0,0 +1 @@
1
+ import{findParentNodeClosestToPos as a}from"@tiptap/core";import{isCellSelection as r}from".";const f=({editor:n})=>{const{selection:l}=n.state;if(!r(l))return!1;let s=0;const t=a(l.ranges[0].$from,e=>e.type.name==="table");return t==null||t.node.descendants(e=>{if(e.type.name==="table")return!1;["tableCell","tableHeader"].includes(e.type.name)&&(s+=1)}),s===l.ranges.length?(n.commands.deleteTable(),!0):!1};export{f as deleteTableWhenAllCellsSelected};
@@ -0,0 +1,3 @@
1
+ export declare const DEFAULT_FONT_FAMILY_MAP: {
2
+ [key: string]: string;
3
+ };
@@ -0,0 +1 @@
1
+ const e=["Arial","Arial Black","Georgia","Impact","Tahoma","Times New Roman","Verdana","Courier New","Lucida Console","Monaco","monospace"],r=e.reduce((a,o)=>(a[o]=o,a),{});export{r as DEFAULT_FONT_FAMILY_MAP};
@@ -0,0 +1,2 @@
1
+ export declare const DEFAULT_FONT_SIZES: string[];
2
+ export declare function convertToPX(styleValue: string): string;
@@ -0,0 +1 @@
1
+ const r=["8","10","12","14","16","18","20","24","30","36","48","60","72"],o=/([\d.]+)px/i;function e(c){const t=c.match(o);if(!t)return"";const n=t[1];return n||""}export{r as DEFAULT_FONT_SIZES,e as convertToPX};
@@ -0,0 +1,4 @@
1
+ import { NodeType, Schema } from '@tiptap/pm/model';
2
+ export declare function getTableNodeTypes(schema: Schema): {
3
+ [key: string]: NodeType;
4
+ };
@@ -0,0 +1 @@
1
+ function c(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;const o={};return Object.keys(e.nodes).forEach(d=>{const t=e.nodes[d];t.spec.tableRole&&(o[t.spec.tableRole]=t)}),e.cached.tableNodeTypes=o,o}export{c as getTableNodeTypes};
@@ -0,0 +1,14 @@
1
+ type ImageResult = {
2
+ complete: boolean;
3
+ width: number;
4
+ height: number;
5
+ src: string;
6
+ };
7
+ export declare function resolveImg(src: string): Promise<ImageResult>;
8
+ export declare const enum ImageDisplay {
9
+ INLINE = "inline",
10
+ BREAK_TEXT = "block",
11
+ FLOAT_LEFT = "left",
12
+ FLOAT_RIGHT = "right"
13
+ }
14
+ export {};
@@ -0,0 +1 @@
1
+ const o={};function u(t){return new Promise((r,i)=>{const e={complete:!1,width:0,height:0,src:t};if(!t){i(e);return}if(o[t]){r({...o[t]});return}const n=new Image;n.onload=()=>{e.width=n.width,e.height=n.height,e.complete=!0,o[t]={...e},r(e)},n.onerror=()=>{i(e)},n.src=t})}var h=(t=>(t.INLINE="inline",t.BREAK_TEXT="block",t.FLOAT_LEFT="left",t.FLOAT_RIGHT="right",t))(h||{});export{h as ImageDisplay,u as resolveImg};
@@ -0,0 +1,12 @@
1
+ import type { Command, Editor } from '@tiptap/core';
2
+ export declare const enum IndentProps {
3
+ max = 7,
4
+ min = 0,
5
+ more = 1,
6
+ less = -1
7
+ }
8
+ export declare function createIndentCommand({ delta, types, }: {
9
+ delta: number;
10
+ types: string[];
11
+ }): Command;
12
+ export declare function checkIndent(editor: Editor): number;
@@ -0,0 +1 @@
1
+ import{isList as m}from"@tiptap/core";import{TextSelection as l,AllSelection as d}from"@tiptap/pm/state";import{clamp as x}from".";var k=(e=>(e[e.max=7]="max",e[e.min=0]="min",e[e.more=1]="more",e[e.less=-1]="less",e))(k||{});function y(e,i,o,n){const{doc:r,selection:c}=e;if(!r||!c||!(c instanceof l||c instanceof d))return e;const{from:t,to:s}=c;return r.nodesBetween(t,s,(a,u)=>{const f=a.type;return o.includes(f.name)?(e=A(e,u,i),!1):!m(a.type.name,n.extensionManager.extensions)}),e}function A(e,i,o){if(!e.doc)return e;const n=e.doc.nodeAt(i);if(!n)return e;const r=0,c=7,t=x((n.attrs.indent||0)+o,r,c);if(t===n.attrs.indent)return e;const s={...n.attrs,indent:t};return e.setNodeMarkup(i,n.type,s,n.marks)}function g({delta:e,types:i}){return({state:o,dispatch:n,editor:r})=>{const{selection:c}=o;let{tr:t}=o;return t=t.setSelection(c),t=y(t,e,i,r),t.docChanged?(n&&n(t),!0):!1}}function v(e){var r;const{selection:i}=e.state;let{tr:o}=e.state;o=o.setSelection(i);const{doc:n}=o;return(r=n.nodeAt(0))==null?void 0:r.attrs.indent}export{k as IndentProps,v as checkIndent,g as createIndentCommand};
@@ -0,0 +1,12 @@
1
+ export * from './color';
2
+ export * from './constants';
3
+ export * from './createCell';
4
+ export * from './createTable';
5
+ export * from './deleteTableWhenAllCellsSelected';
6
+ export * from './fontFamily';
7
+ export * from './fontSize';
8
+ export * from './getTableNodeTypes';
9
+ export * from './image';
10
+ export * from './indent';
11
+ export * from './isCellSelection';
12
+ export * from './shared';
@@ -0,0 +1 @@
1
+ import{COLOR_SET as r,isHexColor as t}from"./color.js";import{ALIGN_PATTERN as T,Alignment as l,DEFAULT_IMAGE_DISPLAY as I,DEFAULT_IMAGE_URL_REGEX as _,DEFAULT_IMAGE_WIDTH as a,DEFAULT_LINE_HEIGHT as m,ELEMENT_TIPTAP_TIP as p,EVENTS as A,LINE_HEIGHT_100 as n,PREVIEW_WINDOW_WIDTH as L}from"./constants.js";import{createCell as x}from"./createCell.js";import{createTable as D}from"./createTable.js";import{deleteTableWhenAllCellsSelected as i}from"./deleteTableWhenAllCellsSelected.js";import{DEFAULT_FONT_FAMILY_MAP as P}from"./fontFamily.js";import{DEFAULT_FONT_SIZES as s,convertToPX as U}from"./fontSize.js";import{getTableNodeTypes as H}from"./getTableNodeTypes.js";import{ImageDisplay as C,resolveImg as M}from"./image.js";import{IndentProps as W,checkIndent as R,createIndentCommand as b}from"./indent.js";import{isCellSelection as h}from"./isCellSelection.js";import{cached as y,capitalize as V,clamp as X,isNaN as Y,isPlainObject as j,noop as k,readFileDataUrl as z}from"./shared.js";export{T as ALIGN_PATTERN,l as Alignment,r as COLOR_SET,P as DEFAULT_FONT_FAMILY_MAP,s as DEFAULT_FONT_SIZES,I as DEFAULT_IMAGE_DISPLAY,_ as DEFAULT_IMAGE_URL_REGEX,a as DEFAULT_IMAGE_WIDTH,m as DEFAULT_LINE_HEIGHT,p as ELEMENT_TIPTAP_TIP,A as EVENTS,C as ImageDisplay,W as IndentProps,n as LINE_HEIGHT_100,L as PREVIEW_WINDOW_WIDTH,y as cached,V as capitalize,R as checkIndent,X as clamp,U as convertToPX,x as createCell,b as createIndentCommand,D as createTable,i as deleteTableWhenAllCellsSelected,H as getTableNodeTypes,h as isCellSelection,t as isHexColor,Y as isNaN,j as isPlainObject,k as noop,z as readFileDataUrl,M as resolveImg};
@@ -0,0 +1,2 @@
1
+ import { CellSelection } from '@tiptap/pm/tables';
2
+ export declare function isCellSelection(value: unknown): value is CellSelection;
@@ -0,0 +1 @@
1
+ import{CellSelection as n}from"@tiptap/pm/tables";function t(e){return e instanceof n}export{t as isCellSelection};
@@ -0,0 +1,20 @@
1
+ export declare function noop(): void;
2
+ /**
3
+ * Check whether a value is NaN
4
+ */
5
+ export declare function isNaN(val: any): boolean;
6
+ export declare function clamp(val: number, min: number, max: number): number;
7
+ export declare function readFileDataUrl(file: File): Promise<any>;
8
+ /**
9
+ * Create a cached version of a pure function.
10
+ */
11
+ export declare function cached(fn: Function): Function;
12
+ /**
13
+ * Capitalize a string.
14
+ */
15
+ export declare const capitalize: Function;
16
+ /**
17
+ * Strict object type check. Only returns true
18
+ * for plain JavaScript objects.
19
+ */
20
+ export declare function isPlainObject(obj: any): boolean;
@@ -0,0 +1 @@
1
+ function i(){}function a(e){return Number.isNaN(e)}function u(e,t,n){return e<t?t:e>n?n:e}function l(e){const t=new FileReader;return new Promise((n,r)=>{t.onload=c=>n(c.target.result),t.onerror=r,t.readAsDataURL(e)})}function o(e){const t=Object.create(null);return function(r){return t[r]||(t[r]=e(r))}}const f=o(e=>e.charAt(0).toUpperCase()+e.slice(1));function s(e){return Object.prototype.toString.call(e)==="[object Object]"}export{o as cached,f as capitalize,u as clamp,a as isNaN,s as isPlainObject,i as noop,l as readFileDataUrl};
package/package.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "daisy-tiptap-test",
3
+ "private": false,
4
+ "version": "0.0.6",
5
+ "type": "module",
6
+ "dependencies": {
7
+ "@juggle/resize-observer": "^3.4.0",
8
+ "@tiptap/core": "^2.1.13",
9
+ "@tiptap/pm": "^2.1.13",
10
+ "@tiptap/suggestion": "^2.1.13",
11
+ "@tiptap/vue-3": "^2.1.13",
12
+ "linkifyjs": "^4.1.3",
13
+ "lowlight": "^3.1.0",
14
+ "tippy.js": "^6.3.7"
15
+ },
16
+ "main": "./dist/index.js",
17
+ "types": "./dist/index.d.ts"
18
+ }