reactjs-tiptap-editor 0.3.5 → 0.3.7
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-DocMG_Xt.cjs → ActionMenuButton-CqlhqVIW.cjs} +1 -1
- package/lib/{ActionMenuButton-D9WfF2ep.js → ActionMenuButton-DXwpQHj4.js} +1 -1
- package/lib/Attachment.cjs +1 -1
- package/lib/Attachment.d.cts +13 -13
- package/lib/Attachment.d.ts +13 -13
- package/lib/Attachment.js +3 -3
- package/lib/Blockquote.cjs +1 -1
- package/lib/Blockquote.d.cts +13 -13
- package/lib/Blockquote.d.ts +13 -13
- package/lib/Blockquote.js +2 -2
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.d.cts +13 -13
- package/lib/Bold.d.ts +13 -13
- package/lib/Bold.js +2 -2
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.d.cts +13 -13
- package/lib/BulletList.d.ts +13 -13
- package/lib/BulletList.js +2 -2
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.d.cts +13 -13
- package/lib/Clear.d.ts +13 -13
- package/lib/Clear.js +2 -2
- package/lib/Code.cjs +1 -1
- package/lib/Code.d.cts +13 -13
- package/lib/Code.d.ts +13 -13
- package/lib/Code.js +2 -2
- package/lib/CodeBlock.cjs +1 -1
- package/lib/CodeBlock.d.cts +13 -13
- package/lib/CodeBlock.d.ts +13 -13
- package/lib/CodeBlock.js +3 -3
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.d.cts +13 -13
- package/lib/CodeView.d.ts +13 -13
- package/lib/CodeView.js +2 -2
- package/lib/Color.cjs +1 -1
- package/lib/Color.d.cts +13 -13
- package/lib/Color.d.ts +13 -13
- package/lib/Color.js +3 -3
- package/lib/Document.cjs +1 -1
- package/lib/Document.d.cts +13 -13
- package/lib/Document.d.ts +13 -13
- package/lib/Document.js +1 -1
- package/lib/{Drawer-DdyndCxA.js → Drawer-B6uGc4Ab.js} +3 -3
- package/lib/{Drawer-C6yrcHc7.cjs → Drawer-DBt_aN5x.cjs} +1 -1
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.d.cts +13 -13
- package/lib/Drawer.d.ts +13 -13
- package/lib/Drawer.js +4 -4
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.d.cts +13 -13
- package/lib/Emoji.d.ts +13 -13
- package/lib/Emoji.js +4 -4
- package/lib/{Excalidraw-D5qXWfKq.js → Excalidraw-Bp252YTN.js} +3 -3
- package/lib/{Excalidraw-BS6_3xHm.cjs → Excalidraw-CYLyPnI4.cjs} +1 -1
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.d.cts +13 -13
- package/lib/Excalidraw.d.ts +13 -13
- package/lib/Excalidraw.js +3 -3
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.d.cts +13 -13
- package/lib/ExportPdf.d.ts +13 -13
- package/lib/ExportPdf.js +2 -2
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.d.cts +13 -13
- package/lib/ExportWord.d.ts +13 -13
- package/lib/ExportWord.js +2 -2
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.d.cts +13 -13
- package/lib/FontFamily.d.ts +13 -13
- package/lib/FontFamily.js +4 -4
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.d.cts +13 -13
- package/lib/FontSize.d.ts +13 -13
- package/lib/FontSize.js +3 -3
- package/lib/FormatPainter.cjs +1 -1
- package/lib/FormatPainter.d.cts +13 -13
- package/lib/FormatPainter.d.ts +13 -13
- package/lib/FormatPainter.js +2 -2
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.d.cts +13 -13
- package/lib/Heading.d.ts +13 -13
- package/lib/Heading.js +3 -3
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.d.cts +13 -13
- package/lib/Highlight.d.ts +13 -13
- package/lib/Highlight.js +2 -2
- package/lib/History.cjs +1 -1
- package/lib/History.d.cts +13 -13
- package/lib/History.d.ts +13 -13
- package/lib/History.js +2 -2
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.d.cts +13 -13
- package/lib/HorizontalRule.d.ts +13 -13
- package/lib/HorizontalRule.js +10 -8
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.d.cts +13 -13
- package/lib/Iframe.d.ts +13 -13
- package/lib/Iframe.js +3 -3
- package/lib/Image.cjs +1 -1
- package/lib/Image.d.cts +13 -13
- package/lib/Image.d.ts +13 -13
- package/lib/Image.js +3 -3
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.d.cts +13 -13
- package/lib/ImageGif.d.ts +13 -13
- package/lib/ImageGif.js +3 -3
- package/lib/ImportWord.cjs +2 -2
- package/lib/ImportWord.d.cts +13 -13
- package/lib/ImportWord.d.ts +13 -13
- package/lib/ImportWord.js +4 -4
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.d.cts +13 -13
- package/lib/Indent.d.ts +13 -13
- package/lib/Indent.js +2 -2
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.d.cts +13 -13
- package/lib/Italic.d.ts +13 -13
- package/lib/Italic.js +2 -2
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.d.cts +13 -13
- package/lib/Katex.d.ts +13 -13
- package/lib/Katex.js +4 -4
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.d.cts +13 -13
- package/lib/LineHeight.d.ts +13 -13
- package/lib/LineHeight.js +2 -2
- package/lib/Link.cjs +1 -1
- package/lib/Link.d.cts +13 -13
- package/lib/Link.d.ts +13 -13
- package/lib/Link.js +2 -2
- package/lib/ListItem.cjs +1 -1
- package/lib/ListItem.d.cts +13 -13
- package/lib/ListItem.d.ts +13 -13
- package/lib/ListItem.js +1 -1
- package/lib/Mention.cjs +1 -1
- package/lib/Mention.d.cts +13 -13
- package/lib/Mention.d.ts +13 -13
- package/lib/Mention.js +3 -3
- package/lib/Mermaid.cjs +1 -1
- package/lib/Mermaid.d.cts +13 -13
- package/lib/Mermaid.d.ts +13 -13
- package/lib/Mermaid.js +16 -16
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.d.cts +13 -13
- package/lib/MoreMark.d.ts +13 -13
- package/lib/MoreMark.js +3 -3
- package/lib/MultiColumn.cjs +1 -1
- package/lib/MultiColumn.d.cts +13 -13
- package/lib/MultiColumn.d.ts +13 -13
- package/lib/MultiColumn.js +2 -2
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.d.cts +13 -13
- package/lib/OrderedList.d.ts +13 -13
- package/lib/OrderedList.js +2 -2
- package/lib/{RichTextEditor-DS30aD8t.js → RichTextEditor-BfYZYQb9.js} +899 -905
- package/lib/RichTextEditor-Db6oQoYY.cjs +137 -0
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.d.cts +13 -13
- package/lib/SearchAndReplace.d.ts +13 -13
- package/lib/SearchAndReplace.js +2 -2
- package/lib/Selection.cjs +1 -1
- package/lib/Selection.d.cts +13 -13
- package/lib/Selection.d.ts +13 -13
- package/lib/Selection.js +1 -1
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.d.cts +13 -13
- package/lib/SlashCommand.d.ts +13 -13
- package/lib/SlashCommand.js +4 -4
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.d.cts +13 -13
- package/lib/Strike.d.ts +13 -13
- package/lib/Strike.js +2 -2
- package/lib/SubAndSuperScript.cjs +1 -1
- package/lib/SubAndSuperScript.d.cts +13 -13
- package/lib/SubAndSuperScript.d.ts +13 -13
- package/lib/SubAndSuperScript.js +3 -3
- package/lib/Table.cjs +1 -1
- package/lib/Table.d.cts +13 -13
- package/lib/Table.d.ts +13 -13
- package/lib/Table.js +15 -15
- package/lib/TableOfContent.cjs +1 -1
- package/lib/TableOfContent.d.cts +13 -13
- package/lib/TableOfContent.d.ts +13 -13
- package/lib/TableOfContent.js +3 -3
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.d.cts +13 -13
- package/lib/TaskList.d.ts +13 -13
- package/lib/TaskList.js +2 -2
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.d.cts +13 -13
- package/lib/TextAlign.d.ts +13 -13
- package/lib/TextAlign.js +47 -46
- package/lib/TextBubble.cjs +1 -1
- package/lib/TextBubble.d.cts +13 -13
- package/lib/TextBubble.d.ts +13 -13
- package/lib/TextBubble.js +2 -2
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.d.cts +13 -13
- package/lib/TextDirection.d.ts +13 -13
- package/lib/TextDirection.js +2 -2
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.d.cts +13 -13
- package/lib/TextUnderline.d.ts +13 -13
- package/lib/TextUnderline.js +2 -2
- package/lib/TrailingNode.cjs +1 -1
- package/lib/TrailingNode.d.cts +13 -13
- package/lib/TrailingNode.d.ts +13 -13
- package/lib/TrailingNode.js +1 -1
- package/lib/{Twitter-VKMhfUTN.js → Twitter-CZA9dXpC.js} +44 -44
- package/lib/{Twitter-Dwmo5UJ-.cjs → Twitter-DLO12QnF.cjs} +1 -1
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.d.cts +13 -13
- package/lib/Twitter.d.ts +13 -13
- package/lib/Twitter.js +3 -3
- package/lib/Video.cjs +1 -1
- package/lib/Video.d.cts +13 -13
- package/lib/Video.d.ts +13 -13
- package/lib/Video.js +2 -2
- package/lib/bubble-extra.cjs +1 -1
- package/lib/bubble-extra.d.cts +13 -13
- package/lib/bubble-extra.d.ts +13 -13
- package/lib/bubble-extra.js +6 -6
- package/lib/{dom-dataset-pKb7TLlt.js → dom-dataset-2RXYq9wp.js} +397 -376
- package/lib/dom-dataset-DmsCLv1q.cjs +33 -0
- package/lib/{index-BaTWsqZj.js → index-BGwJ0NfQ.js} +1 -1
- package/lib/{index-Dk3tSDmG.js → index-BkoojfPK.js} +1 -1
- package/lib/{index-COecBbaE.cjs → index-CSvnpArE.cjs} +11 -11
- package/lib/{index-DEe_Svay.js → index-CXIIg9Sq.js} +676 -644
- package/lib/{index-DjP7Onch.cjs → index-CrxasX7b.cjs} +1 -1
- package/lib/{index-CySbCeQd.cjs → index-Cyh1yoFk.cjs} +1 -1
- package/lib/{index-DCFzuS5p.js → index-fKx6CYUM.js} +1 -1
- package/lib/{index-ClFtfQ0J.cjs → index-h9_SDuwc.cjs} +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +13 -13
- package/lib/index.d.ts +13 -13
- package/lib/index.js +27 -27
- package/lib/locale-bundle.d.cts +13 -13
- package/lib/locale-bundle.d.ts +13 -13
- package/lib/{textarea-DITg4shx.js → textarea-BUlQB7hI.js} +1 -1
- package/lib/{textarea-I3qcfzYg.cjs → textarea-ILk3QoYy.cjs} +1 -1
- package/package.json +71 -71
- package/lib/RichTextEditor-CFS3E6GK.cjs +0 -137
- package/lib/dom-dataset-CAXnsjYE.cjs +0 -33
package/lib/ImportWord.d.cts
CHANGED
|
@@ -326,14 +326,15 @@ declare module '@tiptap/core' {
|
|
|
326
326
|
|
|
327
327
|
declare module '@tiptap/core' {
|
|
328
328
|
interface Commands<ReturnType> {
|
|
329
|
-
|
|
329
|
+
video: {
|
|
330
330
|
/**
|
|
331
|
-
*
|
|
332
|
-
* @param options The tweet attributes
|
|
333
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
331
|
+
* Add an video
|
|
334
332
|
*/
|
|
335
|
-
|
|
336
|
-
|
|
333
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
334
|
+
/**
|
|
335
|
+
* Update an video
|
|
336
|
+
*/
|
|
337
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
337
338
|
};
|
|
338
339
|
}
|
|
339
340
|
}
|
|
@@ -341,15 +342,14 @@ declare module '@tiptap/core' {
|
|
|
341
342
|
|
|
342
343
|
declare module '@tiptap/core' {
|
|
343
344
|
interface Commands<ReturnType> {
|
|
344
|
-
|
|
345
|
-
/**
|
|
346
|
-
* Add an video
|
|
347
|
-
*/
|
|
348
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
345
|
+
twitter: {
|
|
349
346
|
/**
|
|
350
|
-
*
|
|
347
|
+
* Insert a tweet
|
|
348
|
+
* @param options The tweet attributes
|
|
349
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
351
350
|
*/
|
|
352
|
-
|
|
351
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
352
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
353
353
|
};
|
|
354
354
|
}
|
|
355
355
|
}
|
package/lib/ImportWord.d.ts
CHANGED
|
@@ -326,14 +326,15 @@ declare module '@tiptap/core' {
|
|
|
326
326
|
|
|
327
327
|
declare module '@tiptap/core' {
|
|
328
328
|
interface Commands<ReturnType> {
|
|
329
|
-
|
|
329
|
+
video: {
|
|
330
330
|
/**
|
|
331
|
-
*
|
|
332
|
-
* @param options The tweet attributes
|
|
333
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
331
|
+
* Add an video
|
|
334
332
|
*/
|
|
335
|
-
|
|
336
|
-
|
|
333
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
334
|
+
/**
|
|
335
|
+
* Update an video
|
|
336
|
+
*/
|
|
337
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
337
338
|
};
|
|
338
339
|
}
|
|
339
340
|
}
|
|
@@ -341,15 +342,14 @@ declare module '@tiptap/core' {
|
|
|
341
342
|
|
|
342
343
|
declare module '@tiptap/core' {
|
|
343
344
|
interface Commands<ReturnType> {
|
|
344
|
-
|
|
345
|
-
/**
|
|
346
|
-
* Add an video
|
|
347
|
-
*/
|
|
348
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
345
|
+
twitter: {
|
|
349
346
|
/**
|
|
350
|
-
*
|
|
347
|
+
* Insert a tweet
|
|
348
|
+
* @param options The tweet attributes
|
|
349
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
351
350
|
*/
|
|
352
|
-
|
|
351
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
352
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
353
353
|
};
|
|
354
354
|
}
|
|
355
355
|
}
|
package/lib/ImportWord.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { E as Ts } from "./index-
|
|
1
|
+
import { E as Ts } from "./index-CXIIg9Sq.js";
|
|
2
2
|
import { jsxs as ws, jsx as ba } from "react/jsx-runtime";
|
|
3
3
|
import { useState as Es, useRef as As } from "react";
|
|
4
|
-
import { ab as Cs, ac as un, a2 as Fs, ad as Ss, A as Bs, ae as ks } from "./RichTextEditor-
|
|
4
|
+
import { ab as Cs, ac as un, a2 as Fs, ad as Ss, A as Bs, ae as ks } from "./RichTextEditor-BfYZYQb9.js";
|
|
5
5
|
import { u as Ws } from "./index-D-DR0FPY.js";
|
|
6
6
|
var ze = {}, Ei = "1.13.7", ya = typeof self == "object" && self.self === self && self || typeof global == "object" && global.global === global && global || Function("return this")() || {}, Ht = Array.prototype, Ai = Object.prototype, Da = typeof Symbol < "u" ? Symbol.prototype : null, Rs = Ht.push, rt = Ht.slice, Kn = Ai.toString, Ns = Ai.hasOwnProperty, Mc = typeof ArrayBuffer < "u", Os = typeof DataView < "u", Is = Array.isArray, va = Object.keys, xa = Object.create, _a = Mc && ArrayBuffer.isView, Ls = isNaN, Ms = isFinite, qc = !{ toString: null }.propertyIsEnumerable("toString"), Ua = [
|
|
7
7
|
"valueOf",
|
|
@@ -12395,7 +12395,7 @@ function yl() {
|
|
|
12395
12395
|
return u.replace(/^\uFEFF/g, "");
|
|
12396
12396
|
}
|
|
12397
12397
|
function o(u) {
|
|
12398
|
-
return u.type === "element" ? u.name === "mc:AlternateContent" ? u.
|
|
12398
|
+
return u.type === "element" ? u.name === "mc:AlternateContent" ? u.firstOrEmpty("mc:Fallback").children : (u.children = e.flatten(u.children.map(o, !0)), [u]) : [u];
|
|
12399
12399
|
}
|
|
12400
12400
|
return lt;
|
|
12401
12401
|
}
|
|
@@ -13766,7 +13766,7 @@ function _l() {
|
|
|
13766
13766
|
return oe === "_GoBack" ? f() : y(new t.BookmarkStart({ name: oe }));
|
|
13767
13767
|
},
|
|
13768
13768
|
"mc:AlternateContent": function(Y) {
|
|
13769
|
-
return H(Y.
|
|
13769
|
+
return H(Y.firstOrEmpty("mc:Fallback"));
|
|
13770
13770
|
},
|
|
13771
13771
|
"w:sdt": function(Y) {
|
|
13772
13772
|
var oe = Y.firstOrEmpty("w:sdtPr").first("wordml:checkbox");
|
package/lib/Indent.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./index-CSvnpArE.cjs"),t=require("./RichTextEditor-Db6oQoYY.cjs"),r=d.Extension.create({name:"indent",addOptions(){var n;return{...(n=this.parent)==null?void 0:n.call(this),types:["paragraph","heading","blockquote"],minIndent:t.IndentProps.min,maxIndent:t.IndentProps.max,button({editor:e,t:o}){return[{component:t.ActionButton,componentProps:{action:()=>{e.commands.indent()},shortcutKeys:["Tab"],icon:"IndentIncrease",tooltip:o("editor.indent.tooltip")}},{component:t.ActionButton,componentProps:{action:()=>{e.commands.outdent()},shortcutKeys:["Shift","Tab"],icon:"IndentDecrease",tooltip:o("editor.outdent.tooltip")}}]}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{indent:{default:0,parseHTML:n=>{const e=n.dataset.indent;return(e?Number.parseInt(e,10):0)||0},renderHTML:n=>n.indent?{"data-indent":n.indent}:{}}}}]},addCommands(){return{indent:()=>t.createIndentCommand({delta:t.IndentProps.more,types:this.options.types}),outdent:()=>t.createIndentCommand({delta:t.IndentProps.less,types:this.options.types})}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.indent(),"Shift-Tab":()=>this.editor.commands.outdent()}}});exports.Indent=r;
|
package/lib/Indent.d.cts
CHANGED
|
@@ -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/Indent.d.ts
CHANGED
|
@@ -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/Indent.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as s } from "./index-
|
|
2
|
-
import { c as d, I as e, A as r } from "./RichTextEditor-
|
|
1
|
+
import { E as s } from "./index-CXIIg9Sq.js";
|
|
2
|
+
import { c as d, I as e, A as r } from "./RichTextEditor-BfYZYQb9.js";
|
|
3
3
|
const p = /* @__PURE__ */ s.create({
|
|
4
4
|
name: "indent",
|
|
5
5
|
addOptions() {
|
package/lib/Italic.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-CSvnpArE.cjs"),r=require("./RichTextEditor-Db6oQoYY.cjs"),a=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,i=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,o=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,l=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,c=e.Mark.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",e.mergeAttributes(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[e.markInputRule({find:a,type:this.type}),e.markInputRule({find:o,type:this.type})]},addPasteRules(){return[e.markPasteRule({find:i,type:this.type}),e.markPasteRule({find:l,type:this.type})]}}),u=c.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button({editor:s,t:n}){return{component:r.ActionButton,componentProps:{action:()=>s.commands.toggleItalic(),isActive:()=>s.isActive("italic")||!1,disabled:!1,shortcutKeys:["mod","I"],icon:"Italic",tooltip:n("editor.italic.tooltip")}}}}}});exports.Italic=u;
|
package/lib/Italic.d.cts
CHANGED
|
@@ -316,14 +316,15 @@ declare module '@tiptap/core' {
|
|
|
316
316
|
|
|
317
317
|
declare module '@tiptap/core' {
|
|
318
318
|
interface Commands<ReturnType> {
|
|
319
|
-
|
|
319
|
+
video: {
|
|
320
320
|
/**
|
|
321
|
-
*
|
|
322
|
-
* @param options The tweet attributes
|
|
323
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
321
|
+
* Add an video
|
|
324
322
|
*/
|
|
325
|
-
|
|
326
|
-
|
|
323
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
324
|
+
/**
|
|
325
|
+
* Update an video
|
|
326
|
+
*/
|
|
327
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
327
328
|
};
|
|
328
329
|
}
|
|
329
330
|
}
|
|
@@ -331,15 +332,14 @@ declare module '@tiptap/core' {
|
|
|
331
332
|
|
|
332
333
|
declare module '@tiptap/core' {
|
|
333
334
|
interface Commands<ReturnType> {
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* Add an video
|
|
337
|
-
*/
|
|
338
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
335
|
+
twitter: {
|
|
339
336
|
/**
|
|
340
|
-
*
|
|
337
|
+
* Insert a tweet
|
|
338
|
+
* @param options The tweet attributes
|
|
339
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
341
340
|
*/
|
|
342
|
-
|
|
341
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
342
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
343
343
|
};
|
|
344
344
|
}
|
|
345
345
|
}
|
package/lib/Italic.d.ts
CHANGED
|
@@ -316,14 +316,15 @@ declare module '@tiptap/core' {
|
|
|
316
316
|
|
|
317
317
|
declare module '@tiptap/core' {
|
|
318
318
|
interface Commands<ReturnType> {
|
|
319
|
-
|
|
319
|
+
video: {
|
|
320
320
|
/**
|
|
321
|
-
*
|
|
322
|
-
* @param options The tweet attributes
|
|
323
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
321
|
+
* Add an video
|
|
324
322
|
*/
|
|
325
|
-
|
|
326
|
-
|
|
323
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
324
|
+
/**
|
|
325
|
+
* Update an video
|
|
326
|
+
*/
|
|
327
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
327
328
|
};
|
|
328
329
|
}
|
|
329
330
|
}
|
|
@@ -331,15 +332,14 @@ declare module '@tiptap/core' {
|
|
|
331
332
|
|
|
332
333
|
declare module '@tiptap/core' {
|
|
333
334
|
interface Commands<ReturnType> {
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* Add an video
|
|
337
|
-
*/
|
|
338
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
335
|
+
twitter: {
|
|
339
336
|
/**
|
|
340
|
-
*
|
|
337
|
+
* Insert a tweet
|
|
338
|
+
* @param options The tweet attributes
|
|
339
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
341
340
|
*/
|
|
342
|
-
|
|
341
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
342
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
343
343
|
};
|
|
344
344
|
}
|
|
345
345
|
}
|
package/lib/Italic.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as a, c as s, d as n, m as i } from "./index-
|
|
2
|
-
import { A as o } from "./RichTextEditor-
|
|
1
|
+
import { M as a, c as s, d as n, m as i } from "./index-CXIIg9Sq.js";
|
|
2
|
+
import { A as o } from "./RichTextEditor-BfYZYQb9.js";
|
|
3
3
|
const l = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, c = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, d = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, u = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, m = a.create({
|
|
4
4
|
name: "italic",
|
|
5
5
|
addOptions() {
|
package/lib/Katex.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-CSvnpArE.cjs"),f=require("./dom-dataset-DmsCLv1q.cjs"),n=require("react/jsx-runtime"),c=require("react"),b=require("katex"),j=require("lucide-react"),u=require("./RichTextEditor-Db6oQoYY.cjs"),w=require("./textarea-ILk3QoYy.cjs"),k=require("./index-Dz3YxLE7.cjs");function $({editor:e,...t}){const{t:s}=k.useLocale(),o=u.useAttributes(e,x.name,{text:"",defaultShowPicker:!1}),{text:i,defaultShowPicker:r}=o,[a,d]=c.useState(""),g=c.useCallback(()=>{e.chain().focus().setKatex({text:a}).run(),d("")},[e,a]);c.useEffect(()=>{r&&e.chain().updateAttributes(x.name,{defaultShowPicker:!1}).focus().run()},[e,r]);const h=c.useMemo(()=>{try{return b.renderToString(`${a}`)}catch{return a}},[a]),m=c.useMemo(()=>`${a}`.trim()?n.jsx("span",{contentEditable:!1,dangerouslySetInnerHTML:{__html:h||""}}):null,[a,h]);return n.jsxs(u.Popover,{modal:!0,children:[n.jsx(u.PopoverTrigger,{asChild:!0,children:n.jsx(u.ActionButton,{icon:t==null?void 0:t.icon,tooltip:t==null?void 0:t.tooltip})}),n.jsxs(u.PopoverContent,{align:"start",className:"richtext-size-full richtext-p-2",hideWhenDetached:!0,side:"bottom",children:[n.jsx(u.Label,{className:"richtext-mb-[6px]",children:s("editor.formula.dialog.text")}),n.jsx("div",{className:"richtext-mb-[16px] richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:n.jsx("div",{className:"richtext-relative richtext-w-full richtext-max-w-sm",children:n.jsx(w.Textarea,{autoFocus:!0,className:"richtext-w-full",defaultValue:i,onChange:p=>d(p.target.value),placeholder:"Text",required:!0,rows:3,value:a})})}),m&&n.jsx("div",{className:"richtext-my-[10px] richtext-max-w-[286px] richtext-overflow-auto richtext-whitespace-nowrap richtext-rounded-[6px] !richtext-border richtext-p-[10px]",children:m}),n.jsxs("div",{className:"richtext-flex richtext-items-center richtext-justify-between richtext-gap-[6px]",children:[n.jsx(u.Button,{className:"richtext-flex-1",onClick:g,children:"Submit"}),n.jsx("a",{href:"https://katex.org/docs/supported",rel:"noreferrer noopener",target:"_blank",children:n.jsx(j.HelpCircle,{size:16})})]})]})]})}function T(e,t=1){let s=0,o=0,i=0;if(e.startsWith("rgb")){const r=e.replace(/\s/g,"").match(/rgb\((.*)\)$/)[1].split(",");s=+r[0],o=+r[1],i=+r[2]}else if(e.startsWith("#")){let r=e.replace("#","");r.length===3&&(r=`${r[0]}${r[0]}${r[1]}${r[1]}${r[2]}${r[2]}`),s=Number.parseInt(r.substring(0,2),16),o=Number.parseInt(r.substring(2,4),16),i=Number.parseInt(r.substring(4,6),16)}else return e;return t>1&&t<=100&&(t=t/100),`rgba(${s},${o},${i},${t})`}function v({node:e}){const t=u.useTheme(),{text:s}=e.attrs,o=c.useMemo(()=>{const a="rgb(254, 242, 237)";return t==="dark"?T(a,.75):a},[t]),i=c.useMemo(()=>{try{return b.renderToString(`${s}`)}catch{return s}},[s]),r=c.useMemo(()=>s.trim()?n.jsx("span",{contentEditable:!1,dangerouslySetInnerHTML:{__html:i}}):n.jsx("span",{contentEditable:!1,children:"Not enter a formula"}),[s,i]);return n.jsx(f.NodeViewWrapper,{style:{display:"inline-block",backgroundColor:o},as:"span",children:r})}function N(e){return t=>t.getAttribute(e)}const x=l.Node.create({name:"katex",group:"inline",inline:!0,defining:!0,draggable:!0,selectable:!0,addOptions(){return{HTMLAttributes:{class:"katex"},button:({editor:e,t})=>({component:$,componentProps:{editor:e,action:()=>!0,isActive:()=>!1,disabled:!1,icon:"KatexIcon",tooltip:t("editor.katex.tooltip")}})}},addAttributes(){return{text:{default:"",parseHTML:N("text")},defaultShowPicker:{default:!1}}},parseHTML(){return[{tag:"span.katex"}]},renderHTML({HTMLAttributes:e}){return["span",l.mergeAttributes(this.options&&this.options.HTMLAttributes||{},e)]},addCommands(){return{setKatex:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[l.nodeInputRule({find:/^\$katex\$$/,type:this.type,getAttributes:()=>({defaultShowPicker:!0})})]},addNodeView(){return f.ReactNodeViewRenderer(v)}});exports.Katex=x;
|
package/lib/Katex.d.cts
CHANGED
|
@@ -252,14 +252,15 @@ declare module '@tiptap/core' {
|
|
|
252
252
|
|
|
253
253
|
declare module '@tiptap/core' {
|
|
254
254
|
interface Commands<ReturnType> {
|
|
255
|
-
|
|
255
|
+
video: {
|
|
256
256
|
/**
|
|
257
|
-
*
|
|
258
|
-
* @param options The tweet attributes
|
|
259
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
257
|
+
* Add an video
|
|
260
258
|
*/
|
|
261
|
-
|
|
262
|
-
|
|
259
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
260
|
+
/**
|
|
261
|
+
* Update an video
|
|
262
|
+
*/
|
|
263
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
263
264
|
};
|
|
264
265
|
}
|
|
265
266
|
}
|
|
@@ -267,15 +268,14 @@ declare module '@tiptap/core' {
|
|
|
267
268
|
|
|
268
269
|
declare module '@tiptap/core' {
|
|
269
270
|
interface Commands<ReturnType> {
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* Add an video
|
|
273
|
-
*/
|
|
274
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
271
|
+
twitter: {
|
|
275
272
|
/**
|
|
276
|
-
*
|
|
273
|
+
* Insert a tweet
|
|
274
|
+
* @param options The tweet attributes
|
|
275
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
277
276
|
*/
|
|
278
|
-
|
|
277
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
278
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
279
279
|
};
|
|
280
280
|
}
|
|
281
281
|
}
|
package/lib/Katex.d.ts
CHANGED
|
@@ -252,14 +252,15 @@ declare module '@tiptap/core' {
|
|
|
252
252
|
|
|
253
253
|
declare module '@tiptap/core' {
|
|
254
254
|
interface Commands<ReturnType> {
|
|
255
|
-
|
|
255
|
+
video: {
|
|
256
256
|
/**
|
|
257
|
-
*
|
|
258
|
-
* @param options The tweet attributes
|
|
259
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
257
|
+
* Add an video
|
|
260
258
|
*/
|
|
261
|
-
|
|
262
|
-
|
|
259
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
260
|
+
/**
|
|
261
|
+
* Update an video
|
|
262
|
+
*/
|
|
263
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
263
264
|
};
|
|
264
265
|
}
|
|
265
266
|
}
|
|
@@ -267,15 +268,14 @@ declare module '@tiptap/core' {
|
|
|
267
268
|
|
|
268
269
|
declare module '@tiptap/core' {
|
|
269
270
|
interface Commands<ReturnType> {
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* Add an video
|
|
273
|
-
*/
|
|
274
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
271
|
+
twitter: {
|
|
275
272
|
/**
|
|
276
|
-
*
|
|
273
|
+
* Insert a tweet
|
|
274
|
+
* @param options The tweet attributes
|
|
275
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
277
276
|
*/
|
|
278
|
-
|
|
277
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
278
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
279
279
|
};
|
|
280
280
|
}
|
|
281
281
|
}
|
package/lib/Katex.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { N as b, n as g, m as w } from "./index-
|
|
2
|
-
import { N as k, R as N } from "./dom-dataset-
|
|
1
|
+
import { N as b, n as g, m as w } from "./index-CXIIg9Sq.js";
|
|
2
|
+
import { N as k, R as N } from "./dom-dataset-2RXYq9wp.js";
|
|
3
3
|
import { jsx as n, jsxs as u } from "react/jsx-runtime";
|
|
4
4
|
import { useState as T, useCallback as $, useEffect as v, useMemo as c } from "react";
|
|
5
5
|
import x from "katex";
|
|
6
6
|
import { HelpCircle as A } from "lucide-react";
|
|
7
|
-
import { O as S, P as L, m as P, A as C, n as H, L as I, B as M, Q as y } from "./RichTextEditor-
|
|
8
|
-
import { T as K } from "./textarea-
|
|
7
|
+
import { O as S, P as L, m as P, A as C, n as H, L as I, B as M, Q as y } from "./RichTextEditor-BfYZYQb9.js";
|
|
8
|
+
import { T as K } from "./textarea-BUlQB7hI.js";
|
|
9
9
|
import { u as R } from "./index-D-DR0FPY.js";
|
|
10
10
|
function V({ editor: t, ...e }) {
|
|
11
11
|
const { t: a } = R(), o = S(t, h.name, {
|
package/lib/LineHeight.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index-CSvnpArE.cjs"),g=require("./index-Dz3YxLE7.cjs"),c=require("react/jsx-runtime"),L=require("react"),u=require("./RichTextEditor-Db6oQoYY.cjs");function T(e){return Number.parseFloat(e.replace("%",""))/100}function x(e){const{t}=g.useLocale(),[n,r]=L.useState("default");function o(i){i==="default"?e.editor.commands.unsetLineHeight():e.editor.commands.setLineHeight(i),r(i)}const d=L.useMemo(()=>{const s=e.editor.extensionManager.extensions.find(l=>l.name==="lineHeight").options.lineHeights.map(l=>({label:T(l),value:l}));return s.unshift({label:t("editor.default"),value:"default"}),s},[e]);return c.jsxs(u.DropdownMenu,{children:[c.jsx(u.DropdownMenuTrigger,{asChild:!0,disabled:e==null?void 0:e.disabled,children:c.jsx(u.ActionButton,{customClass:"!richtext-w-12 richtext-h-12",disabled:e==null?void 0:e.disabled,icon:"LineHeight",tooltip:e==null?void 0:e.tooltip,children:c.jsx(u.IconComponent,{className:"richtext-ml-1 richtext-size-3 richtext-text-zinc-500",name:"MenuDown"})})}),c.jsx(u.DropdownMenuContent,{className:"richtext-min-w-24",children:d==null?void 0:d.map((i,h)=>c.jsx(u.DropdownMenuCheckboxItem,{checked:i.value===n,onClick:()=>o(i.value),children:i.label},`lineHeight-${h}`))})]})}const _=["paragraph","heading","list_item","todo_item"];function E(e,t){const{selection:n,doc:r}=e;if(!n||!r||!(n instanceof m.TextSelection||n instanceof m.AllSelection))return e;const{from:o,to:d}=n,i=[],h=t&&t!==g.DEFAULT_LINE_HEIGHT?t:null;if(r.nodesBetween(o,d,(s,l)=>{const a=s.type;return _.includes(a.name)?((s.attrs.lineHeight||null)!==h&&i.push({node:s,pos:l,nodeType:a}),a.name!=="list_item"&&a.name!=="todo_item"):!0}),i.length===0)return e;for(const s of i){const{node:l,pos:a,nodeType:f}=s;let{attrs:H}=l;H={...H,lineHeight:h},e=e.setNodeMarkup(a,f,H,l.marks)}return e}function I(e){return({state:t,dispatch:n})=>{const{selection:r}=t;let{tr:o}=t;return o=o.setSelection(r),o=E(o,e),o.docChanged?(n&&n(o),!0):!1}}const b=m.Extension.create({name:"lineHeight",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),types:["paragraph","heading","list_item","todo_item"],lineHeights:g.DEFAULT_LINE_HEIGHT_LIST,defaultHeight:g.DEFAULT_LINE_HEIGHT,button({editor:t,t:n}){return{component:x,componentProps:{editor:t,tooltip:n("editor.lineheight.tooltip")}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:e=>e.style.lineHeight||this.options.defaultHeight,renderHTML:e=>e.lineHeight===this.options.defaultHeight||!e.lineHeight?{}:{style:`line-height: ${e.lineHeight}`}}}}]},addCommands(){return{setLineHeight:e=>I(e),unsetLineHeight:()=>({commands:e})=>this.options.types.every(t=>e.resetAttributes(t,"lineHeight"))}}});exports.DEFAULT_LINE_HEIGHT_LIST=g.DEFAULT_LINE_HEIGHT_LIST;exports.LineHeight=b;
|
package/lib/LineHeight.d.cts
CHANGED
|
@@ -320,14 +320,15 @@ declare module '@tiptap/core' {
|
|
|
320
320
|
|
|
321
321
|
declare module '@tiptap/core' {
|
|
322
322
|
interface Commands<ReturnType> {
|
|
323
|
-
|
|
323
|
+
video: {
|
|
324
324
|
/**
|
|
325
|
-
*
|
|
326
|
-
* @param options The tweet attributes
|
|
327
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
325
|
+
* Add an video
|
|
328
326
|
*/
|
|
329
|
-
|
|
330
|
-
|
|
327
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
328
|
+
/**
|
|
329
|
+
* Update an video
|
|
330
|
+
*/
|
|
331
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
331
332
|
};
|
|
332
333
|
}
|
|
333
334
|
}
|
|
@@ -335,15 +336,14 @@ declare module '@tiptap/core' {
|
|
|
335
336
|
|
|
336
337
|
declare module '@tiptap/core' {
|
|
337
338
|
interface Commands<ReturnType> {
|
|
338
|
-
|
|
339
|
-
/**
|
|
340
|
-
* Add an video
|
|
341
|
-
*/
|
|
342
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
339
|
+
twitter: {
|
|
343
340
|
/**
|
|
344
|
-
*
|
|
341
|
+
* Insert a tweet
|
|
342
|
+
* @param options The tweet attributes
|
|
343
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
345
344
|
*/
|
|
346
|
-
|
|
345
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
346
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
347
347
|
};
|
|
348
348
|
}
|
|
349
349
|
}
|
package/lib/LineHeight.d.ts
CHANGED
|
@@ -320,14 +320,15 @@ declare module '@tiptap/core' {
|
|
|
320
320
|
|
|
321
321
|
declare module '@tiptap/core' {
|
|
322
322
|
interface Commands<ReturnType> {
|
|
323
|
-
|
|
323
|
+
video: {
|
|
324
324
|
/**
|
|
325
|
-
*
|
|
326
|
-
* @param options The tweet attributes
|
|
327
|
-
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
325
|
+
* Add an video
|
|
328
326
|
*/
|
|
329
|
-
|
|
330
|
-
|
|
327
|
+
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
328
|
+
/**
|
|
329
|
+
* Update an video
|
|
330
|
+
*/
|
|
331
|
+
updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
331
332
|
};
|
|
332
333
|
}
|
|
333
334
|
}
|
|
@@ -335,15 +336,14 @@ declare module '@tiptap/core' {
|
|
|
335
336
|
|
|
336
337
|
declare module '@tiptap/core' {
|
|
337
338
|
interface Commands<ReturnType> {
|
|
338
|
-
|
|
339
|
-
/**
|
|
340
|
-
* Add an video
|
|
341
|
-
*/
|
|
342
|
-
setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
|
|
339
|
+
twitter: {
|
|
343
340
|
/**
|
|
344
|
-
*
|
|
341
|
+
* Insert a tweet
|
|
342
|
+
* @param options The tweet attributes
|
|
343
|
+
* @example editor.commands.setTweet({ src: 'https://x.com/seanpk/status/1800145949580517852' })
|
|
345
344
|
*/
|
|
346
|
-
|
|
345
|
+
setTweet: (options: SetTweetOptions) => ReturnType;
|
|
346
|
+
updateTweet: (options: SetTweetOptions) => ReturnType;
|
|
347
347
|
};
|
|
348
348
|
}
|
|
349
349
|
}
|
package/lib/LineHeight.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { T as f, A as H, E as L } from "./index-
|
|
1
|
+
import { T as f, A as H, E as L } from "./index-CXIIg9Sq.js";
|
|
2
2
|
import { u as x, j as m, k as T } from "./index-D-DR0FPY.js";
|
|
3
3
|
import { jsxs as b, jsx as h } from "react/jsx-runtime";
|
|
4
4
|
import { useState as p, useMemo as _ } from "react";
|
|
5
|
-
import { D, e as E, A as M, k as w, f as A, h as C } from "./RichTextEditor-
|
|
5
|
+
import { D, e as E, A as M, k as w, f as A, h as C } from "./RichTextEditor-BfYZYQb9.js";
|
|
6
6
|
function y(e) {
|
|
7
7
|
return Number.parseFloat(e.replace("%", "")) / 100;
|
|
8
8
|
}
|