/** * Outline panel — renders a list of heading entries provided by the caller. * * In the Tiptap editor, headings are real ProseMirror nodes, so the page * walks `editor.state.doc` once on every doc update and passes the result * here. Clicking an entry jumps the caret to that node's position. */ /** Matches documents2 outline width + toggle positioning beside the panel */ export const DOCUMENT_OUTLINE_WIDTH_PX = 220 export interface OutlineEntry { level: number title: string /** ProseMirror position to focus when the entry is clicked. */ pos: number } export interface DocumentsOutlinePanelProps { entries: OutlineEntry[] onJumpTo: (pos: number) => void } export function DocumentsOutlinePanel({ entries, onJumpTo }: DocumentsOutlinePanelProps) { return ( ) }