+ {paneLayouts.map(layout => (
+
+ ))}
+
+ {paneItems.map(item => {
+ const pl = resolvePaneItemLayout(manager, item);
+ if (!pl) return null;
+
+ const samePaneItems = paneItems.filter(p => p.paneIndex === item.paneIndex);
+ const stackIdx = samePaneItems.findIndex(p => p.id === item.id);
+ const paneBottom = pl.topY + pl.height;
+ const clusterTop = paneBottom - 4 - clusterHeight - stackIdx * (clusterHeight + 4);
+ const menuItems = buildMenuItems(item, indicators, paneItems, {
+ focusedId, onSplit, onDuplicate, onExpand, onRestore, onRemove,
+ });
+
+ if (menuItems.length === 0 && !allowDrag) return null;
+
+ return (
+
+ {allowDrag && (
+
+ )}
+ {menuItems.length > 0 && (
+
+ )}
+
+ );
+ })}
+
+
+ {openItem && openMenuId && (() => {
+ const menuItems = buildMenuItems(openItem, indicators, paneItems, {
+ focusedId, onSplit, onDuplicate, onExpand, onRestore, onRemove,
+ onDone: closeFlyout,
+ });
+ if (menuItems.length === 0) return null;
+
+ return (
+