reactjs-tiptap-editor 0.3.3 → 0.3.4

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 (227) hide show
  1. package/lib/{ActionMenuButton-D5CqiauP.cjs → ActionMenuButton-DWudb-EA.cjs} +1 -1
  2. package/lib/{ActionMenuButton-DJQVpcjj.js → ActionMenuButton-_fmUfylg.js} +1 -1
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.d.cts +17 -5
  5. package/lib/Attachment.d.ts +17 -5
  6. package/lib/Attachment.js +2 -2
  7. package/lib/Blockquote.cjs +1 -1
  8. package/lib/Blockquote.d.cts +17 -5
  9. package/lib/Blockquote.d.ts +17 -5
  10. package/lib/Blockquote.js +1 -1
  11. package/lib/Bold.cjs +1 -1
  12. package/lib/Bold.d.cts +17 -5
  13. package/lib/Bold.d.ts +17 -5
  14. package/lib/Bold.js +1 -1
  15. package/lib/BulletList.cjs +1 -1
  16. package/lib/BulletList.d.cts +17 -5
  17. package/lib/BulletList.d.ts +17 -5
  18. package/lib/BulletList.js +1 -1
  19. package/lib/Clear.cjs +1 -1
  20. package/lib/Clear.d.cts +17 -5
  21. package/lib/Clear.d.ts +17 -5
  22. package/lib/Clear.js +1 -1
  23. package/lib/Code.cjs +1 -1
  24. package/lib/Code.d.cts +17 -5
  25. package/lib/Code.d.ts +17 -5
  26. package/lib/Code.js +1 -1
  27. package/lib/CodeBlock.cjs +1 -1
  28. package/lib/CodeBlock.d.cts +17 -5
  29. package/lib/CodeBlock.d.ts +17 -5
  30. package/lib/CodeBlock.js +1 -1
  31. package/lib/CodeView.cjs +1 -0
  32. package/lib/CodeView.d.cts +354 -0
  33. package/lib/CodeView.d.ts +354 -0
  34. package/lib/CodeView.js +53 -0
  35. package/lib/Color.cjs +1 -1
  36. package/lib/Color.d.cts +17 -5
  37. package/lib/Color.d.ts +17 -5
  38. package/lib/Color.js +2 -2
  39. package/lib/Document.d.cts +17 -5
  40. package/lib/Document.d.ts +17 -5
  41. package/lib/{Drawer-82lBASmO.js → Drawer-C9nzP3w1.js} +18 -18
  42. package/lib/{Drawer-DLV1rOAE.cjs → Drawer-y2uXLloa.cjs} +1 -1
  43. package/lib/Drawer.cjs +1 -1
  44. package/lib/Drawer.d.cts +17 -5
  45. package/lib/Drawer.d.ts +17 -5
  46. package/lib/Drawer.js +2 -2
  47. package/lib/Emoji.cjs +1 -1
  48. package/lib/Emoji.d.cts +17 -5
  49. package/lib/Emoji.d.ts +17 -5
  50. package/lib/Emoji.js +2 -2
  51. package/lib/{Excalidraw-CsD-4eCA.js → Excalidraw-BihHDjEo.js} +2 -2
  52. package/lib/{Excalidraw-BuGGHrVK.cjs → Excalidraw-DMKzooX1.cjs} +1 -1
  53. package/lib/Excalidraw.cjs +1 -1
  54. package/lib/Excalidraw.d.cts +17 -5
  55. package/lib/Excalidraw.d.ts +17 -5
  56. package/lib/Excalidraw.js +1 -1
  57. package/lib/ExportPdf.cjs +1 -1
  58. package/lib/ExportPdf.d.cts +17 -5
  59. package/lib/ExportPdf.d.ts +17 -5
  60. package/lib/ExportPdf.js +1 -1
  61. package/lib/ExportWord.cjs +1 -1
  62. package/lib/ExportWord.d.cts +17 -5
  63. package/lib/ExportWord.d.ts +17 -5
  64. package/lib/ExportWord.js +1 -1
  65. package/lib/FontFamily.cjs +1 -1
  66. package/lib/FontFamily.d.cts +17 -5
  67. package/lib/FontFamily.d.ts +17 -5
  68. package/lib/FontFamily.js +3 -3
  69. package/lib/FontSize.cjs +1 -1
  70. package/lib/FontSize.d.cts +17 -5
  71. package/lib/FontSize.d.ts +17 -5
  72. package/lib/FontSize.js +3 -3
  73. package/lib/FormatPainter.cjs +1 -1
  74. package/lib/FormatPainter.d.cts +17 -5
  75. package/lib/FormatPainter.d.ts +17 -5
  76. package/lib/FormatPainter.js +1 -1
  77. package/lib/Heading.cjs +1 -1
  78. package/lib/Heading.d.cts +17 -5
  79. package/lib/Heading.d.ts +17 -5
  80. package/lib/Heading.js +2 -2
  81. package/lib/Highlight.cjs +1 -1
  82. package/lib/Highlight.d.cts +17 -5
  83. package/lib/Highlight.d.ts +17 -5
  84. package/lib/Highlight.js +1 -1
  85. package/lib/History.cjs +1 -1
  86. package/lib/History.d.cts +17 -5
  87. package/lib/History.d.ts +17 -5
  88. package/lib/History.js +1 -1
  89. package/lib/HorizontalRule.cjs +1 -1
  90. package/lib/HorizontalRule.d.cts +17 -5
  91. package/lib/HorizontalRule.d.ts +17 -5
  92. package/lib/HorizontalRule.js +1 -1
  93. package/lib/Iframe.cjs +1 -1
  94. package/lib/Iframe.d.cts +17 -5
  95. package/lib/Iframe.d.ts +17 -5
  96. package/lib/Iframe.js +1 -1
  97. package/lib/Image.cjs +1 -1
  98. package/lib/Image.d.cts +17 -5
  99. package/lib/Image.d.ts +17 -5
  100. package/lib/Image.js +1 -1
  101. package/lib/ImageGif.cjs +1 -1
  102. package/lib/ImageGif.d.cts +17 -5
  103. package/lib/ImageGif.d.ts +17 -5
  104. package/lib/ImageGif.js +1 -1
  105. package/lib/ImportWord.cjs +1 -1
  106. package/lib/ImportWord.d.cts +17 -5
  107. package/lib/ImportWord.d.ts +17 -5
  108. package/lib/ImportWord.js +2 -2
  109. package/lib/Indent.cjs +1 -1
  110. package/lib/Indent.d.cts +17 -5
  111. package/lib/Indent.d.ts +17 -5
  112. package/lib/Indent.js +1 -1
  113. package/lib/Italic.cjs +1 -1
  114. package/lib/Italic.d.cts +17 -5
  115. package/lib/Italic.d.ts +17 -5
  116. package/lib/Italic.js +1 -1
  117. package/lib/Katex.cjs +1 -1
  118. package/lib/Katex.d.cts +17 -5
  119. package/lib/Katex.d.ts +17 -5
  120. package/lib/Katex.js +3 -3
  121. package/lib/LineHeight.cjs +1 -1
  122. package/lib/LineHeight.d.cts +17 -5
  123. package/lib/LineHeight.d.ts +17 -5
  124. package/lib/LineHeight.js +8 -8
  125. package/lib/Link.cjs +1 -1
  126. package/lib/Link.d.cts +17 -5
  127. package/lib/Link.d.ts +17 -5
  128. package/lib/Link.js +1 -1
  129. package/lib/ListItem.d.cts +17 -5
  130. package/lib/ListItem.d.ts +17 -5
  131. package/lib/Mention.d.cts +17 -5
  132. package/lib/Mention.d.ts +17 -5
  133. package/lib/Mermaid.cjs +1 -1
  134. package/lib/Mermaid.d.cts +17 -5
  135. package/lib/Mermaid.d.ts +17 -5
  136. package/lib/Mermaid.js +14 -14
  137. package/lib/MoreMark.cjs +1 -1
  138. package/lib/MoreMark.d.cts +17 -5
  139. package/lib/MoreMark.d.ts +17 -5
  140. package/lib/MoreMark.js +1 -1
  141. package/lib/MultiColumn.cjs +1 -1
  142. package/lib/MultiColumn.d.cts +17 -5
  143. package/lib/MultiColumn.d.ts +17 -5
  144. package/lib/MultiColumn.js +1 -1
  145. package/lib/OrderedList.cjs +1 -1
  146. package/lib/OrderedList.d.cts +17 -5
  147. package/lib/OrderedList.d.ts +17 -5
  148. package/lib/OrderedList.js +1 -1
  149. package/lib/{RichTextEditor-BwuyWeH3.js → RichTextEditor-D5VO1y1d.js} +727 -716
  150. package/lib/RichTextEditor-qp9T7xuG.cjs +137 -0
  151. package/lib/SearchAndReplace.cjs +1 -1
  152. package/lib/SearchAndReplace.d.cts +17 -5
  153. package/lib/SearchAndReplace.d.ts +17 -5
  154. package/lib/SearchAndReplace.js +2 -2
  155. package/lib/Selection.d.cts +17 -5
  156. package/lib/Selection.d.ts +17 -5
  157. package/lib/SlashCommand.cjs +1 -1
  158. package/lib/SlashCommand.d.cts +17 -5
  159. package/lib/SlashCommand.d.ts +17 -5
  160. package/lib/SlashCommand.js +2 -2
  161. package/lib/Strike.cjs +1 -1
  162. package/lib/Strike.d.cts +17 -5
  163. package/lib/Strike.d.ts +17 -5
  164. package/lib/Strike.js +1 -1
  165. package/lib/SubAndSuperScript.cjs +1 -1
  166. package/lib/SubAndSuperScript.d.cts +17 -5
  167. package/lib/SubAndSuperScript.d.ts +17 -5
  168. package/lib/SubAndSuperScript.js +1 -1
  169. package/lib/Table.cjs +1 -1
  170. package/lib/Table.d.cts +17 -5
  171. package/lib/Table.d.ts +17 -5
  172. package/lib/Table.js +2 -2
  173. package/lib/TableOfContent.cjs +1 -1
  174. package/lib/TableOfContent.d.cts +17 -5
  175. package/lib/TableOfContent.d.ts +17 -5
  176. package/lib/TableOfContent.js +4 -4
  177. package/lib/TaskList.cjs +1 -1
  178. package/lib/TaskList.d.cts +17 -5
  179. package/lib/TaskList.d.ts +17 -5
  180. package/lib/TaskList.js +1 -1
  181. package/lib/TextAlign.cjs +1 -1
  182. package/lib/TextAlign.d.cts +17 -5
  183. package/lib/TextAlign.d.ts +17 -5
  184. package/lib/TextAlign.js +1 -1
  185. package/lib/TextBubble.cjs +1 -1
  186. package/lib/TextBubble.d.cts +17 -5
  187. package/lib/TextBubble.d.ts +17 -5
  188. package/lib/TextBubble.js +2 -2
  189. package/lib/TextDirection.cjs +1 -1
  190. package/lib/TextDirection.d.cts +17 -5
  191. package/lib/TextDirection.d.ts +17 -5
  192. package/lib/TextDirection.js +1 -1
  193. package/lib/TextUnderline.cjs +1 -1
  194. package/lib/TextUnderline.d.cts +17 -5
  195. package/lib/TextUnderline.d.ts +17 -5
  196. package/lib/TextUnderline.js +1 -1
  197. package/lib/TrailingNode.d.cts +17 -5
  198. package/lib/TrailingNode.d.ts +17 -5
  199. package/lib/{Twitter-Bstfoi9X.js → Twitter-CH7Z4Iof.js} +2 -2
  200. package/lib/{Twitter-D41ISCsH.cjs → Twitter-CgVy5oQW.cjs} +1 -1
  201. package/lib/Twitter.cjs +1 -1
  202. package/lib/Twitter.d.cts +17 -5
  203. package/lib/Twitter.d.ts +17 -5
  204. package/lib/Twitter.js +1 -1
  205. package/lib/Video.cjs +1 -1
  206. package/lib/Video.d.cts +17 -5
  207. package/lib/Video.d.ts +17 -5
  208. package/lib/Video.js +2 -2
  209. package/lib/bubble-extra.cjs +1 -1
  210. package/lib/bubble-extra.d.cts +17 -5
  211. package/lib/bubble-extra.d.ts +17 -5
  212. package/lib/bubble-extra.js +6 -6
  213. package/lib/{index-D9llIWB5.js → index-D-DR0FPY.js} +18 -13
  214. package/lib/index-Dz3YxLE7.cjs +1 -0
  215. package/lib/index.cjs +1 -1
  216. package/lib/index.d.cts +18 -5
  217. package/lib/index.d.ts +18 -5
  218. package/lib/index.js +3 -3
  219. package/lib/locale-bundle.cjs +1 -1
  220. package/lib/locale-bundle.d.cts +22 -5
  221. package/lib/locale-bundle.d.ts +22 -5
  222. package/lib/locale-bundle.js +1 -1
  223. package/lib/{textarea-CfH4-Iyy.js → textarea-CDp8O87y.js} +1 -1
  224. package/lib/{textarea-ZGJkH6ji.cjs → textarea-CqMUEJEj.cjs} +1 -1
  225. package/package.json +14 -1
  226. package/lib/RichTextEditor-NfX6yV6A.cjs +0 -137
  227. package/lib/index-LbrE7K9i.cjs +0 -1
package/lib/History.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./index-COecBbaE.cjs"),g=require("react/jsx-runtime"),M=require("./RichTextEditor-NfX6yV6A.cjs");var C=200,f=function(){};f.prototype.append=function(e){return e.length?(e=f.from(e),!this.length&&e||e.length<C&&this.leafAppend(e)||this.length<C&&e.leafPrepend(this)||this.appendInner(e)):this};f.prototype.prepend=function(e){return e.length?f.from(e).append(this):this};f.prototype.appendInner=function(e){return new k(this,e)};f.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?f.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))};f.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};f.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)};f.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(s,l){return r.push(e(s,l))},t,n),r};f.from=function(e){return e instanceof f?e:e&&e.length?new A(e):f.empty};var A=function(i){function e(n){i.call(this),this.values=n}i&&(e.__proto__=i),e.prototype=Object.create(i&&i.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(r,s){return r==0&&s==this.length?this:new e(this.values.slice(r,s))},e.prototype.getInner=function(r){return this.values[r]},e.prototype.forEachInner=function(r,s,l,o){for(var p=s;p<l;p++)if(r(this.values[p],o+p)===!1)return!1},e.prototype.forEachInvertedInner=function(r,s,l,o){for(var p=s-1;p>=l;p--)if(r(this.values[p],o+p)===!1)return!1},e.prototype.leafAppend=function(r){if(this.length+r.length<=C)return new e(this.values.concat(r.flatten()))},e.prototype.leafPrepend=function(r){if(this.length+r.length<=C)return new e(r.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e}(f);f.empty=new A([]);var k=function(i){function e(t,n){i.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return i&&(e.__proto__=i),e.prototype=Object.create(i&&i.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(n){return n<this.left.length?this.left.get(n):this.right.get(n-this.left.length)},e.prototype.forEachInner=function(n,r,s,l){var o=this.left.length;if(r<o&&this.left.forEachInner(n,r,Math.min(s,o),l)===!1||s>o&&this.right.forEachInner(n,Math.max(r-o,0),Math.min(this.length,s)-o,l+o)===!1)return!1},e.prototype.forEachInvertedInner=function(n,r,s,l){var o=this.left.length;if(r>o&&this.right.forEachInvertedInner(n,r-o,Math.max(s,o)-o,l+o)===!1||s<o&&this.left.forEachInvertedInner(n,Math.min(r,o),s,l)===!1)return!1},e.prototype.sliceInner=function(n,r){if(n==0&&r==this.length)return this;var s=this.left.length;return r<=s?this.left.slice(n,r):n>=s?this.right.slice(n-s,r-s):this.left.slice(n,s).append(this.right.slice(0,r-s))},e.prototype.leafAppend=function(n){var r=this.right.leafAppend(n);if(r)return new e(this.left,r)},e.prototype.leafPrepend=function(n){var r=this.left.leafPrepend(n);if(r)return new e(r,this.right)},e.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new e(this.left,new e(this.right,n)):new e(this,n)},e}(f);const S=500;class m{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let n=this.items.length;for(;;n--)if(this.items.get(n-1).selection){--n;break}let r,s;t&&(r=this.remapping(n,this.items.length),s=r.maps.length);let l=e.tr,o,p,a=[],c=[];return this.items.forEach((u,h)=>{if(!u.step){r||(r=this.remapping(n,h+1),s=r.maps.length),s--,c.push(u);return}if(r){c.push(new v(u.map));let d=u.step.map(r.slice(s)),w;d&&l.maybeStep(d).doc&&(w=l.mapping.maps[l.mapping.maps.length-1],a.push(new v(w,void 0,void 0,a.length+c.length))),s--,w&&r.appendMap(w,s)}else l.maybeStep(u.step);if(u.selection)return o=r?u.selection.map(r.slice(s)):u.selection,p=new m(this.items.slice(0,n).append(c.reverse().concat(a)),this.eventCount-1),!1},this.items.length,0),{remaining:p,transform:l,selection:o}}addTransform(e,t,n,r){let s=[],l=this.eventCount,o=this.items,p=!r&&o.length?o.get(o.length-1):null;for(let c=0;c<e.steps.length;c++){let u=e.steps[c].invert(e.docs[c]),h=new v(e.mapping.maps[c],u,t),d;(d=p&&p.merge(h))&&(h=d,c?s.pop():o=o.slice(0,o.length-1)),s.push(h),t&&(l++,t=void 0),r||(p=h)}let a=l-n.depth;return a>L&&(o=G(o,a),l-=a),new m(o.append(s),l)}remapping(e,t){let n=new x.Mapping;return this.items.forEach((r,s)=>{let l=r.mirrorOffset!=null&&s-r.mirrorOffset>=e?n.maps.length-r.mirrorOffset:void 0;n.appendMap(r.map,l)},e,t),n}addMaps(e){return this.eventCount==0?this:new m(this.items.append(e.map(t=>new v(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),s=e.mapping,l=e.steps.length,o=this.eventCount;this.items.forEach(h=>{h.selection&&o--},r);let p=t;this.items.forEach(h=>{let d=s.getMirror(--p);if(d==null)return;l=Math.min(l,d);let w=s.maps[d];if(h.step){let _=e.steps[d].invert(e.docs[d]),b=h.selection&&h.selection.map(s.slice(p+1,d));b&&o++,n.push(new v(w,_,b))}else n.push(new v(w))},r);let a=[];for(let h=t;h<l;h++)a.push(new v(s.maps[h]));let c=this.items.slice(0,r).append(a).append(n),u=new m(c,o);return u.emptyItemCount()>S&&(u=u.compress(this.items.length-n.length)),u}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],s=0;return this.items.forEach((l,o)=>{if(o>=e)r.push(l),l.selection&&s++;else if(l.step){let p=l.step.map(t.slice(n)),a=p&&p.getMap();if(n--,a&&t.appendMap(a,n),p){let c=l.selection&&l.selection.map(t.slice(n));c&&s++;let u=new v(a.invert(),p,c),h,d=r.length-1;(h=r.length&&r[d].merge(u))?r[d]=h:r.push(u)}}else l.map&&n--},this.items.length,0),new m(f.from(r.reverse()),s)}}m.empty=new m(f.empty,0);function G(i,e){let t;return i.forEach((n,r)=>{if(n.selection&&e--==0)return t=r,!1}),i.slice(t)}class v{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new v(t.getMap().invert(),t,this.selection)}}}class y{constructor(e,t,n,r,s){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=s}}const L=20;function F(i,e,t,n){let r=t.getMeta(I),s;if(r)return r.historyState;t.getMeta(R)&&(i=new y(i.done,i.undone,null,0,-1));let l=t.getMeta("appendedTransaction");if(t.steps.length==0)return i;if(l&&l.getMeta(I))return l.getMeta(I).redo?new y(i.done.addTransform(t,void 0,n,E(e)),i.undone,O(t.mapping.maps),i.prevTime,i.prevComposition):new y(i.done,i.undone.addTransform(t,void 0,n,E(e)),null,i.prevTime,i.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(l&&l.getMeta("addToHistory")===!1)){let o=t.getMeta("composition"),p=i.prevTime==0||!l&&i.prevComposition!=o&&(i.prevTime<(t.time||0)-n.newGroupDelay||!z(t,i.prevRanges)),a=l?T(i.prevRanges,t.mapping):O(t.mapping.maps);return new y(i.done.addTransform(t,p?e.selection.getBookmark():void 0,n,E(e)),m.empty,a,t.time,o??i.prevComposition)}else return(s=t.getMeta("rebased"))?new y(i.done.rebased(t,s),i.undone.rebased(t,s),T(i.prevRanges,t.mapping),i.prevTime,i.prevComposition):new y(i.done.addMaps(t.mapping.maps),i.undone.addMaps(t.mapping.maps),T(i.prevRanges,t.mapping),i.prevTime,i.prevComposition)}function z(i,e){if(!e)return!1;if(!i.docChanged)return!0;let t=!1;return i.mapping.maps[0].forEach((n,r)=>{for(let s=0;s<e.length;s+=2)n<=e[s+1]&&r>=e[s]&&(t=!0)}),t}function O(i){let e=[];for(let t=i.length-1;t>=0&&e.length==0;t--)i[t].forEach((n,r,s,l)=>e.push(s,l));return e}function T(i,e){if(!i)return null;let t=[];for(let n=0;n<i.length;n+=2){let r=e.map(i[n],1),s=e.map(i[n+1],-1);r<=s&&t.push(r,s)}return t}function N(i,e,t){let n=E(e),r=I.get(e).spec.config,s=(t?i.undone:i.done).popEvent(e,n);if(!s)return null;let l=s.selection.resolve(s.transform.doc),o=(t?i.done:i.undone).addTransform(s.transform,e.selection.getBookmark(),r,n),p=new y(t?o:s.remaining,t?s.remaining:o,null,0,-1);return s.transform.setSelection(l).setMeta(I,{redo:t,historyState:p})}let P=!1,j=null;function E(i){let e=i.plugins;if(j!=e){P=!1,j=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){P=!0;break}}return P}const I=new x.PluginKey("history"),R=new x.PluginKey("closeHistory");function U(i={}){return i={depth:i.depth||100,newGroupDelay:i.newGroupDelay||500},new x.Plugin({key:I,state:{init(){return new y(m.empty,m.empty,null,0,-1)},apply(e,t,n){return F(t,n,e,i)}},config:i,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r=n=="historyUndo"?D:n=="historyRedo"?K:null;return r?(t.preventDefault(),r(e.state,e.dispatch)):!1}}}})}function H(i,e){return(t,n)=>{let r=I.getState(t);if(!r||(i?r.undone:r.done).eventCount==0)return!1;if(n){let s=N(r,t,i);s&&n(e?s.scrollIntoView():s)}return!0}}const D=H(!1,!0),K=H(!0,!0),Z=x.Extension.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:i,dispatch:e})=>D(i,e),redo:()=>({state:i,dispatch:e})=>K(i,e)}},addProseMirrorPlugins(){return[U(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}});function $(i){var a;const{icon:e=void 0,tooltip:t=void 0,customClass:n="",tooltipOptions:r={},action:s=void 0,isActive:l=void 0,children:o}=i,p=M.icons[e];return g.jsxs(M.Tooltip,{children:[g.jsx(M.TooltipTrigger,{asChild:!0,children:g.jsxs(M.Toggle,{size:"sm",className:`richtext-w-[32px] richtext-h-[32px] ${n}`,disabled:l==null?void 0:l(),onClick:s,children:[p&&g.jsx(p,{className:"richtext-w-4 richtext-h-4"}),o&&g.jsx(g.Fragment,{children:o})]})}),t&&g.jsx(M.TooltipContent,{...r,children:g.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-items-center richtext-text-center richtext-max-w-24",children:[g.jsx("div",{children:t}),!!((a=i==null?void 0:i.shortcutKeys)!=null&&a.length)&&g.jsx("span",{children:M.getShortcutKeys(i==null?void 0:i.shortcutKeys)})]})})]})}const V=["undo","redo"],W=Z.extend({addOptions(){var i;return{...(i=this.parent)==null?void 0:i.call(this),depth:100,newGroupDelay:500,button:({editor:e,t})=>V.map(n=>({component:$,componentProps:{action:()=>{n==="undo"&&e.chain().focus().undo().run(),n==="redo"&&e.chain().focus().redo().run()},shortcutKeys:n==="undo"?["mod","Z"]:["shift","mod","Z"],disabled:n==="undo"?!e.can().undo():!e.can().redo(),isActive:()=>n==="undo"?!e.can().undo():!e.can().redo(),icon:n==="undo"?"Undo2":"Redo2",tooltip:t(`editor.${n}.tooltip`)}}))}}});exports.History=W;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("./index-COecBbaE.cjs"),g=require("react/jsx-runtime"),M=require("./RichTextEditor-qp9T7xuG.cjs");var C=200,f=function(){};f.prototype.append=function(e){return e.length?(e=f.from(e),!this.length&&e||e.length<C&&this.leafAppend(e)||this.length<C&&e.leafPrepend(this)||this.appendInner(e)):this};f.prototype.prepend=function(e){return e.length?f.from(e).append(this):this};f.prototype.appendInner=function(e){return new k(this,e)};f.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?f.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))};f.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};f.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)};f.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(s,l){return r.push(e(s,l))},t,n),r};f.from=function(e){return e instanceof f?e:e&&e.length?new A(e):f.empty};var A=function(i){function e(n){i.call(this),this.values=n}i&&(e.__proto__=i),e.prototype=Object.create(i&&i.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(r,s){return r==0&&s==this.length?this:new e(this.values.slice(r,s))},e.prototype.getInner=function(r){return this.values[r]},e.prototype.forEachInner=function(r,s,l,o){for(var p=s;p<l;p++)if(r(this.values[p],o+p)===!1)return!1},e.prototype.forEachInvertedInner=function(r,s,l,o){for(var p=s-1;p>=l;p--)if(r(this.values[p],o+p)===!1)return!1},e.prototype.leafAppend=function(r){if(this.length+r.length<=C)return new e(this.values.concat(r.flatten()))},e.prototype.leafPrepend=function(r){if(this.length+r.length<=C)return new e(r.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e}(f);f.empty=new A([]);var k=function(i){function e(t,n){i.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return i&&(e.__proto__=i),e.prototype=Object.create(i&&i.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(n){return n<this.left.length?this.left.get(n):this.right.get(n-this.left.length)},e.prototype.forEachInner=function(n,r,s,l){var o=this.left.length;if(r<o&&this.left.forEachInner(n,r,Math.min(s,o),l)===!1||s>o&&this.right.forEachInner(n,Math.max(r-o,0),Math.min(this.length,s)-o,l+o)===!1)return!1},e.prototype.forEachInvertedInner=function(n,r,s,l){var o=this.left.length;if(r>o&&this.right.forEachInvertedInner(n,r-o,Math.max(s,o)-o,l+o)===!1||s<o&&this.left.forEachInvertedInner(n,Math.min(r,o),s,l)===!1)return!1},e.prototype.sliceInner=function(n,r){if(n==0&&r==this.length)return this;var s=this.left.length;return r<=s?this.left.slice(n,r):n>=s?this.right.slice(n-s,r-s):this.left.slice(n,s).append(this.right.slice(0,r-s))},e.prototype.leafAppend=function(n){var r=this.right.leafAppend(n);if(r)return new e(this.left,r)},e.prototype.leafPrepend=function(n){var r=this.left.leafPrepend(n);if(r)return new e(r,this.right)},e.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new e(this.left,new e(this.right,n)):new e(this,n)},e}(f);const S=500;class m{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let n=this.items.length;for(;;n--)if(this.items.get(n-1).selection){--n;break}let r,s;t&&(r=this.remapping(n,this.items.length),s=r.maps.length);let l=e.tr,o,p,a=[],c=[];return this.items.forEach((u,h)=>{if(!u.step){r||(r=this.remapping(n,h+1),s=r.maps.length),s--,c.push(u);return}if(r){c.push(new v(u.map));let d=u.step.map(r.slice(s)),w;d&&l.maybeStep(d).doc&&(w=l.mapping.maps[l.mapping.maps.length-1],a.push(new v(w,void 0,void 0,a.length+c.length))),s--,w&&r.appendMap(w,s)}else l.maybeStep(u.step);if(u.selection)return o=r?u.selection.map(r.slice(s)):u.selection,p=new m(this.items.slice(0,n).append(c.reverse().concat(a)),this.eventCount-1),!1},this.items.length,0),{remaining:p,transform:l,selection:o}}addTransform(e,t,n,r){let s=[],l=this.eventCount,o=this.items,p=!r&&o.length?o.get(o.length-1):null;for(let c=0;c<e.steps.length;c++){let u=e.steps[c].invert(e.docs[c]),h=new v(e.mapping.maps[c],u,t),d;(d=p&&p.merge(h))&&(h=d,c?s.pop():o=o.slice(0,o.length-1)),s.push(h),t&&(l++,t=void 0),r||(p=h)}let a=l-n.depth;return a>L&&(o=G(o,a),l-=a),new m(o.append(s),l)}remapping(e,t){let n=new x.Mapping;return this.items.forEach((r,s)=>{let l=r.mirrorOffset!=null&&s-r.mirrorOffset>=e?n.maps.length-r.mirrorOffset:void 0;n.appendMap(r.map,l)},e,t),n}addMaps(e){return this.eventCount==0?this:new m(this.items.append(e.map(t=>new v(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),s=e.mapping,l=e.steps.length,o=this.eventCount;this.items.forEach(h=>{h.selection&&o--},r);let p=t;this.items.forEach(h=>{let d=s.getMirror(--p);if(d==null)return;l=Math.min(l,d);let w=s.maps[d];if(h.step){let _=e.steps[d].invert(e.docs[d]),b=h.selection&&h.selection.map(s.slice(p+1,d));b&&o++,n.push(new v(w,_,b))}else n.push(new v(w))},r);let a=[];for(let h=t;h<l;h++)a.push(new v(s.maps[h]));let c=this.items.slice(0,r).append(a).append(n),u=new m(c,o);return u.emptyItemCount()>S&&(u=u.compress(this.items.length-n.length)),u}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],s=0;return this.items.forEach((l,o)=>{if(o>=e)r.push(l),l.selection&&s++;else if(l.step){let p=l.step.map(t.slice(n)),a=p&&p.getMap();if(n--,a&&t.appendMap(a,n),p){let c=l.selection&&l.selection.map(t.slice(n));c&&s++;let u=new v(a.invert(),p,c),h,d=r.length-1;(h=r.length&&r[d].merge(u))?r[d]=h:r.push(u)}}else l.map&&n--},this.items.length,0),new m(f.from(r.reverse()),s)}}m.empty=new m(f.empty,0);function G(i,e){let t;return i.forEach((n,r)=>{if(n.selection&&e--==0)return t=r,!1}),i.slice(t)}class v{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new v(t.getMap().invert(),t,this.selection)}}}class y{constructor(e,t,n,r,s){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=s}}const L=20;function F(i,e,t,n){let r=t.getMeta(I),s;if(r)return r.historyState;t.getMeta(R)&&(i=new y(i.done,i.undone,null,0,-1));let l=t.getMeta("appendedTransaction");if(t.steps.length==0)return i;if(l&&l.getMeta(I))return l.getMeta(I).redo?new y(i.done.addTransform(t,void 0,n,E(e)),i.undone,O(t.mapping.maps),i.prevTime,i.prevComposition):new y(i.done,i.undone.addTransform(t,void 0,n,E(e)),null,i.prevTime,i.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(l&&l.getMeta("addToHistory")===!1)){let o=t.getMeta("composition"),p=i.prevTime==0||!l&&i.prevComposition!=o&&(i.prevTime<(t.time||0)-n.newGroupDelay||!z(t,i.prevRanges)),a=l?T(i.prevRanges,t.mapping):O(t.mapping.maps);return new y(i.done.addTransform(t,p?e.selection.getBookmark():void 0,n,E(e)),m.empty,a,t.time,o??i.prevComposition)}else return(s=t.getMeta("rebased"))?new y(i.done.rebased(t,s),i.undone.rebased(t,s),T(i.prevRanges,t.mapping),i.prevTime,i.prevComposition):new y(i.done.addMaps(t.mapping.maps),i.undone.addMaps(t.mapping.maps),T(i.prevRanges,t.mapping),i.prevTime,i.prevComposition)}function z(i,e){if(!e)return!1;if(!i.docChanged)return!0;let t=!1;return i.mapping.maps[0].forEach((n,r)=>{for(let s=0;s<e.length;s+=2)n<=e[s+1]&&r>=e[s]&&(t=!0)}),t}function O(i){let e=[];for(let t=i.length-1;t>=0&&e.length==0;t--)i[t].forEach((n,r,s,l)=>e.push(s,l));return e}function T(i,e){if(!i)return null;let t=[];for(let n=0;n<i.length;n+=2){let r=e.map(i[n],1),s=e.map(i[n+1],-1);r<=s&&t.push(r,s)}return t}function N(i,e,t){let n=E(e),r=I.get(e).spec.config,s=(t?i.undone:i.done).popEvent(e,n);if(!s)return null;let l=s.selection.resolve(s.transform.doc),o=(t?i.done:i.undone).addTransform(s.transform,e.selection.getBookmark(),r,n),p=new y(t?o:s.remaining,t?s.remaining:o,null,0,-1);return s.transform.setSelection(l).setMeta(I,{redo:t,historyState:p})}let P=!1,j=null;function E(i){let e=i.plugins;if(j!=e){P=!1,j=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){P=!0;break}}return P}const I=new x.PluginKey("history"),R=new x.PluginKey("closeHistory");function U(i={}){return i={depth:i.depth||100,newGroupDelay:i.newGroupDelay||500},new x.Plugin({key:I,state:{init(){return new y(m.empty,m.empty,null,0,-1)},apply(e,t,n){return F(t,n,e,i)}},config:i,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r=n=="historyUndo"?D:n=="historyRedo"?K:null;return r?(t.preventDefault(),r(e.state,e.dispatch)):!1}}}})}function H(i,e){return(t,n)=>{let r=I.getState(t);if(!r||(i?r.undone:r.done).eventCount==0)return!1;if(n){let s=N(r,t,i);s&&n(e?s.scrollIntoView():s)}return!0}}const D=H(!1,!0),K=H(!0,!0),Z=x.Extension.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:i,dispatch:e})=>D(i,e),redo:()=>({state:i,dispatch:e})=>K(i,e)}},addProseMirrorPlugins(){return[U(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}});function $(i){var a;const{icon:e=void 0,tooltip:t=void 0,customClass:n="",tooltipOptions:r={},action:s=void 0,isActive:l=void 0,children:o}=i,p=M.icons[e];return g.jsxs(M.Tooltip,{children:[g.jsx(M.TooltipTrigger,{asChild:!0,children:g.jsxs(M.Toggle,{size:"sm",className:`richtext-w-[32px] richtext-h-[32px] ${n}`,disabled:l==null?void 0:l(),onClick:s,children:[p&&g.jsx(p,{className:"richtext-w-4 richtext-h-4"}),o&&g.jsx(g.Fragment,{children:o})]})}),t&&g.jsx(M.TooltipContent,{...r,children:g.jsxs("div",{className:"richtext-flex richtext-flex-col richtext-items-center richtext-text-center richtext-max-w-24",children:[g.jsx("div",{children:t}),!!((a=i==null?void 0:i.shortcutKeys)!=null&&a.length)&&g.jsx("span",{children:M.getShortcutKeys(i==null?void 0:i.shortcutKeys)})]})})]})}const V=["undo","redo"],W=Z.extend({addOptions(){var i;return{...(i=this.parent)==null?void 0:i.call(this),depth:100,newGroupDelay:500,button:({editor:e,t})=>V.map(n=>({component:$,componentProps:{action:()=>{n==="undo"&&e.chain().focus().undo().run(),n==="redo"&&e.chain().focus().redo().run()},shortcutKeys:n==="undo"?["mod","Z"]:["shift","mod","Z"],disabled:n==="undo"?!e.can().undo():!e.can().redo(),isActive:()=>n==="undo"?!e.can().undo():!e.can().redo(),icon:n==="undo"?"Undo2":"Redo2",tooltip:t(`editor.${n}.tooltip`)}}))}}});exports.History=W;
package/lib/History.d.cts CHANGED
@@ -98,11 +98,11 @@ declare module '@tiptap/core' {
98
98
 
99
99
  declare module '@tiptap/core' {
100
100
  interface Commands<ReturnType> {
101
- emoji: {
102
- setEmoji: (emoji: {
103
- name: string;
104
- emoji: string;
105
- }) => ReturnType;
101
+ codeView: {
102
+ /**
103
+ * Toggle code view mode
104
+ */
105
+ toggleCodeView: () => ReturnType;
106
106
  };
107
107
  }
108
108
  }
@@ -118,6 +118,18 @@ declare module '@tiptap/core' {
118
118
  }
119
119
 
120
120
 
121
+ declare module '@tiptap/core' {
122
+ interface Commands<ReturnType> {
123
+ emoji: {
124
+ setEmoji: (emoji: {
125
+ name: string;
126
+ emoji: string;
127
+ }) => ReturnType;
128
+ };
129
+ }
130
+ }
131
+
132
+
121
133
  declare module '@tiptap/core' {
122
134
  interface Commands<ReturnType> {
123
135
  excalidraw: {
package/lib/History.d.ts CHANGED
@@ -98,11 +98,11 @@ declare module '@tiptap/core' {
98
98
 
99
99
  declare module '@tiptap/core' {
100
100
  interface Commands<ReturnType> {
101
- emoji: {
102
- setEmoji: (emoji: {
103
- name: string;
104
- emoji: string;
105
- }) => ReturnType;
101
+ codeView: {
102
+ /**
103
+ * Toggle code view mode
104
+ */
105
+ toggleCodeView: () => ReturnType;
106
106
  };
107
107
  }
108
108
  }
@@ -118,6 +118,18 @@ declare module '@tiptap/core' {
118
118
  }
119
119
 
120
120
 
121
+ declare module '@tiptap/core' {
122
+ interface Commands<ReturnType> {
123
+ emoji: {
124
+ setEmoji: (emoji: {
125
+ name: string;
126
+ emoji: string;
127
+ }) => ReturnType;
128
+ };
129
+ }
130
+ }
131
+
132
+
121
133
  declare module '@tiptap/core' {
122
134
  interface Commands<ReturnType> {
123
135
  excalidraw: {
package/lib/History.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { P as j, a as A, x as G, E as L } from "./index-Drmyqk9P.js";
2
2
  import { jsxs as x, jsx as I, Fragment as F } from "react/jsx-runtime";
3
- import { T as S, a as z, r as N, i as U, b as Z, g as $ } from "./RichTextEditor-BwuyWeH3.js";
3
+ import { T as S, a as z, r as N, i as U, b as Z, g as $ } from "./RichTextEditor-D5VO1y1d.js";
4
4
  var E = 200, f = function() {
5
5
  };
6
6
  f.prototype.append = function(e) {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-COecBbaE.cjs"),m=require("./RichTextEditor-NfX6yV6A.cjs"),h=t.Node.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:n}){return["hr",t.mergeAttributes(this.options.HTMLAttributes,n)]},addCommands(){return{setHorizontalRule:()=>({chain:n,state:r})=>{const{selection:i}=r,{$from:a,$to:c}=i,s=n();return a.parentOffset===0?s.insertContentAt({from:Math.max(a.pos-1,0),to:c.pos},{type:this.name}):t.isNodeSelection(i)?s.insertContentAt(c.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({tr:e,dispatch:p})=>{var l;if(p){const{$to:o}=e.selection,d=o.end();if(o.nodeAfter)o.nodeAfter.isTextblock?e.setSelection(t.TextSelection.create(e.doc,o.pos+1)):o.nodeAfter.isBlock?e.setSelection(t.NodeSelection.create(e.doc,o.pos)):e.setSelection(t.TextSelection.create(e.doc,o.pos));else{const u=(l=o.parent.type.contentMatch.defaultType)===null||l===void 0?void 0:l.create();u&&(e.insert(d,u),e.setSelection(t.TextSelection.create(e.doc,d+1)))}e.scrollIntoView()}return!0}).run()}}},addInputRules(){return[t.nodeInputRule({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),f=h.extend({renderHTML(){return["div",t.mergeAttributes(this.options.HTMLAttributes,{"data-type":this.name}),["hr"]]},addOptions(){var n;return{...(n=this.parent)==null?void 0:n.call(this),button:({editor:r,t:i})=>({component:m.ActionButton,componentProps:{action:()=>r.commands.setHorizontalRule(),disabled:!r.can().setHorizontalRule(),icon:"Minus",shortcutKeys:["mod","alt","S"],tooltip:i("editor.horizontalrule.tooltip")}})}},addKeyboardShortcuts(){return{"Mod-Alt-s":()=>this.editor.commands.setHorizontalRule()}}});exports.HorizontalRule=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-COecBbaE.cjs"),m=require("./RichTextEditor-qp9T7xuG.cjs"),h=t.Node.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:n}){return["hr",t.mergeAttributes(this.options.HTMLAttributes,n)]},addCommands(){return{setHorizontalRule:()=>({chain:n,state:r})=>{const{selection:i}=r,{$from:a,$to:c}=i,s=n();return a.parentOffset===0?s.insertContentAt({from:Math.max(a.pos-1,0),to:c.pos},{type:this.name}):t.isNodeSelection(i)?s.insertContentAt(c.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({tr:e,dispatch:p})=>{var l;if(p){const{$to:o}=e.selection,d=o.end();if(o.nodeAfter)o.nodeAfter.isTextblock?e.setSelection(t.TextSelection.create(e.doc,o.pos+1)):o.nodeAfter.isBlock?e.setSelection(t.NodeSelection.create(e.doc,o.pos)):e.setSelection(t.TextSelection.create(e.doc,o.pos));else{const u=(l=o.parent.type.contentMatch.defaultType)===null||l===void 0?void 0:l.create();u&&(e.insert(d,u),e.setSelection(t.TextSelection.create(e.doc,d+1)))}e.scrollIntoView()}return!0}).run()}}},addInputRules(){return[t.nodeInputRule({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),f=h.extend({renderHTML(){return["div",t.mergeAttributes(this.options.HTMLAttributes,{"data-type":this.name}),["hr"]]},addOptions(){var n;return{...(n=this.parent)==null?void 0:n.call(this),button:({editor:r,t:i})=>({component:m.ActionButton,componentProps:{action:()=>r.commands.setHorizontalRule(),disabled:!r.can().setHorizontalRule(),icon:"Minus",shortcutKeys:["mod","alt","S"],tooltip:i("editor.horizontalrule.tooltip")}})}},addKeyboardShortcuts(){return{"Mod-Alt-s":()=>this.editor.commands.setHorizontalRule()}}});exports.HorizontalRule=f;
@@ -98,11 +98,11 @@ declare module '@tiptap/core' {
98
98
 
99
99
  declare module '@tiptap/core' {
100
100
  interface Commands<ReturnType> {
101
- emoji: {
102
- setEmoji: (emoji: {
103
- name: string;
104
- emoji: string;
105
- }) => ReturnType;
101
+ codeView: {
102
+ /**
103
+ * Toggle code view mode
104
+ */
105
+ toggleCodeView: () => ReturnType;
106
106
  };
107
107
  }
108
108
  }
@@ -118,6 +118,18 @@ declare module '@tiptap/core' {
118
118
  }
119
119
 
120
120
 
121
+ declare module '@tiptap/core' {
122
+ interface Commands<ReturnType> {
123
+ emoji: {
124
+ setEmoji: (emoji: {
125
+ name: string;
126
+ emoji: string;
127
+ }) => ReturnType;
128
+ };
129
+ }
130
+ }
131
+
132
+
121
133
  declare module '@tiptap/core' {
122
134
  interface Commands<ReturnType> {
123
135
  excalidraw: {
@@ -98,11 +98,11 @@ declare module '@tiptap/core' {
98
98
 
99
99
  declare module '@tiptap/core' {
100
100
  interface Commands<ReturnType> {
101
- emoji: {
102
- setEmoji: (emoji: {
103
- name: string;
104
- emoji: string;
105
- }) => ReturnType;
101
+ codeView: {
102
+ /**
103
+ * Toggle code view mode
104
+ */
105
+ toggleCodeView: () => ReturnType;
106
106
  };
107
107
  }
108
108
  }
@@ -118,6 +118,18 @@ declare module '@tiptap/core' {
118
118
  }
119
119
 
120
120
 
121
+ declare module '@tiptap/core' {
122
+ interface Commands<ReturnType> {
123
+ emoji: {
124
+ setEmoji: (emoji: {
125
+ name: string;
126
+ emoji: string;
127
+ }) => ReturnType;
128
+ };
129
+ }
130
+ }
131
+
132
+
121
133
  declare module '@tiptap/core' {
122
134
  interface Commands<ReturnType> {
123
135
  excalidraw: {
@@ -1,5 +1,5 @@
1
1
  import { N as f, n as h, i as A, T as a, f as H, m as p } from "./index-Drmyqk9P.js";
2
- import { A as T } from "./RichTextEditor-BwuyWeH3.js";
2
+ import { A as T } from "./RichTextEditor-D5VO1y1d.js";
3
3
  const y = f.create({
4
4
  name: "horizontalRule",
5
5
  addOptions() {
package/lib/Iframe.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-COecBbaE.cjs");require("./dom-dataset-CAXnsjYE.cjs");const e=require("./RichTextEditor-NfX6yV6A.cjs");exports.Iframe=e.Iframe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-COecBbaE.cjs");require("./dom-dataset-CAXnsjYE.cjs");const e=require("./RichTextEditor-qp9T7xuG.cjs");exports.Iframe=e.Iframe;
package/lib/Iframe.d.cts CHANGED
@@ -32,11 +32,11 @@ declare module '@tiptap/core' {
32
32
 
33
33
  declare module '@tiptap/core' {
34
34
  interface Commands<ReturnType> {
35
- emoji: {
36
- setEmoji: (emoji: {
37
- name: string;
38
- emoji: string;
39
- }) => ReturnType;
35
+ codeView: {
36
+ /**
37
+ * Toggle code view mode
38
+ */
39
+ toggleCodeView: () => ReturnType;
40
40
  };
41
41
  }
42
42
  }
@@ -52,6 +52,18 @@ declare module '@tiptap/core' {
52
52
  }
53
53
 
54
54
 
55
+ declare module '@tiptap/core' {
56
+ interface Commands<ReturnType> {
57
+ emoji: {
58
+ setEmoji: (emoji: {
59
+ name: string;
60
+ emoji: string;
61
+ }) => ReturnType;
62
+ };
63
+ }
64
+ }
65
+
66
+
55
67
  declare module '@tiptap/core' {
56
68
  interface Commands<ReturnType> {
57
69
  excalidraw: {
package/lib/Iframe.d.ts CHANGED
@@ -32,11 +32,11 @@ declare module '@tiptap/core' {
32
32
 
33
33
  declare module '@tiptap/core' {
34
34
  interface Commands<ReturnType> {
35
- emoji: {
36
- setEmoji: (emoji: {
37
- name: string;
38
- emoji: string;
39
- }) => ReturnType;
35
+ codeView: {
36
+ /**
37
+ * Toggle code view mode
38
+ */
39
+ toggleCodeView: () => ReturnType;
40
40
  };
41
41
  }
42
42
  }
@@ -52,6 +52,18 @@ declare module '@tiptap/core' {
52
52
  }
53
53
 
54
54
 
55
+ declare module '@tiptap/core' {
56
+ interface Commands<ReturnType> {
57
+ emoji: {
58
+ setEmoji: (emoji: {
59
+ name: string;
60
+ emoji: string;
61
+ }) => ReturnType;
62
+ };
63
+ }
64
+ }
65
+
66
+
55
67
  declare module '@tiptap/core' {
56
68
  interface Commands<ReturnType> {
57
69
  excalidraw: {
package/lib/Iframe.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./index-Drmyqk9P.js";
2
2
  import "./dom-dataset-CJ7GyQ2E.js";
3
- import { ai as i } from "./RichTextEditor-BwuyWeH3.js";
3
+ import { ai as i } from "./RichTextEditor-D5VO1y1d.js";
4
4
  export {
5
5
  i as Iframe
6
6
  };
package/lib/Image.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("./index-COecBbaE.cjs");const e=require("./RichTextEditor-NfX6yV6A.cjs");require("./dom-dataset-CAXnsjYE.cjs");exports.Image=e.Image$1;exports.default=e.Image$1;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("./index-COecBbaE.cjs");const e=require("./RichTextEditor-qp9T7xuG.cjs");require("./dom-dataset-CAXnsjYE.cjs");exports.Image=e.Image$1;exports.default=e.Image$1;
package/lib/Image.d.cts CHANGED
@@ -125,11 +125,11 @@ declare module '@tiptap/core' {
125
125
 
126
126
  declare module '@tiptap/core' {
127
127
  interface Commands<ReturnType> {
128
- emoji: {
129
- setEmoji: (emoji: {
130
- name: string;
131
- emoji: string;
132
- }) => ReturnType;
128
+ codeView: {
129
+ /**
130
+ * Toggle code view mode
131
+ */
132
+ toggleCodeView: () => ReturnType;
133
133
  };
134
134
  }
135
135
  }
@@ -145,6 +145,18 @@ declare module '@tiptap/core' {
145
145
  }
146
146
 
147
147
 
148
+ declare module '@tiptap/core' {
149
+ interface Commands<ReturnType> {
150
+ emoji: {
151
+ setEmoji: (emoji: {
152
+ name: string;
153
+ emoji: string;
154
+ }) => ReturnType;
155
+ };
156
+ }
157
+ }
158
+
159
+
148
160
  declare module '@tiptap/core' {
149
161
  interface Commands<ReturnType> {
150
162
  excalidraw: {
package/lib/Image.d.ts CHANGED
@@ -125,11 +125,11 @@ declare module '@tiptap/core' {
125
125
 
126
126
  declare module '@tiptap/core' {
127
127
  interface Commands<ReturnType> {
128
- emoji: {
129
- setEmoji: (emoji: {
130
- name: string;
131
- emoji: string;
132
- }) => ReturnType;
128
+ codeView: {
129
+ /**
130
+ * Toggle code view mode
131
+ */
132
+ toggleCodeView: () => ReturnType;
133
133
  };
134
134
  }
135
135
  }
@@ -145,6 +145,18 @@ declare module '@tiptap/core' {
145
145
  }
146
146
 
147
147
 
148
+ declare module '@tiptap/core' {
149
+ interface Commands<ReturnType> {
150
+ emoji: {
151
+ setEmoji: (emoji: {
152
+ name: string;
153
+ emoji: string;
154
+ }) => ReturnType;
155
+ };
156
+ }
157
+ }
158
+
159
+
148
160
  declare module '@tiptap/core' {
149
161
  interface Commands<ReturnType> {
150
162
  excalidraw: {
package/lib/Image.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./index-Drmyqk9P.js";
2
- import { U as t, U as e } from "./RichTextEditor-BwuyWeH3.js";
2
+ import { U as t, U as e } from "./RichTextEditor-D5VO1y1d.js";
3
3
  import "./dom-dataset-CJ7GyQ2E.js";
4
4
  export {
5
5
  t as Image,
package/lib/ImageGif.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("./index-COecBbaE.cjs");const e=require("./RichTextEditor-NfX6yV6A.cjs");require("./dom-dataset-CAXnsjYE.cjs");exports.ImageGif=e.ImageGif;exports.default=e.ImageGif;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("./index-COecBbaE.cjs");const e=require("./RichTextEditor-qp9T7xuG.cjs");require("./dom-dataset-CAXnsjYE.cjs");exports.ImageGif=e.ImageGif;exports.default=e.ImageGif;
@@ -47,11 +47,11 @@ declare module '@tiptap/core' {
47
47
 
48
48
  declare module '@tiptap/core' {
49
49
  interface Commands<ReturnType> {
50
- emoji: {
51
- setEmoji: (emoji: {
52
- name: string;
53
- emoji: string;
54
- }) => ReturnType;
50
+ codeView: {
51
+ /**
52
+ * Toggle code view mode
53
+ */
54
+ toggleCodeView: () => ReturnType;
55
55
  };
56
56
  }
57
57
  }
@@ -67,6 +67,18 @@ declare module '@tiptap/core' {
67
67
  }
68
68
 
69
69
 
70
+ declare module '@tiptap/core' {
71
+ interface Commands<ReturnType> {
72
+ emoji: {
73
+ setEmoji: (emoji: {
74
+ name: string;
75
+ emoji: string;
76
+ }) => ReturnType;
77
+ };
78
+ }
79
+ }
80
+
81
+
70
82
  declare module '@tiptap/core' {
71
83
  interface Commands<ReturnType> {
72
84
  excalidraw: {
package/lib/ImageGif.d.ts CHANGED
@@ -47,11 +47,11 @@ declare module '@tiptap/core' {
47
47
 
48
48
  declare module '@tiptap/core' {
49
49
  interface Commands<ReturnType> {
50
- emoji: {
51
- setEmoji: (emoji: {
52
- name: string;
53
- emoji: string;
54
- }) => ReturnType;
50
+ codeView: {
51
+ /**
52
+ * Toggle code view mode
53
+ */
54
+ toggleCodeView: () => ReturnType;
55
55
  };
56
56
  }
57
57
  }
@@ -67,6 +67,18 @@ declare module '@tiptap/core' {
67
67
  }
68
68
 
69
69
 
70
+ declare module '@tiptap/core' {
71
+ interface Commands<ReturnType> {
72
+ emoji: {
73
+ setEmoji: (emoji: {
74
+ name: string;
75
+ emoji: string;
76
+ }) => ReturnType;
77
+ };
78
+ }
79
+ }
80
+
81
+
70
82
  declare module '@tiptap/core' {
71
83
  interface Commands<ReturnType> {
72
84
  excalidraw: {
package/lib/ImageGif.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./index-Drmyqk9P.js";
2
- import { af as r, af as t } from "./RichTextEditor-BwuyWeH3.js";
2
+ import { af as r, af as t } from "./RichTextEditor-D5VO1y1d.js";
3
3
  import "./dom-dataset-CJ7GyQ2E.js";
4
4
  export {
5
5
  r as ImageGif,
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ws=require("./index-COecBbaE.cjs"),br=require("react/jsx-runtime"),ya=require("react"),Pe=require("./RichTextEditor-NfX6yV6A.cjs"),Es=require("./index-LbrE7K9i.cjs");var je={},Ai="1.13.7",Da=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},Ht=Array.prototype,Ci=Object.prototype,va=typeof Symbol<"u"?Symbol.prototype:null,As=Ht.push,rt=Ht.slice,Kn=Ci.toString,Cs=Ci.hasOwnProperty,qc=typeof ArrayBuffer<"u",Fs=typeof DataView<"u",Ss=Array.isArray,xa=Object.keys,_a=Object.create,Ua=qc&&ArrayBuffer.isView,Bs=isNaN,ks=isFinite,Pc=!{toString:null}.propertyIsEnumerable("toString"),Ta=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Ws=Math.pow(2,53)-1;function Oe(e,n){return n=n==null?e.length-1:+n,function(){for(var t=Math.max(arguments.length-n,0),i=Array(t),c=0;c<t;c++)i[c]=arguments[c+n];switch(n){case 0:return e.call(this,i);case 1:return e.call(this,arguments[0],i);case 2:return e.call(this,arguments[0],arguments[1],i)}var r=Array(n+1);for(c=0;c<n;c++)r[c]=arguments[c];return r[n]=i,e.apply(this,r)}}function ln(e){var n=typeof e;return n==="function"||n==="object"&&!!e}function zc(e){return e===null}function Fi(e){return e===void 0}function Si(e){return e===!0||e===!1||Kn.call(e)==="[object Boolean]"}function jc(e){return!!(e&&e.nodeType===1)}function Ne(e){var n="[object "+e+"]";return function(t){return Kn.call(t)===n}}const Gt=Ne("String"),Bi=Ne("Number"),Xc=Ne("Date"),Vc=Ne("RegExp"),Hc=Ne("Error"),ki=Ne("Symbol"),Wi=Ne("ArrayBuffer");var Gc=Ne("Function"),Rs=Da.document&&Da.document.childNodes;typeof/./!="function"&&typeof Int8Array!="object"&&typeof Rs!="function"&&(Gc=function(e){return typeof e=="function"||!1});const Re=Gc,Zc=Ne("Object");var $c=Fs&&(!/\[native code\]/.test(String(DataView))||Zc(new DataView(new ArrayBuffer(8)))),Ri=typeof Map<"u"&&Zc(new Map),Ns=Ne("DataView");function Os(e){return e!=null&&Re(e.getInt8)&&Wi(e.buffer)}const Qn=$c?Os:Ns,fn=Ss||Ne("Array");function hn(e,n){return e!=null&&Cs.call(e,n)}var Ti=Ne("Arguments");(function(){Ti(arguments)||(Ti=function(e){return hn(e,"callee")})})();const Zt=Ti;function Yc(e){return!ki(e)&&ks(e)&&!isNaN(parseFloat(e))}function Ni(e){return Bi(e)&&Bs(e)}function Oi(e){return function(){return e}}function Kc(e){return function(n){var t=e(n);return typeof t=="number"&&t>=0&&t<=Ws}}function Qc(e){return function(n){return n==null?void 0:n[e]}}const Pt=Qc("byteLength"),Is=Kc(Pt);var Ls=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function Ms(e){return Ua?Ua(e)&&!Qn(e):Is(e)&&Ls.test(Kn.call(e))}const Ii=qc?Ms:Oi(!1),Le=Qc("length");function qs(e){for(var n={},t=e.length,i=0;i<t;++i)n[e[i]]=!0;return{contains:function(c){return n[c]===!0},push:function(c){return n[c]=!0,e.push(c)}}}function Jc(e,n){n=qs(n);var t=Ta.length,i=e.constructor,c=Re(i)&&i.prototype||Ci,r="constructor";for(hn(e,r)&&!n.contains(r)&&n.push(r);t--;)r=Ta[t],r in e&&e[r]!==c[r]&&!n.contains(r)&&n.push(r)}function Be(e){if(!ln(e))return[];if(xa)return xa(e);var n=[];for(var t in e)hn(e,t)&&n.push(t);return Pc&&Jc(e,n),n}function eu(e){if(e==null)return!0;var n=Le(e);return typeof n=="number"&&(fn(e)||Gt(e)||Zt(e))?n===0:Le(Be(e))===0}function Li(e,n){var t=Be(n),i=t.length;if(e==null)return!i;for(var c=Object(e),r=0;r<i;r++){var a=t[r];if(n[a]!==c[a]||!(a in c))return!1}return!0}function we(e){if(e instanceof we)return e;if(!(this instanceof we))return new we(e);this._wrapped=e}we.VERSION=Ai;we.prototype.value=function(){return this._wrapped};we.prototype.valueOf=we.prototype.toJSON=we.prototype.value;we.prototype.toString=function(){return String(this._wrapped)};function wa(e){return new Uint8Array(e.buffer||e,e.byteOffset||0,Pt(e))}var Ea="[object DataView]";function wi(e,n,t,i){if(e===n)return e!==0||1/e===1/n;if(e==null||n==null)return!1;if(e!==e)return n!==n;var c=typeof e;return c!=="function"&&c!=="object"&&typeof n!="object"?!1:nu(e,n,t,i)}function nu(e,n,t,i){e instanceof we&&(e=e._wrapped),n instanceof we&&(n=n._wrapped);var c=Kn.call(e);if(c!==Kn.call(n))return!1;if($c&&c=="[object Object]"&&Qn(e)){if(!Qn(n))return!1;c=Ea}switch(c){case"[object RegExp]":case"[object String]":return""+e==""+n;case"[object Number]":return+e!=+e?+n!=+n:+e==0?1/+e===1/n:+e==+n;case"[object Date]":case"[object Boolean]":return+e==+n;case"[object Symbol]":return va.valueOf.call(e)===va.valueOf.call(n);case"[object ArrayBuffer]":case Ea:return nu(wa(e),wa(n),t,i)}var r=c==="[object Array]";if(!r&&Ii(e)){var a=Pt(e);if(a!==Pt(n))return!1;if(e.buffer===n.buffer&&e.byteOffset===n.byteOffset)return!0;r=!0}if(!r){if(typeof e!="object"||typeof n!="object")return!1;var o=e.constructor,u=n.constructor;if(o!==u&&!(Re(o)&&o instanceof o&&Re(u)&&u instanceof u)&&"constructor"in e&&"constructor"in n)return!1}t=t||[],i=i||[];for(var l=t.length;l--;)if(t[l]===e)return i[l]===n;if(t.push(e),i.push(n),r){if(l=e.length,l!==n.length)return!1;for(;l--;)if(!wi(e[l],n[l],t,i))return!1}else{var b=Be(e),m;if(l=b.length,Be(n).length!==l)return!1;for(;l--;)if(m=b[l],!(hn(n,m)&&wi(e[m],n[m],t,i)))return!1}return t.pop(),i.pop(),!0}function tu(e,n){return wi(e,n)}function Ln(e){if(!ln(e))return[];var n=[];for(var t in e)n.push(t);return Pc&&Jc(e,n),n}function Mi(e){var n=Le(e);return function(t){if(t==null)return!1;var i=Ln(t);if(Le(i))return!1;for(var c=0;c<n;c++)if(!Re(t[e[c]]))return!1;return e!==au||!Re(t[qi])}}var qi="forEach",ru="has",Pi=["clear","delete"],iu=["get",ru,"set"],Ps=Pi.concat(qi,iu),au=Pi.concat(iu),zs=["add"].concat(Pi,qi,ru);const ou=Ri?Mi(Ps):Ne("Map"),cu=Ri?Mi(au):Ne("WeakMap"),uu=Ri?Mi(zs):Ne("Set"),su=Ne("WeakSet");function En(e){for(var n=Be(e),t=n.length,i=Array(t),c=0;c<t;c++)i[c]=e[n[c]];return i}function du(e){for(var n=Be(e),t=n.length,i=Array(t),c=0;c<t;c++)i[c]=[n[c],e[n[c]]];return i}function zi(e){for(var n={},t=Be(e),i=0,c=t.length;i<c;i++)n[e[t[i]]]=t[i];return n}function Jn(e){var n=[];for(var t in e)Re(e[t])&&n.push(t);return n.sort()}function ji(e,n){return function(t){var i=arguments.length;if(n&&(t=Object(t)),i<2||t==null)return t;for(var c=1;c<i;c++)for(var r=arguments[c],a=e(r),o=a.length,u=0;u<o;u++){var l=a[u];(!n||t[l]===void 0)&&(t[l]=r[l])}return t}}const Xi=ji(Ln),On=ji(Be),Vi=ji(Ln,!0);function js(){return function(){}}function lu(e){if(!ln(e))return{};if(_a)return _a(e);var n=js();n.prototype=e;var t=new n;return n.prototype=null,t}function fu(e,n){var t=lu(e);return n&&On(t,n),t}function hu(e){return ln(e)?fn(e)?e.slice():Xi({},e):e}function pu(e,n){return n(e),e}function Hi(e){return fn(e)?e:[e]}we.toPath=Hi;function it(e){return we.toPath(e)}function Gi(e,n){for(var t=n.length,i=0;i<t;i++){if(e==null)return;e=e[n[i]]}return t?e:void 0}function Zi(e,n,t){var i=Gi(e,it(n));return Fi(i)?t:i}function gu(e,n){n=it(n);for(var t=n.length,i=0;i<t;i++){var c=n[i];if(!hn(e,c))return!1;e=e[c]}return!!t}function $t(e){return e}function wn(e){return e=On({},e),function(n){return Li(n,e)}}function Yt(e){return e=it(e),function(n){return Gi(n,e)}}function at(e,n,t){if(n===void 0)return e;switch(t??3){case 1:return function(i){return e.call(n,i)};case 3:return function(i,c,r){return e.call(n,i,c,r)};case 4:return function(i,c,r,a){return e.call(n,i,c,r,a)}}return function(){return e.apply(n,arguments)}}function mu(e,n,t){return e==null?$t:Re(e)?at(e,n,t):ln(e)&&!fn(e)?wn(e):Yt(e)}function Kt(e,n){return mu(e,n,1/0)}we.iteratee=Kt;function Me(e,n,t){return we.iteratee!==Kt?we.iteratee(e,n):mu(e,n,t)}function bu(e,n,t){n=Me(n,t);for(var i=Be(e),c=i.length,r={},a=0;a<c;a++){var o=i[a];r[o]=n(e[o],o,e)}return r}function $i(){}function yu(e){return e==null?$i:function(n){return Zi(e,n)}}function Du(e,n,t){var i=Array(Math.max(0,e));n=at(n,t,1);for(var c=0;c<e;c++)i[c]=n(c);return i}function zt(e,n){return n==null&&(n=e,e=0),e+Math.floor(Math.random()*(n-e+1))}const In=Date.now||function(){return new Date().getTime()};function vu(e){var n=function(r){return e[r]},t="(?:"+Be(e).join("|")+")",i=RegExp(t),c=RegExp(t,"g");return function(r){return r=r==null?"":""+r,i.test(r)?r.replace(c,n):r}}const xu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},_u=vu(xu),Xs=zi(xu),Uu=vu(Xs),Tu=we.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var yr=/(.)^/,Vs={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Hs=/\\|'|\r|\n|\u2028|\u2029/g;function Gs(e){return"\\"+Vs[e]}var Zs=/^\s*(\w|\$)+\s*$/;function wu(e,n,t){!n&&t&&(n=t),n=Vi({},n,we.templateSettings);var i=RegExp([(n.escape||yr).source,(n.interpolate||yr).source,(n.evaluate||yr).source].join("|")+"|$","g"),c=0,r="__p+='";e.replace(i,function(l,b,m,g,f){return r+=e.slice(c,f).replace(Hs,Gs),c=f+l.length,b?r+=`'+
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ws=require("./index-COecBbaE.cjs"),br=require("react/jsx-runtime"),ya=require("react"),Pe=require("./RichTextEditor-qp9T7xuG.cjs"),Es=require("./index-Dz3YxLE7.cjs");var je={},Ai="1.13.7",Da=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},Ht=Array.prototype,Ci=Object.prototype,va=typeof Symbol<"u"?Symbol.prototype:null,As=Ht.push,rt=Ht.slice,Kn=Ci.toString,Cs=Ci.hasOwnProperty,qc=typeof ArrayBuffer<"u",Fs=typeof DataView<"u",Ss=Array.isArray,xa=Object.keys,_a=Object.create,Ua=qc&&ArrayBuffer.isView,Bs=isNaN,ks=isFinite,Pc=!{toString:null}.propertyIsEnumerable("toString"),Ta=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Ws=Math.pow(2,53)-1;function Oe(e,n){return n=n==null?e.length-1:+n,function(){for(var t=Math.max(arguments.length-n,0),i=Array(t),c=0;c<t;c++)i[c]=arguments[c+n];switch(n){case 0:return e.call(this,i);case 1:return e.call(this,arguments[0],i);case 2:return e.call(this,arguments[0],arguments[1],i)}var r=Array(n+1);for(c=0;c<n;c++)r[c]=arguments[c];return r[n]=i,e.apply(this,r)}}function ln(e){var n=typeof e;return n==="function"||n==="object"&&!!e}function zc(e){return e===null}function Fi(e){return e===void 0}function Si(e){return e===!0||e===!1||Kn.call(e)==="[object Boolean]"}function jc(e){return!!(e&&e.nodeType===1)}function Ne(e){var n="[object "+e+"]";return function(t){return Kn.call(t)===n}}const Gt=Ne("String"),Bi=Ne("Number"),Xc=Ne("Date"),Vc=Ne("RegExp"),Hc=Ne("Error"),ki=Ne("Symbol"),Wi=Ne("ArrayBuffer");var Gc=Ne("Function"),Rs=Da.document&&Da.document.childNodes;typeof/./!="function"&&typeof Int8Array!="object"&&typeof Rs!="function"&&(Gc=function(e){return typeof e=="function"||!1});const Re=Gc,Zc=Ne("Object");var $c=Fs&&(!/\[native code\]/.test(String(DataView))||Zc(new DataView(new ArrayBuffer(8)))),Ri=typeof Map<"u"&&Zc(new Map),Ns=Ne("DataView");function Os(e){return e!=null&&Re(e.getInt8)&&Wi(e.buffer)}const Qn=$c?Os:Ns,fn=Ss||Ne("Array");function hn(e,n){return e!=null&&Cs.call(e,n)}var Ti=Ne("Arguments");(function(){Ti(arguments)||(Ti=function(e){return hn(e,"callee")})})();const Zt=Ti;function Yc(e){return!ki(e)&&ks(e)&&!isNaN(parseFloat(e))}function Ni(e){return Bi(e)&&Bs(e)}function Oi(e){return function(){return e}}function Kc(e){return function(n){var t=e(n);return typeof t=="number"&&t>=0&&t<=Ws}}function Qc(e){return function(n){return n==null?void 0:n[e]}}const Pt=Qc("byteLength"),Is=Kc(Pt);var Ls=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function Ms(e){return Ua?Ua(e)&&!Qn(e):Is(e)&&Ls.test(Kn.call(e))}const Ii=qc?Ms:Oi(!1),Le=Qc("length");function qs(e){for(var n={},t=e.length,i=0;i<t;++i)n[e[i]]=!0;return{contains:function(c){return n[c]===!0},push:function(c){return n[c]=!0,e.push(c)}}}function Jc(e,n){n=qs(n);var t=Ta.length,i=e.constructor,c=Re(i)&&i.prototype||Ci,r="constructor";for(hn(e,r)&&!n.contains(r)&&n.push(r);t--;)r=Ta[t],r in e&&e[r]!==c[r]&&!n.contains(r)&&n.push(r)}function Be(e){if(!ln(e))return[];if(xa)return xa(e);var n=[];for(var t in e)hn(e,t)&&n.push(t);return Pc&&Jc(e,n),n}function eu(e){if(e==null)return!0;var n=Le(e);return typeof n=="number"&&(fn(e)||Gt(e)||Zt(e))?n===0:Le(Be(e))===0}function Li(e,n){var t=Be(n),i=t.length;if(e==null)return!i;for(var c=Object(e),r=0;r<i;r++){var a=t[r];if(n[a]!==c[a]||!(a in c))return!1}return!0}function we(e){if(e instanceof we)return e;if(!(this instanceof we))return new we(e);this._wrapped=e}we.VERSION=Ai;we.prototype.value=function(){return this._wrapped};we.prototype.valueOf=we.prototype.toJSON=we.prototype.value;we.prototype.toString=function(){return String(this._wrapped)};function wa(e){return new Uint8Array(e.buffer||e,e.byteOffset||0,Pt(e))}var Ea="[object DataView]";function wi(e,n,t,i){if(e===n)return e!==0||1/e===1/n;if(e==null||n==null)return!1;if(e!==e)return n!==n;var c=typeof e;return c!=="function"&&c!=="object"&&typeof n!="object"?!1:nu(e,n,t,i)}function nu(e,n,t,i){e instanceof we&&(e=e._wrapped),n instanceof we&&(n=n._wrapped);var c=Kn.call(e);if(c!==Kn.call(n))return!1;if($c&&c=="[object Object]"&&Qn(e)){if(!Qn(n))return!1;c=Ea}switch(c){case"[object RegExp]":case"[object String]":return""+e==""+n;case"[object Number]":return+e!=+e?+n!=+n:+e==0?1/+e===1/n:+e==+n;case"[object Date]":case"[object Boolean]":return+e==+n;case"[object Symbol]":return va.valueOf.call(e)===va.valueOf.call(n);case"[object ArrayBuffer]":case Ea:return nu(wa(e),wa(n),t,i)}var r=c==="[object Array]";if(!r&&Ii(e)){var a=Pt(e);if(a!==Pt(n))return!1;if(e.buffer===n.buffer&&e.byteOffset===n.byteOffset)return!0;r=!0}if(!r){if(typeof e!="object"||typeof n!="object")return!1;var o=e.constructor,u=n.constructor;if(o!==u&&!(Re(o)&&o instanceof o&&Re(u)&&u instanceof u)&&"constructor"in e&&"constructor"in n)return!1}t=t||[],i=i||[];for(var l=t.length;l--;)if(t[l]===e)return i[l]===n;if(t.push(e),i.push(n),r){if(l=e.length,l!==n.length)return!1;for(;l--;)if(!wi(e[l],n[l],t,i))return!1}else{var b=Be(e),m;if(l=b.length,Be(n).length!==l)return!1;for(;l--;)if(m=b[l],!(hn(n,m)&&wi(e[m],n[m],t,i)))return!1}return t.pop(),i.pop(),!0}function tu(e,n){return wi(e,n)}function Ln(e){if(!ln(e))return[];var n=[];for(var t in e)n.push(t);return Pc&&Jc(e,n),n}function Mi(e){var n=Le(e);return function(t){if(t==null)return!1;var i=Ln(t);if(Le(i))return!1;for(var c=0;c<n;c++)if(!Re(t[e[c]]))return!1;return e!==au||!Re(t[qi])}}var qi="forEach",ru="has",Pi=["clear","delete"],iu=["get",ru,"set"],Ps=Pi.concat(qi,iu),au=Pi.concat(iu),zs=["add"].concat(Pi,qi,ru);const ou=Ri?Mi(Ps):Ne("Map"),cu=Ri?Mi(au):Ne("WeakMap"),uu=Ri?Mi(zs):Ne("Set"),su=Ne("WeakSet");function En(e){for(var n=Be(e),t=n.length,i=Array(t),c=0;c<t;c++)i[c]=e[n[c]];return i}function du(e){for(var n=Be(e),t=n.length,i=Array(t),c=0;c<t;c++)i[c]=[n[c],e[n[c]]];return i}function zi(e){for(var n={},t=Be(e),i=0,c=t.length;i<c;i++)n[e[t[i]]]=t[i];return n}function Jn(e){var n=[];for(var t in e)Re(e[t])&&n.push(t);return n.sort()}function ji(e,n){return function(t){var i=arguments.length;if(n&&(t=Object(t)),i<2||t==null)return t;for(var c=1;c<i;c++)for(var r=arguments[c],a=e(r),o=a.length,u=0;u<o;u++){var l=a[u];(!n||t[l]===void 0)&&(t[l]=r[l])}return t}}const Xi=ji(Ln),On=ji(Be),Vi=ji(Ln,!0);function js(){return function(){}}function lu(e){if(!ln(e))return{};if(_a)return _a(e);var n=js();n.prototype=e;var t=new n;return n.prototype=null,t}function fu(e,n){var t=lu(e);return n&&On(t,n),t}function hu(e){return ln(e)?fn(e)?e.slice():Xi({},e):e}function pu(e,n){return n(e),e}function Hi(e){return fn(e)?e:[e]}we.toPath=Hi;function it(e){return we.toPath(e)}function Gi(e,n){for(var t=n.length,i=0;i<t;i++){if(e==null)return;e=e[n[i]]}return t?e:void 0}function Zi(e,n,t){var i=Gi(e,it(n));return Fi(i)?t:i}function gu(e,n){n=it(n);for(var t=n.length,i=0;i<t;i++){var c=n[i];if(!hn(e,c))return!1;e=e[c]}return!!t}function $t(e){return e}function wn(e){return e=On({},e),function(n){return Li(n,e)}}function Yt(e){return e=it(e),function(n){return Gi(n,e)}}function at(e,n,t){if(n===void 0)return e;switch(t??3){case 1:return function(i){return e.call(n,i)};case 3:return function(i,c,r){return e.call(n,i,c,r)};case 4:return function(i,c,r,a){return e.call(n,i,c,r,a)}}return function(){return e.apply(n,arguments)}}function mu(e,n,t){return e==null?$t:Re(e)?at(e,n,t):ln(e)&&!fn(e)?wn(e):Yt(e)}function Kt(e,n){return mu(e,n,1/0)}we.iteratee=Kt;function Me(e,n,t){return we.iteratee!==Kt?we.iteratee(e,n):mu(e,n,t)}function bu(e,n,t){n=Me(n,t);for(var i=Be(e),c=i.length,r={},a=0;a<c;a++){var o=i[a];r[o]=n(e[o],o,e)}return r}function $i(){}function yu(e){return e==null?$i:function(n){return Zi(e,n)}}function Du(e,n,t){var i=Array(Math.max(0,e));n=at(n,t,1);for(var c=0;c<e;c++)i[c]=n(c);return i}function zt(e,n){return n==null&&(n=e,e=0),e+Math.floor(Math.random()*(n-e+1))}const In=Date.now||function(){return new Date().getTime()};function vu(e){var n=function(r){return e[r]},t="(?:"+Be(e).join("|")+")",i=RegExp(t),c=RegExp(t,"g");return function(r){return r=r==null?"":""+r,i.test(r)?r.replace(c,n):r}}const xu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},_u=vu(xu),Xs=zi(xu),Uu=vu(Xs),Tu=we.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var yr=/(.)^/,Vs={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Hs=/\\|'|\r|\n|\u2028|\u2029/g;function Gs(e){return"\\"+Vs[e]}var Zs=/^\s*(\w|\$)+\s*$/;function wu(e,n,t){!n&&t&&(n=t),n=Vi({},n,we.templateSettings);var i=RegExp([(n.escape||yr).source,(n.interpolate||yr).source,(n.evaluate||yr).source].join("|")+"|$","g"),c=0,r="__p+='";e.replace(i,function(l,b,m,g,f){return r+=e.slice(c,f).replace(Hs,Gs),c=f+l.length,b?r+=`'+
2
2
  ((__t=(`+b+`))==null?'':_.escape(__t))+
3
3
  '`:m?r+=`'+
4
4
  ((__t=(`+m+`))==null?'':__t)+
@@ -108,11 +108,11 @@ declare module '@tiptap/core' {
108
108
 
109
109
  declare module '@tiptap/core' {
110
110
  interface Commands<ReturnType> {
111
- emoji: {
112
- setEmoji: (emoji: {
113
- name: string;
114
- emoji: string;
115
- }) => ReturnType;
111
+ codeView: {
112
+ /**
113
+ * Toggle code view mode
114
+ */
115
+ toggleCodeView: () => ReturnType;
116
116
  };
117
117
  }
118
118
  }
@@ -128,6 +128,18 @@ declare module '@tiptap/core' {
128
128
  }
129
129
 
130
130
 
131
+ declare module '@tiptap/core' {
132
+ interface Commands<ReturnType> {
133
+ emoji: {
134
+ setEmoji: (emoji: {
135
+ name: string;
136
+ emoji: string;
137
+ }) => ReturnType;
138
+ };
139
+ }
140
+ }
141
+
142
+
131
143
  declare module '@tiptap/core' {
132
144
  interface Commands<ReturnType> {
133
145
  excalidraw: {
@@ -108,11 +108,11 @@ declare module '@tiptap/core' {
108
108
 
109
109
  declare module '@tiptap/core' {
110
110
  interface Commands<ReturnType> {
111
- emoji: {
112
- setEmoji: (emoji: {
113
- name: string;
114
- emoji: string;
115
- }) => ReturnType;
111
+ codeView: {
112
+ /**
113
+ * Toggle code view mode
114
+ */
115
+ toggleCodeView: () => ReturnType;
116
116
  };
117
117
  }
118
118
  }
@@ -128,6 +128,18 @@ declare module '@tiptap/core' {
128
128
  }
129
129
 
130
130
 
131
+ declare module '@tiptap/core' {
132
+ interface Commands<ReturnType> {
133
+ emoji: {
134
+ setEmoji: (emoji: {
135
+ name: string;
136
+ emoji: string;
137
+ }) => ReturnType;
138
+ };
139
+ }
140
+ }
141
+
142
+
131
143
  declare module '@tiptap/core' {
132
144
  interface Commands<ReturnType> {
133
145
  excalidraw: {
package/lib/ImportWord.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { E as Ts } from "./index-Drmyqk9P.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-BwuyWeH3.js";
5
- import { u as Ws } from "./index-D9llIWB5.js";
4
+ import { ab as Cs, ac as un, a2 as Fs, ad as Ss, A as Bs, ae as ks } from "./RichTextEditor-D5VO1y1d.js";
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",
8
8
  "isPrototypeOf",
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-NfX6yV6A.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-COecBbaE.cjs"),t=require("./RichTextEditor-qp9T7xuG.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;