import { NodeModel } from '@likec4/core/model';
import { aux } from '@likec4/core/types';
import { FC } from 'react';
import { Types } from '../likec4diagram/types';
type Any = aux.Any;
type Unknown = aux.UnknownLayouted;
/**
* Node that will be used to render the element from the model.
* It is a leaf node, i.e. it does not have children.
*
* Custom node renderer receives these props:
* - `nodeProps`: props from XYFlow
* - `nodeModel`: LikeC4 {@link NodeModel.WithElement}
*
* @see [Default implementation](https://github.com/likec4/likec4/blob/main/packages/diagram/src/likec4diagram/custom/nodes/nodes.tsx)
*
* @example
* ```tsx
* import {
* elementNode,
* ElementNodeContainer,
* ElementShape,
* ElementData,
* ElementActions,
* ElementDetailsButtonWithHandler,
* IfEnabled,
* IfNotReadOnly,
* ElementToolbar,
* DefaultHandles,
* ElementTags
* } from '@likec4/diagram/custom'
*
* const CustomElementNode = elementNode(({ nodeProps, nodeModel }) => (
*
*
*
*
*
*
* ,
* onClick: () => console.log('extra'),
* },
* ]}
* />
*
* {nodeModel.element.getMetadata('your-attr') === 'value' && }
*
*
*
*
*
* ))
* ```
*/
export declare function elementNode(component: FC>): Types.NodeRenderer<'element'>;
export type ElementNodeProps = {
nodeProps: Types.NodeProps<'element'>;
nodeModel: NodeModel.WithElement;
};
/**
* Node that will be used to render the element from deployment model.
* It is a leaf node, i.e. it does not have children.
* Can be {@link DeploymentNodeModel} or {@link DeployedInstanceModel}.
*
* Custom node renderer receives these props:
* - `nodeProps`: props from XYFlow
* - `nodeModel`: {@link NodeModel.WithDeploymentElement}
*
* @see [Default implementation](https://github.com/likec4/likec4/blob/main/packages/diagram/src/likec4diagram/custom/nodes/nodes.tsx)
*
* @example
* ```tsx
* import {
* deploymentNode,
* ElementNodeContainer,
* ElementShape,
* ElementData,
* DeploymentElementActions,
* ElementDetailsButtonWithHandler,
* IfNotReadOnly,
* DeploymentElementToolbar,
* DefaultHandles,
* } from '@likec4/diagram/custom'
*
* const CustomDeploymentNode = deploymentNode(({ nodeProps, nodeModel }) => (
*
*
*
* ,
* onClick: () => console.log('extra'),
* },
* ]}
* />
*
*
*
*
*
*
* ))
* ```
*/
export declare function deploymentNode(component: FC>): Types.NodeRenderer<'deployment'>;
export type DeploymentNodeProps = {
nodeProps: Types.NodeProps<'deployment'>;
nodeModel: NodeModel.WithDeploymentElement;
};
/**
* Node that will be used to render the compound element from the model.
* It is a container node, i.e. it has children.
*
* Custom node renderer receives these props:
* - `nodeProps`: props from XYFlow
* - `nodeModel`: LikeC4 {@link NodeModel.WithElement}
*
* @see [Default implementation](https://github.com/likec4/likec4/blob/main/packages/diagram/src/likec4diagram/custom/nodes/nodes.tsx)
*
* @example
* ```tsx
* import {
* compoundElementNode,
* CompoundNodeContainer,
* CompoundTitle,
* CompoundActions,
* CompoundDetailsButtonWithHandler,
* IfEnabled,
* CompoundElementToolbar,
* DefaultHandles,
* } from '@likec4/diagram/custom'
*
* const CustomCompoundElementNode = compoundElementNode(({ nodeProps, nodeModel }) => (
*
*
*
*
*
*
*
*
*
*
*
* ))
* ```
*/
export declare function compoundElementNode(component: FC>): Types.NodeRenderer<'compound-element'>;
export type CompoundElementNodeProps = {
nodeProps: Types.NodeProps<'compound-element'>;
nodeModel: NodeModel.WithElement;
};
/**
* Node that will be used to render the compound from the deployment model.
* It is a container node, i.e. it has children.
*
* Custom node renderer receives these props:
* - `nodeProps`: props from XYFlow
* - `nodeModel`: LikeC4 {@link NodeModel.WithDeploymentElement}
*
* @see [Default implementation](https://github.com/likec4/likec4/blob/main/packages/diagram/src/likec4diagram/custom/nodes/nodes.tsx)
*
* @example
* ```tsx
* import {
* compoundDeploymentNode,
* CompoundNodeContainer,
* CompoundTitle,
* CompoundActions,
* CompoundDeploymentToolbar,
* DefaultHandles,
* } from '@likec4/diagram/custom'
*
* const CustomCompoundDeploymentNode = compoundDeploymentNode(({ nodeProps, nodeModel }) => (
*
*
*
*
*
*
*
*
* ```
*/
export declare function compoundDeploymentNode(component: FC>): Types.NodeRenderer<'compound-deployment'>;
export type CompoundDeploymentNodeProps = {
nodeProps: Types.NodeProps<'compound-deployment'>;
nodeModel: NodeModel.WithDeploymentElement;
};
/**
* Node that will be used to render the view group from the model.
*
* Custom node renderer receives these props:
* - `nodeProps`: props from XYFlow
* - `nodeModel`: LikeC4 {@link NodeModel.IsGroup}
*
* @see [Default implementation](https://github.com/likec4/likec4/blob/main/packages/diagram/src/likec4diagram/custom/nodes/nodes.tsx)
*
* @example
* ```tsx
* import {
* viewGroupNode,
* CompoundNodeContainer,
* CompoundTitle,
* DefaultHandles,
* } from '@likec4/diagram/custom'
*
* const CustomViewGroupNode = viewGroupNode(({ nodeProps, nodeModel }) => (
*
*
*
*
* ```
*/
export declare function viewGroupNode(component: FC>): Types.NodeRenderer<'view-group'>;
export type ViewGroupNodeProps = {
nodeProps: Types.NodeProps<'view-group'>;
nodeModel: NodeModel.IsGroup;
};
export declare function sequenceActorNode(component: FC>): Types.NodeRenderer<'seq-actor'>;
export type SequenceActorNodeProps = {
nodeProps: Types.NodeProps<'seq-actor'>;
nodeModel: NodeModel.WithElement;
};
export {};