1
0
Fork 0
polaris-task-force/src/components/admin/npc-dialogue/NpcDialogueEditor.tsx
Z8MB1E a96eddf32c feat(npc-dialogue): bigger flow handles + delete edges via Delete
- Enlarge flow-editor wire handles from size-2 (8px) to size-3 (12px) so
  they are easier to click and grab.
- Select an edge by clicking it, then remove it with the Delete key.
  Selection is tracked in state and the highlight renders through BaseEdge
  stroke props so the chosen line stands out.
- Edges are a derived projection, so deletion scrubs the hop from the
  source node data via a new pure removeHopFromNode() helper in dialogue.ts
  (choice row, condition branch, or single continuation).
- Add tests/int/npc-dialogue-remove-hop.int.spec.ts (4 tests).
2026-10-07 14:25:14 -04:00

705 lines
25 KiB
TypeScript

"use client";
import {
useCallback,
useEffect,
useMemo,
useRef,
useState,
type MouseEvent as ReactMouseEvent,
} from "react";
import {
Background,
type Connection,
type Edge,
MarkerType,
type Node,
type NodeChange,
ReactFlow,
ReactFlowProvider,
useNodesState,
useReactFlow,
type XYPosition,
} from "@xyflow/react";
import "@xyflow/react/dist/style.css";
import { Magnet, Maximize2, Minimize2 } from "lucide-react";
import { useField } from "@payloadcms/ui";
import type {
DialogueEdge,
DialogueNode,
DialogueNodeData,
FlowData,
NpcDialogueNodeType,
} from "@/lib/npc-dialogue/dialogue";
import { deriveEdges, removeHopFromNode, validateGraph } from "@/lib/npc-dialogue/dialogue";
import { NpcDialogueNode } from "./NpcDialogueNode";
import { NodeEditDialog } from "./NodeEditDialog";
import { RoutedFlowEdge } from "./RoutedFlowEdge";
const nodeTypes = {
dialogue: NpcDialogueNode,
choice: NpcDialogueNode,
event: NpcDialogueNode,
delay: NpcDialogueNode,
condition: NpcDialogueNode,
end: NpcDialogueNode,
};
const edgeTypes = { routed: RoutedFlowEdge };
/** Arrowhead tinted to match the animated cyan edge stroke. */
const EDGE_MARKER = { type: MarkerType.ArrowClosed, width: 14, height: 14, color: "#67e8f9" };
/** Drag snapping grid (px); matches the Background dot gap. */
const SNAP_GRID = 20;
const SNAP_STORAGE_KEY = "ptf:npc-dialogue:snap-to-grid";
const defaultFlow: FlowData = { nodes: [], edges: [] };
type ContextMenu = { x: number; y: number; nodeId: string } | null;
/** Right-click menu on empty canvas: adds a node at the clicked flow spot. */
type PaneMenu = { x: number; y: number; fx: number; fy: number } | null;
const NODE_LABELS: Record<NpcDialogueNodeType, string> = {
dialogue: "Dialogue",
choice: "Choice",
event: "Event",
delay: "Delay",
condition: "Condition",
end: "End",
};
const DEFAULT_DATA: Record<string, DialogueNodeData> = {
// No speaker by default: an empty speaker renders as the NPC's own name.
dialogue: { body: "" },
choice: { choices: [] },
event: { effect: { type: "notify", message: "" } },
delay: { delaySeconds: 2 },
condition: { condition: { kind: "flag", key: "", op: "is_true" } },
end: {},
};
function FlowEditor() {
const { value, setValue } = useField<FlowData>();
const rf = useReactFlow();
const initial: FlowData =
value && typeof value === "object" && Array.isArray((value as FlowData).nodes)
? (value as FlowData)
: defaultFlow;
const [nodes, setNodes, onNodesChange] = useNodesState(initial.nodes as Node[]);
const [editingNodeId, setEditingNodeId] = useState<string | null>(null);
const [contextMenu, setContextMenu] = useState<ContextMenu>(null);
const [paneMenu, setPaneMenu] = useState<PaneMenu>(null);
const [expanded, setExpanded] = useState(false);
const [snap, setSnap] = useState(true);
const [selectedEdgeId, setSelectedEdgeId] = useState<string | null>(null);
const lastSerialized = useRef<string>("");
const menuRef = useRef<HTMLDivElement | null>(null);
const paneMenuRef = useRef<HTMLDivElement | null>(null);
const canvasRef = useRef<HTMLDivElement | null>(null);
// Nodes created but never saved: closing their dialog without saving
// discards them instead of leaving an empty card on the canvas.
const draftIds = useRef<Set<string>>(new Set());
// Snap-to-grid is a per-browser preference (default on), like the tech
// tree's; reading it after mount keeps SSR/CSR markup identical.
useEffect(() => {
try {
const stored = window.localStorage.getItem(SNAP_STORAGE_KEY);
if (stored === "off") setSnap(false);
} catch {
// Storage unavailable: keep the default.
}
}, []);
const toggleSnap = useCallback(() => {
setSnap((prev) => {
const next = !prev;
try {
window.localStorage.setItem(SNAP_STORAGE_KEY, next ? "on" : "off");
} catch {
// Preference just won't persist.
}
return next;
});
}, []);
// Edges are a derived projection of the node data, never edited directly.
// Every edge renders through the routed edge type so lines bend around
// unrelated cards instead of slicing through them.
const syncedEdges = useMemo<Edge[]>(
() =>
deriveEdges(nodes as DialogueNode[])
.map((edge) => ({
...edge,
type: "routed",
animated: true,
markerEnd: EDGE_MARKER,
selected: edge.id === selectedEdgeId,
})),
[nodes, selectedEdgeId],
);
const serialize = useCallback((nds: Node[]) => {
// Volatile interaction flags (selection, in-progress drags) are not part
// of the graph and must not leak into the persisted value.
const clean = nds.map(({ selected, dragging, ...rest }) => rest) as DialogueNode[];
const payload: FlowData = {
nodes: clean,
edges: deriveEdges(clean),
};
const serialized = JSON.stringify(payload);
if (serialized !== lastSerialized.current) {
lastSerialized.current = serialized;
setValue(payload);
}
}, [setValue]);
// Dragging fires a position change per mousemove; only the settled one
// (dragging === false) is worth writing to the field value. The flag is
// consumed by the effect below, which sees the updated nodes state.
const pendingPositionSave = useRef(false);
const handleNodesChange = useCallback(
(changes: NodeChange<Node>[]) => {
if (changes.some((c) => c.type === "position" && !c.dragging)) {
pendingPositionSave.current = true;
}
onNodesChange(changes);
},
[onNodesChange],
);
// Clicking the pane or an edge clears node selection; edge selection lives
// in its own state so it survives the node re-render.
const clearNodeSelection = useCallback(() => {
setNodes((nds) => nds.map((n) => (n.selected ? { ...n, selected: false } : n)));
}, [setNodes]);
useEffect(() => {
if (!pendingPositionSave.current) return;
pendingPositionSave.current = false;
serialize(nodes);
}, [nodes, serialize]);
/**
* Adds a node. Without an explicit position it lands in the middle of the
* current viewport (with a small cascade offset), so toolbar-added nodes
* are never dropped off-screen.
*/
const addNode = useCallback(
(type: NpcDialogueNodeType, at?: XYPosition) => {
const count = nodes.length;
let position: XYPosition;
if (at) {
position = at;
} else {
const vp = rf.getViewport();
const rect = canvasRef.current?.getBoundingClientRect();
const cx = (rect?.width ?? 800) / 2;
const cy = (rect?.height ?? 500) / 2;
position = {
x: (cx - vp.x) / vp.zoom - 160 + (count % 3) * 28,
y: (cy - vp.y) / vp.zoom - 60 + (count % 3) * 22,
};
}
const node: DialogueNode = {
id: crypto.randomUUID(),
type,
position,
data: { ...DEFAULT_DATA[type] },
};
const next = [...nodes, node];
setNodes(next);
serialize(next);
draftIds.current.add(node.id);
setEditingNodeId(node.id);
setPaneMenu(null);
},
[nodes, setNodes, serialize, rf],
);
const handleNodeSave = useCallback(
(nodeId: string, data: DialogueNodeData) => {
const next = nodes.map((n) => (n.id === nodeId ? { ...n, data } : n));
setNodes(next);
serialize(next);
draftIds.current.delete(nodeId);
setEditingNodeId(null);
},
[nodes, setNodes, serialize],
);
/** Deletes one or more nodes and scrubs every hop that pointed at them. */
const deleteNodes = useCallback(
(ids: string[]) => {
const gone = new Set(ids);
const next = (nodes as DialogueNode[])
.filter((n) => !gone.has(n.id))
.map((n) => ({
...n,
data: {
...n.data,
next: n.data.next && !gone.has(n.data.next.target) ? n.data.next : undefined,
choices: (n.data.choices ?? []).filter((c) => !gone.has(c.target)),
trueTarget: n.data.trueTarget && !gone.has(n.data.trueTarget) ? n.data.trueTarget : undefined,
falseTarget: n.data.falseTarget && !gone.has(n.data.falseTarget) ? n.data.falseTarget : undefined,
},
}));
setNodes(next);
serialize(next);
setContextMenu(null);
if (editingNodeId && gone.has(editingNodeId)) setEditingNodeId(null);
},
[nodes, setNodes, serialize, editingNodeId],
);
/**
* Deletes one edge. Edges are derived, so this scrubs the hop it represents
* from the source node data: a choice row, a condition branch, or the single
* continuation. `sourceHandle` identifies which one (c0..cN / true / false /
* undefined).
*/
const deleteEdge = useCallback(
(edge: Edge) => {
const source = (nodes as DialogueNode[]).find((n) => n.id === edge.source);
if (!source) return;
const next = (nodes as DialogueNode[]).map((n) =>
n.id === edge.source ? removeHopFromNode(n, edge.sourceHandle) : n,
);
setNodes(next);
serialize(next);
},
[nodes, setNodes, serialize],
);
const onNodeContextMenu = useCallback(
(e: ReactMouseEvent, node: Node) => {
e.preventDefault();
setContextMenu({ x: e.clientX, y: e.clientY, nodeId: node.id });
},
[],
);
// Right-click on empty canvas: offer a "new node" menu at the cursor.
const onPaneContextMenu = useCallback(
(e: MouseEvent | ReactMouseEvent) => {
e.preventDefault();
const p = rf.screenToFlowPosition({ x: e.clientX, y: e.clientY });
setContextMenu(null);
setPaneMenu({ x: e.clientX, y: e.clientY, fx: p.x, fy: p.y });
},
[rf],
);
// Double-click on empty canvas: drop a Dialogue node right there.
const onCanvasDoubleClick = useCallback(
(e: ReactMouseEvent<HTMLDivElement>) => {
const target = e.target as HTMLElement;
// Node double-clicks open the edit dialog (onNodeDoubleClick); they
// must never also spawn a new node.
if (target.closest?.(".react-flow__node")) return;
if (!target.closest?.(".react-flow__pane")) return;
const pos = rf.screenToFlowPosition({ x: e.clientX, y: e.clientY });
addNode("dialogue", pos);
},
[rf, addNode],
);
/**
* Drag-to-connect writes into the node data (the graph's source of truth);
* edges stay a derived projection. `sourceHandle` identifies which output
* was dragged (`c0`..`cN` per choice row, `true`/`false` per condition
* branch); without one, sensible fallbacks apply (choice gains a new
* option, condition fills its first free branch).
*/
const applyConnection = useCallback(
(sourceId: string, targetId: string, sourceHandle?: string | null) => {
if (sourceId === targetId) return;
const all = nodes as DialogueNode[];
const source = all.find((n) => n.id === sourceId);
const target = all.find((n) => n.id === targetId);
if (!source || !target) return;
if (source.type === "end" || target.data.isStart) return;
let needsChoiceLabel = false;
const next = all.map((n) => {
if (n.id !== sourceId) return n;
if (n.type === "choice") {
const m = sourceHandle?.match(/^c(\d+)$/);
if (m) {
const idx = Number(m[1]);
const choices = [...(n.data.choices ?? [])];
if (!choices[idx]) return n;
choices[idx] = { ...choices[idx], target: targetId };
if (!choices[idx].label?.trim()) needsChoiceLabel = true;
return { ...n, data: { ...n.data, choices } };
}
// Generic handle (zero choices): dragging creates the first choice.
needsChoiceLabel = true;
return {
...n,
data: { ...n.data, choices: [...(n.data.choices ?? []), { label: "", target: targetId }] },
};
}
if (n.type === "condition") {
if (sourceHandle === "true") {
return { ...n, data: { ...n.data, trueTarget: targetId } };
}
if (sourceHandle === "false") {
return { ...n, data: { ...n.data, falseTarget: targetId } };
}
// No handle info (dropped on the card): first free branch wins.
if (n.data.trueTarget && n.data.falseTarget) return n;
return {
...n,
data: {
...n.data,
trueTarget: n.data.trueTarget ?? targetId,
falseTarget: n.data.trueTarget ? n.data.falseTarget : targetId,
},
};
}
return { ...n, data: { ...n.data, next: { target: targetId } } };
});
setNodes(next);
serialize(next);
// A fresh or still-unlabeled choice pops the editor so its button text
// can be typed immediately (validateGraph flags empty labels).
if (source.type === "choice" && needsChoiceLabel) setEditingNodeId(sourceId);
},
[nodes, setNodes, serialize],
);
const isValidConnection = useCallback(
(c: Connection | Edge) => {
if (!c.source || !c.target || c.source === c.target) return false;
const target = (nodes as DialogueNode[]).find((n) => n.id === c.target);
return !!target && !target.data.isStart;
},
[nodes],
);
const onPaneClick = useCallback(() => {
setContextMenu(null);
setPaneMenu(null);
setSelectedEdgeId(null);
}, []);
/**
* Selects an edge so it can be removed with the Delete key. Edges are a
* derived projection, so this only toggles selection: a second click on the
* same edge clears it, and either way node selection is cleared first.
*/
const onEdgeClick = useCallback(
(e: ReactMouseEvent, edge: Edge) => {
e.stopPropagation();
setSelectedEdgeId((prev) => (prev === edge.id ? null : edge.id));
clearNodeSelection();
},
[clearNodeSelection],
);
const validation = useMemo(() => validateGraph(nodes as DialogueNode[]), [nodes]);
// Close both context menus on escape / pointer outside.
const closeMenus = useCallback(() => {
setContextMenu(null);
setPaneMenu(null);
}, []);
useEffect(() => {
if (!contextMenu && !paneMenu) return;
const onKey = (e: KeyboardEvent) => {
if (e.key === "Escape") closeMenus();
};
// Ignore pointerdowns inside a menu itself: pointerdown fires before
// click, so closing here would unmount the menu before its buttons can
// ever receive the click.
const onPtr = (e: PointerEvent) => {
const t = e.target as globalThis.Node;
if (menuRef.current?.contains(t) || paneMenuRef.current?.contains(t)) return;
closeMenus();
};
window.addEventListener("keydown", onKey);
document.addEventListener("pointerdown", onPtr);
return () => {
window.removeEventListener("keydown", onKey);
document.removeEventListener("pointerdown", onPtr);
};
}, [contextMenu, paneMenu, closeMenus]);
// Escape collapses the expanded editor, but only when nothing is layered
// on top of it (the node dialog or a context menu claim the key first).
useEffect(() => {
if (!expanded) return;
const onKey = (e: KeyboardEvent) => {
if (e.key === "Escape" && !contextMenu && !paneMenu && editingNodeId === null) setExpanded(false);
};
window.addEventListener("keydown", onKey);
return () => window.removeEventListener("keydown", onKey);
}, [expanded, contextMenu, paneMenu, editingNodeId]);
// Delete/Backspace removes the selected nodes, unless a dialog or menu is
// open or the user is typing in a form field.
useEffect(() => {
const onKey = (e: KeyboardEvent) => {
if (e.key !== "Delete" && e.key !== "Backspace") return;
if (editingNodeId !== null || contextMenu || paneMenu) return;
const el = document.activeElement as HTMLElement | null;
if (
el &&
(el.tagName === "INPUT" ||
el.tagName === "TEXTAREA" ||
el.tagName === "SELECT" ||
el.isContentEditable)
) {
return;
}
// An edge selection takes precedence over node selection.
if (selectedEdgeId) {
const edge = syncedEdges.find((candidate) => candidate.id === selectedEdgeId);
if (edge) {
e.preventDefault();
setSelectedEdgeId(null);
deleteEdge(edge);
}
return;
}
const selected = nodes.filter((n) => n.selected).map((n) => n.id);
if (selected.length === 0) return;
e.preventDefault();
deleteNodes(selected);
};
window.addEventListener("keydown", onKey);
return () => window.removeEventListener("keydown", onKey);
}, [nodes, editingNodeId, contextMenu, paneMenu, selectedEdgeId, syncedEdges, deleteEdge, deleteNodes]);
const buttonClass =
"px-2 py-1 text-[10px] font-medium rounded border transition-colors cursor-pointer";
return (
<div
className={`flex flex-col gap-2 w-full${
expanded ? " npc-dialogue-editor--expanded bg-zinc-950 p-3" : ""
}`}
>
<div className="flex flex-wrap items-center gap-1 px-2 py-1.5 bg-zinc-900 rounded-t-md border border-zinc-700">
<span className="text-[9px] uppercase tracking-wider text-zinc-500 font-semibold mr-1">
Nodes
</span>
<button
className={`${buttonClass} bg-blue-950 border-blue-700 text-blue-200 hover:bg-blue-900`}
onClick={() => addNode("dialogue")}
>
{NODE_LABELS.dialogue}
</button>
<button
className={`${buttonClass} bg-amber-950 border-amber-700 text-amber-200 hover:bg-amber-900`}
onClick={() => addNode("choice")}
>
{NODE_LABELS.choice}
</button>
<button
className={`${buttonClass} bg-emerald-950 border-emerald-700 text-emerald-200 hover:bg-emerald-900`}
onClick={() => addNode("event")}
>
{NODE_LABELS.event}
</button>
<button
className={`${buttonClass} bg-violet-950 border-violet-700 text-violet-200 hover:bg-violet-900`}
onClick={() => addNode("delay")}
>
{NODE_LABELS.delay}
</button>
<button
className={`${buttonClass} bg-sky-950 border-sky-700 text-sky-200 hover:bg-sky-900`}
onClick={() => addNode("condition")}
>
{NODE_LABELS.condition}
</button>
<button
className={`${buttonClass} bg-slate-950 border-slate-700 text-slate-200 hover:bg-slate-900`}
onClick={() => addNode("end")}
>
{NODE_LABELS.end}
</button>
<span className="ml-auto text-[10px] text-zinc-500">
{nodes.length} node{nodes.length !== 1 ? "s" : ""}
</span>
<button
type="button"
title={snap ? "Nodes snap to the grid while dragging" : "Grid snapping is off"}
aria-pressed={snap}
onClick={toggleSnap}
className={`${buttonClass} inline-flex items-center gap-1 ${
snap
? "bg-cyan-950 border-cyan-700 text-cyan-200 hover:bg-cyan-900"
: "bg-zinc-800 border-zinc-600 text-zinc-400 hover:bg-zinc-700"
}`}
>
<Magnet size={12} />
Snap {snap ? "On" : "Off"}
</button>
<button
type="button"
title={expanded ? "Shrink editor (Esc)" : "Expand editor to fill the screen"}
aria-pressed={expanded}
onClick={() => setExpanded((v) => !v)}
className={`${buttonClass} inline-flex items-center gap-1 bg-zinc-800 border-zinc-600 text-zinc-300 hover:bg-zinc-700`}
>
{expanded ? <Minimize2 size={12} /> : <Maximize2 size={12} />}
{expanded ? "Shrink" : "Expand"}
</button>
</div>
{!validation.valid && (
<div className="px-2 py-1 bg-red-950/60 border-b border-red-900/50 text-xs text-red-300">
{validation.errors.slice(0, 3).join(" ")}
</div>
)}
<div
ref={canvasRef}
className={`npc-dialogue-flow border border-zinc-700 overflow-hidden bg-zinc-950 ${
expanded ? "flex-1 min-h-0 rounded-md" : "h-[60vh] min-h-[28rem] rounded-b-md"
}`}
onDoubleClick={onCanvasDoubleClick}
>
<ReactFlow
nodes={nodes}
edges={syncedEdges}
onNodesChange={handleNodesChange}
onConnect={(c: Connection) => {
if (c.source && c.target) applyConnection(c.source, c.target, c.sourceHandle);
}}
onConnectEnd={(event, connectionState) => {
// React Flow only resolves drops onto a handle. If the pointer
// was released over a node card instead, resolve that card
// ourselves so "drag onto the node" works as people expect.
if (!("fromNode" in connectionState)) return;
if (connectionState.toHandle) return; // dropped on a handle: onConnect leads
const sourceId = connectionState.fromNode?.id;
if (!sourceId) return;
const point = event as MouseEvent;
const element = document.elementFromPoint(point.clientX ?? 0, point.clientY ?? 0);
const nodeElement = element?.closest?.(".react-flow__node") as HTMLElement | null;
const targetId = nodeElement?.getAttribute("data-id");
if (!targetId || targetId === sourceId) return;
// Keep the originating handle when we know it, so per-choice and
// per-branch wiring survives a drop onto the target card.
applyConnection(sourceId, targetId, connectionState.fromHandle?.id);
}}
isValidConnection={isValidConnection}
// Single click selects (React Flow default); double-click edits.
onNodeDoubleClick={(_e, node) => setEditingNodeId(node.id)}
onNodeContextMenu={onNodeContextMenu}
onEdgeClick={onEdgeClick}
onPaneClick={onPaneClick}
onPaneContextMenu={onPaneContextMenu}
nodeTypes={nodeTypes}
edgeTypes={edgeTypes}
snapToGrid={snap}
snapGrid={[SNAP_GRID, SNAP_GRID]}
fitView
zoomOnDoubleClick={false}
colorMode="dark"
proOptions={{ hideAttribution: true }}
>
<Background color="#27272a" gap={20} />
{nodes.length === 0 && (
<div className="absolute inset-0 pointer-events-none flex items-center justify-center text-zinc-600 text-sm">
Double-click anywhere to add a node.
</div>
)}
</ReactFlow>
</div>
<p className="text-[10px] text-zinc-500">
Click a node to select it, double-click to edit. Click an edge to select it, then press Del
(or right-click a node) to delete. Double-click the canvas for a new dialogue node; right-click
it for any type. Drag a row&apos;s dot to wire that exact choice or branch. Use Expand to fill
the screen (Esc to shrink).
</p>
{contextMenu && (
<div
ref={menuRef}
className="fixed z-50 min-w-[7rem] overflow-hidden rounded-md border border-zinc-700 bg-zinc-900 p-1 shadow-lg"
style={{ left: contextMenu.x, top: contextMenu.y }}
>
<button
type="button"
onClick={() => deleteNodes([contextMenu.nodeId])}
className="flex w-full cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-red-400 outline-none select-none hover:bg-red-950/40"
>
Delete node
</button>
</div>
)}
{paneMenu && (
<div
ref={paneMenuRef}
className="fixed z-50 min-w-[8rem] overflow-hidden rounded-md border border-zinc-700 bg-zinc-900 p-1 shadow-lg"
style={{ left: paneMenu.x, top: paneMenu.y }}
>
<p className="px-2 pb-1 pt-0.5 font-mono text-[9px] uppercase tracking-widest text-zinc-500">
New node
</p>
{(Object.keys(NODE_LABELS) as NpcDialogueNodeType[]).map((type) => (
<button
key={type}
type="button"
onClick={() => addNode(type, { x: paneMenu.fx, y: paneMenu.fy })}
className="flex w-full cursor-pointer items-center gap-2 rounded-sm px-2 py-1 text-sm text-zinc-200 outline-none select-none hover:bg-zinc-700/60"
>
<span
className={`size-2 rounded-sm ${
{
dialogue: "bg-blue-500",
choice: "bg-amber-500",
event: "bg-emerald-500",
delay: "bg-violet-500",
condition: "bg-sky-500",
end: "bg-slate-500",
}[type]
}`}
/>
{NODE_LABELS[type]}
</button>
))}
</div>
)}
<NodeEditDialog
node={(nodes as DialogueNode[]).find((n) => n.id === editingNodeId) ?? null}
allNodes={nodes as DialogueNode[]}
open={editingNodeId !== null}
onOpenChange={(open) => {
if (open || !editingNodeId) return;
const id = editingNodeId;
setEditingNodeId(null);
// A brand-new node abandoned in its own dialog is a cancelled
// draft: remove it instead of persisting an empty card.
if (draftIds.current.delete(id)) deleteNodes([id]);
}}
onSave={handleNodeSave}
/>
</div>
);
}
export function NpcDialogueEditor() {
return (
<ReactFlowProvider>
<FlowEditor />
</ReactFlowProvider>
);
}
export default NpcDialogueEditor;