+ {/* Top row: blend mode + opacity for active layer */}
+
+ {
+ if (activeLayerId) updateLayer(activeLayerId, { blendMode: mode });
+ }}
+ />
+ {
+ if (activeLayerId) updateLayer(activeLayerId, { opacity });
+ }}
+ />
+
+
+ {/* Layer list */}
+
+ {displayLayers.map((layer) => {
+ const realIndex = layers.findIndex((l) => l.id === layer.id);
+ return (
+ setActiveLayer(layer.id)}
+ onToggleVisibility={() => updateLayer(layer.id, { visible: !layer.visible })}
+ onToggleLock={() => updateLayer(layer.id, { locked: !layer.locked })}
+ onRename={(name) => updateLayer(layer.id, { name })}
+ onReorder={reorderLayers}
+ onContextMenu={(e) => handleContextMenu(e, layer.id)}
+ />
+ );
+ })}
+
+
+ {/* Layer effects section (only when an object is selected) */}
+ {selectedObject && (
+
+
+
+ )}
+
+ {/* Bottom action bar */}
+
+
+
+
+
+ {/* Context menu */}
+ {contextMenu && (
+
l.id === contextMenu.layerId)}
+ onDuplicate={() => {
+ duplicateLayer(contextMenu.layerId);
+ closeContextMenu();
+ }}
+ onMergeDown={() => {
+ mergeDown(contextMenu.layerId);
+ closeContextMenu();
+ }}
+ onFlattenAll={() => {
+ flattenAll();
+ closeContextMenu();
+ }}
+ onDelete={() => {
+ removeLayer(contextMenu.layerId);
+ closeContextMenu();
+ }}
+ onClose={closeContextMenu}
+ />
+ )}
+
+ );
+}
+
+// ---------------------------------------------------------------------------
+// BlendModeSelect
+// ---------------------------------------------------------------------------
+
+function BlendModeSelect({ value, onChange }: { value: string; onChange: (mode: string) => void }) {
+ return (
+