diff --git a/Makefile b/Makefile index 498f28e2..7cbd54b5 100644 --- a/Makefile +++ b/Makefile @@ -335,6 +335,6 @@ build/libwabt.js: rm build/1.0.6.zip build/xterm.js: - curl https://cdn.jsdelivr.net/npm/xterm@4.9.0/lib/xterm.js > build/xterm.js - curl https://cdn.jsdelivr.net/npm/xterm@4.9.0/lib/xterm.js.map > build/xterm.js.map - curl https://cdn.jsdelivr.net/npm/xterm@4.9.0/css/xterm.css > build/xterm.css + curl https://cdn.jsdelivr.net/npm/xterm@5.2.1/lib/xterm.min.js > build/xterm.js + curl https://cdn.jsdelivr.net/npm/xterm@5.2.1/lib/xterm.js.map > build/xterm.js.map + curl https://cdn.jsdelivr.net/npm/xterm@5.2.1/css/xterm.css > build/xterm.css diff --git a/index.html b/index.html index 7ca036d8..dbe38c75 100644 --- a/index.html +++ b/index.html @@ -201,7 +201,7 @@ -
+

diff --git a/src/browser/serial.js b/src/browser/serial.js index 7c59050a..fda159c3 100644 --- a/src/browser/serial.js +++ b/src/browser/serial.js @@ -223,8 +223,9 @@ function SerialAdapterXtermJS(element, bus) return; } - var term = this.term = new window["Terminal"](); - term["setOption"]("logLevel", "off"); + var term = this.term = new window["Terminal"]({ + "logLevel": "off", + }); term.write("This is the serial console. Whatever you type or paste here will be sent to COM1"); const on_data_disposable = term["onData"](function(data) { diff --git a/v86.css b/v86.css index bac71441..c018ad6e 100644 --- a/v86.css +++ b/v86.css @@ -124,7 +124,7 @@ h4 { /* the code below was copied from xterm.css */ .xterm { - font-feature-settings: "liga" 0; + cursor: text; position: relative; user-select: none; -ms-user-select: none; @@ -213,16 +213,13 @@ h4 { line-height: normal; } -.xterm { - cursor: text; -} - .xterm.enable-mouse-events { /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */ cursor: default; } -.xterm.xterm-cursor-pointer { +.xterm.xterm-cursor-pointer, +.xterm .xterm-cursor-pointer { cursor: pointer; } @@ -240,6 +237,7 @@ h4 { right: 0; z-index: 10; color: transparent; + pointer-events: none; } .xterm .live-region { @@ -251,9 +249,49 @@ h4 { } .xterm-dim { - opacity: 0.5; + /* Dim should not apply to background, so the opacity of the foreground color is applied + * explicitly in the generated class and reset to 1 here */ + opacity: 1 !important; } -.xterm-underline { - text-decoration: underline; +.xterm-underline-1 { text-decoration: underline; } +.xterm-underline-2 { text-decoration: double underline; } +.xterm-underline-3 { text-decoration: wavy underline; } +.xterm-underline-4 { text-decoration: dotted underline; } +.xterm-underline-5 { text-decoration: dashed underline; } + +.xterm-overline { + text-decoration: overline; +} + +.xterm-overline.xterm-underline-1 { text-decoration: overline underline; } +.xterm-overline.xterm-underline-2 { text-decoration: overline double underline; } +.xterm-overline.xterm-underline-3 { text-decoration: overline wavy underline; } +.xterm-overline.xterm-underline-4 { text-decoration: overline dotted underline; } +.xterm-overline.xterm-underline-5 { text-decoration: overline dashed underline; } + +.xterm-strikethrough { + text-decoration: line-through; +} + +.xterm-screen .xterm-decoration-container .xterm-decoration { + z-index: 6; + position: absolute; +} + +.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer { + z-index: 7; +} + +.xterm-decoration-overview-ruler { + z-index: 8; + position: absolute; + top: 0; + right: 0; + pointer-events: none; +} + +.xterm-decoration-top { + z-index: 2; + position: relative; }