diff --git a/.npmignore b/.npmignore index 5fdd88fd1..449f89963 100644 --- a/.npmignore +++ b/.npmignore @@ -22,4 +22,4 @@ options files contributors update-contributors -*.in +templates diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ac902f20..7e33fe4af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,21 @@ +## 1.14.0 + +### Features +* pass options to formatters and accept option unixFormattingEscapeBrackets in unix_formatting + (PR by [Marcel Link](https://github.com/ml1nk) +* improve performance of repaint and layout whole page when changing content of the terminal +* use ch unit for wide characters if browser support it (it have wide support then css variables) +* keymap terminal method and allow to set shortcuts on runtime + +### Bugs +* fix newline as first character in formatting [#375](https://github.com/jcubic/jquery.terminal/pull/375). +* fix error when echo undefined (it will echo string undefined since it's converted to string) +* fix first argument to keymap function, it's now keypress event +* fix resizing issue when scrollbar appear/disappear while you type + [#378](https://github.com/jcubic/jquery.terminal/issues/378) +* fix cut of cursor when command line had full length lines and it was at the end + [#379](https://github.com/jcubic/jquery.terminal/issues/379) + ## 1.12.1 * fix minified css file + fix scrollbar diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 33adafe1f..21d6a4d0c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,3 +42,8 @@ you can also run test covarage using ``` make coverage ``` + +## README + +if you want to modify readme please modify the one in templates directory because that one is source file with {{VER}} +markers that get filled with current version. diff --git a/Makefile b/Makefile index 2a26224a5..2f312af26 100644 --- a/Makefile +++ b/Makefile @@ -18,13 +18,15 @@ SPEC_CHECKSUM=`md5sum spec/terminalSpec.js | cut -d' ' -f 1` COMMIT=`git log -n 1 | grep commit | sed 's/commit //'` URL=`git config --get remote.origin.url` +.PHONY: coverage + ALL: Makefile .$(VERSION) terminal.jquery.json bower.json package.json js/jquery.terminal-$(VERSION).js js/jquery.terminal.js js/jquery.terminal-$(VERSION).min.js js/jquery.terminal.min.js css/jquery.terminal-$(VERSION).css css/jquery.terminal-$(VERSION).min.css css/jquery.terminal.min.css css/jquery.terminal.css README.md import.html js/terminal.widget.js www/Makefile -bower.json: bower.in .$(VERSION) - $(SED) -e "s/{{VER}}/$(VERSION)/g" bower.in > bower.json +bower.json: templates/bower.in .$(VERSION) + $(SED) -e "s/{{VER}}/$(VERSION)/g" templates/bower.in > bower.json -package.json: package.in .$(VERSION) - $(SED) -e "s/{{VER}}/$(VERSION)/g" package.in > package.json +package.json: templates/package.in .$(VERSION) + $(SED) -e "s/{{VER}}/$(VERSION)/g" templates/package.in > package.json js/jquery.terminal-$(VERSION).js: js/jquery.terminal-src.js .$(VERSION) $(GIT) branch | grep '* devel' > /dev/null && $(SED) -e "s/{{VER}}/DEV/g" -e "s/{{DATE}}/$(DATE)/g" js/jquery.terminal-src.js > js/jquery.terminal-$(VERSION).js || $(SED) -e "s/{{VER}}/$(VERSION)/g" -e "s/{{DATE}}/$(DATE)/g" js/jquery.terminal-src.js > js/jquery.terminal-$(VERSION).js @@ -50,21 +52,21 @@ css/jquery.terminal.min.css: css/jquery.terminal-$(VERSION).min.css css/jquery.terminal-$(VERSION).min.css: css/jquery.terminal-$(VERSION).css $(CSSNANO) css/jquery.terminal-$(VERSION).css css/jquery.terminal-$(VERSION).min.css --no-discardUnused --safe -README.md: README.in .$(VERSION) +README.md: templates/README.in .$(VERSION) $(GIT) branch | grep '* devel' > /dev/null && $(SED) -e "s/{{VER}}/DEV/g" -e \ "s/{{BRANCH}}/$(BRANCH)/g" -e "s/{{CHECKSUM}}/$(SPEC_CHECKSUM)/" \ - -e "s/{{COMMIT}}/$(COMMIT)/g" < README.in > README.md || $(SED) -e \ + -e "s/{{COMMIT}}/$(COMMIT)/g" < templates/README.in > README.md || $(SED) -e \ "s/{{VER}}/$(VERSION)/g" -e "s/{{BRANCH}}/$(BRANCH)/g" -e \ - "s/{{CHECKSUM}}/$(SPEC_CHECKSUM)/" -e "s/{{COMMIT}}/$(COMMIT)/g" < README.in > README.md + "s/{{CHECKSUM}}/$(SPEC_CHECKSUM)/" -e "s/{{COMMIT}}/$(COMMIT)/g" < templates/README.in > README.md .$(VERSION): Makefile touch .$(VERSION) -Makefile: Makefile.in - $(SED) -e "s/{{VER""SION}}/"$(VERSION)"/" Makefile.in > Makefile +Makefile: templates/Makefile.in + $(SED) -e "s/{{VER""SION}}/"$(VERSION)"/" templates/Makefile.in > Makefile -import.html: import.in - $(SED) -e "s/{{BRANCH}}/$(BRANCH)/g" import.in > import.html +import.html: templates/import.in + $(SED) -e "s/{{BRANCH}}/$(BRANCH)/g" templates/import.in > import.html js/terminal.widget.js: js/terminal.widget.in $(GIT) branch | grep '* devel' > /dev/null || $(SED) -e "s/{{VER}}/$(VERSION)/g" js/terminal.widget.in > js/terminal.widget.js @@ -78,7 +80,7 @@ www/Makefile: $(wildcard www/Makefile.in) Makefile .$(VERSION) test: $(JASMINE) --captureExceptions --verbose --junitreport --color --forceexit spec -cover: +coverage: $(ISTANBUL) cover node_modules/jasmine/bin/jasmine.js coveralls: diff --git a/README.md b/README.md index ba10d19f1..26b402c3a 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,18 @@ __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ / / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__ \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/ - \/ /____/ version 1.12.1 + \/ /____/ version DEV ``` http://terminal.jcubic.pl -[![npm](https://img.shields.io/badge/npm-1.12.1-blue.svg)](https://www.npmjs.com/package/jquery.terminal) -![bower](https://img.shields.io/badge/bower-1.12.1-yellow.svg) -[![travis](https://travis-ci.org/jcubic/jquery.terminal.svg?branch=master&d76c147a6f7e17ec861355a4bc09a202e321b20d)](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&020287b3e681eabd0aee6b4f291208d57f4329e6)](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&705f81311e25989b4ee57676db0f7564)](https://coveralls.io/github/jcubic/jquery.terminal?branch=master) +[![Coverage Status](https://coveralls.io/repos/github/jcubic/jquery.terminal/badge.svg?branch=devel&a403bddc443d55ece038847bb49f3786)](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) +[![](https://data.jsdelivr.com/v1/package/npm/jquery.terminal/badge?style=rounded)](https://www.jsdelivr.com/package/npm/jquery.terminal) ### Summary @@ -67,20 +68,20 @@ Include jQuery library, you can use cdn from http://jquery.com/download/ ``` -Then include js/jquery.terminal-1.12.1.min.js and css/jquery.terminal-1.12.1.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): diff --git a/css/jquery.terminal-1.12.1.css b/css/jquery.terminal-1.12.1.css index c509e6485..38ed13da0 100644 --- a/css/jquery.terminal-1.12.1.css +++ b/css/jquery.terminal-1.12.1.css @@ -4,7 +4,7 @@ * __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ / * / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__ * \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/ - * \/ /____/ version 1.12.1 + * \/ /____/ version DEV * http://terminal.jcubic.pl * * This file is part of jQuery Terminal. @@ -12,7 +12,7 @@ * Copyright (c) 2011-2018 Jakub Jankiewicz * Released under the MIT license * - * Date: Sat, 03 Mar 2018 21:54:25 +0000 + * Date: Fri, 23 Mar 2018 20:04:17 +0000 */ .terminal .terminal-output .format, .cmd .format, .cmd .prompt, .cmd .prompt div, .terminal .terminal-output div div{ @@ -67,7 +67,10 @@ position: relative; /*overflow: hidden;*/ overflow-y: auto; - overflow-x: hidden; + /* overflow-x: hidden; */ +} +.terminal, .cmd { + contain: content; } body.terminal { height: 100%; @@ -77,6 +80,20 @@ body.terminal { .terminal > div { overflow: hidden; } +.terminal > .resizer, .terminal > .font .resizer{ + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + overflow: hidden; + z-index: -1; + visibility: hidden; + height: 100%; + border: none; + padding: 0; + width: 100% +} .cmd { padding: 0; position: relative; diff --git a/css/jquery.terminal-1.12.1.min.css b/css/jquery.terminal-1.12.1.min.css index 7af4a5fdb..e5140f630 100644 --- a/css/jquery.terminal-1.12.1.min.css +++ b/css/jquery.terminal-1.12.1.min.css @@ -4,7 +4,7 @@ * __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ / * / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__ * \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/ - * \/ /____/ version 1.12.1 + * \/ /____/ version DEV * http://terminal.jcubic.pl * * This file is part of jQuery Terminal. @@ -12,5 +12,5 @@ * Copyright (c) 2011-2018 Jakub Jankiewicz * Released under the MIT license * - * Date: Sat, 03 Mar 2018 21:54:25 +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:1000;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:100%;min-height:100vh;margin:0}.terminal>div{overflow:hidden}.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:terminal-blink 1s infinite step-start;animation:terminal-blink 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:-100%;left:0;margin-bottom:1px}.terminal .terminal-output div span{display:inline-block}.cmd>span:not(.prompt){float:left}.cmd .prompt span.line{display:block;float:none}.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 .raw 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 .raw 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:1100}.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 terminal-blink{0%,to{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}@keyframes terminal-blink{0%,to{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}@-webkit-keyframes terminal-bar{0%,to{border-left-color:#aaa}50%{border-left-color:#000}}@keyframes terminal-bar{0%,to{border-left-color:#aaa}50%{border-left-color:#000}}@-webkit-keyframes terminal-underline{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 terminal-underline{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:terminal-underline;animation-name:terminal-underline}.bar-animation .cursor.blink{-webkit-animation-name:terminal-bar;animation-name:terminal-bar}@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, 7.23438) * 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,terminal-blink) 1s infinite step-start;animation:var(--animation,terminal-blink) 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 terminal-blink{0%,to{background-color:var(--background,#000);color:var(--color,#aaa)}50%{background-color:var(--color,#aaa);color:var(--background,#000)}}@keyframes terminal-blink{0%,to{background-color:var(--background,#000);color:var(--color,#aaa)}50%{background-color:var(--color,#aaa);color:var(--background,#000)}}@-webkit-keyframes terminal-bar{0%,to{border-left-color:var(--background,#000)}50%{border-left-color:var(--color,#aaa)}}@keyframes terminal-bar{0%,to{border-left-color:var(--background,#000)}50%{border-left-color:var(--color,#aaa)}}@-webkit-keyframes terminal-underline{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 terminal-underline{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: Fri, 23 Mar 2018 20:04:17 +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:1000;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}.cmd,.terminal{contain:content}body.terminal{height:100%;min-height:100vh;margin:0}.terminal>div{overflow:hidden}.terminal>.font .resizer,.terminal>.resizer{position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;z-index:-1;visibility:hidden;height:100%;border:none;padding:0;width: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:terminal-blink 1s infinite step-start;animation:terminal-blink 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:-100%;left:0;margin-bottom:1px}.terminal .terminal-output div span{display:inline-block}.cmd>span:not(.prompt){float:left}.cmd .prompt span.line{display:block;float:none}.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 .raw 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 .raw 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:1100}.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 terminal-blink{0%,to{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}@keyframes terminal-blink{0%,to{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}@-webkit-keyframes terminal-bar{0%,to{border-left-color:#aaa}50%{border-left-color:#000}}@keyframes terminal-bar{0%,to{border-left-color:#aaa}50%{border-left-color:#000}}@-webkit-keyframes terminal-underline{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 terminal-underline{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:terminal-underline;animation-name:terminal-underline}.bar-animation .cursor.blink{-webkit-animation-name:terminal-bar;animation-name:terminal-bar}@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, 7.23438) * 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,terminal-blink) 1s infinite step-start;animation:var(--animation,terminal-blink) 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 terminal-blink{0%,to{background-color:var(--background,#000);color:var(--color,#aaa)}50%{background-color:var(--color,#aaa);color:var(--background,#000)}}@keyframes terminal-blink{0%,to{background-color:var(--background,#000);color:var(--color,#aaa)}50%{background-color:var(--color,#aaa);color:var(--background,#000)}}@-webkit-keyframes terminal-bar{0%,to{border-left-color:var(--background,#000)}50%{border-left-color:var(--color,#aaa)}}@keyframes terminal-bar{0%,to{border-left-color:var(--background,#000)}50%{border-left-color:var(--color,#aaa)}}@-webkit-keyframes terminal-underline{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 terminal-underline{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 b3996e875..ce23802ef 100644 --- a/css/jquery.terminal-src.css +++ b/css/jquery.terminal-src.css @@ -67,7 +67,10 @@ position: relative; /*overflow: hidden;*/ overflow-y: auto; - overflow-x: hidden; + /* overflow-x: hidden; */ +} +.terminal, .cmd { + contain: content; } body.terminal { height: 100%; @@ -77,6 +80,20 @@ body.terminal { .terminal > div { overflow: hidden; } +.terminal > .resizer, .terminal > .font .resizer{ + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + overflow: hidden; + z-index: -1; + visibility: hidden; + height: 100%; + border: none; + padding: 0; + width: 100% +} .cmd { padding: 0; position: relative; diff --git a/css/jquery.terminal.css b/css/jquery.terminal.css index c509e6485..38ed13da0 100644 --- a/css/jquery.terminal.css +++ b/css/jquery.terminal.css @@ -4,7 +4,7 @@ * __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ / * / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__ * \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/ - * \/ /____/ version 1.12.1 + * \/ /____/ version DEV * http://terminal.jcubic.pl * * This file is part of jQuery Terminal. @@ -12,7 +12,7 @@ * Copyright (c) 2011-2018 Jakub Jankiewicz * Released under the MIT license * - * Date: Sat, 03 Mar 2018 21:54:25 +0000 + * Date: Fri, 23 Mar 2018 20:04:17 +0000 */ .terminal .terminal-output .format, .cmd .format, .cmd .prompt, .cmd .prompt div, .terminal .terminal-output div div{ @@ -67,7 +67,10 @@ position: relative; /*overflow: hidden;*/ overflow-y: auto; - overflow-x: hidden; + /* overflow-x: hidden; */ +} +.terminal, .cmd { + contain: content; } body.terminal { height: 100%; @@ -77,6 +80,20 @@ body.terminal { .terminal > div { overflow: hidden; } +.terminal > .resizer, .terminal > .font .resizer{ + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + overflow: hidden; + z-index: -1; + visibility: hidden; + height: 100%; + border: none; + padding: 0; + width: 100% +} .cmd { padding: 0; position: relative; diff --git a/css/jquery.terminal.min.css b/css/jquery.terminal.min.css index 7af4a5fdb..e5140f630 100644 --- a/css/jquery.terminal.min.css +++ b/css/jquery.terminal.min.css @@ -4,7 +4,7 @@ * __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ / * / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__ * \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/ - * \/ /____/ version 1.12.1 + * \/ /____/ version DEV * http://terminal.jcubic.pl * * This file is part of jQuery Terminal. @@ -12,5 +12,5 @@ * Copyright (c) 2011-2018 Jakub Jankiewicz * Released under the MIT license * - * Date: Sat, 03 Mar 2018 21:54:25 +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:1000;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:100%;min-height:100vh;margin:0}.terminal>div{overflow:hidden}.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:terminal-blink 1s infinite step-start;animation:terminal-blink 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:-100%;left:0;margin-bottom:1px}.terminal .terminal-output div span{display:inline-block}.cmd>span:not(.prompt){float:left}.cmd .prompt span.line{display:block;float:none}.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 .raw 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 .raw 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:1100}.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 terminal-blink{0%,to{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}@keyframes terminal-blink{0%,to{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}@-webkit-keyframes terminal-bar{0%,to{border-left-color:#aaa}50%{border-left-color:#000}}@keyframes terminal-bar{0%,to{border-left-color:#aaa}50%{border-left-color:#000}}@-webkit-keyframes terminal-underline{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 terminal-underline{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:terminal-underline;animation-name:terminal-underline}.bar-animation .cursor.blink{-webkit-animation-name:terminal-bar;animation-name:terminal-bar}@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, 7.23438) * 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,terminal-blink) 1s infinite step-start;animation:var(--animation,terminal-blink) 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 terminal-blink{0%,to{background-color:var(--background,#000);color:var(--color,#aaa)}50%{background-color:var(--color,#aaa);color:var(--background,#000)}}@keyframes terminal-blink{0%,to{background-color:var(--background,#000);color:var(--color,#aaa)}50%{background-color:var(--color,#aaa);color:var(--background,#000)}}@-webkit-keyframes terminal-bar{0%,to{border-left-color:var(--background,#000)}50%{border-left-color:var(--color,#aaa)}}@keyframes terminal-bar{0%,to{border-left-color:var(--background,#000)}50%{border-left-color:var(--color,#aaa)}}@-webkit-keyframes terminal-underline{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 terminal-underline{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: Fri, 23 Mar 2018 20:04:17 +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:1000;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}.cmd,.terminal{contain:content}body.terminal{height:100%;min-height:100vh;margin:0}.terminal>div{overflow:hidden}.terminal>.font .resizer,.terminal>.resizer{position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;z-index:-1;visibility:hidden;height:100%;border:none;padding:0;width: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:terminal-blink 1s infinite step-start;animation:terminal-blink 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:-100%;left:0;margin-bottom:1px}.terminal .terminal-output div span{display:inline-block}.cmd>span:not(.prompt){float:left}.cmd .prompt span.line{display:block;float:none}.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 .raw 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 .raw 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:1100}.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 terminal-blink{0%,to{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}@keyframes terminal-blink{0%,to{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}@-webkit-keyframes terminal-bar{0%,to{border-left-color:#aaa}50%{border-left-color:#000}}@keyframes terminal-bar{0%,to{border-left-color:#aaa}50%{border-left-color:#000}}@-webkit-keyframes terminal-underline{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 terminal-underline{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:terminal-underline;animation-name:terminal-underline}.bar-animation .cursor.blink{-webkit-animation-name:terminal-bar;animation-name:terminal-bar}@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, 7.23438) * 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,terminal-blink) 1s infinite step-start;animation:var(--animation,terminal-blink) 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 terminal-blink{0%,to{background-color:var(--background,#000);color:var(--color,#aaa)}50%{background-color:var(--color,#aaa);color:var(--background,#000)}}@keyframes terminal-blink{0%,to{background-color:var(--background,#000);color:var(--color,#aaa)}50%{background-color:var(--color,#aaa);color:var(--background,#000)}}@-webkit-keyframes terminal-bar{0%,to{border-left-color:var(--background,#000)}50%{border-left-color:var(--color,#aaa)}}@keyframes terminal-bar{0%,to{border-left-color:var(--background,#000)}50%{border-left-color:var(--color,#aaa)}}@-webkit-keyframes terminal-underline{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 terminal-underline{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/jquery.terminal-1.12.1.js b/js/jquery.terminal-1.12.1.js index a1f3b9ff1..d97f694c5 100644 --- a/js/jquery.terminal-1.12.1.js +++ b/js/jquery.terminal-1.12.1.js @@ -4,7 +4,7 @@ * __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ / * / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__ * \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/ - * \/ /____/ version 1.12.1 + * \/ /____/ version DEV * * This file is part of jQuery Terminal. http://terminal.jcubic.pl * @@ -32,7 +32,7 @@ * Copyright (c) 2007-2013 Alexandru Marasteanu * licensed under 3 clause BSD license * - * Date: Sat, 03 Mar 2018 21:33:53 +0000 + * Date: Fri, 23 Mar 2018 20:04:16 +0000 */ /* TODO: @@ -736,17 +736,9 @@ return pos; }; /* eslint-enable */ - var requestAnimationFrame = - window.requestAnimationFrame || - window.mozRequestAnimationFrame || - window.webkitRequestAnimationFrame || - function(fn) { - return setTimeout(fn, 20); - }; // ----------------------------------------------------------------------- - // :: Cross-browser resize element plugin - // :: Taken from ResizeSensor.js file from marcj/css-element-queries (MIT license) - // :: not all jQuerifided + // :: Cross-browser resize element plugin using sentinel iframe or + // :: resizeObserver // ----------------------------------------------------------------------- $.fn.resizer = function(callback) { var unbind = arguments[0] === "unbind"; @@ -760,6 +752,7 @@ } return this.each(function() { var $this = $(this); + var iframe; var callbacks; if (unbind) { callbacks = $this.data('callbacks'); @@ -780,7 +773,12 @@ $this.removeData('observer'); } } else { - $this.find('.resizer').remove(); + iframe = $this.find('> iframe'); + if (iframe.length) { + // just in case of memory leaks in IE + $(iframe[0].contentWindow).off('resize').remove(); + iframe.remove(); + } } } } else if ($this.data('callbacks')) { @@ -801,67 +799,13 @@ }); resizer.observe(this); $this.data('observer', resizer); - return; - } - var self = this; - resizer = $('
').addClass('resizer').appendTo(this)[0]; - var style = - 'position: absolute; left: 0; top: 0; right: 0; bottom: 0; ' + - 'overflow: hidden; z-index: -1; visibility: hidden;'; - var styleChild = 'position: absolute; left: 0; top: 0; transition: 0s;'; - resizer.style.cssText = style; - resizer.innerHTML = - '
' + - '
' + "
" + - '
' + - '
' + - "
"; - - var expand = resizer.childNodes[0]; - var expandChild = expand.childNodes[0]; - var shrink = resizer.childNodes[1]; - var dirty, rafId, newWidth, newHeight; - var lastWidth = self.offsetWidth; - var lastHeight = self.offsetHeight; - - var reset = function() { - expandChild.style.width = '100000px'; - expandChild.style.height = '100000px'; - - expand.scrollLeft = 100000; - expand.scrollTop = 100000; - - shrink.scrollLeft = 100000; - shrink.scrollTop = 100000; - }; - - reset(); - - var onResized = function() { - rafId = 0; - - if (!dirty) { - return; - } - - lastWidth = newWidth; - lastHeight = newHeight; - callbacks.fire(); - }; - - var onScroll = function() { - newWidth = self.offsetWidth; - newHeight = self.offsetHeight; - dirty = newWidth !== lastWidth || newHeight !== lastHeight; - - if (dirty && !rafId) { - rafId = requestAnimationFrame(onResized); - } + } else { + iframe = $('