import { DragEvent, ReactNode } from '../../../../node_modules/react'; import { FlowNodeKindDef } from '../nodeRegistry/types'; import { FlowNodePaletteCategory } from './types'; export interface NodePaletteProps { open: boolean; /** * A real element — `event.currentTarget` from whatever triggered the popover * (a toolbar button, a connection handle). Never a virtual/point anchor. */ anchorEl: HTMLElement | null; onClose: () => void; /** * Required — the design system ships no catalogue of its own for a missing prop * to fall back to. Every consumer supplies its own category grouping, optionally * built with `groupNodesByCategory`. */ categories: FlowNodePaletteCategory[]; /** Click (not drag) on an enabled item. Never fires for a disabled item. */ onPick: (item: FlowNodeKindDef) => void; /** Notified after the drag payload has already been written to `event.dataTransfer`. Never fires for a disabled item. */ onDragStart?: (event: DragEvent, item: FlowNodeKindDef) => void; /** @default () => true — every item enabled. */ isItemEnabled?: (item: FlowNodeKindDef) => boolean; /** @default () => 'Coming soon' — CJO's exact copy (`NodePalette.tsx:180`), shown only for a disabled item. */ getDisabledHint?: (item: FlowNodeKindDef) => ReactNode; /** @default true */ searchable?: boolean; /** @default 288 — CJO's `PALETTE_WIDTH`. */ width?: number; /** @default 420 — CJO's `PALETTE_MAX_HEIGHT`. */ maxHeight?: number; testId?: string; } /** * Categorized, searchable add-node popover (CJO Figma node `1818:68136`). Every * item is both a click target (`onPick`) and an HTML5 drag source (`onDragStart` + * the `FLOW_NODE_DRAG_MIME` payload) onto the canvas. Ships no catalogue, no * enabled/disabled logic, and no colour table of its own — everything comes from * the app-supplied `categories` (each item's own `accent` resolved via * `useNodeAccent`/`AccentIconSwatch`) and the optional `isItemEnabled`/ * `getDisabledHint` callbacks. */ export declare function NodePalette({ open, anchorEl, onClose, categories, onPick, onDragStart, isItemEnabled, getDisabledHint, searchable, width, maxHeight, testId, }: NodePaletteProps): import("react/jsx-runtime").JSX.Element;