"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; /** * Amber annotation card. Fixed chrome on purpose: a note must never be * mistaken for a technology (cyan) or a category band (category accent), in the * admin editor or on the member-facing tree. It has no handles, so it can never * become a prerequisite endpoint. */ export function NoteNodeCard({ data, selected }: NodeProps) { const { note } = data; return (
{/* Classification strip */}
NOTE // ANNOTATION {note.showOnFrontend ? "PUBLISHED" : "INTERNAL"}
{/* 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

)}
{/* Footer readout */}
Annotation NOT RESEARCHABLE
); }