UNPKG

docx

Version:

Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.

1,517 lines (1,294 loc) 104 kB
/// <reference types="node" /> import { default as default_2 } from 'jszip'; import { Element as Element_2 } from 'xml-js'; import { Stream } from 'stream'; export declare class AbstractNumbering extends XmlComponent { readonly id: number; constructor(id: number, levelOptions: readonly ILevelsOptions[]); } export declare const abstractNumUniqueNumericIdGen: () => UniqueNumericIdCreator; export declare class Alignment extends XmlComponent { constructor(type: (typeof AlignmentType)[keyof typeof AlignmentType]); } export declare class AlignmentAttributes extends XmlAttributeComponent<{ readonly val: (typeof AlignmentType)[keyof typeof AlignmentType]; }> { protected readonly xmlKeys: { val: string; }; } export declare const AlignmentType: { readonly START: "start"; readonly CENTER: "center"; readonly END: "end"; readonly BOTH: "both"; readonly MEDIUM_KASHIDA: "mediumKashida"; readonly DISTRIBUTE: "distribute"; readonly NUM_TAB: "numTab"; readonly HIGH_KASHIDA: "highKashida"; readonly LOW_KASHIDA: "lowKashida"; readonly THAI_DISTRIBUTE: "thaiDistribute"; readonly LEFT: "left"; readonly RIGHT: "right"; readonly JUSTIFIED: "both"; }; export declare class AnnotationReference extends EmptyElement { constructor(); } declare class AppProperties extends XmlComponent { constructor(); } export declare type AttributeData = Record<string, boolean | number | string>; export declare type AttributeMap<T> = Record<keyof T, string>; export declare type AttributePayload<T> = { readonly [P in keyof T]: { readonly key: string; readonly value: T[P]; }; }; export declare class Attributes extends XmlAttributeComponent<{ readonly val?: string | number | boolean; readonly color?: string; readonly fill?: string; readonly space?: string; readonly sz?: string; readonly type?: string; readonly rsidR?: string; readonly rsidRPr?: string; readonly rsidSect?: string; readonly w?: string; readonly h?: string; readonly top?: string; readonly right?: string; readonly bottom?: string; readonly left?: string; readonly header?: string; readonly footer?: string; readonly gutter?: string; readonly linePitch?: string; readonly pos?: string | number; }> { protected readonly xmlKeys: { val: string; color: string; fill: string; space: string; sz: string; type: string; rsidR: string; rsidRPr: string; rsidSect: string; w: string; h: string; top: string; right: string; bottom: string; left: string; header: string; footer: string; gutter: string; linePitch: string; pos: string; }; } export declare abstract class BaseEmphasisMark extends XmlComponent { protected constructor(emphasisMarkType: (typeof EmphasisMarkType)[keyof typeof EmphasisMarkType]); } export declare abstract class BaseXmlComponent { protected readonly rootKey: string; constructor(rootKey: string); abstract prepForXml(context: IContext): IXmlableObject | undefined; } declare class Begin extends XmlComponent { constructor(dirty?: boolean); } declare class Body_2 extends XmlComponent { private readonly sections; constructor(); addSection(options: ISectionPropertiesOptions): void; prepForXml(context: IContext): IXmlableObject | undefined; push(component: XmlComponent): void; private createSectionParagraph; } export { Body_2 as Body } export declare class Bookmark { private readonly bookmarkUniqueNumericId; readonly start: BookmarkStart; readonly children: readonly ParagraphChild[]; readonly end: BookmarkEnd; constructor(options: { readonly id: string; readonly children: readonly ParagraphChild[]; }); } export declare class BookmarkEnd extends XmlComponent { constructor(linkId: number); } export declare class BookmarkStart extends XmlComponent { constructor(id: string, linkId: number); } export declare const bookmarkUniqueNumericIdGen: () => UniqueNumericIdCreator; export declare class Border extends IgnoreIfEmptyXmlComponent { constructor(options: IBordersOptions); } export declare class BorderElement extends XmlComponent { constructor(elementName: string, { color, size, space, style }: IBorderOptions); } export declare const BorderStyle: { readonly SINGLE: "single"; readonly DASH_DOT_STROKED: "dashDotStroked"; readonly DASHED: "dashed"; readonly DASH_SMALL_GAP: "dashSmallGap"; readonly DOT_DASH: "dotDash"; readonly DOT_DOT_DASH: "dotDotDash"; readonly DOTTED: "dotted"; readonly DOUBLE: "double"; readonly DOUBLE_WAVE: "doubleWave"; readonly INSET: "inset"; readonly NIL: "nil"; readonly NONE: "none"; readonly OUTSET: "outset"; readonly THICK: "thick"; readonly THICK_THIN_LARGE_GAP: "thickThinLargeGap"; readonly THICK_THIN_MEDIUM_GAP: "thickThinMediumGap"; readonly THICK_THIN_SMALL_GAP: "thickThinSmallGap"; readonly THIN_THICK_LARGE_GAP: "thinThickLargeGap"; readonly THIN_THICK_MEDIUM_GAP: "thinThickMediumGap"; readonly THIN_THICK_SMALL_GAP: "thinThickSmallGap"; readonly THIN_THICK_THIN_LARGE_GAP: "thinThickThinLargeGap"; readonly THIN_THICK_THIN_MEDIUM_GAP: "thinThickThinMediumGap"; readonly THIN_THICK_THIN_SMALL_GAP: "thinThickThinSmallGap"; readonly THREE_D_EMBOSS: "threeDEmboss"; readonly THREE_D_ENGRAVE: "threeDEngrave"; readonly TRIPLE: "triple"; readonly WAVE: "wave"; }; declare class Break extends XmlComponent { constructor(); } export declare class BuilderElement<T extends AttributeData = {}> extends XmlComponent { constructor({ name, attributes, children, }: { readonly name: string; readonly attributes?: AttributePayload<T>; readonly children?: readonly XmlComponent[]; }); } export declare class CarriageReturn extends EmptyElement { constructor(); } declare const CellSpacingType: { readonly DXA: "dxa"; readonly NIL: "nil"; }; export declare const CharacterSet: { readonly ANSI: "00"; readonly DEFAULT: "01"; readonly SYMBOL: "02"; readonly MAC: "4D"; readonly JIS: "80"; readonly HANGUL: "81"; readonly JOHAB: "82"; readonly GB_2312: "86"; readonly CHINESEBIG5: "88"; readonly GREEK: "A1"; readonly TURKISH: "A2"; readonly VIETNAMESE: "A3"; readonly HEBREW: "B1"; readonly ARABIC: "B2"; readonly BALTIC: "BA"; readonly RUSSIAN: "CC"; readonly THAI: "DE"; readonly EASTEUROPE: "EE"; readonly OEM: "FF"; }; export declare class CheckBox extends XmlComponent { private readonly DEFAULT_UNCHECKED_SYMBOL; private readonly DEFAULT_CHECKED_SYMBOL; private readonly DEFAULT_FONT; constructor(options?: ICheckboxSymbolOptions); } export declare class CheckBoxSymbolElement extends XmlComponent { constructor(name: string, val: string, font?: string); } export declare class CheckBoxUtil extends XmlComponent { private readonly DEFAULT_UNCHECKED_SYMBOL; private readonly DEFAULT_CHECKED_SYMBOL; private readonly DEFAULT_FONT; constructor(options?: ICheckboxSymbolOptions); } export declare class Column extends XmlComponent { constructor({ width, space }: IColumnAttributes); } export declare class ColumnBreak extends Run { constructor(); } export declare class Columns extends XmlComponent { constructor({ space, count, separate, equalWidth, children }: IColumnsAttributes); } declare class Comment_2 extends XmlComponent { constructor({ id, initials, author, date, children }: ICommentOptions); } export { Comment_2 as Comment } export declare class CommentRangeEnd extends XmlComponent { constructor(id: number); } export declare class CommentRangeStart extends XmlComponent { constructor(id: number); } export declare class CommentReference extends XmlComponent { constructor(id: number); } export declare class Comments extends XmlComponent { private readonly relationships; constructor({ children }: ICommentsOptions); get Relationships(): Relationships; } declare const CompoundLine: { readonly SINGLE: "sng"; readonly DOUBLE: "dbl"; readonly THICK_THIN: "thickThin"; readonly THIN_THICK: "thinThick"; readonly TRI: "tri"; }; export declare class ConcreteHyperlink extends XmlComponent { readonly linkId: string; constructor(children: readonly ParagraphChild[], relationshipId: string, anchor?: string); } export declare class ConcreteNumbering extends XmlComponent { readonly numId: number; readonly reference: string; readonly instance: number; constructor(options: IConcreteNumberingOptions); } export declare const concreteNumUniqueNumericIdGen: () => UniqueNumericIdCreator; declare class ContentTypes extends XmlComponent { constructor(); addFooter(index: number): void; addHeader(index: number): void; } export declare class ContinuationSeparator extends EmptyElement { constructor(); } export declare const convertInchesToTwip: (inches: number) => number; export declare const convertMillimetersToTwip: (millimeters: number) => number; export declare const convertToXmlComponent: (element: Element_2) => ImportedXmlComponent | string | undefined; declare type CoreImageOptions = { readonly transformation: IMediaTransformation; readonly floating?: IFloating; readonly altText?: DocPropertiesOptions; readonly outline?: OutlineOptions; }; declare type CoreMediaData = { readonly fileName: string; readonly transformation: IMediaDataTransformation; readonly data: Buffer | Uint8Array | ArrayBuffer; }; declare class CoreProperties extends XmlComponent { constructor(options: Omit<IPropertiesOptions, "sections">); } export declare const createDocumentGrid: ({ type, linePitch, charSpace }: IDocGridAttributesProperties) => XmlComponent; export declare const createFrameProperties: (options: IFrameOptions) => XmlComponent; export declare const createHorizontalPosition: ({ relative, align, offset }: IHorizontalPositionOptions) => XmlComponent; export declare const createLineNumberType: ({ countBy, start, restart, distance }: ILineNumberAttributes) => XmlComponent; export declare const createMathAccentCharacter: ({ accent }: MathAccentCharacterOptions) => XmlComponent; export declare const createMathBase: ({ children }: MathBaseOptions) => XmlComponent; export declare const createMathLimitLocation: ({ value }: MathLimitLocationOptions) => XmlComponent; export declare const createMathNAryProperties: ({ accent, hasSuperScript, hasSubScript, limitLocationVal, }: MathNAryPropertiesOptions) => XmlComponent; export declare const createMathPreSubSuperScriptProperties: () => XmlComponent; export declare const createMathSubScriptElement: ({ children }: MathSubScriptElementOptions) => XmlComponent; export declare const createMathSubScriptProperties: () => XmlComponent; export declare const createMathSubSuperScriptProperties: () => XmlComponent; export declare const createMathSuperScriptElement: ({ children }: MathSuperScriptElementOptions) => XmlComponent; export declare const createMathSuperScriptProperties: () => XmlComponent; export declare const createPageSize: ({ width, height, orientation, code }: IPageSizeAttributes) => XmlComponent; export declare const createSimplePos: () => XmlComponent; export declare const createStringElement: (name: string, value: string) => XmlComponent; export declare const createVerticalPosition: ({ relative, align, offset }: IVerticalPositionOptions) => XmlComponent; declare class CustomProperties extends XmlComponent { private nextId; private readonly properties; constructor(properties: readonly ICustomPropertyOptions[]); prepForXml(context: IContext): IXmlableObject | undefined; addCustomProperty(property: ICustomPropertyOptions): void; } export declare const dateTimeValue: (val: Date) => string; export declare class DayLong extends EmptyElement { constructor(); } export declare class DayShort extends EmptyElement { constructor(); } export declare const decimalNumber: (val: number) => number; export declare class DeletedTextRun extends XmlComponent { protected readonly deletedTextRunWrapper: DeletedTextRunWrapper; constructor(options: IDeletedRunOptions); } declare class DeletedTextRunWrapper extends XmlComponent { constructor(options: IRunOptions); } declare type DocPropertiesOptions = { readonly name: string; readonly description?: string; readonly title?: string; }; export declare const docPropertiesUniqueNumericIdGen: () => UniqueNumericIdCreator; declare class Document_2 extends XmlComponent { private readonly body; constructor(options: IDocumentOptions); add(item: Paragraph | Table | TableOfContents | ConcreteHyperlink): Document_2; get Body(): Body_2; } export declare type DocumentAttributeNamespace = keyof typeof DocumentAttributeNamespaces; export declare const DocumentAttributeNamespaces: { wpc: string; mc: string; o: string; r: string; m: string; v: string; wp14: string; wp: string; w10: string; w: string; w14: string; w15: string; wpg: string; wpi: string; wne: string; wps: string; cp: string; dc: string; dcterms: string; dcmitype: string; xsi: string; cx: string; cx1: string; cx2: string; cx3: string; cx4: string; cx5: string; cx6: string; cx7: string; cx8: string; aink: string; am3d: string; w16cex: string; w16cid: string; w16: string; w16sdtdh: string; w16se: string; }; export declare class DocumentAttributes extends XmlAttributeComponent<IDocumentAttributesProperties> { protected readonly xmlKeys: AttributeMap<IDocumentAttributesProperties>; constructor(ns: readonly DocumentAttributeNamespace[], Ignorable?: string); } export declare class DocumentBackground extends XmlComponent { constructor(options: IDocumentBackgroundOptions); } export declare class DocumentBackgroundAttributes extends XmlAttributeComponent<{ readonly color?: string; readonly themeColor?: string; readonly themeShade?: string; readonly themeTint?: string; }> { protected readonly xmlKeys: { color: string; themeColor: string; themeShade: string; themeTint: string; }; } export declare class DocumentDefaults extends XmlComponent { private readonly runPropertiesDefaults; private readonly paragraphPropertiesDefaults; constructor(options: IDocumentDefaultsOptions); } export declare const DocumentGridType: { readonly DEFAULT: "default"; readonly LINES: "lines"; readonly LINES_AND_CHARS: "linesAndChars"; readonly SNAP_TO_CHARS: "snapToChars"; }; declare class DocumentWrapper implements IViewWrapper { private readonly document; private readonly relationships; constructor(options: IDocumentOptions); get View(): Document_2; get Relationships(): Relationships; } export declare class DotEmphasisMark extends BaseEmphasisMark { constructor(); } export declare class Drawing extends XmlComponent { constructor(imageData: IMediaData, drawingOptions?: IDrawingOptions); } export declare const DropCapType: { readonly NONE: "none"; readonly DROP: "drop"; readonly MARGIN: "margin"; }; export declare const eighthPointMeasureValue: (val: number) => number; export declare class EmphasisMark extends BaseEmphasisMark { constructor(emphasisMarkType?: (typeof EmphasisMarkType)[keyof typeof EmphasisMarkType]); } export declare const EmphasisMarkType: { readonly DOT: "dot"; }; export declare const EMPTY_OBJECT: {}; export declare class EmptyElement extends XmlComponent { } declare class End extends XmlComponent { constructor(dirty?: boolean); } export declare class EndnoteReference extends EmptyElement { constructor(); } export declare class ExternalHyperlink extends XmlComponent { readonly options: { readonly children: readonly ParagraphChild[]; readonly link: string; }; constructor(options: { readonly children: readonly ParagraphChild[]; readonly link: string; }); } declare class FieldInstruction extends XmlComponent { private readonly properties; constructor(properties?: ITableOfContentsOptions); } declare class File_2 { private currentRelationshipId; private readonly documentWrapper; private readonly headers; private readonly footers; private readonly coreProperties; private readonly numbering; private readonly media; private readonly fileRelationships; private readonly footnotesWrapper; private readonly settings; private readonly contentTypes; private readonly customProperties; private readonly appProperties; private readonly styles; private readonly comments; private readonly fontWrapper; constructor(options: IPropertiesOptions); private addSection; private createHeader; private createFooter; private addHeaderToDocument; private addFooterToDocument; private addDefaultRelationships; get Document(): DocumentWrapper; get Styles(): Styles; get CoreProperties(): CoreProperties; get Numbering(): Numbering; get Media(): Media; get FileRelationships(): Relationships; get Headers(): readonly HeaderWrapper[]; get Footers(): readonly FooterWrapper[]; get ContentTypes(): ContentTypes; get CustomProperties(): CustomProperties; get AppProperties(): AppProperties; get FootNotes(): FootnotesWrapper; get Settings(): Settings; get Comments(): Comments; get FontTable(): FontWrapper; } export { File_2 as Document } export { File_2 as File } export declare class FileChild extends XmlComponent { readonly fileChild: symbol; } declare type FilePatch = { readonly type: typeof PatchType.DOCUMENT; readonly children: readonly FileChild[]; }; declare type FontOptions = { readonly name: string; readonly data: Buffer; readonly characterSet?: (typeof CharacterSet)[keyof typeof CharacterSet]; }; declare type FontOptionsWithKey = FontOptions & { readonly fontKey: string; }; declare class FontWrapper implements IViewWrapper { readonly options: readonly FontOptions[]; private readonly fontTable; private readonly relationships; readonly fontOptionsWithKey: readonly FontOptionsWithKey[]; constructor(options: readonly FontOptions[]); get View(): XmlComponent; get Relationships(): Relationships; } export declare class Footer { readonly options: IHeaderOptions; constructor(options?: IHeaderOptions); } declare class Footer_2 extends InitializableXmlComponent { private readonly refId; constructor(referenceNumber: number, initContent?: XmlComponent); get ReferenceId(): number; add(item: Paragraph | Table): void; } export declare class FooterWrapper implements IViewWrapper { private readonly media; private readonly footer; private readonly relationships; constructor(media: Media, referenceId: number, initContent?: XmlComponent); add(item: Paragraph | Table): void; addChildElement(childElement: XmlComponent): void; get View(): Footer_2; get Relationships(): Relationships; get Media(): Media; } export declare class FootnoteReference extends XmlComponent { constructor(id: number); } export declare class FootnoteReferenceElement extends EmptyElement { constructor(); } export declare class FootnoteReferenceRun extends Run { constructor(id: number); } export declare class FootNoteReferenceRunAttributes extends XmlAttributeComponent<{ readonly id: number; }> { protected readonly xmlKeys: { id: string; }; } export declare class FootNotes extends XmlComponent { constructor(); createFootNote(id: number, paragraph: readonly Paragraph[]): void; } declare class FootnotesWrapper implements IViewWrapper { private readonly footnotess; private readonly relationships; constructor(); get View(): FootNotes; get Relationships(): Relationships; } export declare const FrameAnchorType: { readonly MARGIN: "margin"; readonly PAGE: "page"; readonly TEXT: "text"; }; export declare const FrameWrap: { readonly AROUND: "around"; readonly AUTO: "auto"; readonly NONE: "none"; readonly NOT_BESIDE: "notBeside"; readonly THROUGH: "through"; readonly TIGHT: "tight"; }; export declare class GridSpan extends XmlComponent { constructor(value: number); } export declare const hashedId: (data: Buffer | string | Uint8Array | ArrayBuffer) => string; export declare class Header { readonly options: IHeaderOptions; constructor(options?: IHeaderOptions); } declare class Header_2 extends InitializableXmlComponent { private readonly refId; constructor(referenceNumber: number, initContent?: XmlComponent); get ReferenceId(): number; add(item: Paragraph | Table): void; } export declare class HeaderFooterReference extends XmlComponent { constructor(type: (typeof HeaderFooterType)[keyof typeof HeaderFooterType], options: IHeaderFooterOptions); } export declare const HeaderFooterReferenceType: { readonly DEFAULT: "default"; readonly FIRST: "first"; readonly EVEN: "even"; }; export declare const HeaderFooterType: { readonly HEADER: "w:headerReference"; readonly FOOTER: "w:footerReference"; }; export declare class HeaderWrapper implements IViewWrapper { private readonly media; private readonly header; private readonly relationships; constructor(media: Media, referenceId: number, initContent?: XmlComponent); add(item: Paragraph | Table): HeaderWrapper; addChildElement(childElement: XmlComponent | string): void; get View(): Header_2; get Relationships(): Relationships; get Media(): Media; } export declare const HeadingLevel: { readonly HEADING_1: "Heading1"; readonly HEADING_2: "Heading2"; readonly HEADING_3: "Heading3"; readonly HEADING_4: "Heading4"; readonly HEADING_5: "Heading5"; readonly HEADING_6: "Heading6"; readonly TITLE: "Title"; }; export declare const HeightRule: { readonly AUTO: "auto"; readonly ATLEAST: "atLeast"; readonly EXACT: "exact"; }; export declare const hexColorValue: (val: string) => string; export declare const HighlightColor: { readonly BLACK: "black"; readonly BLUE: "blue"; readonly CYAN: "cyan"; readonly DARK_BLUE: "darkBlue"; readonly DARK_CYAN: "darkCyan"; readonly DARK_GRAY: "darkGray"; readonly DARK_GREEN: "darkGreen"; readonly DARK_MAGENTA: "darkMagenta"; readonly DARK_RED: "darkRed"; readonly DARK_YELLOW: "darkYellow"; readonly GREEN: "green"; readonly LIGHT_GRAY: "lightGray"; readonly MAGENTA: "magenta"; readonly NONE: "none"; readonly RED: "red"; readonly WHITE: "white"; readonly YELLOW: "yellow"; }; export declare const HorizontalPositionAlign: { readonly CENTER: "center"; readonly INSIDE: "inside"; readonly LEFT: "left"; readonly OUTSIDE: "outside"; readonly RIGHT: "right"; }; export declare const HorizontalPositionRelativeFrom: { readonly CHARACTER: "character"; readonly COLUMN: "column"; readonly INSIDE_MARGIN: "insideMargin"; readonly LEFT_MARGIN: "leftMargin"; readonly MARGIN: "margin"; readonly OUTSIDE_MARGIN: "outsideMargin"; readonly PAGE: "page"; readonly RIGHT_MARGIN: "rightMargin"; }; export declare class HpsMeasureElement extends XmlComponent { constructor(name: string, val: number | PositiveUniversalMeasure); } export declare const hpsMeasureValue: (val: PositiveUniversalMeasure | number) => string | number; export declare const HyperlinkType: { readonly INTERNAL: "INTERNAL"; readonly EXTERNAL: "EXTERNAL"; }; export declare type IAlignmentFrameOptions = { readonly type: "alignment"; readonly alignment: { readonly x: (typeof HorizontalPositionAlign)[keyof typeof HorizontalPositionAlign]; readonly y: (typeof VerticalPositionAlign)[keyof typeof VerticalPositionAlign]; }; } & IBaseFrameOptions; export declare type IBaseCharacterStyleOptions = { readonly run?: IRunStylePropertiesOptions; } & IStyleOptions; declare type IBaseFrameOptions = { readonly anchorLock?: boolean; readonly dropCap?: (typeof DropCapType)[keyof typeof DropCapType]; readonly width: number; readonly height: number; readonly wrap?: (typeof FrameWrap)[keyof typeof FrameWrap]; readonly lines?: number; readonly anchor: { readonly horizontal: (typeof FrameAnchorType)[keyof typeof FrameAnchorType]; readonly vertical: (typeof FrameAnchorType)[keyof typeof FrameAnchorType]; }; readonly space?: { readonly horizontal: number; readonly vertical: number; }; readonly rule?: (typeof HeightRule)[keyof typeof HeightRule]; }; export declare type IBaseParagraphStyleOptions = { readonly paragraph?: IParagraphStylePropertiesOptions; readonly run?: IRunStylePropertiesOptions; } & IStyleOptions; export declare type IBorderOptions = { readonly style: (typeof BorderStyle)[keyof typeof BorderStyle]; readonly color?: string; readonly size?: number; readonly space?: number; }; export declare type IBordersOptions = { readonly top?: IBorderOptions; readonly bottom?: IBorderOptions; readonly left?: IBorderOptions; readonly right?: IBorderOptions; }; declare type IChangedAttributesProperties = { readonly id: number; readonly author: string; readonly date: string; }; export declare type ICharacterStyleOptions = { readonly id: string; } & IBaseCharacterStyleOptions; export declare type ICheckboxSymbolOptions = { readonly alias?: string; readonly checked?: boolean; readonly checkedState?: ICheckboxSymbolProperties; readonly uncheckedState?: ICheckboxSymbolProperties; }; export declare type ICheckboxSymbolProperties = { readonly value?: string; readonly font?: string; }; declare type IColumnAttributes = { readonly width: number | PositiveUniversalMeasure; readonly space?: number | PositiveUniversalMeasure; }; export declare type IColumnsAttributes = { readonly space?: number | PositiveUniversalMeasure; readonly count?: number; readonly separate?: boolean; readonly equalWidth?: boolean; readonly children?: readonly Column[]; }; export declare type ICommentOptions = { readonly id: number; readonly children: readonly FileChild[]; readonly initials?: string; readonly author?: string; readonly date?: Date; }; export declare type ICommentsOptions = { readonly children: readonly ICommentOptions[]; }; declare type ICompatibilityOptions = { readonly version?: number; readonly useSingleBorderforContiguousCells?: boolean; readonly wordPerfectJustification?: boolean; readonly noTabStopForHangingIndent?: boolean; readonly noLeading?: boolean; readonly spaceForUnderline?: boolean; readonly noColumnBalance?: boolean; readonly balanceSingleByteDoubleByteWidth?: boolean; readonly noExtraLineSpacing?: boolean; readonly doNotLeaveBackslashAlone?: boolean; readonly underlineTrailingSpaces?: boolean; readonly doNotExpandShiftReturn?: boolean; readonly spacingInWholePoints?: boolean; readonly lineWrapLikeWord6?: boolean; readonly printBodyTextBeforeHeader?: boolean; readonly printColorsBlack?: boolean; readonly spaceWidth?: boolean; readonly showBreaksInFrames?: boolean; readonly subFontBySize?: boolean; readonly suppressBottomSpacing?: boolean; readonly suppressTopSpacing?: boolean; readonly suppressSpacingAtTopOfPage?: boolean; readonly suppressTopSpacingWP?: boolean; readonly suppressSpBfAfterPgBrk?: boolean; readonly swapBordersFacingPages?: boolean; readonly convertMailMergeEsc?: boolean; readonly truncateFontHeightsLikeWP6?: boolean; readonly macWordSmallCaps?: boolean; readonly usePrinterMetrics?: boolean; readonly doNotSuppressParagraphBorders?: boolean; readonly wrapTrailSpaces?: boolean; readonly footnoteLayoutLikeWW8?: boolean; readonly shapeLayoutLikeWW8?: boolean; readonly alignTablesRowByRow?: boolean; readonly forgetLastTabAlignment?: boolean; readonly adjustLineHeightInTable?: boolean; readonly autoSpaceLikeWord95?: boolean; readonly noSpaceRaiseLower?: boolean; readonly doNotUseHTMLParagraphAutoSpacing?: boolean; readonly layoutRawTableWidth?: boolean; readonly layoutTableRowsApart?: boolean; readonly useWord97LineBreakRules?: boolean; readonly doNotBreakWrappedTables?: boolean; readonly doNotSnapToGridInCell?: boolean; readonly selectFieldWithFirstOrLastCharacter?: boolean; readonly applyBreakingRules?: boolean; readonly doNotWrapTextWithPunctuation?: boolean; readonly doNotUseEastAsianBreakRules?: boolean; readonly useWord2002TableStyleRules?: boolean; readonly growAutofit?: boolean; readonly useFELayout?: boolean; readonly useNormalStyleForList?: boolean; readonly doNotUseIndentAsNumberingTabStop?: boolean; readonly useAlternateEastAsianLineBreakRules?: boolean; readonly allowSpaceOfSameStyleInTable?: boolean; readonly doNotSuppressIndentation?: boolean; readonly doNotAutofitConstrainedTables?: boolean; readonly autofitToFirstFixedWidthCell?: boolean; readonly underlineTabInNumberingList?: boolean; readonly displayHangulFixedWidth?: boolean; readonly splitPgBreakAndParaMark?: boolean; readonly doNotVerticallyAlignCellWithSp?: boolean; readonly doNotBreakConstrainedForcedTable?: boolean; readonly ignoreVerticalAlignmentInTextboxes?: boolean; readonly useAnsiKerningPairs?: boolean; readonly cachedColumnBalance?: boolean; }; export declare type IConcreteNumberingOptions = { readonly numId: number; readonly abstractNumId: number; readonly reference: string; readonly instance: number; readonly overrideLevels?: readonly IOverrideLevel[]; }; export declare type IContext = { readonly file: File_2; readonly viewWrapper: IViewWrapper; readonly stack: IXmlableObject[]; }; declare type ICustomPropertyOptions = { readonly name: string; readonly value: string; }; declare type IDefaultStylesOptions = { readonly document?: IDocumentDefaultsOptions; readonly title?: IBaseParagraphStyleOptions; readonly heading1?: IBaseParagraphStyleOptions; readonly heading2?: IBaseParagraphStyleOptions; readonly heading3?: IBaseParagraphStyleOptions; readonly heading4?: IBaseParagraphStyleOptions; readonly heading5?: IBaseParagraphStyleOptions; readonly heading6?: IBaseParagraphStyleOptions; readonly strong?: IBaseParagraphStyleOptions; readonly listParagraph?: IBaseParagraphStyleOptions; readonly hyperlink?: IBaseCharacterStyleOptions; readonly footnoteReference?: IBaseCharacterStyleOptions; readonly footnoteText?: IBaseParagraphStyleOptions; readonly footnoteTextChar?: IBaseCharacterStyleOptions; }; declare type IDeletedRunOptions = IRunOptions & IChangedAttributesProperties; export declare type IDistance = { readonly distT?: number; readonly distB?: number; readonly distL?: number; readonly distR?: number; }; export declare type IDocGridAttributesProperties = { readonly type?: (typeof DocumentGridType)[keyof typeof DocumentGridType]; readonly linePitch: number; readonly charSpace?: number; }; export declare type IDocumentAttributesProperties = Partial<Record<DocumentAttributeNamespace, string>> & { readonly Ignorable?: string; }; export declare type IDocumentBackgroundOptions = { readonly color?: string; readonly themeColor?: string; readonly themeShade?: string; readonly themeTint?: string; }; export declare type IDocumentDefaultsOptions = { readonly paragraph?: IParagraphStylePropertiesOptions; readonly run?: IRunStylePropertiesOptions; }; export declare type IDocumentFooter = { readonly footer: FooterWrapper; readonly type: (typeof HeaderFooterReferenceType)[keyof typeof HeaderFooterReferenceType]; }; export declare type IDocumentHeader = { readonly header: HeaderWrapper; readonly type: (typeof HeaderFooterReferenceType)[keyof typeof HeaderFooterReferenceType]; }; export declare type IDocumentOptions = { readonly background?: IDocumentBackgroundOptions; }; export declare type IDrawingOptions = { readonly floating?: IFloating; readonly docProperties?: DocPropertiesOptions; readonly outline?: OutlineOptions; }; export declare type IFloating = { readonly horizontalPosition: IHorizontalPositionOptions; readonly verticalPosition: IVerticalPositionOptions; readonly allowOverlap?: boolean; readonly lockAnchor?: boolean; readonly behindDocument?: boolean; readonly layoutInCell?: boolean; readonly margins?: IMargins; readonly wrap?: ITextWrapping; readonly zIndex?: number; }; export declare type IFontAttributesProperties = { readonly ascii?: string; readonly cs?: string; readonly eastAsia?: string; readonly hAnsi?: string; readonly hint?: string; }; declare type IFontOptions = { readonly name: string; readonly hint?: string; }; export declare type IFrameOptions = IXYFrameOptions | IAlignmentFrameOptions; export declare abstract class IgnoreIfEmptyXmlComponent extends XmlComponent { prepForXml(context: IContext): IXmlableObject | undefined; } export declare type IHeaderFooterGroup<T> = { readonly default?: T; readonly first?: T; readonly even?: T; }; export declare type IHeaderFooterOptions = { readonly type?: (typeof HeaderFooterReferenceType)[keyof typeof HeaderFooterReferenceType]; readonly id?: number; }; export declare type IHeaderOptions = { readonly children: readonly (Paragraph | Table)[]; }; export declare type IHorizontalPositionOptions = { readonly relative?: (typeof HorizontalPositionRelativeFrom)[keyof typeof HorizontalPositionRelativeFrom]; readonly align?: (typeof HorizontalPositionAlign)[keyof typeof HorizontalPositionAlign]; readonly offset?: number; }; declare type IHyphenationOptions = { readonly autoHyphenation?: boolean; readonly hyphenationZone?: number; readonly consecutiveHyphenLimit?: number; readonly doNotHyphenateCaps?: boolean; }; export declare type IImageOptions = (RegularImageOptions | SvgMediaOptions) & CoreImageOptions; export declare type IIndentAttributesProperties = { readonly start?: number | UniversalMeasure; readonly end?: number | UniversalMeasure; readonly left?: number | UniversalMeasure; readonly right?: number | UniversalMeasure; readonly hanging?: number | PositiveUniversalMeasure; readonly firstLine?: number | PositiveUniversalMeasure; }; declare type IInsertedRunOptions = IChangedAttributesProperties & IRunOptions; declare type ILanguageOptions = { readonly value?: string; readonly eastAsia?: string; readonly bidirectional?: string; }; export declare type ILevelParagraphStylePropertiesOptions = { readonly alignment?: (typeof AlignmentType)[keyof typeof AlignmentType]; readonly thematicBreak?: boolean; readonly contextualSpacing?: boolean; readonly rightTabStop?: number; readonly leftTabStop?: number; readonly indent?: IIndentAttributesProperties; readonly spacing?: ISpacingProperties; readonly keepNext?: boolean; readonly keepLines?: boolean; readonly outlineLevel?: number; }; export declare type ILevelsOptions = { readonly level: number; readonly format?: (typeof LevelFormat)[keyof typeof LevelFormat]; readonly text?: string; readonly alignment?: (typeof AlignmentType)[keyof typeof AlignmentType]; readonly start?: number; readonly suffix?: (typeof LevelSuffix)[keyof typeof LevelSuffix]; readonly isLegalNumberingStyle?: boolean; readonly style?: { readonly run?: IRunStylePropertiesOptions; readonly paragraph?: ILevelParagraphStylePropertiesOptions; }; }; export declare type ILineNumberAttributes = { readonly countBy?: number; readonly start?: number; readonly restart?: (typeof LineNumberRestartFormat)[keyof typeof LineNumberRestartFormat]; readonly distance?: number | PositiveUniversalMeasure; }; export declare class ImageRun extends Run { private readonly imageData; constructor(options: IImageOptions); prepForXml(context: IContext): IXmlableObject | undefined; } export declare type IMargins = { readonly left?: number; readonly bottom?: number; readonly top?: number; readonly right?: number; }; export declare type IMathFractionOptions = { readonly numerator: readonly MathComponent[]; readonly denominator: readonly MathComponent[]; }; export declare type IMathFunctionOptions = { readonly children: readonly MathComponent[]; readonly name: readonly MathComponent[]; }; export declare type IMathIntegralOptions = { readonly children: readonly MathComponent[]; readonly subScript?: readonly MathComponent[]; readonly superScript?: readonly MathComponent[]; }; export declare type IMathLimitLowerOptions = { readonly children: readonly MathComponent[]; readonly limit: readonly MathComponent[]; }; export declare type IMathLimitUpperOptions = { readonly children: readonly MathComponent[]; readonly limit: readonly MathComponent[]; }; export declare type IMathOptions = { readonly children: readonly MathComponent[]; }; export declare type IMathPreSubSuperScriptOptions = { readonly children: readonly MathComponent[]; readonly subScript: readonly MathComponent[]; readonly superScript: readonly MathComponent[]; }; export declare type IMathRadicalOptions = { readonly children: readonly MathComponent[]; readonly degree?: readonly MathComponent[]; }; export declare type IMathSubScriptOptions = { readonly children: readonly MathComponent[]; readonly subScript: readonly MathComponent[]; }; export declare type IMathSubSuperScriptOptions = { readonly children: readonly MathComponent[]; readonly subScript: readonly MathComponent[]; readonly superScript: readonly MathComponent[]; }; export declare type IMathSumOptions = { readonly children: readonly MathComponent[]; readonly subScript?: readonly MathComponent[]; readonly superScript?: readonly MathComponent[]; }; export declare type IMathSuperScriptOptions = { readonly children: readonly MathComponent[]; readonly superScript: readonly MathComponent[]; }; export declare type IMediaData = (RegularMediaData | SvgMediaData) & CoreMediaData; export declare type IMediaDataTransformation = { readonly pixels: { readonly x: number; readonly y: number; }; readonly emus: { readonly x: number; readonly y: number; }; readonly flip?: { readonly vertical?: boolean; readonly horizontal?: boolean; }; readonly rotation?: number; }; export declare type IMediaTransformation = { readonly width: number; readonly height: number; readonly flip?: { readonly vertical?: boolean; readonly horizontal?: boolean; }; readonly rotation?: number; }; export declare class ImportedRootElementAttributes extends XmlComponent { private readonly _attr; constructor(_attr: any); prepForXml(_: IContext): IXmlableObject; } export declare class ImportedXmlComponent extends XmlComponent { static fromXmlString(importedContent: string): ImportedXmlComponent; constructor(rootKey: string, _attr?: any); push(xmlComponent: XmlComponent | string): void; } export declare class Indent extends XmlComponent { constructor({ start, end, left, right, hanging, firstLine }: IIndentAttributesProperties); } export declare abstract class InitializableXmlComponent extends XmlComponent { constructor(rootKey: string, initComponent?: InitializableXmlComponent); } export declare type InputDataType = Buffer | string | number[] | Uint8Array | ArrayBuffer | Blob | NodeJS.ReadableStream | default_2; export declare class InsertedTextRun extends XmlComponent { constructor(options: IInsertedRunOptions); } export declare class InternalHyperlink extends ConcreteHyperlink { constructor(options: { readonly children: readonly ParagraphChild[]; readonly anchor: string; }); } export declare type INumberingOptions = { readonly config: readonly { readonly levels: readonly ILevelsOptions[]; readonly reference: string; }[]; }; declare type IOverrideLevel = { readonly num: number; readonly start?: number; }; export declare type IPageBorderAttributes = { readonly display?: (typeof PageBorderDisplay)[keyof typeof PageBorderDisplay]; readonly offsetFrom?: (typeof PageBorderOffsetFrom)[keyof typeof PageBorderOffsetFrom]; readonly zOrder?: (typeof PageBorderZOrder)[keyof typeof PageBorderZOrder]; }; export declare type IPageBordersOptions = { readonly pageBorders?: IPageBorderAttributes; readonly pageBorderTop?: IBorderOptions; readonly pageBorderRight?: IBorderOptions; readonly pageBorderBottom?: IBorderOptions; readonly pageBorderLeft?: IBorderOptions; }; export declare type IPageMarginAttributes = { readonly top?: number | UniversalMeasure; readonly right?: number | PositiveUniversalMeasure; readonly bottom?: number | UniversalMeasure; readonly left?: number | PositiveUniversalMeasure; readonly header?: number | PositiveUniversalMeasure; readonly footer?: number | PositiveUniversalMeasure; readonly gutter?: number | PositiveUniversalMeasure; }; export declare type IPageNumberTypeAttributes = { readonly start?: number; readonly formatType?: (typeof NumberFormat)[keyof typeof NumberFormat]; readonly separator?: (typeof PageNumberSeparator)[keyof typeof PageNumberSeparator]; }; export declare type IPageReferenceOptions = { readonly hyperlink?: boolean; readonly useRelativePosition?: boolean; }; export declare type IPageSizeAttributes = { readonly width: number | PositiveUniversalMeasure; readonly height: number | PositiveUniversalMeasure; readonly orientation?: (typeof PageOrientation)[keyof typeof PageOrientation]; readonly code?: number; }; export declare type IParagraphOptions = { readonly text?: string; readonly children?: readonly ParagraphChild[]; } & IParagraphPropertiesOptions; export declare type IParagraphPropertiesOptions = { readonly heading?: (typeof HeadingLevel)[keyof typeof HeadingLevel]; readonly bidirectional?: boolean; readonly pageBreakBefore?: boolean; readonly tabStops?: readonly TabStopDefinition[]; readonly style?: string; readonly bullet?: { readonly level: number; }; readonly widowControl?: boolean; readonly frame?: IFrameOptions; readonly suppressLineNumbers?: boolean; readonly wordWrap?: boolean; readonly overflowPunctuation?: boolean; readonly scale?: number; readonly autoSpaceEastAsianText?: boolean; readonly run?: IRunOptions; } & IParagraphStylePropertiesOptions; export declare type IParagraphStyleOptions = { readonly id: string; } & IBaseParagraphStyleOptions; export declare type IParagraphStylePropertiesOptions = { readonly border?: IBordersOptions; readonly shading?: IShadingAttributesProperties; readonly numbering?: { readonly reference: string; readonly level: number; readonly instance?: number; readonly custom?: boolean; } | false; } & ILevelParagraphStylePropertiesOptions; export declare type IPatch = ParagraphPatch | FilePatch; export declare type IPropertiesOptions = { readonly sections: readonly ISectionOptions[]; readonly title?: string; readonly subject?: string; readonly creator?: string; readonly keywords?: string; readonly description?: string; readonly lastModifiedBy?: string; readonly revision?: number; readonly externalStyles?: string; readonly styles?: IStylesOptions; readonly numbering?: INumberingOptions; readonly comments?: ICommentsOptions; readonly footnotes?: Readonly<Record<string, { readonly children: readonly Paragraph[]; }>>; readonly background?: IDocumentBackgroundOptions; readonly features?: { readonly trackRevisions?: boolean; readonly updateFields?: boolean; }; readonly compatabilityModeVersion?: number; readonly compatibility?: ICompatibilityOptions; readonly customProperties?: readonly ICustomPropertyOptions[]; readonly evenAndOddHeaderAndFooters?: boolean; readonly defaultTabStop?: number; readonly fonts?: readonly FontOptions[]; readonly hyphenation?: IHyphenationOptions; }; export declare type IRunOptions = { readonly children?: readonly (Begin | FieldInstruction | Separate | End | (typeof PageNumber)[keyof typeof PageNumber] | FootnoteReferenceRun | Break | AnnotationReference | CarriageReturn | ContinuationSeparator | DayLong | DayShort | EndnoteReference | FootnoteReferenceElement | LastRenderedPageBreak | MonthLong | MonthShort | NoBreakHyphen | PageNumberElement | Separator | SoftHyphen | Tab | YearLong | YearShort | PositionalTab | string)[]; readonly break?: number; readonly text?: string; } & IRunPropertiesOptions; export declare type IRunPropertiesChangeOptions = {} & IRunPropertiesOptions & IChangedAttributesProperties; export declare type IRunPropertiesOptions = { readonly style?: string; } & IRunStylePropertiesOptions; export declare type IRunStylePropertiesOptions = { readonly noProof?: boolean; readonly bold?: boolean; readonly boldComplexScript?: boolean; readonly italics?: boolean; readonly italicsComplexScript?: boolean; readonly underline?: { readonly color?: string; readonly type?: (typeof UnderlineType)[keyof typeof UnderlineType]; }; readonly effect?: (typeof TextEffect)[keyof typeof TextEffect]; readonly emphasisMark?: { readonly type?: (typeof EmphasisMarkType)[keyof typeof EmphasisMarkType]; }; readonly color?: string; readonly kern?: number | PositiveUniversalMeasure; readonly position?: UniversalMeasure; readonly size?: number | PositiveUniversalMeasure; readonly sizeComplexScript?: boolean | number | PositiveUniversalMeasure; readonly rightToLeft?: boolean; readonly smallCaps?: boolean; readonly allCaps?: boolean; readonly strike?: boolean; readonly doubleStrike?: boolean; readonly subScript?: boolean; readonly superScript?: boolean; readonly font?: string | IFontOptions | IFontAttributesProperties; readonly highlight?: (typeof HighlightColor)[keyof typeof HighlightColor]; readonly highlightComplexScript?: boolean | string; readonly characterSpacing?: number; readonly shading?: IShadingAttributesProperties; readonly emboss?: boolean; readonly imprint?: boolean; readonly revision?: IRunPropertiesChangeOptions; readonly language?: ILanguageOptions; readonly border?: IBorderOptions; readonly snapToGrid?: boolean; readonly vanish?: boolean; readonly specVanish?: boolean; readonly scale?: number; readonly math?: boolean; }; export declare type ISectionOptions = { readonly headers?: { readonly default?: Header; readonly first?: Header; readonly even?: Header; }; readonly footers?: { readonly default?: Footer; readonly first?: Footer; readonly even?: Footer; }; readonly properties?: ISectionPropertiesOptions; readonly children: readonly FileChild[]; }; export declare type ISectionPropertiesOptions = { readonly page?: { readonly size?: Partial<IPageSizeAttributes>; readonly margin?: IPageMarginAttributes; readonly pageNumbers?: I