aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/components/WASITerm.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/components/WASITerm.tsx')
-rw-r--r--src/frontend/components/WASITerm.tsx18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/frontend/components/WASITerm.tsx b/src/frontend/components/WASITerm.tsx
index 5f7e7f9..644f293 100644
--- a/src/frontend/components/WASITerm.tsx
+++ b/src/frontend/components/WASITerm.tsx
@@ -1,9 +1,6 @@
-// @jsxImportSource xeact
-// @jsxRuntime automatic
-
-import { t, x } from "xeact";
-import Terminal from "@xterm";
-import * as fitAdd from "@xterm/addon-fit";
+import { t, x, h } from "@xeserv/xeact";
+import { Terminal } from "xterm";
+import { FitAddon } from 'xterm-addon-fit';
import { Fd, File, PreopenDirectory, WASI } from "@bjorn3/browser_wasi_shim";
class XtermStdio extends Fd {
@@ -41,16 +38,17 @@ export interface WASITermProps {
}
export default function WASITerm({ href, env, args }: WASITermProps) {
- const root = <div style="max-width:80ch;max-height:20ch"></div>;
+ const root = h("div", {style:"max-width:80ch;max-height:20ch"}, []);
const term = new Terminal({
convertEol: true,
fontFamily: "Iosevka Curly Iaso",
});
- const fit = new fitAdd.default();
- term.loadAddon(fit);
- fit.fit();
+ const fitAddon = new FitAddon();
+ term.loadAddon(fitAddon);
+ term.open(root);
+ fitAddon.fit();
return (
<div>