docx 9.5.0 → 9.5.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/dist/index.cjs +60 -60
- package/dist/index.iife.js +60 -60
- package/dist/index.mjs +60 -60
- package/dist/index.umd.cjs +60 -60
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -10125,8 +10125,17 @@ class RunProperties extends IgnoreIfEmptyXmlComponent {
|
|
|
10125
10125
|
if (!options) {
|
|
10126
10126
|
return;
|
|
10127
10127
|
}
|
|
10128
|
-
if (options.
|
|
10129
|
-
this.push(new
|
|
10128
|
+
if (options.style) {
|
|
10129
|
+
this.push(new StringValueElement("w:rStyle", options.style));
|
|
10130
|
+
}
|
|
10131
|
+
if (options.font) {
|
|
10132
|
+
if (typeof options.font === "string") {
|
|
10133
|
+
this.push(new RunFonts(options.font));
|
|
10134
|
+
} else if ("name" in options.font) {
|
|
10135
|
+
this.push(new RunFonts(options.font.name, options.font.hint));
|
|
10136
|
+
} else {
|
|
10137
|
+
this.push(new RunFonts(options.font));
|
|
10138
|
+
}
|
|
10130
10139
|
}
|
|
10131
10140
|
if (options.bold !== void 0) {
|
|
10132
10141
|
this.push(new OnOffElement("w:b", options.bold));
|
|
@@ -10140,18 +10149,41 @@ class RunProperties extends IgnoreIfEmptyXmlComponent {
|
|
|
10140
10149
|
if (options.italicsComplexScript === void 0 && options.italics !== void 0 || options.italicsComplexScript) {
|
|
10141
10150
|
this.push(new OnOffElement("w:iCs", (_b = options.italicsComplexScript) != null ? _b : options.italics));
|
|
10142
10151
|
}
|
|
10143
|
-
if (options.
|
|
10144
|
-
this.push(new
|
|
10152
|
+
if (options.smallCaps !== void 0) {
|
|
10153
|
+
this.push(new OnOffElement("w:smallCaps", options.smallCaps));
|
|
10154
|
+
} else if (options.allCaps !== void 0) {
|
|
10155
|
+
this.push(new OnOffElement("w:caps", options.allCaps));
|
|
10145
10156
|
}
|
|
10146
|
-
if (options.
|
|
10147
|
-
this.push(new
|
|
10157
|
+
if (options.strike !== void 0) {
|
|
10158
|
+
this.push(new OnOffElement("w:strike", options.strike));
|
|
10148
10159
|
}
|
|
10149
|
-
if (options.
|
|
10150
|
-
this.push(new
|
|
10160
|
+
if (options.doubleStrike !== void 0) {
|
|
10161
|
+
this.push(new OnOffElement("w:dstrike", options.doubleStrike));
|
|
10162
|
+
}
|
|
10163
|
+
if (options.emboss !== void 0) {
|
|
10164
|
+
this.push(new OnOffElement("w:emboss", options.emboss));
|
|
10165
|
+
}
|
|
10166
|
+
if (options.imprint !== void 0) {
|
|
10167
|
+
this.push(new OnOffElement("w:imprint", options.imprint));
|
|
10168
|
+
}
|
|
10169
|
+
if (options.noProof !== void 0) {
|
|
10170
|
+
this.push(new OnOffElement("w:noProof", options.noProof));
|
|
10171
|
+
}
|
|
10172
|
+
if (options.snapToGrid !== void 0) {
|
|
10173
|
+
this.push(new OnOffElement("w:snapToGrid", options.snapToGrid));
|
|
10174
|
+
}
|
|
10175
|
+
if (options.vanish) {
|
|
10176
|
+
this.push(new OnOffElement("w:vanish", options.vanish));
|
|
10151
10177
|
}
|
|
10152
10178
|
if (options.color) {
|
|
10153
10179
|
this.push(new Color(options.color));
|
|
10154
10180
|
}
|
|
10181
|
+
if (options.characterSpacing) {
|
|
10182
|
+
this.push(new CharacterSpacing(options.characterSpacing));
|
|
10183
|
+
}
|
|
10184
|
+
if (options.scale !== void 0) {
|
|
10185
|
+
this.push(new NumberValueElement("w:w", options.scale));
|
|
10186
|
+
}
|
|
10155
10187
|
if (options.kern) {
|
|
10156
10188
|
this.push(new HpsMeasureElement("w:kern", options.kern));
|
|
10157
10189
|
}
|
|
@@ -10165,38 +10197,6 @@ class RunProperties extends IgnoreIfEmptyXmlComponent {
|
|
|
10165
10197
|
if (szCs) {
|
|
10166
10198
|
this.push(new HpsMeasureElement("w:szCs", szCs));
|
|
10167
10199
|
}
|
|
10168
|
-
if (options.rightToLeft !== void 0) {
|
|
10169
|
-
this.push(new OnOffElement("w:rtl", options.rightToLeft));
|
|
10170
|
-
}
|
|
10171
|
-
if (options.smallCaps !== void 0) {
|
|
10172
|
-
this.push(new OnOffElement("w:smallCaps", options.smallCaps));
|
|
10173
|
-
} else if (options.allCaps !== void 0) {
|
|
10174
|
-
this.push(new OnOffElement("w:caps", options.allCaps));
|
|
10175
|
-
}
|
|
10176
|
-
if (options.strike !== void 0) {
|
|
10177
|
-
this.push(new OnOffElement("w:strike", options.strike));
|
|
10178
|
-
}
|
|
10179
|
-
if (options.doubleStrike !== void 0) {
|
|
10180
|
-
this.push(new OnOffElement("w:dstrike", options.doubleStrike));
|
|
10181
|
-
}
|
|
10182
|
-
if (options.subScript) {
|
|
10183
|
-
this.push(new SubScript());
|
|
10184
|
-
}
|
|
10185
|
-
if (options.superScript) {
|
|
10186
|
-
this.push(new SuperScript());
|
|
10187
|
-
}
|
|
10188
|
-
if (options.style) {
|
|
10189
|
-
this.push(new StringValueElement("w:rStyle", options.style));
|
|
10190
|
-
}
|
|
10191
|
-
if (options.font) {
|
|
10192
|
-
if (typeof options.font === "string") {
|
|
10193
|
-
this.push(new RunFonts(options.font));
|
|
10194
|
-
} else if ("name" in options.font) {
|
|
10195
|
-
this.push(new RunFonts(options.font.name, options.font.hint));
|
|
10196
|
-
} else {
|
|
10197
|
-
this.push(new RunFonts(options.font));
|
|
10198
|
-
}
|
|
10199
|
-
}
|
|
10200
10200
|
if (options.highlight) {
|
|
10201
10201
|
this.push(new Highlight(options.highlight));
|
|
10202
10202
|
}
|
|
@@ -10204,42 +10204,42 @@ class RunProperties extends IgnoreIfEmptyXmlComponent {
|
|
|
10204
10204
|
if (highlightCs) {
|
|
10205
10205
|
this.push(new HighlightComplexScript(highlightCs));
|
|
10206
10206
|
}
|
|
10207
|
-
if (options.
|
|
10208
|
-
this.push(new
|
|
10207
|
+
if (options.underline) {
|
|
10208
|
+
this.push(new Underline(options.underline.type, options.underline.color));
|
|
10209
10209
|
}
|
|
10210
|
-
if (options.
|
|
10211
|
-
this.push(new
|
|
10210
|
+
if (options.effect) {
|
|
10211
|
+
this.push(new StringValueElement("w:effect", options.effect));
|
|
10212
10212
|
}
|
|
10213
|
-
if (options.
|
|
10214
|
-
this.push(new
|
|
10213
|
+
if (options.border) {
|
|
10214
|
+
this.push(new BorderElement("w:bdr", options.border));
|
|
10215
10215
|
}
|
|
10216
10216
|
if (options.shading) {
|
|
10217
10217
|
this.push(new Shading(options.shading));
|
|
10218
10218
|
}
|
|
10219
|
-
if (options.
|
|
10220
|
-
this.push(new
|
|
10221
|
-
}
|
|
10222
|
-
if (options.border) {
|
|
10223
|
-
this.push(new BorderElement("w:bdr", options.border));
|
|
10224
|
-
}
|
|
10225
|
-
if (options.snapToGrid !== void 0) {
|
|
10226
|
-
this.push(new OnOffElement("w:snapToGrid", options.snapToGrid));
|
|
10219
|
+
if (options.subScript) {
|
|
10220
|
+
this.push(new SubScript());
|
|
10227
10221
|
}
|
|
10228
|
-
if (options.
|
|
10229
|
-
this.push(new
|
|
10222
|
+
if (options.superScript) {
|
|
10223
|
+
this.push(new SuperScript());
|
|
10230
10224
|
}
|
|
10231
|
-
if (options.
|
|
10232
|
-
this.push(new OnOffElement("w:
|
|
10225
|
+
if (options.rightToLeft !== void 0) {
|
|
10226
|
+
this.push(new OnOffElement("w:rtl", options.rightToLeft));
|
|
10233
10227
|
}
|
|
10234
|
-
if (options.
|
|
10235
|
-
this.push(new
|
|
10228
|
+
if (options.emphasisMark) {
|
|
10229
|
+
this.push(new EmphasisMark(options.emphasisMark.type));
|
|
10236
10230
|
}
|
|
10237
10231
|
if (options.language) {
|
|
10238
10232
|
this.push(createLanguageComponent(options.language));
|
|
10239
10233
|
}
|
|
10234
|
+
if (options.specVanish) {
|
|
10235
|
+
this.push(new OnOffElement("w:specVanish", options.vanish));
|
|
10236
|
+
}
|
|
10240
10237
|
if (options.math) {
|
|
10241
10238
|
this.push(new OnOffElement("w:oMath", options.math));
|
|
10242
10239
|
}
|
|
10240
|
+
if (options.revision) {
|
|
10241
|
+
this.push(new RunPropertiesChange(options.revision));
|
|
10242
|
+
}
|
|
10243
10243
|
}
|
|
10244
10244
|
push(item) {
|
|
10245
10245
|
this.root.push(item);
|
package/dist/index.iife.js
CHANGED
|
@@ -10125,8 +10125,17 @@ var __async = (__this, __arguments, generator) => {
|
|
|
10125
10125
|
if (!options) {
|
|
10126
10126
|
return;
|
|
10127
10127
|
}
|
|
10128
|
-
if (options.
|
|
10129
|
-
this.push(new
|
|
10128
|
+
if (options.style) {
|
|
10129
|
+
this.push(new StringValueElement("w:rStyle", options.style));
|
|
10130
|
+
}
|
|
10131
|
+
if (options.font) {
|
|
10132
|
+
if (typeof options.font === "string") {
|
|
10133
|
+
this.push(new RunFonts(options.font));
|
|
10134
|
+
} else if ("name" in options.font) {
|
|
10135
|
+
this.push(new RunFonts(options.font.name, options.font.hint));
|
|
10136
|
+
} else {
|
|
10137
|
+
this.push(new RunFonts(options.font));
|
|
10138
|
+
}
|
|
10130
10139
|
}
|
|
10131
10140
|
if (options.bold !== void 0) {
|
|
10132
10141
|
this.push(new OnOffElement("w:b", options.bold));
|
|
@@ -10140,18 +10149,41 @@ var __async = (__this, __arguments, generator) => {
|
|
|
10140
10149
|
if (options.italicsComplexScript === void 0 && options.italics !== void 0 || options.italicsComplexScript) {
|
|
10141
10150
|
this.push(new OnOffElement("w:iCs", (_b = options.italicsComplexScript) != null ? _b : options.italics));
|
|
10142
10151
|
}
|
|
10143
|
-
if (options.
|
|
10144
|
-
this.push(new
|
|
10152
|
+
if (options.smallCaps !== void 0) {
|
|
10153
|
+
this.push(new OnOffElement("w:smallCaps", options.smallCaps));
|
|
10154
|
+
} else if (options.allCaps !== void 0) {
|
|
10155
|
+
this.push(new OnOffElement("w:caps", options.allCaps));
|
|
10145
10156
|
}
|
|
10146
|
-
if (options.
|
|
10147
|
-
this.push(new
|
|
10157
|
+
if (options.strike !== void 0) {
|
|
10158
|
+
this.push(new OnOffElement("w:strike", options.strike));
|
|
10148
10159
|
}
|
|
10149
|
-
if (options.
|
|
10150
|
-
this.push(new
|
|
10160
|
+
if (options.doubleStrike !== void 0) {
|
|
10161
|
+
this.push(new OnOffElement("w:dstrike", options.doubleStrike));
|
|
10162
|
+
}
|
|
10163
|
+
if (options.emboss !== void 0) {
|
|
10164
|
+
this.push(new OnOffElement("w:emboss", options.emboss));
|
|
10165
|
+
}
|
|
10166
|
+
if (options.imprint !== void 0) {
|
|
10167
|
+
this.push(new OnOffElement("w:imprint", options.imprint));
|
|
10168
|
+
}
|
|
10169
|
+
if (options.noProof !== void 0) {
|
|
10170
|
+
this.push(new OnOffElement("w:noProof", options.noProof));
|
|
10171
|
+
}
|
|
10172
|
+
if (options.snapToGrid !== void 0) {
|
|
10173
|
+
this.push(new OnOffElement("w:snapToGrid", options.snapToGrid));
|
|
10174
|
+
}
|
|
10175
|
+
if (options.vanish) {
|
|
10176
|
+
this.push(new OnOffElement("w:vanish", options.vanish));
|
|
10151
10177
|
}
|
|
10152
10178
|
if (options.color) {
|
|
10153
10179
|
this.push(new Color(options.color));
|
|
10154
10180
|
}
|
|
10181
|
+
if (options.characterSpacing) {
|
|
10182
|
+
this.push(new CharacterSpacing(options.characterSpacing));
|
|
10183
|
+
}
|
|
10184
|
+
if (options.scale !== void 0) {
|
|
10185
|
+
this.push(new NumberValueElement("w:w", options.scale));
|
|
10186
|
+
}
|
|
10155
10187
|
if (options.kern) {
|
|
10156
10188
|
this.push(new HpsMeasureElement("w:kern", options.kern));
|
|
10157
10189
|
}
|
|
@@ -10165,38 +10197,6 @@ var __async = (__this, __arguments, generator) => {
|
|
|
10165
10197
|
if (szCs) {
|
|
10166
10198
|
this.push(new HpsMeasureElement("w:szCs", szCs));
|
|
10167
10199
|
}
|
|
10168
|
-
if (options.rightToLeft !== void 0) {
|
|
10169
|
-
this.push(new OnOffElement("w:rtl", options.rightToLeft));
|
|
10170
|
-
}
|
|
10171
|
-
if (options.smallCaps !== void 0) {
|
|
10172
|
-
this.push(new OnOffElement("w:smallCaps", options.smallCaps));
|
|
10173
|
-
} else if (options.allCaps !== void 0) {
|
|
10174
|
-
this.push(new OnOffElement("w:caps", options.allCaps));
|
|
10175
|
-
}
|
|
10176
|
-
if (options.strike !== void 0) {
|
|
10177
|
-
this.push(new OnOffElement("w:strike", options.strike));
|
|
10178
|
-
}
|
|
10179
|
-
if (options.doubleStrike !== void 0) {
|
|
10180
|
-
this.push(new OnOffElement("w:dstrike", options.doubleStrike));
|
|
10181
|
-
}
|
|
10182
|
-
if (options.subScript) {
|
|
10183
|
-
this.push(new SubScript());
|
|
10184
|
-
}
|
|
10185
|
-
if (options.superScript) {
|
|
10186
|
-
this.push(new SuperScript());
|
|
10187
|
-
}
|
|
10188
|
-
if (options.style) {
|
|
10189
|
-
this.push(new StringValueElement("w:rStyle", options.style));
|
|
10190
|
-
}
|
|
10191
|
-
if (options.font) {
|
|
10192
|
-
if (typeof options.font === "string") {
|
|
10193
|
-
this.push(new RunFonts(options.font));
|
|
10194
|
-
} else if ("name" in options.font) {
|
|
10195
|
-
this.push(new RunFonts(options.font.name, options.font.hint));
|
|
10196
|
-
} else {
|
|
10197
|
-
this.push(new RunFonts(options.font));
|
|
10198
|
-
}
|
|
10199
|
-
}
|
|
10200
10200
|
if (options.highlight) {
|
|
10201
10201
|
this.push(new Highlight(options.highlight));
|
|
10202
10202
|
}
|
|
@@ -10204,42 +10204,42 @@ var __async = (__this, __arguments, generator) => {
|
|
|
10204
10204
|
if (highlightCs) {
|
|
10205
10205
|
this.push(new HighlightComplexScript(highlightCs));
|
|
10206
10206
|
}
|
|
10207
|
-
if (options.
|
|
10208
|
-
this.push(new
|
|
10207
|
+
if (options.underline) {
|
|
10208
|
+
this.push(new Underline(options.underline.type, options.underline.color));
|
|
10209
10209
|
}
|
|
10210
|
-
if (options.
|
|
10211
|
-
this.push(new
|
|
10210
|
+
if (options.effect) {
|
|
10211
|
+
this.push(new StringValueElement("w:effect", options.effect));
|
|
10212
10212
|
}
|
|
10213
|
-
if (options.
|
|
10214
|
-
this.push(new
|
|
10213
|
+
if (options.border) {
|
|
10214
|
+
this.push(new BorderElement("w:bdr", options.border));
|
|
10215
10215
|
}
|
|
10216
10216
|
if (options.shading) {
|
|
10217
10217
|
this.push(new Shading(options.shading));
|
|
10218
10218
|
}
|
|
10219
|
-
if (options.
|
|
10220
|
-
this.push(new
|
|
10221
|
-
}
|
|
10222
|
-
if (options.border) {
|
|
10223
|
-
this.push(new BorderElement("w:bdr", options.border));
|
|
10224
|
-
}
|
|
10225
|
-
if (options.snapToGrid !== void 0) {
|
|
10226
|
-
this.push(new OnOffElement("w:snapToGrid", options.snapToGrid));
|
|
10219
|
+
if (options.subScript) {
|
|
10220
|
+
this.push(new SubScript());
|
|
10227
10221
|
}
|
|
10228
|
-
if (options.
|
|
10229
|
-
this.push(new
|
|
10222
|
+
if (options.superScript) {
|
|
10223
|
+
this.push(new SuperScript());
|
|
10230
10224
|
}
|
|
10231
|
-
if (options.
|
|
10232
|
-
this.push(new OnOffElement("w:
|
|
10225
|
+
if (options.rightToLeft !== void 0) {
|
|
10226
|
+
this.push(new OnOffElement("w:rtl", options.rightToLeft));
|
|
10233
10227
|
}
|
|
10234
|
-
if (options.
|
|
10235
|
-
this.push(new
|
|
10228
|
+
if (options.emphasisMark) {
|
|
10229
|
+
this.push(new EmphasisMark(options.emphasisMark.type));
|
|
10236
10230
|
}
|
|
10237
10231
|
if (options.language) {
|
|
10238
10232
|
this.push(createLanguageComponent(options.language));
|
|
10239
10233
|
}
|
|
10234
|
+
if (options.specVanish) {
|
|
10235
|
+
this.push(new OnOffElement("w:specVanish", options.vanish));
|
|
10236
|
+
}
|
|
10240
10237
|
if (options.math) {
|
|
10241
10238
|
this.push(new OnOffElement("w:oMath", options.math));
|
|
10242
10239
|
}
|
|
10240
|
+
if (options.revision) {
|
|
10241
|
+
this.push(new RunPropertiesChange(options.revision));
|
|
10242
|
+
}
|
|
10243
10243
|
}
|
|
10244
10244
|
push(item) {
|
|
10245
10245
|
this.root.push(item);
|
package/dist/index.mjs
CHANGED
|
@@ -10123,8 +10123,17 @@ class RunProperties extends IgnoreIfEmptyXmlComponent {
|
|
|
10123
10123
|
if (!options) {
|
|
10124
10124
|
return;
|
|
10125
10125
|
}
|
|
10126
|
-
if (options.
|
|
10127
|
-
this.push(new
|
|
10126
|
+
if (options.style) {
|
|
10127
|
+
this.push(new StringValueElement("w:rStyle", options.style));
|
|
10128
|
+
}
|
|
10129
|
+
if (options.font) {
|
|
10130
|
+
if (typeof options.font === "string") {
|
|
10131
|
+
this.push(new RunFonts(options.font));
|
|
10132
|
+
} else if ("name" in options.font) {
|
|
10133
|
+
this.push(new RunFonts(options.font.name, options.font.hint));
|
|
10134
|
+
} else {
|
|
10135
|
+
this.push(new RunFonts(options.font));
|
|
10136
|
+
}
|
|
10128
10137
|
}
|
|
10129
10138
|
if (options.bold !== void 0) {
|
|
10130
10139
|
this.push(new OnOffElement("w:b", options.bold));
|
|
@@ -10138,18 +10147,41 @@ class RunProperties extends IgnoreIfEmptyXmlComponent {
|
|
|
10138
10147
|
if (options.italicsComplexScript === void 0 && options.italics !== void 0 || options.italicsComplexScript) {
|
|
10139
10148
|
this.push(new OnOffElement("w:iCs", (_b = options.italicsComplexScript) != null ? _b : options.italics));
|
|
10140
10149
|
}
|
|
10141
|
-
if (options.
|
|
10142
|
-
this.push(new
|
|
10150
|
+
if (options.smallCaps !== void 0) {
|
|
10151
|
+
this.push(new OnOffElement("w:smallCaps", options.smallCaps));
|
|
10152
|
+
} else if (options.allCaps !== void 0) {
|
|
10153
|
+
this.push(new OnOffElement("w:caps", options.allCaps));
|
|
10143
10154
|
}
|
|
10144
|
-
if (options.
|
|
10145
|
-
this.push(new
|
|
10155
|
+
if (options.strike !== void 0) {
|
|
10156
|
+
this.push(new OnOffElement("w:strike", options.strike));
|
|
10146
10157
|
}
|
|
10147
|
-
if (options.
|
|
10148
|
-
this.push(new
|
|
10158
|
+
if (options.doubleStrike !== void 0) {
|
|
10159
|
+
this.push(new OnOffElement("w:dstrike", options.doubleStrike));
|
|
10160
|
+
}
|
|
10161
|
+
if (options.emboss !== void 0) {
|
|
10162
|
+
this.push(new OnOffElement("w:emboss", options.emboss));
|
|
10163
|
+
}
|
|
10164
|
+
if (options.imprint !== void 0) {
|
|
10165
|
+
this.push(new OnOffElement("w:imprint", options.imprint));
|
|
10166
|
+
}
|
|
10167
|
+
if (options.noProof !== void 0) {
|
|
10168
|
+
this.push(new OnOffElement("w:noProof", options.noProof));
|
|
10169
|
+
}
|
|
10170
|
+
if (options.snapToGrid !== void 0) {
|
|
10171
|
+
this.push(new OnOffElement("w:snapToGrid", options.snapToGrid));
|
|
10172
|
+
}
|
|
10173
|
+
if (options.vanish) {
|
|
10174
|
+
this.push(new OnOffElement("w:vanish", options.vanish));
|
|
10149
10175
|
}
|
|
10150
10176
|
if (options.color) {
|
|
10151
10177
|
this.push(new Color(options.color));
|
|
10152
10178
|
}
|
|
10179
|
+
if (options.characterSpacing) {
|
|
10180
|
+
this.push(new CharacterSpacing(options.characterSpacing));
|
|
10181
|
+
}
|
|
10182
|
+
if (options.scale !== void 0) {
|
|
10183
|
+
this.push(new NumberValueElement("w:w", options.scale));
|
|
10184
|
+
}
|
|
10153
10185
|
if (options.kern) {
|
|
10154
10186
|
this.push(new HpsMeasureElement("w:kern", options.kern));
|
|
10155
10187
|
}
|
|
@@ -10163,38 +10195,6 @@ class RunProperties extends IgnoreIfEmptyXmlComponent {
|
|
|
10163
10195
|
if (szCs) {
|
|
10164
10196
|
this.push(new HpsMeasureElement("w:szCs", szCs));
|
|
10165
10197
|
}
|
|
10166
|
-
if (options.rightToLeft !== void 0) {
|
|
10167
|
-
this.push(new OnOffElement("w:rtl", options.rightToLeft));
|
|
10168
|
-
}
|
|
10169
|
-
if (options.smallCaps !== void 0) {
|
|
10170
|
-
this.push(new OnOffElement("w:smallCaps", options.smallCaps));
|
|
10171
|
-
} else if (options.allCaps !== void 0) {
|
|
10172
|
-
this.push(new OnOffElement("w:caps", options.allCaps));
|
|
10173
|
-
}
|
|
10174
|
-
if (options.strike !== void 0) {
|
|
10175
|
-
this.push(new OnOffElement("w:strike", options.strike));
|
|
10176
|
-
}
|
|
10177
|
-
if (options.doubleStrike !== void 0) {
|
|
10178
|
-
this.push(new OnOffElement("w:dstrike", options.doubleStrike));
|
|
10179
|
-
}
|
|
10180
|
-
if (options.subScript) {
|
|
10181
|
-
this.push(new SubScript());
|
|
10182
|
-
}
|
|
10183
|
-
if (options.superScript) {
|
|
10184
|
-
this.push(new SuperScript());
|
|
10185
|
-
}
|
|
10186
|
-
if (options.style) {
|
|
10187
|
-
this.push(new StringValueElement("w:rStyle", options.style));
|
|
10188
|
-
}
|
|
10189
|
-
if (options.font) {
|
|
10190
|
-
if (typeof options.font === "string") {
|
|
10191
|
-
this.push(new RunFonts(options.font));
|
|
10192
|
-
} else if ("name" in options.font) {
|
|
10193
|
-
this.push(new RunFonts(options.font.name, options.font.hint));
|
|
10194
|
-
} else {
|
|
10195
|
-
this.push(new RunFonts(options.font));
|
|
10196
|
-
}
|
|
10197
|
-
}
|
|
10198
10198
|
if (options.highlight) {
|
|
10199
10199
|
this.push(new Highlight(options.highlight));
|
|
10200
10200
|
}
|
|
@@ -10202,42 +10202,42 @@ class RunProperties extends IgnoreIfEmptyXmlComponent {
|
|
|
10202
10202
|
if (highlightCs) {
|
|
10203
10203
|
this.push(new HighlightComplexScript(highlightCs));
|
|
10204
10204
|
}
|
|
10205
|
-
if (options.
|
|
10206
|
-
this.push(new
|
|
10205
|
+
if (options.underline) {
|
|
10206
|
+
this.push(new Underline(options.underline.type, options.underline.color));
|
|
10207
10207
|
}
|
|
10208
|
-
if (options.
|
|
10209
|
-
this.push(new
|
|
10208
|
+
if (options.effect) {
|
|
10209
|
+
this.push(new StringValueElement("w:effect", options.effect));
|
|
10210
10210
|
}
|
|
10211
|
-
if (options.
|
|
10212
|
-
this.push(new
|
|
10211
|
+
if (options.border) {
|
|
10212
|
+
this.push(new BorderElement("w:bdr", options.border));
|
|
10213
10213
|
}
|
|
10214
10214
|
if (options.shading) {
|
|
10215
10215
|
this.push(new Shading(options.shading));
|
|
10216
10216
|
}
|
|
10217
|
-
if (options.
|
|
10218
|
-
this.push(new
|
|
10219
|
-
}
|
|
10220
|
-
if (options.border) {
|
|
10221
|
-
this.push(new BorderElement("w:bdr", options.border));
|
|
10222
|
-
}
|
|
10223
|
-
if (options.snapToGrid !== void 0) {
|
|
10224
|
-
this.push(new OnOffElement("w:snapToGrid", options.snapToGrid));
|
|
10217
|
+
if (options.subScript) {
|
|
10218
|
+
this.push(new SubScript());
|
|
10225
10219
|
}
|
|
10226
|
-
if (options.
|
|
10227
|
-
this.push(new
|
|
10220
|
+
if (options.superScript) {
|
|
10221
|
+
this.push(new SuperScript());
|
|
10228
10222
|
}
|
|
10229
|
-
if (options.
|
|
10230
|
-
this.push(new OnOffElement("w:
|
|
10223
|
+
if (options.rightToLeft !== void 0) {
|
|
10224
|
+
this.push(new OnOffElement("w:rtl", options.rightToLeft));
|
|
10231
10225
|
}
|
|
10232
|
-
if (options.
|
|
10233
|
-
this.push(new
|
|
10226
|
+
if (options.emphasisMark) {
|
|
10227
|
+
this.push(new EmphasisMark(options.emphasisMark.type));
|
|
10234
10228
|
}
|
|
10235
10229
|
if (options.language) {
|
|
10236
10230
|
this.push(createLanguageComponent(options.language));
|
|
10237
10231
|
}
|
|
10232
|
+
if (options.specVanish) {
|
|
10233
|
+
this.push(new OnOffElement("w:specVanish", options.vanish));
|
|
10234
|
+
}
|
|
10238
10235
|
if (options.math) {
|
|
10239
10236
|
this.push(new OnOffElement("w:oMath", options.math));
|
|
10240
10237
|
}
|
|
10238
|
+
if (options.revision) {
|
|
10239
|
+
this.push(new RunPropertiesChange(options.revision));
|
|
10240
|
+
}
|
|
10241
10241
|
}
|
|
10242
10242
|
push(item) {
|
|
10243
10243
|
this.root.push(item);
|
package/dist/index.umd.cjs
CHANGED
|
@@ -10127,8 +10127,17 @@ var __async = (__this, __arguments, generator) => {
|
|
|
10127
10127
|
if (!options) {
|
|
10128
10128
|
return;
|
|
10129
10129
|
}
|
|
10130
|
-
if (options.
|
|
10131
|
-
this.push(new
|
|
10130
|
+
if (options.style) {
|
|
10131
|
+
this.push(new StringValueElement("w:rStyle", options.style));
|
|
10132
|
+
}
|
|
10133
|
+
if (options.font) {
|
|
10134
|
+
if (typeof options.font === "string") {
|
|
10135
|
+
this.push(new RunFonts(options.font));
|
|
10136
|
+
} else if ("name" in options.font) {
|
|
10137
|
+
this.push(new RunFonts(options.font.name, options.font.hint));
|
|
10138
|
+
} else {
|
|
10139
|
+
this.push(new RunFonts(options.font));
|
|
10140
|
+
}
|
|
10132
10141
|
}
|
|
10133
10142
|
if (options.bold !== void 0) {
|
|
10134
10143
|
this.push(new OnOffElement("w:b", options.bold));
|
|
@@ -10142,18 +10151,41 @@ var __async = (__this, __arguments, generator) => {
|
|
|
10142
10151
|
if (options.italicsComplexScript === void 0 && options.italics !== void 0 || options.italicsComplexScript) {
|
|
10143
10152
|
this.push(new OnOffElement("w:iCs", (_b = options.italicsComplexScript) != null ? _b : options.italics));
|
|
10144
10153
|
}
|
|
10145
|
-
if (options.
|
|
10146
|
-
this.push(new
|
|
10154
|
+
if (options.smallCaps !== void 0) {
|
|
10155
|
+
this.push(new OnOffElement("w:smallCaps", options.smallCaps));
|
|
10156
|
+
} else if (options.allCaps !== void 0) {
|
|
10157
|
+
this.push(new OnOffElement("w:caps", options.allCaps));
|
|
10147
10158
|
}
|
|
10148
|
-
if (options.
|
|
10149
|
-
this.push(new
|
|
10159
|
+
if (options.strike !== void 0) {
|
|
10160
|
+
this.push(new OnOffElement("w:strike", options.strike));
|
|
10150
10161
|
}
|
|
10151
|
-
if (options.
|
|
10152
|
-
this.push(new
|
|
10162
|
+
if (options.doubleStrike !== void 0) {
|
|
10163
|
+
this.push(new OnOffElement("w:dstrike", options.doubleStrike));
|
|
10164
|
+
}
|
|
10165
|
+
if (options.emboss !== void 0) {
|
|
10166
|
+
this.push(new OnOffElement("w:emboss", options.emboss));
|
|
10167
|
+
}
|
|
10168
|
+
if (options.imprint !== void 0) {
|
|
10169
|
+
this.push(new OnOffElement("w:imprint", options.imprint));
|
|
10170
|
+
}
|
|
10171
|
+
if (options.noProof !== void 0) {
|
|
10172
|
+
this.push(new OnOffElement("w:noProof", options.noProof));
|
|
10173
|
+
}
|
|
10174
|
+
if (options.snapToGrid !== void 0) {
|
|
10175
|
+
this.push(new OnOffElement("w:snapToGrid", options.snapToGrid));
|
|
10176
|
+
}
|
|
10177
|
+
if (options.vanish) {
|
|
10178
|
+
this.push(new OnOffElement("w:vanish", options.vanish));
|
|
10153
10179
|
}
|
|
10154
10180
|
if (options.color) {
|
|
10155
10181
|
this.push(new Color(options.color));
|
|
10156
10182
|
}
|
|
10183
|
+
if (options.characterSpacing) {
|
|
10184
|
+
this.push(new CharacterSpacing(options.characterSpacing));
|
|
10185
|
+
}
|
|
10186
|
+
if (options.scale !== void 0) {
|
|
10187
|
+
this.push(new NumberValueElement("w:w", options.scale));
|
|
10188
|
+
}
|
|
10157
10189
|
if (options.kern) {
|
|
10158
10190
|
this.push(new HpsMeasureElement("w:kern", options.kern));
|
|
10159
10191
|
}
|
|
@@ -10167,38 +10199,6 @@ var __async = (__this, __arguments, generator) => {
|
|
|
10167
10199
|
if (szCs) {
|
|
10168
10200
|
this.push(new HpsMeasureElement("w:szCs", szCs));
|
|
10169
10201
|
}
|
|
10170
|
-
if (options.rightToLeft !== void 0) {
|
|
10171
|
-
this.push(new OnOffElement("w:rtl", options.rightToLeft));
|
|
10172
|
-
}
|
|
10173
|
-
if (options.smallCaps !== void 0) {
|
|
10174
|
-
this.push(new OnOffElement("w:smallCaps", options.smallCaps));
|
|
10175
|
-
} else if (options.allCaps !== void 0) {
|
|
10176
|
-
this.push(new OnOffElement("w:caps", options.allCaps));
|
|
10177
|
-
}
|
|
10178
|
-
if (options.strike !== void 0) {
|
|
10179
|
-
this.push(new OnOffElement("w:strike", options.strike));
|
|
10180
|
-
}
|
|
10181
|
-
if (options.doubleStrike !== void 0) {
|
|
10182
|
-
this.push(new OnOffElement("w:dstrike", options.doubleStrike));
|
|
10183
|
-
}
|
|
10184
|
-
if (options.subScript) {
|
|
10185
|
-
this.push(new SubScript());
|
|
10186
|
-
}
|
|
10187
|
-
if (options.superScript) {
|
|
10188
|
-
this.push(new SuperScript());
|
|
10189
|
-
}
|
|
10190
|
-
if (options.style) {
|
|
10191
|
-
this.push(new StringValueElement("w:rStyle", options.style));
|
|
10192
|
-
}
|
|
10193
|
-
if (options.font) {
|
|
10194
|
-
if (typeof options.font === "string") {
|
|
10195
|
-
this.push(new RunFonts(options.font));
|
|
10196
|
-
} else if ("name" in options.font) {
|
|
10197
|
-
this.push(new RunFonts(options.font.name, options.font.hint));
|
|
10198
|
-
} else {
|
|
10199
|
-
this.push(new RunFonts(options.font));
|
|
10200
|
-
}
|
|
10201
|
-
}
|
|
10202
10202
|
if (options.highlight) {
|
|
10203
10203
|
this.push(new Highlight(options.highlight));
|
|
10204
10204
|
}
|
|
@@ -10206,42 +10206,42 @@ var __async = (__this, __arguments, generator) => {
|
|
|
10206
10206
|
if (highlightCs) {
|
|
10207
10207
|
this.push(new HighlightComplexScript(highlightCs));
|
|
10208
10208
|
}
|
|
10209
|
-
if (options.
|
|
10210
|
-
this.push(new
|
|
10209
|
+
if (options.underline) {
|
|
10210
|
+
this.push(new Underline(options.underline.type, options.underline.color));
|
|
10211
10211
|
}
|
|
10212
|
-
if (options.
|
|
10213
|
-
this.push(new
|
|
10212
|
+
if (options.effect) {
|
|
10213
|
+
this.push(new StringValueElement("w:effect", options.effect));
|
|
10214
10214
|
}
|
|
10215
|
-
if (options.
|
|
10216
|
-
this.push(new
|
|
10215
|
+
if (options.border) {
|
|
10216
|
+
this.push(new BorderElement("w:bdr", options.border));
|
|
10217
10217
|
}
|
|
10218
10218
|
if (options.shading) {
|
|
10219
10219
|
this.push(new Shading(options.shading));
|
|
10220
10220
|
}
|
|
10221
|
-
if (options.
|
|
10222
|
-
this.push(new
|
|
10223
|
-
}
|
|
10224
|
-
if (options.border) {
|
|
10225
|
-
this.push(new BorderElement("w:bdr", options.border));
|
|
10226
|
-
}
|
|
10227
|
-
if (options.snapToGrid !== void 0) {
|
|
10228
|
-
this.push(new OnOffElement("w:snapToGrid", options.snapToGrid));
|
|
10221
|
+
if (options.subScript) {
|
|
10222
|
+
this.push(new SubScript());
|
|
10229
10223
|
}
|
|
10230
|
-
if (options.
|
|
10231
|
-
this.push(new
|
|
10224
|
+
if (options.superScript) {
|
|
10225
|
+
this.push(new SuperScript());
|
|
10232
10226
|
}
|
|
10233
|
-
if (options.
|
|
10234
|
-
this.push(new OnOffElement("w:
|
|
10227
|
+
if (options.rightToLeft !== void 0) {
|
|
10228
|
+
this.push(new OnOffElement("w:rtl", options.rightToLeft));
|
|
10235
10229
|
}
|
|
10236
|
-
if (options.
|
|
10237
|
-
this.push(new
|
|
10230
|
+
if (options.emphasisMark) {
|
|
10231
|
+
this.push(new EmphasisMark(options.emphasisMark.type));
|
|
10238
10232
|
}
|
|
10239
10233
|
if (options.language) {
|
|
10240
10234
|
this.push(createLanguageComponent(options.language));
|
|
10241
10235
|
}
|
|
10236
|
+
if (options.specVanish) {
|
|
10237
|
+
this.push(new OnOffElement("w:specVanish", options.vanish));
|
|
10238
|
+
}
|
|
10242
10239
|
if (options.math) {
|
|
10243
10240
|
this.push(new OnOffElement("w:oMath", options.math));
|
|
10244
10241
|
}
|
|
10242
|
+
if (options.revision) {
|
|
10243
|
+
this.push(new RunPropertiesChange(options.revision));
|
|
10244
|
+
}
|
|
10245
10245
|
}
|
|
10246
10246
|
push(item) {
|
|
10247
10247
|
this.root.push(item);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docx",
|
|
3
|
-
"version": "9.5.
|
|
3
|
+
"version": "9.5.1",
|
|
4
4
|
"description": "Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.umd.cjs",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"clippy"
|
|
59
59
|
],
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@types/node": "^
|
|
61
|
+
"@types/node": "^24.0.1",
|
|
62
62
|
"hash.js": "^1.1.7",
|
|
63
63
|
"jszip": "^3.10.1",
|
|
64
64
|
"nanoid": "^5.1.3",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"eslint-import-resolver-typescript": "^4.3.2",
|
|
88
88
|
"eslint-plugin-functional": "^7.0.2",
|
|
89
89
|
"eslint-plugin-import": "^2.26.0",
|
|
90
|
-
"eslint-plugin-jsdoc": "^
|
|
90
|
+
"eslint-plugin-jsdoc": "^51.0.1",
|
|
91
91
|
"eslint-plugin-no-null": "^1.0.2",
|
|
92
92
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
93
93
|
"eslint-plugin-unicorn": "^59.0.0",
|