fix: add 'text' entry to nodeIcons + all themes
Build failed because Record<NodeType, ...> in nodeIcons.ts and themes.ts requires every NodeType key. Add Type icon for text and neutral border/icon palette per theme.
This commit is contained in:
@@ -19,7 +19,7 @@ import {
|
||||
// Communications
|
||||
Mail, MessageSquare, Phone,
|
||||
// Misc devices
|
||||
Printer, Smartphone, Search, Filter, BookOpen, PlugZap,
|
||||
Printer, Smartphone, Search, Filter, BookOpen, PlugZap, Type,
|
||||
} from 'lucide-react'
|
||||
import type { LucideIcon } from 'lucide-react'
|
||||
|
||||
@@ -142,6 +142,7 @@ export const NODE_TYPE_DEFAULT_ICONS: Record<NodeType, LucideIcon> = {
|
||||
generic: Circle,
|
||||
group: Circle,
|
||||
groupRect: Circle,
|
||||
text: Type,
|
||||
}
|
||||
|
||||
/** Resolve the display icon for a node — custom_icon takes priority over type default. */
|
||||
|
||||
@@ -65,6 +65,7 @@ export const THEMES: Record<ThemeId, ThemePreset> = {
|
||||
generic: { border: '#8b949e', icon: '#8b949e' },
|
||||
groupRect: { border: '#00d4ff', icon: '#00d4ff' },
|
||||
group: { border: '#00d4ff', icon: '#00d4ff' },
|
||||
text: { border: '#30363d', icon: '#e6edf3' },
|
||||
},
|
||||
nodeCardBackground: '#21262d',
|
||||
nodeIconBackground: '#161b22',
|
||||
@@ -125,6 +126,7 @@ export const THEMES: Record<ThemeId, ThemePreset> = {
|
||||
generic: { border: '#94a3b8', icon: '#94a3b8' },
|
||||
groupRect: { border: '#22d3ee', icon: '#22d3ee' },
|
||||
group: { border: '#22d3ee', icon: '#22d3ee' },
|
||||
text: { border: '#404040', icon: '#ffffff' },
|
||||
},
|
||||
nodeCardBackground: '#0a0a0a',
|
||||
nodeIconBackground: '#111111',
|
||||
@@ -185,6 +187,7 @@ export const THEMES: Record<ThemeId, ThemePreset> = {
|
||||
generic: { border: '#6b7280', icon: '#6b7280' },
|
||||
groupRect: { border: '#0284c7', icon: '#0284c7' },
|
||||
group: { border: '#0284c7', icon: '#0284c7' },
|
||||
text: { border: '#cbd5e1', icon: '#1f2328' },
|
||||
},
|
||||
nodeCardBackground: '#ffffff',
|
||||
nodeIconBackground: '#f0f6ff',
|
||||
@@ -245,6 +248,7 @@ export const THEMES: Record<ThemeId, ThemePreset> = {
|
||||
generic: { border: '#8888ff', icon: '#8888ff' },
|
||||
groupRect: { border: '#00ffff', icon: '#00ffff' },
|
||||
group: { border: '#00ffff', icon: '#00ffff' },
|
||||
text: { border: '#3a3a6a', icon: '#ffffff' },
|
||||
},
|
||||
nodeCardBackground: '#0f0f2a',
|
||||
nodeIconBackground: '#0a0a1a',
|
||||
@@ -305,6 +309,7 @@ export const THEMES: Record<ThemeId, ThemePreset> = {
|
||||
generic: { border: '#006600', icon: '#006600' },
|
||||
groupRect: { border: '#00ff41', icon: '#00ff41' },
|
||||
group: { border: '#00ff41', icon: '#00ff41' },
|
||||
text: { border: '#003311', icon: '#00ff41' },
|
||||
},
|
||||
nodeCardBackground: '#001100',
|
||||
nodeIconBackground: '#002200',
|
||||
@@ -365,6 +370,7 @@ export const THEMES: Record<ThemeId, ThemePreset> = {
|
||||
generic: { border: '#8b949e', icon: '#8b949e' },
|
||||
groupRect: { border: '#00d4ff', icon: '#00d4ff' },
|
||||
group: { border: '#00d4ff', icon: '#00d4ff' },
|
||||
text: { border: '#30363d', icon: '#e6edf3' },
|
||||
},
|
||||
nodeCardBackground: '#21262d',
|
||||
nodeIconBackground: '#161b22',
|
||||
|
||||
Reference in New Issue
Block a user