+ {/* Center: Tool Options (context-sensitive) */}
+
+
+
+
+ {/* Right: Controls */}
+
+ {/* History controls */}
-
- {/* Zoom controls */}
-
+
+
+ {/* Zoom controls */}
-
-
+
+
+ {/* New Layer */}
);
diff --git a/components/editor/panel-dock.tsx b/components/editor/panel-dock.tsx
new file mode 100644
index 0000000..cb2aa0c
--- /dev/null
+++ b/components/editor/panel-dock.tsx
@@ -0,0 +1,123 @@
+'use client';
+
+import { useState } from 'react';
+import { ChevronDown, ChevronRight } from 'lucide-react';
+import { LayersPanel } from '@/components/layers/layers-panel';
+import { ColorPanel } from '@/components/colors';
+import { FilterPanel } from '@/components/filters';
+import { SelectionPanel } from '@/components/selection';
+import { TransformPanel } from '@/components/transform';
+import { ShapePanel } from '@/components/shapes';
+import { HistoryPanel } from './history-panel';
+
+interface CollapsibleSectionProps {
+ title: string;
+ children: React.ReactNode;
+ defaultOpen?: boolean;
+}
+
+function CollapsibleSection({ title, children, defaultOpen = true }: CollapsibleSectionProps) {
+ const [isOpen, setIsOpen] = useState(defaultOpen);
+
+ return (
+
+
+ {isOpen &&
{children}
}
+
+ );
+}
+
+export function PanelDock() {
+ const [activeTab, setActiveTab] = useState<'adjustments' | 'tools' | 'history'>('adjustments');
+
+ return (
+
+ {/* Always visible panels */}
+
+
+
+
+
+
+
+
+ {/* Tabbed section */}
+
+ {/* Tab buttons */}
+
+
+
+
+
+
+ {/* Tab content */}
+
+ {activeTab === 'adjustments' && (
+
+
+
+
+
+
+
+
+
+
+
+ )}
+
+ {activeTab === 'tools' && (
+
+
+
+
+
+ )}
+
+ {activeTab === 'history' && (
+
+
+
+ )}
+
+
+
+ );
+}
diff --git a/components/editor/tool-options.tsx b/components/editor/tool-options.tsx
new file mode 100644
index 0000000..3c3a868
--- /dev/null
+++ b/components/editor/tool-options.tsx
@@ -0,0 +1,170 @@
+'use client';
+
+import { useToolStore } from '@/store';
+import { useShapeStore } from '@/store/shape-store';
+import { useSelectionStore } from '@/store/selection-store';
+
+export function ToolOptions() {
+ const { activeTool, settings, setSize, setOpacity, setHardness, setColor, setFlow } = useToolStore();
+ const { settings: shapeSettings, setShapeType } = useShapeStore();
+ const { selectionType, setSelectionType } = useSelectionStore();
+
+ // Drawing tools: brush, pencil, eraser
+ const isDrawingTool = ['brush', 'eraser', 'pencil'].includes(activeTool);
+ const showHardness = ['brush'].includes(activeTool);
+ const showColor = ['brush', 'pencil', 'fill'].includes(activeTool);
+ const showFlow = ['brush'].includes(activeTool);
+
+ // Shape tool
+ const isShapeTool = activeTool === 'shape';
+
+ // Selection tool
+ const isSelectionTool = activeTool === 'select';
+
+ // Don't show options bar if no options available
+ if (!isDrawingTool && !isShapeTool && !isSelectionTool) {
+ return null;
+ }
+
+ return (
+
+ );
+}