feat(web): add xterm terminal panel (#5)

Use @xterm/xterm for terminal emulation and its official @xterm/addon-fit for container sizing. Lazy-load both on first open to keep them out of the main bundle. Preserve the mounted terminal on collapse and offer explicit reconnect; provide an echo transport for demos.
This commit is contained in:
Florian Schmidt
2026-11-16 00:21:17 +01:00
parent 08d5441cf2
commit a6429e0527
7 changed files with 336 additions and 9 deletions
+25
View File
@@ -439,3 +439,28 @@ a {
min-height: 200px;
}
}
.terminal[hidden] {
display: none;
}
.terminal {
position: sticky;
top: 0;
height: 100vh;
min-width: 0;
}
.terminal-screen {
height: calc(100% - 160px);
min-height: 220px;
}
.with-terminal {
grid-template-columns: 230px minmax(0, 1fr) minmax(300px, 40vw);
}
@media (max-width: 900px) {
.with-terminal {
grid-template-columns: 170px minmax(0, 1fr);
}
.terminal {
position: static;
height: 500px;
}
}