reactjs-tiptap-editor 0.3.30 → 0.3.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{ActionMenuButton-wiDnIxE2.cjs → ActionMenuButton-BCgqJsST.cjs} +1 -1
- package/lib/{ActionMenuButton-B6fitGKu.js → ActionMenuButton-D97K0UWT.js} +5 -5
- package/lib/Attachment.cjs +1 -1
- package/lib/Attachment.d.cts +15 -15
- package/lib/Attachment.d.ts +15 -15
- package/lib/Attachment.js +1 -1
- package/lib/Blockquote.cjs +1 -1
- package/lib/Blockquote.d.cts +15 -15
- package/lib/Blockquote.d.ts +15 -15
- package/lib/Blockquote.js +1 -1
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.d.cts +15 -15
- package/lib/Bold.d.ts +15 -15
- package/lib/Bold.js +1 -1
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.d.cts +15 -15
- package/lib/BulletList.d.ts +15 -15
- package/lib/BulletList.js +1 -1
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.d.cts +15 -15
- package/lib/Clear.d.ts +15 -15
- package/lib/Clear.js +1 -1
- package/lib/Code.cjs +1 -1
- package/lib/Code.d.cts +15 -15
- package/lib/Code.d.ts +15 -15
- package/lib/Code.js +1 -1
- package/lib/CodeBlock.cjs +1 -1
- package/lib/CodeBlock.d.cts +15 -15
- package/lib/CodeBlock.d.ts +15 -15
- package/lib/CodeBlock.js +3 -2
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.d.cts +15 -15
- package/lib/CodeView.d.ts +15 -15
- package/lib/CodeView.js +1 -1
- package/lib/Color.cjs +1 -1
- package/lib/Color.d.cts +15 -15
- package/lib/Color.d.ts +15 -15
- package/lib/Color.js +2 -2
- package/lib/Document.d.cts +15 -15
- package/lib/Document.d.ts +15 -15
- package/lib/Drawer-5Q_-WRhc.cjs +1 -0
- package/lib/{Drawer-BKTU9CpU.js → Drawer-BHkje8ys.js} +250 -249
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.d.cts +15 -15
- package/lib/Drawer.d.ts +15 -15
- package/lib/Drawer.js +2 -2
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.d.cts +15 -15
- package/lib/Emoji.d.ts +15 -15
- package/lib/Emoji.js +22 -21
- package/lib/Excalidraw-CG498239.js +290 -0
- package/lib/Excalidraw-GUVW-IqC.cjs +1 -0
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.d.cts +15 -15
- package/lib/Excalidraw.d.ts +15 -15
- package/lib/Excalidraw.js +1 -1
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.d.cts +15 -15
- package/lib/ExportPdf.d.ts +15 -15
- package/lib/ExportPdf.js +1 -1
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.d.cts +15 -15
- package/lib/ExportWord.d.ts +15 -15
- package/lib/ExportWord.js +1 -1
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.d.cts +15 -15
- package/lib/FontFamily.d.ts +15 -15
- package/lib/FontFamily.js +11 -10
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.d.cts +15 -15
- package/lib/FontSize.d.ts +15 -15
- package/lib/FontSize.js +6 -5
- package/lib/FormatPainter.cjs +1 -1
- package/lib/FormatPainter.d.cts +15 -15
- package/lib/FormatPainter.d.ts +15 -15
- package/lib/FormatPainter.js +1 -1
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.d.cts +15 -15
- package/lib/Heading.d.ts +15 -15
- package/lib/Heading.js +32 -31
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.d.cts +15 -15
- package/lib/Highlight.d.ts +15 -15
- package/lib/Highlight.js +1 -1
- package/lib/History.cjs +1 -1
- package/lib/History.d.cts +15 -15
- package/lib/History.d.ts +15 -15
- package/lib/History.js +1 -1
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.d.cts +15 -15
- package/lib/HorizontalRule.d.ts +15 -15
- package/lib/HorizontalRule.js +1 -1
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.d.cts +15 -15
- package/lib/Iframe.d.ts +15 -15
- package/lib/Iframe.js +1 -1
- package/lib/Image.cjs +1 -1
- package/lib/Image.d.cts +15 -15
- package/lib/Image.d.ts +15 -15
- package/lib/Image.js +1 -1
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.d.cts +15 -15
- package/lib/ImageGif.d.ts +15 -15
- package/lib/ImageGif.js +1 -1
- package/lib/ImportWord.cjs +2 -2
- package/lib/ImportWord.d.cts +15 -15
- package/lib/ImportWord.d.ts +15 -15
- package/lib/ImportWord.js +3 -2
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.d.cts +15 -15
- package/lib/Indent.d.ts +15 -15
- package/lib/Indent.js +1 -1
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.d.cts +15 -15
- package/lib/Italic.d.ts +15 -15
- package/lib/Italic.js +1 -1
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.d.cts +15 -15
- package/lib/Katex.d.ts +15 -15
- package/lib/Katex.js +41 -40
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.d.cts +15 -15
- package/lib/LineHeight.d.ts +15 -15
- package/lib/LineHeight.js +17 -16
- package/lib/Link.cjs +1 -1
- package/lib/Link.d.cts +15 -15
- package/lib/Link.d.ts +15 -15
- package/lib/Link.js +1 -1
- package/lib/ListItem.d.cts +15 -15
- package/lib/ListItem.d.ts +15 -15
- package/lib/Mention.d.cts +15 -15
- package/lib/Mention.d.ts +15 -15
- package/lib/Mermaid.cjs +2 -2
- package/lib/Mermaid.d.cts +15 -15
- package/lib/Mermaid.d.ts +15 -15
- package/lib/Mermaid.js +138 -137
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.d.cts +15 -15
- package/lib/MoreMark.d.ts +15 -15
- package/lib/MoreMark.js +1 -1
- package/lib/MultiColumn.cjs +1 -1
- package/lib/MultiColumn.d.cts +15 -15
- package/lib/MultiColumn.d.ts +15 -15
- package/lib/MultiColumn.js +1 -1
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.d.cts +15 -15
- package/lib/OrderedList.d.ts +15 -15
- package/lib/OrderedList.js +1 -1
- package/lib/{RichTextEditor-C8Sm1E6J.cjs → RichTextEditor-DWlLqTl9.cjs} +4 -4
- package/lib/{RichTextEditor-BQN2eLD_.js → RichTextEditor-KP2Rgcqe.js} +15 -39
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.d.cts +15 -15
- package/lib/SearchAndReplace.d.ts +15 -15
- package/lib/SearchAndReplace.js +68 -67
- package/lib/Selection.d.cts +15 -15
- package/lib/Selection.d.ts +15 -15
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.d.cts +15 -15
- package/lib/SlashCommand.d.ts +15 -15
- package/lib/SlashCommand.js +1 -1
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.d.cts +15 -15
- package/lib/Strike.d.ts +15 -15
- package/lib/Strike.js +1 -1
- package/lib/SubAndSuperScript.cjs +1 -1
- package/lib/SubAndSuperScript.d.cts +15 -15
- package/lib/SubAndSuperScript.d.ts +15 -15
- package/lib/SubAndSuperScript.js +1 -1
- package/lib/Table.cjs +1 -1
- package/lib/Table.d.cts +15 -15
- package/lib/Table.d.ts +15 -15
- package/lib/Table.js +2 -1
- package/lib/TableOfContent.cjs +1 -1
- package/lib/TableOfContent.d.cts +15 -15
- package/lib/TableOfContent.d.ts +15 -15
- package/lib/TableOfContent.js +50 -49
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.d.cts +15 -15
- package/lib/TaskList.d.ts +15 -15
- package/lib/TaskList.js +1 -1
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.d.cts +15 -15
- package/lib/TextAlign.d.ts +15 -15
- package/lib/TextAlign.js +8 -7
- package/lib/TextBubble.cjs +1 -1
- package/lib/TextBubble.d.cts +15 -15
- package/lib/TextBubble.d.ts +15 -15
- package/lib/TextBubble.js +1 -1
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.d.cts +15 -15
- package/lib/TextDirection.d.ts +15 -15
- package/lib/TextDirection.js +14 -13
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.d.cts +15 -15
- package/lib/TextUnderline.d.ts +15 -15
- package/lib/TextUnderline.js +1 -1
- package/lib/TrailingNode.d.cts +15 -15
- package/lib/TrailingNode.d.ts +15 -15
- package/lib/{Twitter-Dg6WWauX.js → Twitter-99ivY5qv.js} +62 -61
- package/lib/{Twitter-CL2pu4QM.cjs → Twitter-BvfvUtNT.cjs} +2 -2
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.d.cts +15 -15
- package/lib/Twitter.d.ts +15 -15
- package/lib/Twitter.js +1 -1
- package/lib/Video.cjs +1 -1
- package/lib/Video.d.cts +15 -15
- package/lib/Video.d.ts +15 -15
- package/lib/Video.js +1 -1
- package/lib/bubble-extra.cjs +1 -1
- package/lib/bubble-extra.d.cts +15 -15
- package/lib/bubble-extra.d.ts +15 -15
- package/lib/bubble-extra.js +5 -5
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +16 -15
- package/lib/index.d.ts +16 -15
- package/lib/index.js +2 -2
- package/lib/locale-bundle.d.cts +15 -15
- package/lib/locale-bundle.d.ts +15 -15
- package/lib/{textarea-BglwYF6b.js → textarea-CktfkXNe.js} +1 -1
- package/lib/{textarea-D5WVZMgt.cjs → textarea-DdH64g04.cjs} +1 -1
- package/package.json +1 -1
- package/lib/Drawer-CmoEF-Zg.cjs +0 -1
- package/lib/Excalidraw-CM74U5tG.js +0 -289
- package/lib/Excalidraw-DAPP9qgY.cjs +0 -1
package/lib/ImportWord.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Es=require("./index-ByRfqzMr.cjs"),br=require("react/jsx-runtime"),ya=require("react"),je=require("./RichTextEditor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Es=require("./index-ByRfqzMr.cjs"),br=require("react/jsx-runtime"),ya=require("react"),je=require("./RichTextEditor-DWlLqTl9.cjs"),As=require("./index-D_A0TBRA.cjs");var Ve={},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,Fi=Object.prototype,va=typeof Symbol<"u"?Symbol.prototype:null,Fs=Ht.push,it=Ht.slice,Qn=Fi.toString,Cs=Fi.hasOwnProperty,qc=typeof ArrayBuffer<"u",Ss=typeof DataView<"u",Bs=Array.isArray,xa=Object.keys,_a=Object.create,Ua=qc&&ArrayBuffer.isView,ks=isNaN,Ws=isFinite,Pc=!{toString:null}.propertyIsEnumerable("toString"),Ta=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Rs=Math.pow(2,53)-1;function Le(e,n){return n=n==null?e.length-1:+n,function(){for(var t=Math.max(arguments.length-n,0),r=Array(t),c=0;c<t;c++)r[c]=arguments[c+n];switch(n){case 0:return e.call(this,r);case 1:return e.call(this,arguments[0],r);case 2:return e.call(this,arguments[0],arguments[1],r)}var i=Array(n+1);for(c=0;c<n;c++)i[c]=arguments[c];return i[n]=r,e.apply(this,i)}}function hn(e){var n=typeof e;return n==="function"||n==="object"&&!!e}function zc(e){return e===null}function Ci(e){return e===void 0}function Si(e){return e===!0||e===!1||Qn.call(e)==="[object Boolean]"}function jc(e){return!!(e&&e.nodeType===1)}function Ie(e){var n="[object "+e+"]";return function(t){return Qn.call(t)===n}}const Gt=Ie("String"),Bi=Ie("Number"),Xc=Ie("Date"),Vc=Ie("RegExp"),Hc=Ie("Error"),ki=Ie("Symbol"),Wi=Ie("ArrayBuffer");var Gc=Ie("Function"),Ns=Da.document&&Da.document.childNodes;typeof/./!="function"&&typeof Int8Array!="object"&&typeof Ns!="function"&&(Gc=function(e){return typeof e=="function"||!1});const Oe=Gc,Zc=Ie("Object");var $c=Ss&&(!/\[native code\]/.test(String(DataView))||Zc(new DataView(new ArrayBuffer(8)))),Ri=typeof Map<"u"&&Zc(new Map),Os=Ie("DataView");function Is(e){return e!=null&&Oe(e.getInt8)&&Wi(e.buffer)}const Jn=$c?Is:Os,pn=Bs||Ie("Array");function gn(e,n){return e!=null&&Cs.call(e,n)}var Ti=Ie("Arguments");(function(){Ti(arguments)||(Ti=function(e){return gn(e,"callee")})})();const Zt=Ti;function Yc(e){return!ki(e)&&Ws(e)&&!isNaN(parseFloat(e))}function Ni(e){return Bi(e)&&ks(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<=Rs}}function Qc(e){return function(n){return n==null?void 0:n[e]}}const Pt=Qc("byteLength"),Ls=Kc(Pt);var Ms=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function qs(e){return Ua?Ua(e)&&!Jn(e):Ls(e)&&Ms.test(Qn.call(e))}const Ii=qc?qs:Oi(!1),qe=Qc("length");function Ps(e){for(var n={},t=e.length,r=0;r<t;++r)n[e[r]]=!0;return{contains:function(c){return n[c]===!0},push:function(c){return n[c]=!0,e.push(c)}}}function Jc(e,n){n=Ps(n);var t=Ta.length,r=e.constructor,c=Oe(r)&&r.prototype||Fi,i="constructor";for(gn(e,i)&&!n.contains(i)&&n.push(i);t--;)i=Ta[t],i in e&&e[i]!==c[i]&&!n.contains(i)&&n.push(i)}function ke(e){if(!hn(e))return[];if(xa)return xa(e);var n=[];for(var t in e)gn(e,t)&&n.push(t);return Pc&&Jc(e,n),n}function eu(e){if(e==null)return!0;var n=qe(e);return typeof n=="number"&&(pn(e)||Gt(e)||Zt(e))?n===0:qe(ke(e))===0}function Li(e,n){var t=ke(n),r=t.length;if(e==null)return!r;for(var c=Object(e),i=0;i<r;i++){var a=t[i];if(n[a]!==c[a]||!(a in c))return!1}return!0}function Ee(e){if(e instanceof Ee)return e;if(!(this instanceof Ee))return new Ee(e);this._wrapped=e}Ee.VERSION=Ai;Ee.prototype.value=function(){return this._wrapped};Ee.prototype.valueOf=Ee.prototype.toJSON=Ee.prototype.value;Ee.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,r){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,r)}function nu(e,n,t,r){e instanceof Ee&&(e=e._wrapped),n instanceof Ee&&(n=n._wrapped);var c=Qn.call(e);if(c!==Qn.call(n))return!1;if($c&&c=="[object Object]"&&Jn(e)){if(!Jn(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,r)}var i=c==="[object Array]";if(!i&&Ii(e)){var a=Pt(e);if(a!==Pt(n))return!1;if(e.buffer===n.buffer&&e.byteOffset===n.byteOffset)return!0;i=!0}if(!i){if(typeof e!="object"||typeof n!="object")return!1;var o=e.constructor,u=n.constructor;if(o!==u&&!(Oe(o)&&o instanceof o&&Oe(u)&&u instanceof u)&&"constructor"in e&&"constructor"in n)return!1}t=t||[],r=r||[];for(var l=t.length;l--;)if(t[l]===e)return r[l]===n;if(t.push(e),r.push(n),i){if(l=e.length,l!==n.length)return!1;for(;l--;)if(!wi(e[l],n[l],t,r))return!1}else{var b=ke(e),m;if(l=b.length,ke(n).length!==l)return!1;for(;l--;)if(m=b[l],!(gn(n,m)&&wi(e[m],n[m],t,r)))return!1}return t.pop(),r.pop(),!0}function tu(e,n){return wi(e,n)}function Mn(e){if(!hn(e))return[];var n=[];for(var t in e)n.push(t);return Pc&&Jc(e,n),n}function Mi(e){var n=qe(e);return function(t){if(t==null)return!1;var r=Mn(t);if(qe(r))return!1;for(var c=0;c<n;c++)if(!Oe(t[e[c]]))return!1;return e!==au||!Oe(t[qi])}}var qi="forEach",ru="has",Pi=["clear","delete"],iu=["get",ru,"set"],zs=Pi.concat(qi,iu),au=Pi.concat(iu),js=["add"].concat(Pi,qi,ru);const ou=Ri?Mi(zs):Ie("Map"),cu=Ri?Mi(au):Ie("WeakMap"),uu=Ri?Mi(js):Ie("Set"),su=Ie("WeakSet");function An(e){for(var n=ke(e),t=n.length,r=Array(t),c=0;c<t;c++)r[c]=e[n[c]];return r}function du(e){for(var n=ke(e),t=n.length,r=Array(t),c=0;c<t;c++)r[c]=[n[c],e[n[c]]];return r}function zi(e){for(var n={},t=ke(e),r=0,c=t.length;r<c;r++)n[e[t[r]]]=t[r];return n}function et(e){var n=[];for(var t in e)Oe(e[t])&&n.push(t);return n.sort()}function ji(e,n){return function(t){var r=arguments.length;if(n&&(t=Object(t)),r<2||t==null)return t;for(var c=1;c<r;c++)for(var i=arguments[c],a=e(i),o=a.length,u=0;u<o;u++){var l=a[u];(!n||t[l]===void 0)&&(t[l]=i[l])}return t}}const Xi=ji(Mn),In=ji(ke),Vi=ji(Mn,!0);function Xs(){return function(){}}function lu(e){if(!hn(e))return{};if(_a)return _a(e);var n=Xs();n.prototype=e;var t=new n;return n.prototype=null,t}function fu(e,n){var t=lu(e);return n&&In(t,n),t}function hu(e){return hn(e)?pn(e)?e.slice():Xi({},e):e}function pu(e,n){return n(e),e}function Hi(e){return pn(e)?e:[e]}Ee.toPath=Hi;function at(e){return Ee.toPath(e)}function Gi(e,n){for(var t=n.length,r=0;r<t;r++){if(e==null)return;e=e[n[r]]}return t?e:void 0}function Zi(e,n,t){var r=Gi(e,at(n));return Ci(r)?t:r}function gu(e,n){n=at(n);for(var t=n.length,r=0;r<t;r++){var c=n[r];if(!gn(e,c))return!1;e=e[c]}return!!t}function $t(e){return e}function En(e){return e=In({},e),function(n){return Li(n,e)}}function Yt(e){return e=at(e),function(n){return Gi(n,e)}}function ot(e,n,t){if(n===void 0)return e;switch(t??3){case 1:return function(r){return e.call(n,r)};case 3:return function(r,c,i){return e.call(n,r,c,i)};case 4:return function(r,c,i,a){return e.call(n,r,c,i,a)}}return function(){return e.apply(n,arguments)}}function mu(e,n,t){return e==null?$t:Oe(e)?ot(e,n,t):hn(e)&&!pn(e)?En(e):Yt(e)}function Kt(e,n){return mu(e,n,1/0)}Ee.iteratee=Kt;function Pe(e,n,t){return Ee.iteratee!==Kt?Ee.iteratee(e,n):mu(e,n,t)}function bu(e,n,t){n=Pe(n,t);for(var r=ke(e),c=r.length,i={},a=0;a<c;a++){var o=r[a];i[o]=n(e[o],o,e)}return i}function $i(){}function yu(e){return e==null?$i:function(n){return Zi(e,n)}}function Du(e,n,t){var r=Array(Math.max(0,e));n=ot(n,t,1);for(var c=0;c<e;c++)r[c]=n(c);return r}function zt(e,n){return n==null&&(n=e,e=0),e+Math.floor(Math.random()*(n-e+1))}const Ln=Date.now||function(){return new Date().getTime()};function vu(e){var n=function(i){return e[i]},t="(?:"+ke(e).join("|")+")",r=RegExp(t),c=RegExp(t,"g");return function(i){return i=i==null?"":""+i,r.test(i)?i.replace(c,n):i}}const xu={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},_u=vu(xu),Vs=zi(xu),Uu=vu(Vs),Tu=Ee.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var yr=/(.)^/,Hs={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Gs=/\\|'|\r|\n|\u2028|\u2029/g;function Zs(e){return"\\"+Hs[e]}var $s=/^\s*(\w|\$)+\s*$/;function wu(e,n,t){!n&&t&&(n=t),n=Vi({},n,Ee.templateSettings);var r=RegExp([(n.escape||yr).source,(n.interpolate||yr).source,(n.evaluate||yr).source].join("|")+"|$","g"),c=0,i="__p+='";e.replace(r,function(l,b,m,g,h){return i+=e.slice(c,h).replace(Gs,Zs),c=h+l.length,b?i+=`'+
|
|
2
2
|
((__t=(`+b+`))==null?'':_.escape(__t))+
|
|
3
3
|
'`:m?i+=`'+
|
|
4
4
|
((__t=(`+m+`))==null?'':__t)+
|
|
@@ -228,4 +228,4 @@ Character number: `+n.characterNumber},e.prototype.lineNumber=function(){return
|
|
|
228
228
|
`,r:"\r",t:" "};function s(S){return S.replace(/\\(.)/g,function(A,I){return f[I]||I})}var p=n.rules.sequence(n.rules.tokenOfType("open-square-bracket"),n.rules.sequence.cut(),n.rules.sequence.capture(g),n.rules.tokenOfType("equals"),n.rules.sequence.capture(y),n.rules.tokenOfType("close-square-bracket")).map(function(S,A){return{name:S,value:A,append:!1}}),d=n.rules.sequence(n.rules.tokenOfType("dot"),n.rules.sequence.cut(),n.rules.sequence.capture(g)).map(function(S){return{name:"class",value:S,append:!0}}),D=n.rules.firstOf("attribute or class",p,d);function w(S,A){var I=c(A),Z=n.Parser(),T=Z.parseTokens(S,I);return T.isSuccess()?i.success(T.value()):new i.Result(null,[i.warning(_(A,T))])}function _(S,A){return"Did not understand this style mapping, so ignored it: "+S+`
|
|
229
229
|
`+A.errors().map(U).join(`
|
|
230
230
|
`)}function U(S){return"Error was at character number "+S.characterNumber()+": Expected "+S.expected+" but got "+S.actual}var E=o();return Yn}var Kn={},Oc;function zl(){if(Oc)return Kn;Oc=1,Kn.readOptions=r;var e=Be,n=Kn._defaultStyleMap=["p.Heading1 => h1:fresh","p.Heading2 => h2:fresh","p.Heading3 => h3:fresh","p.Heading4 => h4:fresh","p.Heading5 => h5:fresh","p.Heading6 => h6:fresh","p[style-name='Heading 1'] => h1:fresh","p[style-name='Heading 2'] => h2:fresh","p[style-name='Heading 3'] => h3:fresh","p[style-name='Heading 4'] => h4:fresh","p[style-name='Heading 5'] => h5:fresh","p[style-name='Heading 6'] => h6:fresh","p[style-name='heading 1'] => h1:fresh","p[style-name='heading 2'] => h2:fresh","p[style-name='heading 3'] => h3:fresh","p[style-name='heading 4'] => h4:fresh","p[style-name='heading 5'] => h5:fresh","p[style-name='heading 6'] => h6:fresh","p.Heading => h1:fresh","p[style-name='Heading'] => h1:fresh","r[style-name='Strong'] => strong","p[style-name='footnote text'] => p:fresh","r[style-name='footnote reference'] =>","p[style-name='endnote text'] => p:fresh","r[style-name='endnote reference'] =>","p[style-name='annotation text'] => p:fresh","r[style-name='annotation reference'] =>","p[style-name='Footnote'] => p:fresh","r[style-name='Footnote anchor'] =>","p[style-name='Endnote'] => p:fresh","r[style-name='Endnote anchor'] =>","p:unordered-list(1) => ul > li:fresh","p:unordered-list(2) => ul|ol > li > ul > li:fresh","p:unordered-list(3) => ul|ol > li > ul|ol > li > ul > li:fresh","p:unordered-list(4) => ul|ol > li > ul|ol > li > ul|ol > li > ul > li:fresh","p:unordered-list(5) => ul|ol > li > ul|ol > li > ul|ol > li > ul|ol > li > ul > li:fresh","p:ordered-list(1) => ol > li:fresh","p:ordered-list(2) => ul|ol > li > ol > li:fresh","p:ordered-list(3) => ul|ol > li > ul|ol > li > ol > li:fresh","p:ordered-list(4) => ul|ol > li > ul|ol > li > ul|ol > li > ol > li:fresh","p:ordered-list(5) => ul|ol > li > ul|ol > li > ul|ol > li > ul|ol > li > ol > li:fresh","r[style-name='Hyperlink'] =>","p[style-name='Normal'] => p:fresh","p.Body => p:fresh","p[style-name='Body'] => p:fresh"],t=Kn._standardOptions={transformDocument:i,includeDefaultStyleMap:!0,includeEmbeddedStyleMap:!0};function r(a){return a=a||{},e.extend({},t,a,{customStyleMap:c(a.styleMap),readStyleMap:function(){var o=this.customStyleMap;return this.includeEmbeddedStyleMap&&(o=o.concat(c(this.embeddedStyleMap))),this.includeDefaultStyleMap&&(o=o.concat(n)),o}})}function c(a){return a?e.isString(a)?a.split(`
|
|
231
|
-
`).map(function(o){return o.trim()}).filter(function(o){return o!==""&&o.charAt(0)!=="#"}):a:[]}function i(a){return a}return Kn}var _i={},Ic;function jl(){if(Ic)return _i;Ic=1;var e=mn(),n=hs();_i.openZip=t;function t(r){return r.arrayBuffer?e.resolve(n.openArrayBuffer(r.arrayBuffer)):e.reject(new Error("Could not find file in options"))}return _i}var Ui={},Lc;function Xl(){if(Lc)return Ui;Lc=1;var e=mr(),n=gr();Ui.element=t;function t(r){return function(c){return n.elementWithTag(e.element(r),[c])}}return Ui}var Mc;function Vl(){if(Mc)return Ve;Mc=1;var e=Be,n=wl(),t=El(),r=Bl().DocumentConverter,c=kl().convertElementToRawText,i=Pl().readStyle,a=zl().readOptions,o=jl(),u=on().Result;Ve.convertToHtml=l,Ve.convertToMarkdown=b,Ve.convert=m,Ve.extractRawText=f,Ve.images=vs(),Ve.transforms=ys(),Ve.underline=Xl(),Ve.embedStyleMap=s,Ve.readEmbeddedStyleMap=g;function l(p,d){return m(p,d)}function b(p,d){var D=Object.create(d||{});return D.outputFormat="markdown",m(p,D)}function m(p,d){return d=a(d),o.openZip(p).tap(function(D){return t.readStyleMap(D).then(function(w){d.embeddedStyleMap=w})}).then(function(D){return n.read(D,p).then(function(w){return w.map(d.transformDocument)}).then(function(w){return h(w,d)})})}function g(p){return o.openZip(p).then(t.readStyleMap)}function h(p,d){var D=y(d.readStyleMap()),w=e.extend({},d,{styleMap:D.value}),_=new r(w);return p.flatMapThen(function(U){return D.flatMapThen(function(E){return _.convertToHtml(U)})})}function y(p){return u.combine((p||[]).map(i)).map(function(d){return d.filter(function(D){return!!D})})}function f(p){return o.openZip(p).then(n.read).then(function(d){return d.map(c)})}function s(p,d){return o.openZip(p).tap(function(D){return t.writeStyleMap(D,d)}).then(function(D){return D.toArrayBuffer()}).then(function(D){return{toArrayBuffer:function(){return D},toBuffer:function(){return Buffer.from(D)}}})}return Ve.styleMapping=function(){throw new Error(`Use a raw string instead of mammoth.styleMapping e.g. "p[style-name='Title'] => h1" instead of mammoth.styleMapping("p[style-name='Title'] => h1")`)},Ve}var Hl=Vl();const Gl=je.getDefaultExportFromCjs(Hl);function Zl(e,n){const t=atob(e.split(",")[1]),r=Array.from({length:t.length});for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);const c=new Uint8Array(r);return new Blob([c],{type:n})}function $l(e,n){return new File([e],n,{type:e.type})}function Yl(e){const{toast:n}=je.useToast(),{t}=As.useLocale(),[r,c]=ya.useState(!1),i=ya.useRef(null);function a(){var m;(m=i.current)==null||m.click()}function o(m){const g=m.target.files[0];if(g){if(g.size>e.limit){n({variant:"destructive",title:t("editor.importWord.limitSize")});return}l(g)}}async function u(m){var s;const h=new DOMParser().parseFromString(m,"text/html"),y=h.querySelectorAll("img");if(y.length===0)return h.body.innerHTML;if(je.hasExtension(e.editor,"image")){const p=(s=e.editor.extensionManager.extensions.find(d=>d.name==="importWord"))==null?void 0:s.options;if(p&&typeof p.upload=="function"){const d=[];for(const w of y){const _=w.getAttribute("src"),U=Zl(_,"image/jpeg"),E=$l(U,"image.jpeg");d.push(E)}const D=await p.upload(d);for(const[w,_]of y.entries()){_.setAttribute("src",D[w].src);const U=_.parentElement;(U==null?void 0:U.tagName)==="P"&&(U.insertAdjacentElement("beforebegin",_),!U.hasChildNodes()&&U.textContent===""&&U.remove())}return h.body.innerHTML}else return console.warn("Image Upload method found, skip image conversion"),h.body.innerHTML}else return console.error("Image extension not found, unable to convert image"),h.body.innerHTML}async function l(m){c(!0);try{if(e.convert){const g=await e.convert(m);b(g)}else{const g=await m.arrayBuffer(),{value:h}=await Gl.convertToHtml({arrayBuffer:g},e==null?void 0:e.mammothOptions);b(h)}}finally{c(!1)}}async function b(m){const g=await u(m);e.editor.chain().setContent(g,!0).run()}return br.jsxs("div",{children:[br.jsx(je.ActionButton,{action:a,disabled:e==null?void 0:e.disabled,icon:e==null?void 0:e.icon,loading:r,tooltip:e==null?void 0:e.tooltip}),br.jsx("input",{accept:".docx",onChange:o,ref:i,type:"file",style:{display:"none"}})]})}const Kl=Es.Extension.create({name:"importWord",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),upload:void 0,convert:void 0,limit:1024*1024*10,button:({editor:n,extension:t,t:r})=>{const{convert:c,limit:i,mammothOptions:a}=t.options;return{component:Yl,componentProps:{editor:n,convert:c,limit:i,mammothOptions:a,action:()=>n.commands.setHorizontalRule(),disabled:!n.can().setHorizontalRule(),icon:"Word",shortcutKeys:t.options.shortcutKeys??["alt","mod","S"],tooltip:r("editor.importWord.tooltip")}}}}}});exports.ImportWord=Kl;
|
|
231
|
+
`).map(function(o){return o.trim()}).filter(function(o){return o!==""&&o.charAt(0)!=="#"}):a:[]}function i(a){return a}return Kn}var _i={},Ic;function jl(){if(Ic)return _i;Ic=1;var e=mn(),n=hs();_i.openZip=t;function t(r){return r.arrayBuffer?e.resolve(n.openArrayBuffer(r.arrayBuffer)):e.reject(new Error("Could not find file in options"))}return _i}var Ui={},Lc;function Xl(){if(Lc)return Ui;Lc=1;var e=mr(),n=gr();Ui.element=t;function t(r){return function(c){return n.elementWithTag(e.element(r),[c])}}return Ui}var Mc;function Vl(){if(Mc)return Ve;Mc=1;var e=Be,n=wl(),t=El(),r=Bl().DocumentConverter,c=kl().convertElementToRawText,i=Pl().readStyle,a=zl().readOptions,o=jl(),u=on().Result;Ve.convertToHtml=l,Ve.convertToMarkdown=b,Ve.convert=m,Ve.extractRawText=f,Ve.images=vs(),Ve.transforms=ys(),Ve.underline=Xl(),Ve.embedStyleMap=s,Ve.readEmbeddedStyleMap=g;function l(p,d){return m(p,d)}function b(p,d){var D=Object.create(d||{});return D.outputFormat="markdown",m(p,D)}function m(p,d){return d=a(d),o.openZip(p).tap(function(D){return t.readStyleMap(D).then(function(w){d.embeddedStyleMap=w})}).then(function(D){return n.read(D,p).then(function(w){return w.map(d.transformDocument)}).then(function(w){return h(w,d)})})}function g(p){return o.openZip(p).then(t.readStyleMap)}function h(p,d){var D=y(d.readStyleMap()),w=e.extend({},d,{styleMap:D.value}),_=new r(w);return p.flatMapThen(function(U){return D.flatMapThen(function(E){return _.convertToHtml(U)})})}function y(p){return u.combine((p||[]).map(i)).map(function(d){return d.filter(function(D){return!!D})})}function f(p){return o.openZip(p).then(n.read).then(function(d){return d.map(c)})}function s(p,d){return o.openZip(p).tap(function(D){return t.writeStyleMap(D,d)}).then(function(D){return D.toArrayBuffer()}).then(function(D){return{toArrayBuffer:function(){return D},toBuffer:function(){return Buffer.from(D)}}})}return Ve.styleMapping=function(){throw new Error(`Use a raw string instead of mammoth.styleMapping e.g. "p[style-name='Title'] => h1" instead of mammoth.styleMapping("p[style-name='Title'] => h1")`)},Ve}var Hl=Vl();const Gl=je.getDefaultExportFromCjs(Hl);function Zl(e,n){const t=atob(e.split(",")[1]),r=Array.from({length:t.length});for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);const c=new Uint8Array(r);return new Blob([c],{type:n})}function $l(e,n){return new File([e],n,{type:e.type})}function Yl(e){const{toast:n}=je.useToast(),{t}=As.useLocale(),[r,c]=ya.useState(!1),i=ya.useRef(null);function a(){var m;(m=i.current)==null||m.click()}function o(m){const g=m.target.files[0];if(g){if(g.size>e.limit){n({variant:"destructive",title:t("editor.importWord.limitSize")});return}l(g)}}async function u(m){var s;const h=new DOMParser().parseFromString(m,"text/html"),y=h.querySelectorAll("img");if(y.length===0)return h.body.innerHTML;if(je.hasExtension(e.editor,"image")){const p=(s=e.editor.extensionManager.extensions.find(d=>d.name==="importWord"))==null?void 0:s.options;if(p&&typeof p.upload=="function"){const d=[];for(const w of y){const _=w.getAttribute("src"),U=Zl(_,"image/jpeg"),E=$l(U,"image.jpeg");d.push(E)}const D=await p.upload(d);for(const[w,_]of y.entries()){_.setAttribute("src",D[w].src);const U=_.parentElement;(U==null?void 0:U.tagName)==="P"&&(U.insertAdjacentElement("beforebegin",_),!U.hasChildNodes()&&U.textContent===""&&U.remove())}return h.body.innerHTML}else return console.warn("Image Upload method found, skip image conversion"),h.body.innerHTML}else return console.error("Image extension not found, unable to convert image"),h.body.innerHTML}async function l(m){c(!0);try{if(e.convert){const g=await e.convert(m);b(g)}else{const g=await m.arrayBuffer(),{value:h}=await Gl.convertToHtml({arrayBuffer:g},e==null?void 0:e.mammothOptions);b(h)}}finally{c(!1)}}async function b(m){const g=await u(m);e.editor.chain().setContent(g,!0).run()}return br.jsxs("div",{children:[br.jsx(je.ActionButton,{action:a,disabled:e==null?void 0:e.disabled,icon:e==null?void 0:e.icon,loading:r,tooltip:e==null?void 0:e.tooltip,tooltipOptions:e==null?void 0:e.tooltipOptions}),br.jsx("input",{accept:".docx",onChange:o,ref:i,type:"file",style:{display:"none"}})]})}const Kl=Es.Extension.create({name:"importWord",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),upload:void 0,convert:void 0,limit:1024*1024*10,button:({editor:n,extension:t,t:r})=>{const{convert:c,limit:i,mammothOptions:a}=t.options;return{component:Yl,componentProps:{editor:n,convert:c,limit:i,mammothOptions:a,action:()=>n.commands.setHorizontalRule(),disabled:!n.can().setHorizontalRule(),icon:"Word",shortcutKeys:t.options.shortcutKeys??["alt","mod","S"],tooltip:r("editor.importWord.tooltip")}}}}}});exports.ImportWord=Kl;
|
package/lib/ImportWord.d.cts
CHANGED
|
@@ -196,6 +196,21 @@ declare module '@tiptap/core' {
|
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
|
|
199
|
+
declare module '@tiptap/core' {
|
|
200
|
+
interface Commands<ReturnType> {
|
|
201
|
+
iframe: {
|
|
202
|
+
/**
|
|
203
|
+
* Add an iframe
|
|
204
|
+
*/
|
|
205
|
+
setIframe: (options: {
|
|
206
|
+
src: string;
|
|
207
|
+
service: string;
|
|
208
|
+
}) => ReturnType;
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
|
|
199
214
|
declare module '@tiptap/core' {
|
|
200
215
|
interface Commands<ReturnType> {
|
|
201
216
|
imageUpload: {
|
|
@@ -216,21 +231,6 @@ declare module '@tiptap/core' {
|
|
|
216
231
|
}
|
|
217
232
|
|
|
218
233
|
|
|
219
|
-
declare module '@tiptap/core' {
|
|
220
|
-
interface Commands<ReturnType> {
|
|
221
|
-
iframe: {
|
|
222
|
-
/**
|
|
223
|
-
* Add an iframe
|
|
224
|
-
*/
|
|
225
|
-
setIframe: (options: {
|
|
226
|
-
src: string;
|
|
227
|
-
service: string;
|
|
228
|
-
}) => ReturnType;
|
|
229
|
-
};
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
|
|
234
234
|
declare module '@tiptap/core' {
|
|
235
235
|
interface Commands<ReturnType> {
|
|
236
236
|
imageGifUpload: {
|
package/lib/ImportWord.d.ts
CHANGED
|
@@ -196,6 +196,21 @@ declare module '@tiptap/core' {
|
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
|
|
199
|
+
declare module '@tiptap/core' {
|
|
200
|
+
interface Commands<ReturnType> {
|
|
201
|
+
iframe: {
|
|
202
|
+
/**
|
|
203
|
+
* Add an iframe
|
|
204
|
+
*/
|
|
205
|
+
setIframe: (options: {
|
|
206
|
+
src: string;
|
|
207
|
+
service: string;
|
|
208
|
+
}) => ReturnType;
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
|
|
199
214
|
declare module '@tiptap/core' {
|
|
200
215
|
interface Commands<ReturnType> {
|
|
201
216
|
imageUpload: {
|
|
@@ -216,21 +231,6 @@ declare module '@tiptap/core' {
|
|
|
216
231
|
}
|
|
217
232
|
|
|
218
233
|
|
|
219
|
-
declare module '@tiptap/core' {
|
|
220
|
-
interface Commands<ReturnType> {
|
|
221
|
-
iframe: {
|
|
222
|
-
/**
|
|
223
|
-
* Add an iframe
|
|
224
|
-
*/
|
|
225
|
-
setIframe: (options: {
|
|
226
|
-
src: string;
|
|
227
|
-
service: string;
|
|
228
|
-
}) => ReturnType;
|
|
229
|
-
};
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
|
|
234
234
|
declare module '@tiptap/core' {
|
|
235
235
|
interface Commands<ReturnType> {
|
|
236
236
|
imageGifUpload: {
|
package/lib/ImportWord.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { E as ws } from "./index-DI9T3iLd.js";
|
|
2
2
|
import { jsxs as Es, jsx as ba } from "react/jsx-runtime";
|
|
3
3
|
import { useState as As, useRef as Fs } from "react";
|
|
4
|
-
import { a9 as Cs, aa as dn, ab as Ss, ac as Bs, A as ks, ad as Ws } from "./RichTextEditor-
|
|
4
|
+
import { a9 as Cs, aa as dn, ab as Ss, ac as Bs, A as ks, ad as Ws } from "./RichTextEditor-KP2Rgcqe.js";
|
|
5
5
|
import { u as Rs } from "./index-CsK90iVd.js";
|
|
6
6
|
var Xe = {}, 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, Ns = Ht.push, it = Ht.slice, Qn = Ai.toString, Os = Ai.hasOwnProperty, Mc = typeof ArrayBuffer < "u", Is = typeof DataView < "u", Ls = Array.isArray, va = Object.keys, xa = Object.create, _a = Mc && ArrayBuffer.isView, Ms = isNaN, qs = isFinite, qc = !{ toString: null }.propertyIsEnumerable("toString"), Ua = [
|
|
7
7
|
"valueOf",
|
|
@@ -16585,7 +16585,8 @@ function rf(e) {
|
|
|
16585
16585
|
disabled: e == null ? void 0 : e.disabled,
|
|
16586
16586
|
icon: e == null ? void 0 : e.icon,
|
|
16587
16587
|
loading: r,
|
|
16588
|
-
tooltip: e == null ? void 0 : e.tooltip
|
|
16588
|
+
tooltip: e == null ? void 0 : e.tooltip,
|
|
16589
|
+
tooltipOptions: e == null ? void 0 : e.tooltipOptions
|
|
16589
16590
|
}
|
|
16590
16591
|
),
|
|
16591
16592
|
/* @__PURE__ */ ba(
|
package/lib/Indent.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-ByRfqzMr.cjs"),t=require("./RichTextEditor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-ByRfqzMr.cjs"),t=require("./RichTextEditor-DWlLqTl9.cjs"),a=i.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,extension:d}){var r,s;return[{component:t.ActionButton,componentProps:{action:()=>{e.commands.indent()},shortcutKeys:((r=d.options.shortcutKeys)==null?void 0:r[0])??["Tab"],icon:"IndentIncrease",tooltip:o("editor.indent.tooltip")}},{component:t.ActionButton,componentProps:{action:()=>{e.commands.outdent()},shortcutKeys:((s=d.options.shortcutKeys)==null?void 0:s[1])??["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=a;
|
package/lib/Indent.d.cts
CHANGED
|
@@ -187,6 +187,21 @@ declare module '@tiptap/core' {
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
|
|
190
|
+
declare module '@tiptap/core' {
|
|
191
|
+
interface Commands<ReturnType> {
|
|
192
|
+
iframe: {
|
|
193
|
+
/**
|
|
194
|
+
* Add an iframe
|
|
195
|
+
*/
|
|
196
|
+
setIframe: (options: {
|
|
197
|
+
src: string;
|
|
198
|
+
service: string;
|
|
199
|
+
}) => ReturnType;
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
|
|
190
205
|
declare module '@tiptap/core' {
|
|
191
206
|
interface Commands<ReturnType> {
|
|
192
207
|
imageUpload: {
|
|
@@ -207,21 +222,6 @@ declare module '@tiptap/core' {
|
|
|
207
222
|
}
|
|
208
223
|
|
|
209
224
|
|
|
210
|
-
declare module '@tiptap/core' {
|
|
211
|
-
interface Commands<ReturnType> {
|
|
212
|
-
iframe: {
|
|
213
|
-
/**
|
|
214
|
-
* Add an iframe
|
|
215
|
-
*/
|
|
216
|
-
setIframe: (options: {
|
|
217
|
-
src: string;
|
|
218
|
-
service: string;
|
|
219
|
-
}) => ReturnType;
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
|
|
225
225
|
declare module '@tiptap/core' {
|
|
226
226
|
interface Commands<ReturnType> {
|
|
227
227
|
imageGifUpload: {
|
package/lib/Indent.d.ts
CHANGED
|
@@ -187,6 +187,21 @@ declare module '@tiptap/core' {
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
|
|
190
|
+
declare module '@tiptap/core' {
|
|
191
|
+
interface Commands<ReturnType> {
|
|
192
|
+
iframe: {
|
|
193
|
+
/**
|
|
194
|
+
* Add an iframe
|
|
195
|
+
*/
|
|
196
|
+
setIframe: (options: {
|
|
197
|
+
src: string;
|
|
198
|
+
service: string;
|
|
199
|
+
}) => ReturnType;
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
|
|
190
205
|
declare module '@tiptap/core' {
|
|
191
206
|
interface Commands<ReturnType> {
|
|
192
207
|
imageUpload: {
|
|
@@ -207,21 +222,6 @@ declare module '@tiptap/core' {
|
|
|
207
222
|
}
|
|
208
223
|
|
|
209
224
|
|
|
210
|
-
declare module '@tiptap/core' {
|
|
211
|
-
interface Commands<ReturnType> {
|
|
212
|
-
iframe: {
|
|
213
|
-
/**
|
|
214
|
-
* Add an iframe
|
|
215
|
-
*/
|
|
216
|
-
setIframe: (options: {
|
|
217
|
-
src: string;
|
|
218
|
-
service: string;
|
|
219
|
-
}) => ReturnType;
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
|
|
225
225
|
declare module '@tiptap/core' {
|
|
226
226
|
interface Commands<ReturnType> {
|
|
227
227
|
imageGifUpload: {
|
package/lib/Indent.js
CHANGED
package/lib/Italic.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-ByRfqzMr.cjs"),i=require("./RichTextEditor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-ByRfqzMr.cjs"),i=require("./RichTextEditor-DWlLqTl9.cjs"),a=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,o=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,l=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,c=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,u=e.Mark.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",e.mergeAttributes(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[e.markInputRule({find:a,type:this.type}),e.markInputRule({find:l,type:this.type})]},addPasteRules(){return[e.markPasteRule({find:o,type:this.type}),e.markPasteRule({find:c,type:this.type})]}}),d=u.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button({editor:s,t:n,extension:r}){return{component:i.ActionButton,componentProps:{action:()=>s.commands.toggleItalic(),isActive:()=>s.isActive("italic")||!1,disabled:!1,shortcutKeys:r.options.shortcutKeys??["mod","I"],icon:"Italic",tooltip:n("editor.italic.tooltip")}}}}}});exports.Italic=d;
|
package/lib/Italic.d.cts
CHANGED
|
@@ -186,6 +186,21 @@ declare module '@tiptap/core' {
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
|
|
189
|
+
declare module '@tiptap/core' {
|
|
190
|
+
interface Commands<ReturnType> {
|
|
191
|
+
iframe: {
|
|
192
|
+
/**
|
|
193
|
+
* Add an iframe
|
|
194
|
+
*/
|
|
195
|
+
setIframe: (options: {
|
|
196
|
+
src: string;
|
|
197
|
+
service: string;
|
|
198
|
+
}) => ReturnType;
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
|
|
189
204
|
declare module '@tiptap/core' {
|
|
190
205
|
interface Commands<ReturnType> {
|
|
191
206
|
imageUpload: {
|
|
@@ -206,21 +221,6 @@ declare module '@tiptap/core' {
|
|
|
206
221
|
}
|
|
207
222
|
|
|
208
223
|
|
|
209
|
-
declare module '@tiptap/core' {
|
|
210
|
-
interface Commands<ReturnType> {
|
|
211
|
-
iframe: {
|
|
212
|
-
/**
|
|
213
|
-
* Add an iframe
|
|
214
|
-
*/
|
|
215
|
-
setIframe: (options: {
|
|
216
|
-
src: string;
|
|
217
|
-
service: string;
|
|
218
|
-
}) => ReturnType;
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
|
|
224
224
|
declare module '@tiptap/core' {
|
|
225
225
|
interface Commands<ReturnType> {
|
|
226
226
|
imageGifUpload: {
|
package/lib/Italic.d.ts
CHANGED
|
@@ -186,6 +186,21 @@ declare module '@tiptap/core' {
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
|
|
189
|
+
declare module '@tiptap/core' {
|
|
190
|
+
interface Commands<ReturnType> {
|
|
191
|
+
iframe: {
|
|
192
|
+
/**
|
|
193
|
+
* Add an iframe
|
|
194
|
+
*/
|
|
195
|
+
setIframe: (options: {
|
|
196
|
+
src: string;
|
|
197
|
+
service: string;
|
|
198
|
+
}) => ReturnType;
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
|
|
189
204
|
declare module '@tiptap/core' {
|
|
190
205
|
interface Commands<ReturnType> {
|
|
191
206
|
imageUpload: {
|
|
@@ -206,21 +221,6 @@ declare module '@tiptap/core' {
|
|
|
206
221
|
}
|
|
207
222
|
|
|
208
223
|
|
|
209
|
-
declare module '@tiptap/core' {
|
|
210
|
-
interface Commands<ReturnType> {
|
|
211
|
-
iframe: {
|
|
212
|
-
/**
|
|
213
|
-
* Add an iframe
|
|
214
|
-
*/
|
|
215
|
-
setIframe: (options: {
|
|
216
|
-
src: string;
|
|
217
|
-
service: string;
|
|
218
|
-
}) => ReturnType;
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
|
|
224
224
|
declare module '@tiptap/core' {
|
|
225
225
|
interface Commands<ReturnType> {
|
|
226
226
|
imageGifUpload: {
|
package/lib/Italic.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { M as i, c as s, d as n, m as o } from "./index-DI9T3iLd.js";
|
|
2
|
-
import { A as l } from "./RichTextEditor-
|
|
2
|
+
import { A as l } from "./RichTextEditor-KP2Rgcqe.js";
|
|
3
3
|
const c = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, d = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, u = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, m = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, p = i.create({
|
|
4
4
|
name: "italic",
|
|
5
5
|
addOptions() {
|
package/lib/Katex.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-ByRfqzMr.cjs"),f=require("./dom-dataset-Byuf1YmW.cjs"),n=require("react/jsx-runtime"),c=require("react"),b=require("katex"),j=require("lucide-react"),u=require("./RichTextEditor-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-ByRfqzMr.cjs"),f=require("./dom-dataset-Byuf1YmW.cjs"),n=require("react/jsx-runtime"),c=require("react"),b=require("katex"),j=require("lucide-react"),u=require("./RichTextEditor-DWlLqTl9.cjs"),w=require("./textarea-DdH64g04.cjs"),k=require("./index-D_A0TBRA.cjs");function $({editor:t,...e}){const{t:s}=k.useLocale(),o=u.useAttributes(t,x.name,{text:"",defaultShowPicker:!1}),{text:a,defaultShowPicker:r}=o,[i,d]=c.useState(""),g=c.useCallback(()=>{t.chain().focus().setKatex({text:i}).run(),d("")},[t,i]);c.useEffect(()=>{r&&t.chain().updateAttributes(x.name,{defaultShowPicker:!1}).focus().run()},[t,r]);const h=c.useMemo(()=>{try{return b.renderToString(`${i}`)}catch{return i}},[i]),m=c.useMemo(()=>`${i}`.trim()?n.jsx("span",{contentEditable:!1,dangerouslySetInnerHTML:{__html:h||""}}):null,[i,h]);return n.jsxs(u.Popover,{modal:!0,children:[n.jsx(u.PopoverTrigger,{asChild:!0,children:n.jsx(u.ActionButton,{icon:e==null?void 0:e.icon,tooltip:e==null?void 0:e.tooltip,tooltipOptions:e==null?void 0:e.tooltipOptions})}),n.jsxs(u.PopoverContent,{align:"start",className:"richtext-size-full richtext-p-2",hideWhenDetached:!0,side:"bottom",children:[n.jsx(u.Label,{className:"richtext-mb-[6px]",children:s("editor.formula.dialog.text")}),n.jsx("div",{className:"richtext-mb-[16px] richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5",children:n.jsx("div",{className:"richtext-relative richtext-w-full richtext-max-w-sm",children:n.jsx(w.Textarea,{autoFocus:!0,className:"richtext-w-full",defaultValue:a,onChange:p=>d(p.target.value),placeholder:"Text",required:!0,rows:3,value:i})})}),m&&n.jsx("div",{className:"richtext-my-[10px] richtext-max-w-[286px] richtext-overflow-auto richtext-whitespace-nowrap richtext-rounded-[6px] !richtext-border richtext-p-[10px]",children:m}),n.jsxs("div",{className:"richtext-flex richtext-items-center richtext-justify-between richtext-gap-[6px]",children:[n.jsx(u.Button,{className:"richtext-flex-1",onClick:g,children:"Submit"}),n.jsx("a",{href:"https://katex.org/docs/supported",rel:"noreferrer noopener",target:"_blank",children:n.jsx(j.HelpCircle,{size:16})})]})]})]})}function T(t,e=1){let s=0,o=0,a=0;if(t.startsWith("rgb")){const r=t.replace(/\s/g,"").match(/rgb\((.*)\)$/)[1].split(",");s=+r[0],o=+r[1],a=+r[2]}else if(t.startsWith("#")){let r=t.replace("#","");r.length===3&&(r=`${r[0]}${r[0]}${r[1]}${r[1]}${r[2]}${r[2]}`),s=Number.parseInt(r.substring(0,2),16),o=Number.parseInt(r.substring(2,4),16),a=Number.parseInt(r.substring(4,6),16)}else return t;return e>1&&e<=100&&(e=e/100),`rgba(${s},${o},${a},${e})`}function v({node:t}){const e=u.useTheme(),{text:s}=t.attrs,o=c.useMemo(()=>{const i="rgb(254, 242, 237)";return e==="dark"?T(i,.75):i},[e]),a=c.useMemo(()=>{try{return b.renderToString(`${s}`)}catch{return s}},[s]),r=c.useMemo(()=>s.trim()?n.jsx("span",{contentEditable:!1,dangerouslySetInnerHTML:{__html:a}}):n.jsx("span",{contentEditable:!1,children:"Not enter a formula"}),[s,a]);return n.jsx(f.NodeViewWrapper,{style:{display:"inline-block",backgroundColor:o},as:"span",children:r})}function N(t){return e=>e.getAttribute(t)}const x=l.Node.create({name:"katex",group:"inline",inline:!0,defining:!0,draggable:!0,selectable:!0,addOptions(){return{HTMLAttributes:{class:"katex"},button:({editor:t,t:e})=>({component:$,componentProps:{editor:t,action:()=>!0,isActive:()=>!1,disabled:!1,icon:"KatexIcon",tooltip:e("editor.katex.tooltip")}})}},addAttributes(){return{text:{default:"",parseHTML:N("text")},defaultShowPicker:{default:!1}}},parseHTML(){return[{tag:"span.katex"}]},renderHTML({HTMLAttributes:t}){return["span",l.mergeAttributes(this.options&&this.options.HTMLAttributes||{},t)]},addCommands(){return{setKatex:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[l.nodeInputRule({find:/^\$katex\$$/,type:this.type,getAttributes:()=>({defaultShowPicker:!0})})]},addNodeView(){return f.ReactNodeViewRenderer(v)}});exports.Katex=x;
|
package/lib/Katex.d.cts
CHANGED
|
@@ -120,6 +120,21 @@ declare module '@tiptap/core' {
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
|
|
123
|
+
declare module '@tiptap/core' {
|
|
124
|
+
interface Commands<ReturnType> {
|
|
125
|
+
iframe: {
|
|
126
|
+
/**
|
|
127
|
+
* Add an iframe
|
|
128
|
+
*/
|
|
129
|
+
setIframe: (options: {
|
|
130
|
+
src: string;
|
|
131
|
+
service: string;
|
|
132
|
+
}) => ReturnType;
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
|
|
123
138
|
declare module '@tiptap/core' {
|
|
124
139
|
interface Commands<ReturnType> {
|
|
125
140
|
imageUpload: {
|
|
@@ -140,21 +155,6 @@ declare module '@tiptap/core' {
|
|
|
140
155
|
}
|
|
141
156
|
|
|
142
157
|
|
|
143
|
-
declare module '@tiptap/core' {
|
|
144
|
-
interface Commands<ReturnType> {
|
|
145
|
-
iframe: {
|
|
146
|
-
/**
|
|
147
|
-
* Add an iframe
|
|
148
|
-
*/
|
|
149
|
-
setIframe: (options: {
|
|
150
|
-
src: string;
|
|
151
|
-
service: string;
|
|
152
|
-
}) => ReturnType;
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
158
|
declare module '@tiptap/core' {
|
|
159
159
|
interface Commands<ReturnType> {
|
|
160
160
|
imageGifUpload: {
|
package/lib/Katex.d.ts
CHANGED
|
@@ -120,6 +120,21 @@ declare module '@tiptap/core' {
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
|
|
123
|
+
declare module '@tiptap/core' {
|
|
124
|
+
interface Commands<ReturnType> {
|
|
125
|
+
iframe: {
|
|
126
|
+
/**
|
|
127
|
+
* Add an iframe
|
|
128
|
+
*/
|
|
129
|
+
setIframe: (options: {
|
|
130
|
+
src: string;
|
|
131
|
+
service: string;
|
|
132
|
+
}) => ReturnType;
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
|
|
123
138
|
declare module '@tiptap/core' {
|
|
124
139
|
interface Commands<ReturnType> {
|
|
125
140
|
imageUpload: {
|
|
@@ -140,21 +155,6 @@ declare module '@tiptap/core' {
|
|
|
140
155
|
}
|
|
141
156
|
|
|
142
157
|
|
|
143
|
-
declare module '@tiptap/core' {
|
|
144
|
-
interface Commands<ReturnType> {
|
|
145
|
-
iframe: {
|
|
146
|
-
/**
|
|
147
|
-
* Add an iframe
|
|
148
|
-
*/
|
|
149
|
-
setIframe: (options: {
|
|
150
|
-
src: string;
|
|
151
|
-
service: string;
|
|
152
|
-
}) => ReturnType;
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
158
|
declare module '@tiptap/core' {
|
|
159
159
|
interface Commands<ReturnType> {
|
|
160
160
|
imageGifUpload: {
|