/** * Reader/writer for Office 365 "threaded comments" (`` * XML root) and the workbook-level person directory (``). * * Threaded comments live in a separate part tree from classic VML * comments: * * - `xl/threadedComments/threadedComment{N}.xml` — one per sheet * that has threaded comments; referenced from the sheet rels * - `xl/persons/person.xml` — workbook-level person directory; * referenced from the workbook rels * * The schema lives in Microsoft's extension namespace * `http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments` * (for comments) and the older `…/2018/threadedcomments` for persons * (identical URI tag-shared). * * This module is intentionally free of runtime xform plumbing — * threaded comments are a discrete part with only text content, so * two small render/parse functions suffice and plug directly into * `xlsx.browser.ts` and `workbook.browser.ts`. */ import type { ThreadedComment, ThreadedCommentPerson } from "../../../types.js"; /** * Render the threaded-comment part for a single worksheet. * * Input is a list of `(cellRef, comment)` pairs — the cell ref is * stored as the `ref` attribute on each ``, not on * the public {@link ThreadedComment} type (which doesn't carry it so * the same structure can be shared between the public API and the * XForm). * * Input order is preserved — Excel relies on parent-child ordering * when rendering conversation threads, so callers must keep replies * after their parents. */ export declare function renderThreadedComments(entries: Array<{ ref: string; comment: ThreadedComment; }>): string; /** * Parse a `xl/threadedComments/threadedComment{N}.xml` payload into * structured per-cell entries. Returns an empty array on malformed * input — the caller can silently drop threaded comments rather than * failing the entire workbook load. */ export declare function parseThreadedComments(rawXml: string): Array<{ ref: string; comment: ThreadedComment; }>; /** * Render the workbook-level `xl/persons/person.xml` part. */ export declare function renderPersonList(persons: ThreadedCommentPerson[]): string; /** * Parse `xl/persons/person.xml` into a {@link ThreadedCommentPerson} * list. Missing ids are auto-generated so downstream parts that * reference the list don't accidentally collide. */ export declare function parsePersonList(rawXml: string): ThreadedCommentPerson[];