feat: implement CanvasMenubar component and integrate keyboard shortcuts

This commit is contained in:
2026-03-09 21:19:08 +01:00
parent 4e51b6866f
commit e789a0a164
11 changed files with 117 additions and 235 deletions

View File

@@ -1,27 +1,40 @@
/**
* Map project icon ids to Lucide icons for the sidebar.
* Only Lucide "Animals" category icons are allowed for projects.
*/
import {
LayoutDashboard,
Folder,
FileStack,
Sparkles,
Box,
Layers,
Bird,
Bug,
Cat,
Dog,
Egg,
Fish,
Rabbit,
Rat,
Shrimp,
Snail,
Squirrel,
Turtle,
type LucideIcon,
} from 'lucide-react'
import type { ProjectIconId } from './types'
export const PROJECT_ICON_MAP: Record<ProjectIconId, LucideIcon> = {
layout: LayoutDashboard,
folder: Folder,
'file-stack': FileStack,
sparkles: Sparkles,
box: Box,
layers: Layers,
bird: Bird,
bug: Bug,
cat: Cat,
dog: Dog,
fish: Fish,
rat: Rat,
rabbit: Rabbit,
squirrel: Squirrel,
turtle: Turtle,
snail: Snail,
shrimp: Shrimp,
egg: Egg
}
export function getProjectIcon(iconId: string): LucideIcon {
return PROJECT_ICON_MAP[iconId as ProjectIconId] ?? LayoutDashboard
return PROJECT_ICON_MAP[iconId as ProjectIconId] ?? Cat
}