added typedocs for plugins

This commit is contained in:
peterkogo
2024-01-15 17:38:54 +01:00
parent e35e0348fe
commit 8c32b426f4
10 changed files with 151 additions and 0 deletions
@@ -10,21 +10,39 @@ import type {
} from '@xyflow/system';
export type NodeResizerProps = {
/** id of the node it is resizing
* @remarks optional if used inside custom node
*/
nodeId?: string;
/** color of the resize handle */
color?: string;
/** className applied to handle */
handleClassName?: string;
/** style applied to handle */
handleStyle?: CSSProperties;
/** className applied to line */
lineClassName?: string;
/** style applied to line */
lineStyle?: CSSProperties;
/** are the controls visible */
isVisible?: boolean;
/** minimum width of node */
minWidth?: number;
/** minimum height of node */
minHeight?: number;
/** maximum width of node */
maxWidth?: number;
/** maximum height of node */
maxHeight?: number;
/** keep aspect ratio when resizing */
keepAspectRatio?: boolean;
/** callback to determine if node should resize */
shouldResize?: ShouldResize;
/** callback called when resizing starts */
onResizeStart?: OnResizeStart;
/** callback called when resizing */
onResize?: OnResize;
/** callback called when resizing ends */
onResizeEnd?: OnResizeEnd;
};
@@ -42,7 +60,14 @@ export type ResizeControlProps = Pick<
| 'onResize'
| 'onResizeEnd'
> & {
/** position of the control
* @example ControlPosition.TopLeft, ControlPosition.TopRight,
* ControlPosition.BottomLeft, ControlPosition.BottomRight
*/
position?: ControlPosition;
/** variant of the control
* @example ResizeControlVariant.Handle, ResizeControlVariant.Line
*/
variant?: ResizeControlVariant;
className?: string;
style?: CSSProperties;