docx-plus 0.0.4 → 0.0.5
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/LICENSE +1 -1
- package/README.md +11 -16
- package/dist/index.cjs +181 -28
- package/dist/index.d.cts +98 -8
- package/dist/index.d.mts +98 -8
- package/dist/index.iife.js +181 -28
- package/dist/index.mjs +180 -28
- package/dist/index.umd.js +181 -28
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -364,6 +364,9 @@ var Attributes = class extends XmlAttributeComponent {
|
|
|
364
364
|
rsidSect: "w:rsidSect",
|
|
365
365
|
space: "w:space",
|
|
366
366
|
sz: "w:sz",
|
|
367
|
+
themeColor: "w:themeColor",
|
|
368
|
+
themeShade: "w:themeShade",
|
|
369
|
+
themeTint: "w:themeTint",
|
|
367
370
|
top: "w:top",
|
|
368
371
|
type: "w:type",
|
|
369
372
|
val: "w:val",
|
|
@@ -890,6 +893,49 @@ const pointMeasureValue = unsignedDecimalNumber;
|
|
|
890
893
|
* ```
|
|
891
894
|
*/
|
|
892
895
|
const dateTimeValue = (val) => val.toISOString();
|
|
896
|
+
/**
|
|
897
|
+
* Theme color values used throughout OOXML for referencing document theme colors.
|
|
898
|
+
*
|
|
899
|
+
* Reference: ST_ThemeColor in OOXML specification
|
|
900
|
+
*
|
|
901
|
+
* @publicApi
|
|
902
|
+
*/
|
|
903
|
+
const ThemeColor = {
|
|
904
|
+
DARK1: "dark1",
|
|
905
|
+
LIGHT1: "light1",
|
|
906
|
+
DARK2: "dark2",
|
|
907
|
+
LIGHT2: "light2",
|
|
908
|
+
ACCENT1: "accent1",
|
|
909
|
+
ACCENT2: "accent2",
|
|
910
|
+
ACCENT3: "accent3",
|
|
911
|
+
ACCENT4: "accent4",
|
|
912
|
+
ACCENT5: "accent5",
|
|
913
|
+
ACCENT6: "accent6",
|
|
914
|
+
HYPERLINK: "hyperlink",
|
|
915
|
+
FOLLOWED_HYPERLINK: "followedHyperlink",
|
|
916
|
+
NONE: "none",
|
|
917
|
+
BACKGROUND1: "background1",
|
|
918
|
+
TEXT1: "text1",
|
|
919
|
+
BACKGROUND2: "background2",
|
|
920
|
+
TEXT2: "text2"
|
|
921
|
+
};
|
|
922
|
+
/**
|
|
923
|
+
* Theme font values used for referencing document theme fonts.
|
|
924
|
+
*
|
|
925
|
+
* Reference: ST_Theme in OOXML specification
|
|
926
|
+
*
|
|
927
|
+
* @publicApi
|
|
928
|
+
*/
|
|
929
|
+
const ThemeFont = {
|
|
930
|
+
MAJOR_EAST_ASIA: "majorEastAsia",
|
|
931
|
+
MAJOR_BIDI: "majorBidi",
|
|
932
|
+
MAJOR_ASCII: "majorAscii",
|
|
933
|
+
MAJOR_H_ANSI: "majorHAnsi",
|
|
934
|
+
MINOR_EAST_ASIA: "minorEastAsia",
|
|
935
|
+
MINOR_BIDI: "minorBidi",
|
|
936
|
+
MINOR_ASCII: "minorAscii",
|
|
937
|
+
MINOR_H_ANSI: "minorHAnsi"
|
|
938
|
+
};
|
|
893
939
|
//#endregion
|
|
894
940
|
//#region src/file/xml-components/simple-elements.ts
|
|
895
941
|
/**
|
|
@@ -1302,12 +1348,20 @@ const createAlignment = (type) => new BuilderElement({
|
|
|
1302
1348
|
* });
|
|
1303
1349
|
* ```
|
|
1304
1350
|
*/
|
|
1305
|
-
const createBorderElement = (elementName, { color, size, space, style }) => new BuilderElement({
|
|
1351
|
+
const createBorderElement = (elementName, { color, size, space, style, themeColor, themeTint, themeShade, shadow, frame }) => new BuilderElement({
|
|
1306
1352
|
attributes: {
|
|
1307
1353
|
color: {
|
|
1308
1354
|
key: "w:color",
|
|
1309
1355
|
value: color === void 0 ? void 0 : hexColorValue(color)
|
|
1310
1356
|
},
|
|
1357
|
+
frame: {
|
|
1358
|
+
key: "w:frame",
|
|
1359
|
+
value: frame
|
|
1360
|
+
},
|
|
1361
|
+
shadow: {
|
|
1362
|
+
key: "w:shadow",
|
|
1363
|
+
value: shadow
|
|
1364
|
+
},
|
|
1311
1365
|
size: {
|
|
1312
1366
|
key: "w:sz",
|
|
1313
1367
|
value: size === void 0 ? void 0 : eighthPointMeasureValue(size)
|
|
@@ -1319,6 +1373,18 @@ const createBorderElement = (elementName, { color, size, space, style }) => new
|
|
|
1319
1373
|
style: {
|
|
1320
1374
|
key: "w:val",
|
|
1321
1375
|
value: style
|
|
1376
|
+
},
|
|
1377
|
+
themeColor: {
|
|
1378
|
+
key: "w:themeColor",
|
|
1379
|
+
value: themeColor
|
|
1380
|
+
},
|
|
1381
|
+
themeShade: {
|
|
1382
|
+
key: "w:themeShade",
|
|
1383
|
+
value: themeShade === void 0 ? void 0 : uCharHexNumber(themeShade)
|
|
1384
|
+
},
|
|
1385
|
+
themeTint: {
|
|
1386
|
+
key: "w:themeTint",
|
|
1387
|
+
value: themeTint === void 0 ? void 0 : uCharHexNumber(themeTint)
|
|
1322
1388
|
}
|
|
1323
1389
|
},
|
|
1324
1390
|
name: elementName
|
|
@@ -1522,20 +1588,32 @@ var ThematicBreak = class extends XmlComponent {
|
|
|
1522
1588
|
* </xsd:complexType>
|
|
1523
1589
|
* ```
|
|
1524
1590
|
*/
|
|
1525
|
-
const createIndent = ({ start, end, left, right, hanging, firstLine }) => new BuilderElement({
|
|
1591
|
+
const createIndent = ({ start, startChars, end, endChars, left, right, hanging, hangingChars, firstLine, firstLineChars }) => new BuilderElement({
|
|
1526
1592
|
attributes: {
|
|
1527
1593
|
end: {
|
|
1528
1594
|
key: "w:end",
|
|
1529
1595
|
value: end === void 0 ? void 0 : signedTwipsMeasureValue(end)
|
|
1530
1596
|
},
|
|
1597
|
+
endChars: {
|
|
1598
|
+
key: "w:endChars",
|
|
1599
|
+
value: endChars === void 0 ? void 0 : decimalNumber(endChars)
|
|
1600
|
+
},
|
|
1531
1601
|
firstLine: {
|
|
1532
1602
|
key: "w:firstLine",
|
|
1533
1603
|
value: firstLine === void 0 ? void 0 : twipsMeasureValue(firstLine)
|
|
1534
1604
|
},
|
|
1605
|
+
firstLineChars: {
|
|
1606
|
+
key: "w:firstLineChars",
|
|
1607
|
+
value: firstLineChars === void 0 ? void 0 : decimalNumber(firstLineChars)
|
|
1608
|
+
},
|
|
1535
1609
|
hanging: {
|
|
1536
1610
|
key: "w:hanging",
|
|
1537
1611
|
value: hanging === void 0 ? void 0 : twipsMeasureValue(hanging)
|
|
1538
1612
|
},
|
|
1613
|
+
hangingChars: {
|
|
1614
|
+
key: "w:hangingChars",
|
|
1615
|
+
value: hangingChars === void 0 ? void 0 : decimalNumber(hangingChars)
|
|
1616
|
+
},
|
|
1539
1617
|
left: {
|
|
1540
1618
|
key: "w:left",
|
|
1541
1619
|
value: left === void 0 ? void 0 : signedTwipsMeasureValue(left)
|
|
@@ -1547,6 +1625,10 @@ const createIndent = ({ start, end, left, right, hanging, firstLine }) => new Bu
|
|
|
1547
1625
|
start: {
|
|
1548
1626
|
key: "w:start",
|
|
1549
1627
|
value: start === void 0 ? void 0 : signedTwipsMeasureValue(start)
|
|
1628
|
+
},
|
|
1629
|
+
startChars: {
|
|
1630
|
+
key: "w:startChars",
|
|
1631
|
+
value: startChars === void 0 ? void 0 : decimalNumber(startChars)
|
|
1550
1632
|
}
|
|
1551
1633
|
},
|
|
1552
1634
|
name: "w:ind"
|
|
@@ -1997,7 +2079,7 @@ var CurrentSection = class extends XmlComponent {
|
|
|
1997
2079
|
*
|
|
1998
2080
|
* Reference: http://officeopenxml.com/WPshading.php
|
|
1999
2081
|
*/
|
|
2000
|
-
const createShading = ({ fill, color, type }) => new BuilderElement({
|
|
2082
|
+
const createShading = ({ fill, color, type, themeColor, themeTint, themeShade, themeFill, themeFillTint, themeFillShade }) => new BuilderElement({
|
|
2001
2083
|
attributes: {
|
|
2002
2084
|
color: {
|
|
2003
2085
|
key: "w:color",
|
|
@@ -2007,6 +2089,30 @@ const createShading = ({ fill, color, type }) => new BuilderElement({
|
|
|
2007
2089
|
key: "w:fill",
|
|
2008
2090
|
value: fill === void 0 ? void 0 : hexColorValue(fill)
|
|
2009
2091
|
},
|
|
2092
|
+
themeColor: {
|
|
2093
|
+
key: "w:themeColor",
|
|
2094
|
+
value: themeColor
|
|
2095
|
+
},
|
|
2096
|
+
themeFill: {
|
|
2097
|
+
key: "w:themeFill",
|
|
2098
|
+
value: themeFill
|
|
2099
|
+
},
|
|
2100
|
+
themeFillShade: {
|
|
2101
|
+
key: "w:themeFillShade",
|
|
2102
|
+
value: themeFillShade === void 0 ? void 0 : uCharHexNumber(themeFillShade)
|
|
2103
|
+
},
|
|
2104
|
+
themeFillTint: {
|
|
2105
|
+
key: "w:themeFillTint",
|
|
2106
|
+
value: themeFillTint === void 0 ? void 0 : uCharHexNumber(themeFillTint)
|
|
2107
|
+
},
|
|
2108
|
+
themeShade: {
|
|
2109
|
+
key: "w:themeShade",
|
|
2110
|
+
value: themeShade === void 0 ? void 0 : uCharHexNumber(themeShade)
|
|
2111
|
+
},
|
|
2112
|
+
themeTint: {
|
|
2113
|
+
key: "w:themeTint",
|
|
2114
|
+
value: themeTint === void 0 ? void 0 : uCharHexNumber(themeTint)
|
|
2115
|
+
},
|
|
2010
2116
|
type: {
|
|
2011
2117
|
key: "w:val",
|
|
2012
2118
|
value: type
|
|
@@ -2185,7 +2291,13 @@ var InsertionTrackChange = class extends XmlComponent {
|
|
|
2185
2291
|
*
|
|
2186
2292
|
* @publicApi
|
|
2187
2293
|
*/
|
|
2188
|
-
const EmphasisMarkType = {
|
|
2294
|
+
const EmphasisMarkType = {
|
|
2295
|
+
NONE: "none",
|
|
2296
|
+
COMMA: "comma",
|
|
2297
|
+
CIRCLE: "circle",
|
|
2298
|
+
DOT: "dot",
|
|
2299
|
+
UNDER_DOT: "underDot"
|
|
2300
|
+
};
|
|
2189
2301
|
/**
|
|
2190
2302
|
* Creates an emphasis mark element for a WordprocessingML document.
|
|
2191
2303
|
*
|
|
@@ -2276,16 +2388,27 @@ var CharacterSpacing = class extends XmlComponent {
|
|
|
2276
2388
|
*
|
|
2277
2389
|
* @example
|
|
2278
2390
|
* ```typescript
|
|
2279
|
-
* new Color("FF0000"); // Red text
|
|
2391
|
+
* new Color("FF0000"); // Red text (backward compatible)
|
|
2280
2392
|
* new Color("auto"); // Automatic color
|
|
2393
|
+
* new Color({ themeColor: ThemeColor.ACCENT1, themeTint: "99" }); // Theme color with tint
|
|
2281
2394
|
* ```
|
|
2282
2395
|
*
|
|
2283
2396
|
* @internal
|
|
2284
2397
|
*/
|
|
2285
2398
|
var Color = class extends XmlComponent {
|
|
2286
|
-
constructor(
|
|
2399
|
+
constructor(colorOrOptions) {
|
|
2287
2400
|
super("w:color");
|
|
2288
|
-
|
|
2401
|
+
if (typeof colorOrOptions === "string") {
|
|
2402
|
+
this.root.push(new Attributes({ val: hexColorValue(colorOrOptions) }));
|
|
2403
|
+
return;
|
|
2404
|
+
}
|
|
2405
|
+
const opts = colorOrOptions;
|
|
2406
|
+
this.root.push(new Attributes({
|
|
2407
|
+
val: opts.val === void 0 ? void 0 : hexColorValue(opts.val),
|
|
2408
|
+
themeColor: opts.themeColor,
|
|
2409
|
+
themeTint: opts.themeTint === void 0 ? void 0 : uCharHexNumber(opts.themeTint),
|
|
2410
|
+
themeShade: opts.themeShade === void 0 ? void 0 : uCharHexNumber(opts.themeShade)
|
|
2411
|
+
}));
|
|
2289
2412
|
}
|
|
2290
2413
|
};
|
|
2291
2414
|
/**
|
|
@@ -2484,18 +2607,34 @@ const createRunFonts = (nameOrAttrs, hint) => {
|
|
|
2484
2607
|
key: "w:ascii",
|
|
2485
2608
|
value: attrs.ascii
|
|
2486
2609
|
},
|
|
2610
|
+
asciiTheme: {
|
|
2611
|
+
key: "w:asciiTheme",
|
|
2612
|
+
value: attrs.asciiTheme
|
|
2613
|
+
},
|
|
2487
2614
|
cs: {
|
|
2488
2615
|
key: "w:cs",
|
|
2489
2616
|
value: attrs.cs
|
|
2490
2617
|
},
|
|
2618
|
+
cstheme: {
|
|
2619
|
+
key: "w:cstheme",
|
|
2620
|
+
value: attrs.cstheme
|
|
2621
|
+
},
|
|
2491
2622
|
eastAsia: {
|
|
2492
2623
|
key: "w:eastAsia",
|
|
2493
2624
|
value: attrs.eastAsia
|
|
2494
2625
|
},
|
|
2626
|
+
eastAsiaTheme: {
|
|
2627
|
+
key: "w:eastAsiaTheme",
|
|
2628
|
+
value: attrs.eastAsiaTheme
|
|
2629
|
+
},
|
|
2495
2630
|
hAnsi: {
|
|
2496
2631
|
key: "w:hAnsi",
|
|
2497
2632
|
value: attrs.hAnsi
|
|
2498
2633
|
},
|
|
2634
|
+
hAnsiTheme: {
|
|
2635
|
+
key: "w:hAnsiTheme",
|
|
2636
|
+
value: attrs.hAnsiTheme
|
|
2637
|
+
},
|
|
2499
2638
|
hint: {
|
|
2500
2639
|
key: "w:hint",
|
|
2501
2640
|
value: attrs.hint
|
|
@@ -2652,12 +2791,24 @@ const UnderlineType = {
|
|
|
2652
2791
|
* createUnderline(UnderlineType.WAVE, "FF0000");
|
|
2653
2792
|
* ```
|
|
2654
2793
|
*/
|
|
2655
|
-
const createUnderline = (underlineType = UnderlineType.SINGLE, color) => new BuilderElement({
|
|
2794
|
+
const createUnderline = (underlineType = UnderlineType.SINGLE, color, themeColor, themeTint, themeShade) => new BuilderElement({
|
|
2656
2795
|
attributes: {
|
|
2657
2796
|
color: {
|
|
2658
2797
|
key: "w:color",
|
|
2659
2798
|
value: color === void 0 ? void 0 : hexColorValue(color)
|
|
2660
2799
|
},
|
|
2800
|
+
themeColor: {
|
|
2801
|
+
key: "w:themeColor",
|
|
2802
|
+
value: themeColor
|
|
2803
|
+
},
|
|
2804
|
+
themeShade: {
|
|
2805
|
+
key: "w:themeShade",
|
|
2806
|
+
value: themeShade === void 0 ? void 0 : uCharHexNumber(themeShade)
|
|
2807
|
+
},
|
|
2808
|
+
themeTint: {
|
|
2809
|
+
key: "w:themeTint",
|
|
2810
|
+
value: themeTint === void 0 ? void 0 : uCharHexNumber(themeTint)
|
|
2811
|
+
},
|
|
2661
2812
|
val: {
|
|
2662
2813
|
key: "w:val",
|
|
2663
2814
|
value: underlineType
|
|
@@ -2809,6 +2960,9 @@ var RunProperties = class extends IgnoreIfEmptyXmlComponent {
|
|
|
2809
2960
|
if (options.doubleStrike !== void 0) this.push(new OnOffElement("w:dstrike", options.doubleStrike));
|
|
2810
2961
|
if (options.emboss !== void 0) this.push(new OnOffElement("w:emboss", options.emboss));
|
|
2811
2962
|
if (options.imprint !== void 0) this.push(new OnOffElement("w:imprint", options.imprint));
|
|
2963
|
+
if (options.outline !== void 0) this.push(new OnOffElement("w:outline", options.outline));
|
|
2964
|
+
if (options.shadow !== void 0) this.push(new OnOffElement("w:shadow", options.shadow));
|
|
2965
|
+
if (options.webHidden !== void 0) this.push(new OnOffElement("w:webHidden", options.webHidden));
|
|
2812
2966
|
if (options.noProof !== void 0) this.push(new OnOffElement("w:noProof", options.noProof));
|
|
2813
2967
|
if (options.snapToGrid !== void 0) this.push(new OnOffElement("w:snapToGrid", options.snapToGrid));
|
|
2814
2968
|
if (options.vanish) this.push(new OnOffElement("w:vanish", options.vanish));
|
|
@@ -2834,6 +2988,8 @@ var RunProperties = class extends IgnoreIfEmptyXmlComponent {
|
|
|
2834
2988
|
if (options.language) this.push(createLanguageComponent(options.language));
|
|
2835
2989
|
if (options.specVanish) this.push(new OnOffElement("w:specVanish", options.vanish));
|
|
2836
2990
|
if (options.math) this.push(new OnOffElement("w:oMath", options.math));
|
|
2991
|
+
if (options.fitText !== void 0) this.push(new NumberValueElement("w:fitText", options.fitText));
|
|
2992
|
+
if (options.complexScript !== void 0) this.push(new OnOffElement("w:cs", options.complexScript));
|
|
2837
2993
|
if (options.revision) this.push(new RunPropertiesChange(options.revision));
|
|
2838
2994
|
}
|
|
2839
2995
|
push(item) {
|
|
@@ -3269,18 +3425,6 @@ const generateUuidPart = (count) => customAlphabet("1234567890abcdef", count)();
|
|
|
3269
3425
|
* ```
|
|
3270
3426
|
*/
|
|
3271
3427
|
const uniqueUuid = () => `${generateUuidPart(8)}-${generateUuidPart(4)}-${generateUuidPart(4)}-${generateUuidPart(4)}-${generateUuidPart(12)}`;
|
|
3272
|
-
/**
|
|
3273
|
-
* Encode a string to UTF-8 bytes.
|
|
3274
|
-
*
|
|
3275
|
-
* This is used to pre-encode XML content before passing to fflate's zipSync,
|
|
3276
|
-
* which expects Uint8Array input for text content.
|
|
3277
|
-
*
|
|
3278
|
-
* The copy via `new Uint8Array()` ensures the returned array uses the
|
|
3279
|
-
* current module's Uint8Array constructor, avoiding cross-realm issues
|
|
3280
|
-
* in test environments (happy-dom) where TextEncoder returns a different
|
|
3281
|
-
* realm's Uint8Array.
|
|
3282
|
-
*/
|
|
3283
|
-
const encodeUtf8 = (str) => new Uint8Array(new TextEncoder().encode(str));
|
|
3284
3428
|
//#endregion
|
|
3285
3429
|
//#region src/file/drawing/floating/floating-position.ts
|
|
3286
3430
|
/**
|
|
@@ -6943,7 +7087,7 @@ const LineRuleType = {
|
|
|
6943
7087
|
* });
|
|
6944
7088
|
* ```
|
|
6945
7089
|
*/
|
|
6946
|
-
const createSpacing = ({ after, before, line, lineRule, beforeAutoSpacing, afterAutoSpacing }) => new BuilderElement({
|
|
7090
|
+
const createSpacing = ({ after, before, line, lineRule, beforeAutoSpacing, afterAutoSpacing, beforeLines, afterLines }) => new BuilderElement({
|
|
6947
7091
|
attributes: {
|
|
6948
7092
|
after: {
|
|
6949
7093
|
key: "w:after",
|
|
@@ -6953,6 +7097,10 @@ const createSpacing = ({ after, before, line, lineRule, beforeAutoSpacing, after
|
|
|
6953
7097
|
key: "w:afterAutospacing",
|
|
6954
7098
|
value: afterAutoSpacing
|
|
6955
7099
|
},
|
|
7100
|
+
afterLines: {
|
|
7101
|
+
key: "w:afterLines",
|
|
7102
|
+
value: afterLines === void 0 ? void 0 : decimalNumber(afterLines)
|
|
7103
|
+
},
|
|
6956
7104
|
before: {
|
|
6957
7105
|
key: "w:before",
|
|
6958
7106
|
value: before
|
|
@@ -6961,6 +7109,10 @@ const createSpacing = ({ after, before, line, lineRule, beforeAutoSpacing, after
|
|
|
6961
7109
|
key: "w:beforeAutospacing",
|
|
6962
7110
|
value: beforeAutoSpacing
|
|
6963
7111
|
},
|
|
7112
|
+
beforeLines: {
|
|
7113
|
+
key: "w:beforeLines",
|
|
7114
|
+
value: beforeLines === void 0 ? void 0 : decimalNumber(beforeLines)
|
|
7115
|
+
},
|
|
6964
7116
|
line: {
|
|
6965
7117
|
key: "w:line",
|
|
6966
7118
|
value: line
|
|
@@ -7071,6 +7223,7 @@ const TabStopType = {
|
|
|
7071
7223
|
*/
|
|
7072
7224
|
const LeaderType = {
|
|
7073
7225
|
DOT: "dot",
|
|
7226
|
+
HEAVY: "heavy",
|
|
7074
7227
|
HYPHEN: "hyphen",
|
|
7075
7228
|
MIDDLE_DOT: "middleDot",
|
|
7076
7229
|
NONE: "none",
|
|
@@ -21681,13 +21834,12 @@ var Compiler = class {
|
|
|
21681
21834
|
const footerFormattedViews = /* @__PURE__ */ new Map();
|
|
21682
21835
|
const xmlifiedFileMapping = this.xmlifyFile(file, headerFormattedViews, footerFormattedViews, prettifyXml);
|
|
21683
21836
|
const map = new Map(Object.entries(xmlifiedFileMapping));
|
|
21684
|
-
for (const [, obj] of map) if (Array.isArray(obj)) for (const subFile of obj) files[subFile.path] =
|
|
21685
|
-
else files[obj.path] =
|
|
21686
|
-
for (const subFile of overrides) files[subFile.path] =
|
|
21687
|
-
for (const mediaData of file.Media.Array)
|
|
21688
|
-
else {
|
|
21837
|
+
for (const [, obj] of map) if (Array.isArray(obj)) for (const subFile of obj) files[subFile.path] = textToUint8Array(subFile.data);
|
|
21838
|
+
else files[obj.path] = textToUint8Array(obj.data);
|
|
21839
|
+
for (const subFile of overrides) files[subFile.path] = textToUint8Array(subFile.data);
|
|
21840
|
+
for (const mediaData of file.Media.Array) {
|
|
21689
21841
|
files[`word/media/${mediaData.fileName}`] = [toUint8Array(mediaData.data), { level: 0 }];
|
|
21690
|
-
files[`word/media/${mediaData.fallback.fileName}`] = [toUint8Array(mediaData.fallback.data), { level: 0 }];
|
|
21842
|
+
if (mediaData.type === "svg") files[`word/media/${mediaData.fallback.fileName}`] = [toUint8Array(mediaData.fallback.data), { level: 0 }];
|
|
21691
21843
|
}
|
|
21692
21844
|
for (const { data: buffer, name, fontKey } of file.FontTable.fontOptionsWithKey) {
|
|
21693
21845
|
const [nameWithoutExtension] = name.split(".");
|
|
@@ -23028,4 +23180,4 @@ const findPatchKeys = (text) => {
|
|
|
23028
23180
|
return (_text$match = text.match(/(?<=\{\{).+?(?=\}\})/gs)) !== null && _text$match !== void 0 ? _text$match : [];
|
|
23029
23181
|
};
|
|
23030
23182
|
//#endregion
|
|
23031
|
-
export { AbstractNumbering, AlignmentType, AnnotationReference, Attributes, BaseXmlComponent, Body, Bookmark, BookmarkEnd, BookmarkStart, Border, BorderStyle, BuilderElement, CarriageReturn, CellMerge, CellMergeAttributes, CharacterSet, CheckBox, CheckBoxSymbolElement, CheckBoxUtil, Column, ColumnBreak, Comment, CommentRangeEnd, CommentRangeStart, CommentReference, Comments, ConcreteHyperlink, ConcreteNumbering, ContinuationSeparator, DayLong, DayShort, DeletedTableCell, DeletedTableRow, DeletedTextRun, File as Document, File, DocumentAttributeNamespaces, DocumentAttributes, DocumentBackground, DocumentBackgroundAttributes, DocumentDefaults, DocumentGridType, Drawing, DropCapType, EMPTY_OBJECT, EmphasisMarkType, EmptyElement, EndnoteIdReference, EndnoteReference, EndnoteReferenceRun, EndnoteReferenceRunAttributes, Endnotes, ExternalHyperlink, FileChild, FootNoteReferenceRunAttributes, FootNotes, Footer, FooterWrapper, FootnoteReference, FootnoteReferenceElement, FootnoteReferenceRun, FrameAnchorType, FrameWrap, GridSpan, Header, HeaderFooterReferenceType, HeaderFooterType, HeaderWrapper, HeadingLevel, HeightRule, HighlightColor, HorizontalPositionAlign, HorizontalPositionRelativeFrom, HpsMeasureElement, HyperlinkType, IgnoreIfEmptyXmlComponent, ImageRun, ImportedRootElementAttributes, ImportedXmlComponent, InitializableXmlComponent, InsertedTableCell, InsertedTableRow, InsertedTextRun, InternalHyperlink, LastRenderedPageBreak, LeaderType, Level, LevelBase, LevelForOverride, LevelFormat, LevelOverride, LevelSuffix, LineNumberRestartFormat, LineRuleType, Math$1 as Math, MathAngledBrackets, MathCurlyBrackets, MathDegree, MathDenominator, MathFraction, MathFunction, MathFunctionName, MathFunctionProperties, MathIntegral, MathLimit, MathLimitLower, MathLimitUpper, MathNumerator, MathPreSubSuperScript, MathRadical, MathRadicalProperties, MathRoundBrackets, MathRun, MathSquareBrackets, MathSubScript, MathSubSuperScript, MathSum, MathSuperScript, Media, MonthLong, MonthShort, NextAttributeComponent, NoBreakHyphen, NumberFormat, NumberProperties, NumberValueElement, NumberedItemReference, NumberedItemReferenceFormat, Numbering, OnOffElement, OverlapType, Packer, PageBorderDisplay, PageBorderOffsetFrom, PageBorderZOrder, PageBorders, PageBreak, PageBreakBefore, PageNumber, PageNumberElement, PageNumberSeparator, PageOrientation, PageReference, PageTextDirection, PageTextDirectionType, Paragraph, ParagraphProperties, ParagraphPropertiesChange, ParagraphPropertiesDefaults, ParagraphRunProperties, PatchType, PositionalTab, PositionalTabAlignment, PositionalTabLeader, PositionalTabRelativeTo, PrettifyType, RelativeHorizontalPosition, RelativeVerticalPosition, Run, RunProperties, RunPropertiesChange, RunPropertiesDefaults, SectionProperties, SectionPropertiesChange, SectionType, Separator, SequentialIdentifier, ShadingType, SimpleField, SimpleMailMergeField, SoftHyphen, SpaceType, StringContainer, StringEnumValueElement, StringValueElement, StyleForCharacter, StyleForParagraph, StyleLevel, Styles, SymbolRun, TDirection, Tab, TabStopPosition, TabStopType, Table, TableAnchorType, TableBorders, TableCell, TableCellBorders, TableLayoutType, TableOfContents, TableProperties, TableRow, TableRowProperties, TableRowPropertiesChange, TextDirection, TextEffect, TextRun, TextWrappingSide, TextWrappingType, Textbox, ThematicBreak, UnderlineType, VerticalAlign, VerticalAlignSection, VerticalAlignTable, VerticalAnchor, VerticalMerge, VerticalMergeRevisionType, VerticalMergeType, VerticalPositionAlign, VerticalPositionRelativeFrom, WORKAROUND2, WORKAROUND3, WORKAROUND4, WidthType, WpgGroupRun, WpsShapeRun, XmlAttributeComponent, XmlComponent, YearLong, YearShort, abstractNumUniqueNumericIdGen, bookmarkUniqueNumericIdGen, concreteNumUniqueNumericIdGen, convertInchesToTwip, convertMillimetersToTwip, convertToXmlComponent, createAlignment, createBodyProperties, createBorderElement, createColumns, createDocumentGrid, createDotEmphasisMark, createEmphasisMark, createFrameProperties, createHeaderFooterReference, createHorizontalPosition, createIndent, createLineNumberType, createMathAccentCharacter, createMathBase, createMathLimitLocation, createMathNAryProperties, createMathPreSubSuperScriptProperties, createMathSubScriptElement, createMathSubScriptProperties, createMathSubSuperScriptProperties, createMathSuperScriptElement, createMathSuperScriptProperties, createOutlineLevel, createPageMargin, createPageNumberType, createPageSize, createParagraphStyle, createRunFonts, createSectionType, createShading, createSimplePos, createSpacing, createStringElement, createTabStop, createTabStopItem, createTableFloatProperties, createTableLayout, createTableLook, createTableRowHeight, createTableWidthElement, createTransformation, createUnderline, createVerticalAlign, createVerticalPosition, createWrapNone, createWrapSquare, createWrapTight, createWrapTopAndBottom, dateTimeValue, decimalNumber, docPropertiesUniqueNumericIdGen, eighthPointMeasureValue,
|
|
23183
|
+
export { AbstractNumbering, AlignmentType, AnnotationReference, Attributes, BaseXmlComponent, Body, Bookmark, BookmarkEnd, BookmarkStart, Border, BorderStyle, BuilderElement, CarriageReturn, CellMerge, CellMergeAttributes, CharacterSet, CheckBox, CheckBoxSymbolElement, CheckBoxUtil, Column, ColumnBreak, Comment, CommentRangeEnd, CommentRangeStart, CommentReference, Comments, ConcreteHyperlink, ConcreteNumbering, ContinuationSeparator, DayLong, DayShort, DeletedTableCell, DeletedTableRow, DeletedTextRun, File as Document, File, DocumentAttributeNamespaces, DocumentAttributes, DocumentBackground, DocumentBackgroundAttributes, DocumentDefaults, DocumentGridType, Drawing, DropCapType, EMPTY_OBJECT, EmphasisMarkType, EmptyElement, EndnoteIdReference, EndnoteReference, EndnoteReferenceRun, EndnoteReferenceRunAttributes, Endnotes, ExternalHyperlink, FileChild, FootNoteReferenceRunAttributes, FootNotes, Footer, FooterWrapper, FootnoteReference, FootnoteReferenceElement, FootnoteReferenceRun, FrameAnchorType, FrameWrap, GridSpan, Header, HeaderFooterReferenceType, HeaderFooterType, HeaderWrapper, HeadingLevel, HeightRule, HighlightColor, HorizontalPositionAlign, HorizontalPositionRelativeFrom, HpsMeasureElement, HyperlinkType, IgnoreIfEmptyXmlComponent, ImageRun, ImportedRootElementAttributes, ImportedXmlComponent, InitializableXmlComponent, InsertedTableCell, InsertedTableRow, InsertedTextRun, InternalHyperlink, LastRenderedPageBreak, LeaderType, Level, LevelBase, LevelForOverride, LevelFormat, LevelOverride, LevelSuffix, LineNumberRestartFormat, LineRuleType, Math$1 as Math, MathAngledBrackets, MathCurlyBrackets, MathDegree, MathDenominator, MathFraction, MathFunction, MathFunctionName, MathFunctionProperties, MathIntegral, MathLimit, MathLimitLower, MathLimitUpper, MathNumerator, MathPreSubSuperScript, MathRadical, MathRadicalProperties, MathRoundBrackets, MathRun, MathSquareBrackets, MathSubScript, MathSubSuperScript, MathSum, MathSuperScript, Media, MonthLong, MonthShort, NextAttributeComponent, NoBreakHyphen, NumberFormat, NumberProperties, NumberValueElement, NumberedItemReference, NumberedItemReferenceFormat, Numbering, OnOffElement, OverlapType, Packer, PageBorderDisplay, PageBorderOffsetFrom, PageBorderZOrder, PageBorders, PageBreak, PageBreakBefore, PageNumber, PageNumberElement, PageNumberSeparator, PageOrientation, PageReference, PageTextDirection, PageTextDirectionType, Paragraph, ParagraphProperties, ParagraphPropertiesChange, ParagraphPropertiesDefaults, ParagraphRunProperties, PatchType, PositionalTab, PositionalTabAlignment, PositionalTabLeader, PositionalTabRelativeTo, PrettifyType, RelativeHorizontalPosition, RelativeVerticalPosition, Run, RunProperties, RunPropertiesChange, RunPropertiesDefaults, SectionProperties, SectionPropertiesChange, SectionType, Separator, SequentialIdentifier, ShadingType, SimpleField, SimpleMailMergeField, SoftHyphen, SpaceType, StringContainer, StringEnumValueElement, StringValueElement, StyleForCharacter, StyleForParagraph, StyleLevel, Styles, SymbolRun, TDirection, Tab, TabStopPosition, TabStopType, Table, TableAnchorType, TableBorders, TableCell, TableCellBorders, TableLayoutType, TableOfContents, TableProperties, TableRow, TableRowProperties, TableRowPropertiesChange, TextDirection, TextEffect, TextRun, TextWrappingSide, TextWrappingType, Textbox, ThematicBreak, ThemeColor, ThemeFont, UnderlineType, VerticalAlign, VerticalAlignSection, VerticalAlignTable, VerticalAnchor, VerticalMerge, VerticalMergeRevisionType, VerticalMergeType, VerticalPositionAlign, VerticalPositionRelativeFrom, WORKAROUND2, WORKAROUND3, WORKAROUND4, WidthType, WpgGroupRun, WpsShapeRun, XmlAttributeComponent, XmlComponent, YearLong, YearShort, abstractNumUniqueNumericIdGen, bookmarkUniqueNumericIdGen, concreteNumUniqueNumericIdGen, convertInchesToTwip, convertMillimetersToTwip, convertToXmlComponent, createAlignment, createBodyProperties, createBorderElement, createColumns, createDocumentGrid, createDotEmphasisMark, createEmphasisMark, createFrameProperties, createHeaderFooterReference, createHorizontalPosition, createIndent, createLineNumberType, createMathAccentCharacter, createMathBase, createMathLimitLocation, createMathNAryProperties, createMathPreSubSuperScriptProperties, createMathSubScriptElement, createMathSubScriptProperties, createMathSubSuperScriptProperties, createMathSuperScriptElement, createMathSuperScriptProperties, createOutlineLevel, createPageMargin, createPageNumberType, createPageSize, createParagraphStyle, createRunFonts, createSectionType, createShading, createSimplePos, createSpacing, createStringElement, createTabStop, createTabStopItem, createTableFloatProperties, createTableLayout, createTableLook, createTableRowHeight, createTableWidthElement, createTransformation, createUnderline, createVerticalAlign, createVerticalPosition, createWrapNone, createWrapSquare, createWrapTight, createWrapTopAndBottom, dateTimeValue, decimalNumber, docPropertiesUniqueNumericIdGen, eighthPointMeasureValue, hashedId, hexColorValue, hpsMeasureValue, longHexNumber, measurementOrPercentValue, patchDetector, patchDocument, percentageValue, pointMeasureValue, positiveUniversalMeasureValue, sectionMarginDefaults, sectionPageSizeDefaults, shortHexNumber, signedHpsMeasureValue, signedTwipsMeasureValue, twipsMeasureValue, uCharHexNumber, uniqueId, uniqueNumericIdCreator, uniqueUuid, universalMeasureValue, unsignedDecimalNumber };
|