diff --git a/CHANGELOG.md b/CHANGELOG.md index 4953f5e51..35102c8e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## Next +* create empty div for function line that return empty string, that was causing issues with update + [#363](https://github.com/jcubic/jquery.terminal/issues/363) +* set classes from terminal to fake terminal that is used to calculate character size +* don't use length css variable on formatting when length is the same as wcwidth +* css fixes for terminal in jQuery UI dialog (dterm) + ## 1.11.2 * fix issue with --char-width == 0 if terminal have display:none * fix DELETE numpad key on IE diff --git a/LICENSE b/LICENSE index fec9a4b39..1dc611780 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016 Jakub Jankiewicz +Copyright (c) 2011-2018 Jakub Jankiewicz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.in b/README.in index 328bac9be..325d4538c 100644 --- a/README.in +++ b/README.in @@ -186,4 +186,4 @@ If you want to contrubite read [CONTRIBUTING.md](CONTRIBUTING.md) first. Here ar Licensed under [MIT](http://opensource.org/licenses/MIT) license -Copyright (c) 2011-2017 [Jakub Jankiewicz](http://jcubic.pl/jakub-jankiewicz) +Copyright (c) 2011-2018 [Jakub Jankiewicz](http://jcubic.pl/jakub-jankiewicz) diff --git a/README.md b/README.md index 7939103c8..b81f7f671 100644 --- a/README.md +++ b/README.md @@ -4,15 +4,15 @@ __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ / / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__ \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/ - \/ /____/ version 1.11.2 + \/ /____/ version DEV ``` http://terminal.jcubic.pl -[![npm](https://img.shields.io/badge/npm-1.11.2-blue.svg)](https://www.npmjs.com/package/jquery.terminal) -![bower](https://img.shields.io/badge/bower-1.11.2-yellow.svg) -[![travis](https://travis-ci.org/jcubic/jquery.terminal.svg?branch=master)](https://travis-ci.org/jcubic/jquery.terminal) +[![npm](https://img.shields.io/badge/npm-DEV-blue.svg)](https://www.npmjs.com/package/jquery.terminal) +![bower](https://img.shields.io/badge/bower-DEV-yellow.svg) +[![travis](https://travis-ci.org/jcubic/jquery.terminal.svg?branch=devel)](https://travis-ci.org/jcubic/jquery.terminal) [![Known Vulnerabilities](https://snyk.io/test/npm/jquery.terminal/badge.svg)](https://snyk.io/test/npm/jquery.terminal) -[![Coverage Status](https://coveralls.io/repos/github/jcubic/jquery.terminal/badge.svg?branch=master&a5d5e31e60f437ec7098a886ab4bc6d8)](https://coveralls.io/github/jcubic/jquery.terminal?branch=master) +[![Coverage Status](https://coveralls.io/repos/github/jcubic/jquery.terminal/badge.svg?branch=devel&a5d5e31e60f437ec7098a886ab4bc6d8)](https://coveralls.io/github/jcubic/jquery.terminal?branch=devel) ![downloads](https://img.shields.io/npm/dm/jquery.terminal.svg?style=flat) [![package quality](http://npm.packagequality.com/shield/jquery.terminal.svg)](http://packagequality.com/#?package=jquery.terminal) @@ -67,20 +67,20 @@ Include jQuery library, you can use cdn from http://jquery.com/download/ ``` -Then include js/jquery.terminal-1.11.2.min.js and css/jquery.terminal-1.11.2.min.css +Then include js/jquery.terminal-DEV.min.js and css/jquery.terminal-DEV.min.css You can grab the files from CDN: ```html - - + + ``` or ```html - - + + ``` If you always want latest version, you can grab the files directly from github using rawgit.com (that service grab the files from github and use propert MIME type so you can use it in your page, you can also grab from devel branch): @@ -186,4 +186,4 @@ If you want to contrubite read [CONTRIBUTING.md](CONTRIBUTING.md) first. Here ar Licensed under [MIT](http://opensource.org/licenses/MIT) license -Copyright (c) 2011-2017 [Jakub Jankiewicz](http://jcubic.pl/jakub-jankiewicz) +Copyright (c) 2011-2018 [Jakub Jankiewicz](http://jcubic.pl/jakub-jankiewicz) diff --git a/css/jquery.terminal-1.11.2.css b/css/jquery.terminal-1.11.2.css index aec48b18b..3d7dcaef4 100644 --- a/css/jquery.terminal-1.11.2.css +++ b/css/jquery.terminal-1.11.2.css @@ -4,15 +4,15 @@ * __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ / * / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__ * \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/ - * \/ /____/ version 1.11.2 + * \/ /____/ version DEV * http://terminal.jcubic.pl * * This file is part of jQuery Terminal. * - * Copyright (c) 2011-2017 Jakub Jankiewicz + * Copyright (c) 2011-2018 Jakub Jankiewicz * Released under the MIT license * - * Date: Thu, 28 Dec 2017 08:38:49 +0000 + * Date: Sun, 07 Jan 2018 08:27:00 +0000 */ .terminal .terminal-output .format, .cmd .format, .cmd .prompt, .cmd .prompt div, .terminal .terminal-output div div{ @@ -113,6 +113,9 @@ body.terminal { line-height: 14px; height: auto; } +.terminal .terminal-output > div:not(.raw) div { + white-space: nowrap; +} .cmd .prompt > span { float: left; } @@ -132,15 +135,14 @@ body.terminal { .cmd .prompt + div { clear: right; } -.terminal-output > div, .terminal-output > div > div { - /*padding-top: 3px;*/ +.terminal-output > div > div { min-height: 14px; } terminal .terminal-output > div { margin-top: -1px; } -.terminal-output > div > div * { - overflow-wrap: break-word; /* when echo html */ +.terminal-output > div.raw > div * { + overflow-wrap: break-word; word-wrap: break-word; } .terminal .font { @@ -263,9 +265,8 @@ terminal .terminal-output > div { width: 100%; height: 100%; box-sizing: border-box; - padding: 0; } -.ui-dialog-content .terminal, .ui-dialog-content .terminal .terminal-fill { +.ui-dialog .ui-dialog-content.dterm { padding: 0; } .clear { @@ -469,11 +470,11 @@ terminal .terminal-output > div { width: calc(var(--length, 1) * var(--char-width) * 1px); display: inline-block; } - .terminal, .cmd, .terminal .terminal-output div div, .cmd .prompt { + .terminal, .cmd, .terminal .terminal-output > div > div, .cmd .prompt { font-size: calc(var(--size, 1) * 12px); line-height: calc(var(--size, 1) * 14px); } - .terminal .terminal-output div div { + .terminal .terminal-output > div > div { min-height: calc(var(--size, 1) * 14px); } .terminal .inverted, .cmd .inverted { diff --git a/css/jquery.terminal-1.11.2.min.css b/css/jquery.terminal-1.11.2.min.css index 253d2b7b9..c1b1665a6 100644 --- a/css/jquery.terminal-1.11.2.min.css +++ b/css/jquery.terminal-1.11.2.min.css @@ -4,13 +4,13 @@ * __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ / * / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__ * \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/ - * \/ /____/ version 1.11.2 + * \/ /____/ version DEV * http://terminal.jcubic.pl * * This file is part of jQuery Terminal. * - * Copyright (c) 2011-2017 Jakub Jankiewicz + * Copyright (c) 2011-2018 Jakub Jankiewicz * Released under the MIT license * - * Date: Thu, 28 Dec 2017 08:38:49 +0000 - */.cmd .format,.cmd .prompt,.cmd .prompt div,.terminal .terminal-output .format,.terminal .terminal-output div div{display:inline-block}.cmd,.terminal h1,.terminal h2,.terminal h3,.terminal h4,.terminal h5,.terminal h6,.terminal pre{margin:0}.terminal h1,.terminal h2,.terminal h3,.terminal h4,.terminal h5,.terminal h6{line-height:1.2em}.cmd .clipboard{position:absolute;left:-16px;top:0;width:20px;height:16px;background:transparent;border:none;color:transparent;outline:none;padding:0;resize:none;z-index:1;overflow:hidden;white-space:pre;text-indent:-9999em}.terminal audio,.terminal canvas,.terminal img,.terminal object,.terminal value{cursor:default}.terminal .error{color:red}.terminal{position:relative;overflow-y:auto;overflow-x:hidden}body.terminal{height:100vh;margin:0}.terminal>div{height:100%}.cmd{padding:0;position:relative;float:left;padding-bottom:3px}.terminal a[tabindex="1000"],.terminal a[tabindex="1000"]:active,.terminal a[tabindex="1000"]:focus{outline:none}.cmd .inverted,.terminal .inverted{background-color:#aaa;color:#000}.cmd .cursor{border-bottom:3px solid transparent;margin-bottom:-3px;background-clip:content-box}.cmd .cursor.blink{-webkit-animation:a 1s infinite step-start;animation:a 1s infinite step-start;border-left:1px solid transparent;margin-left:-1px}.bar.cmd .inverted,.bar.terminal .inverted{border-left-color:#aaa}.cmd .prompt,.terminal .terminal-output div div{display:block;line-height:14px;height:auto}.cmd .prompt>span{float:left}.cmd,.terminal{font-family:monospace;color:#aaa;background-color:#000;font-size:12px;line-height:14px;box-sizing:border-box;cursor:text}.cmd div{clear:both}.cmd .prompt+div{clear:right}.terminal-output>div,.terminal-output>div>div{min-height:14px}terminal .terminal-output>div{margin-top:-1px}.terminal-output>div>div *{overflow-wrap:break-word;word-wrap:break-word}.terminal .font{position:absolute;font-size:inherit;width:1em;height:1em;top:0;left:0}.terminal .terminal-output div span{display:inline-block}.cmd>span:not(.prompt){float:left}.cmd .prompt span.line{display:block;float:none}.cmd div,.cmd span,.terminal-output a,.terminal-output span,.terminal h1,.terminal h2,.terminal h3,.terminal h4,.terminal h5,.terminal h6,.terminal pre,.terminal td{-webkit-touch-callout:initial;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.terminal,.terminal-output,.terminal-output div{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@-moz-document url-prefix(){.terminal,.terminal-output,.terminal-output div{-webkit-touch-callout:initial;-webkit-user-select:initial;-moz-user-select:initial;-ms-user-select:initial;user-select:auto}}.terminal table{border-collapse:collapse}.terminal td{border:1px solid #aaa}.cmd .prompt span::-moz-selection,.cmd>div::-moz-selection,.cmd>div span::-moz-selection,.cmd>span::-moz-selection,.cmd>span span::-moz-selection,.cmd div::-moz-selection,.terminal .terminal-output div div::-moz-selection,.terminal .terminal-output div div a::-moz-selection,.terminal .terminal-output div span::-moz-selection,.terminal h1::-moz-selection,.terminal h2::-moz-selection,.terminal h3::-moz-selection,.terminal h4::-moz-selection,.terminal h5::-moz-selection,.terminal h6::-moz-selection,.terminal pre::-moz-selection,.terminal td::-moz-selection{background-color:#aaa;color:#000}.cmd .prompt span::selection,.cmd>div::selection,.cmd>div span::selection,.cmd>span::selection,.cmd>span span::selection,.cmd div::selection,.terminal .terminal-output div div::selection,.terminal .terminal-output div div a::selection,.terminal .terminal-output div span::selection,.terminal h1::selection,.terminal h2::selection,.terminal h3::selection,.terminal h4::selection,.terminal h5::selection,.terminal h6::selection,.terminal pre::selection,.terminal td::selection{background-color:hsla(0,0%,67%,.99);color:#000}.terminal .terminal-output div.error,.terminal .terminal-output div.error div{color:red}.tilda{position:fixed;top:0;left:0;width:100%;z-index:2}.ui-dialog-content .terminal{width:100%;height:100%;box-sizing:border-box;padding:0}.ui-dialog-content .terminal,.ui-dialog-content .terminal .terminal-fill{padding:0}.clear{clear:both}.terminal a{color:#0f60ff;color:var(--link-color,#0f60ff)}.terminal a:hover{background:#0f60ff;background:var(--link-color,#0f60ff);color:var(--background,#000);text-decoration:none}.terminal .terminal-fill{position:absolute;left:0;top:-100%;width:100%;height:100%;margin:1px 0 0;border:none;opacity:0;pointer-events:none;box-sizing:border-box}.terminal,.terminal .terminal-fill{padding:10px}@-webkit-keyframes a{0%,to{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}@keyframes a{0%,to{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}@-webkit-keyframes b{0%,to{border-left-color:#aaa}50%{border-left-color:#000}}@keyframes b{0%,to{border-left-color:#aaa}50%{border-left-color:#000}}@-webkit-keyframes c{0%,to{border-bottom-color:#aaa;position:relative;line-height:12px;margin-top:1px;border-left:none;margin-left:0}50%{border-bottom-color:#000;position:relative;line-height:12px;margin-top:1px;border-left:none;margin-left:0}}@keyframes c{0%,to{border-bottom-color:#aaa;position:relative;line-height:12px;margin-top:1px;border-left:none;margin-left:0}50%{border-bottom-color:#000;position:relative;line-height:12px;margin-top:1px;border-left:none;margin-left:0}}.underline-animation .cursor.blink{border-left:none;-webkit-animation-name:c;animation-name:c}.bar-animation .cursor.blink{-webkit-animation-name:b;animation-name:b}@supports (--css:variables){.cmd,.terminal{color:var(--color,#aaa);background-color:var(--background,#000)}.terminal .font{width:calc(var(--size, 1) * 1em);height:calc(var(--size, 1) * 1em)}.terminal span[style*="--length"]{width:calc(var(--length, 1) * var(--char-width) * 1px);display:inline-block}.cmd,.cmd .prompt,.terminal,.terminal .terminal-output div div{font-size:calc(var(--size, 1) * 12px);line-height:calc(var(--size, 1) * 14px)}.terminal .terminal-output div div{min-height:calc(var(--size, 1) * 14px)}.cmd .inverted,.terminal .inverted{background-color:var(--color,#aaa);color:var(--background,#000)}.cmd .cursor.blink{-webkit-animation:var(--animation,a) 1s infinite step-start;animation:var(--animation,a) 1s infinite step-start;color:var(--color,#aaa);background-color:var(--background,#000)}.cmd .prompt span::-moz-selection,.cmd>div::-moz-selection,.cmd>div span::-moz-selection,.cmd>span::-moz-selection,.cmd>span span::-moz-selection,.cmd div::-moz-selection,.terminal .terminal-output div div::-moz-selection,.terminal .terminal-output div div a::-moz-selection,.terminal .terminal-output div span::-moz-selection,.terminal h1::-moz-selection,.terminal h2::-moz-selection,.terminal h3::-moz-selection,.terminal h4::-moz-selection,.terminal h5::-moz-selection,.terminal h6::-moz-selection,.terminal pre::-moz-selection,.terminal td::-moz-selection{background-color:var(--color,#aaa);color:var(--background,#000)}.cmd .prompt span::selection,.cmd>div::selection,.cmd>div span::selection,.cmd>span::selection,.cmd>span span::selection,.cmd div::selection,.terminal .terminal-output div div::selection,.terminal .terminal-output div div a::selection,.terminal .terminal-output div span::selection,.terminal h1::selection,.terminal h2::selection,.terminal h3::selection,.terminal h4::selection,.terminal h5::selection,.terminal h6::selection,.terminal pre::selection,.terminal td::selection{background-color:var(--color,hsla(0,0%,67%,.99));color:var(--background,#000)}@-webkit-keyframes a{0%,to{background-color:var(--background,#000);color:var(--color,#aaa)}50%{background-color:var(--color,#aaa);color:var(--background,#000)}}@keyframes a{0%,to{background-color:var(--background,#000);color:var(--color,#aaa)}50%{background-color:var(--color,#aaa);color:var(--background,#000)}}@-webkit-keyframes b{0%,to{border-left-color:var(--background,#000)}50%{border-left-color:var(--color,#aaa)}}@keyframes b{0%,to{border-left-color:var(--background,#000)}50%{border-left-color:var(--color,#aaa)}}@-webkit-keyframes c{0%,to{border-bottom-color:var(--color,#aaa);position:relative;line-height:calc(var(--size, 1) * 12px);margin-top:calc(var(--size, 1) * 1px);border-left:none;margin-left:0}50%{border-bottom-color:var(--background,#000);position:relative;line-height:calc(var(--size, 1) * 12px);margin-top:calc(var(--size, 1) * 1px);border-left:none;margin-left:0}}@keyframes c{0%,to{border-bottom-color:var(--background,#000);position:relative;line-height:calc(var(--size, 1) * 12px);margin-top:calc(var(--size, 1) * 1px);border-left:none;margin-left:0}50%{border-bottom-color:var(--color,#aaa);position:relative;line-height:calc(var(--size, 1) * 12px);margin-top:calc(var(--size, 1) * 1px);border-left:none;margin-left:0}}}@supports (-ms-ime-align:auto){.cmd .prompt span::selection,.cmd>div::selection,.cmd>div span::selection,.cmd>span::selection,.cmd>span span::selection,.cmd div::selection,.terminal .terminal-output div div::selection,.terminal .terminal-output div div a::selection,.terminal .terminal-output div span::selection,.terminal h1::selection,.terminal h2::selection,.terminal h3::selection,.terminal h4::selection,.terminal h5::selection,.terminal h6::selection,.terminal pre::selection,.terminal td::selection{background-color:hsla(0,0%,67%,.99);color:#000}} \ No newline at end of file + * Date: Sun, 07 Jan 2018 08:27:00 +0000 + */.cmd .format,.cmd .prompt,.cmd .prompt div,.terminal .terminal-output .format,.terminal .terminal-output div div{display:inline-block}.cmd,.terminal h1,.terminal h2,.terminal h3,.terminal h4,.terminal h5,.terminal h6,.terminal pre{margin:0}.terminal h1,.terminal h2,.terminal h3,.terminal h4,.terminal h5,.terminal h6{line-height:1.2em}.cmd .clipboard{position:absolute;left:-16px;top:0;width:20px;height:16px;background:transparent;border:none;color:transparent;outline:none;padding:0;resize:none;z-index:1;overflow:hidden;white-space:pre;text-indent:-9999em}.terminal audio,.terminal canvas,.terminal img,.terminal object,.terminal value{cursor:default}.terminal .error{color:red}.terminal{position:relative;overflow-y:auto;overflow-x:hidden}body.terminal{height:100vh;margin:0}.terminal>div{height:100%}.cmd{padding:0;position:relative;float:left;padding-bottom:3px}.terminal a[tabindex="1000"],.terminal a[tabindex="1000"]:active,.terminal a[tabindex="1000"]:focus{outline:none}.cmd .inverted,.terminal .inverted{background-color:#aaa;color:#000}.cmd .cursor{border-bottom:3px solid transparent;margin-bottom:-3px;background-clip:content-box}.cmd .cursor.blink{-webkit-animation:a 1s infinite step-start;animation:a 1s infinite step-start;border-left:1px solid transparent;margin-left:-1px}.bar.cmd .inverted,.bar.terminal .inverted{border-left-color:#aaa}.cmd .prompt,.terminal .terminal-output div div{display:block;line-height:14px;height:auto}.terminal .terminal-output>div:not(.raw) div{white-space:nowrap}.cmd .prompt>span{float:left}.cmd,.terminal{font-family:monospace;color:#aaa;background-color:#000;font-size:12px;line-height:14px;box-sizing:border-box;cursor:text}.cmd div{clear:both}.cmd .prompt+div{clear:right}.terminal-output>div>div{min-height:14px}terminal .terminal-output>div{margin-top:-1px}.terminal-output>div.raw>div *{overflow-wrap:break-word;word-wrap:break-word}.terminal .font{position:absolute;font-size:inherit;width:1em;height:1em;top:0;left:0}.terminal .terminal-output div span{display:inline-block}.cmd>span:not(.prompt){float:left}.cmd .prompt span.line{display:block;float:none}.cmd div,.cmd span,.terminal-output a,.terminal-output span,.terminal h1,.terminal h2,.terminal h3,.terminal h4,.terminal h5,.terminal h6,.terminal pre,.terminal td{-webkit-touch-callout:initial;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.terminal,.terminal-output,.terminal-output div{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@-moz-document url-prefix(){.terminal,.terminal-output,.terminal-output div{-webkit-touch-callout:initial;-webkit-user-select:initial;-moz-user-select:initial;-ms-user-select:initial;user-select:auto}}.terminal table{border-collapse:collapse}.terminal td{border:1px solid #aaa}.cmd .prompt span::-moz-selection,.cmd>div::-moz-selection,.cmd>div span::-moz-selection,.cmd>span::-moz-selection,.cmd>span span::-moz-selection,.cmd div::-moz-selection,.terminal .terminal-output div div::-moz-selection,.terminal .terminal-output div div a::-moz-selection,.terminal .terminal-output div span::-moz-selection,.terminal h1::-moz-selection,.terminal h2::-moz-selection,.terminal h3::-moz-selection,.terminal h4::-moz-selection,.terminal h5::-moz-selection,.terminal h6::-moz-selection,.terminal pre::-moz-selection,.terminal td::-moz-selection{background-color:#aaa;color:#000}.cmd .prompt span::selection,.cmd>div::selection,.cmd>div span::selection,.cmd>span::selection,.cmd>span span::selection,.cmd div::selection,.terminal .terminal-output div div::selection,.terminal .terminal-output div div a::selection,.terminal .terminal-output div span::selection,.terminal h1::selection,.terminal h2::selection,.terminal h3::selection,.terminal h4::selection,.terminal h5::selection,.terminal h6::selection,.terminal pre::selection,.terminal td::selection{background-color:hsla(0,0%,67%,.99);color:#000}.terminal .terminal-output div.error,.terminal .terminal-output div.error div{color:red}.tilda{position:fixed;top:0;left:0;width:100%;z-index:2}.ui-dialog-content .terminal{width:100%;height:100%;box-sizing:border-box}.ui-dialog .ui-dialog-content.dterm{padding:0}.clear{clear:both}.terminal a{color:#0f60ff;color:var(--link-color,#0f60ff)}.terminal a:hover{background:#0f60ff;background:var(--link-color,#0f60ff);color:var(--background,#000);text-decoration:none}.terminal .terminal-fill{position:absolute;left:0;top:-100%;width:100%;height:100%;margin:1px 0 0;border:none;opacity:0;pointer-events:none;box-sizing:border-box}.terminal,.terminal .terminal-fill{padding:10px}@-webkit-keyframes a{0%,to{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}@keyframes a{0%,to{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}@-webkit-keyframes b{0%,to{border-left-color:#aaa}50%{border-left-color:#000}}@keyframes b{0%,to{border-left-color:#aaa}50%{border-left-color:#000}}@-webkit-keyframes c{0%,to{border-bottom-color:#aaa;position:relative;line-height:12px;margin-top:1px;border-left:none;margin-left:0}50%{border-bottom-color:#000;position:relative;line-height:12px;margin-top:1px;border-left:none;margin-left:0}}@keyframes c{0%,to{border-bottom-color:#aaa;position:relative;line-height:12px;margin-top:1px;border-left:none;margin-left:0}50%{border-bottom-color:#000;position:relative;line-height:12px;margin-top:1px;border-left:none;margin-left:0}}.underline-animation .cursor.blink{border-left:none;-webkit-animation-name:c;animation-name:c}.bar-animation .cursor.blink{-webkit-animation-name:b;animation-name:b}@supports (--css:variables){.cmd,.terminal{color:var(--color,#aaa);background-color:var(--background,#000)}.terminal .font{width:calc(var(--size, 1) * 1em);height:calc(var(--size, 1) * 1em)}.terminal span[style*="--length"]{width:calc(var(--length, 1) * var(--char-width) * 1px);display:inline-block}.cmd,.cmd .prompt,.terminal,.terminal .terminal-output>div>div{font-size:calc(var(--size, 1) * 12px);line-height:calc(var(--size, 1) * 14px)}.terminal .terminal-output>div>div{min-height:calc(var(--size, 1) * 14px)}.cmd .inverted,.terminal .inverted{background-color:var(--color,#aaa);color:var(--background,#000)}.cmd .cursor.blink{-webkit-animation:var(--animation,a) 1s infinite step-start;animation:var(--animation,a) 1s infinite step-start;color:var(--color,#aaa);background-color:var(--background,#000)}.cmd .prompt span::-moz-selection,.cmd>div::-moz-selection,.cmd>div span::-moz-selection,.cmd>span::-moz-selection,.cmd>span span::-moz-selection,.cmd div::-moz-selection,.terminal .terminal-output div div::-moz-selection,.terminal .terminal-output div div a::-moz-selection,.terminal .terminal-output div span::-moz-selection,.terminal h1::-moz-selection,.terminal h2::-moz-selection,.terminal h3::-moz-selection,.terminal h4::-moz-selection,.terminal h5::-moz-selection,.terminal h6::-moz-selection,.terminal pre::-moz-selection,.terminal td::-moz-selection{background-color:var(--color,#aaa);color:var(--background,#000)}.cmd .prompt span::selection,.cmd>div::selection,.cmd>div span::selection,.cmd>span::selection,.cmd>span span::selection,.cmd div::selection,.terminal .terminal-output div div::selection,.terminal .terminal-output div div a::selection,.terminal .terminal-output div span::selection,.terminal h1::selection,.terminal h2::selection,.terminal h3::selection,.terminal h4::selection,.terminal h5::selection,.terminal h6::selection,.terminal pre::selection,.terminal td::selection{background-color:var(--color,hsla(0,0%,67%,.99));color:var(--background,#000)}@-webkit-keyframes a{0%,to{background-color:var(--background,#000);color:var(--color,#aaa)}50%{background-color:var(--color,#aaa);color:var(--background,#000)}}@keyframes a{0%,to{background-color:var(--background,#000);color:var(--color,#aaa)}50%{background-color:var(--color,#aaa);color:var(--background,#000)}}@-webkit-keyframes b{0%,to{border-left-color:var(--background,#000)}50%{border-left-color:var(--color,#aaa)}}@keyframes b{0%,to{border-left-color:var(--background,#000)}50%{border-left-color:var(--color,#aaa)}}@-webkit-keyframes c{0%,to{border-bottom-color:var(--color,#aaa);position:relative;line-height:calc(var(--size, 1) * 12px);margin-top:calc(var(--size, 1) * 1px);border-left:none;margin-left:0}50%{border-bottom-color:var(--background,#000);position:relative;line-height:calc(var(--size, 1) * 12px);margin-top:calc(var(--size, 1) * 1px);border-left:none;margin-left:0}}@keyframes c{0%,to{border-bottom-color:var(--background,#000);position:relative;line-height:calc(var(--size, 1) * 12px);margin-top:calc(var(--size, 1) * 1px);border-left:none;margin-left:0}50%{border-bottom-color:var(--color,#aaa);position:relative;line-height:calc(var(--size, 1) * 12px);margin-top:calc(var(--size, 1) * 1px);border-left:none;margin-left:0}}}@supports (-ms-ime-align:auto){.cmd .prompt span::selection,.cmd>div::selection,.cmd>div span::selection,.cmd>span::selection,.cmd>span span::selection,.cmd div::selection,.terminal .terminal-output div div::selection,.terminal .terminal-output div div a::selection,.terminal .terminal-output div span::selection,.terminal h1::selection,.terminal h2::selection,.terminal h3::selection,.terminal h4::selection,.terminal h5::selection,.terminal h6::selection,.terminal pre::selection,.terminal td::selection{background-color:hsla(0,0%,67%,.99);color:#000}} \ No newline at end of file diff --git a/css/jquery.terminal-src.css b/css/jquery.terminal-src.css index 585573c05..d4e854efa 100644 --- a/css/jquery.terminal-src.css +++ b/css/jquery.terminal-src.css @@ -9,7 +9,7 @@ * * This file is part of jQuery Terminal. * - * Copyright (c) 2011-2017 Jakub Jankiewicz + * Copyright (c) 2011-2018 Jakub Jankiewicz * Released under the MIT license * * Date: {{DATE}} @@ -113,6 +113,9 @@ body.terminal { line-height: 14px; height: auto; } +.terminal .terminal-output > div:not(.raw) div { + white-space: nowrap; +} .cmd .prompt > span { float: left; } @@ -132,15 +135,14 @@ body.terminal { .cmd .prompt + div { clear: right; } -.terminal-output > div, .terminal-output > div > div { - /*padding-top: 3px;*/ +.terminal-output > div > div { min-height: 14px; } terminal .terminal-output > div { margin-top: -1px; } -.terminal-output > div > div * { - overflow-wrap: break-word; /* when echo html */ +.terminal-output > div.raw > div * { + overflow-wrap: break-word; word-wrap: break-word; } .terminal .font { @@ -263,9 +265,8 @@ terminal .terminal-output > div { width: 100%; height: 100%; box-sizing: border-box; - padding: 0; } -.ui-dialog-content .terminal, .ui-dialog-content .terminal .terminal-fill { +.ui-dialog .ui-dialog-content.dterm { padding: 0; } .clear { @@ -469,11 +470,11 @@ terminal .terminal-output > div { width: calc(var(--length, 1) * var(--char-width) * 1px); display: inline-block; } - .terminal, .cmd, .terminal .terminal-output div div, .cmd .prompt { + .terminal, .cmd, .terminal .terminal-output > div > div, .cmd .prompt { font-size: calc(var(--size, 1) * 12px); line-height: calc(var(--size, 1) * 14px); } - .terminal .terminal-output div div { + .terminal .terminal-output > div > div { min-height: calc(var(--size, 1) * 14px); } .terminal .inverted, .cmd .inverted { diff --git a/css/jquery.terminal.css b/css/jquery.terminal.css index aec48b18b..3d7dcaef4 100644 --- a/css/jquery.terminal.css +++ b/css/jquery.terminal.css @@ -4,15 +4,15 @@ * __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ / * / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__ * \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/ - * \/ /____/ version 1.11.2 + * \/ /____/ version DEV * http://terminal.jcubic.pl * * This file is part of jQuery Terminal. * - * Copyright (c) 2011-2017 Jakub Jankiewicz + * Copyright (c) 2011-2018 Jakub Jankiewicz * Released under the MIT license * - * Date: Thu, 28 Dec 2017 08:38:49 +0000 + * Date: Sun, 07 Jan 2018 08:27:00 +0000 */ .terminal .terminal-output .format, .cmd .format, .cmd .prompt, .cmd .prompt div, .terminal .terminal-output div div{ @@ -113,6 +113,9 @@ body.terminal { line-height: 14px; height: auto; } +.terminal .terminal-output > div:not(.raw) div { + white-space: nowrap; +} .cmd .prompt > span { float: left; } @@ -132,15 +135,14 @@ body.terminal { .cmd .prompt + div { clear: right; } -.terminal-output > div, .terminal-output > div > div { - /*padding-top: 3px;*/ +.terminal-output > div > div { min-height: 14px; } terminal .terminal-output > div { margin-top: -1px; } -.terminal-output > div > div * { - overflow-wrap: break-word; /* when echo html */ +.terminal-output > div.raw > div * { + overflow-wrap: break-word; word-wrap: break-word; } .terminal .font { @@ -263,9 +265,8 @@ terminal .terminal-output > div { width: 100%; height: 100%; box-sizing: border-box; - padding: 0; } -.ui-dialog-content .terminal, .ui-dialog-content .terminal .terminal-fill { +.ui-dialog .ui-dialog-content.dterm { padding: 0; } .clear { @@ -469,11 +470,11 @@ terminal .terminal-output > div { width: calc(var(--length, 1) * var(--char-width) * 1px); display: inline-block; } - .terminal, .cmd, .terminal .terminal-output div div, .cmd .prompt { + .terminal, .cmd, .terminal .terminal-output > div > div, .cmd .prompt { font-size: calc(var(--size, 1) * 12px); line-height: calc(var(--size, 1) * 14px); } - .terminal .terminal-output div div { + .terminal .terminal-output > div > div { min-height: calc(var(--size, 1) * 14px); } .terminal .inverted, .cmd .inverted { diff --git a/css/jquery.terminal.min.css b/css/jquery.terminal.min.css index 253d2b7b9..c1b1665a6 100644 --- a/css/jquery.terminal.min.css +++ b/css/jquery.terminal.min.css @@ -4,13 +4,13 @@ * __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ / * / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__ * \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/ - * \/ /____/ version 1.11.2 + * \/ /____/ version DEV * http://terminal.jcubic.pl * * This file is part of jQuery Terminal. * - * Copyright (c) 2011-2017 Jakub Jankiewicz + * Copyright (c) 2011-2018 Jakub Jankiewicz * Released under the MIT license * - * Date: Thu, 28 Dec 2017 08:38:49 +0000 - */.cmd .format,.cmd .prompt,.cmd .prompt div,.terminal .terminal-output .format,.terminal .terminal-output div div{display:inline-block}.cmd,.terminal h1,.terminal h2,.terminal h3,.terminal h4,.terminal h5,.terminal h6,.terminal pre{margin:0}.terminal h1,.terminal h2,.terminal h3,.terminal h4,.terminal h5,.terminal h6{line-height:1.2em}.cmd .clipboard{position:absolute;left:-16px;top:0;width:20px;height:16px;background:transparent;border:none;color:transparent;outline:none;padding:0;resize:none;z-index:1;overflow:hidden;white-space:pre;text-indent:-9999em}.terminal audio,.terminal canvas,.terminal img,.terminal object,.terminal value{cursor:default}.terminal .error{color:red}.terminal{position:relative;overflow-y:auto;overflow-x:hidden}body.terminal{height:100vh;margin:0}.terminal>div{height:100%}.cmd{padding:0;position:relative;float:left;padding-bottom:3px}.terminal a[tabindex="1000"],.terminal a[tabindex="1000"]:active,.terminal a[tabindex="1000"]:focus{outline:none}.cmd .inverted,.terminal .inverted{background-color:#aaa;color:#000}.cmd .cursor{border-bottom:3px solid transparent;margin-bottom:-3px;background-clip:content-box}.cmd .cursor.blink{-webkit-animation:a 1s infinite step-start;animation:a 1s infinite step-start;border-left:1px solid transparent;margin-left:-1px}.bar.cmd .inverted,.bar.terminal .inverted{border-left-color:#aaa}.cmd .prompt,.terminal .terminal-output div div{display:block;line-height:14px;height:auto}.cmd .prompt>span{float:left}.cmd,.terminal{font-family:monospace;color:#aaa;background-color:#000;font-size:12px;line-height:14px;box-sizing:border-box;cursor:text}.cmd div{clear:both}.cmd .prompt+div{clear:right}.terminal-output>div,.terminal-output>div>div{min-height:14px}terminal .terminal-output>div{margin-top:-1px}.terminal-output>div>div *{overflow-wrap:break-word;word-wrap:break-word}.terminal .font{position:absolute;font-size:inherit;width:1em;height:1em;top:0;left:0}.terminal .terminal-output div span{display:inline-block}.cmd>span:not(.prompt){float:left}.cmd .prompt span.line{display:block;float:none}.cmd div,.cmd span,.terminal-output a,.terminal-output span,.terminal h1,.terminal h2,.terminal h3,.terminal h4,.terminal h5,.terminal h6,.terminal pre,.terminal td{-webkit-touch-callout:initial;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.terminal,.terminal-output,.terminal-output div{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@-moz-document url-prefix(){.terminal,.terminal-output,.terminal-output div{-webkit-touch-callout:initial;-webkit-user-select:initial;-moz-user-select:initial;-ms-user-select:initial;user-select:auto}}.terminal table{border-collapse:collapse}.terminal td{border:1px solid #aaa}.cmd .prompt span::-moz-selection,.cmd>div::-moz-selection,.cmd>div span::-moz-selection,.cmd>span::-moz-selection,.cmd>span span::-moz-selection,.cmd div::-moz-selection,.terminal .terminal-output div div::-moz-selection,.terminal .terminal-output div div a::-moz-selection,.terminal .terminal-output div span::-moz-selection,.terminal h1::-moz-selection,.terminal h2::-moz-selection,.terminal h3::-moz-selection,.terminal h4::-moz-selection,.terminal h5::-moz-selection,.terminal h6::-moz-selection,.terminal pre::-moz-selection,.terminal td::-moz-selection{background-color:#aaa;color:#000}.cmd .prompt span::selection,.cmd>div::selection,.cmd>div span::selection,.cmd>span::selection,.cmd>span span::selection,.cmd div::selection,.terminal .terminal-output div div::selection,.terminal .terminal-output div div a::selection,.terminal .terminal-output div span::selection,.terminal h1::selection,.terminal h2::selection,.terminal h3::selection,.terminal h4::selection,.terminal h5::selection,.terminal h6::selection,.terminal pre::selection,.terminal td::selection{background-color:hsla(0,0%,67%,.99);color:#000}.terminal .terminal-output div.error,.terminal .terminal-output div.error div{color:red}.tilda{position:fixed;top:0;left:0;width:100%;z-index:2}.ui-dialog-content .terminal{width:100%;height:100%;box-sizing:border-box;padding:0}.ui-dialog-content .terminal,.ui-dialog-content .terminal .terminal-fill{padding:0}.clear{clear:both}.terminal a{color:#0f60ff;color:var(--link-color,#0f60ff)}.terminal a:hover{background:#0f60ff;background:var(--link-color,#0f60ff);color:var(--background,#000);text-decoration:none}.terminal .terminal-fill{position:absolute;left:0;top:-100%;width:100%;height:100%;margin:1px 0 0;border:none;opacity:0;pointer-events:none;box-sizing:border-box}.terminal,.terminal .terminal-fill{padding:10px}@-webkit-keyframes a{0%,to{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}@keyframes a{0%,to{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}@-webkit-keyframes b{0%,to{border-left-color:#aaa}50%{border-left-color:#000}}@keyframes b{0%,to{border-left-color:#aaa}50%{border-left-color:#000}}@-webkit-keyframes c{0%,to{border-bottom-color:#aaa;position:relative;line-height:12px;margin-top:1px;border-left:none;margin-left:0}50%{border-bottom-color:#000;position:relative;line-height:12px;margin-top:1px;border-left:none;margin-left:0}}@keyframes c{0%,to{border-bottom-color:#aaa;position:relative;line-height:12px;margin-top:1px;border-left:none;margin-left:0}50%{border-bottom-color:#000;position:relative;line-height:12px;margin-top:1px;border-left:none;margin-left:0}}.underline-animation .cursor.blink{border-left:none;-webkit-animation-name:c;animation-name:c}.bar-animation .cursor.blink{-webkit-animation-name:b;animation-name:b}@supports (--css:variables){.cmd,.terminal{color:var(--color,#aaa);background-color:var(--background,#000)}.terminal .font{width:calc(var(--size, 1) * 1em);height:calc(var(--size, 1) * 1em)}.terminal span[style*="--length"]{width:calc(var(--length, 1) * var(--char-width) * 1px);display:inline-block}.cmd,.cmd .prompt,.terminal,.terminal .terminal-output div div{font-size:calc(var(--size, 1) * 12px);line-height:calc(var(--size, 1) * 14px)}.terminal .terminal-output div div{min-height:calc(var(--size, 1) * 14px)}.cmd .inverted,.terminal .inverted{background-color:var(--color,#aaa);color:var(--background,#000)}.cmd .cursor.blink{-webkit-animation:var(--animation,a) 1s infinite step-start;animation:var(--animation,a) 1s infinite step-start;color:var(--color,#aaa);background-color:var(--background,#000)}.cmd .prompt span::-moz-selection,.cmd>div::-moz-selection,.cmd>div span::-moz-selection,.cmd>span::-moz-selection,.cmd>span span::-moz-selection,.cmd div::-moz-selection,.terminal .terminal-output div div::-moz-selection,.terminal .terminal-output div div a::-moz-selection,.terminal .terminal-output div span::-moz-selection,.terminal h1::-moz-selection,.terminal h2::-moz-selection,.terminal h3::-moz-selection,.terminal h4::-moz-selection,.terminal h5::-moz-selection,.terminal h6::-moz-selection,.terminal pre::-moz-selection,.terminal td::-moz-selection{background-color:var(--color,#aaa);color:var(--background,#000)}.cmd .prompt span::selection,.cmd>div::selection,.cmd>div span::selection,.cmd>span::selection,.cmd>span span::selection,.cmd div::selection,.terminal .terminal-output div div::selection,.terminal .terminal-output div div a::selection,.terminal .terminal-output div span::selection,.terminal h1::selection,.terminal h2::selection,.terminal h3::selection,.terminal h4::selection,.terminal h5::selection,.terminal h6::selection,.terminal pre::selection,.terminal td::selection{background-color:var(--color,hsla(0,0%,67%,.99));color:var(--background,#000)}@-webkit-keyframes a{0%,to{background-color:var(--background,#000);color:var(--color,#aaa)}50%{background-color:var(--color,#aaa);color:var(--background,#000)}}@keyframes a{0%,to{background-color:var(--background,#000);color:var(--color,#aaa)}50%{background-color:var(--color,#aaa);color:var(--background,#000)}}@-webkit-keyframes b{0%,to{border-left-color:var(--background,#000)}50%{border-left-color:var(--color,#aaa)}}@keyframes b{0%,to{border-left-color:var(--background,#000)}50%{border-left-color:var(--color,#aaa)}}@-webkit-keyframes c{0%,to{border-bottom-color:var(--color,#aaa);position:relative;line-height:calc(var(--size, 1) * 12px);margin-top:calc(var(--size, 1) * 1px);border-left:none;margin-left:0}50%{border-bottom-color:var(--background,#000);position:relative;line-height:calc(var(--size, 1) * 12px);margin-top:calc(var(--size, 1) * 1px);border-left:none;margin-left:0}}@keyframes c{0%,to{border-bottom-color:var(--background,#000);position:relative;line-height:calc(var(--size, 1) * 12px);margin-top:calc(var(--size, 1) * 1px);border-left:none;margin-left:0}50%{border-bottom-color:var(--color,#aaa);position:relative;line-height:calc(var(--size, 1) * 12px);margin-top:calc(var(--size, 1) * 1px);border-left:none;margin-left:0}}}@supports (-ms-ime-align:auto){.cmd .prompt span::selection,.cmd>div::selection,.cmd>div span::selection,.cmd>span::selection,.cmd>span span::selection,.cmd div::selection,.terminal .terminal-output div div::selection,.terminal .terminal-output div div a::selection,.terminal .terminal-output div span::selection,.terminal h1::selection,.terminal h2::selection,.terminal h3::selection,.terminal h4::selection,.terminal h5::selection,.terminal h6::selection,.terminal pre::selection,.terminal td::selection{background-color:hsla(0,0%,67%,.99);color:#000}} \ No newline at end of file + * Date: Sun, 07 Jan 2018 08:27:00 +0000 + */.cmd .format,.cmd .prompt,.cmd .prompt div,.terminal .terminal-output .format,.terminal .terminal-output div div{display:inline-block}.cmd,.terminal h1,.terminal h2,.terminal h3,.terminal h4,.terminal h5,.terminal h6,.terminal pre{margin:0}.terminal h1,.terminal h2,.terminal h3,.terminal h4,.terminal h5,.terminal h6{line-height:1.2em}.cmd .clipboard{position:absolute;left:-16px;top:0;width:20px;height:16px;background:transparent;border:none;color:transparent;outline:none;padding:0;resize:none;z-index:1;overflow:hidden;white-space:pre;text-indent:-9999em}.terminal audio,.terminal canvas,.terminal img,.terminal object,.terminal value{cursor:default}.terminal .error{color:red}.terminal{position:relative;overflow-y:auto;overflow-x:hidden}body.terminal{height:100vh;margin:0}.terminal>div{height:100%}.cmd{padding:0;position:relative;float:left;padding-bottom:3px}.terminal a[tabindex="1000"],.terminal a[tabindex="1000"]:active,.terminal a[tabindex="1000"]:focus{outline:none}.cmd .inverted,.terminal .inverted{background-color:#aaa;color:#000}.cmd .cursor{border-bottom:3px solid transparent;margin-bottom:-3px;background-clip:content-box}.cmd .cursor.blink{-webkit-animation:a 1s infinite step-start;animation:a 1s infinite step-start;border-left:1px solid transparent;margin-left:-1px}.bar.cmd .inverted,.bar.terminal .inverted{border-left-color:#aaa}.cmd .prompt,.terminal .terminal-output div div{display:block;line-height:14px;height:auto}.terminal .terminal-output>div:not(.raw) div{white-space:nowrap}.cmd .prompt>span{float:left}.cmd,.terminal{font-family:monospace;color:#aaa;background-color:#000;font-size:12px;line-height:14px;box-sizing:border-box;cursor:text}.cmd div{clear:both}.cmd .prompt+div{clear:right}.terminal-output>div>div{min-height:14px}terminal .terminal-output>div{margin-top:-1px}.terminal-output>div.raw>div *{overflow-wrap:break-word;word-wrap:break-word}.terminal .font{position:absolute;font-size:inherit;width:1em;height:1em;top:0;left:0}.terminal .terminal-output div span{display:inline-block}.cmd>span:not(.prompt){float:left}.cmd .prompt span.line{display:block;float:none}.cmd div,.cmd span,.terminal-output a,.terminal-output span,.terminal h1,.terminal h2,.terminal h3,.terminal h4,.terminal h5,.terminal h6,.terminal pre,.terminal td{-webkit-touch-callout:initial;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.terminal,.terminal-output,.terminal-output div{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@-moz-document url-prefix(){.terminal,.terminal-output,.terminal-output div{-webkit-touch-callout:initial;-webkit-user-select:initial;-moz-user-select:initial;-ms-user-select:initial;user-select:auto}}.terminal table{border-collapse:collapse}.terminal td{border:1px solid #aaa}.cmd .prompt span::-moz-selection,.cmd>div::-moz-selection,.cmd>div span::-moz-selection,.cmd>span::-moz-selection,.cmd>span span::-moz-selection,.cmd div::-moz-selection,.terminal .terminal-output div div::-moz-selection,.terminal .terminal-output div div a::-moz-selection,.terminal .terminal-output div span::-moz-selection,.terminal h1::-moz-selection,.terminal h2::-moz-selection,.terminal h3::-moz-selection,.terminal h4::-moz-selection,.terminal h5::-moz-selection,.terminal h6::-moz-selection,.terminal pre::-moz-selection,.terminal td::-moz-selection{background-color:#aaa;color:#000}.cmd .prompt span::selection,.cmd>div::selection,.cmd>div span::selection,.cmd>span::selection,.cmd>span span::selection,.cmd div::selection,.terminal .terminal-output div div::selection,.terminal .terminal-output div div a::selection,.terminal .terminal-output div span::selection,.terminal h1::selection,.terminal h2::selection,.terminal h3::selection,.terminal h4::selection,.terminal h5::selection,.terminal h6::selection,.terminal pre::selection,.terminal td::selection{background-color:hsla(0,0%,67%,.99);color:#000}.terminal .terminal-output div.error,.terminal .terminal-output div.error div{color:red}.tilda{position:fixed;top:0;left:0;width:100%;z-index:2}.ui-dialog-content .terminal{width:100%;height:100%;box-sizing:border-box}.ui-dialog .ui-dialog-content.dterm{padding:0}.clear{clear:both}.terminal a{color:#0f60ff;color:var(--link-color,#0f60ff)}.terminal a:hover{background:#0f60ff;background:var(--link-color,#0f60ff);color:var(--background,#000);text-decoration:none}.terminal .terminal-fill{position:absolute;left:0;top:-100%;width:100%;height:100%;margin:1px 0 0;border:none;opacity:0;pointer-events:none;box-sizing:border-box}.terminal,.terminal .terminal-fill{padding:10px}@-webkit-keyframes a{0%,to{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}@keyframes a{0%,to{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}@-webkit-keyframes b{0%,to{border-left-color:#aaa}50%{border-left-color:#000}}@keyframes b{0%,to{border-left-color:#aaa}50%{border-left-color:#000}}@-webkit-keyframes c{0%,to{border-bottom-color:#aaa;position:relative;line-height:12px;margin-top:1px;border-left:none;margin-left:0}50%{border-bottom-color:#000;position:relative;line-height:12px;margin-top:1px;border-left:none;margin-left:0}}@keyframes c{0%,to{border-bottom-color:#aaa;position:relative;line-height:12px;margin-top:1px;border-left:none;margin-left:0}50%{border-bottom-color:#000;position:relative;line-height:12px;margin-top:1px;border-left:none;margin-left:0}}.underline-animation .cursor.blink{border-left:none;-webkit-animation-name:c;animation-name:c}.bar-animation .cursor.blink{-webkit-animation-name:b;animation-name:b}@supports (--css:variables){.cmd,.terminal{color:var(--color,#aaa);background-color:var(--background,#000)}.terminal .font{width:calc(var(--size, 1) * 1em);height:calc(var(--size, 1) * 1em)}.terminal span[style*="--length"]{width:calc(var(--length, 1) * var(--char-width) * 1px);display:inline-block}.cmd,.cmd .prompt,.terminal,.terminal .terminal-output>div>div{font-size:calc(var(--size, 1) * 12px);line-height:calc(var(--size, 1) * 14px)}.terminal .terminal-output>div>div{min-height:calc(var(--size, 1) * 14px)}.cmd .inverted,.terminal .inverted{background-color:var(--color,#aaa);color:var(--background,#000)}.cmd .cursor.blink{-webkit-animation:var(--animation,a) 1s infinite step-start;animation:var(--animation,a) 1s infinite step-start;color:var(--color,#aaa);background-color:var(--background,#000)}.cmd .prompt span::-moz-selection,.cmd>div::-moz-selection,.cmd>div span::-moz-selection,.cmd>span::-moz-selection,.cmd>span span::-moz-selection,.cmd div::-moz-selection,.terminal .terminal-output div div::-moz-selection,.terminal .terminal-output div div a::-moz-selection,.terminal .terminal-output div span::-moz-selection,.terminal h1::-moz-selection,.terminal h2::-moz-selection,.terminal h3::-moz-selection,.terminal h4::-moz-selection,.terminal h5::-moz-selection,.terminal h6::-moz-selection,.terminal pre::-moz-selection,.terminal td::-moz-selection{background-color:var(--color,#aaa);color:var(--background,#000)}.cmd .prompt span::selection,.cmd>div::selection,.cmd>div span::selection,.cmd>span::selection,.cmd>span span::selection,.cmd div::selection,.terminal .terminal-output div div::selection,.terminal .terminal-output div div a::selection,.terminal .terminal-output div span::selection,.terminal h1::selection,.terminal h2::selection,.terminal h3::selection,.terminal h4::selection,.terminal h5::selection,.terminal h6::selection,.terminal pre::selection,.terminal td::selection{background-color:var(--color,hsla(0,0%,67%,.99));color:var(--background,#000)}@-webkit-keyframes a{0%,to{background-color:var(--background,#000);color:var(--color,#aaa)}50%{background-color:var(--color,#aaa);color:var(--background,#000)}}@keyframes a{0%,to{background-color:var(--background,#000);color:var(--color,#aaa)}50%{background-color:var(--color,#aaa);color:var(--background,#000)}}@-webkit-keyframes b{0%,to{border-left-color:var(--background,#000)}50%{border-left-color:var(--color,#aaa)}}@keyframes b{0%,to{border-left-color:var(--background,#000)}50%{border-left-color:var(--color,#aaa)}}@-webkit-keyframes c{0%,to{border-bottom-color:var(--color,#aaa);position:relative;line-height:calc(var(--size, 1) * 12px);margin-top:calc(var(--size, 1) * 1px);border-left:none;margin-left:0}50%{border-bottom-color:var(--background,#000);position:relative;line-height:calc(var(--size, 1) * 12px);margin-top:calc(var(--size, 1) * 1px);border-left:none;margin-left:0}}@keyframes c{0%,to{border-bottom-color:var(--background,#000);position:relative;line-height:calc(var(--size, 1) * 12px);margin-top:calc(var(--size, 1) * 1px);border-left:none;margin-left:0}50%{border-bottom-color:var(--color,#aaa);position:relative;line-height:calc(var(--size, 1) * 12px);margin-top:calc(var(--size, 1) * 1px);border-left:none;margin-left:0}}}@supports (-ms-ime-align:auto){.cmd .prompt span::selection,.cmd>div::selection,.cmd>div span::selection,.cmd>span::selection,.cmd>span span::selection,.cmd div::selection,.terminal .terminal-output div div::selection,.terminal .terminal-output div div a::selection,.terminal .terminal-output div span::selection,.terminal h1::selection,.terminal h2::selection,.terminal h3::selection,.terminal h4::selection,.terminal h5::selection,.terminal h6::selection,.terminal pre::selection,.terminal td::selection{background-color:hsla(0,0%,67%,.99);color:#000}} \ No newline at end of file diff --git a/js/dterm.js b/js/dterm.js index bdbae20e0..ad2141e1e 100644 --- a/js/dterm.js +++ b/js/dterm.js @@ -6,7 +6,7 @@ * \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/ * \/ /____/ * Example plugin using JQuery Terminal Emulator - * Copyright (c) 2014-2017 Jakub Jankiewicz + * Copyright (c) 2014-2018 Jakub Jankiewicz * Released under the MIT license * */ @@ -24,7 +24,8 @@ $.fn.dterm = function(interpreter, options) { var op = $.extend_if_has({}, options, defaults); op.enabled = false; - var terminal = this.terminal(interpreter, op); + this.addClass('dterm'); + var terminal = $('
').appendTo(this).terminal(interpreter, op); if (!options.title) { options.title = 'JQuery Terminal Emulator'; } diff --git a/js/jquery.terminal-1.11.2.js b/js/jquery.terminal-1.11.2.js index b583df368..a3d31a809 100644 --- a/js/jquery.terminal-1.11.2.js +++ b/js/jquery.terminal-1.11.2.js @@ -4,11 +4,11 @@ * __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ / * / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__ * \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/ - * \/ /____/ version 1.11.2 + * \/ /____/ version DEV * * This file is part of jQuery Terminal. http://terminal.jcubic.pl * - * Copyright (c) 2010-2017 Jakub Jankiewicz + * Copyright (c) 2010-2018 Jakub Jankiewicz * Released under the MIT license * * Contains: @@ -32,7 +32,7 @@ * Copyright (c) 2007-2013 Alexandru Marasteanu * licensed under 3 clause BSD license * - * Date: Thu, 28 Dec 2017 08:38:48 +0000 + * Date: Sun, 07 Jan 2018 08:28:38 +0000 */ /* TODO: @@ -790,10 +790,14 @@ callbacks.add(callback); $this.data('callbacks', callbacks); var resizer; + var first = true; if (window.ResizeObserver) { resizer = new ResizeObserver(function() { - var callbacks = $this.data('callbacks'); - callbacks.fire(); + if (!first) { + var callbacks = $this.data('callbacks'); + callbacks.fire(); + } + first = false; }); resizer.observe(this); $this.data('observer', resizer); @@ -2796,8 +2800,8 @@ } } $.terminal = { - version: '1.11.2', - date: 'Thu, 28 Dec 2017 08:38:48 +0000', + version: 'DEV', + date: 'Sun, 07 Jan 2018 08:28:38 +0000', // colors from http://www.w3.org/wiki/CSS/Properties/color/keywords color_names: [ 'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white', @@ -3294,8 +3298,9 @@ style_str += 'font-style:italic;'; } if (typeof wcwidth !== 'undefined') { - var len = strlen(bare_text(text)); - if (len !== 1) { + var bare = bare_text(text); + var len = strlen(bare); + if (len !== bare.length) { style_str += '--length: ' + len + ';'; } } @@ -3350,15 +3355,13 @@ }); } else { text = safe_text(text); + var style = ''; if (typeof wcwidth !== 'undefined') { - var t = bare_text(text); - var len = strlen(t); - var style = ''; - if (t.length < len) { + var bare = bare_text(text); + var len = strlen(bare); + if (bare.length !== len) { style = ' style="--length: ' + len + '"'; } - } else { - style = ''; } return '' + text + ''; } @@ -3722,6 +3725,7 @@ function get_char_size(div) { var temp = $('
 
').appendTo('body'); + temp.addClass(div.attr('class')); if (div) { var style = div.attr('style'); if (style) { @@ -4509,29 +4513,35 @@ // urls should always have formatting to keep url if split var i, len; output_buffer.push(NEW_LINE); - if (!options.raw && (strlen(string) > num_chars || - string.match(/\n/)) && - ((settings.wrap === true && options.wrap === undefined) || - settings.wrap === false && options.wrap === true)) { - var words = options.keepWords; - var array = $.terminal.split_equal(string, num_chars, words); - for (i = 0, len = array.length; i < len; ++i) { - if (array[i] === '' || array[i] === '\r') { - output_buffer.push(''); - } else { - output_buffer.push($.terminal.format(array[i], { - linksNoReferrer: settings.linksNoReferrer - })); + if (string === '') { + // ignore empty string, it can happen if line was a function + // that returned empty string in this case whe need to add container + // because on update/resize it can return content + } else if (!options.raw) { + if ((strlen(string) > num_chars || + string.match(/\n/)) && + ((settings.wrap === true && options.wrap === undefined) || + settings.wrap === false && options.wrap === true)) { + var words = options.keepWords; + var array = $.terminal.split_equal(string, num_chars, words); + for (i = 0, len = array.length; i < len; ++i) { + if (array[i] === '' || array[i] === '\r') { + output_buffer.push(''); + } else { + output_buffer.push($.terminal.format(array[i], { + linksNoReferrer: settings.linksNoReferrer + })); + } } + } else { + string = $.terminal.normalize(string); + string = $.terminal.format(string, { + linksNoReferrer: settings.linksNoReferrer + }); + string.split(/\n/).forEach(function(string) { + output_buffer.push(string); + }); } - } else if (!options.raw) { - string = $.terminal.normalize(string); - string = $.terminal.format(string, { - linksNoReferrer: settings.linksNoReferrer - }); - string.split(/\n/).forEach(function(string) { - output_buffer.push(string); - }); } else { output_buffer.push(string); } @@ -4551,7 +4561,8 @@ }, line.options || {}); var string; var arg = line.string; - if ($.type(arg) === 'function') { + var is_function = $.type(arg) === 'function'; + if (is_function) { arg = arg(); } if ($.type(arg) !== 'string') { @@ -4606,6 +4617,9 @@ buffer_line(string, line.index, line_settings); } } + if (string === '' && is_function) { + buffer_line(string, line.index, line_settings); + } } catch (e) { output_buffer = []; // don't display exception if exception throw in terminal @@ -4725,18 +4739,20 @@ // :: Display user greetings or terminal signature // --------------------------------------------------------------------- function show_greetings() { - function echo(string) { - self.echo(string, {finalize: a11y_hide, formatters: false}); - } if (settings.greetings === undefined) { // signature have ascii art so it's not suite for screen readers - echo(self.signature); + self.echo(self.signature, {finalize: a11y_hide, formatters: false}); } else if (settings.greetings) { var type = typeof settings.greetings; if (type === 'string') { - echo(settings.greetings); + self.echo(settings.greetings); } else if (type === 'function') { - settings.greetings.call(self, echo); + try { + settings.greetings.call(self, self.echo); + } catch (e) { + settings.greetings = null; + display_exception(e, 'greetings'); + } } else { self.error(strings().wrongGreetings); } @@ -5065,7 +5081,7 @@ prepare_top_interpreter(); show_greetings(); if (lines.length) { - redraw(); // for case when showing long error before init + self.refresh(); // for case when showing long error before init } // was_paused flag is workaround for case when user call exec before // login and pause in onInit, 3rd exec will have proper timing (will diff --git a/js/jquery.terminal-1.11.2.min.js b/js/jquery.terminal-1.11.2.min.js index 0d6f50ca9..999b6d0c9 100644 --- a/js/jquery.terminal-1.11.2.min.js +++ b/js/jquery.terminal-1.11.2.min.js @@ -4,11 +4,11 @@ * __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ / * / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__ * \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/ - * \/ /____/ version 1.11.2 + * \/ /____/ version DEV * * This file is part of jQuery Terminal. http://terminal.jcubic.pl * - * Copyright (c) 2010-2017 Jakub Jankiewicz + * Copyright (c) 2010-2018 Jakub Jankiewicz * Released under the MIT license * * Contains: @@ -32,6 +32,6 @@ * Copyright (c) 2007-2013 Alexandru Marasteanu * licensed under 3 clause BSD license * - * Date: Thu, 28 Dec 2017 08:38:48 +0000 + * Date: Sun, 07 Jan 2018 08:28:38 +0000 */ -(function(e){var n=function(){if(!n.cache.hasOwnProperty(arguments[0])){n.cache[arguments[0]]=n.parse(arguments[0])}return n.format.call(null,n.cache[arguments[0]],arguments)};n.format=function(e,t){var o=1,a=e.length,s="",l,f=[],c,u,p,m,d,h;for(c=0;c>>0;break;case"x":l=l.toString(16);break;case"X":l=l.toString(16).toUpperCase();break}l=/[def]/.test(p[8])&&p[3]&&l>=0?" +"+l:l;d=p[4]?p[4]==="0"?"0":p[4].charAt(1):" ";h=p[6]-String(l).length;m=p[6]?i(d,h):"";f.push(p[5]?l+m:m+l)}}return f.join("")};n.cache={};n.parse=function(e){var n=e,t=[],r=[],i=0;while(n){if((t=/^[^\x25]+/.exec(n))!==null){r.push(t[0])}else if((t=/^\x25{2}/.exec(n))!==null){r.push("%")}else if((t=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(n))!==null){if(t[2]){i|=1;var o=[],a=t[2],s=[];if((s=/^([a-z_][a-z_\d]*)/i.exec(a))!==null){o.push(s[1]);while((a=a.substring(s[0].length))!==""){if((s=/^\.([a-z_][a-z_\d]*)/i.exec(a))!==null){o.push(s[1])}else if((s=/^\[(\d+)\]/.exec(a))!==null){o.push(s[1])}else{throw"[sprintf] huh?"}}}else{throw"[sprintf] huh?"}t[2]=o}else{i|=2}if(i===3){throw"[sprintf] mixing positional and named placeholders is not (yet) supported"}r.push(t)}else{throw"[sprintf] huh?"}n=n.substring(t[0].length)}return r};var t=function(e,t,r){r=t.slice(0);r.splice(0,0,e);return n.apply(null,r)};function r(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function i(e,n){for(var t=[];n>0;t[--n]=e){}return t.join("")}e.sprintf=n;e.vsprintf=t})(typeof global!=="undefined"?global:window);(function(e){if(typeof define==="function"&&define.amd){define(["jquery"],e)}else if(typeof module==="object"&&module.exports){module.exports=function(n,t){if(t===undefined){if(typeof window!=="undefined"){t=require("jquery")}else{t=require("jquery")(n)}}e(t);return t}}else{e(jQuery)}})(function(e,n){"use strict";function t(){var n=e.Callbacks();var t=false;this.resolve=function(){n.fire();t=true};this.add=function(e){if(t){e()}else{n.add(e)}}}e.omap=function(n,t){var r={};e.each(n,function(e,i){r[e]=t.call(n,e,i)});return r};e.fn.text_length=function(){return this.map(function(){return e(this).text().length}).get().reduce(function(e,n){return e+n},0)};var r={clone_object:function(n){var t={};if(typeof n==="object"){if(e.isArray(n)){return this.clone_array(n)}else if(n===null){return n}else{for(var r in n){if(e.isArray(n[r])){t[r]=this.clone_array(n[r])}else if(typeof n[r]==="object"){t[r]=this.clone_object(n[r])}else{t[r]=n[r]}}}}return t},clone_array:function(n){if(!e.isFunction(Array.prototype.map)){throw new Error("Your browser don't support ES5 array map "+"use es5-shim")}return n.slice(0).map(function(e){if(typeof e==="object"){return this.clone_object(e)}else{return e}}.bind(this))}};var i=function(e){return r.clone_object(e)};var o=function(){try{var e="test",n=window.localStorage;n.setItem(e,"1");n.removeItem(e);return true}catch(e){return false}};var a=function(){try{document.cookie.split(";");return true}catch(e){return false}};var s=o();function l(e,n){var t;if(typeof e==="string"&&typeof n==="string"){d[e]=n;return true}else if(typeof e==="object"&&typeof n==="undefined"){for(t in e){if(e.hasOwnProperty(t)){d[t]=e[t]}}return true}return false}function f(e,n){var t,r,i;t=new Date;t.setTime(t.getTime()+31536e6);r="; expires="+t.toGMTString();if(typeof e==="string"&&typeof n==="string"){document.cookie=e+"="+n+r+"; path=/";return true}else if(typeof e==="object"&&typeof n==="undefined"){for(i in e){if(e.hasOwnProperty(i)){document.cookie=i+"="+e[i]+r+"; path=/"}}return true}return false}function c(e){return d[e]}function u(e){var n,t,r,i;n=e+"=";t=document.cookie.split(";");for(r=0;ri&&i!==0||r.call(e,a)===false){h.timer.remove(e,t,r)}s.inProgress=false};s.$timerID=r.$timerID;if(!e.$timers[t][r.$timerID]){e.$timers[t][r.$timerID]=window.setInterval(s,n)}if(!this.global[t]){this.global[t]=[]}this.global[t].push(e)},remove:function(e,n,t){var r=e.$timers,i;if(r){if(!n){for(var o in r){if(r.hasOwnProperty(o)){this.remove(e,o,t)}}}else if(r[n]){if(t){if(t.$timerID){window.clearInterval(r[n][t.$timerID]);delete r[n][t.$timerID]}}else{for(var a in r[n]){if(r[n].hasOwnProperty(a)){window.clearInterval(r[n][a]);delete r[n][a]}}}for(i in r[n]){if(r[n].hasOwnProperty(i)){break}}if(!i){i=null;delete r[n]}}for(i in r){if(r.hasOwnProperty(i)){break}}if(!i){e.$timers=null}}}}});if(/(msie) ([\w.]+)/.exec(navigator.userAgent.toLowerCase())){e(window).one("unload",function(){var e=h.timer.global;for(var n in e){if(e.hasOwnProperty(n)){var t=e[n],r=t.length;while(--r){h.timer.remove(t[r],n)}}}})}(function(e){if(!String.prototype.split.toString().match(/\[native/)){return}var n=String.prototype.split,t=/()??/.exec("")[1]===e,r;r=function(r,i,o){if(Object.prototype.toString.call(i)!=="[object RegExp]"){return n.call(r,i,o)}var a=[],s=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.extended?"x":"")+(i.sticky?"y":""),l=0,f,c,u,p;i=new RegExp(i.source,s+"g");r+="";if(!t){f=new RegExp("^"+i.source+"$(?!\\s)",s)}o=o===e?-1>>>0:o>>>0;while(c=i.exec(r)){u=c.index+c[0].length;if(u>l){a.push(r.slice(l,c.index));if(!t&&c.length>1){c[0].replace(f,function(){for(var n=1;n1&&c.index=o){break}}if(i.lastIndex===c.index){i.lastIndex++}}if(l===r.length){if(p||!i.test("")){a.push("")}}else{a.push(r.slice(l))}return a.length>o?a.slice(0,o):a};String.prototype.split=function(e,n){return r(this,e,n)};return r})();e.fn.caret=function(e){var n=this[0];var t=n.contentEditable==="true";if(arguments.length===0){if(window.getSelection){if(t){n.focus();var r=window.getSelection().getRangeAt(0),i=r.cloneRange();i.selectNodeContents(n);i.setEnd(r.endContainer,r.endOffset);return i.toString().length}return n.selectionStart}if(document.selection){n.focus();if(t){var r=document.selection.createRange(),i=document.body.createTextRange();i.moveToElementText(n);i.setEndPoint("EndToEnd",r);return i.text.length}var e=0,o=n.createTextRange(),i=document.selection.createRange().duplicate(),a=i.getBookmark();o.moveToBookmark(a);while(o.moveStart("character",-1)!==0)e++;return e}return 0}if(e===-1)e=this[t?"text":"val"]().length;if(window.getSelection){if(t){n.focus();window.getSelection().collapse(n.firstChild,e)}else n.setSelectionRange(e,e)}else if(document.body.createTextRange){var o=document.body.createTextRange();o.moveToElementText(n);o.moveStart("character",e);o.collapse(true);o.select()}if(!t&&!this.is(":focus")){n.focus()}return e};var v=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){return setTimeout(e,20)};e.fn.resizer=function(n){var t=arguments[0]==="unbind";if(!t&&!e.isFunction(n)){throw new Error('Invalid argument, it need to a function or string "unbind".')}if(t){n=e.isFunction(arguments[1])?arguments[1]:null}return this.each(function(){var r=e(this);var i;if(t){i=r.data("callbacks");if(n&&i){i.remove(n);if(!i.has()){i=null}}else{i=null}if(!i){r.removeData("callbacks");if(window.ResizeObserver){var o=r.data("observer");if(o){o.unobserve(this);r.removeData("observer")}}else{r.find(".resizer").remove()}}}else if(r.data("callbacks")){e(this).data("callbacks").add(n)}else{i=e.Callbacks();i.add(n);r.data("callbacks",i);var a;if(window.ResizeObserver){a=new ResizeObserver(function(){var e=r.data("callbacks");e.fire()});a.observe(this);r.data("observer",a);return}var s=this;a=e("
").addClass("resizer").appendTo(this)[0];var l="position: absolute; left: 0; top: 0; right: 0; bottom: 0; "+"overflow: hidden; z-index: -1; visibility: hidden;";var f="position: absolute; left: 0; top: 0; transition: 0s;";a.style.cssText=l;a.innerHTML='
'+'
'+"
"+'
'+'
'+"
";var c=a.childNodes[0];var u=c.childNodes[0];var p=a.childNodes[1];var m,d,h,g;var y=s.offsetWidth;var b=s.offsetHeight;var w=function(){u.style.width="100000px";u.style.height="100000px";c.scrollLeft=1e5;c.scrollTop=1e5;p.scrollLeft=1e5;p.scrollTop=1e5};w();var _=function(){d=0;if(!m){return}y=h;b=g;i.fire()};var x=function(){h=s.offsetWidth;g=s.offsetHeight;m=h!==y||g!==b;if(m&&!d){d=v(_)}w()};e(c).on("scroll",x);e(p).on("scroll",x)}})};function g(e){e.attr({role:"presentation","aria-hidden":"true"})}var y=[];function b(e,n){var t=(e?e+": ":"")+_(n);if(y.indexOf(t)===-1){y.push(t);alert(t+(n.stack?"\n"+n.stack:""))}}function w(e,n){var t=n.offset().left;return n.outerWidth()<=e.clientX-t}function _(e){if(typeof e==="string"){return e}else if(typeof e.fileName==="string"){return e.fileName+": "+e.message}else{return e.message}}function x(){var n=[].slice.call(arguments);var t=0;e.extend(this,{get:function(){return n},index:function(){return t},rotate:function(e){if(!e){var r=n.filter(function(e){return typeof e!=="undefined"});if(!r.length){return}}if(n.length===1){return n[0]}else{if(t===n.length-1){t=0}else{++t}if(typeof n[t]!=="undefined"){return n[t]}else{return this.rotate(true)}}},length:function(){return n.length},remove:function(e){delete n[e]},set:function(e){for(var r=n.length;r--;){if(n[r]===e){t=r;return}}this.append(e);t=n.length-1},front:function(){if(n.length){var e=t;var r=false;while(!n[e]){e++;if(e>n.length){if(r){break}e=0;r=true}}return n[e]}},map:function(e){return n.filter(Boolean).map(e)},forEach:function(e){n.filter(Boolean).forEach(e)},append:function(e){n.push(e)}})}function k(n){var t=n instanceof Array?n:n?[n]:[];e.extend(this,{data:function(){return t},map:function(n){return e.map(t,n)},size:function(){return t.length},pop:function(){if(t.length===0){return null}else{var e=t[t.length-1];t=t.slice(0,t.length-1);return e}},push:function(e){t=t.concat([e]);return e},top:function(){return t.length>0?t[t.length-1]:null},clone:function(){return new k(t.slice(0))}})}function T(n,t,r){var i=true;var o="";if(typeof n==="string"&&n!==""){o=n+"_"}o+="commands";var a;if(r){a=[]}else{a=e.Storage.get(o);a=a?JSON.parse(a):[]}var s=a.length-1;e.extend(this,{append:function(n){if(i){if(a[a.length-1]!==n){a.push(n);if(t&&a.length>t){a=a.slice(-t)}s=a.length-1;if(!r){e.Storage.set(o,JSON.stringify(a))}}}},set:function(n){if(n instanceof Array){a=n;if(!r){e.Storage.set(o,JSON.stringify(a))}}},data:function(){return a},reset:function(){s=a.length-1},last:function(){return a[a.length-1]},end:function(){return s===a.length-1},position:function(){return s},current:function(){return a[s]},next:function(){var e=s;if(s0){--s}if(e!==s){return a[s]}},clear:function(){a=[];this.purge()},enabled:function(){return i},enable:function(){i=true},purge:function(){if(!r){e.Storage.remove(o)}},disable:function(){i=false}})}var E=0;e.fn.cmd=function(t){var r=this;var i=r.data("cmd");if(i){return i}var o=E++;r.addClass("cmd");r.append('');r.append('
'+""+' '+""+"
");g(r.find(".cursor-line"));var a=e("