/* Copyright 2026 Marimo. All rights reserved. */ import type React from "react"; import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { useCellDataAtoms, useCellIds } from "@/core/cells/cells"; import { useVariables } from "@/core/variables/state"; import { cn } from "@/utils/cn"; import { DependencyGraph } from "../../../dependency-graph/dependency-graph"; import { MinimapContent } from "../../../dependency-graph/minimap-content"; import { useDependencyPanelTab } from "../wrapper/useDependencyPanelTab"; import { usePanelSection } from "./panel-context"; const DependencyGraphPanel: React.FC = () => { const { dependencyPanelTab, setDependencyPanelTab } = useDependencyPanelTab(); const variables = useVariables(); const cellIds = useCellIds(); const [cells] = useCellDataAtoms(); const panelSection = usePanelSection(); // Show toggle inside panel when in developer panel (horizontal layout) // since the sidebar has its own header with the toggle const showInlineToggle = panelSection === "developer-panel"; return (
{showInlineToggle && (
{ if (value === "minimap" || value === "graph") { setDependencyPanelTab(value); } }} > Minimap Graph
)}
{dependencyPanelTab === "minimap" ? ( ) : ( )}
); }; export default DependencyGraphPanel;