diff --git a/components/canvas/canvas.tsx b/components/canvas/canvas.tsx index 8ed77de..5b96d67 100644 --- a/components/canvas/canvas.tsx +++ b/components/canvas/canvas.tsx @@ -72,6 +72,9 @@ interface CanvasInnerProps { const OPTIMISTIC_NODE_PREFIX = "optimistic_"; const OPTIMISTIC_EDGE_PREFIX = "optimistic_edge_"; +/** @xyflow/react default minZoom ist 0.5 — dreimal weiter raus für große Boards. */ +const CANVAS_MIN_ZOOM = 0.5 / 3; + function isOptimisticNodeId(id: string): boolean { return id.startsWith(OPTIMISTIC_NODE_PREFIX); } @@ -1981,6 +1984,7 @@ function CanvasInner({ canvasId }: CanvasInnerProps) { onDragOver={onDragOver} onDrop={onDrop} fitView + minZoom={CANVAS_MIN_ZOOM} snapToGrid snapGrid={[16, 16]} deleteKeyCode={["Backspace", "Delete"]} diff --git a/components/ui/menubar.tsx b/components/ui/menubar.tsx new file mode 100644 index 0000000..6e2a11d --- /dev/null +++ b/components/ui/menubar.tsx @@ -0,0 +1,280 @@ +"use client" + +import * as React from "react" +import { Menubar as MenubarPrimitive } from "radix-ui" + +import { cn } from "@/lib/utils" +import { CheckIcon, ChevronRightIcon } from "lucide-react" + +function Menubar({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function MenubarMenu({ + ...props +}: React.ComponentProps) { + return +} + +function MenubarGroup({ + ...props +}: React.ComponentProps) { + return +} + +function MenubarPortal({ + ...props +}: React.ComponentProps) { + return +} + +function MenubarRadioGroup({ + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function MenubarTrigger({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function MenubarContent({ + className, + align = "start", + alignOffset = -4, + sideOffset = 8, + ...props +}: React.ComponentProps) { + return ( + + + + ) +} + +function MenubarItem({ + className, + inset, + variant = "default", + ...props +}: React.ComponentProps & { + inset?: boolean + variant?: "default" | "destructive" +}) { + return ( + + ) +} + +function MenubarCheckboxItem({ + className, + children, + checked, + inset, + ...props +}: React.ComponentProps & { + inset?: boolean +}) { + return ( + + + + + + + {children} + + ) +} + +function MenubarRadioItem({ + className, + children, + inset, + ...props +}: React.ComponentProps & { + inset?: boolean +}) { + return ( + + + + + + + {children} + + ) +} + +function MenubarLabel({ + className, + inset, + ...props +}: React.ComponentProps & { + inset?: boolean +}) { + return ( + + ) +} + +function MenubarSeparator({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +function MenubarShortcut({ + className, + ...props +}: React.ComponentProps<"span">) { + return ( + + ) +} + +function MenubarSub({ + ...props +}: React.ComponentProps) { + return +} + +function MenubarSubTrigger({ + className, + inset, + children, + ...props +}: React.ComponentProps & { + inset?: boolean +}) { + return ( + + {children} + + + ) +} + +function MenubarSubContent({ + className, + ...props +}: React.ComponentProps) { + return ( + + ) +} + +export { + Menubar, + MenubarPortal, + MenubarMenu, + MenubarTrigger, + MenubarContent, + MenubarGroup, + MenubarSeparator, + MenubarLabel, + MenubarItem, + MenubarShortcut, + MenubarCheckboxItem, + MenubarRadioGroup, + MenubarRadioItem, + MenubarSub, + MenubarSubTrigger, + MenubarSubContent, +}