- {layouts.map(l => (
-
applyLayout(l)}
- className={`flex items-center gap-1 text-xs rounded px-2 py-0.5 cursor-pointer border transition-colors
- ${activeLayoutId === l.id ? 'bg-blue-50 border-blue-300 text-blue-700' : 'bg-white border-gray-200 text-gray-600 hover:border-gray-400'}`}>
- {l.name}
-
-
- ))}
+ {/* Layout group */}
+
+
Layout
+ {layouts.map(l => (
+
applyLayout(l)}
+ className={`flex items-center gap-1 rounded px-2 py-0.5 cursor-pointer border transition-colors
+ ${activeLayoutId === l.id ? 'bg-blue-50 border-blue-300 text-blue-700' : 'bg-white border-gray-200 text-gray-600 hover:border-gray-400'}`}>
+ {l.name}
+
+
+ ))}
+ {showSaveAs ? (
+
+ setSaveAsName(e.target.value)}
+ onKeyDown={e => { if (e.key === 'Enter') handleSaveAs(); if (e.key === 'Escape') { setShowSaveAs(false); setSaveAsName('') } }}
+ placeholder="Layout name…" className="border border-gray-300 rounded px-2 py-0.5 w-32 focus:outline-none focus:border-blue-400" />
+
+
+
+ ) : (
+ <>
+ {activeLayoutId !== null && (
+
+ )}
+
+ {activeLayoutId !== null && (
+
+ )}
+ >
+ )}
+
- {activeLayoutId !== null && !showSaveAs && (
-
- )}
+
- {showSaveAs ? (
-
- setSaveAsName(e.target.value)}
- onKeyDown={e => { if (e.key === 'Enter') handleSaveAs(); if (e.key === 'Escape') { setShowSaveAs(false); setSaveAsName('') } }}
- placeholder="Layout name…" className="text-xs border border-gray-300 rounded px-2 py-0.5 w-32 focus:outline-none focus:border-blue-400" />
-
-
-
- ) : (
-
- )}
-
- {activeLayoutId !== null && (
-
- )}
-
-
-
- {/* Depth controls */}
-
-
depth
+ {/* Expand group */}
+
+ Expand
{[0, 1, 2, 3].map(d => (
))}
+
+
+
+
+ {/* Data group */}
+
+
+
+ {msg && (
+
+ {msg.text}
+
+ )}
+
{/* History modal */}