"use client"; import type { Node, NodeProps } from "@xyflow/react"; import React from "react"; import type { TreeNote } from "./types"; export type NoteNodeData = { note: TreeNote; /** Editor-only controls are handled by the canvas; the card stays read-only. */ connectable?: boolean; }; export type NoteNodeModel = Node; /** * Memo card for canvas annotations. * * Deliberately a different silhouette from a technology card, not just a * different accent colour: no classification strip, no readout footer, no * corner brackets, a dashed amber border, a warm paper-tinted fill and a * vertical rail label. At fit-view zoom (where the text is illegible) the warm * tint and dashed edge are what separate it from the near-black tech cards; up * close the vertical NOTE rail and folded corner do. It has no handles either, * so it can never become a prerequisite endpoint. */ export function NoteNodeCard({ data, selected }: NodeProps) { const { note } = data; return (
{/* Folded corner: the page-coloured triangle reads as a peeled note, which no technology card has. */} {/* Vertical rail label instead of a horizontal classification strip */}
Note
{/* Body: the title keeps a fixed two-line slot and the detail text takes whatever height is left, so a long title can never clip the body to nothing (the card height is fixed by the canvas). */}
{note.title}
{note.body.trim() ? (

{note.body}

) : (

No details

)}
{note.showOnFrontend ? "Published" : "Internal"} // Annotation
); }