From: Shuanglei Tao Date: Wed, 28 Aug 2019 14:18:37 +0000 (+0800) Subject: xterm.js 3.15.0-vscode1 X-Git-Url: http://git.prime8.dev/?a=commitdiff_plain;h=32cf6214d295e0b844f4dfc49f68d39de9fa55ed;p=ttyd.git xterm.js 3.15.0-vscode1 --- diff --git a/html/package.json b/html/package.json index 5177f70..b4e76a9 100644 --- a/html/package.json +++ b/html/package.json @@ -61,8 +61,8 @@ "backoff": "^2.5.0", "decko": "^1.2.0", "preact": "^8.5.0", - "xterm": "^3.14.5", - "xterm-addon-fit": "^0.1.0-beta1", + "xterm": "^3.15.0-vscode1", + "xterm-addon-fit": "^0.1.0", "xterm-addon-web-links": "^0.1.0-beta10", "zmodem.js": "^0.1.9" } diff --git a/html/src/components/terminal/index.tsx b/html/src/components/terminal/index.tsx index f8f4a99..d34efc6 100644 --- a/html/src/components/terminal/index.tsx +++ b/html/src/components/terminal/index.tsx @@ -8,9 +8,11 @@ import { WebLinksAddon } from 'xterm-addon-web-links'; import { OverlayAddon } from './overlay'; import { ZmodemAddon } from '../zmodem'; -import 'xterm/dist/xterm.css'; +import 'xterm/css/xterm.css'; -type TerminalExtended = Terminal & FitAddon; +export interface TerminalExtended extends Terminal { + fit(); +} export interface WindowExtended extends Window { term: TerminalExtended; @@ -121,7 +123,7 @@ export class Xterm extends Component { this.socket = new WebSocket(this.props.url, ['tty']); this.terminal = new Terminal(this.props.options); const { socket, terminal, container, fitAddon, overlayAddon } = this; - window.term = terminal; + window.term = terminal as TerminalExtended; window.term.fit = () => { this.fitAddon.fit(); }; diff --git a/html/yarn.lock b/html/yarn.lock index e012227..4571668 100644 --- a/html/yarn.lock +++ b/html/yarn.lock @@ -8960,20 +8960,20 @@ xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1: resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= -xterm-addon-fit@^0.1.0-beta1: - version "0.1.0-beta1" - resolved "https://registry.yarnpkg.com/xterm-addon-fit/-/xterm-addon-fit-0.1.0-beta1.tgz#ec483fe4cad466de290be7e5539c8beed757b851" - integrity sha512-4HVm1RVqvBiIxBUxjjN63KIumI/mZYJ5lXkoR/onO//mh2Z2e257DmX1UqgCd2gi99EmZTt5CtEUinUANAkbvg== +xterm-addon-fit@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/xterm-addon-fit/-/xterm-addon-fit-0.1.0.tgz#dd52d8b2ec6ef05faab8285bafd9310063704468" + integrity sha512-DzYThnR5rXYX7JrOZ8rHGMU36BiTwYNFUOhhNwrDSFvoUR2MgwQrfA/JrqLE62KRj0D8bkRR7+xe7qGBp1O4Rw== xterm-addon-web-links@^0.1.0-beta10: version "0.1.0-beta10" resolved "https://registry.yarnpkg.com/xterm-addon-web-links/-/xterm-addon-web-links-0.1.0-beta10.tgz#610fa9773a2a5ccd41c1c83ba0e2dd2c9eb66a23" integrity sha512-xfpjy0V6bB4BR44qIgZQPoCMVakxb65gMscPkHpO//QxvUxKzabV3dxOsIbeZRFkUGsWTFlvz2OoaBLoNtv5gg== -xterm@^3.14.5: - version "3.14.5" - resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.14.5.tgz#c9d14e48be6873aa46fb429f22f2165557fd2dea" - integrity sha512-DVmQ8jlEtL+WbBKUZuMxHMBgK/yeIZwkXB81bH+MGaKKnJGYwA+770hzhXPfwEIokK9On9YIFPRleVp/5G7z9g== +xterm@^3.15.0-vscode1: + version "3.15.0-vscode1" + resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.15.0-vscode1.tgz#56dbdf5feb180bd5049904b21285d3f688d1fa46" + integrity sha512-Jnx83q9XFnvCR61dba1g5z3RFw6q9YztUV+7eqMbd9I+hGPYaGF6uJm2Kc/q/t1Jr94kkYHpzbwhIh/GuvEpzw== y18n@^3.2.1: version "3.2.1" diff --git a/src/index.html b/src/index.html index c64bed0..95140c8 100644 --- a/src/index.html +++ b/src/index.html @@ -1 +1 @@ -ttyd - Terminal \ No newline at end of file +ttyd - Terminal \ No newline at end of file