"use client"; import React from "react"; import { BaseEdge, getBezierPath, type EdgeProps } from "@xyflow/react"; // 커스텀 애니메이션 엣지 — bezier 곡선 + 흐르는 파티클 + 글로우 레이어 export function AnimatedFlowEdge({ id, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, style, markerEnd, data, }: EdgeProps) { const [edgePath] = getBezierPath({ sourceX, sourceY, sourcePosition, targetX, targetY, targetPosition, }); const strokeColor = (style?.stroke as string) || "hsl(var(--primary))"; const strokeW = (style?.strokeWidth as number) || 2; const isActive = data?.active !== false; const duration = data?.duration || "3s"; const filterId = `edge-glow-${id}`; return ( <> {/* 글로우용 SVG 필터 정의 (엣지별 고유 ID) */} {/* 글로우 레이어 */} {/* 메인 엣지 */} {/* 흐르는 파티클 */} {isActive && ( <> )} ); }