import type { Node as ProseMirrorNode } from '@tiptap/pm/model'; import type { WorkDocumentFieldContextResolver } from './work-document-fields'; export type WorkDocumentTableOfContentsLeader = 'dot' | 'dash' | 'underline' | 'none'; export interface WorkDocumentTableOfContentsOptions { minLevel: number; maxLevel: number; hyperlinks: boolean; showPageNumbers: boolean; rightAlignPageNumbers: boolean; leader: WorkDocumentTableOfContentsLeader; } export interface WorkDocumentTableOfContentsEntry { targetId: string; title: string; level: number; pageNumber: number; } export interface WorkDocumentTableOfContentsValue { id: string; options: WorkDocumentTableOfContentsOptions; entries: WorkDocumentTableOfContentsEntry[]; truncated: boolean; } export interface WorkDocumentTableOfContentsBuildOptions { resolveContext?: WorkDocumentFieldContextResolver; } export type WorkDocumentTableOfContentsInstructionResult = { supported: true; options: WorkDocumentTableOfContentsOptions; } | { supported: false; reason: 'not-table-of-contents' | 'invalid-instruction' | 'invalid-level-range' | 'unsupported-switch' | 'unsupported-page-range' | 'unsupported-separator'; }; export declare const DEFAULT_DOCUMENT_TABLE_OF_CONTENTS_OPTIONS: WorkDocumentTableOfContentsOptions; export declare const MAX_DOCUMENT_TABLE_OF_CONTENTS_ENTRIES = 512; export declare function normalizeDocumentTableOfContentsOptions(source: Partial | null | undefined): WorkDocumentTableOfContentsOptions; export declare function buildDocumentTableOfContentsEntries(document: ProseMirrorNode, options: WorkDocumentTableOfContentsOptions, buildOptions?: WorkDocumentTableOfContentsBuildOptions): { entries: WorkDocumentTableOfContentsEntry[]; truncated: boolean; }; export declare function documentTableOfContentsHtml(source: Omit & { truncated?: boolean; }): string; export declare function normalizeDocumentTableOfContentsHtml(source: string): string; export declare function documentTableOfContentsValueFromElement(element: HTMLElement, index?: number): WorkDocumentTableOfContentsValue; export declare function parseDocumentTableOfContentsInstruction(instruction: string): WorkDocumentTableOfContentsInstructionResult; export declare function documentTableOfContentsInstruction(source: WorkDocumentTableOfContentsOptions): string; export declare function tableOfContentsLeader(value: unknown): WorkDocumentTableOfContentsLeader | null; export declare function normalizeDocumentTableOfContentsValue(source: Omit & { truncated?: boolean; }): WorkDocumentTableOfContentsValue;