=== NEW === - studio/ — MCPEngine Studio scaffold (Next.js monorepo, build plan) - docs/FACTORY-V2.md — Factory v2 architecture doc - docs/CALENDLY_MCP_BUILD_SUMMARY.md — Calendly MCP build report === UPDATED SERVERS === - fieldedge: Added jobs-tools, UI build script, main entry update - lightspeed: Updated main + server entry points - squarespace: Added collection-browser + page-manager apps - toast: Added main + server entry points === INFRA === - infra/command-center/state.json — Updated pipeline state - infra/command-center/FACTORY-V2.md — Factory v2 operator playbook
78 lines
1.6 KiB
TypeScript
78 lines
1.6 KiB
TypeScript
'use client';
|
|
|
|
import React, { memo } from 'react';
|
|
import {
|
|
BaseEdge,
|
|
getSmoothStepPath,
|
|
type EdgeProps,
|
|
} from '@xyflow/react';
|
|
|
|
import { useCanvasState } from '../../hooks/useCanvasState';
|
|
|
|
export const ConnectionEdge = memo(function ConnectionEdge({
|
|
id,
|
|
sourceX,
|
|
sourceY,
|
|
targetX,
|
|
targetY,
|
|
sourcePosition,
|
|
targetPosition,
|
|
source,
|
|
target,
|
|
style = {},
|
|
markerEnd,
|
|
}: EdgeProps) {
|
|
const selectedNodeId = useCanvasState((s) => s.selectedNodeId);
|
|
const isHighlighted = selectedNodeId === source || selectedNodeId === target;
|
|
|
|
const [edgePath] = getSmoothStepPath({
|
|
sourceX,
|
|
sourceY,
|
|
sourcePosition,
|
|
targetX,
|
|
targetY,
|
|
targetPosition,
|
|
borderRadius: 16,
|
|
});
|
|
|
|
return (
|
|
<>
|
|
{/* Glow layer for highlighted state */}
|
|
{isHighlighted && (
|
|
<BaseEdge
|
|
id={`${id}-glow`}
|
|
path={edgePath}
|
|
style={{
|
|
stroke: 'rgba(99, 102, 241, 0.3)',
|
|
strokeWidth: 6,
|
|
filter: 'blur(4px)',
|
|
}}
|
|
/>
|
|
)}
|
|
|
|
{/* Main edge */}
|
|
<BaseEdge
|
|
id={id}
|
|
path={edgePath}
|
|
markerEnd={markerEnd}
|
|
style={{
|
|
stroke: isHighlighted ? '#6366F1' : '#6B7280',
|
|
strokeWidth: isHighlighted ? 2 : 1.5,
|
|
strokeDasharray: '6 4',
|
|
animation: 'dash-flow 1s linear infinite',
|
|
...style,
|
|
}}
|
|
/>
|
|
|
|
{/* CSS animation for dash flow */}
|
|
<style>{`
|
|
@keyframes dash-flow {
|
|
to {
|
|
stroke-dashoffset: -10;
|
|
}
|
|
}
|
|
`}</style>
|
|
</>
|
|
);
|
|
});
|