feat(#5): add icon presets, dark mode theme store, and icon-aware graph rendering

This commit is contained in:
Josh Creek
2026-02-25 19:32:11 +00:00
parent b9c7d9eee0
commit 2f4a784646
12 changed files with 195 additions and 23 deletions
+27
View File
@@ -0,0 +1,27 @@
export interface IconDefinition {
key: string;
label: string;
path: string;
}
const ICONS: IconDefinition[] = [
{ key: 'server', label: 'Server', path: '/icons/server.svg' },
{ key: 'router', label: 'Router', path: '/icons/router.svg' },
{ key: 'switch', label: 'Switch', path: '/icons/switch.svg' },
{ key: 'storage', label: 'Storage', path: '/icons/storage.svg' },
{ key: 'desktop', label: 'Desktop', path: '/icons/desktop.svg' },
{ key: 'cloud', label: 'Cloud', path: '/icons/cloud.svg' }
];
const ICON_BY_KEY = new Map(ICONS.map((icon) => [icon.key, icon]));
export function listIconDefinitions(): IconDefinition[] {
return ICONS;
}
export function resolveIconPath(iconKey?: string): string | undefined {
if (!iconKey) {
return undefined;
}
return ICON_BY_KEY.get(iconKey)?.path;
}