Skip to content

Commit

Permalink
Integrate xterm v3.2 (#2768)
Browse files Browse the repository at this point in the history
* Add xterm3.2

Fixes #2751
  • Loading branch information
chabou authored Mar 17, 2018
1 parent 7e40e88 commit 4297103
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 41 deletions.
2 changes: 1 addition & 1 deletion lib/components/split-pane.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default class SplitPane extends React.PureComponent {
render() {
const children = this.props.children;
const {direction, borderColor} = this.props;
const sizeProperty = direction === 'horizontal' ? 'height' : 'flexBasis';
const sizeProperty = direction === 'horizontal' ? 'height' : 'width';
let {sizes} = this.props;
if (!sizes) {
// workaround for the fact that if we don't specify
Expand Down
33 changes: 33 additions & 0 deletions lib/components/style-sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ export default class StyleSheet extends React.PureComponent {
/* On OS X this is required in order for the scroll bar to appear fully opaque */
background-color: ${backgroundColor};
overflow-y: scroll;
cursor: default;
position: absolute;
right: 0;
left: 0;
top: 0;
bottom: 0;
}
.xterm .xterm-screen {
position: relative;
}
.xterm canvas {
Expand Down Expand Up @@ -94,6 +104,29 @@ export default class StyleSheet extends React.PureComponent {
cursor: text;
}
.xterm .xterm-accessibility,
.xterm .xterm-message {
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
z-index: 100;
color: transparent;
}
.xterm .xterm-accessibility-tree:focus [id^='xterm-active-item-'] {
outline: 1px solid #f80;
}
.xterm .live-region {
position: absolute;
left: -9999px;
width: 1px;
height: 1px;
overflow: hidden;
}
::-webkit-scrollbar {
width: 5px;
}
Expand Down
52 changes: 15 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,14 @@
"prepush": "yarn test",
"postinstall": "electron-builder install-app-deps && yarn run rebuild-node-pty && yarn --cwd node_modules/xterm",
"rebuild-node-pty": "electron-rebuild -f -w app/node_modules/node-pty -m app",
"dist": "yarn run build && cross-env BABEL_ENV=production babel --out-file app/renderer/bundle.js --no-comments --minified app/renderer/bundle.js && build",
"clean": "node ./bin/rimraf-standalone.js node_modules && node ./bin/rimraf-standalone.js ./app/node_modules && node ./bin/rimraf-standalone.js ./app/renderer"
"dist":
"yarn run build && cross-env BABEL_ENV=production babel --out-file app/renderer/bundle.js --no-comments --minified app/renderer/bundle.js && build",
"clean":
"node ./bin/rimraf-standalone.js node_modules && node ./bin/rimraf-standalone.js ./app/node_modules && node ./bin/rimraf-standalone.js ./app/renderer"
},
"eslintConfig": {
"plugins": [
"react",
"prettier"
],
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"prettier"
],
"plugins": ["react", "prettier"],
"extends": ["eslint:recommended", "plugin:react/recommended", "prettier"],
"parserOptions": {
"ecmaVersion": 8,
"sourceType": "module",
Expand All @@ -41,10 +36,7 @@
"node": true
},
"rules": {
"func-names": [
"error",
"as-needed"
],
"func-names": ["error", "as-needed"],
"no-shadow": "error",
"no-extra-semi": 0,
"react/prop-types": 0,
Expand Down Expand Up @@ -90,9 +82,7 @@
]
},
"babel": {
"presets": [
"react"
],
"presets": ["react"],
"plugins": [
[
"styled-jsx/babel",
Expand Down Expand Up @@ -137,38 +127,28 @@
{
"from": "./build/${os}/",
"to": "./bin/",
"filter": [
"hyper*"
]
"filter": ["hyper*"]
}
],
"linux": {
"category": "TerminalEmulator",
"target": [
{
"target": "deb",
"arch": [
"x64"
]
"arch": ["x64"]
},
{
"target": "AppImage",
"arch": [
"x64"
]
"arch": ["x64"]
},
{
"target": "rpm",
"arch": [
"x64"
]
"arch": ["x64"]
}
]
},
"win": {
"target": [
"squirrel"
]
"target": ["squirrel"]
},
"mac": {
"category": "public.app-category.developer-tools",
Expand All @@ -182,9 +162,7 @@
},
"protocols": {
"name": "ssh URL",
"schemes": [
"ssh"
]
"schemes": ["ssh"]
}
},
"license": "MIT",
Expand Down Expand Up @@ -221,7 +199,7 @@
"styled-jsx": "2.2.6",
"stylis": "3.5.0",
"uuid": "3.1.0",
"xterm": "chabou/xterm.js#b9dac85"
"xterm": "3.2.0"
},
"devDependencies": {
"ava": "0.25.0",
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6693,9 +6693,9 @@ xtend@~2.1.1:
dependencies:
object-keys "~0.4.0"

xterm@chabou/xterm.js#b9dac85:
version "3.0.0-hyper.2"
resolved "https://codeload.github.com/chabou/xterm.js/tar.gz/b9dac85cf33bdc19c31ac0ba223c5f2a3b11e6d2"
xterm@3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.2.0.tgz#da50f54a83d81463c0a2c9f2e0a5d14d3867df02"

y18n@^3.2.1:
version "3.2.1"
Expand Down

0 comments on commit 4297103

Please sign in to comment.