[habpanel] Update dependencies, 5-col selection widget fix (#106) (#116)

Also-by: Alari Truuts <Alariii@gmail.com>
Signed-off-by: Yannick Schaus <github@schaus.net>
pull/124/head
Yannick Schaus 2019-09-05 17:58:50 +02:00 committed by Kai Kreuzer
parent ac54f10ea6
commit 45614b2a27
18 changed files with 8557 additions and 47 deletions

View File

@ -0,0 +1 @@
bower_components

View File

@ -49,3 +49,40 @@
bottom: 0;
}
}
// Add 5th column for grid
.col-xs-5ths,
.col-sm-5ths,
.col-md-5ths,
.col-lg-5ths {
position: relative;
min-height: 1px;
padding-right: 15px;
padding-left: 15px;
}
.col-xs-5ths {
width: 20%;
float: left;
}
@media (min-width: 768px) {
.col-sm-5ths {
width: 20%;
float: left;
}
}
@media (min-width: 992px) {
.col-md-5ths {
width: 20%;
float: left;
}
}
@media (min-width: 1200px) {
.col-lg-5ths {
width: 20%;
float: left;
}
}

View File

@ -121,7 +121,7 @@
vm.square = vm.columns > 1 && !widget.no_squares;
vm.gridClassMode = (vm.mobile_mode) ? 'sm' : 'xs';
vm.gridClass = 'col-' + vm.gridClassMode + '-' + (12 / vm.columns).toString();
vm.gridClass = 'col-' + vm.gridClassMode + '-' + (vm.columns == 5 ? '5ths' : (12 / vm.columns).toString());
vm.selectChoice = function (choice) {
OHService.sendCmd(widget.item, choice.cmd);

File diff suppressed because it is too large Load Diff

View File

@ -42,7 +42,7 @@
"gulp-main-bower-files": "1.5.3",
"gulp-plumber": "^1.1.0",
"gulp-rename": "^1.2.2",
"gulp-sass": "^2.3.2",
"gulp-sass": "^4.0.2",
"gulp-sass-glob": "^1.0.6",
"gulp-uglify": "^2.0.0",
"gulp-watch": "^4.3.10",

View File

@ -1 +1 @@
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:u[t]}function n(e){return function(t){return s(t,e)}}function r(e){var t=e.state.closeBrackets;if(!t||t.override)return t;var n=e.getModeAt(e.getCursor());return n.closeBrackets||t}function i(n){var i=r(n);if(!i||n.getOption("disableInput"))return e.Pass;for(var a=t(i,"pairs"),o=n.listSelections(),s=0;s<o.length;s++){if(!o[s].empty())return e.Pass;var c=l(n,o[s].head);if(!c||a.indexOf(c)%2!=0)return e.Pass}for(var s=o.length-1;s>=0;s--){var f=o[s].head;n.replaceRange("",d(f.line,f.ch-1),d(f.line,f.ch+1),"+delete")}}function a(n){var i=r(n),a=i&&t(i,"explode");if(!a||n.getOption("disableInput"))return e.Pass;for(var o=n.listSelections(),s=0;s<o.length;s++){if(!o[s].empty())return e.Pass;var c=l(n,o[s].head);if(!c||a.indexOf(c)%2!=0)return e.Pass}n.operation(function(){n.replaceSelection("\n\n",null),n.execCommand("goCharLeft"),o=n.listSelections();for(var e=0;e<o.length;e++){var t=o[e].head.line;n.indentLine(t,null,!0),n.indentLine(t+1,null,!0)}})}function o(t){var n=e.cmpPos(t.anchor,t.head)>0;return{anchor:new d(t.anchor.line,t.anchor.ch+(n?-1:1)),head:new d(t.head.line,t.head.ch+(n?1:-1))}}function s(n,i){var a=r(n);if(!a||n.getOption("disableInput"))return e.Pass;var s=t(a,"pairs"),l=s.indexOf(i);if(l==-1)return e.Pass;for(var u,g=t(a,"triples"),p=s.charAt(l+1)==i,v=n.listSelections(),m=l%2==0,b=0;b<v.length;b++){var x,C=v[b],k=C.head,P=n.getRange(k,d(k.line,k.ch+1));if(m&&!C.empty())x="surround";else if(!p&&m||P!=i)if(p&&k.ch>1&&g.indexOf(i)>=0&&n.getRange(d(k.line,k.ch-2),k)==i+i&&(k.ch<=2||n.getRange(d(k.line,k.ch-3),d(k.line,k.ch-2))!=i))x="addFour";else if(p){if(e.isWordChar(P)||!f(n,k,i))return e.Pass;x="both"}else{if(!m||n.getLine(k.line).length!=k.ch&&!c(P,s)&&!/\s/.test(P))return e.Pass;x="both"}else x=p&&h(n,k)?"both":g.indexOf(i)>=0&&n.getRange(k,d(k.line,k.ch+3))==i+i+i?"skipThree":"skip";if(u){if(u!=x)return e.Pass}else u=x}var S=l%2?s.charAt(l-1):i,y=l%2?i:s.charAt(l+1);n.operation(function(){if("skip"==u)n.execCommand("goCharRight");else if("skipThree"==u)for(var e=0;e<3;e++)n.execCommand("goCharRight");else if("surround"==u){for(var t=n.getSelections(),e=0;e<t.length;e++)t[e]=S+t[e]+y;n.replaceSelections(t,"around"),t=n.listSelections().slice();for(var e=0;e<t.length;e++)t[e]=o(t[e]);n.setSelections(t)}else"both"==u?(n.replaceSelection(S+y,null),n.triggerElectric(S+y),n.execCommand("goCharLeft")):"addFour"==u&&(n.replaceSelection(S+S+S+S,"before"),n.execCommand("goCharRight"))})}function c(e,t){var n=t.lastIndexOf(e);return n>-1&&n%2==1}function l(e,t){var n=e.getRange(d(t.line,t.ch-1),d(t.line,t.ch+1));return 2==n.length?n:null}function f(t,n,r){var i=t.getLine(n.line),a=t.getTokenAt(n);if(/\bstring2?\b/.test(a.type)||h(t,n))return!1;var o=new e.StringStream(i.slice(0,n.ch)+r+i.slice(n.ch),4);for(o.pos=o.start=a.start;;){var s=t.getMode().token(o,a.state);if(o.pos>=n.ch+1)return/\bstring2?\b/.test(s);o.start=o.pos}}function h(e,t){var n=e.getTokenAt(d(t.line,t.ch+1));return/\bstring/.test(n.type)&&n.start==t.ch}var u={pairs:"()[]{}''\"\"",triples:"",explode:"[]{}"},d=e.Pos;e.defineOption("autoCloseBrackets",!1,function(t,n,r){r&&r!=e.Init&&(t.removeKeyMap(p),t.state.closeBrackets=null),n&&(t.state.closeBrackets=n,t.addKeyMap(p))});for(var g=u.pairs+"`",p={Backspace:i,Enter:a},v=0;v<g.length;v++)p["'"+g.charAt(v)+"'"]=n(g.charAt(v))});
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function r(e,r){return"pairs"==r&&"string"==typeof e?e:"object"==typeof e&&null!=e[r]?e[r]:h[r]}function t(e){for(var r=0;r<e.length;r++){var t=e.charAt(r),i="'"+t+"'";d[i]||(d[i]=n(t))}}function n(e){return function(r){return l(r,e)}}function i(e){var r=e.state.closeBrackets;return!r||r.override?r:e.getModeAt(e.getCursor()).closeBrackets||r}function a(t){var n=i(t);if(!n||t.getOption("disableInput"))return e.Pass;for(var a=r(n,"pairs"),o=t.listSelections(),s=0;s<o.length;s++){if(!o[s].empty())return e.Pass;var l=c(t,o[s].head);if(!l||a.indexOf(l)%2!=0)return e.Pass}for(var s=o.length-1;s>=0;s--){var f=o[s].head;t.replaceRange("",u(f.line,f.ch-1),u(f.line,f.ch+1),"+delete")}}function o(t){var n=i(t),a=n&&r(n,"explode");if(!a||t.getOption("disableInput"))return e.Pass;for(var o=t.listSelections(),s=0;s<o.length;s++){if(!o[s].empty())return e.Pass;var l=c(t,o[s].head);if(!l||a.indexOf(l)%2!=0)return e.Pass}t.operation(function(){var e=t.lineSeparator()||"\n";t.replaceSelection(e+e,null),t.execCommand("goCharLeft"),o=t.listSelections();for(var r=0;r<o.length;r++){var n=o[r].head.line;t.indentLine(n,null,!0),t.indentLine(n+1,null,!0)}})}function s(r){var t=e.cmpPos(r.anchor,r.head)>0;return{anchor:new u(r.anchor.line,r.anchor.ch+(t?-1:1)),head:new u(r.head.line,r.head.ch+(t?1:-1))}}function l(t,n){var a=i(t);if(!a||t.getOption("disableInput"))return e.Pass;var o=r(a,"pairs"),l=o.indexOf(n);if(-1==l)return e.Pass;for(var c,h=r(a,"closeBefore"),d=r(a,"triples"),p=o.charAt(l+1)==n,g=t.listSelections(),v=l%2==0,m=0;m<g.length;m++){var b,C=g[m],x=C.head,P=t.getRange(x,u(x.line,x.ch+1));if(v&&!C.empty())b="surround";else if(!p&&v||P!=n)if(p&&x.ch>1&&d.indexOf(n)>=0&&t.getRange(u(x.line,x.ch-2),x)==n+n){if(x.ch>2&&/\bstring/.test(t.getTokenTypeAt(u(x.line,x.ch-2))))return e.Pass;b="addFour"}else if(p){var k=0==x.ch?" ":t.getRange(u(x.line,x.ch-1),x);if(e.isWordChar(P)||k==n||e.isWordChar(k))return e.Pass;b="both"}else{if(!v||!(0===P.length||/\s/.test(P)||h.indexOf(P)>-1))return e.Pass;b="both"}else b=p&&f(t,x)?"both":d.indexOf(n)>=0&&t.getRange(x,u(x.line,x.ch+3))==n+n+n?"skipThree":"skip";if(c){if(c!=b)return e.Pass}else c=b}var y=l%2?o.charAt(l-1):n,S=l%2?n:o.charAt(l+1);t.operation(function(){if("skip"==c)t.execCommand("goCharRight");else if("skipThree"==c)for(var e=0;e<3;e++)t.execCommand("goCharRight");else if("surround"==c){for(var r=t.getSelections(),e=0;e<r.length;e++)r[e]=y+r[e]+S;t.replaceSelections(r,"around"),r=t.listSelections().slice();for(var e=0;e<r.length;e++)r[e]=s(r[e]);t.setSelections(r)}else"both"==c?(t.replaceSelection(y+S,null),t.triggerElectric(y+S),t.execCommand("goCharLeft")):"addFour"==c&&(t.replaceSelection(y+y+y+y,"before"),t.execCommand("goCharRight"))})}function c(e,r){var t=e.getRange(u(r.line,r.ch-1),u(r.line,r.ch+1));return 2==t.length?t:null}function f(e,r){var t=e.getTokenAt(u(r.line,r.ch+1));return/\bstring/.test(t.type)&&t.start==r.ch&&(0==r.ch||!/\bstring/.test(e.getTokenTypeAt(r)))}var h={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},u=e.Pos;e.defineOption("autoCloseBrackets",!1,function(n,i,a){a&&a!=e.Init&&(n.removeKeyMap(d),n.state.closeBrackets=null),i&&(t(r(i,"pairs")),n.state.closeBrackets=i,n.addKeyMap(d))});var d={Backspace:a,Enter:o};t(h.pairs+"`")});

View File

@ -1 +1 @@
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}(function(e){function t(t){if(t.getOption("disableInput"))return e.Pass;for(var n=t.listSelections(),o=[],l=0;l<n.length;l++){if(!n[l].empty())return e.Pass;var c=n[l].head,d=t.getTokenAt(c),f=e.innerMode(t.getMode(),d.state),g=f.state;if("xml"!=f.mode.name||!g.tagName)return e.Pass;var u=t.getOption("autoCloseTags"),m="html"==f.mode.configuration,h="object"==typeof u&&u.dontCloseTags||m&&i,p="object"==typeof u&&u.indentTags||m&&s,v=g.tagName;d.end>c.ch&&(v=v.slice(0,v.length-d.end+c.ch));var b=v.toLowerCase();if(!v||"string"==d.type&&(d.end!=c.ch||!/[\"\']/.test(d.string.charAt(d.string.length-1))||1==d.string.length)||"tag"==d.type&&"closeTag"==g.type||d.string.indexOf("/")==d.string.length-1||h&&r(h,b)>-1||a(t,v,c,g,!0))return e.Pass;var y=p&&r(p,b)>-1;o[l]={indent:y,text:">"+(y?"\n\n":"")+"</"+v+">",newPos:y?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}for(var l=n.length-1;l>=0;l--){var x=o[l];t.replaceRange(x.text,n[l].head,n[l].anchor,"+insert");var P=t.listSelections().slice(0);P[l]={head:x.newPos,anchor:x.newPos},t.setSelections(P),x.indent&&(t.indentLine(x.newPos.line,null,!0),t.indentLine(x.newPos.line+1,null,!0))}}function n(t,n){for(var o=t.listSelections(),r=[],i=n?"/":"</",s=0;s<o.length;s++){if(!o[s].empty())return e.Pass;var l=o[s].head,c=t.getTokenAt(l),d=e.innerMode(t.getMode(),c.state),f=d.state;if(n&&("string"==c.type||"<"!=c.string.charAt(0)||c.start!=l.ch-1))return e.Pass;var g;if("xml"!=d.mode.name)if("htmlmixed"==t.getMode().name&&"javascript"==d.mode.name)g=i+"script";else{if("htmlmixed"!=t.getMode().name||"css"!=d.mode.name)return e.Pass;g=i+"style"}else{if(!f.context||!f.context.tagName||a(t,f.context.tagName,l,f))return e.Pass;g=i+f.context.tagName}">"!=t.getLine(l.line).charAt(c.end)&&(g+=">"),r[s]=g}t.replaceSelections(r),o=t.listSelections();for(var s=0;s<o.length;s++)(s==o.length-1||o[s].head.line<o[s+1].head.line)&&t.indentLine(o[s].head.line)}function o(t){return t.getOption("disableInput")?e.Pass:n(t,!0)}function r(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,o=e.length;n<o;++n)if(e[n]==t)return n;return-1}function a(t,n,o,r,a){if(!e.scanForClosingTag)return!1;var i=Math.min(t.lastLine()+1,o.line+500),s=e.scanForClosingTag(t,o,null,i);if(!s||s.tag!=n)return!1;for(var l=r.context,c=a?1:0;l&&l.tagName==n;l=l.prev)++c;o=s.to;for(var d=1;d<c;d++){var f=e.scanForClosingTag(t,o,null,i);if(!f||f.tag!=n)return!1;o=f.to}return!0}e.defineOption("autoCloseTags",!1,function(n,r,a){if(a!=e.Init&&a&&n.removeKeyMap("autoCloseTags"),r){var i={name:"autoCloseTags"};("object"!=typeof r||r.whenClosing)&&(i["'/'"]=function(e){return o(e)}),("object"!=typeof r||r.whenOpening)&&(i["'>'"]=function(e){return t(e)}),n.addKeyMap(i)}});var i=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],s=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];e.commands.closeTag=function(e){return n(e)}});
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}(function(e){function t(t){if(t.getOption("disableInput"))return e.Pass;for(var n=t.listSelections(),o=[],l=t.getOption("autoCloseTags"),c=0;c<n.length;c++){if(!n[c].empty())return e.Pass;var d=n[c].head,f=t.getTokenAt(d),g=e.innerMode(t.getMode(),f.state),u=g.state;if("xml"!=g.mode.name||!u.tagName)return e.Pass;var m="html"==g.mode.configuration,h="object"==typeof l&&l.dontCloseTags||m&&i,p="object"==typeof l&&l.indentTags||m&&s,v=u.tagName;f.end>d.ch&&(v=v.slice(0,v.length-f.end+d.ch));var y=v.toLowerCase();if(!v||"string"==f.type&&(f.end!=d.ch||!/[\"\']/.test(f.string.charAt(f.string.length-1))||1==f.string.length)||"tag"==f.type&&"closeTag"==u.type||f.string.indexOf("/")==f.string.length-1||h&&a(h,y)>-1||r(t,v,d,u,!0))return e.Pass;var b="object"==typeof l&&l.emptyTags;if(b&&a(b,v)>-1)o[c]={text:"/>",newPos:e.Pos(d.line,d.ch+2)};else{var x=p&&a(p,y)>-1;o[c]={indent:x,text:">"+(x?"\n\n":"")+"</"+v+">",newPos:x?e.Pos(d.line+1,0):e.Pos(d.line,d.ch+1)}}}for(var P="object"==typeof l&&l.dontIndentOnAutoClose,c=n.length-1;c>=0;c--){var T=o[c];t.replaceRange(T.text,n[c].head,n[c].anchor,"+insert");var C=t.listSelections().slice(0);C[c]={head:T.newPos,anchor:T.newPos},t.setSelections(C),!P&&T.indent&&(t.indentLine(T.newPos.line,null,!0),t.indentLine(T.newPos.line+1,null,!0))}}function n(t,n){for(var o=t.listSelections(),a=[],i=n?"/":"</",s=t.getOption("autoCloseTags"),l="object"==typeof s&&s.dontIndentOnSlash,c=0;c<o.length;c++){if(!o[c].empty())return e.Pass;var d=o[c].head,f=t.getTokenAt(d),g=e.innerMode(t.getMode(),f.state),u=g.state;if(n&&("string"==f.type||"<"!=f.string.charAt(0)||f.start!=d.ch-1))return e.Pass;var m;if("xml"!=g.mode.name)if("htmlmixed"==t.getMode().name&&"javascript"==g.mode.name)m=i+"script";else{if("htmlmixed"!=t.getMode().name||"css"!=g.mode.name)return e.Pass;m=i+"style"}else{if(!u.context||!u.context.tagName||r(t,u.context.tagName,d,u))return e.Pass;m=i+u.context.tagName}">"!=t.getLine(d.line).charAt(f.end)&&(m+=">"),a[c]=m}if(t.replaceSelections(a),o=t.listSelections(),!l)for(var c=0;c<o.length;c++)(c==o.length-1||o[c].head.line<o[c+1].head.line)&&t.indentLine(o[c].head.line)}function o(t){return t.getOption("disableInput")?e.Pass:n(t,!0)}function a(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,o=e.length;n<o;++n)if(e[n]==t)return n;return-1}function r(t,n,o,a,r){if(!e.scanForClosingTag)return!1;var i=Math.min(t.lastLine()+1,o.line+500),s=e.scanForClosingTag(t,o,null,i);if(!s||s.tag!=n)return!1;for(var l=a.context,c=r?1:0;l&&l.tagName==n;l=l.prev)++c;o=s.to;for(var d=1;d<c;d++){var f=e.scanForClosingTag(t,o,null,i);if(!f||f.tag!=n)return!1;o=f.to}return!0}e.defineOption("autoCloseTags",!1,function(n,a,r){if(r!=e.Init&&r&&n.removeKeyMap("autoCloseTags"),a){var i={name:"autoCloseTags"};("object"!=typeof a||a.whenClosing)&&(i["'/'"]=function(e){return o(e)}),("object"!=typeof a||a.whenOpening)&&(i["'>'"]=function(e){return t(e)}),n.addKeyMap(i)}});var i=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],s=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];e.commands.closeTag=function(e){return n(e)}});

View File

@ -1 +1 @@
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e,t,i,r){var o=e.getLineHandle(t.line),l=t.ch-1,f=l>=0&&c[o.text.charAt(l)]||c[o.text.charAt(++l)];if(!f)return null;var u=">"==f.charAt(1)?1:-1;if(i&&u>0!=(l==t.ch))return null;var h=e.getTokenTypeAt(a(t.line,l+1)),s=n(e,a(t.line,l+(u>0?1:0)),u,h||null,r);return null==s?null:{from:a(t.line,l),to:s&&s.pos,match:s&&s.ch==f.charAt(0),forward:u>0}}function n(e,t,n,i,r){for(var o=r&&r.maxScanLineLength||1e4,l=r&&r.maxScanLines||1e3,f=[],u=r&&r.bracketRegex?r.bracketRegex:/[(){}[\]]/,h=n>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),s=t.line;s!=h;s+=n){var m=e.getLine(s);if(m){var d=n>0?0:m.length-1,g=n>0?m.length:-1;if(!(m.length>o))for(s==t.line&&(d=t.ch-(n<0?1:0));d!=g;d+=n){var p=m.charAt(d);if(u.test(p)&&(void 0===i||e.getTokenTypeAt(a(s,d+1))==i)){var v=c[p];if(">"==v.charAt(1)==n>0)f.push(p);else{if(!f.length)return{pos:a(s,d),ch:p};f.pop()}}}}}return s-n!=(n>0?e.lastLine():e.firstLine())&&null}function i(e,n,i){for(var r=e.state.matchBrackets.maxHighlightLineLength||1e3,c=[],l=e.listSelections(),f=0;f<l.length;f++){var u=l[f].empty()&&t(e,l[f].head,!1,i);if(u&&e.getLine(u.from.line).length<=r){var h=u.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";c.push(e.markText(u.from,a(u.from.line,u.from.ch+1),{className:h})),u.to&&e.getLine(u.to.line).length<=r&&c.push(e.markText(u.to,a(u.to.line,u.to.ch+1),{className:h}))}}if(c.length){o&&e.state.focused&&e.focus();var s=function(){e.operation(function(){for(var e=0;e<c.length;e++)c[e].clear()})};if(!n)return s;setTimeout(s,800)}}function r(e){e.operation(function(){l&&(l(),l=null),l=i(e,!1,e.state.matchBrackets)})}var o=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),a=e.Pos,c={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},l=null;e.defineOption("matchBrackets",!1,function(t,n,i){i&&i!=e.Init&&(t.off("cursorActivity",r),l&&(l(),l=null)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",r))}),e.defineExtension("matchBrackets",function(){i(this,!0)}),e.defineExtension("findMatchingBracket",function(e,n,i){return t(this,e,n,i)}),e.defineExtension("scanForBracket",function(e,t,i,r){return n(this,e,t,i,r)})});
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){function e(t){return t&&t.bracketRegex||/[(){}[\]]/}function n(t,n,i){var a=t.getLineHandle(n.line),c=n.ch-1,h=i&&i.afterCursor;null==h&&(h=/(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));var s=e(i),u=!h&&c>=0&&s.test(a.text.charAt(c))&&l[a.text.charAt(c)]||s.test(a.text.charAt(c+1))&&l[a.text.charAt(++c)];if(!u)return null;var f=">"==u.charAt(1)?1:-1;if(i&&i.strict&&f>0!=(c==n.ch))return null;var m=t.getTokenTypeAt(o(n.line,c+1)),g=r(t,o(n.line,c+(f>0?1:0)),f,m||null,i);return null==g?null:{from:o(n.line,c),to:g&&g.pos,match:g&&g.ch==u.charAt(0),forward:f>0}}function r(t,n,r,i,a){for(var c=a&&a.maxScanLineLength||1e4,h=a&&a.maxScanLines||1e3,s=[],u=e(a),f=r>0?Math.min(n.line+h,t.lastLine()+1):Math.max(t.firstLine()-1,n.line-h),m=n.line;m!=f;m+=r){var g=t.getLine(m);if(g){var d=r>0?0:g.length-1,k=r>0?g.length:-1;if(!(g.length>c))for(m==n.line&&(d=n.ch-(r<0?1:0));d!=k;d+=r){var p=g.charAt(d);if(u.test(p)&&(void 0===i||t.getTokenTypeAt(o(m,d+1))==i)){var v=l[p];if(v&&">"==v.charAt(1)==r>0)s.push(p);else{if(!s.length)return{pos:o(m,d),ch:p};s.pop()}}}}}return m-r!=(r>0?t.lastLine():t.firstLine())&&null}function i(t,e,r){for(var i=t.state.matchBrackets.maxHighlightLineLength||1e3,a=[],l=t.listSelections(),h=0;h<l.length;h++){var s=l[h].empty()&&n(t,l[h].head,r);if(s&&t.getLine(s.from.line).length<=i){var u=s.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";a.push(t.markText(s.from,o(s.from.line,s.from.ch+1),{className:u})),s.to&&t.getLine(s.to.line).length<=i&&a.push(t.markText(s.to,o(s.to.line,s.to.ch+1),{className:u}))}}if(a.length){c&&t.state.focused&&t.focus();var f=function(){t.operation(function(){for(var t=0;t<a.length;t++)a[t].clear()})};if(!e)return f;setTimeout(f,800)}}function a(t){t.operation(function(){t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null),t.state.matchBrackets.currentlyHighlighted=i(t,!1,t.state.matchBrackets)})}var c=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),o=t.Pos,l={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};t.defineOption("matchBrackets",!1,function(e,n,r){r&&r!=t.Init&&(e.off("cursorActivity",a),e.state.matchBrackets&&e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null)),n&&(e.state.matchBrackets="object"==typeof n?n:{},e.on("cursorActivity",a))}),t.defineExtension("matchBrackets",function(){i(this,!0)}),t.defineExtension("findMatchingBracket",function(t,e,r){return(r||"boolean"==typeof e)&&(r?(r.strict=e,e=r):e=e?{strict:!0}:null),n(this,t,e)}),t.defineExtension("scanForBracket",function(t,e,n,i){return r(this,t,e,n,i)})});

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function n(e,n){return e.line-n.line||e.ch-n.ch}function t(e,n,t,i){this.line=n,this.ch=t,this.cm=e,this.text=e.getLine(n),this.min=i?Math.max(i.from,e.firstLine()):e.firstLine(),this.max=i?Math.min(i.to-1,e.lastLine()):e.lastLine()}function i(e,n){var t=e.cm.getTokenTypeAt(h(e.line,n));return t&&/\btag\b/.test(t)}function r(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function f(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function o(e){for(;;){var n=e.text.indexOf(">",e.ch);if(n==-1){if(r(e))continue;return}{if(i(e,n+1)){var t=e.text.lastIndexOf("/",n),f=t>-1&&!/\S/.test(e.text.slice(t+1,n));return e.ch=n+1,f?"selfClose":"regular"}e.ch=n+1}}}function u(e){for(;;){var n=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(n==-1){if(f(e))continue;return}if(i(e,n+1)){v.lastIndex=n,e.ch=n;var t=v.exec(e.text);if(t&&t.index==n)return t}else e.ch=n}}function l(e){for(;;){v.lastIndex=e.ch;var n=v.exec(e.text);if(!n){if(r(e))continue;return}{if(i(e,n.index+1))return e.ch=n.index+n[0].length,n;e.ch=n.index+1}}}function c(e){for(;;){var n=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(n==-1){if(f(e))continue;return}{if(i(e,n+1)){var t=e.text.lastIndexOf("/",n),r=t>-1&&!/\S/.test(e.text.slice(t+1,n));return e.ch=n+1,r?"selfClose":"regular"}e.ch=n}}}function a(e,n){for(var t=[];;){var i,r=l(e),f=e.line,u=e.ch-(r?r[0].length:0);if(!r||!(i=o(e)))return;if("selfClose"!=i)if(r[1]){for(var c=t.length-1;c>=0;--c)if(t[c]==r[2]){t.length=c;break}if(c<0&&(!n||n==r[2]))return{tag:r[2],from:h(f,u),to:h(e.line,e.ch)}}else t.push(r[2])}}function s(e,n){for(var t=[];;){var i=c(e);if(!i)return;if("selfClose"!=i){var r=e.line,f=e.ch,o=u(e);if(!o)return;if(o[1])t.push(o[2]);else{for(var l=t.length-1;l>=0;--l)if(t[l]==o[2]){t.length=l;break}if(l<0&&(!n||n==o[2]))return{tag:o[2],from:h(e.line,e.ch),to:h(r,f)}}}else u(e)}}var h=e.Pos,x="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",g=x+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",v=new RegExp("<(/?)(["+x+"]["+g+"]*)","g");e.registerHelper("fold","xml",function(e,n){for(var i=new t(e,n.line,0);;){var r,f=l(i);if(!f||i.line!=n.line||!(r=o(i)))return;if(!f[1]&&"selfClose"!=r){var u=h(i.line,i.ch),c=a(i,f[2]);return c&&{from:u,to:c.from}}}}),e.findMatchingTag=function(e,i,r){var f=new t(e,i.line,i.ch,r);if(f.text.indexOf(">")!=-1||f.text.indexOf("<")!=-1){var l=o(f),c=l&&h(f.line,f.ch),x=l&&u(f);if(l&&x&&!(n(f,i)>0)){var g={from:h(f.line,f.ch),to:c,tag:x[2]};return"selfClose"==l?{open:g,close:null,at:"open"}:x[1]?{open:s(f,x[2]),close:g,at:"close"}:(f=new t(e,c.line,c.ch,r),{open:g,close:a(f,x[2]),at:"open"})}}},e.findEnclosingTag=function(e,n,i,r){for(var f=new t(e,n.line,n.ch,i);;){var o=s(f,r);if(!o)break;var u=new t(e,n.line,n.ch,i),l=a(u,o.tag);if(l)return{open:o,close:l}}},e.scanForClosingTag=function(e,n,i,r){var f=new t(e,n.line,n.ch,r?{from:0,to:r}:null);return a(f,i)}});
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function n(e,n){return e.line-n.line||e.ch-n.ch}function t(e,n,t,i){this.line=n,this.ch=t,this.cm=e,this.text=e.getLine(n),this.min=i?Math.max(i.from,e.firstLine()):e.firstLine(),this.max=i?Math.min(i.to-1,e.lastLine()):e.lastLine()}function i(e,n){var t=e.cm.getTokenTypeAt(h(e.line,n));return t&&/\btag\b/.test(t)}function r(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function u(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function f(e){for(;;){var n=e.text.indexOf(">",e.ch);if(-1==n){if(r(e))continue;return}{if(i(e,n+1)){var t=e.text.lastIndexOf("/",n),u=t>-1&&!/\S/.test(e.text.slice(t+1,n));return e.ch=n+1,u?"selfClose":"regular"}e.ch=n+1}}}function o(e){for(;;){var n=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==n){if(u(e))continue;return}if(i(e,n+1)){x.lastIndex=n,e.ch=n;var t=x.exec(e.text);if(t&&t.index==n)return t}else e.ch=n}}function l(e){for(;;){x.lastIndex=e.ch;var n=x.exec(e.text);if(!n){if(r(e))continue;return}{if(i(e,n.index+1))return e.ch=n.index+n[0].length,n;e.ch=n.index+1}}}function c(e){for(;;){var n=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==n){if(u(e))continue;return}{if(i(e,n+1)){var t=e.text.lastIndexOf("/",n),r=t>-1&&!/\S/.test(e.text.slice(t+1,n));return e.ch=n+1,r?"selfClose":"regular"}e.ch=n}}}function a(e,n){for(var t=[];;){var i,r=l(e),u=e.line,o=e.ch-(r?r[0].length:0);if(!r||!(i=f(e)))return;if("selfClose"!=i)if(r[1]){for(var c=t.length-1;c>=0;--c)if(t[c]==r[2]){t.length=c;break}if(c<0&&(!n||n==r[2]))return{tag:r[2],from:h(u,o),to:h(e.line,e.ch)}}else t.push(r[2])}}function s(e,n){for(var t=[];;){var i=c(e);if(!i)return;if("selfClose"!=i){var r=e.line,u=e.ch,f=o(e);if(!f)return;if(f[1])t.push(f[2]);else{for(var l=t.length-1;l>=0;--l)if(t[l]==f[2]){t.length=l;break}if(l<0&&(!n||n==f[2]))return{tag:f[2],from:h(e.line,e.ch),to:h(r,u)}}}else o(e)}}var h=e.Pos,F="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",x=new RegExp("<(/?)(["+F+"][A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");e.registerHelper("fold","xml",function(e,i){for(var r=new t(e,i.line,0);;){var u=l(r);if(!u||r.line!=i.line)return;var o=f(r);if(!o)return;if(!u[1]&&"selfClose"!=o){var c=h(r.line,r.ch),s=a(r,u[2]);return s&&n(s.from,c)>0?{from:c,to:s.from}:null}}}),e.findMatchingTag=function(e,i,r){var u=new t(e,i.line,i.ch,r);if(-1!=u.text.indexOf(">")||-1!=u.text.indexOf("<")){var l=f(u),c=l&&h(u.line,u.ch),F=l&&o(u);if(l&&F&&!(n(u,i)>0)){var x={from:h(u.line,u.ch),to:c,tag:F[2]};return"selfClose"==l?{open:x,close:null,at:"open"}:F[1]?{open:s(u,F[2]),close:x,at:"close"}:(u=new t(e,c.line,c.ch,r),{open:x,close:a(u,F[2]),at:"open"})}}},e.findEnclosingTag=function(e,n,i,r){for(var u=new t(e,n.line,n.ch,i);;){var f=s(u,r);if(!f)break;var o=new t(e,n.line,n.ch,i),l=a(o,f.tag);if(l)return{open:f,close:l}}},e.scanForClosingTag=function(e,n,i,r){return a(new t(e,n.line,n.ch,r?{from:0,to:r}:null),i)}});

View File

@ -1 +1 @@
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.overlayMode=function(o,r,a){return{startState:function(){return{base:e.startState(o),overlay:e.startState(r),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(a){return{base:e.copyState(o,a.base),overlay:e.copyState(r,a.overlay),basePos:a.basePos,baseCur:null,overlayPos:a.overlayPos,overlayCur:null}},token:function(e,n){return(e!=n.streamSeen||Math.min(n.basePos,n.overlayPos)<e.start)&&(n.streamSeen=e,n.basePos=n.overlayPos=e.start),e.start==n.basePos&&(n.baseCur=o.token(e,n.base),n.basePos=e.pos),e.start==n.overlayPos&&(e.pos=e.start,n.overlayCur=r.token(e,n.overlay),n.overlayPos=e.pos),e.pos=Math.min(n.basePos,n.overlayPos),null==n.overlayCur?n.baseCur:null!=n.baseCur&&n.overlay.combineTokens||a&&null==n.overlay.combineTokens?n.baseCur+" "+n.overlayCur:n.overlayCur},indent:o.indent&&function(e,r){return o.indent(e.base,r)},electricChars:o.electricChars,innerMode:function(e){return{state:e.base,mode:o}},blankLine:function(e){var n,t;return o.blankLine&&(n=o.blankLine(e.base)),r.blankLine&&(t=r.blankLine(e.overlay)),null==t?n:a&&null!=n?n+" "+t:t}}}});
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.overlayMode=function(o,r,a){return{startState:function(){return{base:e.startState(o),overlay:e.startState(r),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(a){return{base:e.copyState(o,a.base),overlay:e.copyState(r,a.overlay),basePos:a.basePos,baseCur:null,overlayPos:a.overlayPos,overlayCur:null}},token:function(e,n){return(e!=n.streamSeen||Math.min(n.basePos,n.overlayPos)<e.start)&&(n.streamSeen=e,n.basePos=n.overlayPos=e.start),e.start==n.basePos&&(n.baseCur=o.token(e,n.base),n.basePos=e.pos),e.start==n.overlayPos&&(e.pos=e.start,n.overlayCur=r.token(e,n.overlay),n.overlayPos=e.pos),e.pos=Math.min(n.basePos,n.overlayPos),null==n.overlayCur?n.baseCur:null!=n.baseCur&&n.overlay.combineTokens||a&&null==n.overlay.combineTokens?n.baseCur+" "+n.overlayCur:n.overlayCur},indent:o.indent&&function(e,r,a){return o.indent(e.base,r,a)},electricChars:o.electricChars,innerMode:function(e){return{state:e.base,mode:o}},blankLine:function(e){var n,t;return o.blankLine&&(n=o.blankLine(e.base)),r.blankLine&&(t=r.blankLine(e.overlay)),null==t?n:a&&null!=n?n+" "+t:t}}}});

View File

@ -5,6 +5,7 @@
font-family: monospace;
height: 300px;
color: black;
direction: ltr;
}
/* PADDING */
@ -58,7 +59,12 @@
.cm-fat-cursor div.CodeMirror-cursors {
z-index: 1;
}
.cm-fat-cursor-mark {
background-color: rgba(20, 255, 20, 0.5);
-webkit-animation: blink 1.06s steps(1) infinite;
-moz-animation: blink 1.06s steps(1) infinite;
animation: blink 1.06s steps(1) infinite;
}
.cm-animate-fat-cursor {
width: auto;
border: 0;
@ -119,7 +125,7 @@
.cm-s-default .cm-property,
.cm-s-default .cm-operator {}
.cm-s-default .cm-variable-2 {color: #05a;}
.cm-s-default .cm-variable-3 {color: #085;}
.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}
.cm-s-default .cm-comment {color: #a50;}
.cm-s-default .cm-string {color: #a11;}
.cm-s-default .cm-string-2 {color: #f50;}
@ -139,8 +145,8 @@
/* Default styles for common addons */
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
.CodeMirror-activeline-background {background: #e8f2ff;}
@ -264,7 +270,7 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
.CodeMirror-linewidget {
position: relative;
z-index: 2;
overflow: auto;
padding: 0.1px; /* Force widget margins to stay inside of the container */
}
.CodeMirror-widget {}
@ -319,8 +325,8 @@ div.CodeMirror-dragcursors {
.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
.cm-searching {
background: #ffa;
background: rgba(255, 255, 0, .4);
background-color: #ffa;
background-color: rgba(255, 255, 0, .4);
}
/* Used to force a border model for a node */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,7 @@
.cm-s-rubyblue span.cm-string { color: #F08047; }
.cm-s-rubyblue span.cm-meta { color: #F0F; }
.cm-s-rubyblue span.cm-variable-2, .cm-s-rubyblue span.cm-tag { color: #7BD827; }
.cm-s-rubyblue span.cm-variable-3, .cm-s-rubyblue span.cm-def { color: white; }
.cm-s-rubyblue span.cm-variable-3, .cm-s-rubyblue span.cm-def, .cm-s-rubyblue span.cm-type { color: white; }
.cm-s-rubyblue span.cm-bracket { color: #F0F; }
.cm-s-rubyblue span.cm-link { color: #F4C20B; }
.cm-s-rubyblue span.CodeMirror-matchingbracket { color:#F0F !important; }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long