docx 8.4.0 → 8.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/build/file/core-properties/properties.d.ts +2 -0
  2. package/build/file/document/body/section-properties/properties/line-number.d.ts +3 -5
  3. package/build/file/document-wrapper.d.ts +2 -1
  4. package/build/file/drawing/anchor/anchor.d.ts +5 -1
  5. package/build/file/drawing/drawing.d.ts +4 -2
  6. package/build/file/drawing/effect-extent/effect-extent.d.ts +7 -3
  7. package/build/file/drawing/inline/graphic/graphic-data/graphic-data.d.ts +6 -1
  8. package/build/file/drawing/inline/graphic/graphic-data/pic/blip/blip-extentions.d.ts +3 -0
  9. package/build/file/drawing/inline/graphic/graphic-data/pic/blip/blip.d.ts +1 -3
  10. package/build/file/drawing/inline/graphic/graphic-data/pic/pic.d.ts +6 -1
  11. package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/no-fill.d.ts +1 -3
  12. package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/outline.d.ts +41 -3
  13. package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/rgb-color.d.ts +6 -0
  14. package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/scheme-color.d.ts +25 -0
  15. package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/solid-fill.d.ts +12 -0
  16. package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/solid-fill.spec.d.ts +1 -0
  17. package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/shape-properties.d.ts +5 -1
  18. package/build/file/drawing/inline/graphic/graphic.d.ts +6 -1
  19. package/build/file/drawing/inline/inline.d.ts +5 -7
  20. package/build/file/drawing/inline/inline.spec.d.ts +1 -0
  21. package/build/file/file.d.ts +3 -0
  22. package/build/file/fonts/create-regular-font.d.ts +8 -0
  23. package/build/file/fonts/font-table.d.ts +10 -0
  24. package/build/file/fonts/font-wrapper.d.ts +16 -0
  25. package/build/file/fonts/font.d.ts +49 -0
  26. package/build/file/fonts/font.spec.d.ts +1 -0
  27. package/build/file/fonts/index.d.ts +1 -0
  28. package/build/file/fonts/obfuscate-ttf-to-odttf.d.ts +2 -0
  29. package/build/file/fonts/obsfuscate-ttf-to-odtts.spec.d.ts +1 -0
  30. package/build/file/index.d.ts +2 -0
  31. package/build/file/media/data.d.ts +12 -3
  32. package/build/file/paragraph/frame/frame-properties.d.ts +4 -39
  33. package/build/file/paragraph/links/pageref-field-instruction.d.ts +1 -1
  34. package/build/file/paragraph/links/pageref.d.ts +4 -1
  35. package/build/file/paragraph/math/n-ary/index.d.ts +3 -0
  36. package/build/file/paragraph/math/n-ary/math-limit-location.d.ts +1 -1
  37. package/build/file/paragraph/math/n-ary/math-limit-lower.d.ts +9 -0
  38. package/build/file/paragraph/math/n-ary/math-limit-lower.spec.d.ts +1 -0
  39. package/build/file/paragraph/math/n-ary/math-limit-upper.d.ts +9 -0
  40. package/build/file/paragraph/math/n-ary/math-limit-upper.spec.d.ts +1 -0
  41. package/build/file/paragraph/math/n-ary/math-limit.d.ts +5 -0
  42. package/build/file/paragraph/math/n-ary/math-limit.spec.d.ts +1 -0
  43. package/build/file/paragraph/math/n-ary/math-n-ary-properties.d.ts +1 -1
  44. package/build/file/paragraph/properties.d.ts +2 -1
  45. package/build/file/paragraph/run/image-run.d.ts +16 -4
  46. package/build/file/paragraph/run/page-number.d.ts +3 -0
  47. package/build/file/paragraph/run/properties.d.ts +20 -1
  48. package/build/file/paragraph/run/run.d.ts +1 -0
  49. package/build/file/paragraph/run/sequential-identifier.d.ts +1 -1
  50. package/build/file/relationships/relationship/relationship.d.ts +1 -1
  51. package/build/file/styles/styles.d.ts +1 -1
  52. package/build/file/table/table-properties/table-cell-margin.d.ts +1 -1
  53. package/build/file/track-revision/track-revision-components/deleted-text-run.d.ts +1 -1
  54. package/build/file/xml-components/imported-xml-component.d.ts +1 -1
  55. package/build/file/xml-components/initializable-xml-component.d.ts +1 -1
  56. package/build/file/xml-components/simple-elements.d.ts +3 -2
  57. package/build/index.cjs +1199 -711
  58. package/build/index.iife.js +1199 -711
  59. package/build/index.mjs +1199 -711
  60. package/build/index.umd.js +1199 -711
  61. package/build/patcher/from-docx.d.ts +18 -4
  62. package/build/patcher/index.d.ts +1 -0
  63. package/build/patcher/patch-detector.d.ts +6 -0
  64. package/build/patcher/patch-detector.spec.d.ts +1 -0
  65. package/build/patcher/replacer.d.ts +7 -2
  66. package/build/patcher/replacer.spec.d.ts +80 -1
  67. package/build/patcher/run-renderer.d.ts +1 -1
  68. package/build/patcher/traverser.d.ts +1 -0
  69. package/build/util/convenience-functions.d.ts +1 -0
  70. package/package.json +15 -15
  71. package/build/file/drawing/effect-extent/effect-extent-attributes.d.ts +0 -14
  72. package/build/file/drawing/inline/inline-attributes.d.ts +0 -10
  73. package/build/file/paragraph/formatting/width.d.ts +0 -0
  74. package/build/file/paragraph/links/pageref-properties.d.ts +0 -4
@@ -1,5 +1,6 @@
1
1
  import { ICommentsOptions } from '../paragraph/run/comment-run';
2
2
  import { ICompatibilityOptions } from '../settings/compatibility';
3
+ import { FontOptions } from '../fonts/font-table';
3
4
  import { XmlComponent } from '../xml-components';
4
5
  import { ICustomPropertyOptions } from "../custom-properties";
5
6
  import { IDocumentBackgroundOptions } from "../document";
@@ -35,6 +36,7 @@ export interface IPropertiesOptions {
35
36
  readonly customProperties?: readonly ICustomPropertyOptions[];
36
37
  readonly evenAndOddHeaderAndFooters?: boolean;
37
38
  readonly defaultTabStop?: number;
39
+ readonly fonts?: readonly FontOptions[];
38
40
  }
39
41
  export declare class CoreProperties extends XmlComponent {
40
42
  constructor(options: Omit<IPropertiesOptions, "sections">);
@@ -5,12 +5,10 @@ export declare const LineNumberRestartFormat: {
5
5
  readonly NEW_SECTION: "newSection";
6
6
  readonly CONTINUOUS: "continuous";
7
7
  };
8
- export interface ILineNumberAttributes {
8
+ export type ILineNumberAttributes = {
9
9
  readonly countBy?: number;
10
10
  readonly start?: number;
11
11
  readonly restart?: (typeof LineNumberRestartFormat)[keyof typeof LineNumberRestartFormat];
12
12
  readonly distance?: number | PositiveUniversalMeasure;
13
- }
14
- export declare class LineNumberType extends XmlComponent {
15
- constructor({ countBy, start, restart, distance }: ILineNumberAttributes);
16
- }
13
+ };
14
+ export declare const createLineNumberType: ({ countBy, start, restart, distance }: ILineNumberAttributes) => XmlComponent;
@@ -1,10 +1,11 @@
1
+ import { XmlComponent } from "./xml-components";
1
2
  import { Document, IDocumentOptions } from "./document";
2
3
  import { Footer } from "./footer/footer";
3
4
  import { FootNotes } from "./footnotes";
4
5
  import { Header } from "./header/header";
5
6
  import { Relationships } from "./relationships";
6
7
  export interface IViewWrapper {
7
- readonly View: Document | Footer | Header | FootNotes;
8
+ readonly View: Document | Footer | Header | FootNotes | XmlComponent;
8
9
  readonly Relationships: Relationships;
9
10
  }
10
11
  export declare class DocumentWrapper implements IViewWrapper {
@@ -2,5 +2,9 @@ import { IMediaData, IMediaDataTransformation } from '../../media';
2
2
  import { XmlComponent } from '../../xml-components';
3
3
  import { IDrawingOptions } from "../drawing";
4
4
  export declare class Anchor extends XmlComponent {
5
- constructor(mediaData: IMediaData, transform: IMediaDataTransformation, drawingOptions: IDrawingOptions);
5
+ constructor({ mediaData, transform, drawingOptions, }: {
6
+ readonly mediaData: IMediaData;
7
+ readonly transform: IMediaDataTransformation;
8
+ readonly drawingOptions: IDrawingOptions;
9
+ });
6
10
  }
@@ -2,15 +2,17 @@ import { IMediaData } from '../media';
2
2
  import { XmlComponent } from '../xml-components';
3
3
  import { DocPropertiesOptions } from "./doc-properties/doc-properties";
4
4
  import { IFloating } from "./floating";
5
- export interface IDistance {
5
+ import { OutlineOptions } from "./inline/graphic/graphic-data/pic/shape-properties/outline/outline";
6
+ export type IDistance = {
6
7
  readonly distT?: number;
7
8
  readonly distB?: number;
8
9
  readonly distL?: number;
9
10
  readonly distR?: number;
10
- }
11
+ };
11
12
  export interface IDrawingOptions {
12
13
  readonly floating?: IFloating;
13
14
  readonly docProperties?: DocPropertiesOptions;
15
+ readonly outline?: OutlineOptions;
14
16
  }
15
17
  export declare class Drawing extends XmlComponent {
16
18
  constructor(imageData: IMediaData, drawingOptions?: IDrawingOptions);
@@ -1,4 +1,8 @@
1
1
  import { XmlComponent } from '../../xml-components';
2
- export declare class EffectExtent extends XmlComponent {
3
- constructor();
4
- }
2
+ export type EffectExtentAttributes = {
3
+ readonly top: number;
4
+ readonly right: number;
5
+ readonly bottom: number;
6
+ readonly left: number;
7
+ };
8
+ export declare const createEffectExtent: ({ top, right, bottom, left }: EffectExtentAttributes) => XmlComponent;
@@ -1,6 +1,11 @@
1
1
  import { IMediaData, IMediaDataTransformation } from '../../../../media';
2
2
  import { XmlComponent } from '../../../../xml-components';
3
+ import { OutlineOptions } from "./pic/shape-properties/outline/outline";
3
4
  export declare class GraphicData extends XmlComponent {
4
5
  private readonly pic;
5
- constructor(mediaData: IMediaData, transform: IMediaDataTransformation);
6
+ constructor({ mediaData, transform, outline, }: {
7
+ readonly mediaData: IMediaData;
8
+ readonly transform: IMediaDataTransformation;
9
+ readonly outline?: OutlineOptions;
10
+ });
6
11
  }
@@ -0,0 +1,3 @@
1
+ import { XmlComponent } from '../../../../../../xml-components';
2
+ import { IMediaData } from '../../../../../../media';
3
+ export declare const createExtentionList: (mediaData: IMediaData) => XmlComponent;
@@ -1,5 +1,3 @@
1
1
  import { IMediaData } from '../../../../../../media';
2
2
  import { XmlComponent } from '../../../../../../xml-components';
3
- export declare class Blip extends XmlComponent {
4
- constructor(mediaData: IMediaData);
5
- }
3
+ export declare const createBlip: (mediaData: IMediaData) => XmlComponent;
@@ -1,5 +1,10 @@
1
1
  import { IMediaData, IMediaDataTransformation } from '../../../../../media';
2
2
  import { XmlComponent } from '../../../../../xml-components';
3
+ import { OutlineOptions } from "./shape-properties/outline/outline";
3
4
  export declare class Pic extends XmlComponent {
4
- constructor(mediaData: IMediaData, transform: IMediaDataTransformation);
5
+ constructor({ mediaData, transform, outline, }: {
6
+ readonly mediaData: IMediaData;
7
+ readonly transform: IMediaDataTransformation;
8
+ readonly outline?: OutlineOptions;
9
+ });
5
10
  }
@@ -1,4 +1,2 @@
1
1
  import { XmlComponent } from '../../../../../../../xml-components';
2
- export declare class NoFill extends XmlComponent {
3
- constructor();
4
- }
2
+ export declare const createNoFill: () => XmlComponent;
@@ -1,4 +1,42 @@
1
1
  import { XmlComponent } from '../../../../../../../xml-components';
2
- export declare class Outline extends XmlComponent {
3
- constructor();
4
- }
2
+ import { SchemeColor } from "./scheme-color";
3
+ export declare const LineCap: {
4
+ readonly ROUND: "rnd";
5
+ readonly SQUARE: "sq";
6
+ readonly FLAT: "flat";
7
+ };
8
+ export declare const CompoundLine: {
9
+ readonly SINGLE: "sng";
10
+ readonly DOUBLE: "dbl";
11
+ readonly THICK_THIN: "thickThin";
12
+ readonly THIN_THICK: "thinThick";
13
+ readonly TRI: "tri";
14
+ };
15
+ export declare const PenAlignment: {
16
+ readonly CENTER: "ctr";
17
+ readonly INSET: "in";
18
+ };
19
+ export type OutlineAttributes = {
20
+ readonly width?: number;
21
+ readonly cap?: keyof typeof LineCap;
22
+ readonly compoundLine?: keyof typeof CompoundLine;
23
+ readonly align?: keyof typeof PenAlignment;
24
+ };
25
+ type OutlineNoFill = {
26
+ readonly type: "noFill";
27
+ };
28
+ type OutlineRgbSolidFill = {
29
+ readonly type: "solidFill";
30
+ readonly solidFillType: "rgb";
31
+ readonly value: string;
32
+ };
33
+ type OutlineSchemeSolidFill = {
34
+ readonly type: "solidFill";
35
+ readonly solidFillType: "scheme";
36
+ readonly value: (typeof SchemeColor)[keyof typeof SchemeColor];
37
+ };
38
+ type OutlineSolidFill = OutlineRgbSolidFill | OutlineSchemeSolidFill;
39
+ type OutlineFillProperties = OutlineNoFill | OutlineSolidFill;
40
+ export type OutlineOptions = OutlineAttributes & OutlineFillProperties;
41
+ export declare const createOutline: (options: OutlineOptions) => XmlComponent;
42
+ export {};
@@ -0,0 +1,6 @@
1
+ import { XmlComponent } from '../../../../../../../xml-components';
2
+ type SolidRgbColorOptions = {
3
+ readonly value: string;
4
+ };
5
+ export declare const createSolidRgbColor: (options: SolidRgbColorOptions) => XmlComponent;
6
+ export {};
@@ -0,0 +1,25 @@
1
+ import { XmlComponent } from '../../../../../../../xml-components';
2
+ type SchemeColorOptions = {
3
+ readonly value: (typeof SchemeColor)[keyof typeof SchemeColor];
4
+ };
5
+ export declare const SchemeColor: {
6
+ readonly BG1: "bg1";
7
+ readonly TX1: "tx1";
8
+ readonly BG2: "bg2";
9
+ readonly TX2: "tx2";
10
+ readonly ACCENT1: "accent1";
11
+ readonly ACCENT2: "accent2";
12
+ readonly ACCENT3: "accent3";
13
+ readonly ACCENT4: "accent4";
14
+ readonly ACCENT5: "accent5";
15
+ readonly ACCENT6: "accent6";
16
+ readonly HLINK: "hlink";
17
+ readonly FOLHLINK: "folHlink";
18
+ readonly DK1: "dk1";
19
+ readonly LT1: "lt1";
20
+ readonly DK2: "dk2";
21
+ readonly LT2: "lt2";
22
+ readonly PHCLR: "phClr";
23
+ };
24
+ export declare const createSchemeColor: (options: SchemeColorOptions) => XmlComponent;
25
+ export {};
@@ -0,0 +1,12 @@
1
+ import { XmlComponent } from '../../../../../../../xml-components';
2
+ import { SchemeColor } from "./scheme-color";
3
+ export type RgbColorOptions = {
4
+ readonly type: "rgb";
5
+ readonly value: string;
6
+ };
7
+ export type SchemeColorOptions = {
8
+ readonly type: "scheme";
9
+ readonly value: (typeof SchemeColor)[keyof typeof SchemeColor];
10
+ };
11
+ export type SolidFillOptions = RgbColorOptions | SchemeColorOptions;
12
+ export declare const createSolidFill: (options: SolidFillOptions) => XmlComponent;
@@ -1,6 +1,10 @@
1
1
  import { IMediaDataTransformation } from '../../../../../../media';
2
2
  import { XmlComponent } from '../../../../../../xml-components';
3
+ import { OutlineOptions } from "./outline/outline";
3
4
  export declare class ShapeProperties extends XmlComponent {
4
5
  private readonly form;
5
- constructor(transform: IMediaDataTransformation);
6
+ constructor({ outline, transform }: {
7
+ readonly outline?: OutlineOptions;
8
+ readonly transform: IMediaDataTransformation;
9
+ });
6
10
  }
@@ -1,6 +1,11 @@
1
1
  import { IMediaData, IMediaDataTransformation } from '../../../media';
2
2
  import { XmlComponent } from '../../../xml-components';
3
+ import { OutlineOptions } from "./graphic-data/pic/shape-properties/outline/outline";
3
4
  export declare class Graphic extends XmlComponent {
4
5
  private readonly data;
5
- constructor(mediaData: IMediaData, transform: IMediaDataTransformation);
6
+ constructor({ mediaData, transform, outline, }: {
7
+ readonly mediaData: IMediaData;
8
+ readonly transform: IMediaDataTransformation;
9
+ readonly outline?: OutlineOptions;
10
+ });
6
11
  }
@@ -1,14 +1,12 @@
1
1
  import { IMediaData, IMediaDataTransformation } from '../../media';
2
2
  import { XmlComponent } from '../../xml-components';
3
3
  import { DocPropertiesOptions } from "./../doc-properties/doc-properties";
4
- interface InlineOptions {
4
+ import { OutlineOptions } from "./graphic/graphic-data/pic/shape-properties/outline/outline";
5
+ type InlineOptions = {
5
6
  readonly mediaData: IMediaData;
6
7
  readonly transform: IMediaDataTransformation;
7
8
  readonly docProperties?: DocPropertiesOptions;
8
- }
9
- export declare class Inline extends XmlComponent {
10
- private readonly extent;
11
- private readonly graphic;
12
- constructor({ mediaData, transform, docProperties }: InlineOptions);
13
- }
9
+ readonly outline?: OutlineOptions;
10
+ };
11
+ export declare const createInline: ({ mediaData, transform, docProperties, outline }: InlineOptions) => XmlComponent;
14
12
  export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -15,6 +15,7 @@ import { Relationships } from "./relationships";
15
15
  import { Settings } from "./settings";
16
16
  import { Styles } from "./styles";
17
17
  import { FileChild } from "./file-child";
18
+ import { FontWrapper } from "./fonts/font-wrapper";
18
19
  export interface ISectionOptions {
19
20
  readonly headers?: {
20
21
  readonly default?: Header;
@@ -45,6 +46,7 @@ export declare class File {
45
46
  private readonly appProperties;
46
47
  private readonly styles;
47
48
  private readonly comments;
49
+ private readonly fontWrapper;
48
50
  constructor(options: IPropertiesOptions);
49
51
  private addSection;
50
52
  private createHeader;
@@ -66,4 +68,5 @@ export declare class File {
66
68
  get FootNotes(): FootnotesWrapper;
67
69
  get Settings(): Settings;
68
70
  get Comments(): Comments;
71
+ get FontTable(): FontWrapper;
69
72
  }
@@ -0,0 +1,8 @@
1
+ import { XmlComponent } from '../xml-components';
2
+ import { CharacterSet } from "./font";
3
+ export declare const createRegularFont: ({ name, index, fontKey, characterSet, }: {
4
+ readonly name: string;
5
+ readonly index: number;
6
+ readonly fontKey: string;
7
+ readonly characterSet?: "00" | "01" | "02" | "4D" | "80" | "81" | "82" | "86" | "88" | "A1" | "A2" | "A3" | "B1" | "B2" | "BA" | "CC" | "DE" | "EE" | "FF" | undefined;
8
+ }) => XmlComponent;
@@ -0,0 +1,10 @@
1
+ /// <reference types="node" />
2
+ import { XmlComponent } from '../xml-components';
3
+ import { FontOptionsWithKey } from "./font-wrapper";
4
+ import { CharacterSet } from "./font";
5
+ export type FontOptions = {
6
+ readonly name: string;
7
+ readonly data: Buffer;
8
+ readonly characterSet?: (typeof CharacterSet)[keyof typeof CharacterSet];
9
+ };
10
+ export declare const createFontTable: (fonts: readonly FontOptionsWithKey[]) => XmlComponent;
@@ -0,0 +1,16 @@
1
+ import { IViewWrapper } from '../document-wrapper';
2
+ import { Relationships } from '../relationships';
3
+ import { XmlComponent } from '../xml-components';
4
+ import { FontOptions } from "./font-table";
5
+ export type FontOptionsWithKey = FontOptions & {
6
+ readonly fontKey: string;
7
+ };
8
+ export declare class FontWrapper implements IViewWrapper {
9
+ readonly options: readonly FontOptions[];
10
+ private readonly fontTable;
11
+ private readonly relationships;
12
+ readonly fontOptionsWithKey: readonly FontOptionsWithKey[];
13
+ constructor(options: readonly FontOptions[]);
14
+ get View(): XmlComponent;
15
+ get Relationships(): Relationships;
16
+ }
@@ -0,0 +1,49 @@
1
+ import { XmlComponent } from '../xml-components';
2
+ export interface IFontRelationshipOptions {
3
+ readonly id: string;
4
+ readonly fontKey?: string;
5
+ readonly subsetted?: boolean;
6
+ }
7
+ export declare const CharacterSet: {
8
+ readonly ANSI: "00";
9
+ readonly DEFAULT: "01";
10
+ readonly SYMBOL: "02";
11
+ readonly MAC: "4D";
12
+ readonly JIS: "80";
13
+ readonly HANGUL: "81";
14
+ readonly JOHAB: "82";
15
+ readonly GB_2312: "86";
16
+ readonly CHINESEBIG5: "88";
17
+ readonly GREEK: "A1";
18
+ readonly TURKISH: "A2";
19
+ readonly VIETNAMESE: "A3";
20
+ readonly HEBREW: "B1";
21
+ readonly ARABIC: "B2";
22
+ readonly BALTIC: "BA";
23
+ readonly RUSSIAN: "CC";
24
+ readonly THAI: "DE";
25
+ readonly EASTEUROPE: "EE";
26
+ readonly OEM: "FF";
27
+ };
28
+ export type FontOptions = {
29
+ readonly name: string;
30
+ readonly altName?: string;
31
+ readonly panose1?: string;
32
+ readonly charset?: (typeof CharacterSet)[keyof typeof CharacterSet];
33
+ readonly family?: string;
34
+ readonly notTrueType?: boolean;
35
+ readonly pitch?: string;
36
+ readonly sig?: {
37
+ readonly usb0: string;
38
+ readonly usb1: string;
39
+ readonly usb2: string;
40
+ readonly usb3: string;
41
+ readonly csb0: string;
42
+ readonly csb1: string;
43
+ };
44
+ readonly embedRegular?: IFontRelationshipOptions;
45
+ readonly embedBold?: IFontRelationshipOptions;
46
+ readonly embedItalic?: IFontRelationshipOptions;
47
+ readonly embedBoldItalic?: IFontRelationshipOptions;
48
+ };
49
+ export declare const createFont: ({ name, altName, panose1, charset, family, notTrueType, pitch, sig, embedRegular, embedBold, embedItalic, embedBoldItalic, }: FontOptions) => XmlComponent;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export { CharacterSet } from "./font";
@@ -0,0 +1,2 @@
1
+ /// <reference types="node" />
2
+ export declare const obfuscate: (buf: Buffer, fontKey: string) => Buffer;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,7 @@
1
1
  export * from "./paragraph";
2
2
  export * from "./table";
3
3
  export * from "./file";
4
+ export * from "./file-child";
4
5
  export * from "./numbering";
5
6
  export * from "./media";
6
7
  export * from "./drawing";
@@ -18,3 +19,4 @@ export * from "./shared";
18
19
  export * from "./border";
19
20
  export * from "./vertical-align";
20
21
  export * from "./checkbox";
22
+ export * from "./fonts";
@@ -14,9 +14,18 @@ export interface IMediaDataTransformation {
14
14
  };
15
15
  readonly rotation?: number;
16
16
  }
17
- export interface IMediaData {
18
- readonly stream: Buffer | Uint8Array | ArrayBuffer;
17
+ type CoreMediaData = {
19
18
  readonly fileName: string;
20
19
  readonly transformation: IMediaDataTransformation;
21
- }
20
+ readonly data: Buffer | Uint8Array | ArrayBuffer;
21
+ };
22
+ type RegularMediaData = {
23
+ readonly type: "jpg" | "png" | "gif" | "bmp";
24
+ };
25
+ type SvgMediaData = {
26
+ readonly type: "svg";
27
+ readonly fallback: RegularMediaData & CoreMediaData;
28
+ };
29
+ export type IMediaData = (RegularMediaData | SvgMediaData) & CoreMediaData;
22
30
  export declare const WORKAROUND2 = "";
31
+ export {};
@@ -1,6 +1,6 @@
1
1
  import { HorizontalPositionAlign, VerticalPositionAlign } from '../../shared/alignment';
2
2
  import { HeightRule } from '../../table';
3
- import { XmlAttributeComponent, XmlComponent } from '../../xml-components';
3
+ import { XmlComponent } from '../../xml-components';
4
4
  export declare const DropCapType: {
5
5
  readonly NONE: "none";
6
6
  readonly DROP: "drop";
@@ -37,54 +37,19 @@ interface IBaseFrameOptions {
37
37
  readonly rule?: (typeof HeightRule)[keyof typeof HeightRule];
38
38
  }
39
39
  export interface IXYFrameOptions extends IBaseFrameOptions {
40
+ readonly type: "absolute";
40
41
  readonly position: {
41
42
  readonly x: number;
42
43
  readonly y: number;
43
44
  };
44
45
  }
45
46
  export interface IAlignmentFrameOptions extends IBaseFrameOptions {
47
+ readonly type: "alignment";
46
48
  readonly alignment: {
47
49
  readonly x: (typeof HorizontalPositionAlign)[keyof typeof HorizontalPositionAlign];
48
50
  readonly y: (typeof VerticalPositionAlign)[keyof typeof VerticalPositionAlign];
49
51
  };
50
52
  }
51
53
  export type IFrameOptions = IXYFrameOptions | IAlignmentFrameOptions;
52
- export declare class FramePropertiesAttributes extends XmlAttributeComponent<{
53
- readonly anchorLock?: boolean;
54
- readonly dropCap?: (typeof DropCapType)[keyof typeof DropCapType];
55
- readonly width: number;
56
- readonly height: number;
57
- readonly x?: number;
58
- readonly y?: number;
59
- readonly wrap?: (typeof FrameWrap)[keyof typeof FrameWrap];
60
- readonly lines?: number;
61
- readonly anchorHorizontal?: (typeof FrameAnchorType)[keyof typeof FrameAnchorType];
62
- readonly anchorVertical?: (typeof FrameAnchorType)[keyof typeof FrameAnchorType];
63
- readonly spaceHorizontal?: number;
64
- readonly spaceVertical?: number;
65
- readonly rule?: (typeof HeightRule)[keyof typeof HeightRule];
66
- readonly alignmentX?: (typeof HorizontalPositionAlign)[keyof typeof HorizontalPositionAlign];
67
- readonly alignmentY?: (typeof VerticalPositionAlign)[keyof typeof VerticalPositionAlign];
68
- }> {
69
- protected readonly xmlKeys: {
70
- anchorLock: string;
71
- dropCap: string;
72
- width: string;
73
- height: string;
74
- x: string;
75
- y: string;
76
- anchorHorizontal: string;
77
- anchorVertical: string;
78
- spaceHorizontal: string;
79
- spaceVertical: string;
80
- rule: string;
81
- alignmentX: string;
82
- alignmentY: string;
83
- lines: string;
84
- wrap: string;
85
- };
86
- }
87
- export declare class FrameProperties extends XmlComponent {
88
- constructor(options: IFrameOptions);
89
- }
54
+ export declare const createFrameProperties: (options: IFrameOptions) => XmlComponent;
90
55
  export {};
@@ -1,5 +1,5 @@
1
1
  import { XmlComponent } from '../../xml-components';
2
- import { IPageReferenceOptions } from "./pageref-properties";
2
+ import { IPageReferenceOptions } from "./pageref";
3
3
  export declare class PageReferenceFieldInstruction extends XmlComponent {
4
4
  constructor(bookmarkId: string, options?: IPageReferenceOptions);
5
5
  }
@@ -1,5 +1,8 @@
1
1
  import { Run } from "../run";
2
- import type { IPageReferenceOptions } from "./pageref-properties";
2
+ export type IPageReferenceOptions = {
3
+ readonly hyperlink?: boolean;
4
+ readonly useRelativePosition?: boolean;
5
+ };
3
6
  export declare class PageReference extends Run {
4
7
  constructor(bookmarkId: string, options?: IPageReferenceOptions);
5
8
  }
@@ -6,3 +6,6 @@ export * from "./math-sub-script";
6
6
  export * from "./math-sum";
7
7
  export * from "./math-integral";
8
8
  export * from "./math-super-script";
9
+ export * from "./math-limit";
10
+ export * from "./math-limit-upper";
11
+ export * from "./math-limit-lower";
@@ -1,4 +1,4 @@
1
1
  import { XmlComponent } from '../../../xml-components';
2
2
  export declare class MathLimitLocation extends XmlComponent {
3
- constructor();
3
+ constructor(value?: string);
4
4
  }
@@ -0,0 +1,9 @@
1
+ import { XmlComponent } from '../../../xml-components';
2
+ import { MathComponent } from "../math-component";
3
+ export interface IMathLimitLowerOptions {
4
+ readonly children: readonly MathComponent[];
5
+ readonly limit: readonly MathComponent[];
6
+ }
7
+ export declare class MathLimitLower extends XmlComponent {
8
+ constructor(options: IMathLimitLowerOptions);
9
+ }
@@ -0,0 +1,9 @@
1
+ import { XmlComponent } from '../../../xml-components';
2
+ import { MathComponent } from "../math-component";
3
+ export interface IMathLimitUpperOptions {
4
+ readonly children: readonly MathComponent[];
5
+ readonly limit: readonly MathComponent[];
6
+ }
7
+ export declare class MathLimitUpper extends XmlComponent {
8
+ constructor(options: IMathLimitUpperOptions);
9
+ }
@@ -0,0 +1,5 @@
1
+ import { XmlComponent } from '../../../xml-components';
2
+ import { MathComponent } from "../math-component";
3
+ export declare class MathLimit extends XmlComponent {
4
+ constructor(children: readonly MathComponent[]);
5
+ }
@@ -1,4 +1,4 @@
1
1
  import { XmlComponent } from '../../../xml-components';
2
2
  export declare class MathNAryProperties extends XmlComponent {
3
- constructor(accent: string, hasSuperScript: boolean, hasSubScript: boolean);
3
+ constructor(accent: string, hasSuperScript: boolean, hasSubScript: boolean, limitLocationVal?: string);
4
4
  }
@@ -26,7 +26,7 @@ export interface IParagraphStylePropertiesOptions extends ILevelParagraphStylePr
26
26
  readonly level: number;
27
27
  readonly instance?: number;
28
28
  readonly custom?: boolean;
29
- };
29
+ } | false;
30
30
  }
31
31
  export interface IParagraphPropertiesOptions extends IParagraphStylePropertiesOptions {
32
32
  readonly border?: IBordersOptions;
@@ -43,6 +43,7 @@ export interface IParagraphPropertiesOptions extends IParagraphStylePropertiesOp
43
43
  readonly frame?: IFrameOptions;
44
44
  readonly suppressLineNumbers?: boolean;
45
45
  readonly wordWrap?: boolean;
46
+ readonly overflowPunctuation?: boolean;
46
47
  readonly scale?: number;
47
48
  readonly autoSpaceEastAsianText?: boolean;
48
49
  readonly run?: IRunOptions;