diff --git a/src/lib/components/EventRenderLevelLimit.svelte b/src/lib/components/EventRenderLevelLimit.svelte
index bbfdc87..3a7d8a8 100644
--- a/src/lib/components/EventRenderLevelLimit.svelte
+++ b/src/lib/components/EventRenderLevelLimit.svelte
@@ -29,16 +29,16 @@
-
-
+
+
+
-
-
Legend
-
-
- -
-
-
- I
-
-
- Index events (kind 30040) - Each with a unique pastel color
-
-
-
- -
-
-
- C
-
-
- Content events (kinds 30041, 30818) - Publication sections
-
-
-
- -
-
- Arrows indicate reading/sequence order
-
-
-
+
+
+
Legend
+
+
+ {#if expanded}
+
+
+ -
+
+
+ I
+
+
+ Index events (kind 30040) - Each with a unique pastel color
+
+
+
+ -
+
+
+ C
+
+
+ Content events (kinds 30041, 30818) - Publication sections
+
+
+
+ -
+
+ Arrows indicate reading/sequence order
+
+
+ {/if}
+
diff --git a/src/lib/navigator/EventNetwork/Settings.svelte b/src/lib/navigator/EventNetwork/Settings.svelte
new file mode 100644
index 0000000..390931c
--- /dev/null
+++ b/src/lib/navigator/EventNetwork/Settings.svelte
@@ -0,0 +1,52 @@
+
+
+
+
+
+
Settings
+
+
+
+ {#if expanded}
+
+
+ Showing {count} events from {$networkFetchLimit} headers
+
+
+
+
+ {/if}
+
diff --git a/src/lib/navigator/EventNetwork/index.svelte b/src/lib/navigator/EventNetwork/index.svelte
index d43719a..7742475 100644
--- a/src/lib/navigator/EventNetwork/index.svelte
+++ b/src/lib/navigator/EventNetwork/index.svelte
@@ -21,6 +21,8 @@
import Legend from "./Legend.svelte";
import NodeTooltip from "./NodeTooltip.svelte";
import type { NetworkNode, NetworkLink } from "./types";
+ import Settings from "./Settings.svelte";
+ import {Button} from 'flowbite-svelte';
// Type alias for D3 selections
type Selection = any;
@@ -43,7 +45,7 @@
}
// Component props
- let { events = [] } = $props<{ events?: NDKEvent[] }>();
+ let { events = [], onupdate } = $props<{ events?: NDKEvent[], onupdate: () => void }>();
// Error state
let errorMessage = $state
(null);
@@ -498,6 +500,17 @@
);
}
}
+
+ /**
+ * Legend interactions
+ */
+ let graphInteracted = $state(false);
+
+ function handleGraphClick() {
+ if (!graphInteracted) {
+ graphInteracted = true;
+ }
+ }
@@ -514,15 +527,23 @@
{/if}
-
+
+
+
+
+
+
+
+
-
-
@@ -568,5 +589,4 @@
/>
{/if}
-
diff --git a/src/routes/visualize/+page.svelte b/src/routes/visualize/+page.svelte
index 39eaa06..142eeb5 100644
--- a/src/routes/visualize/+page.svelte
+++ b/src/routes/visualize/+page.svelte
@@ -10,13 +10,10 @@
import { ndkInstance } from "$lib/ndk";
import type { NDKEvent } from "@nostr-dev-kit/ndk";
import { filterValidIndexEvents } from "$lib/utils";
- import EventLimitControl from "$lib/components/EventLimitControl.svelte";
- import EventRenderLevelLimit from "$lib/components/EventRenderLevelLimit.svelte";
import { networkFetchLimit } from "$lib/state";
- import { fly } from "svelte/transition";
- import { quintOut } from "svelte/easing";
import { CogSolid } from "flowbite-svelte-icons";
import { Button } from "flowbite-svelte";
+ import Settings from "$lib/navigator/EventNetwork/Settings.svelte";
// Configuration
const DEBUG = false; // Set to true to enable debug logging
@@ -110,12 +107,6 @@
}
}
- /**
- * Handles updates to visualization settings
- */
- function handleLimitUpdate() {
- fetchEvents();
- }
// Fetch events when component mounts
onMount(() => {
@@ -127,44 +118,8 @@
-
Publication Network
-
-
- {#if !loading && !error}
- (showSettings = !showSettings)}
- >
-
- Settings
-
- {/if}
+ Publication Network
-
-
- {#if !loading && !error && showSettings}
-
-
-
- Visualization Settings
-
-
-
-
- Showing {events.length} events from {$networkFetchLimit} headers
-
-
-
-
-
-
- {/if}
-
{#if loading}
@@ -206,9 +161,7 @@
{:else}
-
-
-
-
+
+
{/if}
diff --git a/src/styles/visualize.css b/src/styles/visualize.css
index ef7f33b..1ff732d 100644
--- a/src/styles/visualize.css
+++ b/src/styles/visualize.css
@@ -1,7 +1,7 @@
@layer components {
/* Legend styles - specific to visualization */
.legend-list {
- @apply list-disc pl-5 space-y-2 text-gray-800 dark:text-gray-300;
+ @apply list-disc mt-2 space-y-2 text-gray-800 dark:text-gray-300;
}
.legend-item {
@@ -39,15 +39,16 @@
/* Network visualization styles - specific to visualization */
.network-container {
- @apply flex flex-col w-full h-[calc(100vh-120px)] min-h-[400px] max-h-[900px] p-4 gap-4;
+ @apply flex flex-col w-full h-[calc(100vh-138px)] min-h-[400px] max-h-[900px];
}
.network-svg-container {
- @apply relative;
+ @apply relative sm:h-[100%];
}
.network-svg {
- @apply w-full h-full border border-gray-300 dark:border-gray-700 rounded;
+ @apply w-full sm:h-[100%] border;
+ @apply border border-primary-200 has-[:hover]:border-primary-700 dark:bg-primary-1000 dark:border-primary-800 dark:has-[:hover]:bg-primary-950 dark:has-[:hover]:border-primary-500 rounded;
}
.network-error {
@@ -72,9 +73,7 @@
}
.network-control-button {
- @apply bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-300
- shadow-md hover:shadow-lg transition-shadow duration-200
- border border-gray-300 dark:border-gray-700;
+ @apply bg-white;
}
/* Tooltip styles - specific to visualization tooltips */