- NodeShell component wraps all nodes with handle rendering + px-8 content padding
- Handles positioned at node edges with labels outside (no overlap with content)
- Labels: 9px mono font, full opacity, color-matched to socket type
- Removed old TypedHandle + NodeHandles (replaced by NodeShell internals)
- All 18 node components updated to use NodeShell
- Format node dynamically generates handles from template {0}, {1}, etc.
24 lines
931 B
TypeScript
24 lines
931 B
TypeScript
"use client";
|
|
|
|
import { type NodeProps } from "@xyflow/react";
|
|
import { BookOpenTextIcon, PencilIcon } from "lucide-react";
|
|
import { NodeShell } from "./NodeShell";
|
|
|
|
export function NarrativeBeatNode({ data }: NodeProps) {
|
|
const d = data as { title?: string; text?: string };
|
|
|
|
return (
|
|
<NodeShell nodeType="narrativeBeat" className="bg-blue-950/80 border border-blue-500/50 rounded-lg shadow-md min-w-56">
|
|
<div className="flex items-center gap-2 px-3 py-2 border-b border-blue-500/30">
|
|
<BookOpenTextIcon className="size-4 text-blue-400 shrink-0" />
|
|
<span className="text-sm font-medium text-blue-200 flex-1 truncate">
|
|
{d.title || "Untitled Beat"}
|
|
</span>
|
|
<PencilIcon className="size-3 text-blue-500/40 shrink-0" />
|
|
</div>
|
|
<div className="px-3 py-2 text-xs text-blue-300/80 line-clamp-3">
|
|
{d.text || "No description."}
|
|
</div>
|
|
</NodeShell>
|
|
);
|
|
}
|