reactjs-tiptap-editor 0.3.28 → 0.3.30
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-D0hFczCn.js → ActionMenuButton-B6fitGKu.js} +1 -1
- package/lib/{ActionMenuButton-C20molC9.cjs → ActionMenuButton-wiDnIxE2.cjs} +1 -1
- package/lib/Attachment.cjs +1 -1
- package/lib/Attachment.d.cts +41 -41
- package/lib/Attachment.d.ts +41 -41
- package/lib/Attachment.js +1 -1
- package/lib/Blockquote.cjs +1 -1
- package/lib/Blockquote.d.cts +41 -41
- package/lib/Blockquote.d.ts +41 -41
- package/lib/Blockquote.js +1 -1
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.d.cts +41 -41
- package/lib/Bold.d.ts +41 -41
- package/lib/Bold.js +1 -1
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.d.cts +41 -41
- package/lib/BulletList.d.ts +41 -41
- package/lib/BulletList.js +1 -1
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.d.cts +41 -41
- package/lib/Clear.d.ts +41 -41
- package/lib/Clear.js +1 -1
- package/lib/Code.cjs +1 -1
- package/lib/Code.d.cts +41 -41
- package/lib/Code.d.ts +41 -41
- package/lib/Code.js +1 -1
- package/lib/CodeBlock.cjs +1 -1
- package/lib/CodeBlock.d.cts +41 -41
- package/lib/CodeBlock.d.ts +41 -41
- package/lib/CodeBlock.js +1 -1
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.d.cts +41 -41
- package/lib/CodeView.d.ts +41 -41
- package/lib/CodeView.js +1 -1
- package/lib/Color.cjs +1 -1
- package/lib/Color.d.cts +41 -41
- package/lib/Color.d.ts +41 -41
- package/lib/Color.js +1 -1
- package/lib/Document.d.cts +41 -41
- package/lib/Document.d.ts +41 -41
- package/lib/{Drawer-B96jQIQU.js → Drawer-BKTU9CpU.js} +1 -1
- package/lib/{Drawer-0kBt3GVL.cjs → Drawer-CmoEF-Zg.cjs} +1 -1
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.d.cts +41 -41
- package/lib/Drawer.d.ts +41 -41
- package/lib/Drawer.js +2 -2
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.d.cts +41 -41
- package/lib/Emoji.d.ts +41 -41
- package/lib/Emoji.js +1 -1
- package/lib/{Excalidraw-z3VZyGJ4.js → Excalidraw-CM74U5tG.js} +1 -1
- package/lib/{Excalidraw-HK9kjpX5.cjs → Excalidraw-DAPP9qgY.cjs} +1 -1
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.d.cts +41 -41
- package/lib/Excalidraw.d.ts +41 -41
- package/lib/Excalidraw.js +1 -1
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.d.cts +41 -41
- package/lib/ExportPdf.d.ts +41 -41
- package/lib/ExportPdf.js +1 -1
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.d.cts +41 -41
- package/lib/ExportWord.d.ts +41 -41
- package/lib/ExportWord.js +1 -1
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.d.cts +41 -41
- package/lib/FontFamily.d.ts +41 -41
- package/lib/FontFamily.js +2 -2
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.d.cts +41 -41
- package/lib/FontSize.d.ts +41 -41
- package/lib/FontSize.js +2 -2
- package/lib/FormatPainter.cjs +1 -1
- package/lib/FormatPainter.d.cts +41 -41
- package/lib/FormatPainter.d.ts +41 -41
- package/lib/FormatPainter.js +1 -1
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.d.cts +41 -41
- package/lib/Heading.d.ts +41 -41
- package/lib/Heading.js +2 -2
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.d.cts +41 -41
- package/lib/Highlight.d.ts +41 -41
- package/lib/Highlight.js +1 -1
- package/lib/History.cjs +1 -1
- package/lib/History.d.cts +41 -41
- package/lib/History.d.ts +41 -41
- package/lib/History.js +1 -1
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.d.cts +41 -41
- package/lib/HorizontalRule.d.ts +41 -41
- package/lib/HorizontalRule.js +1 -1
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.d.cts +41 -41
- package/lib/Iframe.d.ts +41 -41
- package/lib/Iframe.js +1 -1
- package/lib/Image.cjs +1 -1
- package/lib/Image.d.cts +41 -41
- package/lib/Image.d.ts +41 -41
- package/lib/Image.js +1 -1
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.d.cts +44 -43
- package/lib/ImageGif.d.ts +44 -43
- package/lib/ImageGif.js +1 -1
- package/lib/ImportWord.cjs +1 -1
- package/lib/ImportWord.d.cts +41 -41
- package/lib/ImportWord.d.ts +41 -41
- package/lib/ImportWord.js +1 -1
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.d.cts +41 -41
- package/lib/Indent.d.ts +41 -41
- package/lib/Indent.js +1 -1
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.d.cts +41 -41
- package/lib/Italic.d.ts +41 -41
- package/lib/Italic.js +1 -1
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.d.cts +41 -41
- package/lib/Katex.d.ts +41 -41
- package/lib/Katex.js +2 -2
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.d.cts +41 -41
- package/lib/LineHeight.d.ts +41 -41
- package/lib/LineHeight.js +1 -1
- package/lib/Link.cjs +1 -1
- package/lib/Link.d.cts +41 -41
- package/lib/Link.d.ts +41 -41
- package/lib/Link.js +1 -1
- package/lib/ListItem.d.cts +41 -41
- package/lib/ListItem.d.ts +41 -41
- package/lib/Mention.d.cts +41 -41
- package/lib/Mention.d.ts +41 -41
- package/lib/Mermaid.cjs +1 -1
- package/lib/Mermaid.d.cts +41 -41
- package/lib/Mermaid.d.ts +41 -41
- package/lib/Mermaid.js +2 -2
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.d.cts +41 -41
- package/lib/MoreMark.d.ts +41 -41
- package/lib/MoreMark.js +1 -1
- package/lib/MultiColumn.cjs +1 -1
- package/lib/MultiColumn.d.cts +41 -41
- package/lib/MultiColumn.d.ts +41 -41
- package/lib/MultiColumn.js +1 -1
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.d.cts +41 -41
- package/lib/OrderedList.d.ts +41 -41
- package/lib/OrderedList.js +1 -1
- package/lib/{RichTextEditor-CnWZ69eX.js → RichTextEditor-BQN2eLD_.js} +997 -943
- package/lib/{RichTextEditor-BKywwUM4.cjs → RichTextEditor-C8Sm1E6J.cjs} +5 -5
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.d.cts +41 -41
- package/lib/SearchAndReplace.d.ts +41 -41
- package/lib/SearchAndReplace.js +1 -1
- package/lib/Selection.d.cts +41 -41
- package/lib/Selection.d.ts +41 -41
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.d.cts +41 -41
- package/lib/SlashCommand.d.ts +41 -41
- package/lib/SlashCommand.js +1 -1
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.d.cts +41 -41
- package/lib/Strike.d.ts +41 -41
- package/lib/Strike.js +1 -1
- package/lib/SubAndSuperScript.cjs +1 -1
- package/lib/SubAndSuperScript.d.cts +41 -41
- package/lib/SubAndSuperScript.d.ts +41 -41
- package/lib/SubAndSuperScript.js +1 -1
- package/lib/Table.cjs +1 -1
- package/lib/Table.d.cts +41 -41
- package/lib/Table.d.ts +41 -41
- package/lib/Table.js +1 -1
- package/lib/TableOfContent.cjs +1 -1
- package/lib/TableOfContent.d.cts +41 -41
- package/lib/TableOfContent.d.ts +41 -41
- package/lib/TableOfContent.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.d.cts +41 -41
- package/lib/TaskList.d.ts +41 -41
- package/lib/TaskList.js +1 -1
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.d.cts +41 -41
- package/lib/TextAlign.d.ts +41 -41
- package/lib/TextAlign.js +1 -1
- package/lib/TextBubble.cjs +1 -1
- package/lib/TextBubble.d.cts +41 -41
- package/lib/TextBubble.d.ts +41 -41
- package/lib/TextBubble.js +1 -1
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.d.cts +41 -41
- package/lib/TextDirection.d.ts +41 -41
- package/lib/TextDirection.js +1 -1
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.d.cts +41 -41
- package/lib/TextUnderline.d.ts +41 -41
- package/lib/TextUnderline.js +1 -1
- package/lib/TrailingNode.d.cts +41 -41
- package/lib/TrailingNode.d.ts +41 -41
- package/lib/{Twitter-Dj49i3B9.cjs → Twitter-CL2pu4QM.cjs} +1 -1
- package/lib/{Twitter-CCf1aM0f.js → Twitter-Dg6WWauX.js} +1 -1
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.d.cts +41 -41
- package/lib/Twitter.d.ts +41 -41
- package/lib/Twitter.js +1 -1
- package/lib/Video.cjs +1 -1
- package/lib/Video.d.cts +41 -41
- package/lib/Video.d.ts +41 -41
- package/lib/Video.js +1 -1
- package/lib/bubble-extra.cjs +1 -1
- package/lib/bubble-extra.d.cts +41 -41
- package/lib/bubble-extra.d.ts +41 -41
- package/lib/bubble-extra.js +5 -5
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +41 -41
- package/lib/index.d.ts +41 -41
- package/lib/index.js +2 -2
- package/lib/locale-bundle.d.cts +41 -41
- package/lib/locale-bundle.d.ts +41 -41
- package/lib/style.css +1 -1
- package/lib/{textarea-nr3UZ7Wg.js → textarea-BglwYF6b.js} +1 -1
- package/lib/{textarea-DhlS0JCr.cjs → textarea-D5WVZMgt.cjs} +1 -1
- package/package.json +1 -1
package/lib/Table.d.ts
CHANGED
|
@@ -145,8 +145,11 @@ declare module '@tiptap/core' {
|
|
|
145
145
|
|
|
146
146
|
declare module '@tiptap/core' {
|
|
147
147
|
interface Commands<ReturnType> {
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
emoji: {
|
|
149
|
+
setEmoji: (emoji: {
|
|
150
|
+
name: string;
|
|
151
|
+
emoji: string;
|
|
152
|
+
}) => ReturnType;
|
|
150
153
|
};
|
|
151
154
|
}
|
|
152
155
|
}
|
|
@@ -154,11 +157,8 @@ declare module '@tiptap/core' {
|
|
|
154
157
|
|
|
155
158
|
declare module '@tiptap/core' {
|
|
156
159
|
interface Commands<ReturnType> {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
name: string;
|
|
160
|
-
emoji: string;
|
|
161
|
-
}) => ReturnType;
|
|
160
|
+
excalidraw: {
|
|
161
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
162
162
|
};
|
|
163
163
|
}
|
|
164
164
|
}
|
|
@@ -209,21 +209,6 @@ declare module '@tiptap/core' {
|
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
|
|
212
|
-
declare module '@tiptap/core' {
|
|
213
|
-
interface Commands<ReturnType> {
|
|
214
|
-
iframe: {
|
|
215
|
-
/**
|
|
216
|
-
* Add an iframe
|
|
217
|
-
*/
|
|
218
|
-
setIframe: (options: {
|
|
219
|
-
src: string;
|
|
220
|
-
service: string;
|
|
221
|
-
}) => ReturnType;
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
|
|
227
212
|
declare module '@tiptap/core' {
|
|
228
213
|
interface Commands<ReturnType> {
|
|
229
214
|
imageUpload: {
|
|
@@ -244,6 +229,21 @@ declare module '@tiptap/core' {
|
|
|
244
229
|
}
|
|
245
230
|
|
|
246
231
|
|
|
232
|
+
declare module '@tiptap/core' {
|
|
233
|
+
interface Commands<ReturnType> {
|
|
234
|
+
iframe: {
|
|
235
|
+
/**
|
|
236
|
+
* Add an iframe
|
|
237
|
+
*/
|
|
238
|
+
setIframe: (options: {
|
|
239
|
+
src: string;
|
|
240
|
+
service: string;
|
|
241
|
+
}) => ReturnType;
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
|
|
247
247
|
declare module '@tiptap/core' {
|
|
248
248
|
interface Commands<ReturnType> {
|
|
249
249
|
imageGifUpload: {
|
|
@@ -282,9 +282,8 @@ declare module '@tiptap/core' {
|
|
|
282
282
|
|
|
283
283
|
declare module '@tiptap/core' {
|
|
284
284
|
interface Commands<ReturnType> {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
unsetLineHeight: () => ReturnType;
|
|
285
|
+
katex: {
|
|
286
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
288
287
|
};
|
|
289
288
|
}
|
|
290
289
|
}
|
|
@@ -292,8 +291,9 @@ declare module '@tiptap/core' {
|
|
|
292
291
|
|
|
293
292
|
declare module '@tiptap/core' {
|
|
294
293
|
interface Commands<ReturnType> {
|
|
295
|
-
|
|
296
|
-
|
|
294
|
+
lineHeight: {
|
|
295
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
296
|
+
unsetLineHeight: () => ReturnType;
|
|
297
297
|
};
|
|
298
298
|
}
|
|
299
299
|
}
|
|
@@ -309,6 +309,20 @@ declare module '@tiptap/core' {
|
|
|
309
309
|
}
|
|
310
310
|
|
|
311
311
|
|
|
312
|
+
declare module '@tiptap/core' {
|
|
313
|
+
interface Commands<ReturnType> {
|
|
314
|
+
columns: {
|
|
315
|
+
insertColumns: (attrs?: {
|
|
316
|
+
cols: number;
|
|
317
|
+
}) => ReturnType;
|
|
318
|
+
addColBefore: () => ReturnType;
|
|
319
|
+
addColAfter: () => ReturnType;
|
|
320
|
+
deleteCol: () => ReturnType;
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
|
|
312
326
|
declare module '@tiptap/core' {
|
|
313
327
|
interface Commands<ReturnType> {
|
|
314
328
|
search: {
|
|
@@ -324,20 +338,6 @@ declare module '@tiptap/core' {
|
|
|
324
338
|
}
|
|
325
339
|
|
|
326
340
|
|
|
327
|
-
declare module '@tiptap/core' {
|
|
328
|
-
interface Commands<ReturnType> {
|
|
329
|
-
columns: {
|
|
330
|
-
insertColumns: (attrs?: {
|
|
331
|
-
cols: number;
|
|
332
|
-
}) => ReturnType;
|
|
333
|
-
addColBefore: () => ReturnType;
|
|
334
|
-
addColAfter: () => ReturnType;
|
|
335
|
-
deleteCol: () => ReturnType;
|
|
336
|
-
};
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
|
|
341
341
|
declare module '@tiptap/core' {
|
|
342
342
|
interface Commands<ReturnType> {
|
|
343
343
|
tableOfContents: {
|
package/lib/Table.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as de, v as N, u as Pe, T as E, B as Oe, F as T, S as H, P as ke, D as ne, b as oe, g as Ie, C as Fe, N as U, x as je, y as Ve, m as J, G as Ke, E as Xe } from "./index-DI9T3iLd.js";
|
|
2
2
|
import { jsxs as Q, jsx as k } from "react/jsx-runtime";
|
|
3
|
-
import { P as Ge, m as qe, n as Ue, A as Je } from "./RichTextEditor-
|
|
3
|
+
import { P as Ge, m as qe, n as Ue, A as Je } from "./RichTextEditor-BQN2eLD_.js";
|
|
4
4
|
import { useState as ee } from "react";
|
|
5
5
|
import { T as O, p as I, q as F } from "./index-CsK90iVd.js";
|
|
6
6
|
var le, re;
|
package/lib/TableOfContent.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index-ByRfqzMr.cjs"),p=require("./dom-dataset-Byuf1YmW.cjs"),l=require("react/jsx-runtime"),c=require("react"),C=require("./index-D_A0TBRA.cjs"),b=require("./RichTextEditor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index-ByRfqzMr.cjs"),p=require("./dom-dataset-Byuf1YmW.cjs"),l=require("react/jsx-runtime"),c=require("react"),C=require("./index-D_A0TBRA.cjs"),b=require("./RichTextEditor-C8Sm1E6J.cjs"),g="_toc_aag8a_1",x="_visible_aag8a_7",T="_list_aag8a_11",O="_item_aag8a_16",f={toc:g,visible:x,list:T,item:O};function _(e){const o=[],a=[o];return e.forEach(n=>{let t=-1,s=a[n.level+t];for(;!s;)t-=1,s=a[n.level+t];s.push({...n,children:a[n.level]=[]})}),o}function y({editor:e}){const o=b.useEditableEditor(),[a,n]=c.useState([]),{t}=C.useLocale(),s=c.useCallback(()=>{const i=[],r=e.state.tr;e.state.doc.descendants((u,v)=>{if(u.type.name==="heading"){const d=`heading-${i.length+1}`;u.attrs.id!==d&&r.setNodeMarkup(v,void 0,{...u.attrs,id:d}),i.push({level:u.attrs.level,text:u.textContent,id:d})}}),r.setMeta("addToHistory",!1),r.setMeta("preventUpdate",!0),e.view.dispatch(r),n(i),e.eventEmitter&&e.eventEmitter.emit("TableOfContents",_(i))},[e]);return c.useEffect(()=>{if(e){if(!e.options.editable){s();return}return e.on("update",s),()=>{e.off("update",s)}}},[e,s]),c.useEffect(()=>{s()},[]),l.jsx(p.NodeViewWrapper,{className:p.clsx("tableOfContent",f.toc,o&&f.visible),children:o?l.jsxs("div",{style:{position:"relative"},children:[l.jsx("p",{className:"text-[20px] richtext-mb-[8px] richtext-font-semibold",children:t("editor.table_of_content")}),l.jsx("ul",{className:f.list,children:a.map((i,r)=>l.jsx("li",{className:f.item,style:{paddingLeft:`${i.level-1}rem`},children:l.jsx("a",{href:`#${i.id}`,children:i.text})},`table-of-content-${r}`))})]}):null})}function N(e,...o){const[a,n]=c.useState(!1);return c.useEffect(()=>{const t=()=>{n(e.isActive.apply(e,o))};return e.on("selectionUpdate",t),e.on("transaction",t),()=>{e.off("selectionUpdate",t),e.off("transaction",t)}},[e,o,n]),a}function A({editor:e,icon:o,tooltip:a}){const n=N(e,m.name),t=c.useCallback(()=>{if(n){e.chain().focus().removeTableOfContents().run();return}e.chain().focus().setTableOfContents().run()},[e,n]);return l.jsx(b.ActionButton,{action:t,isActive:()=>n||!1,icon:o,tooltip:a})}function j(e){return e&&e.type.name==="title"}function E(e,o){const n=[e.getJSON()],t=[];for(;n.length>0;){const s=n.shift();s.type===o&&t.push(s),s.content&&s.content.length>0&&n.push(...s.content)}return t}const m=h.Node.create({name:"tableOfContents",group:"block",atom:!0,addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),onHasOneBeforeInsert:()=>{},resizable:!0,lastColumnResizable:!0,allowTableNodeSelection:!1,button:({editor:o,t:a})=>({component:A,componentProps:{disabled:!1,icon:"BookMarked",tooltip:a("editor.table_of_content"),editor:o}})}},parseHTML(){return[{tag:"toc"}]},renderHTML({HTMLAttributes:e}){return["toc",h.mergeAttributes(e)]},addNodeView(){return p.ReactNodeViewRenderer(y)},addCommands(){return{setTableOfContents:()=>({commands:e,editor:o,view:a})=>{if(E(o,this.name).length>0){this.options.onHasOneBeforeInsert();return}const t=a.props.state.doc.content.firstChild;if(j(t)){const s=(t.firstChild&&t.firstChild.nodeSize||0)+1;return e.insertContentAt(s,{type:this.name})}return e.insertContent({type:this.name})},removeTableOfContents:()=>({state:e,dispatch:o})=>{const{tr:a}=e,n=e.schema.nodes.tableOfContents;return e.doc.descendants((t,s)=>{if(t.type===n){const i=s,r=s+t.nodeSize;a.delete(i,r)}}),a.docChanged?(o(a),!0):!1}}},addGlobalAttributes(){return[{types:["heading"],attributes:{id:{default:null}}}]}});exports.TableOfContents=m;
|
package/lib/TableOfContent.d.cts
CHANGED
|
@@ -51,8 +51,11 @@ declare module '@tiptap/core' {
|
|
|
51
51
|
|
|
52
52
|
declare module '@tiptap/core' {
|
|
53
53
|
interface Commands<ReturnType> {
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
emoji: {
|
|
55
|
+
setEmoji: (emoji: {
|
|
56
|
+
name: string;
|
|
57
|
+
emoji: string;
|
|
58
|
+
}) => ReturnType;
|
|
56
59
|
};
|
|
57
60
|
}
|
|
58
61
|
}
|
|
@@ -60,11 +63,8 @@ declare module '@tiptap/core' {
|
|
|
60
63
|
|
|
61
64
|
declare module '@tiptap/core' {
|
|
62
65
|
interface Commands<ReturnType> {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
name: string;
|
|
66
|
-
emoji: string;
|
|
67
|
-
}) => ReturnType;
|
|
66
|
+
excalidraw: {
|
|
67
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
}
|
|
@@ -115,21 +115,6 @@ declare module '@tiptap/core' {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
|
|
118
|
-
declare module '@tiptap/core' {
|
|
119
|
-
interface Commands<ReturnType> {
|
|
120
|
-
iframe: {
|
|
121
|
-
/**
|
|
122
|
-
* Add an iframe
|
|
123
|
-
*/
|
|
124
|
-
setIframe: (options: {
|
|
125
|
-
src: string;
|
|
126
|
-
service: string;
|
|
127
|
-
}) => ReturnType;
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
133
118
|
declare module '@tiptap/core' {
|
|
134
119
|
interface Commands<ReturnType> {
|
|
135
120
|
imageUpload: {
|
|
@@ -150,6 +135,21 @@ declare module '@tiptap/core' {
|
|
|
150
135
|
}
|
|
151
136
|
|
|
152
137
|
|
|
138
|
+
declare module '@tiptap/core' {
|
|
139
|
+
interface Commands<ReturnType> {
|
|
140
|
+
iframe: {
|
|
141
|
+
/**
|
|
142
|
+
* Add an iframe
|
|
143
|
+
*/
|
|
144
|
+
setIframe: (options: {
|
|
145
|
+
src: string;
|
|
146
|
+
service: string;
|
|
147
|
+
}) => ReturnType;
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
|
|
153
153
|
declare module '@tiptap/core' {
|
|
154
154
|
interface Commands<ReturnType> {
|
|
155
155
|
imageGifUpload: {
|
|
@@ -188,9 +188,8 @@ declare module '@tiptap/core' {
|
|
|
188
188
|
|
|
189
189
|
declare module '@tiptap/core' {
|
|
190
190
|
interface Commands<ReturnType> {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
unsetLineHeight: () => ReturnType;
|
|
191
|
+
katex: {
|
|
192
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
194
193
|
};
|
|
195
194
|
}
|
|
196
195
|
}
|
|
@@ -198,8 +197,9 @@ declare module '@tiptap/core' {
|
|
|
198
197
|
|
|
199
198
|
declare module '@tiptap/core' {
|
|
200
199
|
interface Commands<ReturnType> {
|
|
201
|
-
|
|
202
|
-
|
|
200
|
+
lineHeight: {
|
|
201
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
202
|
+
unsetLineHeight: () => ReturnType;
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
205
|
}
|
|
@@ -215,6 +215,20 @@ declare module '@tiptap/core' {
|
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
|
|
218
|
+
declare module '@tiptap/core' {
|
|
219
|
+
interface Commands<ReturnType> {
|
|
220
|
+
columns: {
|
|
221
|
+
insertColumns: (attrs?: {
|
|
222
|
+
cols: number;
|
|
223
|
+
}) => ReturnType;
|
|
224
|
+
addColBefore: () => ReturnType;
|
|
225
|
+
addColAfter: () => ReturnType;
|
|
226
|
+
deleteCol: () => ReturnType;
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
|
|
218
232
|
declare module '@tiptap/core' {
|
|
219
233
|
interface Commands<ReturnType> {
|
|
220
234
|
search: {
|
|
@@ -230,20 +244,6 @@ declare module '@tiptap/core' {
|
|
|
230
244
|
}
|
|
231
245
|
|
|
232
246
|
|
|
233
|
-
declare module '@tiptap/core' {
|
|
234
|
-
interface Commands<ReturnType> {
|
|
235
|
-
columns: {
|
|
236
|
-
insertColumns: (attrs?: {
|
|
237
|
-
cols: number;
|
|
238
|
-
}) => ReturnType;
|
|
239
|
-
addColBefore: () => ReturnType;
|
|
240
|
-
addColAfter: () => ReturnType;
|
|
241
|
-
deleteCol: () => ReturnType;
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
|
|
247
247
|
declare module '@tiptap/core' {
|
|
248
248
|
interface Commands<ReturnType> {
|
|
249
249
|
tableOfContents: {
|
package/lib/TableOfContent.d.ts
CHANGED
|
@@ -51,8 +51,11 @@ declare module '@tiptap/core' {
|
|
|
51
51
|
|
|
52
52
|
declare module '@tiptap/core' {
|
|
53
53
|
interface Commands<ReturnType> {
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
emoji: {
|
|
55
|
+
setEmoji: (emoji: {
|
|
56
|
+
name: string;
|
|
57
|
+
emoji: string;
|
|
58
|
+
}) => ReturnType;
|
|
56
59
|
};
|
|
57
60
|
}
|
|
58
61
|
}
|
|
@@ -60,11 +63,8 @@ declare module '@tiptap/core' {
|
|
|
60
63
|
|
|
61
64
|
declare module '@tiptap/core' {
|
|
62
65
|
interface Commands<ReturnType> {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
name: string;
|
|
66
|
-
emoji: string;
|
|
67
|
-
}) => ReturnType;
|
|
66
|
+
excalidraw: {
|
|
67
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
}
|
|
@@ -115,21 +115,6 @@ declare module '@tiptap/core' {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
|
|
118
|
-
declare module '@tiptap/core' {
|
|
119
|
-
interface Commands<ReturnType> {
|
|
120
|
-
iframe: {
|
|
121
|
-
/**
|
|
122
|
-
* Add an iframe
|
|
123
|
-
*/
|
|
124
|
-
setIframe: (options: {
|
|
125
|
-
src: string;
|
|
126
|
-
service: string;
|
|
127
|
-
}) => ReturnType;
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
133
118
|
declare module '@tiptap/core' {
|
|
134
119
|
interface Commands<ReturnType> {
|
|
135
120
|
imageUpload: {
|
|
@@ -150,6 +135,21 @@ declare module '@tiptap/core' {
|
|
|
150
135
|
}
|
|
151
136
|
|
|
152
137
|
|
|
138
|
+
declare module '@tiptap/core' {
|
|
139
|
+
interface Commands<ReturnType> {
|
|
140
|
+
iframe: {
|
|
141
|
+
/**
|
|
142
|
+
* Add an iframe
|
|
143
|
+
*/
|
|
144
|
+
setIframe: (options: {
|
|
145
|
+
src: string;
|
|
146
|
+
service: string;
|
|
147
|
+
}) => ReturnType;
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
|
|
153
153
|
declare module '@tiptap/core' {
|
|
154
154
|
interface Commands<ReturnType> {
|
|
155
155
|
imageGifUpload: {
|
|
@@ -188,9 +188,8 @@ declare module '@tiptap/core' {
|
|
|
188
188
|
|
|
189
189
|
declare module '@tiptap/core' {
|
|
190
190
|
interface Commands<ReturnType> {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
unsetLineHeight: () => ReturnType;
|
|
191
|
+
katex: {
|
|
192
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
194
193
|
};
|
|
195
194
|
}
|
|
196
195
|
}
|
|
@@ -198,8 +197,9 @@ declare module '@tiptap/core' {
|
|
|
198
197
|
|
|
199
198
|
declare module '@tiptap/core' {
|
|
200
199
|
interface Commands<ReturnType> {
|
|
201
|
-
|
|
202
|
-
|
|
200
|
+
lineHeight: {
|
|
201
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
202
|
+
unsetLineHeight: () => ReturnType;
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
205
|
}
|
|
@@ -215,6 +215,20 @@ declare module '@tiptap/core' {
|
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
|
|
218
|
+
declare module '@tiptap/core' {
|
|
219
|
+
interface Commands<ReturnType> {
|
|
220
|
+
columns: {
|
|
221
|
+
insertColumns: (attrs?: {
|
|
222
|
+
cols: number;
|
|
223
|
+
}) => ReturnType;
|
|
224
|
+
addColBefore: () => ReturnType;
|
|
225
|
+
addColAfter: () => ReturnType;
|
|
226
|
+
deleteCol: () => ReturnType;
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
|
|
218
232
|
declare module '@tiptap/core' {
|
|
219
233
|
interface Commands<ReturnType> {
|
|
220
234
|
search: {
|
|
@@ -230,20 +244,6 @@ declare module '@tiptap/core' {
|
|
|
230
244
|
}
|
|
231
245
|
|
|
232
246
|
|
|
233
|
-
declare module '@tiptap/core' {
|
|
234
|
-
interface Commands<ReturnType> {
|
|
235
|
-
columns: {
|
|
236
|
-
insertColumns: (attrs?: {
|
|
237
|
-
cols: number;
|
|
238
|
-
}) => ReturnType;
|
|
239
|
-
addColBefore: () => ReturnType;
|
|
240
|
-
addColAfter: () => ReturnType;
|
|
241
|
-
deleteCol: () => ReturnType;
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
|
|
247
247
|
declare module '@tiptap/core' {
|
|
248
248
|
interface Commands<ReturnType> {
|
|
249
249
|
tableOfContents: {
|
package/lib/TableOfContent.js
CHANGED
|
@@ -3,7 +3,7 @@ import { N as C, c as g, R as N } from "./dom-dataset-Di3tIRrR.js";
|
|
|
3
3
|
import { jsx as l, jsxs as T } from "react/jsx-runtime";
|
|
4
4
|
import { useState as p, useCallback as m, useEffect as d } from "react";
|
|
5
5
|
import { u as O } from "./index-CsK90iVd.js";
|
|
6
|
-
import { Z as _, A as y } from "./RichTextEditor-
|
|
6
|
+
import { Z as _, A as y } from "./RichTextEditor-BQN2eLD_.js";
|
|
7
7
|
const x = "_toc_aag8a_1", A = "_visible_aag8a_7", w = "_list_aag8a_11", E = "_item_aag8a_16", f = {
|
|
8
8
|
toc: x,
|
|
9
9
|
visible: A,
|
package/lib/TaskList.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-ByRfqzMr.cjs"),b=require("./RichTextEditor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-ByRfqzMr.cjs"),b=require("./RichTextEditor-C8Sm1E6J.cjs"),f=/^\s*(\[([( |x])?\])\s$/,L=o.Node.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const i=t.getAttribute("data-checked");return i===""||i==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:i}){return["li",o.mergeAttributes(this.options.HTMLAttributes,i,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:i,getPos:c,editor:a})=>{const r=document.createElement("li"),d=document.createElement("label"),k=document.createElement("span"),s=document.createElement("input"),l=document.createElement("div"),p=()=>{var e,n;s.ariaLabel=((n=(e=this.options.a11y)===null||e===void 0?void 0:e.checkboxLabel)===null||n===void 0?void 0:n.call(e,t,s.checked))||`Task item checkbox for ${t.textContent||"empty task item"}`};return p(),d.contentEditable="false",s.type="checkbox",s.addEventListener("mousedown",e=>e.preventDefault()),s.addEventListener("change",e=>{if(!a.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}const{checked:n}=e.target;a.isEditable&&typeof c=="function"&&a.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:m})=>{const u=c();if(typeof u!="number")return!1;const h=m.doc.nodeAt(u);return m.setNodeMarkup(u,void 0,{...h==null?void 0:h.attrs,checked:n}),!0}).run(),!a.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,n)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([e,n])=>{r.setAttribute(e,n)}),r.dataset.checked=t.attrs.checked,s.checked=t.attrs.checked,d.append(s,k),r.append(d,l),Object.entries(i).forEach(([e,n])=>{r.setAttribute(e,n)}),{dom:r,contentDOM:l,update:e=>e.type!==this.type?!1:(r.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,p(),!0)}}},addInputRules(){return[o.wrappingInputRule({find:f,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),y=o.Node.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",o.mergeAttributes(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),T=y.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),HTMLAttributes:{class:"task-list"},taskItem:{HTMLAttributes:{class:"task-list-item"}},button:({editor:i,t:c,extension:a})=>({component:b.ActionButton,componentProps:{action:()=>i.commands.toggleTaskList(),isActive:()=>i.isActive("taskList")||!1,disabled:!1,icon:"ListTodo",shortcutKeys:a.options.shortcutKeys??["shift","mod","9"],tooltip:c("editor.tasklist.tooltip")}})}},addExtensions(){return[L.configure(this.options.taskItem)]}});exports.TaskList=T;
|
package/lib/TaskList.d.cts
CHANGED
|
@@ -128,8 +128,11 @@ declare module '@tiptap/core' {
|
|
|
128
128
|
|
|
129
129
|
declare module '@tiptap/core' {
|
|
130
130
|
interface Commands<ReturnType> {
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
emoji: {
|
|
132
|
+
setEmoji: (emoji: {
|
|
133
|
+
name: string;
|
|
134
|
+
emoji: string;
|
|
135
|
+
}) => ReturnType;
|
|
133
136
|
};
|
|
134
137
|
}
|
|
135
138
|
}
|
|
@@ -137,11 +140,8 @@ declare module '@tiptap/core' {
|
|
|
137
140
|
|
|
138
141
|
declare module '@tiptap/core' {
|
|
139
142
|
interface Commands<ReturnType> {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
name: string;
|
|
143
|
-
emoji: string;
|
|
144
|
-
}) => ReturnType;
|
|
143
|
+
excalidraw: {
|
|
144
|
+
setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
147
|
}
|
|
@@ -192,21 +192,6 @@ declare module '@tiptap/core' {
|
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
|
|
195
|
-
declare module '@tiptap/core' {
|
|
196
|
-
interface Commands<ReturnType> {
|
|
197
|
-
iframe: {
|
|
198
|
-
/**
|
|
199
|
-
* Add an iframe
|
|
200
|
-
*/
|
|
201
|
-
setIframe: (options: {
|
|
202
|
-
src: string;
|
|
203
|
-
service: string;
|
|
204
|
-
}) => ReturnType;
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
|
|
210
195
|
declare module '@tiptap/core' {
|
|
211
196
|
interface Commands<ReturnType> {
|
|
212
197
|
imageUpload: {
|
|
@@ -227,6 +212,21 @@ declare module '@tiptap/core' {
|
|
|
227
212
|
}
|
|
228
213
|
|
|
229
214
|
|
|
215
|
+
declare module '@tiptap/core' {
|
|
216
|
+
interface Commands<ReturnType> {
|
|
217
|
+
iframe: {
|
|
218
|
+
/**
|
|
219
|
+
* Add an iframe
|
|
220
|
+
*/
|
|
221
|
+
setIframe: (options: {
|
|
222
|
+
src: string;
|
|
223
|
+
service: string;
|
|
224
|
+
}) => ReturnType;
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
|
|
230
230
|
declare module '@tiptap/core' {
|
|
231
231
|
interface Commands<ReturnType> {
|
|
232
232
|
imageGifUpload: {
|
|
@@ -265,9 +265,8 @@ declare module '@tiptap/core' {
|
|
|
265
265
|
|
|
266
266
|
declare module '@tiptap/core' {
|
|
267
267
|
interface Commands<ReturnType> {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
unsetLineHeight: () => ReturnType;
|
|
268
|
+
katex: {
|
|
269
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
271
270
|
};
|
|
272
271
|
}
|
|
273
272
|
}
|
|
@@ -275,8 +274,9 @@ declare module '@tiptap/core' {
|
|
|
275
274
|
|
|
276
275
|
declare module '@tiptap/core' {
|
|
277
276
|
interface Commands<ReturnType> {
|
|
278
|
-
|
|
279
|
-
|
|
277
|
+
lineHeight: {
|
|
278
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
279
|
+
unsetLineHeight: () => ReturnType;
|
|
280
280
|
};
|
|
281
281
|
}
|
|
282
282
|
}
|
|
@@ -292,6 +292,20 @@ declare module '@tiptap/core' {
|
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
|
|
295
|
+
declare module '@tiptap/core' {
|
|
296
|
+
interface Commands<ReturnType> {
|
|
297
|
+
columns: {
|
|
298
|
+
insertColumns: (attrs?: {
|
|
299
|
+
cols: number;
|
|
300
|
+
}) => ReturnType;
|
|
301
|
+
addColBefore: () => ReturnType;
|
|
302
|
+
addColAfter: () => ReturnType;
|
|
303
|
+
deleteCol: () => ReturnType;
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
|
|
295
309
|
declare module '@tiptap/core' {
|
|
296
310
|
interface Commands<ReturnType> {
|
|
297
311
|
search: {
|
|
@@ -307,20 +321,6 @@ declare module '@tiptap/core' {
|
|
|
307
321
|
}
|
|
308
322
|
|
|
309
323
|
|
|
310
|
-
declare module '@tiptap/core' {
|
|
311
|
-
interface Commands<ReturnType> {
|
|
312
|
-
columns: {
|
|
313
|
-
insertColumns: (attrs?: {
|
|
314
|
-
cols: number;
|
|
315
|
-
}) => ReturnType;
|
|
316
|
-
addColBefore: () => ReturnType;
|
|
317
|
-
addColAfter: () => ReturnType;
|
|
318
|
-
deleteCol: () => ReturnType;
|
|
319
|
-
};
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
|
|
324
324
|
declare module '@tiptap/core' {
|
|
325
325
|
interface Commands<ReturnType> {
|
|
326
326
|
tableOfContents: {
|