Skip to content

Commit

Permalink
sixel support (#423)
Browse files Browse the repository at this point in the history
* sixel support

* revert to hardcopy, exclude from linter/prettifier
  • Loading branch information
jerch authored Aug 25, 2022
1 parent 62fac79 commit 3d9bdce
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/assets/xterm-addon-image-worker.js
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/assets/xterm-addon-image-worker.js
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
"winston": "^3.3.3",
"xterm": "^4.19.0",
"xterm-addon-fit": "^0.5.0",
"xterm-addon-image": "^0.1.0",
"xterm-addon-web-links": "^0.6.0",
"yargs": "^15.4.1"
},
Expand Down
3 changes: 3 additions & 0 deletions src/assets/xterm-addon-image-worker.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/client/wetty/term.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import _ from 'lodash';
import { Terminal } from 'xterm';
import { FitAddon } from 'xterm-addon-fit';
import { WebLinksAddon } from 'xterm-addon-web-links';
import { ImageAddon } from 'xterm-addon-image';

import type { Options } from './term/confiruragtion/shared/options';
import { loadOptions } from './term/confiruragtion/load';
Expand All @@ -20,6 +21,9 @@ export class Term extends Terminal {
this.fitAddon = new FitAddon();
this.loadAddon(this.fitAddon);
this.loadAddon(new WebLinksAddon());
// Note: worker file is currently hard copied from xterm-addon-image,
// the file needs to be refreshed upon a newer package version
this.loadAddon(new ImageAddon('/wetty/assets/xterm-addon-image-worker.js'));
this.loadOptions = loadOptions;
}

Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7001,6 +7001,11 @@ xterm-addon-fit@^0.5.0:
resolved "https://registry.yarnpkg.com/xterm-addon-fit/-/xterm-addon-fit-0.5.0.tgz#2d51b983b786a97dcd6cde805e700c7f913bc596"
integrity sha512-DsS9fqhXHacEmsPxBJZvfj2la30Iz9xk+UKjhQgnYNkrUIN5CYLbw7WEfz117c7+S86S/tpHPfvNxJsF5/G8wQ==

xterm-addon-image@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/xterm-addon-image/-/xterm-addon-image-0.1.0.tgz#ead96aa224f5fcbfb45da2907f02368fe92985e6"
integrity sha512-xMvcEQ2rVUIXbbj5BRhznrZU24CRaMiSo8l2HH/E1FeE+G+KKduoF6mwja856/n4ekZ7K0ALZmmyDsbZODhDqQ==

xterm-addon-web-links@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/xterm-addon-web-links/-/xterm-addon-web-links-0.6.0.tgz#0296cb6c99588847894670d998c9ea6a6aeb26ee"
Expand Down

0 comments on commit 3d9bdce

Please sign in to comment.