feat: delete function, sidebar collapse, layer drag&drop, library tree

- Delete: trash button in PropertiesPanel + existing Delete key support
- Left sidebar: desktop collapse toggle button
- Right sidebar: desktop collapse toggle + SVG icon size fix (replaced emoji)
- Layer panel: drag&drop enabled (reorder, move to layers, sub-layers)
- Library tree: BlockLibrary added to left sidebar
- App.tsx: handleReorderLayer, handleAddSubLayer, handleUpdateElement
- styles.css: collapse + drag&drop visual indicators
This commit is contained in:
2026-06-29 10:44:53 +02:00
parent 6b0b637636
commit ba978cd13c
7 changed files with 222 additions and 21 deletions
+15
View File
@@ -87,6 +87,18 @@ export interface LeftSidebarProps {
onTemplateSelect?: (templateName: string | null) => void;
onCollapse?: () => void;
className?: string;
collapsed?: boolean;
onToggleCollapse?: () => void;
blocks?: BlockDefinition[];
onDragBlock?: (blockId: string) => void;
onBlockDrop?: (blockId: string, x: number, y: number) => void;
onBlockCategoryChange?: (cat: string) => void;
onBlockSearch?: (query: string) => void;
onRenameBlock?: (id: string, name: string) => void;
onDuplicateBlock?: (id: string) => void;
onDeleteBlock?: (id: string) => void;
onSvgImport?: (svg: string, name: string, category: string) => void;
onSaveGroupAsBlock?: (name: string) => void;
}
export interface CanvasAreaProps {
@@ -160,12 +172,15 @@ export interface RightSidebarProps {
onUpdateElement?: (el: CADElement) => void;
className?: string;
onCollapse?: () => void;
collapsed?: boolean;
onToggleCollapse?: () => void;
}
export interface PropertiesPanelProps {
selectedElement: CADElement | null;
layers: CADLayer[];
onUpdateProperty: (key: string, value: unknown) => void;
onDelete?: () => void;
}
export interface LayerPanelProps {