From 995983d8fd3b3dfbb7c7e6d3a9fffddb0c80bbdd Mon Sep 17 00:00:00 2001 From: Alec Gibson <12036746+alecgibson@users.noreply.github.com> Date: Fri, 31 May 2024 09:39:22 +0100 Subject: [PATCH] Release version v4.0.3 --- .gitignore | 1 + dist/index.d.ts | 4 ++ dist/quill-cursors.js | 2 + dist/quill-cursors.js.LICENSE.txt | 7 +++ dist/quill-cursors/cursor.d.ts | 48 +++++++++++++++++++ dist/quill-cursors/i-coordinates.d.ts | 6 +++ dist/quill-cursors/i-delta.d.ts | 8 ++++ .../i-quill-cursors-options.d.ts | 10 ++++ dist/quill-cursors/i-range.d.ts | 4 ++ dist/quill-cursors/quill-cursors.d.ts | 34 +++++++++++++ dist/quill-cursors/template.d.ts | 2 + 11 files changed, 126 insertions(+) create mode 100644 dist/index.d.ts create mode 100644 dist/quill-cursors.js create mode 100644 dist/quill-cursors.js.LICENSE.txt create mode 100644 dist/quill-cursors/cursor.d.ts create mode 100644 dist/quill-cursors/i-coordinates.d.ts create mode 100644 dist/quill-cursors/i-delta.d.ts create mode 100644 dist/quill-cursors/i-quill-cursors-options.d.ts create mode 100644 dist/quill-cursors/i-range.d.ts create mode 100644 dist/quill-cursors/quill-cursors.d.ts create mode 100644 dist/quill-cursors/template.d.ts diff --git a/.gitignore b/.gitignore index 9fa983f..aa77055 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ coverage/ # Consumers will override this anyway, so don't bother committing package-lock.json yarn.lock +!/dist diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..12cc549 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,4 @@ +import QuillCursors from './quill-cursors/quill-cursors'; +import Cursor from './quill-cursors/cursor'; +import '../assets/quill-cursors.scss'; +export { QuillCursors as default, Cursor }; diff --git a/dist/quill-cursors.js b/dist/quill-cursors.js new file mode 100644 index 0000000..0bf5ebc --- /dev/null +++ b/dist/quill-cursors.js @@ -0,0 +1,2 @@ +/*! For license information please see quill-cursors.js.LICENSE.txt */ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.QuillCursors=e():t.QuillCursors=e()}(self,(()=>(()=>{var t={582:(t,e,r)=>{"use strict";r.d(e,{Z:()=>s});var n=r(81),i=r.n(n),o=r(645),a=r.n(o)()(i());a.push([t.id,".ql-container{position:relative;overflow:hidden}@media(pointer: coarse){.ql-cursor-caret-container{z-index:-1}}.ql-cursor.hidden{display:none}.ql-cursor .ql-cursor-caret-container,.ql-cursor .ql-cursor-flag{position:absolute}.ql-cursor .ql-cursor-flag{z-index:1;transform:translate3d(-1px, -100%, 0);opacity:0;visibility:hidden;color:#fff;padding-bottom:2px;border-radius:0 3px 3px 0}.ql-cursor .ql-cursor-flag.flag-flipped{border-radius:3px 0 0 3px;transform:translate3d(calc(-100% + 1px ), -100%, 0)}@media screen{.ql-cursor .ql-cursor-flag{transition:opacity 0ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 0ms,visibility 0ms cubic-bezier(0.25, 0.46, 0.45, 0.94) 0ms}}.ql-cursor .ql-cursor-flag .ql-cursor-name{margin-left:5px;margin-right:5px;display:inline-block;margin-top:-2px;white-space:nowrap}.ql-cursor .ql-cursor-flag.no-delay[style]{transition-delay:unset !important}.ql-cursor .ql-cursor-caret-container{cursor:text;margin-left:-9px;padding:0 9px}.ql-cursor .ql-cursor-caret-container.hover+.ql-cursor-flag{opacity:1;visibility:visible;transition:none}.ql-cursor .ql-cursor-caret-container.no-pointer{pointer-events:none}.ql-cursor .ql-cursor-caret-container .ql-cursor-caret{position:absolute;top:0;bottom:0;width:2px;margin-left:-1px;background-color:attr(data-color)}.ql-cursor .ql-cursor-selection-block{position:absolute;pointer-events:none}",""]);const s=a},645:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",n=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),n&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),n&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,n,i,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(n)for(var s=0;s0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=o),r&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=r):l[2]=r),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),e.push(l))}},e}},81:t=>{"use strict";t.exports=function(t){return t[1]}},529:t=>{var e=-1;function r(t,s,u,c){if(t===s)return t?[[0,t]]:[];if(null!=u){var l=function(t,e,r){var n="number"==typeof r?{index:r,length:0}:r.oldRange,i="number"==typeof r?null:r.newRange,o=t.length,a=e.length;if(0===n.length&&(null===i||0===i.length)){var s=n.index,u=t.slice(0,s),c=t.slice(s),l=i?i.index:null,h=s+a-o;if((null===l||l===h)&&!(h<0||h>a)){var d=e.slice(0,h);if((_=e.slice(h))===c){var p=Math.min(s,h);if((b=u.slice(0,p))===(m=d.slice(0,p)))return f(b,u.slice(p),d.slice(p),c)}}if(null===l||l===s){var g=s,_=(d=e.slice(0,g),e.slice(g));if(d===u){var v=Math.min(o-g,a-g);if((y=c.slice(c.length-v))===(A=_.slice(_.length-v)))return f(u,c.slice(0,c.length-v),_.slice(0,_.length-v),y)}}}if(n.length>0&&i&&0===i.length){var b=t.slice(0,n.index),y=t.slice(n.index+n.length);if(!(a<(p=b.length)+(v=y.length))){var m=e.slice(0,p),A=e.slice(a-v);if(b===m&&y===A)return f(b,t.slice(p,o-v),e.slice(p,a-v),y)}}return null}(t,s,u);if(l)return l}var h=i(t,s),d=t.substring(0,h);h=o(t=t.substring(h),s=s.substring(h));var p=t.substring(t.length-h),g=function(t,a){var s;if(!t)return[[1,a]];if(!a)return[[e,t]];var u=t.length>a.length?t:a,c=t.length>a.length?a:t,l=u.indexOf(c);if(-1!==l)return s=[[1,u.substring(0,l)],[0,c],[1,u.substring(l+c.length)]],t.length>a.length&&(s[0][0]=s[2][0]=e),s;if(1===c.length)return[[e,t],[1,a]];var f=function(t,e){var r=t.length>e.length?t:e,n=t.length>e.length?e:t;if(r.length<4||2*n.length=t.length?[n,a,s,u,f]:null}var s,u,c,l,f,h=a(r,n,Math.ceil(r.length/4)),d=a(r,n,Math.ceil(r.length/2));return h||d?(s=d?h&&h[4].length>d[4].length?h:d:h,t.length>e.length?(u=s[0],c=s[1],l=s[2],f=s[3]):(l=s[0],f=s[1],u=s[2],c=s[3]),[u,c,l,f,s[4]]):null}(t,a);if(f){var h=f[0],d=f[1],p=f[2],g=f[3],_=f[4],v=r(h,p),b=r(d,g);return v.concat([[0,_]],b)}return function(t,r){for(var i=t.length,o=r.length,a=Math.ceil((i+o)/2),s=a,u=2*a,c=new Array(u),l=new Array(u),f=0;fi)g+=2;else if(A>o)p+=2;else if(d&&(w=s+h-y)>=0&&w=(C=i-l[w]))return n(t,r,S,A)}for(var x=-b+_;x<=b-v;x+=2){for(var C,w=s+x,E=(C=x===-b||x!==b&&l[w-1]i)v+=2;else if(E>o)_+=2;else if(!d){var S;if((m=s+h-x)>=0&&m=(C=i-C))return n(t,r,S,A)}}}return[[e,t],[1,r]]}(t,a)}(t=t.substring(0,t.length-h),s=s.substring(0,s.length-h));return d&&g.unshift([0,d]),p&&g.push([0,p]),a(g,c),g}function n(t,e,n,i){var o=t.substring(0,n),a=e.substring(0,i),s=t.substring(n),u=e.substring(i),c=r(o,a),l=r(s,u);return c.concat(l)}function i(t,e){if(!t||!e||t.charAt(0)!==e.charAt(0))return 0;for(var r=0,n=Math.min(t.length,e.length),i=n,o=0;r=0&&l(t[p][1])){var g=t[p][1].slice(-1);if(t[p][1]=t[p][1].slice(0,-1),h=g+h,d=g+d,!t[p][1]){t.splice(p,1),s--;var _=p-1;t[_]&&1===t[_][0]&&(f++,d=t[_][1]+d,_--),t[_]&&t[_][0]===e&&(u++,h=t[_][1]+h,_--),p=_}}c(t[s][1])&&(g=t[s][1].charAt(0),t[s][1]=t[s][1].slice(1),h+=g,d+=g)}if(s0||d.length>0){h.length>0&&d.length>0&&(0!==(n=i(d,h))&&(p>=0?t[p][1]+=d.substring(0,n):(t.splice(0,0,[0,d.substring(0,n)]),s++),d=d.substring(n),h=h.substring(n)),0!==(n=o(d,h))&&(t[s][1]=d.substring(d.length-n)+t[s][1],d=d.substring(0,d.length-n),h=h.substring(0,h.length-n)));var v=f+u;0===h.length&&0===d.length?(t.splice(s-v,v),s-=v):0===h.length?(t.splice(s-v,v,[1,d]),s=s-v+1):0===d.length?(t.splice(s-v,v,[e,h]),s=s-v+1):(t.splice(s-v,v,[e,h],[1,d]),s=s-v+2)}0!==s&&0===t[s-1][0]?(t[s-1][1]+=t[s][1],t.splice(s,1)):s++,f=0,u=0,h="",d=""}""===t[t.length-1][1]&&t.pop();var b=!1;for(s=1;s=55296&&t<=56319}function u(t){return t>=56320&&t<=57343}function c(t){return u(t.charCodeAt(0))}function l(t){return s(t.charCodeAt(t.length-1))}function f(t,r,n,i){return l(t)||c(i)?null:function(t){for(var e=[],r=0;r0&&e.push(t[r]);return e}([[0,t],[e,r],[1,n],[0,i]])}function h(t,e,n){return r(t,e,n,!0)}h.INSERT=1,h.DELETE=e,h.EQUAL=0,t.exports=h},465:(t,e,r)=>{t=r.nmd(t);var n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Boolean]",s="[object Date]",u="[object Function]",c="[object GeneratorFunction]",l="[object Map]",f="[object Number]",h="[object Object]",d="[object Promise]",p="[object RegExp]",g="[object Set]",_="[object String]",v="[object Symbol]",b="[object WeakMap]",y="[object ArrayBuffer]",m="[object DataView]",A="[object Float32Array]",x="[object Float64Array]",C="[object Int8Array]",w="[object Int16Array]",E="[object Int32Array]",S="[object Uint8Array]",M="[object Uint8ClampedArray]",O="[object Uint16Array]",j="[object Uint32Array]",L=/\w*$/,k=/^\[object .+?Constructor\]$/,T=/^(?:0|[1-9]\d*)$/,R={};R[o]=R["[object Array]"]=R[y]=R[m]=R[a]=R[s]=R[A]=R[x]=R[C]=R[w]=R[E]=R[l]=R[f]=R[h]=R[p]=R[g]=R[_]=R[v]=R[S]=R[M]=R[O]=R[j]=!0,R["[object Error]"]=R[u]=R[b]=!1;var N="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,q="object"==typeof self&&self&&self.Object===Object&&self,D=N||q||Function("return this")(),F=e&&!e.nodeType&&e,I=F&&t&&!t.nodeType&&t,P=I&&I.exports===F;function B(t,e){return t.set(e[0],e[1]),t}function z(t,e){return t.add(e),t}function H(t,e,r,n){var i=-1,o=t?t.length:0;for(n&&o&&(r=t[++i]);++i-1},Mt.prototype.set=function(t,e){var r=this.__data__,n=kt(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},Ot.prototype.clear=function(){this.__data__={hash:new St,map:new(pt||Mt),string:new St}},Ot.prototype.delete=function(t){return qt(this,t).delete(t)},Ot.prototype.get=function(t){return qt(this,t).get(t)},Ot.prototype.has=function(t){return qt(this,t).has(t)},Ot.prototype.set=function(t,e){return qt(this,t).set(t,e),this},jt.prototype.clear=function(){this.__data__=new Mt},jt.prototype.delete=function(t){return this.__data__.delete(t)},jt.prototype.get=function(t){return this.__data__.get(t)},jt.prototype.has=function(t){return this.__data__.has(t)},jt.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Mt){var n=r.__data__;if(!pt||n.length<199)return n.push([t,e]),this;r=this.__data__=new Ot(n)}return r.set(t,e),this};var Ft=lt?$(lt,Object):function(){return[]},It=function(t){return et.call(t)};function Pt(t,e){return!!(e=null==e?i:e)&&("number"==typeof t||T.test(t))&&t>-1&&t%1==0&&t-1&&t%1==0&&t<=i}(t.length)&&!Vt(t)}var $t=ft||function(){return!1};function Vt(t){var e=Wt(t)?et.call(t):"";return e==u||e==c}function Wt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Xt(t){return Gt(t)?function(t,e){var r=Ut(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&Gt(t)}(t)&&tt.call(t,"callee")&&(!ut.call(t,"callee")||et.call(t)==o)}(t)?function(t,e){for(var r=-1,n=Array(t);++r{t=r.nmd(t);var n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Array]",s="[object Boolean]",u="[object Date]",c="[object Error]",l="[object Function]",f="[object Map]",h="[object Number]",d="[object Object]",p="[object Promise]",g="[object RegExp]",_="[object Set]",v="[object String]",b="[object WeakMap]",y="[object ArrayBuffer]",m="[object DataView]",A=/^\[object .+?Constructor\]$/,x=/^(?:0|[1-9]\d*)$/,C={};C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C[o]=C[a]=C[y]=C[s]=C[m]=C[u]=C[c]=C[l]=C[f]=C[h]=C[d]=C[g]=C[_]=C[v]=C[b]=!1;var w="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,E="object"==typeof self&&self&&self.Object===Object&&self,S=w||E||Function("return this")(),M=e&&!e.nodeType&&e,O=M&&t&&!t.nodeType&&t,j=O&&O.exports===M,L=j&&w.process,k=function(){try{return L&&L.binding&&L.binding("util")}catch(t){}}(),T=k&&k.isTypedArray;function R(t,e){for(var r=-1,n=null==t?0:t.length;++rs))return!1;var c=o.get(t);if(c&&o.get(e))return c==e;var l=-1,f=!0,h=2&r?new yt:void 0;for(o.set(t,e),o.set(e,t);++l-1},vt.prototype.set=function(t,e){var r=this.__data__,n=At(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},bt.prototype.clear=function(){this.size=0,this.__data__={hash:new _t,map:new(it||vt),string:new _t}},bt.prototype.delete=function(t){var e=Mt(this,t).delete(t);return this.size-=e?1:0,e},bt.prototype.get=function(t){return Mt(this,t).get(t)},bt.prototype.has=function(t){return Mt(this,t).has(t)},bt.prototype.set=function(t,e){var r=Mt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},yt.prototype.add=yt.prototype.push=function(t){return this.__data__.set(t,n),this},yt.prototype.has=function(t){return this.__data__.has(t)},mt.prototype.clear=function(){this.__data__=new vt,this.size=0},mt.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},mt.prototype.get=function(t){return this.__data__.get(t)},mt.prototype.has=function(t){return this.__data__.has(t)},mt.prototype.set=function(t,e){var r=this.__data__;if(r instanceof vt){var n=r.__data__;if(!it||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new bt(n)}return r.set(t,e),this.size=r.size,this};var jt=tt?function(t){return null==t?[]:(t=Object(t),function(e,r){for(var n=-1,i=null==e?0:e.length,o=0,a=[];++n-1&&t%1==0&&t-1&&t%1==0&&t<=i}function Pt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Bt(t){return null!=t&&"object"==typeof t}var zt=T?function(t){return function(e){return t(e)}}(T):function(t){return Bt(t)&&It(t.length)&&!!C[xt(t)]};function Ht(t){return null!=(e=t)&&It(e.length)&&!Ft(e)?function(t,e){var r=qt(t),n=!r&&Nt(t),i=!r&&!n&&Dt(t),o=!r&&!n&&!i&&zt(t),a=r||n||i||o,s=a?function(t,e){for(var r=-1,n=Array(t);++r0?n:void 0},t.diff=function(t,e){void 0===t&&(t={}),void 0===e&&(e={}),"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var r=Object.keys(t).concat(Object.keys(e)).reduce((function(r,n){return a.default(t[n],e[n])||(r[n]=void 0===e[n]?null:e[n]),r}),{});return Object.keys(r).length>0?r:void 0},t.invert=function(t,e){void 0===t&&(t={}),void 0===e&&(e={}),t=t||{};var r=Object.keys(e).reduce((function(r,n){return e[n]!==t[n]&&void 0!==t[n]&&(r[n]=e[n]),r}),{});return Object.keys(t).reduce((function(r,n){return t[n]!==e[n]&&void 0===e[n]&&(r[n]=null),r}),r)},t.transform=function(t,e,r){if(void 0===r&&(r=!1),"object"!=typeof t)return e;if("object"==typeof e){if(!r)return e;var n=Object.keys(e).reduce((function(r,n){return void 0===t[n]&&(r[n]=e[n]),r}),{});return Object.keys(n).length>0?n:void 0}}}(i||(i={})),e.default=i},895:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},i=n(r(529)),o=n(r(465)),a=n(r(307)),s=n(r(210)),u=n(r(430)),c=String.fromCharCode(0),l=function(){function t(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]}return t.prototype.insert=function(t,e){var r={};return"string"==typeof t&&0===t.length?this:(r.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(r.attributes=e),this.push(r))},t.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},t.prototype.retain=function(t,e){if(t<=0)return this;var r={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(r.attributes=e),this.push(r)},t.prototype.push=function(t){var e=this.ops.length,r=this.ops[e-1];if(t=o.default(t),"object"==typeof r){if("number"==typeof t.delete&&"number"==typeof r.delete)return this.ops[e-1]={delete:r.delete+t.delete},this;if("number"==typeof r.delete&&null!=t.insert&&(e-=1,"object"!=typeof(r=this.ops[e-1])))return this.ops.unshift(t),this;if(a.default(t.attributes,r.attributes)){if("string"==typeof t.insert&&"string"==typeof r.insert)return this.ops[e-1]={insert:r.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof r.retain)return this.ops[e-1]={retain:r.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},t.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},t.prototype.filter=function(t){return this.ops.filter(t)},t.prototype.forEach=function(t){this.ops.forEach(t)},t.prototype.map=function(t){return this.ops.map(t)},t.prototype.partition=function(t){var e=[],r=[];return this.forEach((function(n){(t(n)?e:r).push(n)})),[e,r]},t.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},t.prototype.changeLength=function(){return this.reduce((function(t,e){return e.insert?t+u.default.length(e):e.delete?t-e.delete:t}),0)},t.prototype.length=function(){return this.reduce((function(t,e){return t+u.default.length(e)}),0)},t.prototype.slice=function(e,r){void 0===e&&(e=0),void 0===r&&(r=1/0);for(var n=[],i=u.default.iterator(this.ops),o=0;o0&&n.next(o.retain-c)}for(var l=new t(i);r.hasNext()||n.hasNext();)if("insert"===n.peekType())l.push(n.next());else if("delete"===r.peekType())l.push(r.next());else{var f=Math.min(r.peekLength(),n.peekLength()),h=r.next(f),d=n.next(f);if("number"==typeof d.retain){var p={};"number"==typeof h.retain?p.retain=f:p.insert=h.insert;var g=s.default.compose(h.attributes,d.attributes,"number"==typeof h.retain);if(g&&(p.attributes=g),l.push(p),!n.hasNext()&&a.default(l.ops[l.ops.length-1],p)){var _=new t(r.rest());return l.concat(_).chop()}}else"number"==typeof d.delete&&"number"==typeof h.retain&&l.push(d)}return l.chop()},t.prototype.concat=function(e){var r=new t(this.ops.slice());return e.ops.length>0&&(r.push(e.ops[0]),r.ops=r.ops.concat(e.ops.slice(1))),r},t.prototype.diff=function(e,r){if(this.ops===e.ops)return new t;var n=[this,e].map((function(t){return t.map((function(r){if(null!=r.insert)return"string"==typeof r.insert?r.insert:c;throw new Error("diff() called "+(t===e?"on":"with")+" non-document")})).join("")})),o=new t,l=i.default(n[0],n[1],r),f=u.default.iterator(this.ops),h=u.default.iterator(e.ops);return l.forEach((function(t){for(var e=t[1].length;e>0;){var r=0;switch(t[0]){case i.default.INSERT:r=Math.min(h.peekLength(),e),o.push(h.next(r));break;case i.default.DELETE:r=Math.min(e,f.peekLength()),f.next(r),o.delete(r);break;case i.default.EQUAL:r=Math.min(f.peekLength(),h.peekLength(),e);var n=f.next(r),u=h.next(r);a.default(n.insert,u.insert)?o.retain(r,s.default.diff(n.attributes,u.attributes)):o.push(u).delete(r)}e-=r}})),o.chop()},t.prototype.eachLine=function(e,r){void 0===r&&(r="\n");for(var n=u.default.iterator(this.ops),i=new t,o=0;n.hasNext();){if("insert"!==n.peekType())return;var a=n.peek(),s=u.default.length(a)-n.peekLength(),c="string"==typeof a.insert?a.insert.indexOf(r,s)-s:-1;if(c<0)i.push(n.next());else if(c>0)i.push(n.next(c));else{if(!1===e(i,n.next(1).attributes||{},o))return;o+=1,i=new t}}i.length()>0&&e(i,{},o)},t.prototype.invert=function(e){var r=new t;return this.reduce((function(t,n){if(n.insert)r.delete(u.default.length(n));else{if(n.retain&&null==n.attributes)return r.retain(n.retain),t+n.retain;if(n.delete||n.retain&&n.attributes){var i=n.delete||n.retain;return e.slice(t,t+i).forEach((function(t){n.delete?r.push(t):n.retain&&n.attributes&&r.retain(u.default.length(t),s.default.invert(n.attributes,t.attributes))})),t+i}}return t}),0),r.chop()},t.prototype.transform=function(e,r){if(void 0===r&&(r=!1),r=!!r,"number"==typeof e)return this.transformPosition(e,r);for(var n=e,i=u.default.iterator(this.ops),o=u.default.iterator(n.ops),a=new t;i.hasNext()||o.hasNext();)if("insert"!==i.peekType()||!r&&"insert"===o.peekType())if("insert"===o.peekType())a.push(o.next());else{var c=Math.min(i.peekLength(),o.peekLength()),l=i.next(c),f=o.next(c);if(l.delete)continue;f.delete?a.push(f):a.retain(c,s.default.transform(l.attributes,f.attributes,r))}else a.retain(u.default.length(i.next()));return a.chop()},t.prototype.transformPosition=function(t,e){void 0===e&&(e=!1),e=!!e;for(var r=u.default.iterator(this.ops),n=0;r.hasNext()&&n<=t;){var i=r.peekLength(),o=r.peekType();r.next(),"delete"!==o?("insert"===o&&(n=n-r?(t=n-r,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var o={};return e.attributes&&(o.attributes=e.attributes),"number"==typeof e.retain?o.retain=t:"string"==typeof e.insert?o.insert=e.insert.substr(r,t):o.insert=e.insert,o}return{retain:1/0}},t.prototype.peek=function(){return this.ops[this.index]},t.prototype.peekLength=function(){return this.ops[this.index]?i.default.length(this.ops[this.index])-this.offset:1/0},t.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},t.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var t=this.offset,e=this.index,r=this.next(),n=this.ops.slice(this.index);return this.offset=t,this.index=e,[r].concat(n)}return[]},t}();e.default=o},430:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i,o=n(r(977));!function(t){t.iterator=function(t){return new o.default(t)},t.length=function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}}(i||(i={})),e.default=i},165:function(t,e,r){var n,i;void 0===(i="function"==typeof(n=function(){var t,e={};function r(t,e,r){var n=t.getClientRects();if(2===n.length){var i=t.getBoundingClientRect();return n[e][r]=e.length)return Array.prototype.push.apply(t,e);for(;n1,t.getClientRects||(s.setEnd(o,1),t.getClientRects=t.getBoundingClientRect=2===s.getClientRects().length),!t.getBoundingClientRect){s.setEnd(s.startContainer,s.startOffset);var u=s.getBoundingClientRect();t.getBoundingClientRect=0===u.top&&0===u.left}if(document.body.removeChild(e),!t.getBoundingClientRect){var c=document.createElement("p");c.style.width="0px",c.style.fontSize="20px",c.style.whiteSpace="normal",c.style.wordBreak="normal";var l=document.createTextNode("m mm");c.appendChild(l),document.body.appendChild(c),s.setStart(l,1),s.setEnd(l,2),r(s,1,"left")?t.getBoundingClientRect=!0:(s.setStart(l,1),s.setEnd(l,3),r(s,0,"top")&&(t.getBoundingClientRect=!0)),document.body.removeChild(c)}var f=window.ActiveXObject&&new Function("/*@cc_on return @_jscript_version; @*/")();t.ieZoom=!!f&&f<=10}return t},e.getClientRects=function(t){var e=this.isBroken();if(e.ieZoom)return n(t.getClientRects());if(!e.getClientRects)return t.getClientRects();var r=[],o=[],a=t.endContainer,s=t.endOffset,u=document.createRange();function c(t){for(var e=0;t=t.previousSibling;)e++;return e}for(;a!==t.commonAncestorContainer;)u.setStart(a,0),u.setEnd(a,s),i(o,u.getClientRects()),s=c(a),a=a.parentNode;return(u=t.cloneRange()).setEnd(a,s),i(r,u.getClientRects()),i(r,o),r},e.getBoundingClientRect=function(t){var e=this.getClientRects(t);if(0===e.length)return null;var r,i=t.getBoundingClientRect(),o=this.isBroken();if(o.ieZoom)return n(i);if(!o.getBoundingClientRect)return i;if(0===i.width&&0===i.height)return e[0];for(var a=0,s=e.length;a{"use strict";r.r(e),r.d(e,{default:()=>C});var n=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var r=-1;return t.some((function(t,n){return t[0]===e&&(r=n,!0)})),r}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var r=t(this.__entries__,e),n=this.__entries__[r];return n&&n[1]},e.prototype.set=function(e,r){var n=t(this.__entries__,e);~n?this.__entries__[n][1]=r:this.__entries__.push([e,r])},e.prototype.delete=function(e){var r=this.__entries__,n=t(r,e);~n&&r.splice(n,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var r=0,n=this.__entries__;r0},t.prototype.connect_=function(){i&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),u?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){i&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,r=void 0===e?"":e;s.some((function(t){return!!~r.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),l=function(t,e){for(var r=0,n=Object.keys(e);r0},t}(),A="undefined"!=typeof WeakMap?new WeakMap:new n,x=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=c.getInstance(),n=new m(e,r,this);A.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){x.prototype[t]=function(){var e;return(e=A.get(this))[t].apply(e,arguments)}}));const C=void 0!==o.ResizeObserver?o.ResizeObserver:x},413:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>v});var n=r(379),i=r.n(n),o=r(795),a=r.n(o),s=r(569),u=r.n(s),c=r(565),l=r.n(c),f=r(216),h=r.n(f),d=r(589),p=r.n(d),g=r(582),_={};_.styleTagTransform=p(),_.setAttributes=l(),_.insert=u().bind(null,"head"),_.domAPI=a(),_.insertStyleElement=h(),i()(g.Z,_);const v=g.Z&&g.Z.locals?g.Z.locals:void 0},379:t=>{"use strict";var e=[];function r(t){for(var r=-1,n=0;n{"use strict";var e={};t.exports=function(t,r){var n=function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},216:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},565:(t,e,r)=>{"use strict";t.exports=function(t){var e=r.nc;e&&t.setAttribute("nonce",e)}},795:t=>{"use strict";t.exports=function(t){var e=t.insertStyleElement(t);return{update:function(r){!function(t,e,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var i=void 0!==r.layer;i&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,i&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,r)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},589:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},607:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Cursor=e.default=void 0;var i=n(r(678));e.default=i.default;var o=n(r(353));e.Cursor=o.default,r(413)},353:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(207),i=function(){function t(t,e,r){this.id=t,this.name=e,this.color=r,this.toggleNearCursor=this.toggleNearCursor.bind(this),this._toggleOpenedCursor=this._toggleOpenedCursor.bind(this),this._setHoverState=this._setHoverState.bind(this)}return t.prototype.build=function(e){var r=document.createElement(t.CONTAINER_ELEMENT_TAG);r.classList.add(t.CURSOR_CLASS),r.id="ql-cursor-".concat(this.id),r.innerHTML=e.template;var n=r.getElementsByClassName(t.SELECTION_CLASS)[0],i=r.getElementsByClassName(t.CARET_CONTAINER_CLASS)[0],o=i.getElementsByClassName(t.CARET_CLASS)[0],a=r.getElementsByClassName(t.FLAG_CLASS)[0];return a.style.backgroundColor=this.color,o.style.backgroundColor=this.color,r.getElementsByClassName(t.NAME_CLASS)[0].textContent=this.name,this._hideDelay="".concat(e.hideDelayMs,"ms"),this._hideSpeedMs=e.hideSpeedMs,this._positionFlag=e.positionFlag,a.style.transitionDelay=this._hideDelay,a.style.transitionDuration="".concat(this._hideSpeedMs,"ms"),this._el=r,this._selectionEl=n,this._caretEl=i,this._flagEl=a,i.addEventListener("mouseover",this._setHoverState,{passive:!0}),this._el},t.prototype.show=function(){this._el.classList.remove(t.HIDDEN_CLASS)},t.prototype.hide=function(){this._el.classList.add(t.HIDDEN_CLASS)},t.prototype.remove=function(){this._el.parentNode.removeChild(this._el)},t.prototype.toggleNearCursor=function(e,r){var n=this._getCoordinates(),i=n.left,o=n.right,a=n.top,s=n.bottom,u=e>=i&&e<=o&&r>=a&&r<=s;return this._caretEl.classList.toggle(t.CONTAINER_HOVER_CLASS,u),u},t.prototype.toggleFlag=function(e){var r=this;this._caretEl.classList.toggle(t.CONTAINER_HOVER_CLASS,e)||(this._flagEl.classList.add(t.NO_DELAY_CLASS),setTimeout((function(){return r._flagEl.classList.remove(t.NO_DELAY_CLASS)}),this._hideSpeedMs))},t.prototype.updateCaret=function(t,e){this._caretEl.style.top="".concat(t.top,"px"),this._caretEl.style.left="".concat(t.left,"px"),this._caretEl.style.height="".concat(t.height,"px"),this._positionFlag?this._positionFlag(this._flagEl,t,e):this._updateCaretFlag(t,e)},t.prototype.updateSelection=function(t,e){var r=this;this._clearSelection(),t=t||[],t=Array.from(t),t=this._sanitize(t),(t=this._sortByDomPosition(t)).forEach((function(t){return r._addSelection(t,e)}))},t.prototype._setHoverState=function(){document.addEventListener("mousemove",this._toggleOpenedCursor,{passive:!0})},t.prototype._toggleOpenedCursor=function(e){var r=this.toggleNearCursor(e.clientX,e.clientY);this._caretEl.classList.toggle(t.CONTAINER_NO_POINTER_CLASS,r),r||document.removeEventListener("mousemove",this._toggleOpenedCursor)},t.prototype._getCoordinates=function(){return this._caretEl.getBoundingClientRect()},t.prototype._updateCaretFlag=function(e,r){this._flagEl.style.width="";var n=this._flagEl.getBoundingClientRect();this._flagEl.classList.remove(t.FLAG_FLIPPED_CLASS),e.left>r.width-n.width&&this._flagEl.classList.add(t.FLAG_FLIPPED_CLASS),this._flagEl.style.left="".concat(e.left,"px"),this._flagEl.style.top="".concat(e.top,"px"),this._flagEl.style.width="".concat(Math.ceil(n.width),"px")},t.prototype._clearSelection=function(){this._selectionEl.innerHTML=""},t.prototype._addSelection=function(t,e){var r=this._selectionBlock(t,e);this._selectionEl.appendChild(r)},t.prototype._selectionBlock=function(e,r){var i=document.createElement(t.SELECTION_ELEMENT_TAG);return i.classList.add(t.SELECTION_BLOCK_CLASS),i.style.top="".concat(e.top-r.top,"px"),i.style.left="".concat(e.left-r.left,"px"),i.style.width="".concat(e.width,"px"),i.style.height="".concat(e.height,"px"),i.style.backgroundColor=n(this.color).setAlpha(.3).toString(),i},t.prototype._sortByDomPosition=function(t){return t.sort((function(t,e){return t.top===e.top?t.left-e.left:t.top-e.top}))},t.prototype._sanitize=function(t){var e=this,r=new Set;return t.filter((function(t){if(!t.width||!t.height)return!1;var n=e._serialize(t);return!r.has(n)&&(r.add(n),!0)}))},t.prototype._serialize=function(t){return["top:".concat(t.top),"right:".concat(t.right),"bottom:".concat(t.bottom),"left:".concat(t.left)].join(";")},t.CONTAINER_ELEMENT_TAG="SPAN",t.SELECTION_ELEMENT_TAG="SPAN",t.CURSOR_CLASS="ql-cursor",t.SELECTION_CLASS="ql-cursor-selections",t.SELECTION_BLOCK_CLASS="ql-cursor-selection-block",t.CARET_CLASS="ql-cursor-caret",t.CARET_CONTAINER_CLASS="ql-cursor-caret-container",t.CONTAINER_HOVER_CLASS="hover",t.CONTAINER_NO_POINTER_CLASS="no-pointer",t.FLAG_CLASS="ql-cursor-flag",t.FLAG_FLIPPED_CLASS="flag-flipped",t.NAME_CLASS="ql-cursor-name",t.HIDDEN_CLASS="hidden",t.NO_DELAY_CLASS="no-delay",t}();e.default=i},678:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(r(353)),u=o(r(165)),c=a(r(338)),l=a(r(33)),f=r(895),h=function(){function t(t,e){void 0===e&&(e={}),this._cursors={},this._isObserving=!1,this._handleCursorTouch=this._handleCursorTouch.bind(this),this.quill=t,this.options=this._setDefaults(e),this._container=this.quill.addContainer(this.options.containerClass),this._boundsContainer=this.options.boundsContainer||this.quill.container,this._currentSelection=this.quill.getSelection(),this._registerSelectionChangeListeners(),this._registerTextChangeListener(),this._registerDomListeners()}return t.prototype.createCursor=function(t,e,r){var n=this._cursors[t];if(!n){n=new s.default(t,e,r),this._cursors[t]=n;var i=n.build(this.options);this._container.appendChild(i)}return n},t.prototype.moveCursor=function(t,e){var r=this._cursors[t];r&&(r.range=e,this._updateCursor(r))},t.prototype.removeCursor=function(t){var e=this._cursors[t];e&&(e.remove(),delete this._cursors[t])},t.prototype.update=function(){var t=this;this.cursors().forEach((function(e){return t._updateCursor(e)}))},t.prototype.clearCursors=function(){var t=this;this.cursors().forEach((function(e){return t.removeCursor(e.id)}))},t.prototype.toggleFlag=function(t,e){var r=this._cursors[t];r&&r.toggleFlag(e)},t.prototype.cursors=function(){var t=this;return Object.keys(this._cursors).map((function(e){return t._cursors[e]}))},t.prototype._registerSelectionChangeListeners=function(){var t=this;this.quill.on(this.quill.constructor.events.SELECTION_CHANGE,(function(e){t._currentSelection=e}))},t.prototype._registerTextChangeListener=function(){var t=this;this.quill.on(this.quill.constructor.events.TEXT_CHANGE,(function(e){return t._handleTextChange(e)}))},t.prototype._registerDomListeners=function(){var t=this,e=this.quill.container.getElementsByClassName("ql-editor")[0];e.addEventListener("scroll",(function(){return t.update()}),{passive:!0}),e.addEventListener("touchstart",this._handleCursorTouch,{passive:!0})},t.prototype._handleCursorTouch=function(t){var e=this;this.cursors().forEach((function(r){r.toggleNearCursor(t.pageX,t.pageY),setTimeout((function(){return r.toggleFlag(!1)}),e.options.hideDelayMs)}))},t.prototype._registerResizeObserver=function(){var t=this;if(!this._isObserving){var e=this.quill.container.getElementsByClassName("ql-editor")[0],r=new l.default((function(e){if(!e[0].target.isConnected)return r.disconnect(),void(t._isObserving=!1);t.update()}));r.observe(e),this._isObserving=!0}},t.prototype._updateCursor=function(t){if(this._registerResizeObserver(),!t.range)return t.hide();var e=this._indexWithinQuillBounds(t.range.index),r=this._indexWithinQuillBounds(t.range.index+t.range.length),n=this.quill.getLeaf(e),i=this.quill.getLeaf(r);if(!this._leafIsValid(n)||!this._leafIsValid(i))return t.hide();t.show();var o=this._boundsContainer.getBoundingClientRect(),a=this.quill.getBounds(r);t.updateCaret(a,o);var s=this._lineRanges(t,n,i).reduce((function(t,e){return t.concat(Array.from(u.getClientRects(e)))}),[]);t.updateSelection(s,o)},t.prototype._indexWithinQuillBounds=function(t){var e=this.quill.getLength(),r=e?e-1:0;return t=Math.max(t,0),Math.min(t,r)},t.prototype._leafIsValid=function(t){return t&&t[0]&&t[0].domNode&&t[1]>=0},t.prototype._handleTextChange=function(t){var e=this;window.setTimeout((function(){e.options.transformOnTextChange&&e._transformCursors(t),e.options.selectionChangeSource&&(e._emitSelection(),e.update())}))},t.prototype._emitSelection=function(){this.quill.emitter.emit(this.quill.constructor.events.SELECTION_CHANGE,this.quill.getSelection(),this._currentSelection,this.options.selectionChangeSource)},t.prototype._setDefaults=function(e){return(e=Object.assign({},e)).template||(e.template=t.DEFAULTS.template),e.containerClass||(e.containerClass=t.DEFAULTS.containerClass),null!==e.selectionChangeSource&&(e.selectionChangeSource||(e.selectionChangeSource=t.DEFAULTS.selectionChangeSource)),e.hideDelayMs=Number.isInteger(e.hideDelayMs)?e.hideDelayMs:t.DEFAULTS.hideDelayMs,e.hideSpeedMs=Number.isInteger(e.hideSpeedMs)?e.hideSpeedMs:t.DEFAULTS.hideSpeedMs,e.transformOnTextChange=!!e.transformOnTextChange,e},t.prototype._lineRanges=function(t,e,r){var n=this.quill.getLines(t.range);return n.reduce((function(t,i,o){if(!i.children){var a=document.createRange();return a.selectNode(i.domNode),t.concat(a)}var s=0===o?e:i.path(0).pop(),u=s[0],c=s[1],l=o===n.length-1?r:i.path(i.length()-1).pop(),f=l[0],h=l[1],d=document.createRange();return u.domNode.nodeType===Node.TEXT_NODE?d.setStart(u.domNode,c):d.setStartBefore(u.domNode),f.domNode.nodeType===Node.TEXT_NODE?d.setEnd(f.domNode,h):d.setEndAfter(f.domNode),t.concat(d)}),[])},t.prototype._transformCursors=function(t){var e=this;t=new f(t),this.cursors().filter((function(t){return t.range})).forEach((function(r){r.range.index=t.transformPosition(r.range.index),e._updateCursor(r)}))},t.DEFAULTS={template:c.default,containerClass:"ql-cursors",selectionChangeSource:"api",hideDelayMs:3e3,hideSpeedMs:400},t}();e.default=h},338:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(r(353)),o='\n \n \n \n \n
\n \n
\n');e.default=o},207:function(t){t.exports=function(){"use strict";const t=/^\s+/,e=/\s+$/;function r(n,i){if(i=i||{},(n=n||"")instanceof r)return n;if(!(this instanceof r))return new r(n,i);var o=function(r){var n={r:0,g:0,b:0},i=1,o=null,a=null,s=null,u=!1,c=!1;return"string"==typeof r&&(r=function(r){r=r.replace(t,"").replace(e,"").toLowerCase();var n,i=!1;if(y[r])r=y[r],i=!0;else if("transparent"==r)return{r:0,g:0,b:0,a:0,format:"name"};return(n=T.rgb.exec(r))?{r:n[1],g:n[2],b:n[3]}:(n=T.rgba.exec(r))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=T.hsl.exec(r))?{h:n[1],s:n[2],l:n[3]}:(n=T.hsla.exec(r))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=T.hsv.exec(r))?{h:n[1],s:n[2],v:n[3]}:(n=T.hsva.exec(r))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=T.hex8.exec(r))?{r:w(n[1]),g:w(n[2]),b:w(n[3]),a:O(n[4]),format:i?"name":"hex8"}:(n=T.hex6.exec(r))?{r:w(n[1]),g:w(n[2]),b:w(n[3]),format:i?"name":"hex"}:(n=T.hex4.exec(r))?{r:w(n[1]+""+n[1]),g:w(n[2]+""+n[2]),b:w(n[3]+""+n[3]),a:O(n[4]+""+n[4]),format:i?"name":"hex8"}:!!(n=T.hex3.exec(r))&&{r:w(n[1]+""+n[1]),g:w(n[2]+""+n[2]),b:w(n[3]+""+n[3]),format:i?"name":"hex"}}(r)),"object"==typeof r&&(R(r.r)&&R(r.g)&&R(r.b)?(l=r.r,f=r.g,h=r.b,n={r:255*x(l,255),g:255*x(f,255),b:255*x(h,255)},u=!0,c="%"===String(r.r).substr(-1)?"prgb":"rgb"):R(r.h)&&R(r.s)&&R(r.v)?(o=S(r.s),a=S(r.v),n=function(t,e,r){t=6*x(t,360),e=x(e,100),r=x(r,100);var n=Math.floor(t),i=t-n,o=r*(1-e),a=r*(1-i*e),s=r*(1-(1-i)*e),u=n%6;return{r:255*[r,a,o,o,s,r][u],g:255*[s,r,r,a,o,o][u],b:255*[o,o,s,r,r,a][u]}}(r.h,o,a),u=!0,c="hsv"):R(r.h)&&R(r.s)&&R(r.l)&&(o=S(r.s),s=S(r.l),n=function(t,e,r){var n,i,o;function a(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=x(t,360),e=x(e,100),r=x(r,100),0===e)n=i=o=r;else{var s=r<.5?r*(1+e):r+e-r*e,u=2*r-s;n=a(u,s,t+1/3),i=a(u,s,t),o=a(u,s,t-1/3)}return{r:255*n,g:255*i,b:255*o}}(r.h,o,s),u=!0,c="hsl"),r.hasOwnProperty("a")&&(i=r.a)),i=A(i),{ok:u,format:r.format||c,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:i};var l,f,h}(n);this._originalInput=n,this._r=o.r,this._g=o.g,this._b=o.b,this._a=o.a,this._roundA=Math.round(100*this._a)/100,this._format=i.format||o.format,this._gradientType=i.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=o.ok}function n(t,e,r){t=x(t,255),e=x(e,255),r=x(r,255);var n,i,o=Math.max(t,e,r),a=Math.min(t,e,r),s=(o+a)/2;if(o==a)n=i=0;else{var u=o-a;switch(i=s>.5?u/(2-o-a):u/(o+a),o){case t:n=(e-r)/u+(e>1)+720)%360;--e;)i.h=(i.h+o)%360,a.push(r(i));return a}function b(t,e){e=e||6;for(var n=r(t).toHsv(),i=n.h,o=n.s,a=n.v,s=[],u=1/e;e--;)s.push(r({h:i,s:o,v:a})),a=(a+u)%1;return s}r.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,n=this.toRgb();return t=n.r/255,e=n.g/255,r=n.b/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=A(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=i(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=i(this._r,this._g,this._b),e=Math.round(360*t.h),r=Math.round(100*t.s),n=Math.round(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=n(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=n(this._r,this._g,this._b),e=Math.round(360*t.h),r=Math.round(100*t.s),i=Math.round(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+i+"%)":"hsla("+e+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return o(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,i){var o=[E(Math.round(t).toString(16)),E(Math.round(e).toString(16)),E(Math.round(r).toString(16)),E(M(n))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*x(this._r,255))+"%",g:Math.round(100*x(this._g,255))+"%",b:Math.round(100*x(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*x(this._r,255))+"%, "+Math.round(100*x(this._g,255))+"%, "+Math.round(100*x(this._b,255))+"%)":"rgba("+Math.round(100*x(this._r,255))+"%, "+Math.round(100*x(this._g,255))+"%, "+Math.round(100*x(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(m[o(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+a(this._r,this._g,this._b,this._a),n=e,i=this._gradientType?"GradientType = 1, ":"";if(t){var o=r(t);n="#"+a(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return r(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(l,arguments)},brighten:function(){return this._applyModification(f,arguments)},darken:function(){return this._applyModification(h,arguments)},desaturate:function(){return this._applyModification(s,arguments)},saturate:function(){return this._applyModification(u,arguments)},greyscale:function(){return this._applyModification(c,arguments)},spin:function(){return this._applyModification(d,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(v,arguments)},complement:function(){return this._applyCombination(p,arguments)},monochromatic:function(){return this._applyCombination(b,arguments)},splitcomplement:function(){return this._applyCombination(_,arguments)},triad:function(){return this._applyCombination(g,[3])},tetrad:function(){return this._applyCombination(g,[4])}},r.fromRatio=function(t,e){if("object"==typeof t){var n={};for(var i in t)t.hasOwnProperty(i)&&(n[i]="a"===i?t[i]:S(t[i]));t=n}return r(t,e)},r.equals=function(t,e){return!(!t||!e)&&r(t).toRgbString()==r(e).toRgbString()},r.random=function(){return r.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},r.mix=function(t,e,n){n=0===n?0:n||50;var i=r(t).toRgb(),o=r(e).toRgb(),a=n/100;return r({r:(o.r-i.r)*a+i.r,g:(o.g-i.g)*a+i.g,b:(o.b-i.b)*a+i.b,a:(o.a-i.a)*a+i.a})},r.readability=function(t,e){var n=r(t),i=r(e);return(Math.max(n.getLuminance(),i.getLuminance())+.05)/(Math.min(n.getLuminance(),i.getLuminance())+.05)},r.isReadable=function(t,e,n){var i,o,a,s,u,c=r.readability(t,e);switch(o=!1,(a=n,"AA"!==(s=((a=a||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==s&&(s="AA"),"small"!==(u=(a.size||"small").toLowerCase())&&"large"!==u&&(u="small"),i={level:s,size:u}).level+i.size){case"AAsmall":case"AAAlarge":o=c>=4.5;break;case"AAlarge":o=c>=3;break;case"AAAsmall":o=c>=7}return o},r.mostReadable=function(t,e,n){var i,o,a,s,u=null,c=0;o=(n=n||{}).includeFallbackColors,a=n.level,s=n.size;for(var l=0;lc&&(c=i,u=r(e[l]));return r.isReadable(t,u,{level:a,size:s})||!o?u:(n.includeFallbackColors=!1,r.mostReadable(t,["#fff","#000"],n))};var y=r.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},m=r.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(y);function A(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function x(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function C(t){return Math.min(1,Math.max(0,t))}function w(t){return parseInt(t,16)}function E(t){return 1==t.length?"0"+t:""+t}function S(t){return t<=1&&(t=100*t+"%"),t}function M(t){return Math.round(255*parseFloat(t)).toString(16)}function O(t){return w(t)/255}var j,L,k,T=(L="[\\s|\\(]+("+(j="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+j+")[,|\\s]+("+j+")\\s*\\)?",k="[\\s|\\(]+("+j+")[,|\\s]+("+j+")[,|\\s]+("+j+")[,|\\s]+("+j+")\\s*\\)?",{CSS_UNIT:new RegExp(j),rgb:new RegExp("rgb"+L),rgba:new RegExp("rgba"+k),hsl:new RegExp("hsl"+L),hsla:new RegExp("hsla"+k),hsv:new RegExp("hsv"+L),hsva:new RegExp("hsva"+k),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function R(t){return!!T.CSS_UNIT.exec(t)}return r}()}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={id:n,loaded:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),r.nc=void 0;var n=r(607);return n.default})())); \ No newline at end of file diff --git a/dist/quill-cursors.js.LICENSE.txt b/dist/quill-cursors.js.LICENSE.txt new file mode 100644 index 0000000..cf9b24f --- /dev/null +++ b/dist/quill-cursors.js.LICENSE.txt @@ -0,0 +1,7 @@ +/*! + * RangeFix v0.2.10 + * https://github.com/edg2s/rangefix + * + * Copyright 2014-22 Ed Sanders. + * Released under the MIT license + */ diff --git a/dist/quill-cursors/cursor.d.ts b/dist/quill-cursors/cursor.d.ts new file mode 100644 index 0000000..20a0415 --- /dev/null +++ b/dist/quill-cursors/cursor.d.ts @@ -0,0 +1,48 @@ +import IQuillCursorsOptions from './i-quill-cursors-options'; +import IQuillRange from './i-range'; +export default class Cursor { + static readonly CONTAINER_ELEMENT_TAG = "SPAN"; + static readonly SELECTION_ELEMENT_TAG = "SPAN"; + static readonly CURSOR_CLASS = "ql-cursor"; + static readonly SELECTION_CLASS = "ql-cursor-selections"; + static readonly SELECTION_BLOCK_CLASS = "ql-cursor-selection-block"; + static readonly CARET_CLASS = "ql-cursor-caret"; + static readonly CARET_CONTAINER_CLASS = "ql-cursor-caret-container"; + static readonly CONTAINER_HOVER_CLASS = "hover"; + static readonly CONTAINER_NO_POINTER_CLASS = "no-pointer"; + static readonly FLAG_CLASS = "ql-cursor-flag"; + static readonly FLAG_FLIPPED_CLASS = "flag-flipped"; + static readonly NAME_CLASS = "ql-cursor-name"; + static readonly HIDDEN_CLASS = "hidden"; + static readonly NO_DELAY_CLASS = "no-delay"; + readonly id: string; + readonly name: string; + readonly color: string; + range: IQuillRange; + private _el; + private _selectionEl; + private _caretEl; + private _flagEl; + private _hideDelay; + private _hideSpeedMs; + private _positionFlag; + constructor(id: string, name: string, color: string); + build(options: IQuillCursorsOptions): HTMLElement; + show(): void; + hide(): void; + remove(): void; + toggleNearCursor(pointX: number, pointY: number): boolean; + toggleFlag(shouldShow?: boolean): void; + updateCaret(rectangle: ClientRect, container: ClientRect): void; + updateSelection(selections: ClientRect[], container: ClientRect): void; + private _setHoverState; + private _toggleOpenedCursor; + private _getCoordinates; + private _updateCaretFlag; + private _clearSelection; + private _addSelection; + private _selectionBlock; + private _sortByDomPosition; + private _sanitize; + private _serialize; +} diff --git a/dist/quill-cursors/i-coordinates.d.ts b/dist/quill-cursors/i-coordinates.d.ts new file mode 100644 index 0000000..ba6ef45 --- /dev/null +++ b/dist/quill-cursors/i-coordinates.d.ts @@ -0,0 +1,6 @@ +export interface ICoordinates { + left: number; + top: number; + right: number; + bottom: number; +} diff --git a/dist/quill-cursors/i-delta.d.ts b/dist/quill-cursors/i-delta.d.ts new file mode 100644 index 0000000..109e729 --- /dev/null +++ b/dist/quill-cursors/i-delta.d.ts @@ -0,0 +1,8 @@ +export default interface IDelta { + ops: IOp[]; +} +export interface IOp { + insert?: any; + delete?: number; + retain?: number; +} diff --git a/dist/quill-cursors/i-quill-cursors-options.d.ts b/dist/quill-cursors/i-quill-cursors-options.d.ts new file mode 100644 index 0000000..71e7d4a --- /dev/null +++ b/dist/quill-cursors/i-quill-cursors-options.d.ts @@ -0,0 +1,10 @@ +export default interface IQuillCursorsOptions { + template?: string; + containerClass?: string; + selectionChangeSource?: string; + hideDelayMs?: number; + hideSpeedMs?: number; + transformOnTextChange?: boolean; + boundsContainer?: HTMLElement; + positionFlag?: (flag: HTMLElement, caretRectangle: ClientRect, container: ClientRect) => void; +} diff --git a/dist/quill-cursors/i-range.d.ts b/dist/quill-cursors/i-range.d.ts new file mode 100644 index 0000000..accef34 --- /dev/null +++ b/dist/quill-cursors/i-range.d.ts @@ -0,0 +1,4 @@ +export default interface IQuillRange { + index: number; + length: number; +} diff --git a/dist/quill-cursors/quill-cursors.d.ts b/dist/quill-cursors/quill-cursors.d.ts new file mode 100644 index 0000000..ee7f273 --- /dev/null +++ b/dist/quill-cursors/quill-cursors.d.ts @@ -0,0 +1,34 @@ +import IQuillCursorsOptions from './i-quill-cursors-options'; +import Cursor from './cursor'; +import IQuillRange from './i-range'; +export default class QuillCursors { + static DEFAULTS: IQuillCursorsOptions; + readonly quill: any; + readonly options: IQuillCursorsOptions; + private readonly _cursors; + private readonly _container; + private readonly _boundsContainer; + private _currentSelection; + private _isObserving; + constructor(quill: any, options?: IQuillCursorsOptions); + createCursor(id: string, name: string, color: string): Cursor; + moveCursor(id: string, range: IQuillRange): void; + removeCursor(id: string): void; + update(): void; + clearCursors(): void; + toggleFlag(id: string, shouldShow?: boolean): void; + cursors(): Cursor[]; + private _registerSelectionChangeListeners; + private _registerTextChangeListener; + private _registerDomListeners; + private _handleCursorTouch; + private _registerResizeObserver; + private _updateCursor; + private _indexWithinQuillBounds; + private _leafIsValid; + private _handleTextChange; + private _emitSelection; + private _setDefaults; + private _lineRanges; + private _transformCursors; +} diff --git a/dist/quill-cursors/template.d.ts b/dist/quill-cursors/template.d.ts new file mode 100644 index 0000000..4dfe6ea --- /dev/null +++ b/dist/quill-cursors/template.d.ts @@ -0,0 +1,2 @@ +declare const template: string; +export default template;