|
1 |
| -import "xterm/css/xterm.css"; |
| 1 | +import "@xterm/xterm/css/xterm.css"; |
2 | 2 | import type { Interpolation, Theme } from "@emotion/react";
|
| 3 | +import { Terminal } from "@xterm/xterm"; |
| 4 | +import { CanvasAddon } from "@xterm/addon-canvas"; |
| 5 | +import { FitAddon } from "@xterm/addon-fit"; |
| 6 | +import { Unicode11Addon } from "@xterm/addon-unicode11"; |
| 7 | +import { WebLinksAddon } from "@xterm/addon-web-links"; |
| 8 | +import { WebglAddon } from "@xterm/addon-webgl"; |
3 | 9 | import { type FC, useCallback, useEffect, useRef, useState } from "react";
|
4 | 10 | import { Helmet } from "react-helmet-async";
|
5 | 11 | import { useQuery } from "react-query";
|
6 | 12 | import { useNavigate, useParams, useSearchParams } from "react-router-dom";
|
7 | 13 | import { v4 as uuidv4 } from "uuid";
|
8 |
| -import * as XTerm from "xterm"; |
9 |
| -import { CanvasAddon } from "xterm-addon-canvas"; |
10 |
| -import { FitAddon } from "xterm-addon-fit"; |
11 |
| -import { Unicode11Addon } from "xterm-addon-unicode11"; |
12 |
| -import { WebLinksAddon } from "xterm-addon-web-links"; |
13 |
| -import { WebglAddon } from "xterm-addon-webgl"; |
14 | 14 | import { deploymentConfig } from "api/queries/deployment";
|
15 | 15 | import {
|
16 | 16 | workspaceByOwnerAndName,
|
@@ -45,7 +45,7 @@ const TerminalPage: FC = () => {
|
45 | 45 | const terminalWrapperRef = useRef<HTMLDivElement>(null);
|
46 | 46 | // The terminal is maintained as a state to trigger certain effects when it
|
47 | 47 | // updates.
|
48 |
| - const [terminal, setTerminal] = useState<XTerm.Terminal>(); |
| 48 | + const [terminal, setTerminal] = useState<Terminal>(); |
49 | 49 | const [connectionStatus, setConnectionStatus] =
|
50 | 50 | useState<ConnectionStatus>("initializing");
|
51 | 51 | const [searchParams] = useSearchParams();
|
@@ -104,7 +104,7 @@ const TerminalPage: FC = () => {
|
104 | 104 | if (!terminalWrapperRef.current || config.isLoading) {
|
105 | 105 | return;
|
106 | 106 | }
|
107 |
| - const terminal = new XTerm.Terminal({ |
| 107 | + const terminal = new Terminal({ |
108 | 108 | allowProposedApi: true,
|
109 | 109 | allowTransparency: true,
|
110 | 110 | disableStdin: false,
|
|
0 commit comments