"use client"; import { motion, AnimatePresence } from "framer-motion"; import { useState, useEffect } from "react"; import type { Node } from "@xyflow/react"; interface NoteNodePanelProps { node: Node | null; onClose: () => void; onDelete: (nodeId: string) => void; onUpdate: (nodeId: string, data: any) => void; } export default function NoteNodePanel({ node, onClose, onDelete, onUpdate }: NoteNodePanelProps) { const nodeData = node?.data as any; const [noteText, setNoteText] = useState(nodeData?.noteText || "Add your notes here..."); // Auto-save changes useEffect(() => { if (!node?.id) return; const timeoutId = setTimeout(() => { onUpdate(node.id, { noteText, nodeName: noteText.slice(0, 30) + (noteText.length > 30 ? '...' : ''), // Update node label }); }, 500); return () => clearTimeout(timeoutId); }, [noteText]); return ( {node && ( {/* Header */}

Sticky Note

Visual-only sticky note for documentation

{/* Form Fields */}
{/* Sticky Note */}