ooxml-core 1.19.1 → 1.20.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.
- package/README.md +12 -1
- package/dist/{PptxHandler-2V4PQL6O.mjs → PptxHandler-FYD7IYXT.mjs} +2 -2
- package/dist/PptxHandler-SITN3K3F.mjs +4 -0
- package/dist/{PptxHandler-6TNIQ7S5.cjs → PptxHandler-TEKISCJO.cjs} +3 -3
- package/dist/{PresentationBuilder-HQ6C7L4V.mjs → PresentationBuilder-EYI6Z2JP.mjs} +2 -2
- package/dist/{PresentationBuilder-G7MPEGXJ.mjs → PresentationBuilder-IMB4DVRN.mjs} +2 -2
- package/dist/{PresentationBuilder-RM52LCVN.cjs → PresentationBuilder-NCKASKXU.cjs} +5 -5
- package/dist/automation/index.cjs +424 -90
- package/dist/automation/index.mjs +423 -91
- package/dist/automation/xlsx-read.d.ts +56 -0
- package/dist/automation/xlsx-read.d.ts.map +1 -0
- package/dist/automation/xlsx.d.ts +105 -4
- package/dist/automation/xlsx.d.ts.map +1 -1
- package/dist/{chunk-M6GDBVQ7.mjs → chunk-GQYQQ3GA.mjs} +1 -1
- package/dist/{chunk-SLNQNVQM.mjs → chunk-LEV2SVMK.mjs} +1 -1
- package/dist/{chunk-JUABSM7C.mjs → chunk-LVM3IZJ2.mjs} +1 -1
- package/dist/{chunk-TJPUAUWL.mjs → chunk-MN27HKHM.mjs} +8 -194
- package/dist/{chunk-4FTUAD2B.mjs → chunk-MNXKRXFB.mjs} +715 -200
- package/dist/{chunk-R5FIHHGB.cjs → chunk-NXKATFM5.cjs} +1598 -1204
- package/dist/{chunk-ZJ2OKIJN.mjs → chunk-WXY5EDGT.mjs} +592 -198
- package/dist/docx/embedded.cjs +4 -1
- package/dist/docx/embedded.mjs +4 -1
- package/dist/docx/index.cjs +4 -1
- package/dist/docx/index.mjs +4 -1
- package/dist/docx/load/index.cjs +4 -1
- package/dist/docx/load/index.mjs +4 -1
- package/dist/docx/write-table.d.ts.map +1 -1
- package/dist/index.cjs +25 -0
- package/dist/index.mjs +25 -0
- package/dist/pptx/automation/index.cjs +887 -453
- package/dist/pptx/automation/index.d.ts +2 -2
- package/dist/pptx/automation/index.mjs +5 -5
- package/dist/pptx/chunks/{index-Bqm-jFG-.d.ts → index-CgFX0T7b.d.ts} +7573 -7508
- package/dist/pptx/chunks/index-CgFX0T7b.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-B9x557hr.d.ts → index-qwVYoFn6.d.ts} +2 -2
- package/dist/pptx/chunks/{index-B9x557hr.d.ts.map → index-qwVYoFn6.d.ts.map} +1 -1
- package/dist/pptx/cli/index.cjs +654 -221
- package/dist/pptx/cli/index.mjs +4 -4
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +2 -2
- package/dist/pptx/editor/render/find-replace.cjs +14 -14
- package/dist/pptx/editor/render/find-replace.d.ts +1 -1
- package/dist/pptx/editor/render/find-replace.mjs +1 -1
- package/dist/pptx/editor/render/slide-operations.cjs +8 -8
- package/dist/pptx/editor/render/slide-operations.mjs +2 -2
- package/dist/pptx/index.cjs +991 -619
- package/dist/pptx/index.d.ts +3 -3
- package/dist/pptx/index.mjs +5 -5
- package/dist/visio/index.cjs +61 -7
- package/dist/visio/index.mjs +61 -7
- package/dist/visio/ui/contract.d.ts +2 -1
- package/dist/visio/ui/contract.d.ts.map +1 -1
- package/dist/visio/ui/index.cjs +62 -7
- package/dist/visio/ui/index.mjs +62 -7
- package/dist/xlsx/edit/dimensions.d.ts.map +1 -1
- package/dist/xlsx/edit/history-rows.d.ts +7 -0
- package/dist/xlsx/edit/history-rows.d.ts.map +1 -0
- package/dist/xlsx/edit/history.d.ts +11 -1
- package/dist/xlsx/edit/history.d.ts.map +1 -1
- package/dist/xlsx/edit/outline.d.ts.map +1 -1
- package/dist/xlsx/edit/row-autofit.d.ts.map +1 -1
- package/dist/xlsx/index.cjs +235 -54
- package/dist/xlsx/index.mjs +235 -54
- package/dist/xlsx/layout/merge-sweep.d.ts +36 -0
- package/dist/xlsx/layout/merge-sweep.d.ts.map +1 -0
- package/dist/xlsx/layout/metrics.d.ts +5 -0
- package/dist/xlsx/layout/metrics.d.ts.map +1 -1
- package/dist/xlsx/layout/row-autofit.d.ts +6 -0
- package/dist/xlsx/layout/row-autofit.d.ts.map +1 -1
- package/dist/xlsx/load/index.cjs +61 -7
- package/dist/xlsx/load/index.mjs +61 -7
- package/dist/xlsx/numfmt/format.d.ts +8 -0
- package/dist/xlsx/numfmt/format.d.ts.map +1 -1
- package/dist/xlsx/read/sheet-data-source.d.ts.map +1 -1
- package/dist/xlsx/ui/index.cjs +281 -55
- package/dist/xlsx/ui/index.d.ts +1 -0
- package/dist/xlsx/ui/index.d.ts.map +1 -1
- package/dist/xlsx/ui/index.mjs +281 -56
- package/dist/xlsx/ui/selection-format.d.ts +13 -0
- package/dist/xlsx/ui/selection-format.d.ts.map +1 -0
- package/dist/xml/index.cjs +25 -0
- package/dist/xml/index.mjs +25 -0
- package/dist/xml/lite.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/PptxHandler-HSPKEP5E.mjs +0 -4
- package/dist/pptx/chunks/index-Bqm-jFG-.d.ts.map +0 -1
- /package/dist/{chunk-NYTR4UZ5.cjs → chunk-3IENHIFD.cjs} +0 -0
- /package/dist/{chunk-XTSHZGSM.mjs → chunk-CC5UNZOO.mjs} +0 -0
package/dist/docx/embedded.cjs
CHANGED
|
@@ -2833,7 +2833,10 @@ function writeTable(doc, table, node, base, writeParagraph, replaceSlots2) {
|
|
|
2833
2833
|
"Cannot change the structure of a merged, nested, or complex table. The original DOCX package remains unchanged."
|
|
2834
2834
|
);
|
|
2835
2835
|
const width = table.rows[0]?.length ?? 0;
|
|
2836
|
-
|
|
2836
|
+
const reshaped = structural || !base;
|
|
2837
|
+
if (!width || table.rows.some(
|
|
2838
|
+
(row) => reshaped && row.length !== width || row.some((cell) => !cell.paragraphs.length)
|
|
2839
|
+
))
|
|
2837
2840
|
throw new Error("Tables must contain rectangular rows and at least one paragraph per cell.");
|
|
2838
2841
|
const oldRows = flatRows(node).map((entry2) => entry2.element);
|
|
2839
2842
|
const sourceById = /* @__PURE__ */ new Map();
|
package/dist/docx/embedded.mjs
CHANGED
|
@@ -2827,7 +2827,10 @@ function writeTable(doc, table, node, base, writeParagraph, replaceSlots2) {
|
|
|
2827
2827
|
"Cannot change the structure of a merged, nested, or complex table. The original DOCX package remains unchanged."
|
|
2828
2828
|
);
|
|
2829
2829
|
const width = table.rows[0]?.length ?? 0;
|
|
2830
|
-
|
|
2830
|
+
const reshaped = structural || !base;
|
|
2831
|
+
if (!width || table.rows.some(
|
|
2832
|
+
(row) => reshaped && row.length !== width || row.some((cell) => !cell.paragraphs.length)
|
|
2833
|
+
))
|
|
2831
2834
|
throw new Error("Tables must contain rectangular rows and at least one paragraph per cell.");
|
|
2832
2835
|
const oldRows = flatRows(node).map((entry2) => entry2.element);
|
|
2833
2836
|
const sourceById = /* @__PURE__ */ new Map();
|
package/dist/docx/index.cjs
CHANGED
|
@@ -4088,7 +4088,10 @@ function writeTable(doc, table, node, base, writeParagraph, replaceSlots2) {
|
|
|
4088
4088
|
"Cannot change the structure of a merged, nested, or complex table. The original DOCX package remains unchanged."
|
|
4089
4089
|
);
|
|
4090
4090
|
const width = table.rows[0]?.length ?? 0;
|
|
4091
|
-
|
|
4091
|
+
const reshaped = structural || !base;
|
|
4092
|
+
if (!width || table.rows.some(
|
|
4093
|
+
(row) => reshaped && row.length !== width || row.some((cell) => !cell.paragraphs.length)
|
|
4094
|
+
))
|
|
4092
4095
|
throw new Error("Tables must contain rectangular rows and at least one paragraph per cell.");
|
|
4093
4096
|
const oldRows = flatRows(node).map((entry2) => entry2.element);
|
|
4094
4097
|
const sourceById = /* @__PURE__ */ new Map();
|
package/dist/docx/index.mjs
CHANGED
|
@@ -4082,7 +4082,10 @@ function writeTable(doc, table, node, base, writeParagraph, replaceSlots2) {
|
|
|
4082
4082
|
"Cannot change the structure of a merged, nested, or complex table. The original DOCX package remains unchanged."
|
|
4083
4083
|
);
|
|
4084
4084
|
const width = table.rows[0]?.length ?? 0;
|
|
4085
|
-
|
|
4085
|
+
const reshaped = structural || !base;
|
|
4086
|
+
if (!width || table.rows.some(
|
|
4087
|
+
(row) => reshaped && row.length !== width || row.some((cell) => !cell.paragraphs.length)
|
|
4088
|
+
))
|
|
4086
4089
|
throw new Error("Tables must contain rectangular rows and at least one paragraph per cell.");
|
|
4087
4090
|
const oldRows = flatRows(node).map((entry2) => entry2.element);
|
|
4088
4091
|
const sourceById = /* @__PURE__ */ new Map();
|
package/dist/docx/load/index.cjs
CHANGED
|
@@ -5417,7 +5417,10 @@ function writeTable(doc, table, node, base, writeParagraph, replaceSlots2) {
|
|
|
5417
5417
|
"Cannot change the structure of a merged, nested, or complex table. The original DOCX package remains unchanged."
|
|
5418
5418
|
);
|
|
5419
5419
|
const width = table.rows[0]?.length ?? 0;
|
|
5420
|
-
|
|
5420
|
+
const reshaped = structural || !base;
|
|
5421
|
+
if (!width || table.rows.some(
|
|
5422
|
+
(row) => reshaped && row.length !== width || row.some((cell) => !cell.paragraphs.length)
|
|
5423
|
+
))
|
|
5421
5424
|
throw new Error("Tables must contain rectangular rows and at least one paragraph per cell.");
|
|
5422
5425
|
const oldRows = flatRows(node).map((entry2) => entry2.element);
|
|
5423
5426
|
const sourceById = /* @__PURE__ */ new Map();
|
package/dist/docx/load/index.mjs
CHANGED
|
@@ -5411,7 +5411,10 @@ function writeTable(doc, table, node, base, writeParagraph, replaceSlots2) {
|
|
|
5411
5411
|
"Cannot change the structure of a merged, nested, or complex table. The original DOCX package remains unchanged."
|
|
5412
5412
|
);
|
|
5413
5413
|
const width = table.rows[0]?.length ?? 0;
|
|
5414
|
-
|
|
5414
|
+
const reshaped = structural || !base;
|
|
5415
|
+
if (!width || table.rows.some(
|
|
5416
|
+
(row) => reshaped && row.length !== width || row.some((cell) => !cell.paragraphs.length)
|
|
5417
|
+
))
|
|
5415
5418
|
throw new Error("Tables must contain rectangular rows and at least one paragraph per cell.");
|
|
5416
5419
|
const oldRows = flatRows(node).map((entry2) => entry2.element);
|
|
5417
5420
|
const sourceById = /* @__PURE__ */ new Map();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-table.d.ts","sourceRoot":"","sources":["../../docx/write-table.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAS,SAAS,EAAE,KAAK,EAAa,MAAM,SAAS,CAAC;AASlE,OAAO,EAA4C,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,OAAO,CAAC;AAEpG,KAAK,eAAe,GAAG,CACtB,GAAG,EAAE,WAAW,EAChB,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,UAAU,EAChB,IAAI,CAAC,EAAE,SAAS,KACZ,UAAU,CAAC;AAChB,KAAK,WAAW,GAAG,CAClB,GAAG,EAAE,WAAW,EAChB,MAAM,EAAE,UAAU,EAClB,GAAG,EAAE,UAAU,EAAE,EACjB,IAAI,EAAE,UAAU,EAAE,KACd,IAAI,CAAC;AAEV,iGAAiG;AACjG,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAiChE;AA6ED,wBAAgB,UAAU,CACzB,GAAG,EAAE,WAAW,EAChB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,KAAK,GAAG,SAAS,EACvB,cAAc,EAAE,eAAe,EAC/B,YAAY,EAAE,WAAW,GACvB,UAAU,
|
|
1
|
+
{"version":3,"file":"write-table.d.ts","sourceRoot":"","sources":["../../docx/write-table.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAS,SAAS,EAAE,KAAK,EAAa,MAAM,SAAS,CAAC;AASlE,OAAO,EAA4C,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,OAAO,CAAC;AAEpG,KAAK,eAAe,GAAG,CACtB,GAAG,EAAE,WAAW,EAChB,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,UAAU,EAChB,IAAI,CAAC,EAAE,SAAS,KACZ,UAAU,CAAC;AAChB,KAAK,WAAW,GAAG,CAClB,GAAG,EAAE,WAAW,EAChB,MAAM,EAAE,UAAU,EAClB,GAAG,EAAE,UAAU,EAAE,EACjB,IAAI,EAAE,UAAU,EAAE,KACd,IAAI,CAAC;AAEV,iGAAiG;AACjG,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAiChE;AA6ED,wBAAgB,UAAU,CACzB,GAAG,EAAE,WAAW,EAChB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,KAAK,GAAG,SAAS,EACvB,cAAc,EAAE,eAAe,EAC/B,YAAY,EAAE,WAAW,GACvB,UAAU,CA+HZ"}
|
package/dist/index.cjs
CHANGED
|
@@ -2459,6 +2459,12 @@ function parseLiteFragment(xml, container, namespaces) {
|
|
|
2459
2459
|
}
|
|
2460
2460
|
if (lt < 0) break;
|
|
2461
2461
|
const next = source.charCodeAt(lt + 1);
|
|
2462
|
+
if (next === 33) {
|
|
2463
|
+
const after = skipCommentOrCdata(source, lt, top);
|
|
2464
|
+
if (after < 0) return void 0;
|
|
2465
|
+
pos = after;
|
|
2466
|
+
continue;
|
|
2467
|
+
}
|
|
2462
2468
|
if (next === 47) {
|
|
2463
2469
|
const gt = source.indexOf(">", lt);
|
|
2464
2470
|
if (gt < 0 || stack.length < 2 || source.slice(lt + 2, gt).trimEnd() !== top.tagName)
|
|
@@ -2479,6 +2485,25 @@ function parseLiteFragment(xml, container, namespaces) {
|
|
|
2479
2485
|
}
|
|
2480
2486
|
return stack.length === 1 ? root : void 0;
|
|
2481
2487
|
}
|
|
2488
|
+
var DECLARATIONS = /<!DOCTYPE|<!ENTITY/i;
|
|
2489
|
+
function skipCommentOrCdata(source, lt, parent) {
|
|
2490
|
+
if (source.startsWith("<!--", lt)) {
|
|
2491
|
+
const end = source.indexOf("-->", lt + 4);
|
|
2492
|
+
if (end < 0) return -1;
|
|
2493
|
+
const body = source.slice(lt + 4, end);
|
|
2494
|
+
if (body.includes("--") || body.endsWith("-") || DECLARATIONS.test(body)) return -1;
|
|
2495
|
+
return end + 3;
|
|
2496
|
+
}
|
|
2497
|
+
if (source.startsWith("<![CDATA[", lt)) {
|
|
2498
|
+
const end = source.indexOf("]]>", lt + 9);
|
|
2499
|
+
if (end < 0) return -1;
|
|
2500
|
+
const text4 = source.slice(lt + 9, end);
|
|
2501
|
+
if (DECLARATIONS.test(text4)) return -1;
|
|
2502
|
+
parent.childNodes.push(text4);
|
|
2503
|
+
return end + 3;
|
|
2504
|
+
}
|
|
2505
|
+
return -1;
|
|
2506
|
+
}
|
|
2482
2507
|
function startTag(source, from, namespaces) {
|
|
2483
2508
|
const n2 = source.length;
|
|
2484
2509
|
let i2 = from;
|
package/dist/index.mjs
CHANGED
|
@@ -2453,6 +2453,12 @@ function parseLiteFragment(xml, container, namespaces) {
|
|
|
2453
2453
|
}
|
|
2454
2454
|
if (lt < 0) break;
|
|
2455
2455
|
const next = source.charCodeAt(lt + 1);
|
|
2456
|
+
if (next === 33) {
|
|
2457
|
+
const after = skipCommentOrCdata(source, lt, top);
|
|
2458
|
+
if (after < 0) return void 0;
|
|
2459
|
+
pos = after;
|
|
2460
|
+
continue;
|
|
2461
|
+
}
|
|
2456
2462
|
if (next === 47) {
|
|
2457
2463
|
const gt = source.indexOf(">", lt);
|
|
2458
2464
|
if (gt < 0 || stack.length < 2 || source.slice(lt + 2, gt).trimEnd() !== top.tagName)
|
|
@@ -2473,6 +2479,25 @@ function parseLiteFragment(xml, container, namespaces) {
|
|
|
2473
2479
|
}
|
|
2474
2480
|
return stack.length === 1 ? root : void 0;
|
|
2475
2481
|
}
|
|
2482
|
+
var DECLARATIONS = /<!DOCTYPE|<!ENTITY/i;
|
|
2483
|
+
function skipCommentOrCdata(source, lt, parent) {
|
|
2484
|
+
if (source.startsWith("<!--", lt)) {
|
|
2485
|
+
const end = source.indexOf("-->", lt + 4);
|
|
2486
|
+
if (end < 0) return -1;
|
|
2487
|
+
const body = source.slice(lt + 4, end);
|
|
2488
|
+
if (body.includes("--") || body.endsWith("-") || DECLARATIONS.test(body)) return -1;
|
|
2489
|
+
return end + 3;
|
|
2490
|
+
}
|
|
2491
|
+
if (source.startsWith("<![CDATA[", lt)) {
|
|
2492
|
+
const end = source.indexOf("]]>", lt + 9);
|
|
2493
|
+
if (end < 0) return -1;
|
|
2494
|
+
const text4 = source.slice(lt + 9, end);
|
|
2495
|
+
if (DECLARATIONS.test(text4)) return -1;
|
|
2496
|
+
parent.childNodes.push(text4);
|
|
2497
|
+
return end + 3;
|
|
2498
|
+
}
|
|
2499
|
+
return -1;
|
|
2500
|
+
}
|
|
2476
2501
|
function startTag(source, from, namespaces) {
|
|
2477
2502
|
const n2 = source.length;
|
|
2478
2503
|
let i2 = from;
|