import { ContentTypesXml } from '../../mod.js'; import { Archive } from '../classes/Archive.js'; import { XmlFileWithContentTypes } from '../classes/XmlFile.js'; import { type SectionChild, Section } from '../components/Section.js'; import { FileMime } from '../enums.js'; import { CommentsXml } from './CommentsXml.js'; import { type HeaderFooterRoot, FooterXml, HeaderXml } from './HeaderFooterXml.js'; import { NumberingXml } from './NumberingXml.js'; import { File, RelationshipsXml } from './RelationshipsXml.js'; import { SettingsXml } from './SettingsXml.js'; import { StylesXml } from './StylesXml.js'; export declare type DocumentChild = SectionChild | Section; export declare type DocumentRoot = DocumentChild | DocumentChild[] | Promise; export declare class DocumentXml extends XmlFileWithContentTypes { #private; static contentType: FileMime; readonly relationships: RelationshipsXml; constructor(location: string, relationships?: RelationshipsXml); /** * The API representing "styles.xml" and all the text/paragraph/table styles associated with this document. */ get styles(): StylesXml; /** * The API representing "settings.xml" and all the settings associated with this document. */ get settings(): SettingsXml; /** * The API representing "comments.xml" and all the comments associated with this document. */ get comments(): CommentsXml; /** * The API representing "numbering.xml" and all the numbering styles/schemes */ get numbering(): NumberingXml; /** * The components normalized from #root, which is potentially arrayed, promised, array promised etc. */ get children(): Promise; protected toNode(): Promise; /** * Set the contents of the document */ set(root: DocumentRoot): void; /** * Get all XmlFile instances related to this one, including self. This helps the system * serialize itself back to DOCX fullly. Probably not useful for consumers of the library. */ getRelated(): File[]; readonly headers: { /** * Creates a new header instance and returns the relationship identifier. */ add: (location: string, root: HeaderFooterRoot) => string; map: (cb: (header: HeaderXml) => Out) => Out[]; }; readonly footers: { /** * Creates a new footer instance and returns the relationship identifier. */ add: (location: string, root: HeaderFooterRoot) => string; map: (cb: (footer: FooterXml) => Out) => Out[]; }; /** * Instantiate this class by looking at the DOCX XML for it. */ static fromArchive(archive: Archive, contentTypes: ContentTypesXml, location: string): Promise; }