import { AppProvider, useApp } from "./app-state"; import { EditorView } from "./components/Editor"; import { FileTree } from "./components/FileTree"; import { GitPanel } from "./components/GitPanel"; import { Preview } from "./components/Preview"; import { ProjectPicker } from "./components/ProjectPicker"; import { TopBar } from "./components/TopBar"; import { StatusBar } from "./components/StatusBar"; import { ToastHost } from "./components/ToastHost"; import { EmptyState } from "./components/EmptyState"; import { PanelSection } from "./components/PanelSection"; import { SettingsPanel } from "./components/SettingsPanel"; import { ResizableSplit } from "./components/ResizableSplit"; import { Files, GitGraph, Settings } from "lucide-react"; import { Icon } from "./components/ui/Icon"; function Shell() { const { state, dispatch } = useApp(); const panelTabs = [ { id: "files" as const, label: "Files", icon: Files }, { id: "git" as const, label: "Git", icon: GitGraph }, { id: "settings" as const, label: "Settings", icon: Settings }, ]; return (
{state.error && (
{state.error}
)}
{/* Sidebar */} {/* Main workspace */}
{state.currentProject && state.openFile ? ( } right={} onResize={() => { document.dispatchEvent(new CustomEvent("typst-leaf:layout")); }} /> ) : (
{!state.currentProject ? (
) : !state.openFile ? (
) : null}
)}
); } export default function App() { return ( ); }