import { ReactNode } from '../../../../node_modules/react'; import { FlowDirection } from '../tokens'; export interface FlowCanvasToolbarProps { /** Live viewport zoom (e.g. from `onMove` or `useReactFlow().getZoom()`). Drives the pill's label. */ zoom: number; onZoomIn?: () => void; onZoomOut?: () => void; onZoomTo?: (zoom: number) => void; onFitView?: () => void; interactionMode?: 'select' | 'pan'; onInteractionModeChange?: (mode: 'select' | 'pan') => void; /** Receives the button's own DOM node so the caller can anchor a popover to it. */ onAddNode?: (anchor: HTMLElement) => void; onAddNote?: () => void; /** @default 'LR' */ layoutDirection?: FlowDirection; onLayoutDirectionChange?: (direction: FlowDirection) => void; onAutoLayout?: () => void; isFullscreen?: boolean; onToggleFullscreen?: () => void; showMinimap?: boolean; onToggleMinimap?: () => void; /** * Renders in the toolbar's leading position, before the add-node/add-note buttons. * A generic render-prop slot (e.g. for an app-specific AI-panel toggle) — the design * system has no concept of an "AI panel" to build a dedicated button for. */ leadingSlot?: ReactNode; /** Renders after the fullscreen/minimap buttons, for app-specific trailing actions. */ trailingSlot?: ReactNode; } /** * FlowCanvasToolbar — the floating bottom-centre canvas toolbar ported from CJO's * `CanvasToolbar` (Figma node 1818:67330), rebuilt as a presentation-only, fully * callback-driven Signal component. * * This component renders only the `Paper` and its contents — it does not position * itself. A consumer places it, typically via `` inside * a `` (see the `InsideCanvas` story) or via `FlowToolbar` for a fully * custom layout. * * Every callback is optional; an absent callback hides only its own button. The ten * fixed buttons collapse into four visual groups — Leading (`leadingSlot`, add-node, * add-note), Mode/layout (select/pan, auto-layout, direction toggle), Zoom (zoom-out, * pill+menu, zoom-in), Trailing (fullscreen, minimap toggle, `trailingSlot`) — and a * divider renders only between two adjacent, both-non-empty groups, so an entirely * empty group never leaves an orphaned or doubled divider behind. */ export declare function FlowCanvasToolbar({ zoom, onZoomIn, onZoomOut, onZoomTo, onFitView, interactionMode, onInteractionModeChange, onAddNode, onAddNote, layoutDirection, onLayoutDirectionChange, onAutoLayout, isFullscreen, onToggleFullscreen, showMinimap, onToggleMinimap, leadingSlot, trailingSlot, }: FlowCanvasToolbarProps): import("react/jsx-runtime").JSX.Element;