reactjs-tiptap-editor 0.3.18 → 0.3.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{ActionMenuButton-Bp3NtBKu.cjs → ActionMenuButton-BTFBZyG2.cjs} +1 -1
- package/lib/{ActionMenuButton-CK00Dg3S.js → ActionMenuButton-DXwnYZhJ.js} +1 -1
- package/lib/Attachment.cjs +1 -1
- package/lib/Attachment.d.cts +28 -28
- package/lib/Attachment.d.ts +28 -28
- package/lib/Attachment.js +4 -4
- package/lib/Blockquote.cjs +1 -1
- package/lib/Blockquote.d.cts +28 -28
- package/lib/Blockquote.d.ts +28 -28
- package/lib/Blockquote.js +2 -2
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.d.cts +28 -28
- package/lib/Bold.d.ts +28 -28
- package/lib/Bold.js +2 -2
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.d.cts +28 -28
- package/lib/BulletList.d.ts +28 -28
- package/lib/BulletList.js +2 -2
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.d.cts +28 -28
- package/lib/Clear.d.ts +28 -28
- package/lib/Clear.js +2 -2
- package/lib/Code.cjs +1 -1
- package/lib/Code.d.cts +28 -28
- package/lib/Code.d.ts +28 -28
- package/lib/Code.js +2 -2
- package/lib/CodeBlock.cjs +1 -1
- package/lib/CodeBlock.d.cts +28 -28
- package/lib/CodeBlock.d.ts +28 -28
- package/lib/CodeBlock.js +3 -3
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.d.cts +28 -28
- package/lib/CodeView.d.ts +28 -28
- package/lib/CodeView.js +2 -2
- package/lib/Color.cjs +1 -1
- package/lib/Color.d.cts +28 -28
- package/lib/Color.d.ts +28 -28
- package/lib/Color.js +3 -3
- package/lib/Document.cjs +1 -1
- package/lib/Document.d.cts +28 -28
- package/lib/Document.d.ts +28 -28
- package/lib/Document.js +1 -1
- package/lib/{Drawer-D7O4q7Un.cjs → Drawer-BrHHs2E9.cjs} +1 -1
- package/lib/{Drawer-B5bTsUf8.js → Drawer-CVuwyG50.js} +4 -4
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.d.cts +28 -28
- package/lib/Drawer.d.ts +28 -28
- package/lib/Drawer.js +4 -4
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.d.cts +28 -28
- package/lib/Emoji.d.ts +28 -28
- package/lib/Emoji.js +5 -5
- package/lib/Excalidraw-Be_GDV4Q.cjs +1 -0
- package/lib/Excalidraw-frMX4K62.js +289 -0
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.d.cts +28 -28
- package/lib/Excalidraw.d.ts +28 -28
- package/lib/Excalidraw.js +3 -3
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.d.cts +28 -28
- package/lib/ExportPdf.d.ts +28 -28
- package/lib/ExportPdf.js +2 -2
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.d.cts +28 -28
- package/lib/ExportWord.d.ts +28 -28
- package/lib/ExportWord.js +2 -2
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.d.cts +28 -28
- package/lib/FontFamily.d.ts +28 -28
- package/lib/FontFamily.js +5 -5
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.d.cts +28 -28
- package/lib/FontSize.d.ts +28 -28
- package/lib/FontSize.js +4 -4
- package/lib/FormatPainter.cjs +1 -1
- package/lib/FormatPainter.d.cts +28 -28
- package/lib/FormatPainter.d.ts +28 -28
- package/lib/FormatPainter.js +2 -2
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.d.cts +28 -28
- package/lib/Heading.d.ts +28 -28
- package/lib/Heading.js +3 -3
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.d.cts +28 -28
- package/lib/Highlight.d.ts +28 -28
- package/lib/Highlight.js +2 -2
- package/lib/History.cjs +1 -1
- package/lib/History.d.cts +28 -28
- package/lib/History.d.ts +28 -28
- package/lib/History.js +2 -2
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.d.cts +28 -28
- package/lib/HorizontalRule.d.ts +28 -28
- package/lib/HorizontalRule.js +2 -2
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.d.cts +28 -28
- package/lib/Iframe.d.ts +28 -28
- package/lib/Iframe.js +3 -3
- package/lib/Image.cjs +1 -1
- package/lib/Image.d.cts +29 -28
- package/lib/Image.d.ts +29 -28
- package/lib/Image.js +3 -3
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.d.cts +28 -28
- package/lib/ImageGif.d.ts +28 -28
- package/lib/ImageGif.js +3 -3
- package/lib/ImportWord.cjs +74 -74
- package/lib/ImportWord.d.cts +28 -28
- package/lib/ImportWord.d.ts +28 -28
- package/lib/ImportWord.js +5015 -4998
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.d.cts +28 -28
- package/lib/Indent.d.ts +28 -28
- package/lib/Indent.js +2 -2
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.d.cts +28 -28
- package/lib/Italic.d.ts +28 -28
- package/lib/Italic.js +2 -2
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.d.cts +28 -28
- package/lib/Katex.d.ts +28 -28
- package/lib/Katex.js +5 -5
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.d.cts +28 -28
- package/lib/LineHeight.d.ts +28 -28
- package/lib/LineHeight.js +3 -3
- package/lib/Link.cjs +1 -1
- package/lib/Link.d.cts +28 -28
- package/lib/Link.d.ts +28 -28
- package/lib/Link.js +2 -2
- package/lib/ListItem.cjs +1 -1
- package/lib/ListItem.d.cts +28 -28
- package/lib/ListItem.d.ts +28 -28
- package/lib/ListItem.js +1 -1
- package/lib/Mention.cjs +1 -1
- package/lib/Mention.d.cts +28 -28
- package/lib/Mention.d.ts +28 -28
- package/lib/Mention.js +123 -91
- package/lib/Mermaid.cjs +1 -1
- package/lib/Mermaid.d.cts +28 -28
- package/lib/Mermaid.d.ts +28 -28
- package/lib/Mermaid.js +5 -5
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.d.cts +28 -28
- package/lib/MoreMark.d.ts +28 -28
- package/lib/MoreMark.js +3 -3
- package/lib/MultiColumn.cjs +1 -1
- package/lib/MultiColumn.d.cts +28 -28
- package/lib/MultiColumn.d.ts +28 -28
- package/lib/MultiColumn.js +2 -2
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.d.cts +28 -28
- package/lib/OrderedList.d.ts +28 -28
- package/lib/OrderedList.js +2 -2
- package/lib/RichTextEditor-CAxwVWUE.cjs +137 -0
- package/lib/{RichTextEditor-DWN9FEob.js → RichTextEditor-DjTnd5Uu.js} +2336 -2328
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.d.cts +28 -28
- package/lib/SearchAndReplace.d.ts +28 -28
- package/lib/SearchAndReplace.js +3 -3
- package/lib/Selection.cjs +1 -1
- package/lib/Selection.d.cts +28 -28
- package/lib/Selection.d.ts +28 -28
- package/lib/Selection.js +1 -1
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.d.cts +28 -28
- package/lib/SlashCommand.d.ts +28 -28
- package/lib/SlashCommand.js +5 -5
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.d.cts +28 -28
- package/lib/Strike.d.ts +28 -28
- package/lib/Strike.js +2 -2
- package/lib/SubAndSuperScript.cjs +1 -1
- package/lib/SubAndSuperScript.d.cts +28 -28
- package/lib/SubAndSuperScript.d.ts +28 -28
- package/lib/SubAndSuperScript.js +3 -3
- package/lib/Table.cjs +1 -1
- package/lib/Table.d.cts +28 -28
- package/lib/Table.d.ts +28 -28
- package/lib/Table.js +3 -3
- package/lib/TableOfContent.cjs +1 -1
- package/lib/TableOfContent.d.cts +28 -28
- package/lib/TableOfContent.d.ts +28 -28
- package/lib/TableOfContent.js +4 -4
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.d.cts +28 -28
- package/lib/TaskList.d.ts +28 -28
- package/lib/TaskList.js +37 -33
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.d.cts +28 -28
- package/lib/TextAlign.d.ts +28 -28
- package/lib/TextAlign.js +2 -2
- package/lib/TextBubble.cjs +1 -1
- package/lib/TextBubble.d.cts +28 -28
- package/lib/TextBubble.d.ts +28 -28
- package/lib/TextBubble.js +3 -3
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.d.cts +28 -28
- package/lib/TextDirection.d.ts +28 -28
- package/lib/TextDirection.js +2 -2
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.d.cts +28 -28
- package/lib/TextUnderline.d.ts +28 -28
- package/lib/TextUnderline.js +2 -2
- package/lib/TrailingNode.cjs +1 -1
- package/lib/TrailingNode.d.cts +28 -28
- package/lib/TrailingNode.d.ts +28 -28
- package/lib/TrailingNode.js +1 -1
- package/lib/{Twitter-COZu8DI2.cjs → Twitter-V0OzBT_E.cjs} +1 -1
- package/lib/{Twitter-J0XtGXRC.js → Twitter-dRxbZOad.js} +4 -4
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.d.cts +28 -28
- package/lib/Twitter.d.ts +28 -28
- package/lib/Twitter.js +3 -3
- package/lib/Video.cjs +1 -1
- package/lib/Video.d.cts +28 -28
- package/lib/Video.d.ts +28 -28
- package/lib/Video.js +3 -3
- package/lib/bubble-extra.cjs +2 -2
- package/lib/bubble-extra.d.cts +28 -28
- package/lib/bubble-extra.d.ts +28 -28
- package/lib/bubble-extra.js +26 -26
- package/lib/{dom-dataset-Cuy-pIfj.cjs → dom-dataset-Byuf1YmW.cjs} +5 -5
- package/lib/{dom-dataset-CHDbKz5J.js → dom-dataset-Di3tIRrR.js} +94 -83
- package/lib/index-BI-IcZcN.cjs +1 -0
- package/lib/{index-CSvnpArE.cjs → index-ByRfqzMr.cjs} +2 -2
- package/lib/index-C19MB4Al.cjs +1 -0
- package/lib/{index-DIPntess.js → index-C1fzuXpN.js} +1 -1
- package/lib/index-CbQQFj2T.js +133 -0
- package/lib/{index-BWx1Mchx.js → index-DI9T3iLd.js} +243 -243
- package/lib/{index-CrxasX7b.cjs → index-DclQSrIx.cjs} +1 -1
- package/lib/{index-DEFQHExY.js → index-LUL9mqY4.js} +1 -1
- package/lib/{index-zcKfSGd5.js → index-Tj3Ci7xM.js} +13 -8
- package/lib/{index-h9_SDuwc.cjs → index-Z4b9rzn-.cjs} +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +28 -28
- package/lib/index.d.ts +28 -28
- package/lib/index.js +6 -6
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.d.cts +33 -28
- package/lib/locale-bundle.d.ts +33 -28
- package/lib/locale-bundle.js +1 -1
- package/lib/{textarea-Bm0GTcEU.js → textarea-6c8drwXJ.js} +1 -1
- package/lib/{textarea-C_xhu0vT.cjs → textarea-BsJTSgT-.cjs} +1 -1
- package/package.json +67 -67
- package/lib/Excalidraw-CzAhPJ3k.cjs +0 -1
- package/lib/Excalidraw-D1EJKRER.js +0 -282
- package/lib/RichTextEditor-jtVXJcE2.cjs +0 -141
- package/lib/index-Cyh1yoFk.cjs +0 -1
- package/lib/index-jEB3jXoa.cjs +0 -1
- package/lib/index-oQutU45z.js +0 -129
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const l=require("./index-
|
|
1
|
+
"use strict";const l=require("./index-ByRfqzMr.cjs"),a=t=>{if(!t.children.length)return;const r=t.querySelectorAll("span");r&&r.forEach(e=>{var n,s;const i=e.getAttribute("style"),o=(s=(n=e.parentElement)===null||n===void 0?void 0:n.closest("span"))===null||s===void 0?void 0:s.getAttribute("style");e.setAttribute("style",`${o};${i}`)})},u=l.Mark.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&a(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",l.mergeAttributes(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:t})=>{const{selection:r}=t;return t.doc.nodesBetween(r.from,r.to,(e,n)=>{if(e.isTextblock)return!0;e.marks.filter(s=>s.type===this.type).some(s=>Object.values(s.attrs).some(i=>!!i))||t.removeMark(n,n+e.nodeSize,this.type)}),!0}}}});exports.TextStyle=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var A = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var F = (t, o, n) =>
|
|
4
|
-
import { useSyncExternalStore as
|
|
2
|
+
var y = (t, o, n) => o in t ? A(t, o, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[o] = n;
|
|
3
|
+
var F = (t, o, n) => y(t, typeof o != "symbol" ? o + "" : o, n);
|
|
4
|
+
import { useSyncExternalStore as D, useMemo as E, useEffect as L } from "react";
|
|
5
5
|
const w = "en", B = 200, it = B - 80, rt = 20, lt = 1e5, dt = 16, at = 10, nt = 10, st = 2, pt = [
|
|
6
6
|
"#000000",
|
|
7
7
|
"#262626",
|
|
@@ -376,8 +376,8 @@ function I({
|
|
|
376
376
|
}
|
|
377
377
|
var {
|
|
378
378
|
link: C,
|
|
379
|
-
propagate:
|
|
380
|
-
updateDirtyFlag:
|
|
379
|
+
propagate: U,
|
|
380
|
+
updateDirtyFlag: W,
|
|
381
381
|
startTracking: v,
|
|
382
382
|
endTracking: T,
|
|
383
383
|
processEffectNotifications: j,
|
|
@@ -428,7 +428,7 @@ function _(t) {
|
|
|
428
428
|
}
|
|
429
429
|
function q(t) {
|
|
430
430
|
const o = t.flags;
|
|
431
|
-
return o & 32 || o & 64 &&
|
|
431
|
+
return o & 32 || o & 64 && W(t, o) ? _(t) : z(t, t.flags), !0;
|
|
432
432
|
}
|
|
433
433
|
function H(t) {
|
|
434
434
|
return t.flags & 128 ? (z(t, t.flags), !0) : !1;
|
|
@@ -437,7 +437,7 @@ function V(...t) {
|
|
|
437
437
|
if (t.length) {
|
|
438
438
|
if (this.currentValue !== (this.currentValue = t[0])) {
|
|
439
439
|
const o = this.subs;
|
|
440
|
-
o !== void 0 && (
|
|
440
|
+
o !== void 0 && (U(o), j());
|
|
441
441
|
}
|
|
442
442
|
} else
|
|
443
443
|
return u !== void 0 && C(this, u), this.currentValue;
|
|
@@ -449,7 +449,7 @@ function O(t) {
|
|
|
449
449
|
return M(t);
|
|
450
450
|
}
|
|
451
451
|
function G(t) {
|
|
452
|
-
return [
|
|
452
|
+
return [D((o) => {
|
|
453
453
|
let n = P(() => {
|
|
454
454
|
t(), o();
|
|
455
455
|
});
|
|
@@ -626,6 +626,7 @@ const $ = {
|
|
|
626
626
|
"editor.imageUpload.cancel": "Cancel",
|
|
627
627
|
"editor.imageUpload.crop": "Crop",
|
|
628
628
|
"editor.imageUpload.uploading": "Uploading...",
|
|
629
|
+
"editor.imageUpload.alt": "Alt Text",
|
|
629
630
|
"editor.imageUpload.fileTypeNotSupported": "File type not supported",
|
|
630
631
|
"editor.imageUpload.fileSizeTooBig": "File size too big, Maximum size is",
|
|
631
632
|
"editor.table.menu.insertColumnBefore": "Insert Column Before",
|
|
@@ -801,6 +802,7 @@ const $ = {
|
|
|
801
802
|
"editor.imageUpload.cancel": "Mégsem",
|
|
802
803
|
"editor.imageUpload.crop": "Körbevágás",
|
|
803
804
|
"editor.imageUpload.uploading": "Feltöltés...",
|
|
805
|
+
"editor.imageUpload.alt": "Alternatív szöveg",
|
|
804
806
|
"editor.imageUpload.fileTypeNotSupported": "Fájltípus nem támogatott",
|
|
805
807
|
"editor.imageUpload.fileSizeTooBig": "A fájlméret túl nagy, a maximum méret",
|
|
806
808
|
"editor.table.menu.insertColumnBefore": "Oszlop beszúrása balra",
|
|
@@ -976,6 +978,7 @@ const $ = {
|
|
|
976
978
|
"editor.imageUpload.cancel": "Cancelar",
|
|
977
979
|
"editor.imageUpload.crop": "Cortar",
|
|
978
980
|
"editor.imageUpload.uploading": "Enviando...",
|
|
981
|
+
"editor.imageUpload.alt": "Texto alternativo",
|
|
979
982
|
"editor.imageUpload.fileTypeNotSupported": "Tipo de arquivo não suportado",
|
|
980
983
|
"editor.imageUpload.fileSizeTooBig": "Tamanho do arquivo muito grande, tamanho máximo é",
|
|
981
984
|
"editor.table.menu.insertColumnBefore": "Inserir coluna antes",
|
|
@@ -1151,6 +1154,7 @@ const $ = {
|
|
|
1151
1154
|
"editor.imageUpload.cancel": "Hủy",
|
|
1152
1155
|
"editor.imageUpload.crop": "Cắt",
|
|
1153
1156
|
"editor.imageUpload.uploading": "Đang tải lên...",
|
|
1157
|
+
"editor.imageUpload.alt": "Văn bản thay thế",
|
|
1154
1158
|
"editor.imageUpload.fileTypeNotSupported": "Loại tệp không được hỗ trợ",
|
|
1155
1159
|
"editor.imageUpload.fileSizeTooBig": "Kích thước tệp quá lớn, Kích thước tối đa là",
|
|
1156
1160
|
"editor.table.menu.insertColumnBefore": "Chèn cột trước",
|
|
@@ -1326,6 +1330,7 @@ const $ = {
|
|
|
1326
1330
|
"editor.imageUpload.cancel": "取消",
|
|
1327
1331
|
"editor.imageUpload.crop": "裁剪",
|
|
1328
1332
|
"editor.imageUpload.uploading": "上传中...",
|
|
1333
|
+
"editor.imageUpload.alt": "替代文本",
|
|
1329
1334
|
"editor.imageUpload.fileTypeNotSupported": "不支持的文件类型",
|
|
1330
1335
|
"editor.imageUpload.fileSizeTooBig": "文件大小超出限制,最大大小为",
|
|
1331
1336
|
"editor.table.menu.insertColumnBefore": "在前面插入列",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("./index-
|
|
1
|
+
"use strict";const r=require("./index-ByRfqzMr.cjs"),e=r.Mark.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(t){return t!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sub",r.mergeAttributes(this.options.HTMLAttributes,t),0]},addCommands(){return{setSubscript:()=>({commands:t})=>t.setMark(this.name),toggleSubscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSubscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),s=r.Mark.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(t){return t!=="super"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sup",r.mergeAttributes(this.options.HTMLAttributes,t),0]},addCommands(){return{setSuperscript:()=>({commands:t})=>t.setMark(this.name),toggleSuperscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSuperscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}});exports.Subscript=e;exports.Superscript=s;
|
package/lib/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p=require("react"),C=require("./RichTextEditor-jtVXJcE2.cjs"),x=require("./dom-dataset-Cuy-pIfj.cjs"),a=require("./index-CSvnpArE.cjs"),b=require("./ListItem.cjs"),S=require("./index-CrxasX7b.cjs"),v=require("./Document.cjs"),k=require("./Selection.cjs"),P=require("./TextBubble.cjs"),M=require("./TrailingNode.cjs"),m=require("./index-jEB3jXoa.cjs");function T(){var l;const t=p.useRef({editor:null}),[e,i]=p.useState(!1),[o,r]=p.useState(null);return p.useEffect(()=>{var s;(s=t.current)!=null&&s.editor&&(i(!0),r(t.current.editor))},[t,(l=t.current)==null?void 0:l.editor]),{isReady:e,editor:o,editorRef:t}}const E=a.Extension.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc;if(((t==null?void 0:t.mode)||this.options.mode)==="textSize"){const o=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(o)}return e.nodeSize},this.storage.words=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc,i=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(i)}},addProseMirrorPlugins(){let t=!1;return[new a.Plugin({key:new a.PluginKey("characterCount"),appendTransaction:(e,i,o)=>{if(t)return;const r=this.options.limit;if(r==null||r===0){t=!0;return}const l=this.storage.characters({node:o.doc});if(l>r){const s=l-r,n=0,c=s;console.warn(`[CharacterCount] Initial content exceeded limit of ${r} characters. Content was automatically trimmed.`);const u=o.tr.deleteRange(n,c);return t=!0,u}t=!0},filterTransaction:(e,i)=>{const o=this.options.limit;if(!e.docChanged||o===0||o===null||o===void 0)return!0;const r=this.storage.characters({node:i.doc}),l=this.storage.characters({node:e.doc});if(l<=o||r>o&&l>o&&l<=r)return!0;if(r>o&&l>o&&l>r||!e.getMeta("paste"))return!1;const n=e.selection.$head.pos,c=l-o,u=n-c,h=n;return e.deleteRange(u,h),!(this.storage.characters({node:e.doc})>o)}})]}});function A(t={}){return new a.Plugin({view(e){return new O(e,t)}})}class O{constructor(e,i){var o;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(o=i.width)!==null&&o!==void 0?o:1,this.color=i.color===!1?void 0:i.color||"black",this.class=i.class,this.handlers=["dragover","dragend","drop","dragleave"].map(r=>{let l=s=>{this[r](s)};return e.dom.addEventListener(r,l),{name:r,handler:l}})}destroy(){this.handlers.forEach(({name:e,handler:i})=>this.editorView.dom.removeEventListener(e,i))}update(e,i){this.cursorPos!=null&&i.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),i=!e.parent.inlineContent,o;if(i){let n=e.nodeBefore,c=e.nodeAfter;if(n||c){let u=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0));if(u){let h=u.getBoundingClientRect(),f=n?h.bottom:h.top;n&&c&&(f=(f+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),o={left:h.left,right:h.right,top:f-this.width/2,bottom:f+this.width/2}}}}if(!o){let n=this.editorView.coordsAtPos(this.cursorPos);o={left:n.left-this.width/2,right:n.left+this.width/2,top:n.top,bottom:n.bottom}}let r=this.editorView.dom.offsetParent;this.element||(this.element=r.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",i),this.element.classList.toggle("prosemirror-dropcursor-inline",!i);let l,s;if(!r||r==document.body&&getComputedStyle(r).position=="static")l=-pageXOffset,s=-pageYOffset;else{let n=r.getBoundingClientRect();l=n.left-r.scrollLeft,s=n.top-r.scrollTop}this.element.style.left=o.left-l+"px",this.element.style.top=o.top-s+"px",this.element.style.width=o.right-o.left+"px",this.element.style.height=o.bottom-o.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let i=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),o=i&&i.inside>=0&&this.editorView.state.doc.nodeAt(i.inside),r=o&&o.type.spec.disableDropCursor,l=typeof r=="function"?r(this.editorView,i,e):r;if(i&&!l){let s=i.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let n=a.dropPoint(this.editorView.state.doc,s,this.editorView.dragging.slice);n!=null&&(s=n)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}const B=a.Extension.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[A(this.options)]}}),N=a.Extension.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new a.Plugin({key:new a.PluginKey("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:i,isFocused:o}=this.editor,{anchor:r}=e,l=[];if(!i||!o)return a.DecorationSet.create(t,[]);let s=0;this.options.mode==="deepest"&&t.descendants((c,u)=>{if(c.isText)return;if(!(r>=u&&r<=u+c.nodeSize-1))return!1;s+=1});let n=0;return t.descendants((c,u)=>{if(c.isText||!(r>=u&&r<=u+c.nodeSize-1))return!1;if(n+=1,this.options.mode==="deepest"&&s-n>0||this.options.mode==="shallowest"&&n>1)return this.options.mode==="deepest";l.push(a.Decoration.node(u,u+c.nodeSize,{class:this.options.className}))}),a.DecorationSet.create(t,l)}}})]}});class d extends a.Selection{constructor(e){super(e,e)}map(e,i){let o=e.resolve(i.map(this.head));return d.valid(o)?new d(o):a.Selection.near(o)}content(){return a.Slice.empty}eq(e){return e instanceof d&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,i){if(typeof i.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new d(e.resolve(i.pos))}getBookmark(){return new y(this.anchor)}static valid(e){let i=e.parent;if(i.isTextblock||!z(e)||!D(e))return!1;let o=i.type.spec.allowGapCursor;if(o!=null)return o;let r=i.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,i,o=!1){e:for(;;){if(!o&&d.valid(e))return e;let r=e.pos,l=null;for(let s=e.depth;;s--){let n=e.node(s);if(i>0?e.indexAfter(s)<n.childCount:e.index(s)>0){l=n.child(i>0?e.indexAfter(s):e.index(s)-1);break}else if(s==0)return null;r+=i;let c=e.doc.resolve(r);if(d.valid(c))return c}for(;;){let s=i>0?l.firstChild:l.lastChild;if(!s){if(l.isAtom&&!l.isText&&!a.NodeSelection.isSelectable(l)){e=e.doc.resolve(r+l.nodeSize*i),o=!1;continue e}break}l=s,r+=i;let n=e.doc.resolve(r);if(d.valid(n))return n}return null}}}d.prototype.visible=!1;d.findFrom=d.findGapCursorFrom;a.Selection.jsonID("gapcursor",d);class y{constructor(e){this.pos=e}map(e){return new y(e.map(this.pos))}resolve(e){let i=e.resolve(this.pos);return d.valid(i)?new d(i):a.Selection.near(i)}}function z(t){for(let e=t.depth;e>=0;e--){let i=t.index(e),o=t.node(e);if(i==0){if(o.type.spec.isolating)return!0;continue}for(let r=o.child(i-1);;r=r.lastChild){if(r.childCount==0&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}}return!0}function D(t){for(let e=t.depth;e>=0;e--){let i=t.indexAfter(e),o=t.node(e);if(i==o.childCount){if(o.type.spec.isolating)return!0;continue}for(let r=o.child(i);;r=r.firstChild){if(r.childCount==0&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}}return!0}function L(){return new a.Plugin({props:{decorations:q,createSelectionBetween(t,e,i){return e.pos==i.pos&&d.valid(i)?new d(i):null},handleClick:V,handleKeyDown:R,handleDOMEvents:{beforeinput:H}}})}const R=a.keydownHandler({ArrowLeft:g("horiz",-1),ArrowRight:g("horiz",1),ArrowUp:g("vert",-1),ArrowDown:g("vert",1)});function g(t,e){const i=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(o,r,l){let s=o.selection,n=e>0?s.$to:s.$from,c=s.empty;if(s instanceof a.TextSelection){if(!l.endOfTextblock(i)||n.depth==0)return!1;c=!1,n=o.doc.resolve(e>0?n.after():n.before())}let u=d.findGapCursorFrom(n,e,c);return u?(r&&r(o.tr.setSelection(new d(u))),!0):!1}}function V(t,e,i){if(!t||!t.editable)return!1;let o=t.state.doc.resolve(e);if(!d.valid(o))return!1;let r=t.posAtCoords({left:i.clientX,top:i.clientY});return r&&r.inside>-1&&a.NodeSelection.isSelectable(t.state.doc.nodeAt(r.inside))?!1:(t.dispatch(t.state.tr.setSelection(new d(o))),!0)}function H(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof d))return!1;let{$from:i}=t.state.selection,o=i.parent.contentMatchAt(i.index()).findWrapping(t.state.schema.nodes.text);if(!o)return!1;let r=a.Fragment.empty;for(let s=o.length-1;s>=0;s--)r=a.Fragment.from(o[s].createAndFill(null,r));let l=t.state.tr.replace(i.pos,i.pos,new a.Slice(r,0,0));return l.setSelection(a.TextSelection.near(l.doc.resolve(i.pos+1))),t.dispatch(l),!1}function q(t){if(!(t.selection instanceof d))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",a.DecorationSet.create(t.doc,[a.Decoration.widget(t.selection.head,e,{key:"gapcursor"})])}const F=a.Extension.create({name:"gapCursor",addProseMirrorPlugins(){return[L()]},extendNodeSchema(t){var e;const i={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=a.callOrReturn(a.getExtensionField(t,"allowGapCursor",i)))!==null&&e!==void 0?e:null}}}),I=a.Node.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",a.mergeAttributes(this.options.HTMLAttributes,t)]},renderText(){return`
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p=require("react"),C=require("./RichTextEditor-CAxwVWUE.cjs"),x=require("./dom-dataset-Byuf1YmW.cjs"),a=require("./index-ByRfqzMr.cjs"),b=require("./ListItem.cjs"),S=require("./index-DclQSrIx.cjs"),v=require("./Document.cjs"),k=require("./Selection.cjs"),P=require("./TextBubble.cjs"),M=require("./TrailingNode.cjs"),m=require("./index-C19MB4Al.cjs");function T(){var l;const t=p.useRef({editor:null}),[e,i]=p.useState(!1),[o,r]=p.useState(null);return p.useEffect(()=>{var s;(s=t.current)!=null&&s.editor&&(i(!0),r(t.current.editor))},[t,(l=t.current)==null?void 0:l.editor]),{isReady:e,editor:o,editorRef:t}}const E=a.Extension.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc;if(((t==null?void 0:t.mode)||this.options.mode)==="textSize"){const o=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(o)}return e.nodeSize},this.storage.words=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc,i=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(i)}},addProseMirrorPlugins(){let t=!1;return[new a.Plugin({key:new a.PluginKey("characterCount"),appendTransaction:(e,i,o)=>{if(t)return;const r=this.options.limit;if(r==null||r===0){t=!0;return}const l=this.storage.characters({node:o.doc});if(l>r){const s=l-r,n=0,c=s;console.warn(`[CharacterCount] Initial content exceeded limit of ${r} characters. Content was automatically trimmed.`);const u=o.tr.deleteRange(n,c);return t=!0,u}t=!0},filterTransaction:(e,i)=>{const o=this.options.limit;if(!e.docChanged||o===0||o===null||o===void 0)return!0;const r=this.storage.characters({node:i.doc}),l=this.storage.characters({node:e.doc});if(l<=o||r>o&&l>o&&l<=r)return!0;if(r>o&&l>o&&l>r||!e.getMeta("paste"))return!1;const n=e.selection.$head.pos,c=l-o,u=n-c,h=n;return e.deleteRange(u,h),!(this.storage.characters({node:e.doc})>o)}})]}});function A(t={}){return new a.Plugin({view(e){return new O(e,t)}})}class O{constructor(e,i){var o;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(o=i.width)!==null&&o!==void 0?o:1,this.color=i.color===!1?void 0:i.color||"black",this.class=i.class,this.handlers=["dragover","dragend","drop","dragleave"].map(r=>{let l=s=>{this[r](s)};return e.dom.addEventListener(r,l),{name:r,handler:l}})}destroy(){this.handlers.forEach(({name:e,handler:i})=>this.editorView.dom.removeEventListener(e,i))}update(e,i){this.cursorPos!=null&&i.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),i=!e.parent.inlineContent,o;if(i){let n=e.nodeBefore,c=e.nodeAfter;if(n||c){let u=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0));if(u){let h=u.getBoundingClientRect(),f=n?h.bottom:h.top;n&&c&&(f=(f+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),o={left:h.left,right:h.right,top:f-this.width/2,bottom:f+this.width/2}}}}if(!o){let n=this.editorView.coordsAtPos(this.cursorPos);o={left:n.left-this.width/2,right:n.left+this.width/2,top:n.top,bottom:n.bottom}}let r=this.editorView.dom.offsetParent;this.element||(this.element=r.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",i),this.element.classList.toggle("prosemirror-dropcursor-inline",!i);let l,s;if(!r||r==document.body&&getComputedStyle(r).position=="static")l=-pageXOffset,s=-pageYOffset;else{let n=r.getBoundingClientRect();l=n.left-r.scrollLeft,s=n.top-r.scrollTop}this.element.style.left=o.left-l+"px",this.element.style.top=o.top-s+"px",this.element.style.width=o.right-o.left+"px",this.element.style.height=o.bottom-o.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let i=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),o=i&&i.inside>=0&&this.editorView.state.doc.nodeAt(i.inside),r=o&&o.type.spec.disableDropCursor,l=typeof r=="function"?r(this.editorView,i,e):r;if(i&&!l){let s=i.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let n=a.dropPoint(this.editorView.state.doc,s,this.editorView.dragging.slice);n!=null&&(s=n)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}const B=a.Extension.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[A(this.options)]}}),N=a.Extension.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new a.Plugin({key:new a.PluginKey("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:i,isFocused:o}=this.editor,{anchor:r}=e,l=[];if(!i||!o)return a.DecorationSet.create(t,[]);let s=0;this.options.mode==="deepest"&&t.descendants((c,u)=>{if(c.isText)return;if(!(r>=u&&r<=u+c.nodeSize-1))return!1;s+=1});let n=0;return t.descendants((c,u)=>{if(c.isText||!(r>=u&&r<=u+c.nodeSize-1))return!1;if(n+=1,this.options.mode==="deepest"&&s-n>0||this.options.mode==="shallowest"&&n>1)return this.options.mode==="deepest";l.push(a.Decoration.node(u,u+c.nodeSize,{class:this.options.className}))}),a.DecorationSet.create(t,l)}}})]}});class d extends a.Selection{constructor(e){super(e,e)}map(e,i){let o=e.resolve(i.map(this.head));return d.valid(o)?new d(o):a.Selection.near(o)}content(){return a.Slice.empty}eq(e){return e instanceof d&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,i){if(typeof i.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new d(e.resolve(i.pos))}getBookmark(){return new y(this.anchor)}static valid(e){let i=e.parent;if(i.isTextblock||!z(e)||!D(e))return!1;let o=i.type.spec.allowGapCursor;if(o!=null)return o;let r=i.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,i,o=!1){e:for(;;){if(!o&&d.valid(e))return e;let r=e.pos,l=null;for(let s=e.depth;;s--){let n=e.node(s);if(i>0?e.indexAfter(s)<n.childCount:e.index(s)>0){l=n.child(i>0?e.indexAfter(s):e.index(s)-1);break}else if(s==0)return null;r+=i;let c=e.doc.resolve(r);if(d.valid(c))return c}for(;;){let s=i>0?l.firstChild:l.lastChild;if(!s){if(l.isAtom&&!l.isText&&!a.NodeSelection.isSelectable(l)){e=e.doc.resolve(r+l.nodeSize*i),o=!1;continue e}break}l=s,r+=i;let n=e.doc.resolve(r);if(d.valid(n))return n}return null}}}d.prototype.visible=!1;d.findFrom=d.findGapCursorFrom;a.Selection.jsonID("gapcursor",d);class y{constructor(e){this.pos=e}map(e){return new y(e.map(this.pos))}resolve(e){let i=e.resolve(this.pos);return d.valid(i)?new d(i):a.Selection.near(i)}}function z(t){for(let e=t.depth;e>=0;e--){let i=t.index(e),o=t.node(e);if(i==0){if(o.type.spec.isolating)return!0;continue}for(let r=o.child(i-1);;r=r.lastChild){if(r.childCount==0&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}}return!0}function D(t){for(let e=t.depth;e>=0;e--){let i=t.indexAfter(e),o=t.node(e);if(i==o.childCount){if(o.type.spec.isolating)return!0;continue}for(let r=o.child(i);;r=r.firstChild){if(r.childCount==0&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}}return!0}function L(){return new a.Plugin({props:{decorations:q,createSelectionBetween(t,e,i){return e.pos==i.pos&&d.valid(i)?new d(i):null},handleClick:V,handleKeyDown:R,handleDOMEvents:{beforeinput:H}}})}const R=a.keydownHandler({ArrowLeft:g("horiz",-1),ArrowRight:g("horiz",1),ArrowUp:g("vert",-1),ArrowDown:g("vert",1)});function g(t,e){const i=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(o,r,l){let s=o.selection,n=e>0?s.$to:s.$from,c=s.empty;if(s instanceof a.TextSelection){if(!l.endOfTextblock(i)||n.depth==0)return!1;c=!1,n=o.doc.resolve(e>0?n.after():n.before())}let u=d.findGapCursorFrom(n,e,c);return u?(r&&r(o.tr.setSelection(new d(u))),!0):!1}}function V(t,e,i){if(!t||!t.editable)return!1;let o=t.state.doc.resolve(e);if(!d.valid(o))return!1;let r=t.posAtCoords({left:i.clientX,top:i.clientY});return r&&r.inside>-1&&a.NodeSelection.isSelectable(t.state.doc.nodeAt(r.inside))?!1:(t.dispatch(t.state.tr.setSelection(new d(o))),!0)}function H(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof d))return!1;let{$from:i}=t.state.selection,o=i.parent.contentMatchAt(i.index()).findWrapping(t.state.schema.nodes.text);if(!o)return!1;let r=a.Fragment.empty;for(let s=o.length-1;s>=0;s--)r=a.Fragment.from(o[s].createAndFill(null,r));let l=t.state.tr.replace(i.pos,i.pos,new a.Slice(r,0,0));return l.setSelection(a.TextSelection.near(l.doc.resolve(i.pos+1))),t.dispatch(l),!1}function q(t){if(!(t.selection instanceof d))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",a.DecorationSet.create(t.doc,[a.Decoration.widget(t.selection.head,e,{key:"gapcursor"})])}const F=a.Extension.create({name:"gapCursor",addProseMirrorPlugins(){return[L()]},extendNodeSchema(t){var e;const i={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=a.callOrReturn(a.getExtensionField(t,"allowGapCursor",i)))!==null&&e!==void 0?e:null}}}),I=a.Node.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",a.mergeAttributes(this.options.HTMLAttributes,t)]},renderText(){return`
|
|
2
2
|
`},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:i,editor:o})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:r,storedMarks:l}=i;if(r.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:n}=o.extensionManager,c=l||r.$to.parentOffset&&r.$from.marks();return e().insertContent({type:this.name}).command(({tr:u,dispatch:h})=>{if(h&&c&&s){const f=c.filter(w=>n.includes(w.type.name));u.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),K=a.Node.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",a.mergeAttributes(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),W=a.Extension.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new a.Plugin({key:new a.PluginKey("placeholder"),props:{decorations:({doc:t,selection:e})=>{const i=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:o}=e,r=[];if(!i)return null;const l=this.editor.isEmpty;return t.descendants((s,n)=>{const c=o>=n&&o<=n+s.nodeSize,u=!s.isLeaf&&a.isNodeEmpty(s);if((c||!this.options.showOnlyCurrent)&&u){const h=[this.options.emptyNodeClass];l&&h.push(this.options.emptyEditorClass);const f=a.Decoration.node(n,n+s.nodeSize,{class:h.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:s,pos:n,hasAnchor:c}):this.options.placeholder});r.push(f)}return this.options.includeChildren}),a.DecorationSet.create(t,r)}}})]}}),G=a.Node.create({name:"text",group:"inline"}),J=a.Extension.create({name:"base-kit",addExtensions(){const t=[];return this.options.document!==!1&&t.push(v.Document.configure()),this.options.placeholder!==!1&&t.push(W.configure({placeholder:({node:e,pos:i,editor:o})=>{var r,l,s,n,c;return((r=e==null?void 0:e.type)==null?void 0:r.name)==="columns"||((l=e==null?void 0:e.content)==null?void 0:l.size)!==0?"":((s=e==null?void 0:e.type)==null?void 0:s.name)==="heading"?`${m.localeActions.t(`editor.heading.h${e.attrs.level}.tooltip`)}`:((n=e==null?void 0:e.type)==null?void 0:n.name)==="codeBlock"||((c=e==null?void 0:e.type)==null?void 0:c.name)==="table"?"":o.extensionManager.extensions.some(u=>u.name==="slashCommand")?m.localeActions.t("editor.slash"):m.localeActions.t("editor.content")},...this.options.placeholder})),this.options.focus!==!1&&t.push(N.configure({className:"focus",...this.options.focus})),this.options.text!==!1&&t.push(G.configure()),this.options.textBubble!==!1&&t.push(P.TextBubble.configure()),this.options.gapcursor!==!1&&t.push(F.configure()),this.options.dropcursor!==!1&&t.push(B.configure({...this.options.dropcursor,width:2,class:"ProseMirror-dropcursor border-black"})),this.options.characterCount!==!1&&t.push(E.configure(this.options.characterCount)),this.options.paragraph!==!1&&t.push(K.configure(this.options.paragraph)),this.options.hardBreak!==!1&&t.push(I.configure(this.options.hardBreak)),this.options.listItem!==!1&&t.push(b.ListItem.configure(this.options.listItem)),this.options.textStyle!==!1&&t.push(S.TextStyle.configure(this.options.textStyle)),this.options.trailingNode!==!1&&t.push(M.TrailingNode.configure(this.options.trailingNode)),this.options.selection!==!1&&t.push(k.Selection),this.options.multiColumn!==!1&&t.push(C.Column,C.MultiColumn),t}});exports.default=C.RichTextEditor;exports.BubbleMenu=x.BubbleMenu;exports.BaseKit=J;exports.useEditorState=T;
|
package/lib/index.d.cts
CHANGED
|
@@ -472,9 +472,11 @@ declare module '@tiptap/core' {
|
|
|
472
472
|
|
|
473
473
|
declare module '@tiptap/core' {
|
|
474
474
|
interface Commands<ReturnType> {
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
475
|
+
emoji: {
|
|
476
|
+
setEmoji: (emoji: {
|
|
477
|
+
name: string;
|
|
478
|
+
emoji: string;
|
|
479
|
+
}) => ReturnType;
|
|
478
480
|
};
|
|
479
481
|
}
|
|
480
482
|
}
|
|
@@ -482,11 +484,9 @@ declare module '@tiptap/core' {
|
|
|
482
484
|
|
|
483
485
|
declare module '@tiptap/core' {
|
|
484
486
|
interface Commands<ReturnType> {
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
emoji: string;
|
|
489
|
-
}) => ReturnType;
|
|
487
|
+
drawer: {
|
|
488
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
489
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
490
490
|
};
|
|
491
491
|
}
|
|
492
492
|
}
|
|
@@ -537,21 +537,6 @@ declare module '@tiptap/core' {
|
|
|
537
537
|
}
|
|
538
538
|
|
|
539
539
|
|
|
540
|
-
declare module '@tiptap/core' {
|
|
541
|
-
interface Commands<ReturnType> {
|
|
542
|
-
iframe: {
|
|
543
|
-
/**
|
|
544
|
-
* Add an iframe
|
|
545
|
-
*/
|
|
546
|
-
setIframe: (options: {
|
|
547
|
-
src: string;
|
|
548
|
-
service: string;
|
|
549
|
-
}) => ReturnType;
|
|
550
|
-
};
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
|
|
555
540
|
declare module '@tiptap/core' {
|
|
556
541
|
interface Commands<ReturnType> {
|
|
557
542
|
imageUpload: {
|
|
@@ -572,6 +557,21 @@ declare module '@tiptap/core' {
|
|
|
572
557
|
}
|
|
573
558
|
|
|
574
559
|
|
|
560
|
+
declare module '@tiptap/core' {
|
|
561
|
+
interface Commands<ReturnType> {
|
|
562
|
+
iframe: {
|
|
563
|
+
/**
|
|
564
|
+
* Add an iframe
|
|
565
|
+
*/
|
|
566
|
+
setIframe: (options: {
|
|
567
|
+
src: string;
|
|
568
|
+
service: string;
|
|
569
|
+
}) => ReturnType;
|
|
570
|
+
};
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
|
|
575
575
|
declare module '@tiptap/core' {
|
|
576
576
|
interface Commands<ReturnType> {
|
|
577
577
|
imageGifUpload: {
|
|
@@ -610,8 +610,9 @@ declare module '@tiptap/core' {
|
|
|
610
610
|
|
|
611
611
|
declare module '@tiptap/core' {
|
|
612
612
|
interface Commands<ReturnType> {
|
|
613
|
-
|
|
614
|
-
|
|
613
|
+
lineHeight: {
|
|
614
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
615
|
+
unsetLineHeight: () => ReturnType;
|
|
615
616
|
};
|
|
616
617
|
}
|
|
617
618
|
}
|
|
@@ -619,9 +620,8 @@ declare module '@tiptap/core' {
|
|
|
619
620
|
|
|
620
621
|
declare module '@tiptap/core' {
|
|
621
622
|
interface Commands<ReturnType> {
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
unsetLineHeight: () => ReturnType;
|
|
623
|
+
katex: {
|
|
624
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
625
625
|
};
|
|
626
626
|
}
|
|
627
627
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -472,9 +472,11 @@ declare module '@tiptap/core' {
|
|
|
472
472
|
|
|
473
473
|
declare module '@tiptap/core' {
|
|
474
474
|
interface Commands<ReturnType> {
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
475
|
+
emoji: {
|
|
476
|
+
setEmoji: (emoji: {
|
|
477
|
+
name: string;
|
|
478
|
+
emoji: string;
|
|
479
|
+
}) => ReturnType;
|
|
478
480
|
};
|
|
479
481
|
}
|
|
480
482
|
}
|
|
@@ -482,11 +484,9 @@ declare module '@tiptap/core' {
|
|
|
482
484
|
|
|
483
485
|
declare module '@tiptap/core' {
|
|
484
486
|
interface Commands<ReturnType> {
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
emoji: string;
|
|
489
|
-
}) => ReturnType;
|
|
487
|
+
drawer: {
|
|
488
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
489
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
490
490
|
};
|
|
491
491
|
}
|
|
492
492
|
}
|
|
@@ -537,21 +537,6 @@ declare module '@tiptap/core' {
|
|
|
537
537
|
}
|
|
538
538
|
|
|
539
539
|
|
|
540
|
-
declare module '@tiptap/core' {
|
|
541
|
-
interface Commands<ReturnType> {
|
|
542
|
-
iframe: {
|
|
543
|
-
/**
|
|
544
|
-
* Add an iframe
|
|
545
|
-
*/
|
|
546
|
-
setIframe: (options: {
|
|
547
|
-
src: string;
|
|
548
|
-
service: string;
|
|
549
|
-
}) => ReturnType;
|
|
550
|
-
};
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
|
|
555
540
|
declare module '@tiptap/core' {
|
|
556
541
|
interface Commands<ReturnType> {
|
|
557
542
|
imageUpload: {
|
|
@@ -572,6 +557,21 @@ declare module '@tiptap/core' {
|
|
|
572
557
|
}
|
|
573
558
|
|
|
574
559
|
|
|
560
|
+
declare module '@tiptap/core' {
|
|
561
|
+
interface Commands<ReturnType> {
|
|
562
|
+
iframe: {
|
|
563
|
+
/**
|
|
564
|
+
* Add an iframe
|
|
565
|
+
*/
|
|
566
|
+
setIframe: (options: {
|
|
567
|
+
src: string;
|
|
568
|
+
service: string;
|
|
569
|
+
}) => ReturnType;
|
|
570
|
+
};
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
|
|
575
575
|
declare module '@tiptap/core' {
|
|
576
576
|
interface Commands<ReturnType> {
|
|
577
577
|
imageGifUpload: {
|
|
@@ -610,8 +610,9 @@ declare module '@tiptap/core' {
|
|
|
610
610
|
|
|
611
611
|
declare module '@tiptap/core' {
|
|
612
612
|
interface Commands<ReturnType> {
|
|
613
|
-
|
|
614
|
-
|
|
613
|
+
lineHeight: {
|
|
614
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
615
|
+
unsetLineHeight: () => ReturnType;
|
|
615
616
|
};
|
|
616
617
|
}
|
|
617
618
|
}
|
|
@@ -619,9 +620,8 @@ declare module '@tiptap/core' {
|
|
|
619
620
|
|
|
620
621
|
declare module '@tiptap/core' {
|
|
621
622
|
interface Commands<ReturnType> {
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
unsetLineHeight: () => ReturnType;
|
|
623
|
+
katex: {
|
|
624
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
625
625
|
};
|
|
626
626
|
}
|
|
627
627
|
}
|
package/lib/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { useRef as O, useState as S, useEffect as B } from "react";
|
|
2
|
-
import { a6 as z, a7 as N } from "./RichTextEditor-
|
|
3
|
-
import { a8 as ve } from "./RichTextEditor-
|
|
4
|
-
import { B as ke } from "./dom-dataset-
|
|
5
|
-
import { E as f, P as p, a as w,
|
|
2
|
+
import { a6 as z, a7 as N } from "./RichTextEditor-DjTnd5Uu.js";
|
|
3
|
+
import { a8 as ve } from "./RichTextEditor-DjTnd5Uu.js";
|
|
4
|
+
import { B as ke } from "./dom-dataset-Di3tIRrR.js";
|
|
5
|
+
import { E as f, P as p, a as w, s as L, D as C, b, u as R, F as k, S as P, T as M, g as T, v as y, x as D, y as V, N as x, m as A, z as H } from "./index-DI9T3iLd.js";
|
|
6
6
|
import { ListItem as F } from "./ListItem.js";
|
|
7
|
-
import { T as I } from "./index-
|
|
7
|
+
import { T as I } from "./index-C1fzuXpN.js";
|
|
8
8
|
import { Document as K } from "./Document.js";
|
|
9
9
|
import { Selection as W } from "./Selection.js";
|
|
10
10
|
import { TextBubble as G } from "./TextBubble.js";
|
|
11
11
|
import { TrailingNode as J } from "./TrailingNode.js";
|
|
12
|
-
import { m } from "./index-
|
|
12
|
+
import { m } from "./index-Tj3Ci7xM.js";
|
|
13
13
|
function ye() {
|
|
14
14
|
var l;
|
|
15
15
|
const t = O({ editor: null }), [e, o] = S(!1), [s, r] = S(null);
|
package/lib/locale-bundle.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-C19MB4Al.cjs");exports.en=e.locale$1;exports.hu_HU=e.locale$2;exports.locale=e.locale;exports.pt_BR=e.locale$5;exports.vi=e.locale$3;exports.zh_CN=e.locale$4;
|
package/lib/locale-bundle.d.cts
CHANGED
|
@@ -117,6 +117,7 @@ export declare const en: {
|
|
|
117
117
|
'editor.imageUpload.cancel': string;
|
|
118
118
|
'editor.imageUpload.crop': string;
|
|
119
119
|
'editor.imageUpload.uploading': string;
|
|
120
|
+
'editor.imageUpload.alt': string;
|
|
120
121
|
'editor.imageUpload.fileTypeNotSupported': string;
|
|
121
122
|
'editor.imageUpload.fileSizeTooBig': string;
|
|
122
123
|
'editor.table.menu.insertColumnBefore': string;
|
|
@@ -294,6 +295,7 @@ export declare const hu_HU: {
|
|
|
294
295
|
'editor.imageUpload.cancel': string;
|
|
295
296
|
'editor.imageUpload.crop': string;
|
|
296
297
|
'editor.imageUpload.uploading': string;
|
|
298
|
+
'editor.imageUpload.alt': string;
|
|
297
299
|
'editor.imageUpload.fileTypeNotSupported': string;
|
|
298
300
|
'editor.imageUpload.fileSizeTooBig': string;
|
|
299
301
|
'editor.table.menu.insertColumnBefore': string;
|
|
@@ -494,6 +496,7 @@ export declare const pt_BR: {
|
|
|
494
496
|
'editor.imageUpload.cancel': string;
|
|
495
497
|
'editor.imageUpload.crop': string;
|
|
496
498
|
'editor.imageUpload.uploading': string;
|
|
499
|
+
'editor.imageUpload.alt': string;
|
|
497
500
|
'editor.imageUpload.fileTypeNotSupported': string;
|
|
498
501
|
'editor.imageUpload.fileSizeTooBig': string;
|
|
499
502
|
'editor.table.menu.insertColumnBefore': string;
|
|
@@ -671,6 +674,7 @@ export declare const vi: {
|
|
|
671
674
|
'editor.imageUpload.cancel': string;
|
|
672
675
|
'editor.imageUpload.crop': string;
|
|
673
676
|
'editor.imageUpload.uploading': string;
|
|
677
|
+
'editor.imageUpload.alt': string;
|
|
674
678
|
'editor.imageUpload.fileTypeNotSupported': string;
|
|
675
679
|
'editor.imageUpload.fileSizeTooBig': string;
|
|
676
680
|
'editor.table.menu.insertColumnBefore': string;
|
|
@@ -848,6 +852,7 @@ export declare const zh_CN: {
|
|
|
848
852
|
'editor.imageUpload.cancel': string;
|
|
849
853
|
'editor.imageUpload.crop': string;
|
|
850
854
|
'editor.imageUpload.uploading': string;
|
|
855
|
+
'editor.imageUpload.alt': string;
|
|
851
856
|
'editor.imageUpload.fileTypeNotSupported': string;
|
|
852
857
|
'editor.imageUpload.fileSizeTooBig': string;
|
|
853
858
|
'editor.table.menu.insertColumnBefore': string;
|
|
@@ -941,9 +946,11 @@ declare module '@tiptap/core' {
|
|
|
941
946
|
|
|
942
947
|
declare module '@tiptap/core' {
|
|
943
948
|
interface Commands<ReturnType> {
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
949
|
+
emoji: {
|
|
950
|
+
setEmoji: (emoji: {
|
|
951
|
+
name: string;
|
|
952
|
+
emoji: string;
|
|
953
|
+
}) => ReturnType;
|
|
947
954
|
};
|
|
948
955
|
}
|
|
949
956
|
}
|
|
@@ -951,11 +958,9 @@ declare module '@tiptap/core' {
|
|
|
951
958
|
|
|
952
959
|
declare module '@tiptap/core' {
|
|
953
960
|
interface Commands<ReturnType> {
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
emoji: string;
|
|
958
|
-
}) => ReturnType;
|
|
961
|
+
drawer: {
|
|
962
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
963
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
959
964
|
};
|
|
960
965
|
}
|
|
961
966
|
}
|
|
@@ -1006,21 +1011,6 @@ declare module '@tiptap/core' {
|
|
|
1006
1011
|
}
|
|
1007
1012
|
|
|
1008
1013
|
|
|
1009
|
-
declare module '@tiptap/core' {
|
|
1010
|
-
interface Commands<ReturnType> {
|
|
1011
|
-
iframe: {
|
|
1012
|
-
/**
|
|
1013
|
-
* Add an iframe
|
|
1014
|
-
*/
|
|
1015
|
-
setIframe: (options: {
|
|
1016
|
-
src: string;
|
|
1017
|
-
service: string;
|
|
1018
|
-
}) => ReturnType;
|
|
1019
|
-
};
|
|
1020
|
-
}
|
|
1021
|
-
}
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
1014
|
declare module '@tiptap/core' {
|
|
1025
1015
|
interface Commands<ReturnType> {
|
|
1026
1016
|
imageUpload: {
|
|
@@ -1041,6 +1031,21 @@ declare module '@tiptap/core' {
|
|
|
1041
1031
|
}
|
|
1042
1032
|
|
|
1043
1033
|
|
|
1034
|
+
declare module '@tiptap/core' {
|
|
1035
|
+
interface Commands<ReturnType> {
|
|
1036
|
+
iframe: {
|
|
1037
|
+
/**
|
|
1038
|
+
* Add an iframe
|
|
1039
|
+
*/
|
|
1040
|
+
setIframe: (options: {
|
|
1041
|
+
src: string;
|
|
1042
|
+
service: string;
|
|
1043
|
+
}) => ReturnType;
|
|
1044
|
+
};
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
|
|
1044
1049
|
declare module '@tiptap/core' {
|
|
1045
1050
|
interface Commands<ReturnType> {
|
|
1046
1051
|
imageGifUpload: {
|
|
@@ -1079,8 +1084,9 @@ declare module '@tiptap/core' {
|
|
|
1079
1084
|
|
|
1080
1085
|
declare module '@tiptap/core' {
|
|
1081
1086
|
interface Commands<ReturnType> {
|
|
1082
|
-
|
|
1083
|
-
|
|
1087
|
+
lineHeight: {
|
|
1088
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
1089
|
+
unsetLineHeight: () => ReturnType;
|
|
1084
1090
|
};
|
|
1085
1091
|
}
|
|
1086
1092
|
}
|
|
@@ -1088,9 +1094,8 @@ declare module '@tiptap/core' {
|
|
|
1088
1094
|
|
|
1089
1095
|
declare module '@tiptap/core' {
|
|
1090
1096
|
interface Commands<ReturnType> {
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
unsetLineHeight: () => ReturnType;
|
|
1097
|
+
katex: {
|
|
1098
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
1094
1099
|
};
|
|
1095
1100
|
}
|
|
1096
1101
|
}
|
package/lib/locale-bundle.d.ts
CHANGED
|
@@ -117,6 +117,7 @@ export declare const en: {
|
|
|
117
117
|
'editor.imageUpload.cancel': string;
|
|
118
118
|
'editor.imageUpload.crop': string;
|
|
119
119
|
'editor.imageUpload.uploading': string;
|
|
120
|
+
'editor.imageUpload.alt': string;
|
|
120
121
|
'editor.imageUpload.fileTypeNotSupported': string;
|
|
121
122
|
'editor.imageUpload.fileSizeTooBig': string;
|
|
122
123
|
'editor.table.menu.insertColumnBefore': string;
|
|
@@ -294,6 +295,7 @@ export declare const hu_HU: {
|
|
|
294
295
|
'editor.imageUpload.cancel': string;
|
|
295
296
|
'editor.imageUpload.crop': string;
|
|
296
297
|
'editor.imageUpload.uploading': string;
|
|
298
|
+
'editor.imageUpload.alt': string;
|
|
297
299
|
'editor.imageUpload.fileTypeNotSupported': string;
|
|
298
300
|
'editor.imageUpload.fileSizeTooBig': string;
|
|
299
301
|
'editor.table.menu.insertColumnBefore': string;
|
|
@@ -494,6 +496,7 @@ export declare const pt_BR: {
|
|
|
494
496
|
'editor.imageUpload.cancel': string;
|
|
495
497
|
'editor.imageUpload.crop': string;
|
|
496
498
|
'editor.imageUpload.uploading': string;
|
|
499
|
+
'editor.imageUpload.alt': string;
|
|
497
500
|
'editor.imageUpload.fileTypeNotSupported': string;
|
|
498
501
|
'editor.imageUpload.fileSizeTooBig': string;
|
|
499
502
|
'editor.table.menu.insertColumnBefore': string;
|
|
@@ -671,6 +674,7 @@ export declare const vi: {
|
|
|
671
674
|
'editor.imageUpload.cancel': string;
|
|
672
675
|
'editor.imageUpload.crop': string;
|
|
673
676
|
'editor.imageUpload.uploading': string;
|
|
677
|
+
'editor.imageUpload.alt': string;
|
|
674
678
|
'editor.imageUpload.fileTypeNotSupported': string;
|
|
675
679
|
'editor.imageUpload.fileSizeTooBig': string;
|
|
676
680
|
'editor.table.menu.insertColumnBefore': string;
|
|
@@ -848,6 +852,7 @@ export declare const zh_CN: {
|
|
|
848
852
|
'editor.imageUpload.cancel': string;
|
|
849
853
|
'editor.imageUpload.crop': string;
|
|
850
854
|
'editor.imageUpload.uploading': string;
|
|
855
|
+
'editor.imageUpload.alt': string;
|
|
851
856
|
'editor.imageUpload.fileTypeNotSupported': string;
|
|
852
857
|
'editor.imageUpload.fileSizeTooBig': string;
|
|
853
858
|
'editor.table.menu.insertColumnBefore': string;
|
|
@@ -941,9 +946,11 @@ declare module '@tiptap/core' {
|
|
|
941
946
|
|
|
942
947
|
declare module '@tiptap/core' {
|
|
943
948
|
interface Commands<ReturnType> {
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
949
|
+
emoji: {
|
|
950
|
+
setEmoji: (emoji: {
|
|
951
|
+
name: string;
|
|
952
|
+
emoji: string;
|
|
953
|
+
}) => ReturnType;
|
|
947
954
|
};
|
|
948
955
|
}
|
|
949
956
|
}
|
|
@@ -951,11 +958,9 @@ declare module '@tiptap/core' {
|
|
|
951
958
|
|
|
952
959
|
declare module '@tiptap/core' {
|
|
953
960
|
interface Commands<ReturnType> {
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
emoji: string;
|
|
958
|
-
}) => ReturnType;
|
|
961
|
+
drawer: {
|
|
962
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
963
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
959
964
|
};
|
|
960
965
|
}
|
|
961
966
|
}
|
|
@@ -1006,21 +1011,6 @@ declare module '@tiptap/core' {
|
|
|
1006
1011
|
}
|
|
1007
1012
|
|
|
1008
1013
|
|
|
1009
|
-
declare module '@tiptap/core' {
|
|
1010
|
-
interface Commands<ReturnType> {
|
|
1011
|
-
iframe: {
|
|
1012
|
-
/**
|
|
1013
|
-
* Add an iframe
|
|
1014
|
-
*/
|
|
1015
|
-
setIframe: (options: {
|
|
1016
|
-
src: string;
|
|
1017
|
-
service: string;
|
|
1018
|
-
}) => ReturnType;
|
|
1019
|
-
};
|
|
1020
|
-
}
|
|
1021
|
-
}
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
1014
|
declare module '@tiptap/core' {
|
|
1025
1015
|
interface Commands<ReturnType> {
|
|
1026
1016
|
imageUpload: {
|
|
@@ -1041,6 +1031,21 @@ declare module '@tiptap/core' {
|
|
|
1041
1031
|
}
|
|
1042
1032
|
|
|
1043
1033
|
|
|
1034
|
+
declare module '@tiptap/core' {
|
|
1035
|
+
interface Commands<ReturnType> {
|
|
1036
|
+
iframe: {
|
|
1037
|
+
/**
|
|
1038
|
+
* Add an iframe
|
|
1039
|
+
*/
|
|
1040
|
+
setIframe: (options: {
|
|
1041
|
+
src: string;
|
|
1042
|
+
service: string;
|
|
1043
|
+
}) => ReturnType;
|
|
1044
|
+
};
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
|
|
1044
1049
|
declare module '@tiptap/core' {
|
|
1045
1050
|
interface Commands<ReturnType> {
|
|
1046
1051
|
imageGifUpload: {
|
|
@@ -1079,8 +1084,9 @@ declare module '@tiptap/core' {
|
|
|
1079
1084
|
|
|
1080
1085
|
declare module '@tiptap/core' {
|
|
1081
1086
|
interface Commands<ReturnType> {
|
|
1082
|
-
|
|
1083
|
-
|
|
1087
|
+
lineHeight: {
|
|
1088
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
1089
|
+
unsetLineHeight: () => ReturnType;
|
|
1084
1090
|
};
|
|
1085
1091
|
}
|
|
1086
1092
|
}
|
|
@@ -1088,9 +1094,8 @@ declare module '@tiptap/core' {
|
|
|
1088
1094
|
|
|
1089
1095
|
declare module '@tiptap/core' {
|
|
1090
1096
|
interface Commands<ReturnType> {
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
unsetLineHeight: () => ReturnType;
|
|
1097
|
+
katex: {
|
|
1098
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
1094
1099
|
};
|
|
1095
1100
|
}
|
|
1096
1101
|
}
|