import { ResizeControlVariant } from '@xyflow/system'; import type { NodeBase, ControlPosition, ControlLinePosition, OnResize, OnResizeStart, OnResizeEnd, ShouldResize, ResizeControlDirection } from '@xyflow/system'; import type { FlowStore } from './types.ts'; /** * Options for initNodeResizer. */ export type NodeResizerOptions = { /** Minimum width the node can be resized to (default: 10) */ minWidth?: number; /** Minimum height the node can be resized to (default: 10) */ minHeight?: number; /** Maximum width the node can be resized to (default: Infinity) */ maxWidth?: number; /** Maximum height the node can be resized to (default: Infinity) */ maxHeight?: number; /** Whether to keep the aspect ratio during resize (default: false) */ keepAspectRatio?: boolean; /** Which variant of resize controls to use: 'handle' (corners) or 'line' (edges) */ variant?: ResizeControlVariant | 'handle' | 'line'; /** Callback fired when resize starts */ onResizeStart?: OnResizeStart; /** Callback fired during resize with new dimensions */ onResize?: OnResize; /** Callback fired when resize ends */ onResizeEnd?: OnResizeEnd; /** Callback to determine if resize should proceed */ shouldResize?: ShouldResize; /** Whether the node is resizable (default: true) */ isVisible?: boolean; /** CSS color for the resize handle lines/corners */ color?: string; }; /** * Initialize resize handles on a node element. * * Creates resize handle elements (corners and/or lines) and attaches * XYResizer from @xyflow/system for the resize logic. * * Usage: * // Inside a custom node type function: * initNodeResizer(this.parentElement, { * nodeId: props.id, * store, * minWidth: 100, * minHeight: 50, * onResize: (event, params) => console.log('Resized:', params), * }) */ export declare function initNodeResizer(nodeEl: HTMLElement, nodeId: string, store: FlowStore, options?: NodeResizerOptions): () => void; export { ResizeControlVariant }; export type { ControlPosition, ControlLinePosition, OnResize, OnResizeStart, OnResizeEnd, ShouldResize, ResizeControlDirection, }; //# sourceMappingURL=node-resizer.d.ts.map