docx 9.0.3 → 9.1.1
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.
- package/{build → dist}/index.cjs +7843 -7538
- package/dist/index.d.cts +2998 -0
- package/{build → dist}/index.d.ts +95 -81
- package/{build → dist}/index.iife.js +7835 -7530
- package/{build → dist}/index.mjs +7843 -7538
- package/{build/index.umd.js → dist/index.umd.cjs} +7835 -7530
- package/package.json +17 -14
|
@@ -48,7 +48,7 @@ declare class AppProperties extends XmlComponent {
|
|
|
48
48
|
|
|
49
49
|
export declare type AttributeData = Record<string, boolean | number | string>;
|
|
50
50
|
|
|
51
|
-
declare type AttributeMap<T> = Record<keyof T, string>;
|
|
51
|
+
export declare type AttributeMap<T> = Record<keyof T, string>;
|
|
52
52
|
|
|
53
53
|
export declare type AttributePayload<T> = {
|
|
54
54
|
readonly [P in keyof T]: {
|
|
@@ -388,48 +388,51 @@ declare class Document_2 extends XmlComponent {
|
|
|
388
388
|
get Body(): Body_2;
|
|
389
389
|
}
|
|
390
390
|
|
|
391
|
+
export declare type DocumentAttributeNamespace = keyof typeof DocumentAttributeNamespaces;
|
|
392
|
+
|
|
393
|
+
export declare const DocumentAttributeNamespaces: {
|
|
394
|
+
wpc: string;
|
|
395
|
+
mc: string;
|
|
396
|
+
o: string;
|
|
397
|
+
r: string;
|
|
398
|
+
m: string;
|
|
399
|
+
v: string;
|
|
400
|
+
wp14: string;
|
|
401
|
+
wp: string;
|
|
402
|
+
w10: string;
|
|
403
|
+
w: string;
|
|
404
|
+
w14: string;
|
|
405
|
+
w15: string;
|
|
406
|
+
wpg: string;
|
|
407
|
+
wpi: string;
|
|
408
|
+
wne: string;
|
|
409
|
+
wps: string;
|
|
410
|
+
cp: string;
|
|
411
|
+
dc: string;
|
|
412
|
+
dcterms: string;
|
|
413
|
+
dcmitype: string;
|
|
414
|
+
xsi: string;
|
|
415
|
+
cx: string;
|
|
416
|
+
cx1: string;
|
|
417
|
+
cx2: string;
|
|
418
|
+
cx3: string;
|
|
419
|
+
cx4: string;
|
|
420
|
+
cx5: string;
|
|
421
|
+
cx6: string;
|
|
422
|
+
cx7: string;
|
|
423
|
+
cx8: string;
|
|
424
|
+
aink: string;
|
|
425
|
+
am3d: string;
|
|
426
|
+
w16cex: string;
|
|
427
|
+
w16cid: string;
|
|
428
|
+
w16: string;
|
|
429
|
+
w16sdtdh: string;
|
|
430
|
+
w16se: string;
|
|
431
|
+
};
|
|
432
|
+
|
|
391
433
|
export declare class DocumentAttributes extends XmlAttributeComponent<IDocumentAttributesProperties> {
|
|
392
|
-
protected readonly xmlKeys:
|
|
393
|
-
|
|
394
|
-
mc: string;
|
|
395
|
-
o: string;
|
|
396
|
-
r: string;
|
|
397
|
-
m: string;
|
|
398
|
-
v: string;
|
|
399
|
-
wp14: string;
|
|
400
|
-
wp: string;
|
|
401
|
-
w10: string;
|
|
402
|
-
w: string;
|
|
403
|
-
w14: string;
|
|
404
|
-
w15: string;
|
|
405
|
-
wpg: string;
|
|
406
|
-
wpi: string;
|
|
407
|
-
wne: string;
|
|
408
|
-
wps: string;
|
|
409
|
-
Ignorable: string;
|
|
410
|
-
cp: string;
|
|
411
|
-
dc: string;
|
|
412
|
-
dcterms: string;
|
|
413
|
-
dcmitype: string;
|
|
414
|
-
xsi: string;
|
|
415
|
-
type: string;
|
|
416
|
-
cx: string;
|
|
417
|
-
cx1: string;
|
|
418
|
-
cx2: string;
|
|
419
|
-
cx3: string;
|
|
420
|
-
cx4: string;
|
|
421
|
-
cx5: string;
|
|
422
|
-
cx6: string;
|
|
423
|
-
cx7: string;
|
|
424
|
-
cx8: string;
|
|
425
|
-
aink: string;
|
|
426
|
-
am3d: string;
|
|
427
|
-
w16cex: string;
|
|
428
|
-
w16cid: string;
|
|
429
|
-
w16: string;
|
|
430
|
-
w16sdtdh: string;
|
|
431
|
-
w16se: string;
|
|
432
|
-
};
|
|
434
|
+
protected readonly xmlKeys: AttributeMap<IDocumentAttributesProperties>;
|
|
435
|
+
constructor(ns: readonly DocumentAttributeNamespace[], Ignorable?: string);
|
|
433
436
|
}
|
|
434
437
|
|
|
435
438
|
export declare class DocumentBackground extends XmlComponent {
|
|
@@ -1005,46 +1008,8 @@ export declare type IDocGridAttributesProperties = {
|
|
|
1005
1008
|
readonly charSpace?: number;
|
|
1006
1009
|
};
|
|
1007
1010
|
|
|
1008
|
-
export declare type IDocumentAttributesProperties = {
|
|
1009
|
-
readonly wpc?: string;
|
|
1010
|
-
readonly mc?: string;
|
|
1011
|
-
readonly o?: string;
|
|
1012
|
-
readonly r?: string;
|
|
1013
|
-
readonly m?: string;
|
|
1014
|
-
readonly v?: string;
|
|
1015
|
-
readonly wp14?: string;
|
|
1016
|
-
readonly wp?: string;
|
|
1017
|
-
readonly w10?: string;
|
|
1018
|
-
readonly w?: string;
|
|
1019
|
-
readonly w14?: string;
|
|
1020
|
-
readonly w15?: string;
|
|
1021
|
-
readonly wpg?: string;
|
|
1022
|
-
readonly wpi?: string;
|
|
1023
|
-
readonly wne?: string;
|
|
1024
|
-
readonly wps?: string;
|
|
1011
|
+
export declare type IDocumentAttributesProperties = Partial<Record<DocumentAttributeNamespace, string>> & {
|
|
1025
1012
|
readonly Ignorable?: string;
|
|
1026
|
-
readonly cp?: string;
|
|
1027
|
-
readonly dc?: string;
|
|
1028
|
-
readonly dcterms?: string;
|
|
1029
|
-
readonly dcmitype?: string;
|
|
1030
|
-
readonly xsi?: string;
|
|
1031
|
-
readonly type?: string;
|
|
1032
|
-
readonly cx?: string;
|
|
1033
|
-
readonly cx1?: string;
|
|
1034
|
-
readonly cx2?: string;
|
|
1035
|
-
readonly cx3?: string;
|
|
1036
|
-
readonly cx4?: string;
|
|
1037
|
-
readonly cx5?: string;
|
|
1038
|
-
readonly cx6?: string;
|
|
1039
|
-
readonly cx7?: string;
|
|
1040
|
-
readonly cx8?: string;
|
|
1041
|
-
readonly aink?: string;
|
|
1042
|
-
readonly am3d?: string;
|
|
1043
|
-
readonly w16cex?: string;
|
|
1044
|
-
readonly w16cid?: string;
|
|
1045
|
-
readonly w16?: string;
|
|
1046
|
-
readonly w16sdtdh?: string;
|
|
1047
|
-
readonly w16se?: string;
|
|
1048
1013
|
};
|
|
1049
1014
|
|
|
1050
1015
|
export declare type IDocumentBackgroundOptions = {
|
|
@@ -1131,6 +1096,13 @@ export declare type IHorizontalPositionOptions = {
|
|
|
1131
1096
|
readonly offset?: number;
|
|
1132
1097
|
};
|
|
1133
1098
|
|
|
1099
|
+
declare type IHyphenationOptions = {
|
|
1100
|
+
readonly autoHyphenation?: boolean;
|
|
1101
|
+
readonly hyphenationZone?: number;
|
|
1102
|
+
readonly consecutiveHyphenLimit?: number;
|
|
1103
|
+
readonly doNotHyphenateCaps?: boolean;
|
|
1104
|
+
};
|
|
1105
|
+
|
|
1134
1106
|
export declare type IImageOptions = (RegularImageOptions | SvgMediaOptions) & CoreImageOptions;
|
|
1135
1107
|
|
|
1136
1108
|
export declare type IIndentAttributesProperties = {
|
|
@@ -1442,6 +1414,7 @@ declare type IPropertiesOptions = {
|
|
|
1442
1414
|
readonly evenAndOddHeaderAndFooters?: boolean;
|
|
1443
1415
|
readonly defaultTabStop?: number;
|
|
1444
1416
|
readonly fonts?: readonly FontOptions[];
|
|
1417
|
+
readonly hyphenation?: IHyphenationOptions;
|
|
1445
1418
|
};
|
|
1446
1419
|
|
|
1447
1420
|
export declare type IRunOptions = {
|
|
@@ -1539,6 +1512,7 @@ declare type ISettingsOptions = {
|
|
|
1539
1512
|
readonly updateFields?: boolean;
|
|
1540
1513
|
readonly compatibility?: ICompatibilityOptions;
|
|
1541
1514
|
readonly defaultTabStop?: number;
|
|
1515
|
+
readonly hyphenation?: IHyphenationOptions;
|
|
1542
1516
|
};
|
|
1543
1517
|
|
|
1544
1518
|
export declare type IShadingAttributesProperties = {
|
|
@@ -1707,6 +1681,10 @@ export declare type ITableWidthProperties = {
|
|
|
1707
1681
|
readonly type?: (typeof WidthType)[keyof typeof WidthType];
|
|
1708
1682
|
};
|
|
1709
1683
|
|
|
1684
|
+
declare type ITextboxOptions = Omit<IParagraphOptions, "style"> & {
|
|
1685
|
+
readonly style?: VmlShapeStyle;
|
|
1686
|
+
};
|
|
1687
|
+
|
|
1710
1688
|
export declare type ITextWrapping = {
|
|
1711
1689
|
readonly type: (typeof TextWrappingType)[keyof typeof TextWrappingType];
|
|
1712
1690
|
readonly side?: (typeof TextWrappingSide)[keyof typeof TextWrappingSide];
|
|
@@ -1750,6 +1728,8 @@ export declare const LeaderType: {
|
|
|
1750
1728
|
readonly UNDERSCORE: "underscore";
|
|
1751
1729
|
};
|
|
1752
1730
|
|
|
1731
|
+
declare type LengthUnit = "auto" | number | Percentage | UniversalMeasure | RelativeMeasure;
|
|
1732
|
+
|
|
1753
1733
|
export declare class Level extends LevelBase {
|
|
1754
1734
|
}
|
|
1755
1735
|
|
|
@@ -2355,6 +2335,8 @@ export declare const PositionalTabRelativeTo: {
|
|
|
2355
2335
|
readonly INDENT: "indent";
|
|
2356
2336
|
};
|
|
2357
2337
|
|
|
2338
|
+
export declare type PositivePercentage = `${number}%`;
|
|
2339
|
+
|
|
2358
2340
|
export declare type PositiveUniversalMeasure = `${number}${"mm" | "cm" | "in" | "pt" | "pc" | "pi"}`;
|
|
2359
2341
|
|
|
2360
2342
|
export declare const positiveUniversalMeasureValue: (val: PositiveUniversalMeasure) => PositiveUniversalMeasure;
|
|
@@ -2395,6 +2377,8 @@ export declare const RelativeHorizontalPosition: {
|
|
|
2395
2377
|
readonly RIGHT: "right";
|
|
2396
2378
|
};
|
|
2397
2379
|
|
|
2380
|
+
export declare type RelativeMeasure = `${"-" | ""}${number}${"em" | "ex"}`;
|
|
2381
|
+
|
|
2398
2382
|
export declare const RelativeVerticalPosition: {
|
|
2399
2383
|
readonly CENTER: "center";
|
|
2400
2384
|
readonly INSIDE: "inside";
|
|
@@ -2795,6 +2779,10 @@ export declare class TDirection extends XmlComponent {
|
|
|
2795
2779
|
constructor(value: (typeof TextDirection)[keyof typeof TextDirection]);
|
|
2796
2780
|
}
|
|
2797
2781
|
|
|
2782
|
+
export declare class Textbox extends FileChild {
|
|
2783
|
+
constructor({ style, children, ...rest }: ITextboxOptions);
|
|
2784
|
+
}
|
|
2785
|
+
|
|
2798
2786
|
export declare const TextDirection: {
|
|
2799
2787
|
readonly BOTTOM_TO_TOP_LEFT_TO_RIGHT: "btLr";
|
|
2800
2788
|
readonly LEFT_TO_RIGHT_TOP_TO_BOTTOM: "lrTb";
|
|
@@ -2930,6 +2918,32 @@ export declare const VerticalPositionRelativeFrom: {
|
|
|
2930
2918
|
readonly TOP_MARGIN: "topMargin";
|
|
2931
2919
|
};
|
|
2932
2920
|
|
|
2921
|
+
declare type VmlShapeStyle = {
|
|
2922
|
+
readonly flip?: "x" | "y" | "xy" | "yx";
|
|
2923
|
+
readonly height?: LengthUnit;
|
|
2924
|
+
readonly left?: LengthUnit;
|
|
2925
|
+
readonly marginBottom?: LengthUnit;
|
|
2926
|
+
readonly marginLeft?: LengthUnit;
|
|
2927
|
+
readonly marginRight?: LengthUnit;
|
|
2928
|
+
readonly marginTop?: LengthUnit;
|
|
2929
|
+
readonly positionHorizontal?: "absolute" | "left" | "center" | "right" | "inside" | "outside";
|
|
2930
|
+
readonly positionHorizontalRelative?: "margin" | "page" | "text" | "char";
|
|
2931
|
+
readonly positionVertical?: "absolute" | "left" | "center" | "right" | "inside" | "outside";
|
|
2932
|
+
readonly positionVerticalRelative?: "margin" | "page" | "text" | "char";
|
|
2933
|
+
readonly wrapDistanceBottom?: number;
|
|
2934
|
+
readonly wrapDistanceLeft?: number;
|
|
2935
|
+
readonly wrapDistanceRight?: number;
|
|
2936
|
+
readonly wrapDistanceTop?: number;
|
|
2937
|
+
readonly wrapEdited?: boolean;
|
|
2938
|
+
readonly wrapStyle?: "square" | "none";
|
|
2939
|
+
readonly position?: "static" | "absolute" | "relative";
|
|
2940
|
+
readonly rotation?: number;
|
|
2941
|
+
readonly top?: LengthUnit;
|
|
2942
|
+
readonly visibility?: "hidden" | "inherit";
|
|
2943
|
+
readonly width: LengthUnit;
|
|
2944
|
+
readonly zIndex?: "auto" | number;
|
|
2945
|
+
};
|
|
2946
|
+
|
|
2933
2947
|
export declare const WidthType: {
|
|
2934
2948
|
readonly AUTO: "auto";
|
|
2935
2949
|
readonly DXA: "dxa";
|