documents.js 1.81.8 → 1.82.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 +8 -8
- package/dist/edit/ods/column-row.cjs +15 -3
- package/dist/edit/ods/column-row.d.cts +5 -3
- package/dist/edit/ods/column-row.d.ts +5 -3
- package/dist/edit/ods/column-row.js +14 -4
- package/dist/edit/ods/sheet.cjs +8 -3
- package/dist/edit/ods/sheet.js +9 -4
- package/dist/{formula-B_4mdCuK.d.ts → formula-DDSYieJg.d.ts} +2 -1
- package/dist/{formula-DFc2Ofsk.d.cts → formula-_8feXQH7.d.cts} +2 -1
- package/dist/layout/engine.cjs +1 -1
- package/dist/layout/engine.js +2 -2
- package/dist/layout/shared.cjs +13 -3
- package/dist/layout/shared.d.cts +3 -3
- package/dist/layout/shared.d.ts +3 -3
- package/dist/layout/shared.js +14 -4
- package/dist/layout/sheets.cjs +38 -5
- package/dist/layout/sheets.js +39 -6
- package/dist/layout/slides.cjs +1 -1
- package/dist/layout/slides.js +2 -2
- package/dist/ooxml/docx/embedded-objects.cjs +139 -39
- package/dist/ooxml/docx/embedded-objects.d.cts +1 -1
- package/dist/ooxml/docx/embedded-objects.d.ts +1 -1
- package/dist/ooxml/docx/embedded-objects.js +140 -40
- package/dist/ooxml/docx/formula.cjs +15 -0
- package/dist/ooxml/docx/formula.d.cts +2 -2
- package/dist/ooxml/docx/formula.d.ts +2 -2
- package/dist/ooxml/docx/formula.js +15 -1
- package/dist/ooxml/docx/read.d.cts +1 -1
- package/dist/ooxml/docx/read.d.ts +1 -1
- package/package.json +1 -1
|
@@ -15,6 +15,20 @@ function collectBodyParagraphs(nodes, out) {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
+
function collectBodyTables(nodes, out) {
|
|
19
|
+
for (const node of nodes) {
|
|
20
|
+
if (node.type !== "element") continue;
|
|
21
|
+
if (node.tag === "w:tbl") out.push(node);
|
|
22
|
+
else if (node.tag === "w:sdt") {
|
|
23
|
+
const content = (0, ooxml_js.childrenWithTag)(node, "w:sdtContent")[0];
|
|
24
|
+
if (content !== void 0) collectBodyTables(content.children, out);
|
|
25
|
+
} else if (node.tag === "w:ins") collectBodyTables(node.children, out);
|
|
26
|
+
else if (node.tag === "mc:AlternateContent") {
|
|
27
|
+
const target = (0, ooxml_js.childrenWithTag)(node, "mc:Fallback")[0] ?? (0, ooxml_js.childrenWithTag)(node, "mc:Choice")[0];
|
|
28
|
+
if (target !== void 0) collectBodyTables(target.children, out);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
18
32
|
const PARAGRAPH_NON_CONTENT_TAGS = /* @__PURE__ */ new Set([
|
|
19
33
|
"w:pPr",
|
|
20
34
|
"w:bookmarkStart",
|
|
@@ -51,4 +65,5 @@ function equationFrame(equation) {
|
|
|
51
65
|
//#endregion
|
|
52
66
|
exports.PARAGRAPH_NON_CONTENT_TAGS = PARAGRAPH_NON_CONTENT_TAGS;
|
|
53
67
|
exports.collectBodyParagraphs = collectBodyParagraphs;
|
|
68
|
+
exports.collectBodyTables = collectBodyTables;
|
|
54
69
|
exports.equationFrame = equationFrame;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { OmmlDiagnosticSink, PARAGRAPH_NON_CONTENT_TAGS, collectBodyParagraphs, equationFrame };
|
|
1
|
+
import { a as equationFrame, i as collectBodyTables, n as PARAGRAPH_NON_CONTENT_TAGS, r as collectBodyParagraphs, t as OmmlDiagnosticSink } from "../../formula-_8feXQH7.cjs";
|
|
2
|
+
export { OmmlDiagnosticSink, PARAGRAPH_NON_CONTENT_TAGS, collectBodyParagraphs, collectBodyTables, equationFrame };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { OmmlDiagnosticSink, PARAGRAPH_NON_CONTENT_TAGS, collectBodyParagraphs, equationFrame };
|
|
1
|
+
import { a as equationFrame, i as collectBodyTables, n as PARAGRAPH_NON_CONTENT_TAGS, r as collectBodyParagraphs, t as OmmlDiagnosticSink } from "../../formula-DDSYieJg.js";
|
|
2
|
+
export { OmmlDiagnosticSink, PARAGRAPH_NON_CONTENT_TAGS, collectBodyParagraphs, collectBodyTables, equationFrame };
|
|
@@ -14,6 +14,20 @@ function collectBodyParagraphs(nodes, out) {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
+
function collectBodyTables(nodes, out) {
|
|
18
|
+
for (const node of nodes) {
|
|
19
|
+
if (node.type !== "element") continue;
|
|
20
|
+
if (node.tag === "w:tbl") out.push(node);
|
|
21
|
+
else if (node.tag === "w:sdt") {
|
|
22
|
+
const content = childrenWithTag(node, "w:sdtContent")[0];
|
|
23
|
+
if (content !== void 0) collectBodyTables(content.children, out);
|
|
24
|
+
} else if (node.tag === "w:ins") collectBodyTables(node.children, out);
|
|
25
|
+
else if (node.tag === "mc:AlternateContent") {
|
|
26
|
+
const target = childrenWithTag(node, "mc:Fallback")[0] ?? childrenWithTag(node, "mc:Choice")[0];
|
|
27
|
+
if (target !== void 0) collectBodyTables(target.children, out);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
17
31
|
const PARAGRAPH_NON_CONTENT_TAGS = /* @__PURE__ */ new Set([
|
|
18
32
|
"w:pPr",
|
|
19
33
|
"w:bookmarkStart",
|
|
@@ -48,4 +62,4 @@ function equationFrame(equation) {
|
|
|
48
62
|
};
|
|
49
63
|
}
|
|
50
64
|
//#endregion
|
|
51
|
-
export { PARAGRAPH_NON_CONTENT_TAGS, collectBodyParagraphs, equationFrame };
|
|
65
|
+
export { PARAGRAPH_NON_CONTENT_TAGS, collectBodyParagraphs, collectBodyTables, equationFrame };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as OmmlDiagnosticSink } from "../../formula-
|
|
1
|
+
import { t as OmmlDiagnosticSink } from "../../formula-_8feXQH7.cjs";
|
|
2
2
|
import { ContentDocument } from "document-schema.js";
|
|
3
3
|
import { Package } from "ooxml.js";
|
|
4
4
|
//#region src/ooxml/docx/read.d.ts
|
package/package.json
CHANGED