@json-to-office/jto 1.11.0 → 1.11.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/cli.js +10 -3
- package/dist/cli.js.map +1 -1
- package/dist/client/assets/index-CgCY8SiY.js.map +1 -1
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -270,6 +270,9 @@ function collectReferencedNames(config2, customThemes, adapterName) {
|
|
|
270
270
|
}
|
|
271
271
|
return names;
|
|
272
272
|
}
|
|
273
|
+
function isReferenceableWeight(v) {
|
|
274
|
+
return typeof v === "number" && v >= 100 && v <= 900;
|
|
275
|
+
}
|
|
273
276
|
function collectReferencedWeights(config2, customThemes) {
|
|
274
277
|
const weights = /* @__PURE__ */ new Set();
|
|
275
278
|
const visit3 = (node) => {
|
|
@@ -279,8 +282,12 @@ function collectReferencedWeights(config2, customThemes) {
|
|
|
279
282
|
return;
|
|
280
283
|
}
|
|
281
284
|
if (typeof node === "object") {
|
|
282
|
-
|
|
283
|
-
|
|
285
|
+
const obj = node;
|
|
286
|
+
if (obj.bold === true && !isReferenceableWeight(obj.fontWeight)) {
|
|
287
|
+
weights.add(700);
|
|
288
|
+
}
|
|
289
|
+
for (const [k, v] of Object.entries(obj)) {
|
|
290
|
+
if (k === "fontWeight" && isReferenceableWeight(v)) {
|
|
284
291
|
weights.add(v);
|
|
285
292
|
} else {
|
|
286
293
|
visit3(v);
|
|
@@ -4381,7 +4388,7 @@ function createDevCommand(adapter) {
|
|
|
4381
4388
|
}
|
|
4382
4389
|
|
|
4383
4390
|
// src/cli.ts
|
|
4384
|
-
var PACKAGE_VERSION = true ? "1.11.
|
|
4391
|
+
var PACKAGE_VERSION = true ? "1.11.1" : "dev-mode";
|
|
4385
4392
|
var program = new Command2();
|
|
4386
4393
|
program.name("jto").description("JSON to Office CLI - Generate .docx and .pptx from JSON").version(PACKAGE_VERSION);
|
|
4387
4394
|
registerCoreCommands(program, {
|