diff --git a/About/project.json b/About/project.json index 70294b0..be8d487 100644 --- a/About/project.json +++ b/About/project.json @@ -1,6 +1,5 @@ { "name": "About", - "root": "home://workspace/antosdk-apps/About", "css": ["css/main.css"], "javascripts": [], "coffees": ["coffees/main.coffee"], diff --git a/AceDiff/README.md b/AceDiff/README.md new file mode 100644 index 0000000..2aa217b --- /dev/null +++ b/AceDiff/README.md @@ -0,0 +1,6 @@ +# AceDiff +This is a wrapper for Ace Editor to provide a 2-panel diffing/merging tool that visualizes differences in two documents and allows users to copy changes from to the other. + +It's built on top of google-diff-match-patch library. That lib handles the hard part: the computation of the document diffs. Ace-diff just visualizes that information as line-diffs in the editors. + +Github page: [https://github.com/ace-diff/ace-diff](https://github.com/ace-diff/ace-diff) \ No newline at end of file diff --git a/AceDiff/ace-diff-dark.min.css b/AceDiff/ace-diff-dark.min.css new file mode 100644 index 0000000..bf68627 --- /dev/null +++ b/AceDiff/ace-diff-dark.min.css @@ -0,0 +1,2 @@ +.acediff__wrap{display:flex;flex-direction:row;position:absolute;bottom:0;top:0;left:0;height:100%;width:100%;overflow:auto}.acediff__gutter{flex:0 0 60px;border-left:1px solid #000;border-right:1px solid #000;overflow:hidden}.acediff__gutter,.acediff__gutter svg{background-color:#272727}.acediff__left,.acediff__right{height:100%;flex:1}.acediff__diffLine{background-color:#004d7a;border-top:1px solid #003554;border-bottom:1px solid #003554;position:absolute;z-index:4}.acediff__diffLine.targetOnly{height:0!important;border-top:1px solid #003554;border-bottom:0;position:absolute}.acediff__connector{fill:#004d7a;stroke:#003554}.acediff__copy--left,.acediff__copy--right{position:relative}.acediff__copy--left div,.acediff__copy--right div{color:#fff;text-shadow:1px 1px rgba(0,0,0,.7);position:absolute;margin:2px 3px;cursor:pointer}.acediff__copy--right div:hover{color:#61a2e7}.acediff__copy--left{float:right}.acediff__copy--left div{right:0}.acediff__copy--left div:hover{color:#f7b742} +/*# sourceMappingURL=/ace-diff-dark.min.css.map */ \ No newline at end of file diff --git a/AceDiff/ace-diff.min.js b/AceDiff/ace-diff.min.js new file mode 100644 index 0000000..d05cf5f --- /dev/null +++ b/AceDiff/ace-diff.min.js @@ -0,0 +1,32 @@ +parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;ch.length?r:h,g=r.length>h.length?h:r,o=l.indexOf(g);if(-1!=o)return a=[new t.Diff(n,l.substring(0,o)),new t.Diff(i,g),new t.Diff(n,l.substring(o+g.length))],r.length>h.length&&(a[0][0]=a[2][0]=e),a;if(1==g.length)return[new t.Diff(e,r),new t.Diff(n,h)];var c=this.diff_halfMatch_(r,h);if(c){var u=c[0],p=c[1],d=c[2],_=c[3],b=c[4],v=this.diff_main(u,d,s,f),m=this.diff_main(p,_,s,f);return v.concat([new t.Diff(i,b)],m)}return s&&r.length>100&&h.length>100?this.diff_lineMode_(r,h,f):this.diff_bisect_(r,h,f)},t.prototype.diff_lineMode_=function(r,h,s){var f=this.diff_linesToChars_(r,h);r=f.chars1,h=f.chars2;var a=f.lineArray,l=this.diff_main(r,h,!1,s);this.diff_charsToLines_(l,a),this.diff_cleanupSemantic(l),l.push(new t.Diff(i,""));for(var g=0,o=0,c=0,u="",p="";g=1&&c>=1){l.splice(g-o-c,o+c),g=g-o-c;for(var d=this.diff_main(u,p,!1,s),_=d.length-1;_>=0;_--)l.splice(g,0,d[_]);g+=d.length}c=0,o=0,u="",p=""}g++}return l.pop(),l},t.prototype.diff_bisect_=function(i,r,h){for(var s=i.length,f=r.length,a=Math.ceil((s+f)/2),l=a,g=2*a,o=new Array(g),c=new Array(g),u=0;uh);w++){for(var x=-w+_;x<=w-b;x+=2){for(var M=l+x,D=(I=x==-w||x!=w&&o[M-1]s)b+=2;else if(D>f)_+=2;else if(d){if((k=l+p-x)>=0&&k=(A=s-c[k]))return this.diff_bisectSplit_(i,r,I,D,h)}}for(var y=-w+v;y<=w-m;y+=2){for(var A,k=l+y,E=(A=y==-w||y!=w&&c[k-1]s)m+=2;else if(E>f)v+=2;else if(!d){if((M=l+p-y)>=0&&M=(A=s-A))return this.diff_bisectSplit_(i,r,I,D,h)}}}}return[new t.Diff(e,i),new t.Diff(n,r)]},t.prototype.diff_bisectSplit_=function(t,e,n,i,r){var h=t.substring(0,n),s=e.substring(0,i),f=t.substring(n),a=e.substring(i),l=this.diff_main(h,s,!1,r),g=this.diff_main(f,a,!1,r);return l.concat(g)},t.prototype.diff_linesToChars_=function(t,e){var n=[],i={};function r(t){for(var e="",r=0,s=-1,f=n.length;si?t=t.substring(n-i):ne.length?t:e,i=t.length>e.length?e:t;if(n.length<4||2*i.length=t.length?[i,h,s,f,g]:null}var s,f,a,l,g,o=h(n,i,Math.ceil(n.length/4)),c=h(n,i,Math.ceil(n.length/2));return o||c?(s=c?o&&o[4].length>c[4].length?o:c:o,t.length>e.length?(f=s[0],a=s[1],l=s[2],g=s[3]):(l=s[0],g=s[1],f=s[2],a=s[3]),[f,a,l,g,s[4]]):null},t.prototype.diff_cleanupSemantic=function(r){for(var h=!1,s=[],f=0,a=null,l=0,g=0,o=0,c=0,u=0;l0?s[f-1]:-1,g=0,o=0,c=0,u=0,a=null,h=!0)),l++;for(h&&this.diff_cleanupMerge(r),this.diff_cleanupSemanticLossless(r),l=1;l=b?(_>=p.length/2||_>=d.length/2)&&(r.splice(l,0,new t.Diff(i,d.substring(0,_))),r[l-1][1]=p.substring(0,p.length-_),r[l+1][1]=d.substring(_),l++):(b>=p.length/2||b>=d.length/2)&&(r.splice(l,0,new t.Diff(i,p.substring(0,b))),r[l-1][0]=n,r[l-1][1]=d.substring(0,d.length-b),r[l+1][0]=e,r[l+1][1]=p.substring(b),l++),l++}l++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var i=e.charAt(e.length-1),r=n.charAt(0),h=i.match(t.nonAlphaNumericRegex_),s=r.match(t.nonAlphaNumericRegex_),f=h&&i.match(t.whitespaceRegex_),a=s&&r.match(t.whitespaceRegex_),l=f&&i.match(t.linebreakRegex_),g=a&&r.match(t.linebreakRegex_),o=l&&e.match(t.blanklineEndRegex_),c=g&&n.match(t.blanklineStartRegex_);return o||c?5:l||g?4:h&&!f&&a?3:f||a?2:h||s?1:0}for(var r=1;r=u&&(u=p,g=h,o=s,c=f)}e[r-1][1]!=g&&(g?e[r-1][1]=g:(e.splice(r-1,1),r--),e[r][1]=o,c?e[r+1][1]=c:(e.splice(r+1,1),r--))}r++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(r){for(var h=!1,s=[],f=0,a=null,l=0,g=!1,o=!1,c=!1,u=!1;l0?s[f-1]:-1,c=u=!1),h=!0)),l++;h&&this.diff_cleanupMerge(r)},t.prototype.diff_cleanupMerge=function(r){r.push(new t.Diff(i,""));for(var h,s=0,f=0,a=0,l="",g="";s1?(0!==f&&0!==a&&(0!==(h=this.diff_commonPrefix(g,l))&&(s-f-a>0&&r[s-f-a-1][0]==i?r[s-f-a-1][1]+=g.substring(0,h):(r.splice(0,0,new t.Diff(i,g.substring(0,h))),s++),g=g.substring(h),l=l.substring(h)),0!==(h=this.diff_commonSuffix(g,l))&&(r[s][1]=g.substring(g.length-h)+r[s][1],g=g.substring(0,g.length-h),l=l.substring(0,l.length-h))),s-=f+a,r.splice(s,f+a),l.length&&(r.splice(s,0,new t.Diff(e,l)),s++),g.length&&(r.splice(s,0,new t.Diff(n,g)),s++),s++):0!==s&&r[s-1][0]==i?(r[s-1][1]+=r[s][1],r.splice(s,1)):s++,a=0,f=0,l="",g=""}""===r[r.length-1][1]&&r.pop();var o=!1;for(s=1;si));r++)f=h,a=s;return t.length!=r&&t[r][0]===e?a:a+(i-f)},t.prototype.diff_prettyHtml=function(t){for(var r=[],h=/&/g,s=//g,a=/\n/g,l=0;l");switch(g){case n:r[l]=''+o+"";break;case e:r[l]=''+o+"";break;case i:r[l]=""+o+""}}return r.join("")},t.prototype.diff_text1=function(t){for(var e=[],i=0;ithis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var i=this.match_alphabet_(e),r=this;function h(t,i){var h=t/e.length,s=Math.abs(n-i);return r.Match_Distance?h+s/r.Match_Distance:s?1:h}var s=this.Match_Threshold,f=t.indexOf(e,n);-1!=f&&(s=Math.min(h(0,f),s),-1!=(f=t.lastIndexOf(e,n+e.length))&&(s=Math.min(h(0,f),s)));var a,l,g=1<=p;b--){var v=i[t.charAt(b-1)];if(_[b]=0===u?(_[b+1]<<1|1)&v:(_[b+1]<<1|1)&v|(o[b+1]|o[b])<<1|1|o[b+1],_[b]&g){var m=h(u,b-1);if(m<=s){if(s=m,!((f=b-1)>n))break;p=Math.max(1,2*n-f)}}}if(h(u+1,n)>s)break;o=_}return f},t.prototype.match_alphabet_=function(t){for(var e={},n=0;n2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(r&&"object"==typeof r&&void 0===h&&void 0===s)a=r,f=this.diff_text1(a);else if("string"==typeof r&&h&&"object"==typeof h&&void 0===s)f=r,a=h;else{if("string"!=typeof r||"string"!=typeof h||!s||"object"!=typeof s)throw new Error("Unknown call format to patch_make.");f=r,a=s}if(0===a.length)return[];for(var l=[],g=new t.patch_obj,o=0,c=0,u=0,p=f,d=f,_=0;_=2*this.Patch_Margin&&o&&(this.patch_addContext_(g,p),l.push(g),g=new t.patch_obj,o=0,p=d,c=u)}b!==n&&(c+=v.length),b!==e&&(u+=v.length)}return o&&(this.patch_addContext_(g,p),l.push(g)),l},t.prototype.patch_deepCopy=function(e){for(var n=[],i=0;ithis.Match_MaxBits?-1!=(l=this.match_main(r,c.substring(0,this.Match_MaxBits),o))&&(-1==(u=this.match_main(r,c.substring(c.length-this.Match_MaxBits),o+c.length-this.Match_MaxBits))||l>=u)&&(l=-1):l=this.match_main(r,c,o),-1==l)f[a]=!1,s-=t[a].length2-t[a].length1;else if(f[a]=!0,s=l-o,c==(g=-1==u?r.substring(l,l+c.length):r.substring(l,u+this.Match_MaxBits)))r=r.substring(0,l)+this.diff_text2(t[a].diffs)+r.substring(l+c.length);else{var p=this.diff_main(c,g,!1);if(c.length>this.Match_MaxBits&&this.diff_levenshtein(p)/c.length>this.Patch_DeleteThreshold)f[a]=!1;else{this.diff_cleanupSemanticLossless(p);for(var d,_=0,b=0;bf[0][1].length){var a=n-f[0][1].length;f[0][1]=r.substring(f[0][1].length)+f[0][1],s.start1-=a,s.start2-=a,s.length1+=a,s.length2+=a}if(0==(f=(s=e[e.length-1]).diffs).length||f[f.length-1][0]!=i)f.push(new t.Diff(i,r)),s.length1+=n,s.length2+=n;else if(n>f[f.length-1][1].length){a=n-f[f.length-1][1].length;f[f.length-1][1]+=r.substring(0,a),s.length1+=a,s.length2+=a}return r},t.prototype.patch_splitMax=function(r){for(var h=this.Match_MaxBits,s=0;s2*h?(o.length1+=p.length,a+=p.length,c=!1,o.diffs.push(new t.Diff(u,p)),f.diffs.shift()):(p=p.substring(0,h-o.length1-this.Patch_Margin),o.length1+=p.length,a+=p.length,u===i?(o.length2+=p.length,l+=p.length):c=!1,o.diffs.push(new t.Diff(u,p)),p==f.diffs[0][1]?f.diffs.shift():f.diffs[0][1]=f.diffs[0][1].substring(p.length))}g=(g=this.diff_text2(o.diffs)).substring(g.length-this.Patch_Margin);var d=this.diff_text1(f.diffs).substring(0,this.Patch_Margin);""!==d&&(o.length1+=d.length,o.length2+=d.length,0!==o.diffs.length&&o.diffs[o.diffs.length-1][0]===i?o.diffs[o.diffs.length-1][1]+=d:o.diffs.push(new t.Diff(i,d))),c||r.splice(++s,0,o)}}},t.prototype.patch_toText=function(t){for(var e=[],n=0;n2&&void 0!==arguments[2]&&arguments[2],l=null,o=!0;return function(){for(var u=arguments.length,i=new Array(u),a=0;a0&&void 0!==arguments[0]?arguments[0]:"").replace(/\r\n/g,"\n")}; +},{}],"j8WE":[function(require,module,exports) { +module.exports=function(c,n,o,t){var a=c+(o-c)/2;return"M ".concat(c," ").concat(n," C ").concat(a,",").concat(n," ").concat(a,",").concat(t," ").concat(o,",").concat(t)}; +},{}],"iJA9":[function(require,module,exports) { +module.exports={DIFF_EQUAL:0,DIFF_DELETE:-1,DIFF_INSERT:1,EDITOR_RIGHT:"right",EDITOR_LEFT:"left",RTL:"rtl",LTR:"ltr",SVG_NS:"http://www.w3.org/2000/svg",DIFF_GRANULARITY_SPECIFIC:"specific",DIFF_GRANULARITY_BROAD:"broad"}; +},{}],"gWhB":[function(require,module,exports) { +var o=require("../constants");module.exports=function(t,e){var n=t.options.mode;return e===o.EDITOR_LEFT&&null!==t.options.left.mode&&(n=t.options.left.mode),e===o.EDITOR_RIGHT&&null!==t.options.right.mode&&(n=t.options.right.mode),n}; +},{"../constants":"iJA9"}],"IRlp":[function(require,module,exports) { +var t=require("../constants");module.exports=function(e,o){var n=e.options.theme;return o===t.EDITOR_LEFT&&null!==e.options.left.theme&&(n=e.options.left.theme),o===t.EDITOR_RIGHT&&null!==e.options.right.theme&&(n=e.options.right.theme),n}; +},{"../constants":"iJA9"}],"L8P8":[function(require,module,exports) { +module.exports=function(e,n){return e.ace.getSession().doc.getLine(n)}; +},{}],"gpkQ":[function(require,module,exports) { +module.exports=function(e){return document.getElementById(e.options.left.id).offsetHeight}; +},{}],"QEUm":[function(require,module,exports) { +module.exports=function(t){var e=document.createElement("div"),n={class:t.className,style:"top:".concat(t.topOffset,"px"),title:t.tooltip,"data-diff-index":t.diffIndex};for(var o in n)e.setAttribute(o,n[o]);return e.innerHTML=t.arrowContent,e}; +},{}],"f1Db":[function(require,module,exports) { +module.exports=function(t,e){var r=Math.random().toString(36).substr(2,5),n="js-".concat(e,"-").concat(r),a=t.querySelector(".".concat(e));if(a)return a.id=a.id||n,a.id;var c=document.createElement("div");return t.appendChild(c),c.className=e,c.id=n,c.id}; +},{}],"FPMV":[function(require,module,exports) { +function e(e,t,o,r){var n="document"===e?document:document.querySelector(e);n.addEventListener(t,function(e){for(var t=n.querySelectorAll(o),c=e.target,l=0,u=t.length;l0&&void 0!==arguments[0]?arguments[0]:{};if(!(this instanceof L))return new L(t);var i=this;i.options=n({ace:window?window.ace:void 0,mode:null,theme:null,element:null,diffGranularity:u.DIFF_GRANULARITY_BROAD,lockScrolling:!1,showDiffs:!0,showConnectors:!0,maxDiffs:5e3,left:{id:null,content:null,mode:null,theme:null,editable:!0,copyLinkEnabled:!0},right:{id:null,content:null,mode:null,theme:null,editable:!0,copyLinkEnabled:!0},classes:{gutterID:"acediff__gutter",diff:"acediff__diffLine",connector:"acediff__connector",newCodeConnectorLink:"acediff__newCodeConnector",newCodeConnectorLinkContent:"→",deletedCodeConnectorLink:"acediff__deletedCodeConnector",deletedCodeConnectorLinkContent:"←",copyRightContainer:"acediff__copy--right",copyLeftContainer:"acediff__copy--left"},connectorYOffset:0},t);var r=i.options.ace;if(!r){var s="No ace editor found nor supplied - `options.ace` or `window.ace` is missing";return console.error(s),new Error(s)}if(!(e=p(r))){var l="Could not require Range module for Ace. Depends on your bundling strategy, but it usually comes with Ace itself. See https://ace.c9.io/api/range.html, open an issue on GitHub ace-diff/ace-diff";return console.error(l),new Error(l)}if(null===i.options.element){var f="You need to specify an element for Ace-diff - `options.element` is missing";return console.error(f),new Error(f)}if(i.options.element instanceof HTMLElement?i.el=i.options.element:i.el=document.body.querySelector(i.options.element),!i.el){var g="Can't find the specified element ".concat(i.options.element);return console.error(g),new Error(g)}i.options.left.id=h(i.el,"acediff__left"),i.options.classes.gutterID=h(i.el,"acediff__gutter"),i.options.right.id=h(i.el,"acediff__right"),i.el.innerHTML='
'.concat(i.el.innerHTML,"
"),i.editors={left:{ace:r.edit(i.options.left.id),markers:[],lineLengths:[]},right:{ace:r.edit(i.options.right.id),markers:[],lineLengths:[]},editorHeight:null},i.editors.left.ace.getSession().setMode(a(i,u.EDITOR_LEFT)),i.editors.right.ace.getSession().setMode(a(i,u.EDITOR_RIGHT)),i.editors.left.ace.setReadOnly(!i.options.left.editable),i.editors.right.ace.setReadOnly(!i.options.right.editable),i.editors.left.ace.setTheme(c(i,u.EDITOR_LEFT)),i.editors.right.ace.setTheme(c(i,u.EDITOR_RIGHT)),i.editors.left.ace.setValue(o(i.options.left.content),-1),i.editors.right.ace.setValue(o(i.options.right.content),-1),i.editors.editorHeight=d(i),setTimeout(function(){i.lineHeight=i.editors.left.ace.renderer.lineHeight,C(i),O(i),F(i),i.diff()},1)}L.prototype={setOptions:function(e){n(this.options,e),this.diff()},getNumDiffs:function(){return this.diffs.length},getEditors:function(){return{left:this.editors.left.ace,right:this.editors.right.ace}},diff:function(){var e=this,n=new t,i=this.editors.left.ace.getSession().getValue(),r=this.editors.right.ace.getSession().getValue(),o=n.diff_main(r,i);n.diff_cleanupSemantic(o),this.editors.left.lineLengths=S(this.editors.left),this.editors.right.lineLengths=S(this.editors.right);var s=[],a={left:0,right:0};o.forEach(function(t,n,i){var r=t[0],c=t[1];i[n+1]&&c.endsWith("\n")&&i[n+1][1].startsWith("\n")&&(c+="\n",o[n][1]=c,o[n+1][1]=o[n+1][1].replace(/^\n/,"")),0!==c.length&&(r===u.DIFF_EQUAL?(a.left+=c.length,a.right+=c.length):r===u.DIFF_DELETE?(s.push(R(e,u.DIFF_DELETE,a.left,a.right,c)),a.right+=c.length):r===u.DIFF_INSERT&&(s.push(R(e,u.DIFF_INSERT,a.left,a.right,c)),a.left+=c.length))},this),this.diffs=G(this,s),this.diffs.length>this.options.maxDiffs||(I(this),N(this))},destroy:function(){var e=this.editors.left.ace.getValue();this.editors.left.ace.destroy();var t=this.editors.left.ace.container,n=t.cloneNode(!1);n.textContent=e,t.parentNode.replaceChild(n,t);var i=this.editors.right.ace.getValue();this.editors.right.ace.destroy(),(n=(t=this.editors.right.ace.container).cloneNode(!1)).textContent=i,t.parentNode.replaceChild(n,t),document.getElementById(this.options.classes.gutterID).innerHTML="",E()}};var E=function(){};function C(e){e.editors.left.ace.getSession().on("changeScrollTop",i(function(){y(e)},16)),e.editors.right.ace.getSession().on("changeScrollTop",i(function(){y(e)},16));var t=e.diff.bind(e);e.editors.left.ace.on("change",t),e.editors.right.ace.on("change",t),e.options.left.copyLinkEnabled&&g.on("#".concat(e.options.classes.gutterID),"click",".".concat(e.options.classes.newCodeConnectorLink),function(t){m(e,t,u.LTR)}),e.options.right.copyLinkEnabled&&g.on("#".concat(e.options.classes.gutterID),"click",".".concat(e.options.classes.deletedCodeConnectorLink),function(t){m(e,t,u.RTL)});var n=r(function(){e.editors.availableHeight=document.getElementById(e.options.left.id).offsetHeight,e.diff()},250);window.addEventListener("resize",n),E=function(){window.removeEventListener("resize",n)}}function m(t,n,i){var r,o,s,a,c,d,f=parseInt(n.target.getAttribute("data-diff-index"),10),h=t.diffs[f];i===u.LTR?(r=t.editors.left,o=t.editors.right,s=h.leftStartLine,a=h.leftEndLine,c=h.rightStartLine,d=h.rightEndLine):(r=t.editors.right,o=t.editors.left,s=h.rightStartLine,a=h.rightEndLine,c=h.leftStartLine,d=h.leftEndLine);for(var g="",p=s;pi?"lines":"targetOnly");s.markers.push(s.ace.session.addMarker(new e(i,0,r-1,1),a,"fullLine"))}function y(e){I(e),N(e),D(e)}function I(e){e.editors.left.markers.forEach(function(t){e.editors.left.ace.getSession().removeMarker(t)},e),e.editors.right.markers.forEach(function(t){e.editors.right.ace.getSession().removeMarker(t)},e)}function T(e,t,n,i,r){var o=e.editors.left.ace.getSession().getScrollTop(),a=e.editors.right.ace.getSession().getScrollTop();e.connectorYOffset=1;var c=t*e.lineHeight-o+.5,l=e.gutterWidth+1,d=i*e.lineHeight-a+.5,f=n*e.lineHeight-o+e.connectorYOffset+.5,h=e.gutterWidth+1,g=r*e.lineHeight-a+e.connectorYOffset+.5,p=s(-1,c,l,d),L=s(h,g,-1,f),E="L".concat(l,",").concat(d," ").concat(h,",").concat(g),C="L".concat(-1,",").concat(f," ").concat(-1,",").concat(c),m="".concat(p," ").concat(E," ").concat(L," ").concat(C),S=document.createElementNS(u.SVG_NS,"path");S.setAttribute("d",m),S.setAttribute("class",e.options.classes.connector),e.gutterSVG.appendChild(S)}function _(e,t,n){if(t.leftEndLine>t.leftStartLine&&e.options.left.copyLinkEnabled){var i=f({className:e.options.classes.newCodeConnectorLink,topOffset:t.leftStartLine*e.lineHeight,tooltip:"Copy to right",diffIndex:n,arrowContent:e.options.classes.newCodeConnectorLinkContent});e.copyRightContainer.appendChild(i)}if(t.rightEndLine>t.rightStartLine&&e.options.right.copyLinkEnabled){var r=f({className:e.options.classes.deletedCodeConnectorLink,topOffset:t.rightStartLine*e.lineHeight,tooltip:"Copy to left",diffIndex:n,arrowContent:e.options.classes.deletedCodeConnectorLinkContent});e.copyLeftContainer.appendChild(r)}}function D(e){var t=e.editors.left.ace.getSession().getScrollTop(),n=e.editors.right.ace.getSession().getScrollTop();e.copyRightContainer.style.cssText="top: ".concat(-t,"px"),e.copyLeftContainer.style.cssText="top: ".concat(-n,"px")}function R(e,t,n,i,r){var o={},s=/^\n/.test(r);if(t===u.DIFF_INSERT){var a=w(e.editors.left,n,r),c=b(e.editors.right,i),l=k(e.editors.right,c),d=k(e.editors.left,a.startLine),f=c;0===k(e.editors.left,a.startLine)&&s&&(s=!1),0===a.startChar&&H(e.editors.right,i,s)&&(f=c+1);var h=a.startLine===a.endLine,g=0;(a.startChar>0||h&&r.length0&&a.startChar0||h&&r.length0&&a.startChar0&&k(e,i.startLine)===i.startChar&&(i.startLine++,i.startChar=0),0===i.endChar&&i.endLine--;var c=/\n$/.test(n);return i.startChar>0&&c&&i.endLine++,i}function k(e,t){return l(e,t).length}function b(e,t){for(var n=e.ace.getSession().doc.getAllLines(),i=0,r=0,o=0;oe.length?t:e,f=t.length>e.length?e:t,h=a.indexOf(f);if(-1!=h)return o=[new i.Diff(1,a.substring(0,h)),new i.Diff(0,f),new i.Diff(1,a.substring(h+f.length))],t.length>e.length&&(o[0][0]=o[2][0]=r),o;if(1==f.length)return[new i.Diff(r,t),new i.Diff(1,e)];var l=this.diff_halfMatch_(t,e);if(l){var c=l[0],g=l[1],u=l[2],d=l[3],p=l[4],_=this.diff_main(c,u,n,s),m=this.diff_main(g,d,n,s);return _.concat([new i.Diff(0,p)],m)}return n&&t.length>100&&e.length>100?this.diff_lineMode_(t,e,s):this.diff_bisect_(t,e,s)},i.prototype.diff_lineMode_=function(t,e,n){var s=this.diff_linesToChars_(t,e);t=s.chars1,e=s.chars2;var o=s.lineArray,a=this.diff_main(t,e,!1,n);this.diff_charsToLines_(a,o),this.diff_cleanupSemantic(a),a.push(new i.Diff(0,""));for(var f=0,h=0,l=0,c="",g="";f=1&&l>=1){a.splice(f-h-l,h+l),f=f-h-l;for(var u=this.diff_main(c,g,!1,n),d=u.length-1;d>=0;d--)a.splice(f,0,u[d]);f+=u.length}l=0,h=0,c="",g=""}f++}return a.pop(),a},i.prototype.diff_bisect_=function(t,e,n){for(var s=t.length,o=e.length,a=Math.ceil((s+o)/2),f=a,h=2*a,l=new Array(h),c=new Array(h),g=0;gn);b++){for(var L=-b+p;L<=b-_;L+=2){for(var y=f+L,E=(C=L==-b||L!=b&&l[y-1]s)_+=2;else if(E>o)p+=2;else if(d&&(x=f+u-L)>=0&&x=(D=s-c[x]))return this.diff_bisectSplit_(t,e,C,E,n)}for(var w=-b+m;w<=b-v;w+=2){for(var D,x=f+w,S=(D=w==-b||w!=b&&c[x-1]s)v+=2;else if(S>o)m+=2;else if(!d){var C;if((y=f+u-w)>=0&&y=(D=s-D)))return this.diff_bisectSplit_(t,e,C,E,n)}}}return[new i.Diff(r,t),new i.Diff(1,e)]},i.prototype.diff_bisectSplit_=function(t,e,n,i,r){var s=t.substring(0,n),o=e.substring(0,i),a=t.substring(n),f=e.substring(i),h=this.diff_main(s,o,!1,r),l=this.diff_main(a,f,!1,r);return h.concat(l)},i.prototype.diff_linesToChars_=function(t,e){var n=[],i={};function r(t){for(var e="",r=0,o=-1,a=n.length;oi?t=t.substring(n-i):ne.length?t:e,i=t.length>e.length?e:t;if(n.length<4||2*i.length=t.length?[i,s,o,a,l]:null}var o,a,f,h,l,c=s(n,i,Math.ceil(n.length/4)),g=s(n,i,Math.ceil(n.length/2));return c||g?(o=g?c&&c[4].length>g[4].length?c:g:c,t.length>e.length?(a=o[0],f=o[1],h=o[2],l=o[3]):(h=o[0],l=o[1],a=o[2],f=o[3]),[a,f,h,l,o[4]]):null},i.prototype.diff_cleanupSemantic=function(t){for(var e=!1,n=[],s=0,o=null,a=0,f=0,h=0,l=0,c=0;a0?n[s-1]:-1,f=0,h=0,l=0,c=0,o=null,e=!0)),a++;for(e&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),a=1;a=p?(d>=g.length/2||d>=u.length/2)&&(t.splice(a,0,new i.Diff(0,u.substring(0,d))),t[a-1][1]=g.substring(0,g.length-d),t[a+1][1]=u.substring(d),a++):(p>=g.length/2||p>=u.length/2)&&(t.splice(a,0,new i.Diff(0,g.substring(0,p))),t[a-1][0]=1,t[a-1][1]=u.substring(0,u.length-p),t[a+1][0]=r,t[a+1][1]=g.substring(p),a++),a++}a++}},i.prototype.diff_cleanupSemanticLossless=function(t){function e(t,e){if(!t||!e)return 6;var n=t.charAt(t.length-1),r=e.charAt(0),s=n.match(i.nonAlphaNumericRegex_),o=r.match(i.nonAlphaNumericRegex_),a=s&&n.match(i.whitespaceRegex_),f=o&&r.match(i.whitespaceRegex_),h=a&&n.match(i.linebreakRegex_),l=f&&r.match(i.linebreakRegex_),c=h&&t.match(i.blanklineEndRegex_),g=l&&e.match(i.blanklineStartRegex_);return c||g?5:h||l?4:s&&!a&&f?3:a||f?2:s||o?1:0}for(var n=1;n=g&&(g=u,h=r,l=s,c=o)}t[n-1][1]!=h&&(h?t[n-1][1]=h:(t.splice(n-1,1),n--),t[n][1]=l,c?t[n+1][1]=c:(t.splice(n+1,1),n--))}n++}},i.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,i.whitespaceRegex_=/\s/,i.linebreakRegex_=/[\r\n]/,i.blanklineEndRegex_=/\n\r?\n$/,i.blanklineStartRegex_=/^\r?\n\r?\n/,i.prototype.diff_cleanupEfficiency=function(t){for(var e=!1,n=[],s=0,o=null,a=0,f=!1,h=!1,l=!1,c=!1;a0?n[s-1]:-1,l=c=!1),e=!0)),a++;e&&this.diff_cleanupMerge(t)},i.prototype.diff_cleanupMerge=function(t){t.push(new i.Diff(0,""));for(var e,n=0,s=0,o=0,a="",f="";n1?(0!==s&&0!==o&&(0!==(e=this.diff_commonPrefix(f,a))&&(n-s-o>0&&0==t[n-s-o-1][0]?t[n-s-o-1][1]+=f.substring(0,e):(t.splice(0,0,new i.Diff(0,f.substring(0,e))),n++),f=f.substring(e),a=a.substring(e)),0!==(e=this.diff_commonSuffix(f,a))&&(t[n][1]=f.substring(f.length-e)+t[n][1],f=f.substring(0,f.length-e),a=a.substring(0,a.length-e))),n-=s+o,t.splice(n,s+o),a.length&&(t.splice(n,0,new i.Diff(r,a)),n++),f.length&&(t.splice(n,0,new i.Diff(1,f)),n++),n++):0!==n&&0==t[n-1][0]?(t[n-1][1]+=t[n][1],t.splice(n,1)):n++,o=0,s=0,a="",f=""}""===t[t.length-1][1]&&t.pop();var h=!1;for(n=1;ne));n++)o=i,a=s;return t.length!=n&&t[n][0]===r?a:a+(e-o)},i.prototype.diff_prettyHtml=function(t){for(var e=[],n=/&/g,i=//g,o=/\n/g,a=0;a");switch(f){case 1:e[a]=''+h+"";break;case r:e[a]=''+h+"";break;case 0:e[a]=""+h+""}}return e.join("")},i.prototype.diff_text1=function(t){for(var e=[],n=0;nthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var i=this.match_alphabet_(e),r=this;function s(t,i){var s=t/e.length,o=Math.abs(n-i);return r.Match_Distance?s+o/r.Match_Distance:o?1:s}var o=this.Match_Threshold,a=t.indexOf(e,n);-1!=a&&(o=Math.min(s(0,a),o),-1!=(a=t.lastIndexOf(e,n+e.length))&&(o=Math.min(s(0,a),o)));var f,h,l=1<=d;m--){var v=i[t.charAt(m-1)];if(_[m]=0===u?(_[m+1]<<1|1)&v:(_[m+1]<<1|1)&v|(c[m+1]|c[m])<<1|1|c[m+1],_[m]&l){var b=s(u,m-1);if(b<=o){if(o=b,!((a=m-1)>n))break;d=Math.max(1,2*n-a)}}}if(s(u+1,n)>o)break;c=_}return a},i.prototype.match_alphabet_=function(t){for(var e={},n=0;n2&&(this.diff_cleanupSemantic(o),this.diff_cleanupEfficiency(o));else if(t&&"object"==typeof t&&void 0===e&&void 0===n)o=t,s=this.diff_text1(o);else if("string"==typeof t&&e&&"object"==typeof e&&void 0===n)s=t,o=e;else{if("string"!=typeof t||"string"!=typeof e||!n||"object"!=typeof n)throw new Error("Unknown call format to patch_make.");s=t,o=n}if(0===o.length)return[];for(var a=[],f=new i.patch_obj,h=0,l=0,c=0,g=s,u=s,d=0;d=2*this.Patch_Margin&&h&&(this.patch_addContext_(f,g),a.push(f),f=new i.patch_obj,h=0,g=u,l=c)}1!==p&&(l+=_.length),p!==r&&(c+=_.length)}return h&&(this.patch_addContext_(f,g),a.push(f)),a},i.prototype.patch_deepCopy=function(t){for(var e=[],n=0;nthis.Match_MaxBits?-1!=(a=this.match_main(e,l.substring(0,this.Match_MaxBits),h))&&(-1==(c=this.match_main(e,l.substring(l.length-this.Match_MaxBits),h+l.length-this.Match_MaxBits))||a>=c)&&(a=-1):a=this.match_main(e,l,h),-1==a)s[o]=!1,i-=t[o].length2-t[o].length1;else if(s[o]=!0,i=a-h,l==(f=-1==c?e.substring(a,a+l.length):e.substring(a,c+this.Match_MaxBits)))e=e.substring(0,a)+this.diff_text2(t[o].diffs)+e.substring(a+l.length);else{var g=this.diff_main(l,f,!1);if(l.length>this.Match_MaxBits&&this.diff_levenshtein(g)/l.length>this.Patch_DeleteThreshold)s[o]=!1;else{this.diff_cleanupSemanticLossless(g);for(var u,d=0,p=0;po[0][1].length){var a=e-o[0][1].length;o[0][1]=n.substring(o[0][1].length)+o[0][1],s.start1-=a,s.start2-=a,s.length1+=a,s.length2+=a}return 0==(o=(s=t[t.length-1]).diffs).length||0!=o[o.length-1][0]?(o.push(new i.Diff(0,n)),s.length1+=e,s.length2+=e):e>o[o.length-1][1].length&&(a=e-o[o.length-1][1].length,o[o.length-1][1]+=n.substring(0,a),s.length1+=a,s.length2+=a),n},i.prototype.patch_splitMax=function(t){for(var e=this.Match_MaxBits,n=0;n2*e?(h.length1+=g.length,o+=g.length,l=!1,h.diffs.push(new i.Diff(c,g)),s.diffs.shift()):(g=g.substring(0,e-h.length1-this.Patch_Margin),h.length1+=g.length,o+=g.length,0===c?(h.length2+=g.length,a+=g.length):l=!1,h.diffs.push(new i.Diff(c,g)),g==s.diffs[0][1]?s.diffs.shift():s.diffs[0][1]=s.diffs[0][1].substring(g.length))}f=(f=this.diff_text2(h.diffs)).substring(f.length-this.Patch_Margin);var u=this.diff_text1(s.diffs).substring(0,this.Patch_Margin);""!==u&&(h.length1+=u.length,h.length2+=u.length,0!==h.diffs.length&&0===h.diffs[h.diffs.length-1][0]?h.diffs[h.diffs.length-1][1]+=u:h.diffs.push(new i.Diff(0,u))),l||t.splice(++n,0,h)}}},i.prototype.patch_toText=function(t){for(var e=[],n=0;n2&&void 0!==arguments[2]&&arguments[2],r=null,s=!0;return function(){for(var o=arguments.length,a=new Array(o),f=0;f0&&void 0!==arguments[0]?arguments[0]:"").replace(/\r\n/g,"\n")}},{}],j8WE:[function(t,e,n){e.exports=function(t,e,n,i){var r=t+(n-t)/2;return"M ".concat(t," ").concat(e," C ").concat(r,",").concat(e," ").concat(r,",").concat(i," ").concat(n,",").concat(i)}},{}],iJA9:[function(t,e,n){e.exports={DIFF_EQUAL:0,DIFF_DELETE:-1,DIFF_INSERT:1,EDITOR_RIGHT:"right",EDITOR_LEFT:"left",RTL:"rtl",LTR:"ltr",SVG_NS:"http://www.w3.org/2000/svg",DIFF_GRANULARITY_SPECIFIC:"specific",DIFF_GRANULARITY_BROAD:"broad"}},{}],gWhB:[function(t,e,n){var i=t("../constants");e.exports=function(t,e){var n=t.options.mode;return e===i.EDITOR_LEFT&&null!==t.options.left.mode&&(n=t.options.left.mode),e===i.EDITOR_RIGHT&&null!==t.options.right.mode&&(n=t.options.right.mode),n}},{"../constants":"iJA9"}],IRlp:[function(t,e,n){var i=t("../constants");e.exports=function(t,e){var n=t.options.theme;return e===i.EDITOR_LEFT&&null!==t.options.left.theme&&(n=t.options.left.theme),e===i.EDITOR_RIGHT&&null!==t.options.right.theme&&(n=t.options.right.theme),n}},{"../constants":"iJA9"}],L8P8:[function(t,e,n){e.exports=function(t,e){return t.ace.getSession().doc.getLine(e)}},{}],gpkQ:[function(t,e,n){e.exports=function(t){return document.getElementById(t.options.left.id).offsetHeight}},{}],QEUm:[function(t,e,n){e.exports=function(t){var e=document.createElement("div"),n={class:t.className,style:"top:".concat(t.topOffset,"px"),title:t.tooltip,"data-diff-index":t.diffIndex};for(var i in n)e.setAttribute(i,n[i]);return e.innerHTML=t.arrowContent,e}},{}],f1Db:[function(t,e,n){e.exports=function(t,e){var n=Math.random().toString(36).substr(2,5),i="js-".concat(e,"-").concat(n),r=t.querySelector(".".concat(e));if(r)return r.id=r.id||i,r.id;var s=document.createElement("div");return t.appendChild(s),s.className=e,s.id=i,s.id}},{}],FPMV:[function(t,e,n){e.exports={on:function(t,e,n,i){var r="document"===t?document:document.querySelector(t);r.addEventListener(e,(function(t){for(var e=r.querySelectorAll(n),s=t.target,o=0,a=e.length;o0&&void 0!==arguments[0]?arguments[0]:{};if(!(this instanceof b))return new b(t);var e=this;e.options=s({ace:window?window.ace:void 0,mode:null,theme:null,element:null,diffGranularity:m.DIFF_GRANULARITY_BROAD,lockScrolling:!1,showDiffs:!0,showConnectors:!0,maxDiffs:5e3,left:{id:null,content:null,mode:null,theme:null,editable:!0,copyLinkEnabled:!0},right:{id:null,content:null,mode:null,theme:null,editable:!0,copyLinkEnabled:!0},classes:{gutterID:"acediff__gutter",diff:"acediff__diffLine",connector:"acediff__connector",newCodeConnectorLink:"acediff__newCodeConnector",newCodeConnectorLinkContent:"→",deletedCodeConnectorLink:"acediff__deletedCodeConnector",deletedCodeConnectorLinkContent:"←",copyRightContainer:"acediff__copy--right",copyLeftContainer:"acediff__copy--left"},connectorYOffset:0},t);var n=e.options.ace;if(!n){var r="No ace editor found nor supplied - `options.ace` or `window.ace` is missing";return console.error(r),new Error(r)}if(!(i=v(n))){var o="Could not require Range module for Ace. Depends on your bundling strategy, but it usually comes with Ace itself. See https://ace.c9.io/api/range.html, open an issue on GitHub ace-diff/ace-diff";return console.error(o),new Error(o)}if(null===e.options.element){var a="You need to specify an element for Ace-diff - `options.element` is missing";return console.error(a),new Error(a)}if(e.options.element instanceof HTMLElement?e.el=e.options.element:e.el=document.body.querySelector(e.options.element),!e.el){var h="Can't find the specified element ".concat(e.options.element);return console.error(h),new Error(h)}e.options.left.id=p(e.el,"acediff__left"),e.options.classes.gutterID=p(e.el,"acediff__gutter"),e.options.right.id=p(e.el,"acediff__right"),e.el.innerHTML='
'.concat(e.el.innerHTML,"
"),e.editors={left:{ace:n.edit(e.options.left.id),markers:[],lineLengths:[]},right:{ace:n.edit(e.options.right.id),markers:[],lineLengths:[]},editorHeight:null},e.editors.left.ace.getSession().setMode(l(e,m.EDITOR_LEFT)),e.editors.right.ace.getSession().setMode(l(e,m.EDITOR_RIGHT)),e.editors.left.ace.setReadOnly(!e.options.left.editable),e.editors.right.ace.setReadOnly(!e.options.right.editable),e.editors.left.ace.setTheme(c(e,m.EDITOR_LEFT)),e.editors.right.ace.setTheme(c(e,m.EDITOR_RIGHT)),e.editors.left.ace.setValue(f(e.options.left.content),-1),e.editors.right.ace.setValue(f(e.options.right.content),-1),e.editors.editorHeight=u(e),setTimeout((function(){e.lineHeight=e.editors.left.ace.renderer.lineHeight,y(e),O(e),A(e),e.diff()}),1)}b.prototype={setOptions:function(t){s(this.options,t),this.diff()},getNumDiffs:function(){return this.diffs.length},getEditors:function(){return{left:this.editors.left.ace,right:this.editors.right.ace}},diff:function(){var t=this,e=new r,n=this.editors.left.ace.getSession().getValue(),i=this.editors.right.ace.getSession().getValue(),s=e.diff_main(i,n);e.diff_cleanupSemantic(s),this.editors.left.lineLengths=w(this.editors.left),this.editors.right.lineLengths=w(this.editors.right);var o=[],a={left:0,right:0};s.forEach((function(e,n,i){var r=e[0],f=e[1];i[n+1]&&f.endsWith("\n")&&i[n+1][1].startsWith("\n")&&(f+="\n",s[n][1]=f,s[n+1][1]=s[n+1][1].replace(/^\n/,"")),0!==f.length&&(r===m.DIFF_EQUAL?(a.left+=f.length,a.right+=f.length):r===m.DIFF_DELETE?(o.push(C(t,m.DIFF_DELETE,a.left,a.right,f)),a.right+=f.length):r===m.DIFF_INSERT&&(o.push(C(t,m.DIFF_INSERT,a.left,a.right,f)),a.left+=f.length))}),this),this.diffs=function(t,e){var n=[];function i(e){return t.options.diffGranularity===m.DIFF_GRANULARITY_SPECIFIC?e<1:e<=1}e.forEach((function(t,e){if(0!==e){for(var r=!1,s=0;sthis.options.maxDiffs||(S(this),F(this))},destroy:function(){var t=this.editors.left.ace.getValue();this.editors.left.ace.destroy();var e=this.editors.left.ace.container,n=e.cloneNode(!1);n.textContent=t,e.parentNode.replaceChild(n,e);var i=this.editors.right.ace.getValue();this.editors.right.ace.destroy(),(n=(e=this.editors.right.ace.container).cloneNode(!1)).textContent=i,e.parentNode.replaceChild(n,e),document.getElementById(this.options.classes.gutterID).innerHTML="",L()}};var L=function(){};function y(t){t.editors.left.ace.getSession().on("changeScrollTop",o((function(){x(t)}),16)),t.editors.right.ace.getSession().on("changeScrollTop",o((function(){x(t)}),16));var e=t.diff.bind(t);t.editors.left.ace.on("change",e),t.editors.right.ace.on("change",e),t.options.left.copyLinkEnabled&&_.on("#".concat(t.options.classes.gutterID),"click",".".concat(t.options.classes.newCodeConnectorLink),(function(e){E(t,e,m.LTR)})),t.options.right.copyLinkEnabled&&_.on("#".concat(t.options.classes.gutterID),"click",".".concat(t.options.classes.deletedCodeConnectorLink),(function(e){E(t,e,m.RTL)}));var n=a((function(){t.editors.availableHeight=document.getElementById(t.options.left.id).offsetHeight,t.diff()}),250);window.addEventListener("resize",n),L=function(){window.removeEventListener("resize",n)}}function E(t,e,n){var r,s,o,a,f,h,l=parseInt(e.target.getAttribute("data-diff-index"),10),c=t.diffs[l];n===m.LTR?(r=t.editors.left,s=t.editors.right,o=c.leftStartLine,a=c.leftEndLine,f=c.rightStartLine,h=c.rightEndLine):(r=t.editors.right,s=t.editors.left,o=c.rightStartLine,a=c.rightEndLine,f=c.leftStartLine,h=c.leftEndLine);for(var u="",d=o;dn?"lines":"targetOnly");o.markers.push(o.ace.session.addMarker(new i(n,0,r-1,1),a,"fullLine"))}function x(t){S(t),F(t),function(t){var e=t.editors.left.ace.getSession().getScrollTop(),n=t.editors.right.ace.getSession().getScrollTop();t.copyRightContainer.style.cssText="top: ".concat(-e,"px"),t.copyLeftContainer.style.cssText="top: ".concat(-n,"px")}(t)}function S(t){t.editors.left.markers.forEach((function(e){t.editors.left.ace.getSession().removeMarker(e)}),t),t.editors.right.markers.forEach((function(e){t.editors.right.ace.getSession().removeMarker(e)}),t)}function C(t,e,n,i,r){var s={},o=/^\n/.test(r);if(e===m.DIFF_INSERT){var a=M(t.editors.left,n,r),f=T(t.editors.right,i),h=I(t.editors.right,f),l=I(t.editors.left,a.startLine),c=f;0===I(t.editors.left,a.startLine)&&o&&(o=!1),0===a.startChar&&R(t.editors.right,i,o)&&(c=f+1);var g=a.startLine===a.endLine,u=0;(a.startChar>0||g&&r.length0&&a.startChar0||g&&r.length0&&a.startChar0&&I(t,i.startLine)===i.startChar&&(i.startLine++,i.startChar=0),0===i.endChar&&i.endLine--;var f=/\n$/.test(n);return i.startChar>0&&f&&i.endLine++,i}function I(t,e){return g(t,e).length}function T(t,e){for(var n=t.ace.getSession().doc.getAllLines(),i=0,r=0,s=0;se.leftStartLine&&t.options.left.copyLinkEnabled){var i=d({className:t.options.classes.newCodeConnectorLink,topOffset:e.leftStartLine*t.lineHeight,tooltip:"Copy to right",diffIndex:n,arrowContent:t.options.classes.newCodeConnectorLinkContent});t.copyRightContainer.appendChild(i)}if(e.rightEndLine>e.rightStartLine&&t.options.right.copyLinkEnabled){var r=d({className:t.options.classes.deletedCodeConnectorLink,topOffset:e.rightStartLine*t.lineHeight,tooltip:"Copy to left",diffIndex:n,arrowContent:t.options.classes.deletedCodeConnectorLinkContent});t.copyLeftContainer.appendChild(r)}}(t,e,n))}),t)}e.exports=b},{"diff-match-patch":"k8CM","./helpers/merge":"iSlp","./helpers/throttle":"Os6R","./helpers/debounce":"gTec","./helpers/normalizeContent":"xRfK","./visuals/getCurve":"j8WE","./visuals/getMode":"gWhB","./visuals/getTheme":"IRlp","./visuals/getLine":"L8P8","./visuals/getEditorHeight":"gpkQ","./visuals/createArrow":"QEUm","./dom/ensureElement":"f1Db","./dom/query":"FPMV","./constants":"iJA9"}]},{},["Focm"]); \ No newline at end of file diff --git a/AceDiff/build/debug/package.json b/AceDiff/build/debug/package.json new file mode 100644 index 0000000..a79ef16 --- /dev/null +++ b/AceDiff/build/debug/package.json @@ -0,0 +1,15 @@ +{ + "pkgname": "AceDiff", + "name":"AceDiff addon library", + "description":"AceDiff add on library", + "info":{ + "author": "", + "email": "" + }, + "version":"3.0.3-r", + "category":"Library", + "iconclass":"fa fa-cog", + "mimes":["none"], + "dependencies":[], + "locale": {} +} \ No newline at end of file diff --git a/AceDiff/build/release/AceDiff.zip b/AceDiff/build/release/AceDiff.zip new file mode 100644 index 0000000..7ffc78f Binary files /dev/null and b/AceDiff/build/release/AceDiff.zip differ diff --git a/AceDiff/package.json b/AceDiff/package.json new file mode 100644 index 0000000..a79ef16 --- /dev/null +++ b/AceDiff/package.json @@ -0,0 +1,15 @@ +{ + "pkgname": "AceDiff", + "name":"AceDiff addon library", + "description":"AceDiff add on library", + "info":{ + "author": "", + "email": "" + }, + "version":"3.0.3-r", + "category":"Library", + "iconclass":"fa fa-cog", + "mimes":["none"], + "dependencies":[], + "locale": {} +} \ No newline at end of file diff --git a/AceDiff/project.json b/AceDiff/project.json new file mode 100644 index 0000000..a748030 --- /dev/null +++ b/AceDiff/project.json @@ -0,0 +1,7 @@ +{ + "name": "AceDiff", + "css": ["ace-diff-dark.min.css"], + "javascripts": ["ace-diff.min.js"], + "coffees": [], + "copies": ["package.json", "README.md"] +} \ No newline at end of file diff --git a/ActivityMonitor/project.json b/ActivityMonitor/project.json index 5753472..0cb4f5f 100644 --- a/ActivityMonitor/project.json +++ b/ActivityMonitor/project.json @@ -1,6 +1,5 @@ { "name": "ActivityMonitor", - "root": "home://workspace/antosdk-apps/ActivityMonitor", "css": ["main.css"], "javascripts": [], "coffees": ["main.coffee"], diff --git a/Antunnel/build/debug/main.js b/Antunnel/build/debug/main.js index 0b26a29..f0a7960 100644 --- a/Antunnel/build/debug/main.js +++ b/Antunnel/build/debug/main.js @@ -1 +1 @@ -(function(){var e,n,t,s,i;(t=class e{constructor(){this.header={sid:0,cid:0,type:0,size:0},this.data=void 0}as_raw(){var n,t,s;return s=11+this.header.size,(n=new Uint8Array(s)).set(e.MAGIC_START,0),n[2]=this.header.type,t=e.bytes_of(this.header.cid),n.set(t,3),t=e.bytes_of(this.header.sid),n.set(t,5),t=e.bytes_of(this.header.size),n.set(t,7),this.data&&n.set(this.data,9),n.set(e.MAGIC_END,this.header.size+9),n.buffer}}).decode=function(e){return new Promise((function(n,s){var i;return i=new t,t.int_from(t.MAGIC_START,0)!==t.int_from(e,0)?s("Unmatch message begin magic number"):(i.header.type=e[2],i.header.cid=t.int_from(e,3),i.header.sid=t.int_from(e,5),i.header.size=t.int_from(e,7),i.data=e.slice(9,9+i.header.size),t.int_from(t.MAGIC_END,0)!==t.int_from(e,9+i.header.size)?s("Unmatch message end magic number"):n(i))}))},t.bytes_of=function(e){var n;return(n=new Uint8Array(2))[0]=255&e,e>>=8,n[1]=255&e,n},t.int_from=function(e,n){return e[n]|e[n+1]<<8},t.OK=0,t.ERROR=1,t.DATA=6,t.CLOSE=5,t.SUBSCRIBE=2,t.UNSUBSCRIBE=3,t.CTRL=7,t.MAGIC_END=[68,84],t.MAGIC_START=[78,65],s=class{constructor(e){this.channel=e,this.id=void 0,this.channel_id=void 0,this.onmessage=void 0,this.onerror=void 0,this.onopen=void 0,this.onclose=void 0,this.tunnel=void 0,this.is_opened=!1}send(e,n){if(this.tunnel){if(this.is_opened)return this.tunnel.send(this.genmsg(e,n));this.onerror&&this.onerror("Channel is not opened yet")}else this.onerror&&this.onerror("Tunnel is not opened")}genmsg(e,n){var s;return(s=new t).header.sid=this.id,s.header.cid=this.channel_id,s.header.type=e,s.header.size=n?n.length:0,s.data=n,s}close(e){if(this.is_opened=!1,this.tunnel)return this.tunnel.unsubscribe(this,e)}},e=class{constructor(e){this.uri=e,this.socket=void 0,this.pending={},this.subscribers={},this.onclose=void 0}ready(){return new Promise((e,n)=>this.uri?void 0!==this.socket?e():(console.log("Connect to "+this.uri),this.socket=new WebSocket(this.uri),this.socket.binaryType="arraybuffer",this.socket.onmessage=e=>this.process(e),this.socket.onclose=e=>{var n,t,s,i;for(n in this.socket=void 0,t=this.pending)(i=t[n]).tunnel=void 0,i.onclose&&i.onclose();for(n in s=this.subscribers)(i=s[n]).tunnel=void 0,i.is_opened=!1,i.onclose&&i.onclose();if(this.pending={},this.subscribe={},this.onclose())return this.onclose()},this.socket.onerror=e=>{var n,t,s,i,r;for(n in t=this.pending)(r=t[n]).onerror&&r.onerror(e.toString());for(n in i=[],s=this.subscribers)(r=s[n]).onerror&&i.push(r.onerror(e.toString()));return i},this.socket.onopen=n=>e()):n())}process(e){return t.decode(new Uint8Array(e.data)).then(e=>{var n,s;switch(n=(e,n)=>{var t;if(!(t=this.pending[e.header.sid]))return(t=this.subscribers[e.header.sid])&&t[n]?t[n](e):void 0;t[n]&&t[n](e)},e.header.type){case t.OK:if(!(s=this.pending[e.header.sid]))return n(e,"onmessage");if(delete this.pending[e.header.sid],s.id=t.int_from(e.data,0),s.channel_id=e.header.cid,this.subscribers[s.id]=s,s.is_opened=!0,s.onopen)return s.onopen();break;case t.DATA:return n(e,"onmessage");case t.ERROR:return n(e,"onerror");case t.UNSUBSCRIBE:if(!(s=this.subscribers[e.header.sid]))return;return s.close(!0);default:return console.error(`Message of type ${e.header.type} is unsupported`,e)}}).catch(e=>{var n,t,s,i;for(n in t=this.pending)(i=t[n]).onerror&&i.onerror(e);for(n in s=this.subscribers)(i=s[n]).onerror&&i.onerror(e);return console.log(e)})}subscribe(e){return this.ready().then(()=>{for(e.tunnel=this,e.id=Math.floor(1e3*Math.random())+1;this.subscribers[e.id]||this.pending[e.id];)e.id=Math.floor(1e3*Math.random())+1;return this.pending[e.id]=e,this.send(e.genmsg(t.SUBSCRIBE,(new TextEncoder).encode(e.channel)))}).catch((function(n){if(e.onerror)return e.onerror(n.toString())}))}unsubscribe(e,n){return this.ready().then(()=>{if(this.subscribers[e.id])return n||this.send(e.genmsg(t.UNSUBSCRIBE,void 0)),e.onclose&&e.onclose(),delete this.subscribers[e.id],e.tunnel=void 0,e.is_opened=!1}).catch((function(n){if(e.onerror)return e.onerror(n.toString())}))}send(e){return this.socket.send(e.as_raw())}close(){if(console.log("Close connection to "+this.uri),this.socket&&this.socket.close(),this.onclose())return this.onclose()}},(i=this).Antunnel||(i.Antunnel={tunnel:void 0,init:function(n){return new Promise((function(t,s){return i.Antunnel.tunnel?t(i.Antunnel.tunnel):(i.Antunnel.tunnel=new e(n),i.Antunnel.tunnel.onclose=function(){return i.Antunnel.tunnel=void 0},i.Antunnel.tunnel.ready().then((function(){return t(i.Antunnel.tunnel)})).catch((function(e){return s(e)})))}))},Subscriber:s,Msg:t}),n=class extends OS.application.BaseService{constructor(e){super("AntunnelService",e),this.text=__("Tunnel"),this.iconclass="fa fa-close",this.is_connect=!1,this.nodes=[{text:__("Connect"),id:1},{text:__("Disconnect"),id:2},{text:__("Enter uri"),id:3},{text:__("Exit"),id:4}],this.onchildselect=e=>this.action(e)}init(){return this.systemsetting.system.tunnel_uri&&this.start(),this.watch(1500,()=>{var e;if(e=!1,void 0!==Antunnel.tunnel&&(e=!0),e!==this.is_connect)return this.is_connect=e,this.iconclass="fa fa-circle",this.is_connect||(this.iconclass="fa fa-close"),this.update()}),OS.onexit("cleanupAntunnel",()=>(Antunnel.tunnel&&Antunnel.tunnel.close(),this.quit()))}action(e){var n;switch(n=()=>this._gui.openDialog("PromptDialog",{title:__("Tunnel uri"),label:__("Please enter tunnel uri"),value:"wss://localhost/tunnel"}).then(e=>{if(e&&""!==e)return this.systemsetting.system.tunnel_uri=e,this.start()}),e.data.item.data.id){case 1:if(this.is_connect)return;return this.systemsetting.system.tunnel_uri?this.start():n();case 2:if(Antunnel.tunnel)return Antunnel.tunnel.close();break;case 3:return Antunnel.tunnel&&Antunnel.tunnel.close(),n();case 4:return Antunnel.tunnel&&Antunnel.tunnel.close(),this.quit()}}start(){if(this.systemsetting.system.tunnel_uri&&!Antunnel.tunnel)return Antunnel.init(this.systemsetting.system.tunnel_uri).then(e=>this.notify(__("Tunnel now connected to the server at: {0}",this.systemsetting.system.tunnel_uri))).catch(e=>(Antunnel.tunnel&&Antunnel.tunnel.close(),this.error(__("Unable to connect to the tunnel: {0}",e.toString()),e)))}awake(){}},this.OS.register("AntunnelService",n)}).call(this); \ No newline at end of file +(function(){var e,n,t,s,i;(t=class e{constructor(){this.header={sid:0,cid:0,type:0,size:0},this.data=void 0}as_raw(){var n,t,s;return s=11+this.header.size,(n=new Uint8Array(s)).set(e.MAGIC_START,0),n[2]=this.header.type,t=e.bytes_of(this.header.cid),n.set(t,3),t=e.bytes_of(this.header.sid),n.set(t,5),t=e.bytes_of(this.header.size),n.set(t,7),this.data&&n.set(this.data,9),n.set(e.MAGIC_END,this.header.size+9),n.buffer}}).decode=function(e){return new Promise((function(n,s){var i;return i=new t,t.int_from(t.MAGIC_START,0)!==t.int_from(e,0)?s("Unmatch message begin magic number"):(i.header.type=e[2],i.header.cid=t.int_from(e,3),i.header.sid=t.int_from(e,5),i.header.size=t.int_from(e,7),i.data=e.slice(9,9+i.header.size),t.int_from(t.MAGIC_END,0)!==t.int_from(e,9+i.header.size)?s("Unmatch message end magic number"):n(i))}))},t.bytes_of=function(e){var n;return(n=new Uint8Array(2))[0]=255&e,e>>=8,n[1]=255&e,n},t.int_from=function(e,n){return e[n]|e[n+1]<<8},t.OK=0,t.ERROR=1,t.DATA=6,t.CLOSE=5,t.SUBSCRIBE=2,t.UNSUBSCRIBE=3,t.CTRL=7,t.MAGIC_END=[68,84],t.MAGIC_START=[78,65],s=class{constructor(e){this.channel=e,this.id=void 0,this.channel_id=void 0,this.onmessage=void 0,this.onerror=void 0,this.onopen=void 0,this.onclose=void 0,this.tunnel=void 0,this.is_opened=!1}send(e,n){if(this.tunnel){if(this.is_opened)return this.tunnel.send(this.genmsg(e,n));this.onerror&&this.onerror("Channel is not opened yet")}else this.onerror&&this.onerror("Tunnel is not opened")}genmsg(e,n){var s;return(s=new t).header.sid=this.id,s.header.cid=this.channel_id,s.header.type=e,s.header.size=n?n.length:0,s.data=n,s}close(e){if(this.is_opened=!1,this.tunnel)return this.tunnel.unsubscribe(this,e)}},e=class{constructor(e){this.uri=e,this.socket=void 0,this.pending={},this.subscribers={},this.onclose=void 0}ready(){return new Promise((e,n)=>this.uri?void 0!==this.socket?e():(console.log("Connect to "+this.uri),this.socket=new WebSocket(this.uri),this.socket.binaryType="arraybuffer",this.socket.onmessage=e=>this.process(e),this.socket.onclose=e=>{var n,t,s,i;for(n in this.socket=void 0,t=this.pending)(i=t[n]).tunnel=void 0,i.onclose&&i.onclose();for(n in s=this.subscribers)(i=s[n]).tunnel=void 0,i.is_opened=!1,i.onclose&&i.onclose();if(this.pending={},this.subscribe={},this.onclose())return this.onclose()},this.socket.onerror=e=>{var n,t,s,i,r;for(n in t=this.pending)(r=t[n]).onerror&&r.onerror(e.toString());for(n in i=[],s=this.subscribers)(r=s[n]).onerror&&i.push(r.onerror(e.toString()));return i},this.socket.onopen=n=>e()):n())}process(e){return t.decode(new Uint8Array(e.data)).then(e=>{var n,s;switch(n=(e,n)=>{var t;if(!(t=this.pending[e.header.sid]))return(t=this.subscribers[e.header.sid])&&t[n]?t[n](e):void 0;t[n]&&t[n](e)},e.header.type){case t.OK:if(!(s=this.pending[e.header.sid]))return n(e,"onmessage");if(delete this.pending[e.header.sid],s.id=t.int_from(e.data,0),s.channel_id=e.header.cid,this.subscribers[s.id]=s,s.is_opened=!0,s.onopen)return s.onopen();break;case t.DATA:return n(e,"onmessage");case t.ERROR:return n(e,"onerror");case t.UNSUBSCRIBE:if(!(s=this.subscribers[e.header.sid]))return;return s.close(!0);default:return console.error(`Message of type ${e.header.type} is unsupported`,e)}}).catch(e=>{var n,t,s,i;for(n in t=this.pending)(i=t[n]).onerror&&i.onerror(e);for(n in s=this.subscribers)(i=s[n]).onerror&&i.onerror(e);return console.log(e)})}subscribe(e){return this.ready().then(()=>{for(e.tunnel=this,e.id=Math.floor(1e3*Math.random())+1;this.subscribers[e.id]||this.pending[e.id];)e.id=Math.floor(1e3*Math.random())+1;return this.pending[e.id]=e,this.send(e.genmsg(t.SUBSCRIBE,(new TextEncoder).encode(e.channel)))}).catch((function(n){if(e.onerror)return e.onerror(n.toString())}))}unsubscribe(e,n){return this.ready().then(()=>{if(this.subscribers[e.id])return n||this.send(e.genmsg(t.UNSUBSCRIBE,void 0)),e.onclose&&e.onclose(),delete this.subscribers[e.id],e.tunnel=void 0,e.is_opened=!1}).catch((function(n){if(e.onerror)return e.onerror(n.toString())}))}send(e){return this.socket.send(e.as_raw())}close(){if(console.log("Close connection to "+this.uri),this.socket&&this.socket.close(),this.onclose())return this.onclose()}},(i=this).Antunnel||(i.Antunnel={tunnel:void 0,init:function(n){return new Promise((function(t,s){return i.Antunnel.tunnel?t(i.Antunnel.tunnel):(i.Antunnel.tunnel=new e(n),i.Antunnel.tunnel.onclose=function(){return i.Antunnel.tunnel=void 0},i.Antunnel.tunnel.ready().then((function(){return t(i.Antunnel.tunnel)})).catch((function(e){return s(e)})))}))},Subscriber:s,Msg:t}),n=class extends OS.application.BaseService{constructor(e){super("AntunnelService",e),this.text=__("Tunnel"),this.iconclass="fa fa-close",this.is_connect=!1,this.nodes=[{text:__("Connect"),id:1},{text:__("Disconnect"),id:2},{text:__("Enter uri"),id:3},{text:__("Exit"),id:4}],this.onchildselect=e=>this.action(e)}init(){return this.watch(1500,()=>{var e;if(e=!1,void 0!==Antunnel.tunnel&&(e=!0),e!==this.is_connect)return this.is_connect=e,this.iconclass="fa fa-circle",this.is_connect||(this.iconclass="fa fa-close"),this.update()}),OS.onexit("cleanupAntunnel",()=>(Antunnel.tunnel&&Antunnel.tunnel.close(),this.quit()))}action(e){var n;switch(n=()=>this._gui.openDialog("PromptDialog",{title:__("Tunnel uri"),label:__("Please enter tunnel uri"),value:"wss://localhost/tunnel"}).then(e=>{if(e&&""!==e)return this.systemsetting.system.tunnel_uri=e,this.start()}),e.data.item.data.id){case 1:if(this.is_connect)return;return this.systemsetting.system.tunnel_uri?this.start():n();case 2:if(Antunnel.tunnel)return Antunnel.tunnel.close();break;case 3:return Antunnel.tunnel&&Antunnel.tunnel.close(),n();case 4:return Antunnel.tunnel&&Antunnel.tunnel.close(),this.quit()}}start(){if(this.systemsetting.system.tunnel_uri&&!Antunnel.tunnel)return Antunnel.init(this.systemsetting.system.tunnel_uri).then(e=>this.notify(__("Tunnel now connected to the server at: {0}",this.systemsetting.system.tunnel_uri))).catch(e=>(Antunnel.tunnel&&Antunnel.tunnel.close(),this.error(__("Unable to connect to the tunnel: {0}",e.toString()),e)))}awake(){}},this.OS.register("AntunnelService",n)}).call(this); \ No newline at end of file diff --git a/Antunnel/build/debug/package.json b/Antunnel/build/debug/package.json index fbcb76c..31a72c3 100644 --- a/Antunnel/build/debug/package.json +++ b/Antunnel/build/debug/package.json @@ -9,7 +9,7 @@ "author": "Xuan Sang LE", "email": "xsang.le@lxsang.me" }, - "version":"0.1.4-a", + "version":"0.1.5-a", "category":"Library", "iconclass":"fa fa-adn", "mimes":["none"], diff --git a/Antunnel/build/release/Antunnel.zip b/Antunnel/build/release/Antunnel.zip index 4367c9a..b6b5e36 100644 Binary files a/Antunnel/build/release/Antunnel.zip and b/Antunnel/build/release/Antunnel.zip differ diff --git a/Antunnel/coffees/AntunnelService.coffee b/Antunnel/coffees/AntunnelService.coffee index d826782..f60c287 100644 --- a/Antunnel/coffees/AntunnelService.coffee +++ b/Antunnel/coffees/AntunnelService.coffee @@ -13,7 +13,7 @@ class AntunnelService extends OS.application.BaseService @onchildselect = (e) => @action e init: () -> - @start() if @systemsetting.system.tunnel_uri + # @start() if @systemsetting.system.tunnel_uri @watch 1500, () => new_status = false new_status = true if Antunnel.tunnel isnt undefined diff --git a/Antunnel/package.json b/Antunnel/package.json index fbcb76c..31a72c3 100644 --- a/Antunnel/package.json +++ b/Antunnel/package.json @@ -9,7 +9,7 @@ "author": "Xuan Sang LE", "email": "xsang.le@lxsang.me" }, - "version":"0.1.4-a", + "version":"0.1.5-a", "category":"Library", "iconclass":"fa fa-adn", "mimes":["none"], diff --git a/Antunnel/project.json b/Antunnel/project.json index 7e14eb4..84cfb1f 100644 --- a/Antunnel/project.json +++ b/Antunnel/project.json @@ -1,6 +1,5 @@ { "name": "Antunnel", - "root": "home://workspace/antosdk-apps/Antunnel", "css": [], "javascripts": [], "coffees": ["coffees/Antunnel.coffee", "coffees/AntunnelService.coffee"], diff --git a/Archive/project.json b/Archive/project.json index 6264e0e..5f993fd 100644 --- a/Archive/project.json +++ b/Archive/project.json @@ -1,6 +1,5 @@ { "name": "Archive", - "root": "home://workspace/antosdk-apps/Archive", "css": ["css/main.css"], "javascripts": [], "coffees": ["coffees/main.coffee"], diff --git a/Blogger/project.json b/Blogger/project.json index 5033dd5..e2c2d72 100644 --- a/Blogger/project.json +++ b/Blogger/project.json @@ -1,6 +1,5 @@ { "name": "Blogger", - "root": "home://workspace/antosdk-apps/Blogger", "css": ["main.css"], "javascripts": [], "coffees": ["main.coffee", "dialogs.coffee", "tags.coffee"], diff --git a/Booklet/project.json b/Booklet/project.json index efb6356..58ba04f 100644 --- a/Booklet/project.json +++ b/Booklet/project.json @@ -1,6 +1,5 @@ { "name": "Booklet", - "root": "home://workspace/antosdk-apps/Booklet", "css": ["css/main.css"], "javascripts": [], "coffees": ["coffees/main.coffee", "coffees/common.coffee"], diff --git a/Clipper/project.json b/Clipper/project.json index 743627a..a7300aa 100644 --- a/Clipper/project.json +++ b/Clipper/project.json @@ -1,6 +1,5 @@ { "name": "Clipper", - "root": "home://workspace/antosdk-apps/Clipper", "css": ["css/main.css"], "javascripts": ["javascripts/html2canvas.js"], "coffees": ["coffees/main.coffee"], diff --git a/DBDecoder/project.json b/DBDecoder/project.json index 573ce1a..a0454bc 100644 --- a/DBDecoder/project.json +++ b/DBDecoder/project.json @@ -1,6 +1,5 @@ { "name": "DBDecoder", - "root": "home://workspace/antosdk-apps/DBDecoder", "css": [], "javascripts": [], "coffees": ["coffees/main.coffee"], diff --git a/DiffEditor/README.md b/DiffEditor/README.md new file mode 100644 index 0000000..905d638 --- /dev/null +++ b/DiffEditor/README.md @@ -0,0 +1,2 @@ +# DiffEditor +View and edit files in diff mode diff --git a/DiffEditor/assets/scheme.html b/DiffEditor/assets/scheme.html new file mode 100644 index 0000000..473e982 --- /dev/null +++ b/DiffEditor/assets/scheme.html @@ -0,0 +1,19 @@ + + + + + + + + + + +
+
+
+ +
+ +
+
+
\ No newline at end of file diff --git a/DiffEditor/build/debug/README.md b/DiffEditor/build/debug/README.md new file mode 100644 index 0000000..905d638 --- /dev/null +++ b/DiffEditor/build/debug/README.md @@ -0,0 +1,2 @@ +# DiffEditor +View and edit files in diff mode diff --git a/DiffEditor/build/debug/main.css b/DiffEditor/build/debug/main.css new file mode 100644 index 0000000..a06d9cd --- /dev/null +++ b/DiffEditor/build/debug/main.css @@ -0,0 +1,13 @@ + +afx-app-window[data-id="DiffEditor"] afx-hbox[data-id="status-bar"] { + background-color: #007ACC; +} +afx-app-window[data-id="DiffEditor"] .status-text { + color: white; + text-align: right; + padding-right: 10px; +} +afx-app-window[data-id="DiffEditor"] afx-label.file-label { + background-color: #333333; + color: white; +} \ No newline at end of file diff --git a/DiffEditor/build/debug/main.js b/DiffEditor/build/debug/main.js new file mode 100644 index 0000000..3bc67d0 --- /dev/null +++ b/DiffEditor/build/debug/main.js @@ -0,0 +1,275 @@ +(function() { + var DiffEditor; + + DiffEditor = class DiffEditor extends this.OS.application.BaseApplication { + constructor(args) { + super("DiffEditor", args); + } + + main() { + var j, len, list, opts, ref, v; + this.editor_cnt = this.find("diffeditor"); + this.fileview = this.find("fileview"); + this.fileview.fetch = (path) => { + return new Promise((resolve, reject) => { + return path.asFileHandle().read().then((d) => { + if (d.error) { + return reject(d.error); + } + return resolve(d.result); + }).catch((e) => { + return reject(__e(e)); + }); + }); + }; + this.fileview.onfileopen = (e) => { + if (!(e.data && e.data.path)) { + return; + } + if (e.data.type === "dir") { + return; + } + return this.openFile(e.data.path.asFileHandle()); + }; + this.currdir = void 0; + ace.config.set('basePath', "scripts/ace"); + ace.require("ace/ext/language_tools"); + this.modelist = ace.require("ace/ext/modelist"); + list = []; + ref = this.modelist.modes; + for (j = 0, len = ref.length; j < len; j++) { + v = ref[j]; + list.push({ + text: v.caption, + mode: v.mode + }); + } + this.langlist = this.find("langmode"); + this.langlist.data = list; + this.langlist.onlistselect = (e) => { + this.editors.left.getSession().setMode(e.data.item.data.mode); + return this.editors.right.getSession().setMode(e.data.item.data.mode); + }; + this.differ = new AceDiff({ + // ace: window.ace, + element: this.editor_cnt, + theme: "ace/theme/monokai", + left: { + content: '' + }, + right: { + content: '' + } + }); + this.editors = this.differ.getEditors(); + opts = { + enableBasicAutocompletion: true, + enableSnippets: true, + enableLiveAutocompletion: true, + highlightActiveLine: true, + highlightSelectedWord: true, + behavioursEnabled: true, + //wrap: true, + fontSize: "10pt", + showInvisibles: true + }; + this.editors.left.setOptions(opts); + this.editors.right.setOptions(opts); + this.editors.left.current_file = void 0; + this.editors.right.current_file = void 0; + this.editors.left.afx_label = this.find("left-file"); + this.editors.right.afx_label = this.find("right-file"); + this.editors.left.mux = false; + this.editors.right.mux = false; + this.on("resize", () => { + this.editors = this.differ.getEditors(); + this.editors.left.resize(); + return this.editors.right.resize(); + }); + $('.acediff__left .ace_scrollbar-v', this.editor_cnt).scroll(() => { + return this.editors.right.session.setScrollTop(this.editors.left.session.getScrollTop()); + }); + $('.acediff__right .ace_scrollbar-v', this.editor_cnt).scroll(() => { + return this.editors.left.session.setScrollTop(this.editors.right.session.getScrollTop()); + }); + this.editors.left.on("focus", (e) => { + return this.current_editor = this.editors.left; + }); + this.editors.right.on("focus", (e) => { + return this.current_editor = this.editors.right; + }); + this.editors.left.on("input", (e) => { + if (this.editors.left.mux) { + return this.editors.left.mux = false; + } + if (!this.editors.left.current_file) { + return this.editors.left.afx_label.text = __("Temporary file"); + } + if (this.editors.left.current_file.dirty) { + return; + } + this.editors.left.current_file.dirty = true; + return this.editors.left.afx_label.text += "*"; + }); + this.editors.right.on("input", (e) => { + if (this.editors.right.mux) { + return this.editors.right.mux = false; + } + if (!this.editors.right.current_file) { + return this.editors.right.afx_label.text = __("Temporary file"); + } + if (this.editors.right.current_file.dirty) { + return; + } + this.editors.right.current_file.dirty = true; + return this.editors.right.afx_label.text += "*"; + }); + this.current_editor = this.editors.left; + this.current_editor.focus(); + this.bindKey("ALT-O", () => { + return this.menuAction("open"); + }); + this.bindKey("ALT-F", () => { + return this.menuAction("opendir"); + }); + this.bindKey("CTRL-S", () => { + return this.menuAction("save"); + }); + return this.toggleSideBar(); + } + + toggleSideBar() { + if (this.currdir) { + $(this.fileview).show(); + this.fileview.path = this.currdir.path; + } else { + $(this.fileview).hide(); + } + return this.trigger("resize"); + } + + menu() { + return [ + { + text: __("File"), + nodes: [ + { + text: __("Open"), + dataid: "open", + shortcut: "A-O" + }, + { + text: __("Open Folder"), + dataid: "opendir", + shortcut: "A-F" + }, + { + text: __("Save"), + dataid: "save", + shortcut: "C-S" + } + ], + onchildselect: (e) => { + return this.menuAction(e.data.item.data.dataid); + } + } + ]; + } + + openFile(file) { + this.current_editor.mux = true; + return file.read().then((d) => { + var i, item, j, len, m, ref, v; + file.cache = d; + this.current_editor.current_file = file; + this.current_editor.afx_label.text = file.path; + this.current_editor.setValue(d, -1); + // select current mode + m = this.modelist.getModeForPath(file.path); + ref = this.langlist.data; + for (i = j = 0, len = ref.length; j < len; i = ++j) { + v = ref[i]; + if (v.mode === m.mode) { + item = i; + } + } + if (item === void 0) { + return; + } + return this.langlist.selected = item; + }); + } + + menuAction(dataid) { + var fn; + switch (dataid) { + case "open": + return this.openDialog("FileDialog", { + title: __("Open file"), + mimes: ["text/.*", "application/json", "application/javascript"] + }).then((f) => { + return this.openFile(f.file.path.asFileHandle()); + }); + case "opendir": + return this.openDialog("FileDialog", { + title: __("Open folder"), + mimes: ["dir"] + }).then((f) => { + this.currdir = f.file.path.asFileHandle(); + return this.toggleSideBar(); + }); + case "save": + fn = (ed) => { + if (!(ed.current_file && ed.current_file.dirty)) { + return; + } + ed.current_file.cache = ed.getValue(); + return ed.current_file.write("text/plain").then((r) => { + ed.current_file.dirty = false; + ed.afx_label.text = ed.current_file.path; + return this.notify(__("File {0} saved", ed.current_file.path)); + }).catch((e) => { + return this.error(__("Unable to save to: {0}", ed.current_file.path), e); + }); + }; + fn(this.editors.left); + return fn(this.editors.right); + default: + return console.log(dataid); + } + } + + cleanup(evt) { + var dirty; + dirty = false; + if (this.editors.left.current_file && this.editors.left.current_file.dirty) { + dirty = true; + } + if (this.editors.right.current_file && this.editors.right.current_file.dirty) { + dirty = true; + } + if (dirty) { + evt.preventDefault(); + return this.ask({ + title: __("Unsaved changes"), + text: __("Ignore modification ?") + }).then((d) => { + if (!d) { + return; + } + this.editors.left.current_file.dirty = false; + this.editors.right.current_file.dirty = false; + return this.quit(); + }); + } else { + return this.differ.destroy(); + } + } + + }; + + DiffEditor.dependencies = ["os://scripts/ace/ace.js", "pkg://AceDiff/main.js", "pkg://AceDiff/main.css"]; + + this.OS.register("DiffEditor", DiffEditor); + +}).call(this); diff --git a/DiffEditor/build/debug/package.json b/DiffEditor/build/debug/package.json new file mode 100644 index 0000000..c9f3f0b --- /dev/null +++ b/DiffEditor/build/debug/package.json @@ -0,0 +1,16 @@ +{ + "pkgname": "DiffEditor", + "app":"DiffEditor", + "name":"Diff Editor", + "description":"Diff Editor", + "info":{ + "author": "", + "edsdmail": "" + }, + "version":"0.0.1-a", + "category":"Other", + "iconclass":"fa fa-adn", + "mimes":["none"], + "dependencies":["AceDiff@3.0.3-r"], + "locale": {} +} \ No newline at end of file diff --git a/DiffEditor/build/debug/scheme.html b/DiffEditor/build/debug/scheme.html new file mode 100644 index 0000000..473e982 --- /dev/null +++ b/DiffEditor/build/debug/scheme.html @@ -0,0 +1,19 @@ + + + + + + + + + + +
+
+
+ +
+ +
+
+
\ No newline at end of file diff --git a/DiffEditor/build/release/DiffEditor.zip b/DiffEditor/build/release/DiffEditor.zip new file mode 100644 index 0000000..28a84ae Binary files /dev/null and b/DiffEditor/build/release/DiffEditor.zip differ diff --git a/DiffEditor/coffees/main.coffee b/DiffEditor/coffees/main.coffee new file mode 100644 index 0000000..5209af6 --- /dev/null +++ b/DiffEditor/coffees/main.coffee @@ -0,0 +1,204 @@ +class DiffEditor extends @OS.application.BaseApplication + constructor: ( args ) -> + super "DiffEditor", args + + main: () -> + @editor_cnt = @find "diffeditor" + @fileview = @find "fileview" + + @fileview.fetch = (path) => + return new Promise (resolve, reject) => + path.asFileHandle().read() + .then (d) => + return reject(d.error) if d.error + return resolve(d.result) + .catch (e) => + return reject(__e(e)) + @fileview.onfileopen = (e) => + return unless e.data and e.data.path + return if e.data.type is "dir" + return @openFile e.data.path.asFileHandle() + + @currdir = undefined + ace.config.set('basePath', "scripts/ace") + ace.require("ace/ext/language_tools") + @modelist = ace.require("ace/ext/modelist") + list = [] + for v in @modelist.modes + list.push { + text: v.caption, + mode: v.mode + } + @langlist = @find("langmode") + @langlist.data = list + @langlist.onlistselect = (e) => + @editors.left.getSession().setMode e.data.item.data.mode + @editors.right.getSession().setMode e.data.item.data.mode + + @differ = new AceDiff({ + # ace: window.ace, + element: @editor_cnt, + theme: "ace/theme/monokai", + left: { + content: '', + }, + right: { + content: '', + } + }) + @editors = @differ.getEditors() + opts = { + enableBasicAutocompletion: true, + enableSnippets: true, + enableLiveAutocompletion: true, + highlightActiveLine: true, + highlightSelectedWord: true, + behavioursEnabled: true, + #wrap: true, + fontSize: "10pt", + showInvisibles: true, + } + + @editors.left.setOptions(opts) + @editors.right.setOptions(opts) + @editors.left.current_file = undefined + @editors.right.current_file = undefined + @editors.left.afx_label = @find("left-file") + @editors.right.afx_label = @find("right-file") + @editors.left.mux = false + @editors.right.mux = false + + @on "resize", () => + @editors = @differ.getEditors() + @editors.left.resize() + @editors.right.resize() + + $('.acediff__left .ace_scrollbar-v',@editor_cnt).scroll(() => + @editors.right.session.setScrollTop(@editors.left.session.getScrollTop())) + $('.acediff__right .ace_scrollbar-v', @editor_cnt).scroll(() => + @editors.left.session.setScrollTop(@editors.right.session.getScrollTop())) + + @editors.left.on "focus", (e) => + @current_editor = @editors.left + @editors.right.on "focus", (e) => + @current_editor = @editors.right + + @editors.left.on "input", (e) => + return @editors.left.mux = false if @editors.left.mux + return @editors.left.afx_label.text = __("Temporary file") unless @editors.left.current_file + return if @editors.left.current_file.dirty + @editors.left.current_file.dirty = true + @editors.left.afx_label.text += "*" + + @editors.right.on "input", (e) => + return @editors.right.mux = false if @editors.right.mux + return @editors.right.afx_label.text = __("Temporary file") unless @editors.right.current_file + return if @editors.right.current_file.dirty + @editors.right.current_file.dirty = true + @editors.right.afx_label.text += "*" + + @current_editor = @editors.left + @current_editor.focus() + + @bindKey "ALT-O", () => @menuAction("open") + @bindKey "ALT-F", () => @menuAction("opendir") + @bindKey "CTRL-S", () => @menuAction("save") + @toggleSideBar() + + toggleSideBar: () -> + if @currdir + $(@fileview).show() + @fileview.path = @currdir.path + else + $(@fileview).hide() + + @trigger("resize") + + menu: () -> + return [ + { + text: __("File"), + nodes: [ + { text: __("Open"), dataid: "open", shortcut: "A-O" }, + { + text: __("Open Folder"), + dataid: "opendir", + shortcut: "A-F", + }, + { text: __("Save"), dataid: "save", shortcut: "C-S" } + ], + onchildselect: (e) => + @menuAction(e.data.item.data.dataid) + } + ] + + openFile: (file) -> + @current_editor.mux = true + file.read() + .then (d) => + file.cache = d + @current_editor.current_file = file + @current_editor.afx_label.text = file.path + @current_editor.setValue d, -1 + # select current mode + m = @modelist.getModeForPath(file.path) + item = i for v,i in @langlist.data when v.mode is m.mode + return unless item isnt undefined + @langlist.selected = item + + menuAction:(dataid) -> + switch dataid + when "open" + @openDialog "FileDialog", { + title: __("Open file"), + mimes: ["text/.*", "application/json", "application/javascript"], + } + .then (f) => + @openFile(f.file.path.asFileHandle()) + + when "opendir" + @openDialog("FileDialog", { + title: __("Open folder"), + mimes: ["dir"], + }) + .then (f) => + @currdir = f.file.path.asFileHandle() + @toggleSideBar() + + when "save" + fn = (ed) => + return unless ed.current_file and ed.current_file.dirty + ed.current_file.cache = ed.getValue() + ed.current_file.write("text/plain") + .then (r) => + ed.current_file.dirty = false + ed.afx_label.text = ed.current_file.path + @notify __("File {0} saved", ed.current_file.path) + .catch (e) => + @error __("Unable to save to: {0}", ed.current_file.path), e + fn @editors.left + fn @editors.right + else + return console.log(dataid) + + cleanup: (evt) -> + dirty = false + dirty = true if @editors.left.current_file and @editors.left.current_file.dirty + dirty = true if @editors.right.current_file and @editors.right.current_file.dirty + if dirty + evt.preventDefault() + @ask { title: __("Unsaved changes"), text: __("Ignore modification ?")} + .then (d) => + return unless d + @editors.left.current_file.dirty = false + @editors.right.current_file.dirty = false + @quit() + else + @differ.destroy() + +DiffEditor.dependencies = [ + "os://scripts/ace/ace.js", + "pkg://AceDiff/main.js", + "pkg://AceDiff/main.css" +] +@OS.register "DiffEditor", DiffEditor \ No newline at end of file diff --git a/DiffEditor/css/main.css b/DiffEditor/css/main.css new file mode 100644 index 0000000..602ae9b --- /dev/null +++ b/DiffEditor/css/main.css @@ -0,0 +1,12 @@ +afx-app-window[data-id="DiffEditor"] afx-hbox[data-id="status-bar"] { + background-color: #007ACC; +} +afx-app-window[data-id="DiffEditor"] .status-text { + color: white; + text-align: right; + padding-right: 10px; +} +afx-app-window[data-id="DiffEditor"] afx-label.file-label { + background-color: #333333; + color: white; +} \ No newline at end of file diff --git a/DiffEditor/package.json b/DiffEditor/package.json new file mode 100644 index 0000000..c9f3f0b --- /dev/null +++ b/DiffEditor/package.json @@ -0,0 +1,16 @@ +{ + "pkgname": "DiffEditor", + "app":"DiffEditor", + "name":"Diff Editor", + "description":"Diff Editor", + "info":{ + "author": "", + "edsdmail": "" + }, + "version":"0.0.1-a", + "category":"Other", + "iconclass":"fa fa-adn", + "mimes":["none"], + "dependencies":["AceDiff@3.0.3-r"], + "locale": {} +} \ No newline at end of file diff --git a/DiffEditor/project.json b/DiffEditor/project.json new file mode 100644 index 0000000..03da2bb --- /dev/null +++ b/DiffEditor/project.json @@ -0,0 +1,7 @@ +{ + "name": "DiffEditor", + "css": ["css/main.css"], + "javascripts": [], + "coffees": ["coffees/main.coffee"], + "copies": ["assets/scheme.html", "package.json", "README.md"] +} \ No newline at end of file diff --git a/Docify/project.json b/Docify/project.json index 3aa0f1e..ec2e84e 100644 --- a/Docify/project.json +++ b/Docify/project.json @@ -1,6 +1,5 @@ { "name": "Docify", - "root": "home://workspace/antosdk-apps/Docify", "css": ["css/main.css"], "javascripts": [], "coffees": ["coffees/dialogs.coffee", "coffees/main.coffee"], diff --git a/GraphEditor/project.json b/GraphEditor/project.json index 7a79238..448bd5a 100644 --- a/GraphEditor/project.json +++ b/GraphEditor/project.json @@ -1,6 +1,5 @@ { "name": "GraphEditor", - "root": "home://workspace/antosdk-apps/GraphEditor", "css": ["css/main.css"], "javascripts": ["javascripts/svg-pan-zoom.js", "javascripts/mermaid.min.js"], "coffees": ["coffees/main.coffee"], diff --git a/JarvisControl/project.json b/JarvisControl/project.json index bf67bea..1965934 100644 --- a/JarvisControl/project.json +++ b/JarvisControl/project.json @@ -1,6 +1,5 @@ { "name": "JarvisControl", - "root": "home://workspace/antosdk-apps/JarvisControl", "css": ["css/epoch.css"], "javascripts": ["javascripts/d3.v3.js", "javascripts/epoch.js"], "coffees": ["coffees/JarvisService.coffee", "coffees/main.coffee"], diff --git a/Katex/project.json b/Katex/project.json index 63077fd..c59e2dd 100644 --- a/Katex/project.json +++ b/Katex/project.json @@ -1,6 +1,5 @@ { "name": "Katex", - "root": "home://workspace/antosdk-apps/Katex", "css": ["katex.css"], "javascripts": ["katex.js", "auto-render.js"], "coffees": [], diff --git a/LuaPlayground/project.json b/LuaPlayground/project.json index abaccc8..7678132 100644 --- a/LuaPlayground/project.json +++ b/LuaPlayground/project.json @@ -1,6 +1,5 @@ { "name": "LuaPlayground", - "root": "home://workspace/antosdk-apps/LuaPlayground", "css": ["css/main.css"], "javascripts": ["javascripts/paper-core.min.js"], "coffees": ["coffees/main.coffee"], diff --git a/MarkOn/project.json b/MarkOn/project.json index 5f12efc..407a19f 100644 --- a/MarkOn/project.json +++ b/MarkOn/project.json @@ -1,6 +1,5 @@ { "name": "MarkOn", - "root": "home://workspace/antosdk-apps/MarkOn", "css": ["main.css"], "javascripts": [], "coffees": ["main.coffee"], diff --git a/OpenPage/project.json b/OpenPage/project.json index ffd90a5..7efffbc 100644 --- a/OpenPage/project.json +++ b/OpenPage/project.json @@ -1,6 +1,5 @@ { "name": "OpenPage", - "root": "home://workspace/antosdk-apps/OpenPage", "css": ["css/main.css", "css/dialog.css"], "javascripts": ["javascripts/webodf.js", "javascripts/EditorSession.js"], "coffees": ["coffees/main.coffee", "coffees/dialogs.coffee"], diff --git a/Preview/project.json b/Preview/project.json index 9e9bbf4..a4adff7 100644 --- a/Preview/project.json +++ b/Preview/project.json @@ -1,6 +1,5 @@ { "name": "Preview", - "root": "home://workspace/antosdk-apps/Preview", "css": ["main.css"], "javascripts": ["pdf.js"], "coffees": ["main.coffee"], diff --git a/RemoteDesktop/project.json b/RemoteDesktop/project.json index 617a8b0..f6b658f 100644 --- a/RemoteDesktop/project.json +++ b/RemoteDesktop/project.json @@ -1,6 +1,5 @@ { "name": "RemoteDesktop", - "root": "home://workspace/antosdk-apps/RemoteDesktop", "css": ["assets/main.css"], "javascripts": ["javascripts/wvnc.js"], "coffees": ["coffees/main.coffee"], diff --git a/ShowCase/project.json b/ShowCase/project.json index 20ba9cc..1189147 100644 --- a/ShowCase/project.json +++ b/ShowCase/project.json @@ -1,6 +1,5 @@ { "name": "ShowCase", - "root": "home://workspace/antosdk-apps/ShowCase", "css": ["css/main.css"], "javascripts": [], "coffees": ["coffees/main.coffee"], diff --git a/SimpleMDE/project.json b/SimpleMDE/project.json index 1304991..2925ffb 100644 --- a/SimpleMDE/project.json +++ b/SimpleMDE/project.json @@ -1,6 +1,5 @@ { "name": "SimpleMDE", - "root": "home://workspace/antosdk-apps/SimpleMDE", "css": ["simplemde.min.css"], "javascripts": ["simplemde.min.js"], "coffees": [], diff --git a/TinyEditor/project.json b/TinyEditor/project.json index 63c3589..9b033ca 100644 --- a/TinyEditor/project.json +++ b/TinyEditor/project.json @@ -1,6 +1,5 @@ { "name": "TinyEditor", - "root": "home://workspace/antosdk-apps/TinyEditor", "css": ["css/main.css"], "javascripts": [], "coffees": ["coffees/main.coffee"], diff --git a/VizApp/project.json b/VizApp/project.json index bf8b7f6..751cd22 100644 --- a/VizApp/project.json +++ b/VizApp/project.json @@ -1,6 +1,5 @@ { "name": "VizApp", - "root": "home://workspace/antosdk-apps/VizApp", "css": ["css/main.css"], "javascripts": [ "javascripts/svg-pan-zoom.js", diff --git a/packages.json b/packages.json index b59cb80..bf9618d 100644 --- a/packages.json +++ b/packages.json @@ -9,6 +9,16 @@ "dependencies": [], "download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/About/build/release/About.zip" }, + { + "pkgname": "AceDiff", + "name": "AceDiff addon library", + "description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/AceDiff/README.md", + "category": "Library", + "author": "", + "version": "3.0.3-r", + "dependencies": [], + "download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/AceDiff/build/release/AceDiff.zip" + }, { "pkgname": "ActivityMonitor", "name": "Activity monitor", @@ -25,7 +35,7 @@ "description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/Antunnel/README.md", "category": "Library", "author": "Xuan Sang LE", - "version": "0.1.4-a", + "version": "0.1.5-a", "dependencies": [], "download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/Antunnel/build/release/Antunnel.zip" }, @@ -79,6 +89,16 @@ "dependencies": [], "download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/DBDecoder/build/release/DBDecoder.zip" }, + { + "pkgname": "DiffEditor", + "name": "Diff Editor", + "description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/DiffEditor/README.md", + "category": "Other", + "author": "", + "version": "0.0.1-a", + "dependencies": ["AceDiff@3.0.3-r"], + "download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/DiffEditor/build/release/DiffEditor.zip" + }, { "pkgname": "Docify", "name": "Docify", @@ -216,7 +236,7 @@ "category": "System", "author": "Xuan Sang LE", "version": "0.1.7-a", - "dependencies": ["Antunnel@0.1.4-a","xTerm@4.8.1-r"], + "dependencies": ["Antunnel@0.1.5-a","xTerm@4.8.1-r"], "download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/vTerm/build/release/vTerm.zip" }, { diff --git a/vTerm/build/debug/package.json b/vTerm/build/debug/package.json index 70370b0..bd039eb 100644 --- a/vTerm/build/debug/package.json +++ b/vTerm/build/debug/package.json @@ -11,7 +11,7 @@ "iconclass":"fa fa-terminal", "mimes":["none"], "dependencies": [ - "Antunnel@0.1.4-a", + "Antunnel@0.1.5-a", "xTerm@4.8.1-r" ], "locales":{ diff --git a/vTerm/build/release/vTerm.zip b/vTerm/build/release/vTerm.zip index 4037404..581be5f 100644 Binary files a/vTerm/build/release/vTerm.zip and b/vTerm/build/release/vTerm.zip differ diff --git a/vTerm/package.json b/vTerm/package.json index 70370b0..bd039eb 100644 --- a/vTerm/package.json +++ b/vTerm/package.json @@ -11,7 +11,7 @@ "iconclass":"fa fa-terminal", "mimes":["none"], "dependencies": [ - "Antunnel@0.1.4-a", + "Antunnel@0.1.5-a", "xTerm@4.8.1-r" ], "locales":{ diff --git a/vTerm/project.json b/vTerm/project.json index b835a03..ac8b5a9 100644 --- a/vTerm/project.json +++ b/vTerm/project.json @@ -1,6 +1,5 @@ { "name": "vTerm", - "root": "home://workspace/antosdk-apps/vTerm", "css": [ "main.css"], "javascripts": [], "coffees": ["main.coffee"], diff --git a/wTerm/project.json b/wTerm/project.json index 347e505..39c6246 100644 --- a/wTerm/project.json +++ b/wTerm/project.json @@ -1,6 +1,5 @@ { "name": "wTerm", - "root": "home://workspace/antosdk-apps/wTerm", "css": ["main.css"], "javascripts": [], "coffees": ["main.coffee"], diff --git a/xTerm/project.json b/xTerm/project.json index 5f8b1b9..3a31efe 100644 --- a/xTerm/project.json +++ b/xTerm/project.json @@ -1,6 +1,5 @@ { "name": "xTerm", - "root": "home://workspace/antosdk-apps/xTerm", "css": ["xterm.css"], "javascripts": ["xterm-addon-fit.js", "xterm.js"], "coffees": [],