reactjs-tiptap-editor 0.3.21 → 0.3.22
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-BTFBZyG2.cjs → ActionMenuButton-B81uYOvt.cjs} +1 -1
- package/lib/{ActionMenuButton-DXwnYZhJ.js → ActionMenuButton-CtcDNq-L.js} +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-CVuwyG50.js → Drawer-BI_9XSqI.js} +1 -1
- package/lib/{Drawer-BrHHs2E9.cjs → Drawer-CHGZ5D6j.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 +116 -109
- package/lib/{Excalidraw-frMX4K62.js → Excalidraw-AIzEaOzF.js} +1 -1
- package/lib/{Excalidraw-Be_GDV4Q.cjs → Excalidraw-DOJiMnFl.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 +41 -41
- package/lib/ImageGif.d.ts +41 -41
- 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-DjTnd5Uu.js → RichTextEditor-CtxIf8pq.js} +5 -2
- package/lib/{RichTextEditor-CAxwVWUE.cjs → RichTextEditor-DtxJlApT.cjs} +5 -2
- 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-dRxbZOad.js → Twitter-CJIud-WM.js} +1 -1
- package/lib/{Twitter-V0OzBT_E.cjs → Twitter-DBA28WG3.cjs} +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-BsJTSgT-.cjs → textarea-9iN67tad.cjs} +1 -1
- package/lib/{textarea-6c8drwXJ.js → textarea-BhTw-eGz.js} +1 -1
- package/package.json +2 -2
package/lib/Mention.d.ts
CHANGED
|
@@ -39,11 +39,9 @@ declare module '@tiptap/core' {
|
|
|
39
39
|
|
|
40
40
|
declare module '@tiptap/core' {
|
|
41
41
|
interface Commands<ReturnType> {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
emoji: string;
|
|
46
|
-
}) => ReturnType;
|
|
42
|
+
drawer: {
|
|
43
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
44
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
47
45
|
};
|
|
48
46
|
}
|
|
49
47
|
}
|
|
@@ -51,9 +49,11 @@ declare module '@tiptap/core' {
|
|
|
51
49
|
|
|
52
50
|
declare module '@tiptap/core' {
|
|
53
51
|
interface Commands<ReturnType> {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
emoji: {
|
|
53
|
+
setEmoji: (emoji: {
|
|
54
|
+
name: string;
|
|
55
|
+
emoji: string;
|
|
56
|
+
}) => ReturnType;
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
}
|
|
@@ -104,6 +104,21 @@ declare module '@tiptap/core' {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
|
|
107
|
+
declare module '@tiptap/core' {
|
|
108
|
+
interface Commands<ReturnType> {
|
|
109
|
+
iframe: {
|
|
110
|
+
/**
|
|
111
|
+
* Add an iframe
|
|
112
|
+
*/
|
|
113
|
+
setIframe: (options: {
|
|
114
|
+
src: string;
|
|
115
|
+
service: string;
|
|
116
|
+
}) => ReturnType;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
|
|
107
122
|
declare module '@tiptap/core' {
|
|
108
123
|
interface Commands<ReturnType> {
|
|
109
124
|
imageUpload: {
|
|
@@ -124,21 +139,6 @@ declare module '@tiptap/core' {
|
|
|
124
139
|
}
|
|
125
140
|
|
|
126
141
|
|
|
127
|
-
declare module '@tiptap/core' {
|
|
128
|
-
interface Commands<ReturnType> {
|
|
129
|
-
iframe: {
|
|
130
|
-
/**
|
|
131
|
-
* Add an iframe
|
|
132
|
-
*/
|
|
133
|
-
setIframe: (options: {
|
|
134
|
-
src: string;
|
|
135
|
-
service: string;
|
|
136
|
-
}) => ReturnType;
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
142
|
declare module '@tiptap/core' {
|
|
143
143
|
interface Commands<ReturnType> {
|
|
144
144
|
imageGifUpload: {
|
|
@@ -177,9 +177,8 @@ declare module '@tiptap/core' {
|
|
|
177
177
|
|
|
178
178
|
declare module '@tiptap/core' {
|
|
179
179
|
interface Commands<ReturnType> {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
unsetLineHeight: () => ReturnType;
|
|
180
|
+
katex: {
|
|
181
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
183
182
|
};
|
|
184
183
|
}
|
|
185
184
|
}
|
|
@@ -187,8 +186,9 @@ declare module '@tiptap/core' {
|
|
|
187
186
|
|
|
188
187
|
declare module '@tiptap/core' {
|
|
189
188
|
interface Commands<ReturnType> {
|
|
190
|
-
|
|
191
|
-
|
|
189
|
+
lineHeight: {
|
|
190
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
191
|
+
unsetLineHeight: () => ReturnType;
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
194
|
}
|
|
@@ -245,14 +245,15 @@ declare module '@tiptap/core' {
|
|
|
245
245
|
|
|
246
246
|
declare module '@tiptap/core' {
|
|
247
247
|
interface Commands<ReturnType> {
|
|
248
|
-
|
|
248
|
+
video: {
|
|
249
249
|
/**
|
|
250
|
-
*
|
|
251
|
-
* @param options The tweet attributes
|
|
252
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
250
|
+
* Add an video
|
|
253
251
|
*/
|
|
254
|
-
|
|
255
|
-
|
|
252
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
253
|
+
/**
|
|
254
|
+
* Update an video
|
|
255
|
+
*/
|
|
256
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
256
257
|
};
|
|
257
258
|
}
|
|
258
259
|
}
|
|
@@ -260,15 +261,14 @@ declare module '@tiptap/core' {
|
|
|
260
261
|
|
|
261
262
|
declare module '@tiptap/core' {
|
|
262
263
|
interface Commands<ReturnType> {
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* Add an video
|
|
266
|
-
*/
|
|
267
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
264
|
+
twitter: {
|
|
268
265
|
/**
|
|
269
|
-
*
|
|
266
|
+
* Insert a tweet
|
|
267
|
+
* @param options The tweet attributes
|
|
268
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
270
269
|
*/
|
|
271
|
-
|
|
270
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
271
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
274
|
}
|
package/lib/Mermaid.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var W=Object.create;var G=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var Z=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var J=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of U(e))!Y.call(t,l)&&l!==r&&G(t,l,{get:()=>e[l],enumerable:!(a=X(e,l))||a.enumerable});return t};var K=(t,e,r)=>(r=t!=null?W(Z(t)):{},J(e||!t||!t.__esModule?G(r,"default",{value:t,enumerable:!0}):r,t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("./index-ByRfqzMr.cjs"),u=require("./RichTextEditor-
|
|
1
|
+
"use strict";var W=Object.create;var G=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var U=Object.getOwnPropertyNames;var Z=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var J=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of U(e))!Y.call(t,l)&&l!==r&&G(t,l,{get:()=>e[l],enumerable:!(a=X(e,l))||a.enumerable});return t};var K=(t,e,r)=>(r=t!=null?W(Z(t)):{},J(e||!t||!t.__esModule?G(r,"default",{value:t,enumerable:!0}):r,t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("./index-ByRfqzMr.cjs"),u=require("./RichTextEditor-DtxJlApT.cjs"),F=require("./dom-dataset-Byuf1YmW.cjs"),o=require("react/jsx-runtime"),s=require("react"),P=require("./shortId-Bfj8TyNr.cjs"),Q=require("./textarea-9iN67tad.cjs"),S=require("./index-C19MB4Al.cjs"),$=`graph TB
|
|
2
2
|
a-->b`,ee=({editor:t,upload:e})=>{const[r,a]=s.useState($),[l,v]=s.useState(""),[T,y]=s.useState(!1),A=s.useRef(null),[d,h]=s.useState(null),E=s.useCallback(c=>{c&&import("mermaid").then(x=>{h(x.default)})},[]),_=async c=>{try{const{svg:x}=await d.render("mermaid-svg",c);v(x)}catch{v("")}},L=()=>{d.initialize({darkMode:!1,startOnLoad:!1,fontSize:12,theme:"base"}),_(r)};s.useEffect(()=>{d&&T&&L()},[d,T]),s.useEffect(()=>{d&&T&&_(r)},[d&&r]);const R=async()=>{if(r!==""){if(r){const c=A.current.querySelector("svg"),{width:x,height:j}=c.getBoundingClientRect(),I=`mermaid-${P.shortId()}.svg`;let M=P.i(c.outerHTML);if(e){console.log({src:M});const H=u.dataURLtoFile(M,I);M=await e(H)}t==null||t.chain().focus().setMermaid({type:"mermaid",src:M,alt:encodeURIComponent(r),width:x,height:j},!!r).run()}y(!1)}};return o.jsxs(u.Dialog,{onOpenChange:y,open:T,children:[o.jsx(u.DialogTrigger,{asChild:!0,children:o.jsx(u.ActionButton,{action:()=>y(!0),icon:"Mermaid",tooltip:"Mermaid"})}),o.jsxs(u.DialogContent,{className:"richtext-z-[99999] !richtext-max-w-[1300px]",children:[o.jsx(u.DialogTitle,{children:"Mermaid"}),o.jsx("div",{ref:E,style:{height:"100%",border:"1px solid hsl(var(--border))"},children:o.jsxs("div",{className:"richtext-flex richtext-gap-[10px] richtext-rounded-[10px] richtext-p-[10px]",children:[o.jsx(Q.Textarea,{autoFocus:!0,className:"richtext-flex-1",defaultValue:$,onChange:c=>a(c.target.value),placeholder:"Text",required:!0,rows:10,value:r,style:{color:"hsl(var(--richtext-foreground))"}}),o.jsx("div",{className:"richtext-flex richtext-flex-1 richtext-items-center richtext-justify-center richtext-rounded-[10px] richtext-p-[10px]",dangerouslySetInnerHTML:{__html:l},ref:A,style:{height:"100%",borderWidth:1,minHeight:500,background:"#fff"}})]})}),o.jsx(u.DialogFooter,{children:o.jsx(u.Button,{onClick:R,type:"button",children:"Save changes"})})]})]})},O={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"};function te({editor:t,node:e,updateAttributes:r,getPos:a,selected:l}){const[v,T]=s.useState({width:S.IMAGE_MAX_SIZE,height:S.IMAGE_MAX_SIZE}),[y,A]=s.useState({width:0,height:0}),[d]=s.useState([O.TOP_LEFT,O.TOP_RIGHT,O.BOTTOM_LEFT,O.BOTTOM_RIGHT]),[h,E]=s.useState(!1),[_,L]=s.useState({x:0,y:0,w:0,h:0,dir:""}),{align:R}=e==null?void 0:e.attrs,c=s.useMemo(()=>{const{src:i,alt:m,width:f,height:b}=e==null?void 0:e.attrs,w=q.isNumber(f)?`${f}px`:f,n=q.isNumber(b)?`${b}px`:b;return{src:i||void 0,alt:m||void 0,style:{width:w||void 0,height:n||void 0}}},[e==null?void 0:e.attrs]),x=s.useMemo(()=>{const{style:{width:i}}=c;return{width:i==="100%"?i:void 0}},[c]);function j(i){A({width:i.target.width,height:i.target.height})}function I(){t.commands.setNodeSelection(a())}const M=s.useCallback(u.throttle(()=>{const{width:i}=getComputedStyle(t.view.dom);T(m=>({...m,width:Number.parseInt(i,10)}))},S.IMAGE_THROTTLE_WAIT_TIME),[t]);function H(i,m){i.preventDefault(),i.stopPropagation();const f=y.width,b=y.height,w=f/b;let n=Number(e.attrs.width),p=Number(e.attrs.height);const g=v.width;n&&!p?(n=n>g?g:n,p=Math.round(n/w)):p&&!n?(n=Math.round(p*w),n=n>g?g:n):!n&&!p?(n=f>g?g:f,p=Math.round(n/w)):n=n>g?g:n,E(!0),L({x:i.clientX,y:i.clientY,w:n,h:p,dir:m})}const N=s.useCallback(u.throttle(i=>{if(i.preventDefault(),i.stopPropagation(),!h)return;const{x:m,w:f,dir:b}=_,w=(i.clientX-m)*(/l/.test(b)?-1:1),{width:n,height:p}=e==null?void 0:e.attrs,g=n/p,B=u.clamp(f+w,S.IMAGE_MIN_SIZE,v.width),V=Math.round(B/g);r({width:B,height:V})},S.IMAGE_THROTTLE_WAIT_TIME),[h,_,v,r,e==null?void 0:e.attrs]),C=s.useCallback(i=>{i.preventDefault(),i.stopPropagation(),h&&(L({x:0,y:0,w:0,h:0,dir:""}),E(!1),I())},[h,I]),D=s.useCallback(()=>{document==null||document.addEventListener("mousemove",N,!0),document==null||document.addEventListener("mouseup",C,!0)},[N,C]),z=s.useCallback(()=>{document==null||document.removeEventListener("mousemove",N,!0),document==null||document.removeEventListener("mouseup",C,!0)},[N,C]);s.useEffect(()=>(h?D():z(),()=>{z()}),[h,D,z]);const k=s.useMemo(()=>new ResizeObserver(()=>M()),[M]);return s.useEffect(()=>(k.observe(t.view.dom),()=>{k.disconnect()}),[t.view.dom,k]),o.jsx(F.NodeViewWrapper,{className:"image-view",style:{...x,width:"100%",textAlign:R},children:o.jsxs("div",{"data-drag-handle":!0,draggable:"true",style:{...x,background:"#fff"},className:`image-view__body ${l?"image-view__body--focused":""} ${h?"image-view__body--resizing":""}`,children:[o.jsx("img",{alt:c.alt,className:"image-view__body__image block",height:"auto",onClick:I,onLoad:j,src:c.src,style:c.style}),t.view.editable&&(l||h)&&o.jsx("div",{className:"image-resizer",children:d==null?void 0:d.map(i=>o.jsx("span",{className:`image-resizer__handler image-resizer__handler--${i}`,onMouseDown:m=>H(m,i)},`image-dir-${i}`))})]})})}const re=u.Image.extend({name:"mermaid",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),inline:!1,content:"",marks:"",group:"block",draggable:!1,selectable:!0,atom:!0,HTMLAttributes:{class:"mermaid"},button:({editor:e,t:r,extension:a})=>{var l;return{component:ee,componentProps:{action:()=>!0,isActive:()=>!1,disabled:!1,editor:e,icon:"Mermaid",tooltip:r("editor.mermaid.tooltip"),upload:(l=a==null?void 0:a.options)==null?void 0:l.upload}}}}},addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),width:{default:null,parseHTML:e=>{const r=e.querySelector("img"),a=r==null?void 0:r.getAttribute("width");return a?Number.parseInt(a,10):320},renderHTML:e=>({width:e.width})},height:{default:null,parseHTML:e=>{const r=e.querySelector("img"),a=r==null?void 0:r.getAttribute("height");return a?Number.parseInt(a,10):212},renderHTML:e=>({height:e.height})},align:{default:"center",parseHTML:e=>e.getAttribute("align"),renderHTML:e=>({align:e.align})}}},addNodeView(){return F.ReactNodeViewRenderer(te)},addCommands(){return{setMermaid:(t,e)=>({commands:r,editor:a})=>e?r.insertContent({type:this.name,attrs:t}):r.insertContentAt(a.state.selection.anchor,{type:this.name,attrs:t}),setAlignImageMermaid:t=>({commands:e})=>e.updateAttributes(this.name,{align:t})}},renderHTML({HTMLAttributes:t}){const{align:e}=t;return["div",{style:e?`text-align: ${e};`:"",class:"imageMermaid"},["img",q.mergeAttributes(this.options.HTMLAttributes,t)]]},parseHTML(){return[{tag:"div[class=imageMermaid]",getAttrs:t=>{const e=t.querySelector("img"),r=e==null?void 0:e.getAttribute("width"),a=e==null?void 0:e.getAttribute("height");return{src:e==null?void 0:e.getAttribute("src"),alt:e==null?void 0:e.getAttribute("alt"),width:r?Number.parseInt(r,10):null,height:a?Number.parseInt(a,10):null,align:(e==null?void 0:e.getAttribute("align"))||t.style.textAlign||null}}}]}});exports.Mermaid=re;
|
package/lib/Mermaid.d.cts
CHANGED
|
@@ -111,11 +111,9 @@ declare module '@tiptap/core' {
|
|
|
111
111
|
|
|
112
112
|
declare module '@tiptap/core' {
|
|
113
113
|
interface Commands<ReturnType> {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
emoji: string;
|
|
118
|
-
}) => ReturnType;
|
|
114
|
+
drawer: {
|
|
115
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
116
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
119
117
|
};
|
|
120
118
|
}
|
|
121
119
|
}
|
|
@@ -123,9 +121,11 @@ declare module '@tiptap/core' {
|
|
|
123
121
|
|
|
124
122
|
declare module '@tiptap/core' {
|
|
125
123
|
interface Commands<ReturnType> {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
124
|
+
emoji: {
|
|
125
|
+
setEmoji: (emoji: {
|
|
126
|
+
name: string;
|
|
127
|
+
emoji: string;
|
|
128
|
+
}) => ReturnType;
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
131
|
}
|
|
@@ -176,6 +176,21 @@ declare module '@tiptap/core' {
|
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
|
|
179
|
+
declare module '@tiptap/core' {
|
|
180
|
+
interface Commands<ReturnType> {
|
|
181
|
+
iframe: {
|
|
182
|
+
/**
|
|
183
|
+
* Add an iframe
|
|
184
|
+
*/
|
|
185
|
+
setIframe: (options: {
|
|
186
|
+
src: string;
|
|
187
|
+
service: string;
|
|
188
|
+
}) => ReturnType;
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
|
|
179
194
|
declare module '@tiptap/core' {
|
|
180
195
|
interface Commands<ReturnType> {
|
|
181
196
|
imageUpload: {
|
|
@@ -196,21 +211,6 @@ declare module '@tiptap/core' {
|
|
|
196
211
|
}
|
|
197
212
|
|
|
198
213
|
|
|
199
|
-
declare module '@tiptap/core' {
|
|
200
|
-
interface Commands<ReturnType> {
|
|
201
|
-
iframe: {
|
|
202
|
-
/**
|
|
203
|
-
* Add an iframe
|
|
204
|
-
*/
|
|
205
|
-
setIframe: (options: {
|
|
206
|
-
src: string;
|
|
207
|
-
service: string;
|
|
208
|
-
}) => ReturnType;
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
|
|
214
214
|
declare module '@tiptap/core' {
|
|
215
215
|
interface Commands<ReturnType> {
|
|
216
216
|
imageGifUpload: {
|
|
@@ -249,9 +249,8 @@ declare module '@tiptap/core' {
|
|
|
249
249
|
|
|
250
250
|
declare module '@tiptap/core' {
|
|
251
251
|
interface Commands<ReturnType> {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
unsetLineHeight: () => ReturnType;
|
|
252
|
+
katex: {
|
|
253
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
255
254
|
};
|
|
256
255
|
}
|
|
257
256
|
}
|
|
@@ -259,8 +258,9 @@ declare module '@tiptap/core' {
|
|
|
259
258
|
|
|
260
259
|
declare module '@tiptap/core' {
|
|
261
260
|
interface Commands<ReturnType> {
|
|
262
|
-
|
|
263
|
-
|
|
261
|
+
lineHeight: {
|
|
262
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
263
|
+
unsetLineHeight: () => ReturnType;
|
|
264
264
|
};
|
|
265
265
|
}
|
|
266
266
|
}
|
|
@@ -317,14 +317,15 @@ declare module '@tiptap/core' {
|
|
|
317
317
|
|
|
318
318
|
declare module '@tiptap/core' {
|
|
319
319
|
interface Commands<ReturnType> {
|
|
320
|
-
|
|
320
|
+
video: {
|
|
321
321
|
/**
|
|
322
|
-
*
|
|
323
|
-
* @param options The tweet attributes
|
|
324
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
322
|
+
* Add an video
|
|
325
323
|
*/
|
|
326
|
-
|
|
327
|
-
|
|
324
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
325
|
+
/**
|
|
326
|
+
* Update an video
|
|
327
|
+
*/
|
|
328
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
328
329
|
};
|
|
329
330
|
}
|
|
330
331
|
}
|
|
@@ -332,15 +333,14 @@ declare module '@tiptap/core' {
|
|
|
332
333
|
|
|
333
334
|
declare module '@tiptap/core' {
|
|
334
335
|
interface Commands<ReturnType> {
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
* Add an video
|
|
338
|
-
*/
|
|
339
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
336
|
+
twitter: {
|
|
340
337
|
/**
|
|
341
|
-
*
|
|
338
|
+
* Insert a tweet
|
|
339
|
+
* @param options The tweet attributes
|
|
340
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
342
341
|
*/
|
|
343
|
-
|
|
342
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
343
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
344
344
|
};
|
|
345
345
|
}
|
|
346
346
|
}
|
package/lib/Mermaid.d.ts
CHANGED
|
@@ -111,11 +111,9 @@ declare module '@tiptap/core' {
|
|
|
111
111
|
|
|
112
112
|
declare module '@tiptap/core' {
|
|
113
113
|
interface Commands<ReturnType> {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
emoji: string;
|
|
118
|
-
}) => ReturnType;
|
|
114
|
+
drawer: {
|
|
115
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
116
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
119
117
|
};
|
|
120
118
|
}
|
|
121
119
|
}
|
|
@@ -123,9 +121,11 @@ declare module '@tiptap/core' {
|
|
|
123
121
|
|
|
124
122
|
declare module '@tiptap/core' {
|
|
125
123
|
interface Commands<ReturnType> {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
124
|
+
emoji: {
|
|
125
|
+
setEmoji: (emoji: {
|
|
126
|
+
name: string;
|
|
127
|
+
emoji: string;
|
|
128
|
+
}) => ReturnType;
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
131
|
}
|
|
@@ -176,6 +176,21 @@ declare module '@tiptap/core' {
|
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
|
|
179
|
+
declare module '@tiptap/core' {
|
|
180
|
+
interface Commands<ReturnType> {
|
|
181
|
+
iframe: {
|
|
182
|
+
/**
|
|
183
|
+
* Add an iframe
|
|
184
|
+
*/
|
|
185
|
+
setIframe: (options: {
|
|
186
|
+
src: string;
|
|
187
|
+
service: string;
|
|
188
|
+
}) => ReturnType;
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
|
|
179
194
|
declare module '@tiptap/core' {
|
|
180
195
|
interface Commands<ReturnType> {
|
|
181
196
|
imageUpload: {
|
|
@@ -196,21 +211,6 @@ declare module '@tiptap/core' {
|
|
|
196
211
|
}
|
|
197
212
|
|
|
198
213
|
|
|
199
|
-
declare module '@tiptap/core' {
|
|
200
|
-
interface Commands<ReturnType> {
|
|
201
|
-
iframe: {
|
|
202
|
-
/**
|
|
203
|
-
* Add an iframe
|
|
204
|
-
*/
|
|
205
|
-
setIframe: (options: {
|
|
206
|
-
src: string;
|
|
207
|
-
service: string;
|
|
208
|
-
}) => ReturnType;
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
|
|
214
214
|
declare module '@tiptap/core' {
|
|
215
215
|
interface Commands<ReturnType> {
|
|
216
216
|
imageGifUpload: {
|
|
@@ -249,9 +249,8 @@ declare module '@tiptap/core' {
|
|
|
249
249
|
|
|
250
250
|
declare module '@tiptap/core' {
|
|
251
251
|
interface Commands<ReturnType> {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
unsetLineHeight: () => ReturnType;
|
|
252
|
+
katex: {
|
|
253
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
255
254
|
};
|
|
256
255
|
}
|
|
257
256
|
}
|
|
@@ -259,8 +258,9 @@ declare module '@tiptap/core' {
|
|
|
259
258
|
|
|
260
259
|
declare module '@tiptap/core' {
|
|
261
260
|
interface Commands<ReturnType> {
|
|
262
|
-
|
|
263
|
-
|
|
261
|
+
lineHeight: {
|
|
262
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
263
|
+
unsetLineHeight: () => ReturnType;
|
|
264
264
|
};
|
|
265
265
|
}
|
|
266
266
|
}
|
|
@@ -317,14 +317,15 @@ declare module '@tiptap/core' {
|
|
|
317
317
|
|
|
318
318
|
declare module '@tiptap/core' {
|
|
319
319
|
interface Commands<ReturnType> {
|
|
320
|
-
|
|
320
|
+
video: {
|
|
321
321
|
/**
|
|
322
|
-
*
|
|
323
|
-
* @param options The tweet attributes
|
|
324
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
322
|
+
* Add an video
|
|
325
323
|
*/
|
|
326
|
-
|
|
327
|
-
|
|
324
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
325
|
+
/**
|
|
326
|
+
* Update an video
|
|
327
|
+
*/
|
|
328
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
328
329
|
};
|
|
329
330
|
}
|
|
330
331
|
}
|
|
@@ -332,15 +333,14 @@ declare module '@tiptap/core' {
|
|
|
332
333
|
|
|
333
334
|
declare module '@tiptap/core' {
|
|
334
335
|
interface Commands<ReturnType> {
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
* Add an video
|
|
338
|
-
*/
|
|
339
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
336
|
+
twitter: {
|
|
340
337
|
/**
|
|
341
|
-
*
|
|
338
|
+
* Insert a tweet
|
|
339
|
+
* @param options The tweet attributes
|
|
340
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
342
341
|
*/
|
|
343
|
-
|
|
342
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
343
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
344
344
|
};
|
|
345
345
|
}
|
|
346
346
|
}
|
package/lib/Mermaid.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { h as $, m as X } from "./index-DI9T3iLd.js";
|
|
2
|
-
import { w as Z, x as J, A as K, y as Y, z as Q, F as tt, B as et, G as rt, J as V, K as it, N as at } from "./RichTextEditor-
|
|
2
|
+
import { w as Z, x as J, A as K, y as Y, z as Q, F as tt, B as et, G as rt, J as V, K as it, N as at } from "./RichTextEditor-CtxIf8pq.js";
|
|
3
3
|
import { N as st, R as nt } from "./dom-dataset-Di3tIRrR.js";
|
|
4
4
|
import { jsxs as C, jsx as o } from "react/jsx-runtime";
|
|
5
5
|
import { useState as g, useRef as ot, useCallback as y, useEffect as E, useMemo as k } from "react";
|
|
6
6
|
import { s as lt, i as ct } from "./shortId-WJVkrvml.js";
|
|
7
|
-
import { T as ht } from "./textarea-
|
|
7
|
+
import { T as ht } from "./textarea-BhTw-eGz.js";
|
|
8
8
|
import { I as q, h as dt, i as W } from "./index-Tj3Ci7xM.js";
|
|
9
9
|
const j = `graph TB
|
|
10
10
|
a-->b`, ut = ({ editor: r, upload: t }) => {
|
package/lib/MoreMark.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index-ByRfqzMr.cjs"),l=require("./index-Z4b9rzn-.cjs"),c=require("react/jsx-runtime"),x=require("react"),s=require("./RichTextEditor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./index-ByRfqzMr.cjs"),l=require("./index-Z4b9rzn-.cjs"),c=require("react/jsx-runtime"),x=require("react"),s=require("./RichTextEditor-DtxJlApT.cjs");function b(t){var n;const i=x.useMemo(()=>{var r;const e=(r=t==null?void 0:t.items)==null?void 0:r.find(u=>u.isActive());return e&&!e.default?{...e,icon:e!=null&&e.icon?e==null?void 0:e.icon:t==null?void 0:t.icon}:{title:t.tooltip,icon:t.icon,isActive:()=>!1}},[t]);return c.jsxs(s.DropdownMenu,{children:[c.jsx(s.DropdownMenuTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:c.jsx(s.ActionButton,{customClass:"!richtext-w-12 richtext-h-12",disabled:t==null?void 0:t.disabled,icon:t==null?void 0:t.icon,tooltip:t==null?void 0:t.tooltip,children:c.jsx(s.MenuDown,{className:"richtext-size-3 richtext-text-gray-500"})})}),c.jsx(s.DropdownMenuContent,{className:"w-full",children:(n=t==null?void 0:t.items)==null?void 0:n.map((e,o)=>c.jsxs(s.DropdownMenuCheckboxItem,{checked:i.title===e.title,className:"richtext-flex richtext-items-center richtext-gap-3",onClick:e.action,children:[c.jsx(s.IconComponent,{name:e==null?void 0:e.icon}),c.jsx("span",{className:"richtext-ml-1",children:e.title}),!!(e!=null&&e.shortcutKeys)&&c.jsx("span",{className:"richtext-ml-auto richtext-text-xs richtext-tracking-widest richtext-opacity-60",children:s.getShortcutKeys(e.shortcutKeys)})]},`more-mark-${o}`))})]})}const m=h.Extension.create({name:"moreMark",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button({editor:i,extension:n,t:e}){const o=n.options.subscript,r=n.options.superscript,u={action:()=>i.commands.toggleSubscript(),isActive:()=>i.isActive("subscript")||!1,disabled:!i.can().toggleSubscript(),icon:"Subscript",title:e("editor.subscript.tooltip"),shortcutKeys:["mod","."]},d={action:()=>i.commands.toggleSuperscript(),isActive:()=>i.isActive("superscript")||!1,disabled:!i.can().toggleSuperscript(),icon:"Superscript",title:e("editor.superscript.tooltip"),shortcutKeys:["mod",","]},a=[];return o!==!1&&a.push(u),r!==!1&&a.push(d),{component:b,componentProps:{icon:"Type",tooltip:e("editor.moremark"),disabled:!i.isEditable,items:a}}}}},addExtensions(){const t=[];return this.options.subscript!==!1&&t.push(l.Subscript.configure(this.options.subscript)),this.options.superscript!==!1&&t.push(l.Superscript.configure(this.options.superscript)),t}});exports.MoreMark=m;
|
package/lib/MoreMark.d.cts
CHANGED
|
@@ -122,11 +122,9 @@ declare module '@tiptap/core' {
|
|
|
122
122
|
|
|
123
123
|
declare module '@tiptap/core' {
|
|
124
124
|
interface Commands<ReturnType> {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
emoji: string;
|
|
129
|
-
}) => ReturnType;
|
|
125
|
+
drawer: {
|
|
126
|
+
setDrawer: (options: any, replace?: any) => ReturnType;
|
|
127
|
+
setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
|
|
130
128
|
};
|
|
131
129
|
}
|
|
132
130
|
}
|
|
@@ -134,9 +132,11 @@ declare module '@tiptap/core' {
|
|
|
134
132
|
|
|
135
133
|
declare module '@tiptap/core' {
|
|
136
134
|
interface Commands<ReturnType> {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
135
|
+
emoji: {
|
|
136
|
+
setEmoji: (emoji: {
|
|
137
|
+
name: string;
|
|
138
|
+
emoji: string;
|
|
139
|
+
}) => ReturnType;
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
142
|
}
|
|
@@ -187,6 +187,21 @@ declare module '@tiptap/core' {
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
|
|
190
|
+
declare module '@tiptap/core' {
|
|
191
|
+
interface Commands<ReturnType> {
|
|
192
|
+
iframe: {
|
|
193
|
+
/**
|
|
194
|
+
* Add an iframe
|
|
195
|
+
*/
|
|
196
|
+
setIframe: (options: {
|
|
197
|
+
src: string;
|
|
198
|
+
service: string;
|
|
199
|
+
}) => ReturnType;
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
|
|
190
205
|
declare module '@tiptap/core' {
|
|
191
206
|
interface Commands<ReturnType> {
|
|
192
207
|
imageUpload: {
|
|
@@ -207,21 +222,6 @@ declare module '@tiptap/core' {
|
|
|
207
222
|
}
|
|
208
223
|
|
|
209
224
|
|
|
210
|
-
declare module '@tiptap/core' {
|
|
211
|
-
interface Commands<ReturnType> {
|
|
212
|
-
iframe: {
|
|
213
|
-
/**
|
|
214
|
-
* Add an iframe
|
|
215
|
-
*/
|
|
216
|
-
setIframe: (options: {
|
|
217
|
-
src: string;
|
|
218
|
-
service: string;
|
|
219
|
-
}) => ReturnType;
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
|
|
225
225
|
declare module '@tiptap/core' {
|
|
226
226
|
interface Commands<ReturnType> {
|
|
227
227
|
imageGifUpload: {
|
|
@@ -260,9 +260,8 @@ declare module '@tiptap/core' {
|
|
|
260
260
|
|
|
261
261
|
declare module '@tiptap/core' {
|
|
262
262
|
interface Commands<ReturnType> {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
unsetLineHeight: () => ReturnType;
|
|
263
|
+
katex: {
|
|
264
|
+
setKatex: (arg?: IKatexAttrs) => ReturnType;
|
|
266
265
|
};
|
|
267
266
|
}
|
|
268
267
|
}
|
|
@@ -270,8 +269,9 @@ declare module '@tiptap/core' {
|
|
|
270
269
|
|
|
271
270
|
declare module '@tiptap/core' {
|
|
272
271
|
interface Commands<ReturnType> {
|
|
273
|
-
|
|
274
|
-
|
|
272
|
+
lineHeight: {
|
|
273
|
+
setLineHeight: (lineHeight: string) => ReturnType;
|
|
274
|
+
unsetLineHeight: () => ReturnType;
|
|
275
275
|
};
|
|
276
276
|
}
|
|
277
277
|
}
|
|
@@ -328,14 +328,15 @@ declare module '@tiptap/core' {
|
|
|
328
328
|
|
|
329
329
|
declare module '@tiptap/core' {
|
|
330
330
|
interface Commands<ReturnType> {
|
|
331
|
-
|
|
331
|
+
video: {
|
|
332
332
|
/**
|
|
333
|
-
*
|
|
334
|
-
* @param options The tweet attributes
|
|
335
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
333
|
+
* Add an video
|
|
336
334
|
*/
|
|
337
|
-
|
|
338
|
-
|
|
335
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
336
|
+
/**
|
|
337
|
+
* Update an video
|
|
338
|
+
*/
|
|
339
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
339
340
|
};
|
|
340
341
|
}
|
|
341
342
|
}
|
|
@@ -343,15 +344,14 @@ declare module '@tiptap/core' {
|
|
|
343
344
|
|
|
344
345
|
declare module '@tiptap/core' {
|
|
345
346
|
interface Commands<ReturnType> {
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
* Add an video
|
|
349
|
-
*/
|
|
350
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
347
|
+
twitter: {
|
|
351
348
|
/**
|
|
352
|
-
*
|
|
349
|
+
* Insert a tweet
|
|
350
|
+
* @param options The tweet attributes
|
|
351
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
353
352
|
*/
|
|
354
|
-
|
|
353
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
354
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
355
355
|
};
|
|
356
356
|
}
|
|
357
357
|
}
|