reactjs-tiptap-editor 0.3.28 → 0.3.29

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 (221) hide show
  1. package/lib/{ActionMenuButton-C20molC9.cjs → ActionMenuButton-5Y8QcYxD.cjs} +1 -1
  2. package/lib/{ActionMenuButton-D0hFczCn.js → ActionMenuButton-Cs9DM_16.js} +1 -1
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.d.cts +28 -28
  5. package/lib/Attachment.d.ts +28 -28
  6. package/lib/Attachment.js +1 -1
  7. package/lib/Blockquote.cjs +1 -1
  8. package/lib/Blockquote.d.cts +28 -28
  9. package/lib/Blockquote.d.ts +28 -28
  10. package/lib/Blockquote.js +1 -1
  11. package/lib/Bold.cjs +1 -1
  12. package/lib/Bold.d.cts +28 -28
  13. package/lib/Bold.d.ts +28 -28
  14. package/lib/Bold.js +1 -1
  15. package/lib/BulletList.cjs +1 -1
  16. package/lib/BulletList.d.cts +28 -28
  17. package/lib/BulletList.d.ts +28 -28
  18. package/lib/BulletList.js +1 -1
  19. package/lib/Clear.cjs +1 -1
  20. package/lib/Clear.d.cts +28 -28
  21. package/lib/Clear.d.ts +28 -28
  22. package/lib/Clear.js +1 -1
  23. package/lib/Code.cjs +1 -1
  24. package/lib/Code.d.cts +28 -28
  25. package/lib/Code.d.ts +28 -28
  26. package/lib/Code.js +1 -1
  27. package/lib/CodeBlock.cjs +1 -1
  28. package/lib/CodeBlock.d.cts +28 -28
  29. package/lib/CodeBlock.d.ts +28 -28
  30. package/lib/CodeBlock.js +1 -1
  31. package/lib/CodeView.cjs +1 -1
  32. package/lib/CodeView.d.cts +28 -28
  33. package/lib/CodeView.d.ts +28 -28
  34. package/lib/CodeView.js +1 -1
  35. package/lib/Color.cjs +1 -1
  36. package/lib/Color.d.cts +28 -28
  37. package/lib/Color.d.ts +28 -28
  38. package/lib/Color.js +1 -1
  39. package/lib/Document.d.cts +28 -28
  40. package/lib/Document.d.ts +28 -28
  41. package/lib/{Drawer-B96jQIQU.js → Drawer-BCmNLh31.js} +1 -1
  42. package/lib/{Drawer-0kBt3GVL.cjs → Drawer-DCAp7eZF.cjs} +1 -1
  43. package/lib/Drawer.cjs +1 -1
  44. package/lib/Drawer.d.cts +28 -28
  45. package/lib/Drawer.d.ts +28 -28
  46. package/lib/Drawer.js +2 -2
  47. package/lib/Emoji.cjs +1 -1
  48. package/lib/Emoji.d.cts +28 -28
  49. package/lib/Emoji.d.ts +28 -28
  50. package/lib/Emoji.js +1 -1
  51. package/lib/{Excalidraw-HK9kjpX5.cjs → Excalidraw-BI50RQL-.cjs} +1 -1
  52. package/lib/{Excalidraw-z3VZyGJ4.js → Excalidraw-CYPcjYZB.js} +1 -1
  53. package/lib/Excalidraw.cjs +1 -1
  54. package/lib/Excalidraw.d.cts +28 -28
  55. package/lib/Excalidraw.d.ts +28 -28
  56. package/lib/Excalidraw.js +1 -1
  57. package/lib/ExportPdf.cjs +1 -1
  58. package/lib/ExportPdf.d.cts +28 -28
  59. package/lib/ExportPdf.d.ts +28 -28
  60. package/lib/ExportPdf.js +1 -1
  61. package/lib/ExportWord.cjs +1 -1
  62. package/lib/ExportWord.d.cts +28 -28
  63. package/lib/ExportWord.d.ts +28 -28
  64. package/lib/ExportWord.js +1 -1
  65. package/lib/FontFamily.cjs +1 -1
  66. package/lib/FontFamily.d.cts +28 -28
  67. package/lib/FontFamily.d.ts +28 -28
  68. package/lib/FontFamily.js +2 -2
  69. package/lib/FontSize.cjs +1 -1
  70. package/lib/FontSize.d.cts +28 -28
  71. package/lib/FontSize.d.ts +28 -28
  72. package/lib/FontSize.js +2 -2
  73. package/lib/FormatPainter.cjs +1 -1
  74. package/lib/FormatPainter.d.cts +28 -28
  75. package/lib/FormatPainter.d.ts +28 -28
  76. package/lib/FormatPainter.js +1 -1
  77. package/lib/Heading.cjs +1 -1
  78. package/lib/Heading.d.cts +28 -28
  79. package/lib/Heading.d.ts +28 -28
  80. package/lib/Heading.js +2 -2
  81. package/lib/Highlight.cjs +1 -1
  82. package/lib/Highlight.d.cts +28 -28
  83. package/lib/Highlight.d.ts +28 -28
  84. package/lib/Highlight.js +1 -1
  85. package/lib/History.cjs +1 -1
  86. package/lib/History.d.cts +28 -28
  87. package/lib/History.d.ts +28 -28
  88. package/lib/History.js +1 -1
  89. package/lib/HorizontalRule.cjs +1 -1
  90. package/lib/HorizontalRule.d.cts +28 -28
  91. package/lib/HorizontalRule.d.ts +28 -28
  92. package/lib/HorizontalRule.js +1 -1
  93. package/lib/Iframe.cjs +1 -1
  94. package/lib/Iframe.d.cts +28 -28
  95. package/lib/Iframe.d.ts +28 -28
  96. package/lib/Iframe.js +1 -1
  97. package/lib/Image.cjs +1 -1
  98. package/lib/Image.d.cts +28 -28
  99. package/lib/Image.d.ts +28 -28
  100. package/lib/Image.js +1 -1
  101. package/lib/ImageGif.cjs +1 -1
  102. package/lib/ImageGif.d.cts +31 -30
  103. package/lib/ImageGif.d.ts +31 -30
  104. package/lib/ImageGif.js +1 -1
  105. package/lib/ImportWord.cjs +1 -1
  106. package/lib/ImportWord.d.cts +28 -28
  107. package/lib/ImportWord.d.ts +28 -28
  108. package/lib/ImportWord.js +1 -1
  109. package/lib/Indent.cjs +1 -1
  110. package/lib/Indent.d.cts +28 -28
  111. package/lib/Indent.d.ts +28 -28
  112. package/lib/Indent.js +1 -1
  113. package/lib/Italic.cjs +1 -1
  114. package/lib/Italic.d.cts +28 -28
  115. package/lib/Italic.d.ts +28 -28
  116. package/lib/Italic.js +1 -1
  117. package/lib/Katex.cjs +1 -1
  118. package/lib/Katex.d.cts +28 -28
  119. package/lib/Katex.d.ts +28 -28
  120. package/lib/Katex.js +2 -2
  121. package/lib/LineHeight.cjs +1 -1
  122. package/lib/LineHeight.d.cts +28 -28
  123. package/lib/LineHeight.d.ts +28 -28
  124. package/lib/LineHeight.js +1 -1
  125. package/lib/Link.cjs +1 -1
  126. package/lib/Link.d.cts +28 -28
  127. package/lib/Link.d.ts +28 -28
  128. package/lib/Link.js +1 -1
  129. package/lib/ListItem.d.cts +28 -28
  130. package/lib/ListItem.d.ts +28 -28
  131. package/lib/Mention.d.cts +28 -28
  132. package/lib/Mention.d.ts +28 -28
  133. package/lib/Mermaid.cjs +1 -1
  134. package/lib/Mermaid.d.cts +28 -28
  135. package/lib/Mermaid.d.ts +28 -28
  136. package/lib/Mermaid.js +2 -2
  137. package/lib/MoreMark.cjs +1 -1
  138. package/lib/MoreMark.d.cts +28 -28
  139. package/lib/MoreMark.d.ts +28 -28
  140. package/lib/MoreMark.js +1 -1
  141. package/lib/MultiColumn.cjs +1 -1
  142. package/lib/MultiColumn.d.cts +28 -28
  143. package/lib/MultiColumn.d.ts +28 -28
  144. package/lib/MultiColumn.js +1 -1
  145. package/lib/OrderedList.cjs +1 -1
  146. package/lib/OrderedList.d.cts +28 -28
  147. package/lib/OrderedList.d.ts +28 -28
  148. package/lib/OrderedList.js +1 -1
  149. package/lib/{RichTextEditor-BKywwUM4.cjs → RichTextEditor-DsUcQSbm.cjs} +5 -5
  150. package/lib/{RichTextEditor-CnWZ69eX.js → RichTextEditor-e6q30rbV.js} +998 -942
  151. package/lib/SearchAndReplace.cjs +1 -1
  152. package/lib/SearchAndReplace.d.cts +28 -28
  153. package/lib/SearchAndReplace.d.ts +28 -28
  154. package/lib/SearchAndReplace.js +1 -1
  155. package/lib/Selection.d.cts +28 -28
  156. package/lib/Selection.d.ts +28 -28
  157. package/lib/SlashCommand.cjs +1 -1
  158. package/lib/SlashCommand.d.cts +28 -28
  159. package/lib/SlashCommand.d.ts +28 -28
  160. package/lib/SlashCommand.js +1 -1
  161. package/lib/Strike.cjs +1 -1
  162. package/lib/Strike.d.cts +28 -28
  163. package/lib/Strike.d.ts +28 -28
  164. package/lib/Strike.js +1 -1
  165. package/lib/SubAndSuperScript.cjs +1 -1
  166. package/lib/SubAndSuperScript.d.cts +28 -28
  167. package/lib/SubAndSuperScript.d.ts +28 -28
  168. package/lib/SubAndSuperScript.js +1 -1
  169. package/lib/Table.cjs +1 -1
  170. package/lib/Table.d.cts +28 -28
  171. package/lib/Table.d.ts +28 -28
  172. package/lib/Table.js +1 -1
  173. package/lib/TableOfContent.cjs +1 -1
  174. package/lib/TableOfContent.d.cts +28 -28
  175. package/lib/TableOfContent.d.ts +28 -28
  176. package/lib/TableOfContent.js +1 -1
  177. package/lib/TaskList.cjs +1 -1
  178. package/lib/TaskList.d.cts +28 -28
  179. package/lib/TaskList.d.ts +28 -28
  180. package/lib/TaskList.js +1 -1
  181. package/lib/TextAlign.cjs +1 -1
  182. package/lib/TextAlign.d.cts +28 -28
  183. package/lib/TextAlign.d.ts +28 -28
  184. package/lib/TextAlign.js +1 -1
  185. package/lib/TextBubble.cjs +1 -1
  186. package/lib/TextBubble.d.cts +28 -28
  187. package/lib/TextBubble.d.ts +28 -28
  188. package/lib/TextBubble.js +1 -1
  189. package/lib/TextDirection.cjs +1 -1
  190. package/lib/TextDirection.d.cts +28 -28
  191. package/lib/TextDirection.d.ts +28 -28
  192. package/lib/TextDirection.js +1 -1
  193. package/lib/TextUnderline.cjs +1 -1
  194. package/lib/TextUnderline.d.cts +28 -28
  195. package/lib/TextUnderline.d.ts +28 -28
  196. package/lib/TextUnderline.js +1 -1
  197. package/lib/TrailingNode.d.cts +28 -28
  198. package/lib/TrailingNode.d.ts +28 -28
  199. package/lib/{Twitter-Dj49i3B9.cjs → Twitter-D2Osj8qP.cjs} +1 -1
  200. package/lib/{Twitter-CCf1aM0f.js → Twitter-Wb7cD3M-.js} +1 -1
  201. package/lib/Twitter.cjs +1 -1
  202. package/lib/Twitter.d.cts +28 -28
  203. package/lib/Twitter.d.ts +28 -28
  204. package/lib/Twitter.js +1 -1
  205. package/lib/Video.cjs +1 -1
  206. package/lib/Video.d.cts +28 -28
  207. package/lib/Video.d.ts +28 -28
  208. package/lib/Video.js +1 -1
  209. package/lib/bubble-extra.cjs +1 -1
  210. package/lib/bubble-extra.d.cts +28 -28
  211. package/lib/bubble-extra.d.ts +28 -28
  212. package/lib/bubble-extra.js +5 -5
  213. package/lib/index.cjs +1 -1
  214. package/lib/index.d.cts +28 -28
  215. package/lib/index.d.ts +28 -28
  216. package/lib/index.js +2 -2
  217. package/lib/locale-bundle.d.cts +28 -28
  218. package/lib/locale-bundle.d.ts +28 -28
  219. package/lib/{textarea-DhlS0JCr.cjs → textarea-BVbzd9-k.cjs} +1 -1
  220. package/lib/{textarea-nr3UZ7Wg.js → textarea-Csmx5x-_.js} +1 -1
  221. package/package.json +1 -1
@@ -3,7 +3,7 @@ import { N as C, c as g, R as N } from "./dom-dataset-Di3tIRrR.js";
3
3
  import { jsx as l, jsxs as T } from "react/jsx-runtime";
4
4
  import { useState as p, useCallback as m, useEffect as d } from "react";
5
5
  import { u as O } from "./index-CsK90iVd.js";
6
- import { Z as _, A as y } from "./RichTextEditor-CnWZ69eX.js";
6
+ import { Z as _, A as y } from "./RichTextEditor-e6q30rbV.js";
7
7
  const x = "_toc_aag8a_1", A = "_visible_aag8a_7", w = "_list_aag8a_11", E = "_item_aag8a_16", f = {
8
8
  toc: x,
9
9
  visible: A,
package/lib/TaskList.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-ByRfqzMr.cjs"),b=require("./RichTextEditor-BKywwUM4.cjs"),f=/^\s*(\[([( |x])?\])\s$/,L=o.Node.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const i=t.getAttribute("data-checked");return i===""||i==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:i}){return["li",o.mergeAttributes(this.options.HTMLAttributes,i,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:i,getPos:c,editor:a})=>{const r=document.createElement("li"),d=document.createElement("label"),k=document.createElement("span"),s=document.createElement("input"),l=document.createElement("div"),p=()=>{var e,n;s.ariaLabel=((n=(e=this.options.a11y)===null||e===void 0?void 0:e.checkboxLabel)===null||n===void 0?void 0:n.call(e,t,s.checked))||`Task item checkbox for ${t.textContent||"empty task item"}`};return p(),d.contentEditable="false",s.type="checkbox",s.addEventListener("mousedown",e=>e.preventDefault()),s.addEventListener("change",e=>{if(!a.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}const{checked:n}=e.target;a.isEditable&&typeof c=="function"&&a.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:m})=>{const u=c();if(typeof u!="number")return!1;const h=m.doc.nodeAt(u);return m.setNodeMarkup(u,void 0,{...h==null?void 0:h.attrs,checked:n}),!0}).run(),!a.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,n)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([e,n])=>{r.setAttribute(e,n)}),r.dataset.checked=t.attrs.checked,s.checked=t.attrs.checked,d.append(s,k),r.append(d,l),Object.entries(i).forEach(([e,n])=>{r.setAttribute(e,n)}),{dom:r,contentDOM:l,update:e=>e.type!==this.type?!1:(r.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,p(),!0)}}},addInputRules(){return[o.wrappingInputRule({find:f,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),y=o.Node.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",o.mergeAttributes(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),T=y.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),HTMLAttributes:{class:"task-list"},taskItem:{HTMLAttributes:{class:"task-list-item"}},button:({editor:i,t:c,extension:a})=>({component:b.ActionButton,componentProps:{action:()=>i.commands.toggleTaskList(),isActive:()=>i.isActive("taskList")||!1,disabled:!1,icon:"ListTodo",shortcutKeys:a.options.shortcutKeys??["shift","mod","9"],tooltip:c("editor.tasklist.tooltip")}})}},addExtensions(){return[L.configure(this.options.taskItem)]}});exports.TaskList=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-ByRfqzMr.cjs"),b=require("./RichTextEditor-DsUcQSbm.cjs"),f=/^\s*(\[([( |x])?\])\s$/,L=o.Node.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const i=t.getAttribute("data-checked");return i===""||i==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:i}){return["li",o.mergeAttributes(this.options.HTMLAttributes,i,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:i,getPos:c,editor:a})=>{const r=document.createElement("li"),d=document.createElement("label"),k=document.createElement("span"),s=document.createElement("input"),l=document.createElement("div"),p=()=>{var e,n;s.ariaLabel=((n=(e=this.options.a11y)===null||e===void 0?void 0:e.checkboxLabel)===null||n===void 0?void 0:n.call(e,t,s.checked))||`Task item checkbox for ${t.textContent||"empty task item"}`};return p(),d.contentEditable="false",s.type="checkbox",s.addEventListener("mousedown",e=>e.preventDefault()),s.addEventListener("change",e=>{if(!a.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}const{checked:n}=e.target;a.isEditable&&typeof c=="function"&&a.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:m})=>{const u=c();if(typeof u!="number")return!1;const h=m.doc.nodeAt(u);return m.setNodeMarkup(u,void 0,{...h==null?void 0:h.attrs,checked:n}),!0}).run(),!a.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,n)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([e,n])=>{r.setAttribute(e,n)}),r.dataset.checked=t.attrs.checked,s.checked=t.attrs.checked,d.append(s,k),r.append(d,l),Object.entries(i).forEach(([e,n])=>{r.setAttribute(e,n)}),{dom:r,contentDOM:l,update:e=>e.type!==this.type?!1:(r.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,p(),!0)}}},addInputRules(){return[o.wrappingInputRule({find:f,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),y=o.Node.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",o.mergeAttributes(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),T=y.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),HTMLAttributes:{class:"task-list"},taskItem:{HTMLAttributes:{class:"task-list-item"}},button:({editor:i,t:c,extension:a})=>({component:b.ActionButton,componentProps:{action:()=>i.commands.toggleTaskList(),isActive:()=>i.isActive("taskList")||!1,disabled:!1,icon:"ListTodo",shortcutKeys:a.options.shortcutKeys??["shift","mod","9"],tooltip:c("editor.tasklist.tooltip")}})}},addExtensions(){return[L.configure(this.options.taskItem)]}});exports.TaskList=T;
@@ -126,15 +126,6 @@ declare module '@tiptap/core' {
126
126
  }
127
127
 
128
128
 
129
- declare module '@tiptap/core' {
130
- interface Commands<ReturnType> {
131
- excalidraw: {
132
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
133
- };
134
- }
135
- }
136
-
137
-
138
129
  declare module '@tiptap/core' {
139
130
  interface Commands<ReturnType> {
140
131
  emoji: {
@@ -156,6 +147,15 @@ declare module '@tiptap/core' {
156
147
  }
157
148
 
158
149
 
150
+ declare module '@tiptap/core' {
151
+ interface Commands<ReturnType> {
152
+ excalidraw: {
153
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
154
+ };
155
+ }
156
+ }
157
+
158
+
159
159
  declare module '@tiptap/core' {
160
160
  interface Commands<ReturnType> {
161
161
  exportWord: {
@@ -265,9 +265,8 @@ declare module '@tiptap/core' {
265
265
 
266
266
  declare module '@tiptap/core' {
267
267
  interface Commands<ReturnType> {
268
- lineHeight: {
269
- setLineHeight: (lineHeight: string) => ReturnType;
270
- unsetLineHeight: () => ReturnType;
268
+ katex: {
269
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
271
270
  };
272
271
  }
273
272
  }
@@ -275,8 +274,9 @@ declare module '@tiptap/core' {
275
274
 
276
275
  declare module '@tiptap/core' {
277
276
  interface Commands<ReturnType> {
278
- katex: {
279
- setKatex: (arg?: IKatexAttrs) => ReturnType;
277
+ lineHeight: {
278
+ setLineHeight: (lineHeight: string) => ReturnType;
279
+ unsetLineHeight: () => ReturnType;
280
280
  };
281
281
  }
282
282
  }
@@ -292,6 +292,20 @@ declare module '@tiptap/core' {
292
292
  }
293
293
 
294
294
 
295
+ declare module '@tiptap/core' {
296
+ interface Commands<ReturnType> {
297
+ columns: {
298
+ insertColumns: (attrs?: {
299
+ cols: number;
300
+ }) => ReturnType;
301
+ addColBefore: () => ReturnType;
302
+ addColAfter: () => ReturnType;
303
+ deleteCol: () => ReturnType;
304
+ };
305
+ }
306
+ }
307
+
308
+
295
309
  declare module '@tiptap/core' {
296
310
  interface Commands<ReturnType> {
297
311
  search: {
@@ -307,20 +321,6 @@ declare module '@tiptap/core' {
307
321
  }
308
322
 
309
323
 
310
- declare module '@tiptap/core' {
311
- interface Commands<ReturnType> {
312
- columns: {
313
- insertColumns: (attrs?: {
314
- cols: number;
315
- }) => ReturnType;
316
- addColBefore: () => ReturnType;
317
- addColAfter: () => ReturnType;
318
- deleteCol: () => ReturnType;
319
- };
320
- }
321
- }
322
-
323
-
324
324
  declare module '@tiptap/core' {
325
325
  interface Commands<ReturnType> {
326
326
  tableOfContents: {
package/lib/TaskList.d.ts CHANGED
@@ -126,15 +126,6 @@ declare module '@tiptap/core' {
126
126
  }
127
127
 
128
128
 
129
- declare module '@tiptap/core' {
130
- interface Commands<ReturnType> {
131
- excalidraw: {
132
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
133
- };
134
- }
135
- }
136
-
137
-
138
129
  declare module '@tiptap/core' {
139
130
  interface Commands<ReturnType> {
140
131
  emoji: {
@@ -156,6 +147,15 @@ declare module '@tiptap/core' {
156
147
  }
157
148
 
158
149
 
150
+ declare module '@tiptap/core' {
151
+ interface Commands<ReturnType> {
152
+ excalidraw: {
153
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
154
+ };
155
+ }
156
+ }
157
+
158
+
159
159
  declare module '@tiptap/core' {
160
160
  interface Commands<ReturnType> {
161
161
  exportWord: {
@@ -265,9 +265,8 @@ declare module '@tiptap/core' {
265
265
 
266
266
  declare module '@tiptap/core' {
267
267
  interface Commands<ReturnType> {
268
- lineHeight: {
269
- setLineHeight: (lineHeight: string) => ReturnType;
270
- unsetLineHeight: () => ReturnType;
268
+ katex: {
269
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
271
270
  };
272
271
  }
273
272
  }
@@ -275,8 +274,9 @@ declare module '@tiptap/core' {
275
274
 
276
275
  declare module '@tiptap/core' {
277
276
  interface Commands<ReturnType> {
278
- katex: {
279
- setKatex: (arg?: IKatexAttrs) => ReturnType;
277
+ lineHeight: {
278
+ setLineHeight: (lineHeight: string) => ReturnType;
279
+ unsetLineHeight: () => ReturnType;
280
280
  };
281
281
  }
282
282
  }
@@ -292,6 +292,20 @@ declare module '@tiptap/core' {
292
292
  }
293
293
 
294
294
 
295
+ declare module '@tiptap/core' {
296
+ interface Commands<ReturnType> {
297
+ columns: {
298
+ insertColumns: (attrs?: {
299
+ cols: number;
300
+ }) => ReturnType;
301
+ addColBefore: () => ReturnType;
302
+ addColAfter: () => ReturnType;
303
+ deleteCol: () => ReturnType;
304
+ };
305
+ }
306
+ }
307
+
308
+
295
309
  declare module '@tiptap/core' {
296
310
  interface Commands<ReturnType> {
297
311
  search: {
@@ -307,20 +321,6 @@ declare module '@tiptap/core' {
307
321
  }
308
322
 
309
323
 
310
- declare module '@tiptap/core' {
311
- interface Commands<ReturnType> {
312
- columns: {
313
- insertColumns: (attrs?: {
314
- cols: number;
315
- }) => ReturnType;
316
- addColBefore: () => ReturnType;
317
- addColAfter: () => ReturnType;
318
- deleteCol: () => ReturnType;
319
- };
320
- }
321
- }
322
-
323
-
324
324
  declare module '@tiptap/core' {
325
325
  interface Commands<ReturnType> {
326
326
  tableOfContents: {
package/lib/TaskList.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { N as m, w as f, m as k } from "./index-DI9T3iLd.js";
2
- import { A as L } from "./RichTextEditor-CnWZ69eX.js";
2
+ import { A as L } from "./RichTextEditor-e6q30rbV.js";
3
3
  const y = /^\s*(\[([( |x])?\])\s$/, T = m.create({
4
4
  name: "taskItem",
5
5
  addOptions() {
package/lib/TextAlign.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./index-ByRfqzMr.cjs"),s=require("react/jsx-runtime"),M=require("react"),l=require("./RichTextEditor-BKywwUM4.cjs"),S=v.Extension.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(n=>e.updateAttributes(n,{textAlign:t})).every(n=>n):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).every(e=>e),toggleTextAlign:t=>({editor:e,commands:n})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?n.unsetTextAlign():n.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});function C(t){var n;const e=M.useMemo(()=>{var o;const i=(o=t==null?void 0:t.items)==null?void 0:o.find(r=>r.isActive());return i&&!i.default?{...i,icon:i.icon?i.icon:t.icon}:{title:t==null?void 0:t.tooltip,icon:t.icon,isActive:()=>!1}},[t]);return s.jsxs(l.Popover,{modal:!0,children:[s.jsx(l.PopoverTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:s.jsx(l.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:s.jsx(l.IconComponent,{className:"richtext-ml-1 richtext-size-3 richtext-text-zinc-500",name:"MenuDown"})})}),s.jsx(l.PopoverContent,{align:"start",className:"richtext-flex richtext-w-full richtext-min-w-4 richtext-flex-row richtext-gap-1 !richtext-p-[4px]",side:"bottom",children:(n=t==null?void 0:t.items)==null?void 0:n.map((i,h)=>{var o,r;return s.jsxs(l.Tooltip,{children:[s.jsx(l.TooltipTrigger,{asChild:!0,children:s.jsx(l.Toggle,{className:"richtext-size-7 richtext-p-1","data-state":e.title===i.title?"on":"off",onClick:i==null?void 0:i.action,pressed:e.title===i.title,size:"sm",children:(i==null?void 0:i.icon)&&s.jsx(l.IconComponent,{name:i.icon})})}),s.jsxs(l.TooltipContent,{className:"richtext-flex richtext-flex-col richtext-items-center",children:[s.jsx("span",{children:i.title}),!!((o=i.shortcutKeys)!=null&&o.length)&&s.jsx("span",{children:(r=i.shortcutKeys)==null?void 0:r.map(a=>l.getShortcutKey(a)).join(" ")})]})]},`text-align-${h}`)})})]})}const K=S.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["heading","paragraph","list_item","title"],button({editor:e,extension:n,t:i}){var g,x,f,A,m;const h=((g=n.options)==null?void 0:g.alignments)||[],o={left:((x=n.options.shortcutKeys)==null?void 0:x[0])??["mod","Shift","L"],center:((f=n.options.shortcutKeys)==null?void 0:f[1])??["mod","Shift","E"],right:((A=n.options.shortcutKeys)==null?void 0:A[2])??["mod","Shift","R"],justify:((m=n.options.shortcutKeys)==null?void 0:m[3])??["mod","Shift","J"]},r={left:"AlignLeft",center:"AlignCenter",right:"AlignRight",justify:"AlignJustify"},a=h.map(c=>{var y,u,T;return{title:i(`editor.textalign.${c}.tooltip`),icon:r[c],shortcutKeys:o[c],isActive:()=>e.isActive({textAlign:c})||!1,action:()=>{var d,j;return(j=(d=e.commands)==null?void 0:d.setTextAlign)==null?void 0:j.call(d,c)},disabled:!((T=(u=(y=e==null?void 0:e.can)==null?void 0:y.call(e))==null?void 0:u.setTextAlign)!=null&&T.call(u,c))}}),b=a.filter(c=>c.disabled).length===a.length;return{component:C,componentProps:{icon:"AlignJustify",tooltip:i("editor.textalign.tooltip"),disabled:b,items:a}}}}}});exports.TextAlign=K;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./index-ByRfqzMr.cjs"),s=require("react/jsx-runtime"),M=require("react"),l=require("./RichTextEditor-DsUcQSbm.cjs"),S=v.Extension.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(n=>e.updateAttributes(n,{textAlign:t})).every(n=>n):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).every(e=>e),toggleTextAlign:t=>({editor:e,commands:n})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?n.unsetTextAlign():n.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});function C(t){var n;const e=M.useMemo(()=>{var o;const i=(o=t==null?void 0:t.items)==null?void 0:o.find(r=>r.isActive());return i&&!i.default?{...i,icon:i.icon?i.icon:t.icon}:{title:t==null?void 0:t.tooltip,icon:t.icon,isActive:()=>!1}},[t]);return s.jsxs(l.Popover,{modal:!0,children:[s.jsx(l.PopoverTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:s.jsx(l.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:s.jsx(l.IconComponent,{className:"richtext-ml-1 richtext-size-3 richtext-text-zinc-500",name:"MenuDown"})})}),s.jsx(l.PopoverContent,{align:"start",className:"richtext-flex richtext-w-full richtext-min-w-4 richtext-flex-row richtext-gap-1 !richtext-p-[4px]",side:"bottom",children:(n=t==null?void 0:t.items)==null?void 0:n.map((i,h)=>{var o,r;return s.jsxs(l.Tooltip,{children:[s.jsx(l.TooltipTrigger,{asChild:!0,children:s.jsx(l.Toggle,{className:"richtext-size-7 richtext-p-1","data-state":e.title===i.title?"on":"off",onClick:i==null?void 0:i.action,pressed:e.title===i.title,size:"sm",children:(i==null?void 0:i.icon)&&s.jsx(l.IconComponent,{name:i.icon})})}),s.jsxs(l.TooltipContent,{className:"richtext-flex richtext-flex-col richtext-items-center",children:[s.jsx("span",{children:i.title}),!!((o=i.shortcutKeys)!=null&&o.length)&&s.jsx("span",{children:(r=i.shortcutKeys)==null?void 0:r.map(a=>l.getShortcutKey(a)).join(" ")})]})]},`text-align-${h}`)})})]})}const K=S.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["heading","paragraph","list_item","title"],button({editor:e,extension:n,t:i}){var g,x,f,A,m;const h=((g=n.options)==null?void 0:g.alignments)||[],o={left:((x=n.options.shortcutKeys)==null?void 0:x[0])??["mod","Shift","L"],center:((f=n.options.shortcutKeys)==null?void 0:f[1])??["mod","Shift","E"],right:((A=n.options.shortcutKeys)==null?void 0:A[2])??["mod","Shift","R"],justify:((m=n.options.shortcutKeys)==null?void 0:m[3])??["mod","Shift","J"]},r={left:"AlignLeft",center:"AlignCenter",right:"AlignRight",justify:"AlignJustify"},a=h.map(c=>{var y,u,T;return{title:i(`editor.textalign.${c}.tooltip`),icon:r[c],shortcutKeys:o[c],isActive:()=>e.isActive({textAlign:c})||!1,action:()=>{var d,j;return(j=(d=e.commands)==null?void 0:d.setTextAlign)==null?void 0:j.call(d,c)},disabled:!((T=(u=(y=e==null?void 0:e.can)==null?void 0:y.call(e))==null?void 0:u.setTextAlign)!=null&&T.call(u,c))}}),b=a.filter(c=>c.disabled).length===a.length;return{component:C,componentProps:{icon:"AlignJustify",tooltip:i("editor.textalign.tooltip"),disabled:b,items:a}}}}}});exports.TextAlign=K;
@@ -130,15 +130,6 @@ declare module '@tiptap/core' {
130
130
  }
131
131
 
132
132
 
133
- declare module '@tiptap/core' {
134
- interface Commands<ReturnType> {
135
- excalidraw: {
136
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
137
- };
138
- }
139
- }
140
-
141
-
142
133
  declare module '@tiptap/core' {
143
134
  interface Commands<ReturnType> {
144
135
  emoji: {
@@ -160,6 +151,15 @@ declare module '@tiptap/core' {
160
151
  }
161
152
 
162
153
 
154
+ declare module '@tiptap/core' {
155
+ interface Commands<ReturnType> {
156
+ excalidraw: {
157
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
158
+ };
159
+ }
160
+ }
161
+
162
+
163
163
  declare module '@tiptap/core' {
164
164
  interface Commands<ReturnType> {
165
165
  exportWord: {
@@ -269,9 +269,8 @@ declare module '@tiptap/core' {
269
269
 
270
270
  declare module '@tiptap/core' {
271
271
  interface Commands<ReturnType> {
272
- lineHeight: {
273
- setLineHeight: (lineHeight: string) => ReturnType;
274
- unsetLineHeight: () => ReturnType;
272
+ katex: {
273
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
275
274
  };
276
275
  }
277
276
  }
@@ -279,8 +278,9 @@ declare module '@tiptap/core' {
279
278
 
280
279
  declare module '@tiptap/core' {
281
280
  interface Commands<ReturnType> {
282
- katex: {
283
- setKatex: (arg?: IKatexAttrs) => ReturnType;
281
+ lineHeight: {
282
+ setLineHeight: (lineHeight: string) => ReturnType;
283
+ unsetLineHeight: () => ReturnType;
284
284
  };
285
285
  }
286
286
  }
@@ -296,6 +296,20 @@ declare module '@tiptap/core' {
296
296
  }
297
297
 
298
298
 
299
+ declare module '@tiptap/core' {
300
+ interface Commands<ReturnType> {
301
+ columns: {
302
+ insertColumns: (attrs?: {
303
+ cols: number;
304
+ }) => ReturnType;
305
+ addColBefore: () => ReturnType;
306
+ addColAfter: () => ReturnType;
307
+ deleteCol: () => ReturnType;
308
+ };
309
+ }
310
+ }
311
+
312
+
299
313
  declare module '@tiptap/core' {
300
314
  interface Commands<ReturnType> {
301
315
  search: {
@@ -311,20 +325,6 @@ declare module '@tiptap/core' {
311
325
  }
312
326
 
313
327
 
314
- declare module '@tiptap/core' {
315
- interface Commands<ReturnType> {
316
- columns: {
317
- insertColumns: (attrs?: {
318
- cols: number;
319
- }) => ReturnType;
320
- addColBefore: () => ReturnType;
321
- addColAfter: () => ReturnType;
322
- deleteCol: () => ReturnType;
323
- };
324
- }
325
- }
326
-
327
-
328
328
  declare module '@tiptap/core' {
329
329
  interface Commands<ReturnType> {
330
330
  tableOfContents: {
@@ -130,15 +130,6 @@ declare module '@tiptap/core' {
130
130
  }
131
131
 
132
132
 
133
- declare module '@tiptap/core' {
134
- interface Commands<ReturnType> {
135
- excalidraw: {
136
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
137
- };
138
- }
139
- }
140
-
141
-
142
133
  declare module '@tiptap/core' {
143
134
  interface Commands<ReturnType> {
144
135
  emoji: {
@@ -160,6 +151,15 @@ declare module '@tiptap/core' {
160
151
  }
161
152
 
162
153
 
154
+ declare module '@tiptap/core' {
155
+ interface Commands<ReturnType> {
156
+ excalidraw: {
157
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
158
+ };
159
+ }
160
+ }
161
+
162
+
163
163
  declare module '@tiptap/core' {
164
164
  interface Commands<ReturnType> {
165
165
  exportWord: {
@@ -269,9 +269,8 @@ declare module '@tiptap/core' {
269
269
 
270
270
  declare module '@tiptap/core' {
271
271
  interface Commands<ReturnType> {
272
- lineHeight: {
273
- setLineHeight: (lineHeight: string) => ReturnType;
274
- unsetLineHeight: () => ReturnType;
272
+ katex: {
273
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
275
274
  };
276
275
  }
277
276
  }
@@ -279,8 +278,9 @@ declare module '@tiptap/core' {
279
278
 
280
279
  declare module '@tiptap/core' {
281
280
  interface Commands<ReturnType> {
282
- katex: {
283
- setKatex: (arg?: IKatexAttrs) => ReturnType;
281
+ lineHeight: {
282
+ setLineHeight: (lineHeight: string) => ReturnType;
283
+ unsetLineHeight: () => ReturnType;
284
284
  };
285
285
  }
286
286
  }
@@ -296,6 +296,20 @@ declare module '@tiptap/core' {
296
296
  }
297
297
 
298
298
 
299
+ declare module '@tiptap/core' {
300
+ interface Commands<ReturnType> {
301
+ columns: {
302
+ insertColumns: (attrs?: {
303
+ cols: number;
304
+ }) => ReturnType;
305
+ addColBefore: () => ReturnType;
306
+ addColAfter: () => ReturnType;
307
+ deleteCol: () => ReturnType;
308
+ };
309
+ }
310
+ }
311
+
312
+
299
313
  declare module '@tiptap/core' {
300
314
  interface Commands<ReturnType> {
301
315
  search: {
@@ -311,20 +325,6 @@ declare module '@tiptap/core' {
311
325
  }
312
326
 
313
327
 
314
- declare module '@tiptap/core' {
315
- interface Commands<ReturnType> {
316
- columns: {
317
- insertColumns: (attrs?: {
318
- cols: number;
319
- }) => ReturnType;
320
- addColBefore: () => ReturnType;
321
- addColAfter: () => ReturnType;
322
- deleteCol: () => ReturnType;
323
- };
324
- }
325
- }
326
-
327
-
328
328
  declare module '@tiptap/core' {
329
329
  interface Commands<ReturnType> {
330
330
  tableOfContents: {
package/lib/TextAlign.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { E as K } from "./index-DI9T3iLd.js";
2
2
  import { jsxs as u, jsx as l } from "react/jsx-runtime";
3
3
  import { useMemo as S } from "react";
4
- import { P as C, m as j, A as w, k as v, n as P, T as z, a as L, r as N, b as $, s as E } from "./RichTextEditor-CnWZ69eX.js";
4
+ import { P as C, m as j, A as w, k as v, n as P, T as z, a as L, r as N, b as $, s as E } from "./RichTextEditor-e6q30rbV.js";
5
5
  const J = K.create({
6
6
  name: "textAlign",
7
7
  addOptions() {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("./index-ByRfqzMr.cjs"),t=require("react/jsx-runtime"),l=require("react"),x=require("lucide-react"),n=require("./RichTextEditor-BKywwUM4.cjs"),g=require("./index-D_A0TBRA.cjs");function b(e){const{t:i}=g.useLocale(),c=l.useMemo(()=>[{name:"paragraph",label:i("editor.paragraph.tooltip"),iconName:"Heading1",isActive:()=>e.editor.isActive("paragraph")&&!e.editor.isActive("orderedList")&&!e.editor.isActive("bulletList")&&!e.editor.isActive("taskList"),action:()=>e.editor.chain().focus().clearNodes().run()},{name:"heading1",label:i("editor.heading.h1.tooltip"),isActive:()=>e.editor.isActive("heading",{level:1}),iconName:"Heading1",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:1}).run()},{name:"heading2",label:i("editor.heading.h2.tooltip"),isActive:()=>e.editor.isActive("heading",{level:2}),iconName:"Heading2",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:2}).run()},{name:"heading3",label:i("editor.heading.h3.tooltip"),isActive:()=>e.editor.isActive("heading",{level:3}),iconName:"Heading3",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:3}).run()},{name:"bulletList",label:i("editor.bulletlist.tooltip"),isActive:()=>e.editor.isActive("bulletList"),iconName:"List",action:()=>e.editor.chain().focus().clearNodes().toggleBulletList().run()},{name:"numberedList",label:i("editor.orderedlist.tooltip"),isActive:()=>e.editor.isActive("orderedList"),iconName:"ListOrdered",action:()=>e.editor.chain().focus().clearNodes().toggleOrderedList().run()},{name:"taskList",label:i("editor.tasklist.tooltip"),isActive:()=>e.editor.isActive("taskList"),iconName:"ListTodo",action:()=>e.editor.chain().focus().clearNodes().toggleTaskList().run()},{name:"blockquote",label:i("editor.blockquote.tooltip"),isActive:()=>e.editor.isActive("blockquote"),iconName:"TextQuote",action:()=>e.editor.chain().focus().clearNodes().toggleBlockquote().run()}],[e.editor,i]),a=l.useMemo(()=>c.findLast(o=>o.isActive())??{label:"Empty"},[c]);return t.jsxs(n.DropdownMenu,{children:[t.jsx(n.DropdownMenuTrigger,{asChild:!0,children:t.jsxs(n.Button,{className:"richtext-flex richtext-h-[32px] richtext-gap-1 richtext-px-1.5",variant:"ghost",children:[t.jsxs("span",{className:"richtext-whitespace-nowrap richtext-text-sm richtext-font-normal",children:[" ",a==null?void 0:a.label]}),t.jsx(x.ChevronDown,{className:"richtext-size-4"})]})}),t.jsx(n.DropdownMenuContent,{align:"start",className:"richtext-w-full richtext-p-1",hideWhenDetached:!0,sideOffset:5,children:c.map((o,d)=>{var r;const u=n.icons[o.iconName];return t.jsx(n.DropdownMenuCheckboxItem,{checked:((r=o.isActive)==null?void 0:r.call(o))||!1,className:"richtext-cursor-pointer",onClick:()=>o.action(),children:t.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-2 richtext-px-2",children:[t.jsx(u,{className:"richtext-h3 richtext-w-3"}),t.jsxs("span",{children:[" ",o.label]})]})},`text-bubble-${d}`)})})]})}const s=h.Extension.create({name:"text-bubble",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),toolbar:!1,button:()=>({component:b,componentProps:{}})}}});exports.TextBubble=s;exports.default=s;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("./index-ByRfqzMr.cjs"),t=require("react/jsx-runtime"),l=require("react"),x=require("lucide-react"),n=require("./RichTextEditor-DsUcQSbm.cjs"),g=require("./index-D_A0TBRA.cjs");function b(e){const{t:i}=g.useLocale(),c=l.useMemo(()=>[{name:"paragraph",label:i("editor.paragraph.tooltip"),iconName:"Heading1",isActive:()=>e.editor.isActive("paragraph")&&!e.editor.isActive("orderedList")&&!e.editor.isActive("bulletList")&&!e.editor.isActive("taskList"),action:()=>e.editor.chain().focus().clearNodes().run()},{name:"heading1",label:i("editor.heading.h1.tooltip"),isActive:()=>e.editor.isActive("heading",{level:1}),iconName:"Heading1",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:1}).run()},{name:"heading2",label:i("editor.heading.h2.tooltip"),isActive:()=>e.editor.isActive("heading",{level:2}),iconName:"Heading2",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:2}).run()},{name:"heading3",label:i("editor.heading.h3.tooltip"),isActive:()=>e.editor.isActive("heading",{level:3}),iconName:"Heading3",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:3}).run()},{name:"bulletList",label:i("editor.bulletlist.tooltip"),isActive:()=>e.editor.isActive("bulletList"),iconName:"List",action:()=>e.editor.chain().focus().clearNodes().toggleBulletList().run()},{name:"numberedList",label:i("editor.orderedlist.tooltip"),isActive:()=>e.editor.isActive("orderedList"),iconName:"ListOrdered",action:()=>e.editor.chain().focus().clearNodes().toggleOrderedList().run()},{name:"taskList",label:i("editor.tasklist.tooltip"),isActive:()=>e.editor.isActive("taskList"),iconName:"ListTodo",action:()=>e.editor.chain().focus().clearNodes().toggleTaskList().run()},{name:"blockquote",label:i("editor.blockquote.tooltip"),isActive:()=>e.editor.isActive("blockquote"),iconName:"TextQuote",action:()=>e.editor.chain().focus().clearNodes().toggleBlockquote().run()}],[e.editor,i]),a=l.useMemo(()=>c.findLast(o=>o.isActive())??{label:"Empty"},[c]);return t.jsxs(n.DropdownMenu,{children:[t.jsx(n.DropdownMenuTrigger,{asChild:!0,children:t.jsxs(n.Button,{className:"richtext-flex richtext-h-[32px] richtext-gap-1 richtext-px-1.5",variant:"ghost",children:[t.jsxs("span",{className:"richtext-whitespace-nowrap richtext-text-sm richtext-font-normal",children:[" ",a==null?void 0:a.label]}),t.jsx(x.ChevronDown,{className:"richtext-size-4"})]})}),t.jsx(n.DropdownMenuContent,{align:"start",className:"richtext-w-full richtext-p-1",hideWhenDetached:!0,sideOffset:5,children:c.map((o,d)=>{var r;const u=n.icons[o.iconName];return t.jsx(n.DropdownMenuCheckboxItem,{checked:((r=o.isActive)==null?void 0:r.call(o))||!1,className:"richtext-cursor-pointer",onClick:()=>o.action(),children:t.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-2 richtext-px-2",children:[t.jsx(u,{className:"richtext-h3 richtext-w-3"}),t.jsxs("span",{children:[" ",o.label]})]})},`text-bubble-${d}`)})})]})}const s=h.Extension.create({name:"text-bubble",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),toolbar:!1,button:()=>({component:b,componentProps:{}})}}});exports.TextBubble=s;exports.default=s;
@@ -120,15 +120,6 @@ declare module '@tiptap/core' {
120
120
  }
121
121
 
122
122
 
123
- declare module '@tiptap/core' {
124
- interface Commands<ReturnType> {
125
- excalidraw: {
126
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
127
- };
128
- }
129
- }
130
-
131
-
132
123
  declare module '@tiptap/core' {
133
124
  interface Commands<ReturnType> {
134
125
  emoji: {
@@ -150,6 +141,15 @@ declare module '@tiptap/core' {
150
141
  }
151
142
 
152
143
 
144
+ declare module '@tiptap/core' {
145
+ interface Commands<ReturnType> {
146
+ excalidraw: {
147
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
148
+ };
149
+ }
150
+ }
151
+
152
+
153
153
  declare module '@tiptap/core' {
154
154
  interface Commands<ReturnType> {
155
155
  exportWord: {
@@ -259,9 +259,8 @@ declare module '@tiptap/core' {
259
259
 
260
260
  declare module '@tiptap/core' {
261
261
  interface Commands<ReturnType> {
262
- lineHeight: {
263
- setLineHeight: (lineHeight: string) => ReturnType;
264
- unsetLineHeight: () => ReturnType;
262
+ katex: {
263
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
265
264
  };
266
265
  }
267
266
  }
@@ -269,8 +268,9 @@ declare module '@tiptap/core' {
269
268
 
270
269
  declare module '@tiptap/core' {
271
270
  interface Commands<ReturnType> {
272
- katex: {
273
- setKatex: (arg?: IKatexAttrs) => ReturnType;
271
+ lineHeight: {
272
+ setLineHeight: (lineHeight: string) => ReturnType;
273
+ unsetLineHeight: () => ReturnType;
274
274
  };
275
275
  }
276
276
  }
@@ -286,6 +286,20 @@ declare module '@tiptap/core' {
286
286
  }
287
287
 
288
288
 
289
+ declare module '@tiptap/core' {
290
+ interface Commands<ReturnType> {
291
+ columns: {
292
+ insertColumns: (attrs?: {
293
+ cols: number;
294
+ }) => ReturnType;
295
+ addColBefore: () => ReturnType;
296
+ addColAfter: () => ReturnType;
297
+ deleteCol: () => ReturnType;
298
+ };
299
+ }
300
+ }
301
+
302
+
289
303
  declare module '@tiptap/core' {
290
304
  interface Commands<ReturnType> {
291
305
  search: {
@@ -301,20 +315,6 @@ declare module '@tiptap/core' {
301
315
  }
302
316
 
303
317
 
304
- declare module '@tiptap/core' {
305
- interface Commands<ReturnType> {
306
- columns: {
307
- insertColumns: (attrs?: {
308
- cols: number;
309
- }) => ReturnType;
310
- addColBefore: () => ReturnType;
311
- addColAfter: () => ReturnType;
312
- deleteCol: () => ReturnType;
313
- };
314
- }
315
- }
316
-
317
-
318
318
  declare module '@tiptap/core' {
319
319
  interface Commands<ReturnType> {
320
320
  tableOfContents: {
@@ -120,15 +120,6 @@ declare module '@tiptap/core' {
120
120
  }
121
121
 
122
122
 
123
- declare module '@tiptap/core' {
124
- interface Commands<ReturnType> {
125
- excalidraw: {
126
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
127
- };
128
- }
129
- }
130
-
131
-
132
123
  declare module '@tiptap/core' {
133
124
  interface Commands<ReturnType> {
134
125
  emoji: {
@@ -150,6 +141,15 @@ declare module '@tiptap/core' {
150
141
  }
151
142
 
152
143
 
144
+ declare module '@tiptap/core' {
145
+ interface Commands<ReturnType> {
146
+ excalidraw: {
147
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
148
+ };
149
+ }
150
+ }
151
+
152
+
153
153
  declare module '@tiptap/core' {
154
154
  interface Commands<ReturnType> {
155
155
  exportWord: {
@@ -259,9 +259,8 @@ declare module '@tiptap/core' {
259
259
 
260
260
  declare module '@tiptap/core' {
261
261
  interface Commands<ReturnType> {
262
- lineHeight: {
263
- setLineHeight: (lineHeight: string) => ReturnType;
264
- unsetLineHeight: () => ReturnType;
262
+ katex: {
263
+ setKatex: (arg?: IKatexAttrs) => ReturnType;
265
264
  };
266
265
  }
267
266
  }
@@ -269,8 +268,9 @@ declare module '@tiptap/core' {
269
268
 
270
269
  declare module '@tiptap/core' {
271
270
  interface Commands<ReturnType> {
272
- katex: {
273
- setKatex: (arg?: IKatexAttrs) => ReturnType;
271
+ lineHeight: {
272
+ setLineHeight: (lineHeight: string) => ReturnType;
273
+ unsetLineHeight: () => ReturnType;
274
274
  };
275
275
  }
276
276
  }
@@ -286,6 +286,20 @@ declare module '@tiptap/core' {
286
286
  }
287
287
 
288
288
 
289
+ declare module '@tiptap/core' {
290
+ interface Commands<ReturnType> {
291
+ columns: {
292
+ insertColumns: (attrs?: {
293
+ cols: number;
294
+ }) => ReturnType;
295
+ addColBefore: () => ReturnType;
296
+ addColAfter: () => ReturnType;
297
+ deleteCol: () => ReturnType;
298
+ };
299
+ }
300
+ }
301
+
302
+
289
303
  declare module '@tiptap/core' {
290
304
  interface Commands<ReturnType> {
291
305
  search: {
@@ -301,20 +315,6 @@ declare module '@tiptap/core' {
301
315
  }
302
316
 
303
317
 
304
- declare module '@tiptap/core' {
305
- interface Commands<ReturnType> {
306
- columns: {
307
- insertColumns: (attrs?: {
308
- cols: number;
309
- }) => ReturnType;
310
- addColBefore: () => ReturnType;
311
- addColAfter: () => ReturnType;
312
- deleteCol: () => ReturnType;
313
- };
314
- }
315
- }
316
-
317
-
318
318
  declare module '@tiptap/core' {
319
319
  interface Commands<ReturnType> {
320
320
  tableOfContents: {
package/lib/TextBubble.js CHANGED
@@ -2,7 +2,7 @@ import { E as h } from "./index-DI9T3iLd.js";
2
2
  import { jsxs as o, jsx as a } from "react/jsx-runtime";
3
3
  import { useMemo as l } from "react";
4
4
  import { ChevronDown as u } from "lucide-react";
5
- import { D as m, e as g, B as x, f as b, i as v, h as f } from "./RichTextEditor-CnWZ69eX.js";
5
+ import { D as m, e as g, B as x, f as b, i as v, h as f } from "./RichTextEditor-e6q30rbV.js";
6
6
  import { u as N } from "./index-CsK90iVd.js";
7
7
  function A(e) {
8
8
  const { t } = N(), c = l(() => [