/** * @medicine-wheel/graph-viz — Graph context menus * * Presentational pieces for the node / edge / pane right-click menus: * a positioned panel, menu items, and an inline "create node here" form * (name + type, direction pre-read from the quadrant the click landed in). * State and actions live in `MedicineWheelFlowGraph`. */ import React from 'react'; import type { DirectionName, NodeType } from '@medicine-wheel/ontology-core'; /** Which menu is open, and where (pane-relative CSS px). */ export type GraphMenuState = { kind: 'node'; nodeId: string; x: number; y: number; } | { kind: 'edge'; edgeId: string; x: number; y: number; confirmRelease?: boolean; } | { kind: 'pane'; x: number; y: number; flowX: number; flowY: number; creating?: boolean; }; export declare function GraphContextMenu({ x, y, title, children, }: { x: number; y: number; title?: React.ReactNode; children: React.ReactNode; }): React.JSX.Element; export declare function GraphMenuItem({ label, hint, onSelect, disabled, danger, }: { label: React.ReactNode; hint?: string; onSelect?: () => void; disabled?: boolean; danger?: boolean; }): React.JSX.Element; export declare function GraphMenuDivider(): React.JSX.Element; /** Direction badge in the direction's ink. */ export declare function DirectionBadge({ direction }: { direction: DirectionName; }): React.JSX.Element; /** * Inline "create node here" form. The direction comes from the quadrant * the click landed in and travels with the request. */ export declare function CreateNodeInlineForm({ direction, onSubmit, onCancel, }: { direction?: DirectionName; onSubmit: (values: { name: string; type: NodeType; }) => void; onCancel: () => void; }): React.JSX.Element; //# sourceMappingURL=GraphContextMenu.d.ts.map