diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 1abfc01b..af054026 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -15,6 +15,7 @@ "@sveltejs/adapter-node": "^5.0.1", "@sveltejs/adapter-static": "^3.0.1", "@webcontainer/api": "^1.1.9", + "@xterm/xterm": "^5.5.0", "@xyflow/svelte": "^0.1.3", "chart.js": "^4.4.3", "diff": "^5.2.0", @@ -27,7 +28,9 @@ "svelte-french-toast": "^1.2.0", "svelte-local-storage-store": "^0.6.4", "svelte-monaco": "^0.3.0", - "svelte-purify": "^1.1.27" + "svelte-purify": "^1.1.27", + "xterm": "^5.3.0", + "xterm-addon-fit": "^0.8.0" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.2.2", @@ -1921,6 +1924,11 @@ "resolved": "https://registry.npmjs.org/@webcontainer/api/-/api-1.1.9.tgz", "integrity": "sha512-Sp6PV0K9D/3f8fSbCubqhfmBFH8XbngZCBOCF+aExyGqnz2etmw+KYvbQ/JxYvYX5KPaSxM+asFQwoP2RHl5cg==" }, + "node_modules/@xterm/xterm": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@xterm/xterm/-/xterm-5.5.0.tgz", + "integrity": "sha512-hqJHYaQb5OptNunnyAnkHyM8aCjZ1MEIDTQu1iIbbTD/xops91NB5yq1ZK/dC2JDbVWtF23zUtl9JE2NqwT87A==" + }, "node_modules/@xyflow/svelte": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@xyflow/svelte/-/svelte-0.1.3.tgz", @@ -6500,6 +6508,21 @@ "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" }, + "node_modules/xterm": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/xterm/-/xterm-5.3.0.tgz", + "integrity": "sha512-8QqjlekLUFTrU6x7xck1MsPzPA571K5zNqWm0M0oroYEWVOptZ0+ubQSkQ3uxIEhcIHRujJy6emDWX4A7qyFzg==", + "deprecated": "This package is now deprecated. Move to @xterm/xterm instead." + }, + "node_modules/xterm-addon-fit": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/xterm-addon-fit/-/xterm-addon-fit-0.8.0.tgz", + "integrity": "sha512-yj3Np7XlvxxhYF/EJ7p3KHaMt6OdwQ+HDu573Vx1lRXsVxOcnVJs51RgjZOouIZOczTsskaS+CpXspK81/DLqw==", + "deprecated": "This package is now deprecated. Move to @xterm/addon-fit instead.", + "peerDependencies": { + "xterm": "^5.0.0" + } + }, "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", diff --git a/frontend/package.json b/frontend/package.json index e2747a9d..12d8a857 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -55,6 +55,7 @@ "@sveltejs/adapter-node": "^5.0.1", "@sveltejs/adapter-static": "^3.0.1", "@webcontainer/api": "^1.1.9", + "@xterm/xterm": "^5.5.0", "@xyflow/svelte": "^0.1.3", "chart.js": "^4.4.3", "diff": "^5.2.0", @@ -67,6 +68,8 @@ "svelte-french-toast": "^1.2.0", "svelte-local-storage-store": "^0.6.4", "svelte-monaco": "^0.3.0", - "svelte-purify": "^1.1.27" + "svelte-purify": "^1.1.27", + "xterm": "^5.3.0", + "xterm-addon-fit": "^0.8.0" } } diff --git a/frontend/src/lib/components/map/Console.svelte b/frontend/src/lib/components/map/Console.svelte new file mode 100644 index 00000000..1ed19242 --- /dev/null +++ b/frontend/src/lib/components/map/Console.svelte @@ -0,0 +1,157 @@ + + +
+ + diff --git a/frontend/src/lib/components/map/Desktop.svelte b/frontend/src/lib/components/map/Desktop.svelte new file mode 100644 index 00000000..00324d01 --- /dev/null +++ b/frontend/src/lib/components/map/Desktop.svelte @@ -0,0 +1,14 @@ + + +{#key $darkTheme} +
+ +
+{/key} diff --git a/frontend/src/lib/components/map/PlaceholderComponent.svelte b/frontend/src/lib/components/map/PlaceholderComponent.svelte new file mode 100644 index 00000000..37906373 --- /dev/null +++ b/frontend/src/lib/components/map/PlaceholderComponent.svelte @@ -0,0 +1,9 @@ +
+ + diff --git a/frontend/src/lib/components/map/ShellObject.svelte b/frontend/src/lib/components/map/ShellObject.svelte new file mode 100644 index 00000000..455df4b4 --- /dev/null +++ b/frontend/src/lib/components/map/ShellObject.svelte @@ -0,0 +1,26 @@ + + +
+ +
diff --git a/frontend/src/lib/stores/terminal.ts b/frontend/src/lib/stores/terminal.ts new file mode 100644 index 00000000..b40162ed --- /dev/null +++ b/frontend/src/lib/stores/terminal.ts @@ -0,0 +1,6 @@ +import { writable } from "svelte/store"; + +export const terminal_size = writable({ height: 65 }); + +// get pathnames from url +export const pathname = writable(window.location.pathname); diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelte index 3291c55a..540a2680 100644 --- a/frontend/src/routes/+layout.svelte +++ b/frontend/src/routes/+layout.svelte @@ -1,6 +1,7 @@