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
+20
View File
@@ -69,6 +69,12 @@ importers:
'@shellbook/core':
specifier: workspace:*
version: link:../../packages/core
'@xterm/addon-fit':
specifier: ^0.10.0
version: 0.10.0(@xterm/[email protected])
'@xterm/xterm':
specifier: ^5.5.0
version: 5.5.0
codemirror:
specifier: ^6.0.1
version: 6.0.2
@@ -1062,6 +1068,14 @@ packages:
'@vitest/[email protected]':
resolution: {integrity: sha512-v0psaMSkNJ3A2NMrUEHFRzJtDPFn+/VWZ5WxImB21T9fjucJRmS7xCS3ppEnARb9y11OAzaD+P2Ps+b+BGX5iQ==}
'@xterm/[email protected]':
resolution: {integrity: sha512-UFYkDm4HUahf2lnEyHvio51TNGiLK66mqP2JoATy7hRZeXaGMRDr00JiSF7m63vR5WKATF605yEggJKsw0JpMQ==}
peerDependencies:
'@xterm/xterm': ^5.0.0
'@xterm/[email protected]':
resolution: {integrity: sha512-hqJHYaQb5OptNunnyAnkHyM8aCjZ1MEIDTQu1iIbbTD/xops91NB5yq1ZK/dC2JDbVWtF23zUtl9JE2NqwT87A==}
[email protected]:
resolution: {integrity: sha512-2BjRTZxTPvheOvGbBslFSYOUkr+SjPtOnrLP33f+VIWLzezQpZcqVg7ja3L4dBXmzzgwT+a029jRx5PCi3JuiA==}
@@ -2971,6 +2985,12 @@ snapshots:
loupe: 3.2.1
tinyrainbow: 1.2.0
'@xterm/[email protected](@xterm/[email protected])':
dependencies:
'@xterm/xterm': 5.5.0
'@xterm/[email protected]': {}
[email protected]: {}
[email protected]: {}