docx 8.5.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 (29) hide show
  1. package/build/file/drawing/inline/graphic/graphic-data/pic/blip/blip-extentions.d.ts +3 -0
  2. package/build/file/drawing/inline/graphic/graphic-data/pic/blip/blip.d.ts +1 -3
  3. package/build/file/index.d.ts +1 -0
  4. package/build/file/media/data.d.ts +12 -3
  5. package/build/file/paragraph/math/n-ary/index.d.ts +3 -0
  6. package/build/file/paragraph/math/n-ary/math-limit-location.d.ts +1 -1
  7. package/build/file/paragraph/math/n-ary/math-limit-lower.d.ts +9 -0
  8. package/build/file/paragraph/math/n-ary/math-limit-lower.spec.d.ts +1 -0
  9. package/build/file/paragraph/math/n-ary/math-limit-upper.d.ts +9 -0
  10. package/build/file/paragraph/math/n-ary/math-limit-upper.spec.d.ts +1 -0
  11. package/build/file/paragraph/math/n-ary/math-limit.d.ts +5 -0
  12. package/build/file/paragraph/math/n-ary/math-limit.spec.d.ts +1 -0
  13. package/build/file/paragraph/math/n-ary/math-n-ary-properties.d.ts +1 -1
  14. package/build/file/paragraph/properties.d.ts +1 -1
  15. package/build/file/paragraph/run/image-run.d.ts +14 -4
  16. package/build/file/paragraph/run/properties.d.ts +20 -1
  17. package/build/index.cjs +283 -153
  18. package/build/index.iife.js +283 -153
  19. package/build/index.mjs +283 -153
  20. package/build/index.umd.js +283 -153
  21. package/build/patcher/from-docx.d.ts +18 -4
  22. package/build/patcher/index.d.ts +1 -0
  23. package/build/patcher/patch-detector.d.ts +6 -0
  24. package/build/patcher/patch-detector.spec.d.ts +1 -0
  25. package/build/patcher/replacer.d.ts +7 -2
  26. package/build/patcher/replacer.spec.d.ts +80 -1
  27. package/build/patcher/run-renderer.d.ts +1 -1
  28. package/build/patcher/traverser.d.ts +1 -0
  29. package/package.json +2 -2
@@ -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,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";
@@ -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 {};
@@ -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;
@@ -5,17 +5,27 @@ import { OutlineOptions } from "../../drawing/inline/graphic/graphic-data/pic/sh
5
5
  import { IFloating } from "../../drawing";
6
6
  import { IMediaTransformation } from "../../media";
7
7
  import { Run } from "../run";
8
- export interface IImageOptions {
9
- readonly data: Buffer | string | Uint8Array | ArrayBuffer;
8
+ type CoreImageOptions = {
10
9
  readonly transformation: IMediaTransformation;
11
10
  readonly floating?: IFloating;
12
11
  readonly altText?: DocPropertiesOptions;
13
12
  readonly outline?: OutlineOptions;
14
- }
13
+ };
14
+ type RegularImageOptions = {
15
+ readonly type: "jpg" | "png" | "gif" | "bmp";
16
+ readonly data: Buffer | string | Uint8Array | ArrayBuffer;
17
+ };
18
+ type SvgMediaOptions = {
19
+ readonly type: "svg";
20
+ readonly data: Buffer | string | Uint8Array | ArrayBuffer;
21
+ readonly fallback: RegularImageOptions;
22
+ };
23
+ export type IImageOptions = (RegularImageOptions | SvgMediaOptions) & CoreImageOptions;
15
24
  export declare class ImageRun extends Run {
16
25
  private readonly key;
26
+ private readonly fallbackKey;
17
27
  private readonly imageData;
18
28
  constructor(options: IImageOptions);
19
29
  prepForXml(context: IContext): IXmlableObject | undefined;
20
- private convertDataURIToBinary;
21
30
  }
31
+ export {};
@@ -20,6 +20,25 @@ export declare const TextEffect: {
20
20
  readonly SPARKLE: "sparkle";
21
21
  readonly NONE: "none";
22
22
  };
23
+ export declare const HighlightColor: {
24
+ readonly BLACK: "black";
25
+ readonly BLUE: "blue";
26
+ readonly CYAN: "cyan";
27
+ readonly DARK_BLUE: "darkBlue";
28
+ readonly DARK_CYAN: "darkCyan";
29
+ readonly DARK_GRAY: "darkGray";
30
+ readonly DARK_GREEN: "darkGreen";
31
+ readonly DARK_MAGENTA: "darkMagenta";
32
+ readonly DARK_RED: "darkRed";
33
+ readonly DARK_YELLOW: "darkYellow";
34
+ readonly GREEN: "green";
35
+ readonly LIGHT_GRAY: "lightGray";
36
+ readonly MAGENTA: "magenta";
37
+ readonly NONE: "none";
38
+ readonly RED: "red";
39
+ readonly WHITE: "white";
40
+ readonly YELLOW: "yellow";
41
+ };
23
42
  export interface IRunStylePropertiesOptions {
24
43
  readonly noProof?: boolean;
25
44
  readonly bold?: boolean;
@@ -47,7 +66,7 @@ export interface IRunStylePropertiesOptions {
47
66
  readonly subScript?: boolean;
48
67
  readonly superScript?: boolean;
49
68
  readonly font?: string | IFontOptions | IFontAttributesProperties;
50
- readonly highlight?: string;
69
+ readonly highlight?: (typeof HighlightColor)[keyof typeof HighlightColor];
51
70
  readonly highlightComplexScript?: boolean | string;
52
71
  readonly characterSpacing?: number;
53
72
  readonly shading?: IShadingAttributesProperties;