diff --git a/src/components/graph/AnimatedEdge.tsx b/src/components/graph/AnimatedEdge.tsx index e16ef14..d782906 100644 --- a/src/components/graph/AnimatedEdge.tsx +++ b/src/components/graph/AnimatedEdge.tsx @@ -56,7 +56,7 @@ export function AnimatedEdge({ id={startId} markerWidth={DOT_MARKER_R * 2} markerHeight={DOT_MARKER_R * 2} - refX={DOT_MARKER_R + 5} + refX={DOT_MARKER_R + 10} refY={DOT_MARKER_R} orient="auto" > @@ -72,7 +72,7 @@ export function AnimatedEdge({ id={endId} markerWidth={DOT_MARKER_R * 2} markerHeight={DOT_MARKER_R * 2} - refX={DOT_MARKER_R - 5} + refX={DOT_MARKER_R - 10} refY={DOT_MARKER_R} orient="auto" > diff --git a/src/components/graph/ConfigNode.tsx b/src/components/graph/ConfigNode.tsx index 125c85a..9dee7f5 100644 --- a/src/components/graph/ConfigNode.tsx +++ b/src/components/graph/ConfigNode.tsx @@ -12,7 +12,7 @@ import { BaseNodeFooter, BaseNodeHeaderRow, } from './BaseNode' -import { ScrollText } from 'lucide-react' +import { Code2, ScrollText, Variable } from 'lucide-react' import { MenubarItem, MenubarSub, @@ -173,8 +173,9 @@ export const ConfigNode = memo(function ConfigNode({ id, data, width, height }: hasDependencies ? ( <> {connectedConfigNodes.map((n: any) => ( - - + + + {n.data?.title ?? n.id} @@ -182,26 +183,27 @@ export const ConfigNode = memo(function ConfigNode({ id, data, width, height }: className="text-xs" onClick={() => insertExtendsFromNode(n, 'cursor')} > - extend + Extend insertIncludeFromNode(n, 'cursor')} > - include + Include insertImportFromNode(n, 'cursor')} > - import + Import ))} {connectedVariableNodes.map((n: any) => ( - - + + + {n.id} @@ -209,14 +211,15 @@ export const ConfigNode = memo(function ConfigNode({ id, data, width, height }: className="text-xs" onClick={() => insertVariableReference(n, 'cursor')} > - Insert at cursor + Insert ))} {connectedFunctionNodes.map((n: any) => ( - - + + + {n.id} @@ -224,7 +227,7 @@ export const ConfigNode = memo(function ConfigNode({ id, data, width, height }: className="text-xs" onClick={() => insertFunctionCall(n, 'cursor')} > - Insert at cursor + Insert diff --git a/src/components/graph/NodeHandles.tsx b/src/components/graph/NodeHandles.tsx index 293dcf9..24b5df2 100644 --- a/src/components/graph/NodeHandles.tsx +++ b/src/components/graph/NodeHandles.tsx @@ -16,7 +16,7 @@ export function InputHandle({ id }: NodeHandleProps) { top: 20, width: 20, height: 20, - left: -10, + left: -15, borderRadius: '9999px', background: 'transparent', border: 'none', @@ -26,7 +26,7 @@ export function InputHandle({ id }: NodeHandleProps) { justifyContent: 'center', }} > - + ) } @@ -41,7 +41,7 @@ export function OutputHandle({ id }: NodeHandleProps) { top: 20, width: 20, height: 20, - right: -10, + right: -15, borderRadius: '9999px', background: 'transparent', border: 'none', diff --git a/src/lib/flowUtils.ts b/src/lib/flowUtils.ts index 66c5374..f805b66 100644 --- a/src/lib/flowUtils.ts +++ b/src/lib/flowUtils.ts @@ -62,14 +62,14 @@ const DEFAULT_DATA: Record = { export function getDefaultDataForType(type: string, newId?: string): any { const base = { ...DEFAULT_DATA[type] } - if (type === 'config' && newId) base.title = `config-${newId}` + if (type === 'config' && newId) base.title = `${newId}` return base } /** Data for Reset action: clears code completely for config/function; same as default for others */ export function getResetDataForType(type: string, nodeId?: string): any { if (type === 'config') { - return { plantuml: '@startuml\n\n@enduml\n', title: nodeId ? `config-${nodeId}` : '' } + return { plantuml: '@startuml\n\n@enduml\n', title: nodeId ? `${nodeId}` : '' } } if (type === 'function') { return { body: '' }