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.
Files changed (243) hide show
  1. package/lib/{ActionMenuButton-DocMG_Xt.cjs → ActionMenuButton-CqlhqVIW.cjs} +1 -1
  2. package/lib/{ActionMenuButton-D9WfF2ep.js → ActionMenuButton-DXwpQHj4.js} +1 -1
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.d.cts +13 -13
  5. package/lib/Attachment.d.ts +13 -13
  6. package/lib/Attachment.js +3 -3
  7. package/lib/Blockquote.cjs +1 -1
  8. package/lib/Blockquote.d.cts +13 -13
  9. package/lib/Blockquote.d.ts +13 -13
  10. package/lib/Blockquote.js +2 -2
  11. package/lib/Bold.cjs +1 -1
  12. package/lib/Bold.d.cts +13 -13
  13. package/lib/Bold.d.ts +13 -13
  14. package/lib/Bold.js +2 -2
  15. package/lib/BulletList.cjs +1 -1
  16. package/lib/BulletList.d.cts +13 -13
  17. package/lib/BulletList.d.ts +13 -13
  18. package/lib/BulletList.js +2 -2
  19. package/lib/Clear.cjs +1 -1
  20. package/lib/Clear.d.cts +13 -13
  21. package/lib/Clear.d.ts +13 -13
  22. package/lib/Clear.js +2 -2
  23. package/lib/Code.cjs +1 -1
  24. package/lib/Code.d.cts +13 -13
  25. package/lib/Code.d.ts +13 -13
  26. package/lib/Code.js +2 -2
  27. package/lib/CodeBlock.cjs +1 -1
  28. package/lib/CodeBlock.d.cts +13 -13
  29. package/lib/CodeBlock.d.ts +13 -13
  30. package/lib/CodeBlock.js +3 -3
  31. package/lib/CodeView.cjs +1 -1
  32. package/lib/CodeView.d.cts +13 -13
  33. package/lib/CodeView.d.ts +13 -13
  34. package/lib/CodeView.js +2 -2
  35. package/lib/Color.cjs +1 -1
  36. package/lib/Color.d.cts +13 -13
  37. package/lib/Color.d.ts +13 -13
  38. package/lib/Color.js +3 -3
  39. package/lib/Document.cjs +1 -1
  40. package/lib/Document.d.cts +13 -13
  41. package/lib/Document.d.ts +13 -13
  42. package/lib/Document.js +1 -1
  43. package/lib/{Drawer-DdyndCxA.js → Drawer-B6uGc4Ab.js} +3 -3
  44. package/lib/{Drawer-C6yrcHc7.cjs → Drawer-DBt_aN5x.cjs} +1 -1
  45. package/lib/Drawer.cjs +1 -1
  46. package/lib/Drawer.d.cts +13 -13
  47. package/lib/Drawer.d.ts +13 -13
  48. package/lib/Drawer.js +4 -4
  49. package/lib/Emoji.cjs +1 -1
  50. package/lib/Emoji.d.cts +13 -13
  51. package/lib/Emoji.d.ts +13 -13
  52. package/lib/Emoji.js +4 -4
  53. package/lib/{Excalidraw-D5qXWfKq.js → Excalidraw-Bp252YTN.js} +3 -3
  54. package/lib/{Excalidraw-BS6_3xHm.cjs → Excalidraw-CYLyPnI4.cjs} +1 -1
  55. package/lib/Excalidraw.cjs +1 -1
  56. package/lib/Excalidraw.d.cts +13 -13
  57. package/lib/Excalidraw.d.ts +13 -13
  58. package/lib/Excalidraw.js +3 -3
  59. package/lib/ExportPdf.cjs +1 -1
  60. package/lib/ExportPdf.d.cts +13 -13
  61. package/lib/ExportPdf.d.ts +13 -13
  62. package/lib/ExportPdf.js +2 -2
  63. package/lib/ExportWord.cjs +1 -1
  64. package/lib/ExportWord.d.cts +13 -13
  65. package/lib/ExportWord.d.ts +13 -13
  66. package/lib/ExportWord.js +2 -2
  67. package/lib/FontFamily.cjs +1 -1
  68. package/lib/FontFamily.d.cts +13 -13
  69. package/lib/FontFamily.d.ts +13 -13
  70. package/lib/FontFamily.js +4 -4
  71. package/lib/FontSize.cjs +1 -1
  72. package/lib/FontSize.d.cts +13 -13
  73. package/lib/FontSize.d.ts +13 -13
  74. package/lib/FontSize.js +3 -3
  75. package/lib/FormatPainter.cjs +1 -1
  76. package/lib/FormatPainter.d.cts +13 -13
  77. package/lib/FormatPainter.d.ts +13 -13
  78. package/lib/FormatPainter.js +2 -2
  79. package/lib/Heading.cjs +1 -1
  80. package/lib/Heading.d.cts +13 -13
  81. package/lib/Heading.d.ts +13 -13
  82. package/lib/Heading.js +3 -3
  83. package/lib/Highlight.cjs +1 -1
  84. package/lib/Highlight.d.cts +13 -13
  85. package/lib/Highlight.d.ts +13 -13
  86. package/lib/Highlight.js +2 -2
  87. package/lib/History.cjs +1 -1
  88. package/lib/History.d.cts +13 -13
  89. package/lib/History.d.ts +13 -13
  90. package/lib/History.js +2 -2
  91. package/lib/HorizontalRule.cjs +1 -1
  92. package/lib/HorizontalRule.d.cts +13 -13
  93. package/lib/HorizontalRule.d.ts +13 -13
  94. package/lib/HorizontalRule.js +10 -8
  95. package/lib/Iframe.cjs +1 -1
  96. package/lib/Iframe.d.cts +13 -13
  97. package/lib/Iframe.d.ts +13 -13
  98. package/lib/Iframe.js +3 -3
  99. package/lib/Image.cjs +1 -1
  100. package/lib/Image.d.cts +13 -13
  101. package/lib/Image.d.ts +13 -13
  102. package/lib/Image.js +3 -3
  103. package/lib/ImageGif.cjs +1 -1
  104. package/lib/ImageGif.d.cts +13 -13
  105. package/lib/ImageGif.d.ts +13 -13
  106. package/lib/ImageGif.js +3 -3
  107. package/lib/ImportWord.cjs +2 -2
  108. package/lib/ImportWord.d.cts +13 -13
  109. package/lib/ImportWord.d.ts +13 -13
  110. package/lib/ImportWord.js +4 -4
  111. package/lib/Indent.cjs +1 -1
  112. package/lib/Indent.d.cts +13 -13
  113. package/lib/Indent.d.ts +13 -13
  114. package/lib/Indent.js +2 -2
  115. package/lib/Italic.cjs +1 -1
  116. package/lib/Italic.d.cts +13 -13
  117. package/lib/Italic.d.ts +13 -13
  118. package/lib/Italic.js +2 -2
  119. package/lib/Katex.cjs +1 -1
  120. package/lib/Katex.d.cts +13 -13
  121. package/lib/Katex.d.ts +13 -13
  122. package/lib/Katex.js +4 -4
  123. package/lib/LineHeight.cjs +1 -1
  124. package/lib/LineHeight.d.cts +13 -13
  125. package/lib/LineHeight.d.ts +13 -13
  126. package/lib/LineHeight.js +2 -2
  127. package/lib/Link.cjs +1 -1
  128. package/lib/Link.d.cts +13 -13
  129. package/lib/Link.d.ts +13 -13
  130. package/lib/Link.js +2 -2
  131. package/lib/ListItem.cjs +1 -1
  132. package/lib/ListItem.d.cts +13 -13
  133. package/lib/ListItem.d.ts +13 -13
  134. package/lib/ListItem.js +1 -1
  135. package/lib/Mention.cjs +1 -1
  136. package/lib/Mention.d.cts +13 -13
  137. package/lib/Mention.d.ts +13 -13
  138. package/lib/Mention.js +3 -3
  139. package/lib/Mermaid.cjs +1 -1
  140. package/lib/Mermaid.d.cts +13 -13
  141. package/lib/Mermaid.d.ts +13 -13
  142. package/lib/Mermaid.js +16 -16
  143. package/lib/MoreMark.cjs +1 -1
  144. package/lib/MoreMark.d.cts +13 -13
  145. package/lib/MoreMark.d.ts +13 -13
  146. package/lib/MoreMark.js +3 -3
  147. package/lib/MultiColumn.cjs +1 -1
  148. package/lib/MultiColumn.d.cts +13 -13
  149. package/lib/MultiColumn.d.ts +13 -13
  150. package/lib/MultiColumn.js +2 -2
  151. package/lib/OrderedList.cjs +1 -1
  152. package/lib/OrderedList.d.cts +13 -13
  153. package/lib/OrderedList.d.ts +13 -13
  154. package/lib/OrderedList.js +2 -2
  155. package/lib/{RichTextEditor-DS30aD8t.js → RichTextEditor-BfYZYQb9.js} +899 -905
  156. package/lib/RichTextEditor-Db6oQoYY.cjs +137 -0
  157. package/lib/SearchAndReplace.cjs +1 -1
  158. package/lib/SearchAndReplace.d.cts +13 -13
  159. package/lib/SearchAndReplace.d.ts +13 -13
  160. package/lib/SearchAndReplace.js +2 -2
  161. package/lib/Selection.cjs +1 -1
  162. package/lib/Selection.d.cts +13 -13
  163. package/lib/Selection.d.ts +13 -13
  164. package/lib/Selection.js +1 -1
  165. package/lib/SlashCommand.cjs +1 -1
  166. package/lib/SlashCommand.d.cts +13 -13
  167. package/lib/SlashCommand.d.ts +13 -13
  168. package/lib/SlashCommand.js +4 -4
  169. package/lib/Strike.cjs +1 -1
  170. package/lib/Strike.d.cts +13 -13
  171. package/lib/Strike.d.ts +13 -13
  172. package/lib/Strike.js +2 -2
  173. package/lib/SubAndSuperScript.cjs +1 -1
  174. package/lib/SubAndSuperScript.d.cts +13 -13
  175. package/lib/SubAndSuperScript.d.ts +13 -13
  176. package/lib/SubAndSuperScript.js +3 -3
  177. package/lib/Table.cjs +1 -1
  178. package/lib/Table.d.cts +13 -13
  179. package/lib/Table.d.ts +13 -13
  180. package/lib/Table.js +15 -15
  181. package/lib/TableOfContent.cjs +1 -1
  182. package/lib/TableOfContent.d.cts +13 -13
  183. package/lib/TableOfContent.d.ts +13 -13
  184. package/lib/TableOfContent.js +3 -3
  185. package/lib/TaskList.cjs +1 -1
  186. package/lib/TaskList.d.cts +13 -13
  187. package/lib/TaskList.d.ts +13 -13
  188. package/lib/TaskList.js +2 -2
  189. package/lib/TextAlign.cjs +1 -1
  190. package/lib/TextAlign.d.cts +13 -13
  191. package/lib/TextAlign.d.ts +13 -13
  192. package/lib/TextAlign.js +47 -46
  193. package/lib/TextBubble.cjs +1 -1
  194. package/lib/TextBubble.d.cts +13 -13
  195. package/lib/TextBubble.d.ts +13 -13
  196. package/lib/TextBubble.js +2 -2
  197. package/lib/TextDirection.cjs +1 -1
  198. package/lib/TextDirection.d.cts +13 -13
  199. package/lib/TextDirection.d.ts +13 -13
  200. package/lib/TextDirection.js +2 -2
  201. package/lib/TextUnderline.cjs +1 -1
  202. package/lib/TextUnderline.d.cts +13 -13
  203. package/lib/TextUnderline.d.ts +13 -13
  204. package/lib/TextUnderline.js +2 -2
  205. package/lib/TrailingNode.cjs +1 -1
  206. package/lib/TrailingNode.d.cts +13 -13
  207. package/lib/TrailingNode.d.ts +13 -13
  208. package/lib/TrailingNode.js +1 -1
  209. package/lib/{Twitter-VKMhfUTN.js → Twitter-CZA9dXpC.js} +44 -44
  210. package/lib/{Twitter-Dwmo5UJ-.cjs → Twitter-DLO12QnF.cjs} +1 -1
  211. package/lib/Twitter.cjs +1 -1
  212. package/lib/Twitter.d.cts +13 -13
  213. package/lib/Twitter.d.ts +13 -13
  214. package/lib/Twitter.js +3 -3
  215. package/lib/Video.cjs +1 -1
  216. package/lib/Video.d.cts +13 -13
  217. package/lib/Video.d.ts +13 -13
  218. package/lib/Video.js +2 -2
  219. package/lib/bubble-extra.cjs +1 -1
  220. package/lib/bubble-extra.d.cts +13 -13
  221. package/lib/bubble-extra.d.ts +13 -13
  222. package/lib/bubble-extra.js +6 -6
  223. package/lib/{dom-dataset-pKb7TLlt.js → dom-dataset-2RXYq9wp.js} +397 -376
  224. package/lib/dom-dataset-DmsCLv1q.cjs +33 -0
  225. package/lib/{index-BaTWsqZj.js → index-BGwJ0NfQ.js} +1 -1
  226. package/lib/{index-Dk3tSDmG.js → index-BkoojfPK.js} +1 -1
  227. package/lib/{index-COecBbaE.cjs → index-CSvnpArE.cjs} +11 -11
  228. package/lib/{index-DEe_Svay.js → index-CXIIg9Sq.js} +676 -644
  229. package/lib/{index-DjP7Onch.cjs → index-CrxasX7b.cjs} +1 -1
  230. package/lib/{index-CySbCeQd.cjs → index-Cyh1yoFk.cjs} +1 -1
  231. package/lib/{index-DCFzuS5p.js → index-fKx6CYUM.js} +1 -1
  232. package/lib/{index-ClFtfQ0J.cjs → index-h9_SDuwc.cjs} +1 -1
  233. package/lib/index.cjs +1 -1
  234. package/lib/index.d.cts +13 -13
  235. package/lib/index.d.ts +13 -13
  236. package/lib/index.js +27 -27
  237. package/lib/locale-bundle.d.cts +13 -13
  238. package/lib/locale-bundle.d.ts +13 -13
  239. package/lib/{textarea-DITg4shx.js → textarea-BUlQB7hI.js} +1 -1
  240. package/lib/{textarea-I3qcfzYg.cjs → textarea-ILk3QoYy.cjs} +1 -1
  241. package/package.json +71 -71
  242. package/lib/RichTextEditor-CFS3E6GK.cjs +0 -137
  243. package/lib/dom-dataset-CAXnsjYE.cjs +0 -33
@@ -326,14 +326,15 @@ declare module '@tiptap/core' {
326
326
 
327
327
  declare module '@tiptap/core' {
328
328
  interface Commands<ReturnType> {
329
- twitter: {
329
+ video: {
330
330
  /**
331
- * Insert a tweet
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
- setTweet: (options: SetTweetOptions) => ReturnType;
336
- updateTweet: (options: SetTweetOptions) => ReturnType;
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
- video: {
345
- /**
346
- * Add an video
347
- */
348
- setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
345
+ twitter: {
349
346
  /**
350
- * Update an video
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
- updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
351
+ setTweet: (options: SetTweetOptions) => ReturnType;
352
+ updateTweet: (options: SetTweetOptions) => ReturnType;
353
353
  };
354
354
  }
355
355
  }
@@ -326,14 +326,15 @@ declare module '@tiptap/core' {
326
326
 
327
327
  declare module '@tiptap/core' {
328
328
  interface Commands<ReturnType> {
329
- twitter: {
329
+ video: {
330
330
  /**
331
- * Insert a tweet
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
- setTweet: (options: SetTweetOptions) => ReturnType;
336
- updateTweet: (options: SetTweetOptions) => ReturnType;
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
- video: {
345
- /**
346
- * Add an video
347
- */
348
- setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
345
+ twitter: {
349
346
  /**
350
- * Update an video
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
- updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
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-DEe_Svay.js";
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-DS30aD8t.js";
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.first("mc:Fallback").children : (u.children = e.flatten(u.children.map(o, !0)), [u]) : [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.first("mc:Fallback"));
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-COecBbaE.cjs"),t=require("./RichTextEditor-CFS3E6GK.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;
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
- twitter: {
320
+ video: {
321
321
  /**
322
- * Insert a tweet
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
- setTweet: (options: SetTweetOptions) => ReturnType;
327
- updateTweet: (options: SetTweetOptions) => ReturnType;
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
- video: {
336
- /**
337
- * Add an video
338
- */
339
- setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
336
+ twitter: {
340
337
  /**
341
- * Update an video
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
- updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
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
- twitter: {
320
+ video: {
321
321
  /**
322
- * Insert a tweet
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
- setTweet: (options: SetTweetOptions) => ReturnType;
327
- updateTweet: (options: SetTweetOptions) => ReturnType;
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
- video: {
336
- /**
337
- * Add an video
338
- */
339
- setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
336
+ twitter: {
340
337
  /**
341
- * Update an video
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
- updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
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-DEe_Svay.js";
2
- import { c as d, I as e, A as r } from "./RichTextEditor-DS30aD8t.js";
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-COecBbaE.cjs"),r=require("./RichTextEditor-CFS3E6GK.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;
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
- twitter: {
319
+ video: {
320
320
  /**
321
- * Insert a tweet
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
- setTweet: (options: SetTweetOptions) => ReturnType;
326
- updateTweet: (options: SetTweetOptions) => ReturnType;
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
- video: {
335
- /**
336
- * Add an video
337
- */
338
- setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
335
+ twitter: {
339
336
  /**
340
- * Update an video
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
- updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
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
- twitter: {
319
+ video: {
320
320
  /**
321
- * Insert a tweet
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
- setTweet: (options: SetTweetOptions) => ReturnType;
326
- updateTweet: (options: SetTweetOptions) => ReturnType;
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
- video: {
335
- /**
336
- * Add an video
337
- */
338
- setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
335
+ twitter: {
339
336
  /**
340
- * Update an video
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
- updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
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-DEe_Svay.js";
2
- import { A as o } from "./RichTextEditor-DS30aD8t.js";
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-COecBbaE.cjs"),f=require("./dom-dataset-CAXnsjYE.cjs"),n=require("react/jsx-runtime"),c=require("react"),b=require("katex"),j=require("lucide-react"),u=require("./RichTextEditor-CFS3E6GK.cjs"),w=require("./textarea-I3qcfzYg.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;
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
- twitter: {
255
+ video: {
256
256
  /**
257
- * Insert a tweet
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
- setTweet: (options: SetTweetOptions) => ReturnType;
262
- updateTweet: (options: SetTweetOptions) => ReturnType;
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
- video: {
271
- /**
272
- * Add an video
273
- */
274
- setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
271
+ twitter: {
275
272
  /**
276
- * Update an video
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
- updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
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
- twitter: {
255
+ video: {
256
256
  /**
257
- * Insert a tweet
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
- setTweet: (options: SetTweetOptions) => ReturnType;
262
- updateTweet: (options: SetTweetOptions) => ReturnType;
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
- video: {
271
- /**
272
- * Add an video
273
- */
274
- setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
271
+ twitter: {
275
272
  /**
276
- * Update an video
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
- updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
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-DEe_Svay.js";
2
- import { N as k, R as N } from "./dom-dataset-pKb7TLlt.js";
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-DS30aD8t.js";
8
- import { T as K } from "./textarea-DITg4shx.js";
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, {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index-COecBbaE.cjs"),g=require("./index-Dz3YxLE7.cjs"),c=require("react/jsx-runtime"),L=require("react"),u=require("./RichTextEditor-CFS3E6GK.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;
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;
@@ -320,14 +320,15 @@ declare module '@tiptap/core' {
320
320
 
321
321
  declare module '@tiptap/core' {
322
322
  interface Commands<ReturnType> {
323
- twitter: {
323
+ video: {
324
324
  /**
325
- * Insert a tweet
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
- setTweet: (options: SetTweetOptions) => ReturnType;
330
- updateTweet: (options: SetTweetOptions) => ReturnType;
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
- video: {
339
- /**
340
- * Add an video
341
- */
342
- setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
339
+ twitter: {
343
340
  /**
344
- * Update an video
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
- updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
345
+ setTweet: (options: SetTweetOptions) => ReturnType;
346
+ updateTweet: (options: SetTweetOptions) => ReturnType;
347
347
  };
348
348
  }
349
349
  }
@@ -320,14 +320,15 @@ declare module '@tiptap/core' {
320
320
 
321
321
  declare module '@tiptap/core' {
322
322
  interface Commands<ReturnType> {
323
- twitter: {
323
+ video: {
324
324
  /**
325
- * Insert a tweet
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
- setTweet: (options: SetTweetOptions) => ReturnType;
330
- updateTweet: (options: SetTweetOptions) => ReturnType;
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
- video: {
339
- /**
340
- * Add an video
341
- */
342
- setVideo: (options: Partial<SetVideoOptions>) => ReturnType;
339
+ twitter: {
343
340
  /**
344
- * Update an video
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
- updateVideo: (options: Partial<SetVideoOptions>) => ReturnType;
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-DEe_Svay.js";
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-DS30aD8t.js";
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
  }