- {#if $activePanel && settings[$activePanel]}
+ {#if $activePanel && panels[$activePanel]}
+
{panels[$activePanel].id}
{#key $activePanel}
- {#if settings[$activePanel].component}
+ {#if panels[$activePanel]?.component}
{:else}
-
+
+
+
{/if}
{/key}
{/if}
@@ -84,6 +114,10 @@
min-width: 300px;
}
+ h1 {
+ border-bottom: solid thin var(--outline);
+ }
+
.content {
background: var(--layer-1);
}
@@ -97,6 +131,7 @@
.tabs > button {
height: 30px;
padding: 5px;
+ border-radius: 0px;
background: none;
color: var(--outline);
border: none;
diff --git a/app/src/lib/settings/app-settings.ts b/app/src/lib/settings/app-settings.ts
index 081b7c8..4e0b644 100644
--- a/app/src/lib/settings/app-settings.ts
+++ b/app/src/lib/settings/app-settings.ts
@@ -33,6 +33,19 @@ export const AppSettingTypes = {
label: "Show Grid",
value: true,
},
+ stressTest: {
+ amount: {
+ type: "integer",
+ min: 2,
+ max: 15
+ },
+ loadGrid: {
+ type: "button"
+ },
+ loadTree: {
+ type: "button"
+ },
+ },
debug: {
wireframe: {
type: "boolean",
diff --git a/app/src/routes/+page.svelte b/app/src/routes/+page.svelte
index ed13347..ed73fb5 100644
--- a/app/src/routes/+page.svelte
+++ b/app/src/routes/+page.svelte
@@ -8,7 +8,8 @@
import Viewer from "$lib/viewer/Viewer.svelte";
import Settings from "$lib/settings/Settings.svelte";
import { AppSettings, AppSettingTypes } from "$lib/settings/app-settings";
- import { get, writable } from "svelte/store";
+ import { get, writable, type Writable } from "svelte/store";
+ import Keymap from "$lib/settings/Keymap.svelte";
const nodeRegistry = new RemoteNodeRegistry("http://localhost:3001");
const runtimeExecutor = new MemoryRuntimeExecutor(nodeRegistry);
@@ -19,6 +20,8 @@
? JSON.parse(localStorage.getItem("graph")!)
: templates.grid(3, 3);
+ let managerStatus: Writable<"loading" | "error" | "idle">;
+
function handleResult(event: CustomEvent
) {
res = runtimeExecutor.execute(event.detail, get(settings?.graph?.settings));
}
@@ -34,6 +37,12 @@
settings: AppSettings,
definition: AppSettingTypes,
},
+ graph: {},
+ shortcuts: {
+ id: "shortcuts",
+ icon: "i-tabler-keyboard",
+ component: Keymap,
+ },
};
function handleSettings(
@@ -42,27 +51,28 @@
types: Record;
}>,
) {
- settings = {
- ...settings,
- graph: {
- icon: "i-tabler-chart-bar",
- id: "graph",
- settings: writable(ev.detail.values),
- definition: ev.detail.types,
- },
+ settings.general.definition.stressTest.loadGrid.callback = function () {
+ const store = get(settings.general.settings);
+ graph = templates.grid(store.amount, store.amount);
};
+
+ settings.general.definition.stressTest.loadTree.callback = function () {
+ const store = get(settings.general.settings);
+ graph = templates.tree(store.amount);
+ };
+
+ settings.graph = {
+ icon: "i-tabler-chart-bar",
+ id: "graph",
+ settings: writable(ev.detail.values),
+ definition: ev.detail.types,
+ };
+ settings = settings;
}
-
-
- header
-
-
+
+
@@ -72,12 +82,13 @@
-
+
{/key}
@@ -97,6 +108,17 @@
grid-template-rows: 50px 1fr;
}
+ .wrapper :global(canvas) {
+ transition: opacity 0.3s ease;
+ opacity: 1;
+ }
+
+ .manager-loading :global(.graph-wrapper),
+ .manager-loading :global(canvas) {
+ opacity: 0.2;
+ pointer-events: none;
+ }
+
:global(html) {
background: rgb(13, 19, 32);
background: linear-gradient(
diff --git a/packages/ui/src/lib/ShortCut.svelte b/packages/ui/src/lib/ShortCut.svelte
new file mode 100644
index 0000000..e69de29
diff --git a/packages/ui/src/lib/app.css b/packages/ui/src/lib/app.css
index 3e961f2..2c5dab4 100644
--- a/packages/ui/src/lib/app.css
+++ b/packages/ui/src/lib/app.css
@@ -57,6 +57,9 @@ body {
--layer-2: var(--neutral-400);
--layer-3: var(--neutral-200);
+ --active: #ffffff;
+ --selected: #c65a19;
+
--outline: var(--neutral-400);
--text-color: var(--neutral-200);
@@ -76,6 +79,8 @@ body.theme-light {
--layer-1: var(--neutral-100);
--layer-2: var(--neutral-100);
--layer-3: var(--neutral-500);
+ --active: #000000;
+ --selected: #c65a19;
}
body.theme-solarized {
@@ -83,8 +88,10 @@ body.theme-solarized {
--outline: #93a1a1;
--layer-0: #fdf6e3;
--layer-1: #eee8d5;
- --layer-2: #93a1a1;
+ --layer-2: #c4c0b4;
--layer-3: #586e75;
+ --active: #000000;
+ --selected: #268bd2;
}
body.theme-catppuccin {
@@ -107,17 +114,13 @@ body.theme-high-contrast {
body.theme-nord {
--text-color: #D8DEE9;
- /* Nord snow */
--outline: #4C566A;
- /* Nord frost */
--layer-0: #2E3440;
- /* Nord polar night */
--layer-1: #3B4252;
- /* Nord polar night */
--layer-2: #434C5E;
- /* Nord polar night */
--layer-3: #5E81AC;
- /* Nord frost */
+ --active: #8999bd;
+ --selected: #b76c3f
}
body.theme-dracula {
@@ -133,6 +136,9 @@ body {
margin: 0;
}
-/* canvas { */
-/* display: none !important; */
-/* } */
+button {
+ background-color: var(--layer-2);
+ border: 1px solid var(--outline);
+ padding: 8px 9px;
+ border-radius: 4px;
+}