documents.js 1.83.0 → 1.85.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/dist/edit/docx/content.cjs +11 -1
- package/dist/edit/docx/content.js +11 -1
- package/dist/edit/docx/paragraph.cjs +98 -0
- package/dist/edit/docx/paragraph.d.cts +13 -1
- package/dist/edit/docx/paragraph.d.ts +13 -1
- package/dist/edit/docx/paragraph.js +99 -1
- package/dist/edit/docx/props.cjs +1 -1
- package/dist/edit/docx/props.js +1 -1
- package/dist/edit/docx/run.cjs +7 -0
- package/dist/edit/docx/run.d.cts +1 -1
- package/dist/edit/docx/run.d.ts +1 -1
- package/dist/edit/docx/run.js +7 -0
- package/dist/edit/docx/table.cjs +119 -1
- package/dist/edit/docx/table.d.cts +8 -0
- package/dist/edit/docx/table.d.ts +8 -0
- package/dist/edit/docx/table.js +119 -1
- package/dist/edit/odg/page.d.cts +1 -1
- package/dist/edit/odg/page.d.ts +1 -1
- package/dist/edit/odp/shape.d.cts +1 -1
- package/dist/edit/odp/shape.d.ts +1 -1
- package/dist/edit/odp/slide.d.cts +2 -2
- package/dist/edit/odp/slide.d.ts +2 -2
- package/dist/edit/odt/content.cjs +8 -0
- package/dist/edit/odt/content.d.cts +2 -2
- package/dist/edit/odt/content.d.ts +2 -2
- package/dist/edit/odt/content.js +8 -0
- package/dist/edit/odt/editor.d.cts +3 -3
- package/dist/edit/odt/editor.d.ts +3 -3
- package/dist/edit/odt/list.d.cts +1 -1
- package/dist/edit/odt/list.d.ts +1 -1
- package/dist/edit/odt/paragraph.cjs +30 -0
- package/dist/edit/odt/paragraph.d.cts +1 -1
- package/dist/edit/odt/paragraph.d.ts +1 -1
- package/dist/edit/odt/paragraph.js +30 -0
- package/dist/edit/odt/run.cjs +6 -0
- package/dist/edit/odt/run.d.cts +1 -1
- package/dist/edit/odt/run.d.ts +1 -1
- package/dist/edit/odt/run.js +6 -0
- package/dist/edit/odt/table.cjs +105 -0
- package/dist/edit/odt/table.d.cts +2 -2
- package/dist/edit/odt/table.d.ts +2 -2
- package/dist/edit/odt/table.js +105 -2
- package/dist/edit/pptx/content.cjs +4 -0
- package/dist/edit/pptx/content.js +4 -0
- package/dist/edit/pptx/shape.cjs +3 -1
- package/dist/edit/pptx/shape.d.cts +1 -1
- package/dist/edit/pptx/shape.d.ts +1 -1
- package/dist/edit/pptx/shape.js +3 -1
- package/dist/edit/pptx/slide.d.cts +2 -2
- package/dist/edit/pptx/slide.d.ts +2 -2
- package/dist/edit/pptx/table.cjs +1 -1
- package/dist/edit/pptx/table.d.cts +1 -1
- package/dist/edit/pptx/table.d.ts +1 -1
- package/dist/edit/pptx/table.js +1 -1
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/{list-DXRaCcT1.d.cts → list-CxoEJwNO.d.cts} +1 -1
- package/dist/{list-7hZydHAV.d.ts → list-DA1hCBVI.d.ts} +1 -1
- package/dist/{paragraph-kMJVZhAi.d.ts → paragraph-DV4_ZNGr.d.ts} +11 -1
- package/dist/{paragraph-Dlly6_E9.d.cts → paragraph-DXIJfPMw.d.cts} +11 -1
- package/dist/{run-DDe7miD5.d.ts → run-BYJGK31k.d.ts} +3 -0
- package/dist/{run-P0b2pDdX.d.cts → run-DEPVf5ZJ.d.cts} +3 -0
- package/dist/{run-F8JN7Vy4.d.cts → run-DQtEGilU.d.cts} +3 -0
- package/dist/{run-wB22_F5w.d.ts → run-SLSPO-4y.d.ts} +3 -0
- package/dist/{shape-BhkP6HB8.d.cts → shape-BwBiRGha.d.cts} +2 -0
- package/dist/{shape-BjX3wlig.d.ts → shape-D5IoGzf9.d.ts} +2 -0
- package/dist/{shape-BR8GL8XC.d.cts → shape-Dch9pDCf.d.cts} +2 -2
- package/dist/{shape-DeP-P4Nh.d.ts → shape-DyviC6ZG.d.ts} +2 -2
- package/dist/{table-DSFcqJ7C.d.cts → table-BtMtRYqc.d.cts} +13 -2
- package/dist/{table-AT4t4VUy.d.ts → table-BxeHHD7r.d.ts} +13 -2
- package/dist/{table-L5SxKy8_.d.ts → table-CCdAhdcG.d.ts} +1 -1
- package/dist/{table-CfRjVOFN.d.cts → table-SczxeRF0.d.cts} +1 -1
- package/package.json +1 -1
package/dist/edit/odt/table.js
CHANGED
|
@@ -3,10 +3,91 @@ import { removeAttr, removeChild, setAttr } from "../../xml/edit.js";
|
|
|
3
3
|
import { ensureAutomaticStyles, nextStyleName } from "./automatic-styles.js";
|
|
4
4
|
import { OdtParagraph, buildParagraph } from "./paragraph.js";
|
|
5
5
|
import { attr } from "ooxml.js";
|
|
6
|
-
import { formatOdfLength } from "odf.js";
|
|
6
|
+
import { formatOdfColor, formatOdfLength, parseOdfColor, parseOdfLength } from "odf.js";
|
|
7
7
|
//#region src/edit/odt/table.ts
|
|
8
8
|
const DEFAULT_TABLE_WIDTH_PT = 468;
|
|
9
9
|
const TABLE_COLUMN_STYLE_PREFIX = "OdtCol";
|
|
10
|
+
const TABLE_CELL_STYLE_PREFIX = "OdtCell";
|
|
11
|
+
const BORDER_EDGE_ATTRS = {
|
|
12
|
+
top: "fo:border-top",
|
|
13
|
+
right: "fo:border-right",
|
|
14
|
+
bottom: "fo:border-bottom",
|
|
15
|
+
left: "fo:border-left"
|
|
16
|
+
};
|
|
17
|
+
function formatBorderShorthand(color, widthPt, style) {
|
|
18
|
+
return `${formatOdfLength(widthPt)} ${style ?? "solid"} ${formatOdfColor(color)}`;
|
|
19
|
+
}
|
|
20
|
+
function findCellPropertiesReadOnly(pkg, element) {
|
|
21
|
+
const styleName = attr(element, "table:style-name");
|
|
22
|
+
if (styleName === void 0) return;
|
|
23
|
+
const part = pkg.parts["content.xml"];
|
|
24
|
+
const root = part?.kind === "xml" ? part.nodes.find((n) => n.type === "element") : void 0;
|
|
25
|
+
if (root === void 0) return;
|
|
26
|
+
for (const child of root.children) if (child.type === "element" && child.tag === "office:automatic-styles") {
|
|
27
|
+
for (const style of child.children) if (style.type === "element" && style.tag === "style:style" && attr(style, "style:name") === styleName && attr(style, "style:family") === "table-cell") {
|
|
28
|
+
for (const props of style.children) if (props.type === "element" && props.tag === "style:table-cell-properties") return props;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function readCellDecoration(pkg, element) {
|
|
33
|
+
const props = findCellPropertiesReadOnly(pkg, element);
|
|
34
|
+
if (props === void 0) return {};
|
|
35
|
+
let background;
|
|
36
|
+
const backgroundValue = attr(props, "fo:background-color");
|
|
37
|
+
if (backgroundValue !== void 0) background = parseOdfColor(backgroundValue);
|
|
38
|
+
const borders = {};
|
|
39
|
+
[
|
|
40
|
+
"top",
|
|
41
|
+
"right",
|
|
42
|
+
"bottom",
|
|
43
|
+
"left"
|
|
44
|
+
].forEach((edge) => {
|
|
45
|
+
const raw = attr(props, BORDER_EDGE_ATTRS[edge]);
|
|
46
|
+
if (raw === void 0) return;
|
|
47
|
+
const tokens = raw.trim().split(/\s+/);
|
|
48
|
+
const widthToken = tokens[0];
|
|
49
|
+
const styleToken = tokens[1];
|
|
50
|
+
const colorToken = tokens[2];
|
|
51
|
+
if (widthToken === void 0 || styleToken === void 0 || colorToken === void 0 || styleToken === "none" || styleToken === "hidden") return;
|
|
52
|
+
const widthPt = parseOdfLength(widthToken);
|
|
53
|
+
const color = parseOdfColor(colorToken);
|
|
54
|
+
if (widthPt === void 0 || widthPt <= 0 || color === void 0) return;
|
|
55
|
+
const style = styleToken === "solid" || styleToken === "dashed" || styleToken === "dotted" || styleToken === "double" ? styleToken : void 0;
|
|
56
|
+
borders[edge] = style === void 0 ? {
|
|
57
|
+
color,
|
|
58
|
+
widthPt
|
|
59
|
+
} : {
|
|
60
|
+
color,
|
|
61
|
+
widthPt,
|
|
62
|
+
style
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
return {
|
|
66
|
+
background,
|
|
67
|
+
borders: Object.keys(borders).length === 0 ? void 0 : borders
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function buildCellStyle(pkg, decoration) {
|
|
71
|
+
const automaticStyles = ensureAutomaticStyles(pkg);
|
|
72
|
+
const name = nextStyleName(automaticStyles, "style:style", TABLE_CELL_STYLE_PREFIX);
|
|
73
|
+
const propsAttrs = {};
|
|
74
|
+
if (decoration.background !== void 0) propsAttrs["fo:background-color"] = formatOdfColor(decoration.background);
|
|
75
|
+
if (decoration.borders !== void 0) [
|
|
76
|
+
"top",
|
|
77
|
+
"right",
|
|
78
|
+
"bottom",
|
|
79
|
+
"left"
|
|
80
|
+
].forEach((edge) => {
|
|
81
|
+
const border = decoration.borders[edge];
|
|
82
|
+
if (border !== void 0) propsAttrs[BORDER_EDGE_ATTRS[edge]] = formatBorderShorthand(border.color, border.widthPt, border.style);
|
|
83
|
+
});
|
|
84
|
+
const properties = Object.keys(propsAttrs).length === 0 ? [] : [el("style:table-cell-properties", propsAttrs)];
|
|
85
|
+
automaticStyles.children.push(el("style:style", {
|
|
86
|
+
"style:name": name,
|
|
87
|
+
"style:family": "table-cell"
|
|
88
|
+
}, properties));
|
|
89
|
+
return name;
|
|
90
|
+
}
|
|
10
91
|
function internTableColumnWidth(pkg, widthPt) {
|
|
11
92
|
const automaticStyles = ensureAutomaticStyles(pkg);
|
|
12
93
|
const formatted = formatOdfLength(widthPt, "pt");
|
|
@@ -67,6 +148,28 @@ var OdtTableCell = class {
|
|
|
67
148
|
}
|
|
68
149
|
setAttr(this.node, "table:number-rows-spanned", String(value));
|
|
69
150
|
}
|
|
151
|
+
get background() {
|
|
152
|
+
return readCellDecoration(this.pkg, this.node).background;
|
|
153
|
+
}
|
|
154
|
+
set background(value) {
|
|
155
|
+
const current = readCellDecoration(this.pkg, this.node);
|
|
156
|
+
const name = buildCellStyle(this.pkg, {
|
|
157
|
+
background: value,
|
|
158
|
+
borders: current.borders
|
|
159
|
+
});
|
|
160
|
+
setAttr(this.node, "table:style-name", name);
|
|
161
|
+
}
|
|
162
|
+
get borders() {
|
|
163
|
+
return readCellDecoration(this.pkg, this.node).borders;
|
|
164
|
+
}
|
|
165
|
+
set borders(value) {
|
|
166
|
+
const current = readCellDecoration(this.pkg, this.node);
|
|
167
|
+
const name = buildCellStyle(this.pkg, {
|
|
168
|
+
background: current.background,
|
|
169
|
+
borders: value
|
|
170
|
+
});
|
|
171
|
+
setAttr(this.node, "table:style-name", name);
|
|
172
|
+
}
|
|
70
173
|
};
|
|
71
174
|
var OdtTableRow = class {
|
|
72
175
|
node;
|
|
@@ -199,4 +302,4 @@ function buildTable(pkg, init) {
|
|
|
199
302
|
return el("table:table", {}, [...columns, ...rows]);
|
|
200
303
|
}
|
|
201
304
|
//#endregion
|
|
202
|
-
export { OdtTable, OdtTableCell, OdtTableRow, buildTable };
|
|
305
|
+
export { OdtTable, OdtTableCell, OdtTableRow, buildCellStyle, buildTable, readCellDecoration };
|
|
@@ -57,6 +57,8 @@ function appendShape(slide, shape) {
|
|
|
57
57
|
text: run.text,
|
|
58
58
|
bold: run.bold,
|
|
59
59
|
italic: run.italic,
|
|
60
|
+
underline: run.underline,
|
|
61
|
+
strike: run.strike,
|
|
60
62
|
fontFamily: run.fontFamily,
|
|
61
63
|
sizePt: run.sizePt,
|
|
62
64
|
color: run.color
|
|
@@ -80,6 +82,8 @@ function populateCellParagraphs(cell, blocks) {
|
|
|
80
82
|
text: run.text,
|
|
81
83
|
bold: run.bold,
|
|
82
84
|
italic: run.italic,
|
|
85
|
+
underline: run.underline,
|
|
86
|
+
strike: run.strike,
|
|
83
87
|
fontFamily: run.fontFamily,
|
|
84
88
|
sizePt: run.sizePt,
|
|
85
89
|
color: run.color
|
|
@@ -56,6 +56,8 @@ function appendShape(slide, shape) {
|
|
|
56
56
|
text: run.text,
|
|
57
57
|
bold: run.bold,
|
|
58
58
|
italic: run.italic,
|
|
59
|
+
underline: run.underline,
|
|
60
|
+
strike: run.strike,
|
|
59
61
|
fontFamily: run.fontFamily,
|
|
60
62
|
sizePt: run.sizePt,
|
|
61
63
|
color: run.color
|
|
@@ -79,6 +81,8 @@ function populateCellParagraphs(cell, blocks) {
|
|
|
79
81
|
text: run.text,
|
|
80
82
|
bold: run.bold,
|
|
81
83
|
italic: run.italic,
|
|
84
|
+
underline: run.underline,
|
|
85
|
+
strike: run.strike,
|
|
82
86
|
fontFamily: run.fontFamily,
|
|
83
87
|
sizePt: run.sizePt,
|
|
84
88
|
color: run.color
|
package/dist/edit/pptx/shape.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_xml_fragment = require("../../xml/fragment.cjs");
|
|
3
3
|
const require_xml_entities = require("../../xml/entities.cjs");
|
|
4
|
-
const require_xml_edit = require("../../xml/edit.cjs");
|
|
5
4
|
const require_model_units = require("../../model/units.cjs");
|
|
5
|
+
const require_xml_edit = require("../../xml/edit.cjs");
|
|
6
6
|
const require_edit_drawingml_vector = require("../drawingml/vector.cjs");
|
|
7
7
|
let ooxml_js = require("ooxml.js");
|
|
8
8
|
//#region src/edit/pptx/shape.ts
|
|
@@ -128,6 +128,8 @@ function buildDrawingRun(init) {
|
|
|
128
128
|
const rPrAttrs = {};
|
|
129
129
|
if (init.bold === true) rPrAttrs.b = "1";
|
|
130
130
|
if (init.italic === true) rPrAttrs.i = "1";
|
|
131
|
+
if (init.underline === true) rPrAttrs.u = "sng";
|
|
132
|
+
if (init.strike === true) rPrAttrs.strike = "sngStrike";
|
|
131
133
|
if (init.sizePt !== void 0) rPrAttrs.sz = String(Math.round(init.sizePt * HUNDREDTHS_POINT_PER_POINT));
|
|
132
134
|
const rPrChildren = [];
|
|
133
135
|
if (init.color !== void 0) rPrChildren.push(require_xml_fragment.el("a:solidFill", {}, [require_xml_fragment.el("a:srgbClr", { val: require_edit_drawingml_vector.drawingMlColorHex(init.color) })]));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as buildDrawingParagraph, i as ROTATION_UNITS_PER_DEGREE, n as DrawingRunInit, o as buildPictureShape, r as PptxShape, s as buildTextBoxShape, t as DrawingParagraphInit } from "../../shape-
|
|
1
|
+
import { a as buildDrawingParagraph, i as ROTATION_UNITS_PER_DEGREE, n as DrawingRunInit, o as buildPictureShape, r as PptxShape, s as buildTextBoxShape, t as DrawingParagraphInit } from "../../shape-BwBiRGha.cjs";
|
|
2
2
|
export { DrawingParagraphInit, DrawingRunInit, PptxShape, ROTATION_UNITS_PER_DEGREE, buildDrawingParagraph, buildPictureShape, buildTextBoxShape };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as buildDrawingParagraph, i as ROTATION_UNITS_PER_DEGREE, n as DrawingRunInit, o as buildPictureShape, r as PptxShape, s as buildTextBoxShape, t as DrawingParagraphInit } from "../../shape-
|
|
1
|
+
import { a as buildDrawingParagraph, i as ROTATION_UNITS_PER_DEGREE, n as DrawingRunInit, o as buildPictureShape, r as PptxShape, s as buildTextBoxShape, t as DrawingParagraphInit } from "../../shape-D5IoGzf9.js";
|
|
2
2
|
export { DrawingParagraphInit, DrawingRunInit, PptxShape, ROTATION_UNITS_PER_DEGREE, buildDrawingParagraph, buildPictureShape, buildTextBoxShape };
|
package/dist/edit/pptx/shape.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { el, txt } from "../../xml/fragment.js";
|
|
2
2
|
import { encodeXmlText, needsSpacePreserve } from "../../xml/entities.js";
|
|
3
|
-
import { removeAttr, removeChild, setAttr } from "../../xml/edit.js";
|
|
4
3
|
import { emuToPt, ptToEmu } from "../../model/units.js";
|
|
4
|
+
import { removeAttr, removeChild, setAttr } from "../../xml/edit.js";
|
|
5
5
|
import { drawingMlColorHex } from "../drawingml/vector.js";
|
|
6
6
|
import { attr, textContent } from "ooxml.js";
|
|
7
7
|
//#region src/edit/pptx/shape.ts
|
|
@@ -127,6 +127,8 @@ function buildDrawingRun(init) {
|
|
|
127
127
|
const rPrAttrs = {};
|
|
128
128
|
if (init.bold === true) rPrAttrs.b = "1";
|
|
129
129
|
if (init.italic === true) rPrAttrs.i = "1";
|
|
130
|
+
if (init.underline === true) rPrAttrs.u = "sng";
|
|
131
|
+
if (init.strike === true) rPrAttrs.strike = "sngStrike";
|
|
130
132
|
if (init.sizePt !== void 0) rPrAttrs.sz = String(Math.round(init.sizePt * HUNDREDTHS_POINT_PER_POINT));
|
|
131
133
|
const rPrChildren = [];
|
|
132
134
|
if (init.color !== void 0) rPrChildren.push(el("a:solidFill", {}, [el("a:srgbClr", { val: drawingMlColorHex(init.color) })]));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as Box$1 } from "../../geometry-DaJr8yQW.cjs";
|
|
2
2
|
import { t as ImageInit } from "../../image-7snmKIxn.cjs";
|
|
3
|
-
import { r as PptxShape } from "../../shape-
|
|
4
|
-
import { r as PptxTableInit, t as PptxTable } from "../../table-
|
|
3
|
+
import { r as PptxShape } from "../../shape-BwBiRGha.cjs";
|
|
4
|
+
import { r as PptxTableInit, t as PptxTable } from "../../table-SczxeRF0.cjs";
|
|
5
5
|
import { ContentVector } from "document-schema.js";
|
|
6
6
|
import { Package, XmlElement, XmlNode } from "ooxml.js";
|
|
7
7
|
//#region src/edit/pptx/slide.d.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as Box$1 } from "../../geometry-DaJr8yQW.js";
|
|
2
2
|
import { t as ImageInit } from "../../image-Cs8xF753.js";
|
|
3
|
-
import { r as PptxShape } from "../../shape-
|
|
4
|
-
import { r as PptxTableInit, t as PptxTable } from "../../table-
|
|
3
|
+
import { r as PptxShape } from "../../shape-D5IoGzf9.js";
|
|
4
|
+
import { r as PptxTableInit, t as PptxTable } from "../../table-CCdAhdcG.js";
|
|
5
5
|
import { Package, XmlElement, XmlNode } from "ooxml.js";
|
|
6
6
|
import { ContentVector } from "document-schema.js";
|
|
7
7
|
//#region src/edit/pptx/slide.d.ts
|
package/dist/edit/pptx/table.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_xml_fragment = require("../../xml/fragment.cjs");
|
|
3
|
-
const require_xml_edit = require("../../xml/edit.cjs");
|
|
4
3
|
const require_model_units = require("../../model/units.cjs");
|
|
4
|
+
const require_xml_edit = require("../../xml/edit.cjs");
|
|
5
5
|
const require_edit_pptx_shape = require("./shape.cjs");
|
|
6
6
|
let ooxml_js = require("ooxml.js");
|
|
7
7
|
//#region src/edit/pptx/table.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as buildDrawingTable, i as PptxTableRow, n as PptxTableCell, o as buildTableGraphicFrame, r as PptxTableInit, s as findGraphicFrameTable, t as PptxTable } from "../../table-
|
|
1
|
+
import { a as buildDrawingTable, i as PptxTableRow, n as PptxTableCell, o as buildTableGraphicFrame, r as PptxTableInit, s as findGraphicFrameTable, t as PptxTable } from "../../table-SczxeRF0.cjs";
|
|
2
2
|
export { PptxTable, PptxTableCell, PptxTableInit, PptxTableRow, buildDrawingTable, buildTableGraphicFrame, findGraphicFrameTable };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as buildDrawingTable, i as PptxTableRow, n as PptxTableCell, o as buildTableGraphicFrame, r as PptxTableInit, s as findGraphicFrameTable, t as PptxTable } from "../../table-
|
|
1
|
+
import { a as buildDrawingTable, i as PptxTableRow, n as PptxTableCell, o as buildTableGraphicFrame, r as PptxTableInit, s as findGraphicFrameTable, t as PptxTable } from "../../table-CCdAhdcG.js";
|
|
2
2
|
export { PptxTable, PptxTableCell, PptxTableInit, PptxTableRow, buildDrawingTable, buildTableGraphicFrame, findGraphicFrameTable };
|
package/dist/edit/pptx/table.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { el } from "../../xml/fragment.js";
|
|
2
|
-
import { directChildElement, removeAttr, setAttr } from "../../xml/edit.js";
|
|
3
2
|
import { ptToEmu } from "../../model/units.js";
|
|
3
|
+
import { directChildElement, removeAttr, setAttr } from "../../xml/edit.js";
|
|
4
4
|
import { ROTATION_UNITS_PER_DEGREE, buildDrawingParagraph } from "./shape.js";
|
|
5
5
|
import { attr } from "ooxml.js";
|
|
6
6
|
//#region src/edit/pptx/table.ts
|
package/dist/index.d.cts
CHANGED
|
@@ -13,7 +13,7 @@ import { BuildDocxPackageOptions, buildDocxPackage } from "./edit/docx/content.c
|
|
|
13
13
|
import { c as firstChildByLocalName, d as textContent, i as MathMlText, l as isMathMlElement, n as MathMlElement, o as elementChildren, r as MathMlNode, s as elementLocalName, t as MathMlAttribute, u as localName } from "./nodes-pArN9ilm.cjs";
|
|
14
14
|
import { n as buildOfficeMath, r as buildOfficeMathParagraph, t as OmmlWriteResult } from "./write-BQ6SK8r8.cjs";
|
|
15
15
|
import { a as rgbHexToColor, n as LayoutColor, t as COLOR_BLACK } from "./color-71eoF1Up.cjs";
|
|
16
|
-
import { t as DocxRun } from "./run-
|
|
16
|
+
import { t as DocxRun } from "./run-DEPVf5ZJ.cjs";
|
|
17
17
|
import { DocxParagraph } from "./edit/docx/paragraph.cjs";
|
|
18
18
|
import { DocxTable, DocxTableCell, DocxTableRow, DocxVerticalMerge } from "./edit/docx/table.cjs";
|
|
19
19
|
import { CreateDocxOptions, DocxBody, DocxEditor, createDocx, openDocx } from "./edit/docx/editor.cjs";
|
|
@@ -26,16 +26,16 @@ import { MarkdownTable, MarkdownTableCell, MarkdownTableRow, TableInit } from ".
|
|
|
26
26
|
import { CreateMarkdownEditorOptions, MarkdownBody, MarkdownEditor, createMarkdownEditor, openMarkdown } from "./edit/markdown/editor.cjs";
|
|
27
27
|
import { BuildOdgPackageOptions, buildOdgPackage } from "./edit/odg/content.cjs";
|
|
28
28
|
import { i as LayoutFont, r as DEFAULT_LAYOUT_FONT, t as Alignment } from "./style-DkamR3aY.cjs";
|
|
29
|
-
import { n as RunInit$1, t as OdtRun } from "./run-
|
|
30
|
-
import { n as ParagraphInit$1, t as OdtParagraph } from "./paragraph-
|
|
31
|
-
import { n as OdtListItem, t as OdtList } from "./list-
|
|
32
|
-
import { t as OdpShape } from "./shape-
|
|
29
|
+
import { n as RunInit$1, t as OdtRun } from "./run-DQtEGilU.cjs";
|
|
30
|
+
import { n as ParagraphInit$1, t as OdtParagraph } from "./paragraph-DXIJfPMw.cjs";
|
|
31
|
+
import { n as OdtListItem, t as OdtList } from "./list-CxoEJwNO.cjs";
|
|
32
|
+
import { t as OdpShape } from "./shape-Dch9pDCf.cjs";
|
|
33
33
|
import { a as OdgLineVector, c as OdgVectorKind, l as PathVectorInit, n as LineVectorInit, o as OdgPathVector, r as OdgBoxVector, s as OdgVector, t as BoxVectorInit } from "./vector-D03KX8Ux.cjs";
|
|
34
34
|
import { OdgPage, PageImageInit, TextBoxInit } from "./edit/odg/page.cjs";
|
|
35
35
|
import { CreateOdgOptions, OdgEditor, createOdg, openOdg } from "./edit/odg/editor.cjs";
|
|
36
36
|
import { CreateEmptyOdgPackageOptions } from "./edit/odg/scaffold.cjs";
|
|
37
37
|
import { BuildOdpPackageOptions, buildOdpPackage } from "./edit/odp/content.cjs";
|
|
38
|
-
import {
|
|
38
|
+
import { a as TableInit$1, i as OdtTableRow, n as OdtTable, r as OdtTableCell } from "./table-BtMtRYqc.cjs";
|
|
39
39
|
import { OdpSlide, SlideImageInit, SlideTableInit, TextBoxInit as TextBoxInit$1 } from "./edit/odp/slide.cjs";
|
|
40
40
|
import { CreateOdpOptions, OdpEditor, createOdp, openOdp } from "./edit/odp/editor.cjs";
|
|
41
41
|
import { CreateEmptyOdpPackageOptions } from "./edit/odp/scaffold.cjs";
|
|
@@ -51,8 +51,8 @@ import { a as PdfItem, c as PdfLinkInit, d as PdfPathItem, f as PdfRectInit, h a
|
|
|
51
51
|
import { PageInit, PdfPage } from "./edit/pdf/page.cjs";
|
|
52
52
|
import { CreatePdfOptions, PdfEditor, createPdf, openPdf } from "./edit/pdf/editor.cjs";
|
|
53
53
|
import { BuildPptxPackageOptions, buildPptxPackage } from "./edit/pptx/content.cjs";
|
|
54
|
-
import { n as DrawingRunInit, r as PptxShape, t as DrawingParagraphInit } from "./shape-
|
|
55
|
-
import { i as PptxTableRow, n as PptxTableCell, r as PptxTableInit, t as PptxTable } from "./table-
|
|
54
|
+
import { n as DrawingRunInit, r as PptxShape, t as DrawingParagraphInit } from "./shape-BwBiRGha.cjs";
|
|
55
|
+
import { i as PptxTableRow, n as PptxTableCell, r as PptxTableInit, t as PptxTable } from "./table-SczxeRF0.cjs";
|
|
56
56
|
import { PptxSlide, SlideImageInit as SlideImageInit$1, SlideTableInit as SlideTableInit$1, TextBoxInit as TextBoxInit$2 } from "./edit/pptx/slide.cjs";
|
|
57
57
|
import { CreatePptxOptions, PptxEditor, createPptx, openPptx } from "./edit/pptx/editor.cjs";
|
|
58
58
|
import { CreateEmptyPptxPackageOptions } from "./edit/pptx/scaffold.cjs";
|
package/dist/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { BuildDocxPackageOptions, buildDocxPackage } from "./edit/docx/content.j
|
|
|
13
13
|
import { c as firstChildByLocalName, d as textContent, i as MathMlText, l as isMathMlElement, n as MathMlElement, o as elementChildren, r as MathMlNode, s as elementLocalName, t as MathMlAttribute, u as localName } from "./nodes-pArN9ilm.js";
|
|
14
14
|
import { n as buildOfficeMath, r as buildOfficeMathParagraph, t as OmmlWriteResult } from "./write-THs7ipBq.js";
|
|
15
15
|
import { a as rgbHexToColor, n as LayoutColor, t as COLOR_BLACK } from "./color-BHhGSqAh.js";
|
|
16
|
-
import { t as DocxRun } from "./run-
|
|
16
|
+
import { t as DocxRun } from "./run-BYJGK31k.js";
|
|
17
17
|
import { DocxParagraph } from "./edit/docx/paragraph.js";
|
|
18
18
|
import { DocxTable, DocxTableCell, DocxTableRow, DocxVerticalMerge } from "./edit/docx/table.js";
|
|
19
19
|
import { CreateDocxOptions, DocxBody, DocxEditor, createDocx, openDocx } from "./edit/docx/editor.js";
|
|
@@ -26,16 +26,16 @@ import { MarkdownTable, MarkdownTableCell, MarkdownTableRow, TableInit } from ".
|
|
|
26
26
|
import { CreateMarkdownEditorOptions, MarkdownBody, MarkdownEditor, createMarkdownEditor, openMarkdown } from "./edit/markdown/editor.js";
|
|
27
27
|
import { BuildOdgPackageOptions, buildOdgPackage } from "./edit/odg/content.js";
|
|
28
28
|
import { i as LayoutFont, r as DEFAULT_LAYOUT_FONT, t as Alignment } from "./style-DkamR3aY.js";
|
|
29
|
-
import { n as RunInit$1, t as OdtRun } from "./run-
|
|
30
|
-
import { n as ParagraphInit$1, t as OdtParagraph } from "./paragraph-
|
|
31
|
-
import { n as OdtListItem, t as OdtList } from "./list-
|
|
32
|
-
import { t as OdpShape } from "./shape-
|
|
29
|
+
import { n as RunInit$1, t as OdtRun } from "./run-SLSPO-4y.js";
|
|
30
|
+
import { n as ParagraphInit$1, t as OdtParagraph } from "./paragraph-DV4_ZNGr.js";
|
|
31
|
+
import { n as OdtListItem, t as OdtList } from "./list-DA1hCBVI.js";
|
|
32
|
+
import { t as OdpShape } from "./shape-DyviC6ZG.js";
|
|
33
33
|
import { a as OdgLineVector, c as OdgVectorKind, l as PathVectorInit, n as LineVectorInit, o as OdgPathVector, r as OdgBoxVector, s as OdgVector, t as BoxVectorInit } from "./vector-D03KX8Ux.js";
|
|
34
34
|
import { OdgPage, PageImageInit, TextBoxInit } from "./edit/odg/page.js";
|
|
35
35
|
import { CreateOdgOptions, OdgEditor, createOdg, openOdg } from "./edit/odg/editor.js";
|
|
36
36
|
import { CreateEmptyOdgPackageOptions } from "./edit/odg/scaffold.js";
|
|
37
37
|
import { BuildOdpPackageOptions, buildOdpPackage } from "./edit/odp/content.js";
|
|
38
|
-
import {
|
|
38
|
+
import { a as TableInit$1, i as OdtTableRow, n as OdtTable, r as OdtTableCell } from "./table-BxeHHD7r.js";
|
|
39
39
|
import { OdpSlide, SlideImageInit, SlideTableInit, TextBoxInit as TextBoxInit$1 } from "./edit/odp/slide.js";
|
|
40
40
|
import { CreateOdpOptions, OdpEditor, createOdp, openOdp } from "./edit/odp/editor.js";
|
|
41
41
|
import { CreateEmptyOdpPackageOptions } from "./edit/odp/scaffold.js";
|
|
@@ -51,8 +51,8 @@ import { a as PdfItem, c as PdfLinkInit, d as PdfPathItem, f as PdfRectInit, h a
|
|
|
51
51
|
import { PageInit, PdfPage } from "./edit/pdf/page.js";
|
|
52
52
|
import { CreatePdfOptions, PdfEditor, createPdf, openPdf } from "./edit/pdf/editor.js";
|
|
53
53
|
import { BuildPptxPackageOptions, buildPptxPackage } from "./edit/pptx/content.js";
|
|
54
|
-
import { n as DrawingRunInit, r as PptxShape, t as DrawingParagraphInit } from "./shape-
|
|
55
|
-
import { i as PptxTableRow, n as PptxTableCell, r as PptxTableInit, t as PptxTable } from "./table-
|
|
54
|
+
import { n as DrawingRunInit, r as PptxShape, t as DrawingParagraphInit } from "./shape-D5IoGzf9.js";
|
|
55
|
+
import { i as PptxTableRow, n as PptxTableCell, r as PptxTableInit, t as PptxTable } from "./table-CCdAhdcG.js";
|
|
56
56
|
import { PptxSlide, SlideImageInit as SlideImageInit$1, SlideTableInit as SlideTableInit$1, TextBoxInit as TextBoxInit$2 } from "./edit/pptx/slide.js";
|
|
57
57
|
import { CreatePptxOptions, PptxEditor, createPptx, openPptx } from "./edit/pptx/editor.js";
|
|
58
58
|
import { CreateEmptyPptxPackageOptions } from "./edit/pptx/scaffold.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ParagraphInit, t as OdtParagraph } from "./paragraph-
|
|
1
|
+
import { n as ParagraphInit, t as OdtParagraph } from "./paragraph-DXIJfPMw.cjs";
|
|
2
2
|
import { Package, XmlElement, XmlNode } from "odf.js";
|
|
3
3
|
//#region src/edit/odt/list.d.ts
|
|
4
4
|
declare class OdtListItem {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ParagraphInit, t as OdtParagraph } from "./paragraph-
|
|
1
|
+
import { n as ParagraphInit, t as OdtParagraph } from "./paragraph-DV4_ZNGr.js";
|
|
2
2
|
import { Package, XmlElement, XmlNode } from "odf.js";
|
|
3
3
|
//#region src/edit/odt/list.d.ts
|
|
4
4
|
declare class OdtListItem {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as Alignment } from "./style-DkamR3aY.js";
|
|
2
2
|
import { t as ImageInit } from "./image-DwrOnL_Z.js";
|
|
3
|
-
import { n as RunInit, t as OdtRun } from "./run-
|
|
3
|
+
import { n as RunInit, t as OdtRun } from "./run-SLSPO-4y.js";
|
|
4
4
|
import { Package, XmlElement, XmlNode } from "odf.js";
|
|
5
5
|
//#region src/edit/odt/paragraph.d.ts
|
|
6
6
|
interface ParagraphInit {
|
|
@@ -24,6 +24,16 @@ declare class OdtParagraph {
|
|
|
24
24
|
set styleId(value: string | undefined);
|
|
25
25
|
get alignment(): Alignment | undefined;
|
|
26
26
|
set alignment(value: Alignment | undefined);
|
|
27
|
+
get spacingBeforePt(): number | undefined;
|
|
28
|
+
set spacingBeforePt(value: number | undefined);
|
|
29
|
+
get spacingAfterPt(): number | undefined;
|
|
30
|
+
set spacingAfterPt(value: number | undefined);
|
|
31
|
+
get lineSpacing(): number | undefined;
|
|
32
|
+
set lineSpacing(value: number | undefined);
|
|
33
|
+
get indentLeftPt(): number | undefined;
|
|
34
|
+
set indentLeftPt(value: number | undefined);
|
|
35
|
+
get indentFirstLinePt(): number | undefined;
|
|
36
|
+
set indentFirstLinePt(value: number | undefined);
|
|
27
37
|
insertImageAfter(image: ImageInit): void;
|
|
28
38
|
remove(): void;
|
|
29
39
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as Alignment } from "./style-DkamR3aY.cjs";
|
|
2
2
|
import { t as ImageInit } from "./image-m_rfpuY8.cjs";
|
|
3
|
-
import { n as RunInit, t as OdtRun } from "./run-
|
|
3
|
+
import { n as RunInit, t as OdtRun } from "./run-DQtEGilU.cjs";
|
|
4
4
|
import { Package, XmlElement, XmlNode } from "odf.js";
|
|
5
5
|
//#region src/edit/odt/paragraph.d.ts
|
|
6
6
|
interface ParagraphInit {
|
|
@@ -24,6 +24,16 @@ declare class OdtParagraph {
|
|
|
24
24
|
set styleId(value: string | undefined);
|
|
25
25
|
get alignment(): Alignment | undefined;
|
|
26
26
|
set alignment(value: Alignment | undefined);
|
|
27
|
+
get spacingBeforePt(): number | undefined;
|
|
28
|
+
set spacingBeforePt(value: number | undefined);
|
|
29
|
+
get spacingAfterPt(): number | undefined;
|
|
30
|
+
set spacingAfterPt(value: number | undefined);
|
|
31
|
+
get lineSpacing(): number | undefined;
|
|
32
|
+
set lineSpacing(value: number | undefined);
|
|
33
|
+
get indentLeftPt(): number | undefined;
|
|
34
|
+
set indentLeftPt(value: number | undefined);
|
|
35
|
+
get indentFirstLinePt(): number | undefined;
|
|
36
|
+
set indentFirstLinePt(value: number | undefined);
|
|
27
37
|
insertImageAfter(image: ImageInit): void;
|
|
28
38
|
remove(): void;
|
|
29
39
|
}
|
|
@@ -7,6 +7,7 @@ interface RunInit {
|
|
|
7
7
|
readonly bold?: boolean;
|
|
8
8
|
readonly italic?: boolean;
|
|
9
9
|
readonly underline?: boolean;
|
|
10
|
+
readonly strike?: boolean;
|
|
10
11
|
readonly fontFamily?: string;
|
|
11
12
|
readonly sizePt?: number;
|
|
12
13
|
readonly color?: LayoutColor;
|
|
@@ -24,6 +25,8 @@ declare class DocxRun {
|
|
|
24
25
|
set bold(value: boolean);
|
|
25
26
|
get italic(): boolean;
|
|
26
27
|
set italic(value: boolean);
|
|
28
|
+
get strike(): boolean;
|
|
29
|
+
set strike(value: boolean);
|
|
27
30
|
get underline(): boolean;
|
|
28
31
|
set underline(value: boolean);
|
|
29
32
|
get fontFamily(): string | undefined;
|
|
@@ -7,6 +7,7 @@ interface RunInit {
|
|
|
7
7
|
readonly bold?: boolean;
|
|
8
8
|
readonly italic?: boolean;
|
|
9
9
|
readonly underline?: boolean;
|
|
10
|
+
readonly strike?: boolean;
|
|
10
11
|
readonly fontFamily?: string;
|
|
11
12
|
readonly sizePt?: number;
|
|
12
13
|
readonly color?: LayoutColor;
|
|
@@ -24,6 +25,8 @@ declare class DocxRun {
|
|
|
24
25
|
set bold(value: boolean);
|
|
25
26
|
get italic(): boolean;
|
|
26
27
|
set italic(value: boolean);
|
|
28
|
+
get strike(): boolean;
|
|
29
|
+
set strike(value: boolean);
|
|
27
30
|
get underline(): boolean;
|
|
28
31
|
set underline(value: boolean);
|
|
29
32
|
get fontFamily(): string | undefined;
|
|
@@ -6,6 +6,7 @@ interface RunInit {
|
|
|
6
6
|
readonly bold?: boolean;
|
|
7
7
|
readonly italic?: boolean;
|
|
8
8
|
readonly underline?: boolean;
|
|
9
|
+
readonly strike?: boolean;
|
|
9
10
|
readonly fontFamily?: string;
|
|
10
11
|
readonly sizePt?: number;
|
|
11
12
|
readonly color?: LayoutColor;
|
|
@@ -25,6 +26,8 @@ declare class OdtRun {
|
|
|
25
26
|
set italic(value: boolean);
|
|
26
27
|
get underline(): boolean;
|
|
27
28
|
set underline(value: boolean);
|
|
29
|
+
get strike(): boolean;
|
|
30
|
+
set strike(value: boolean);
|
|
28
31
|
get fontFamily(): string | undefined;
|
|
29
32
|
set fontFamily(value: string);
|
|
30
33
|
get sizePt(): number | undefined;
|
|
@@ -6,6 +6,7 @@ interface RunInit {
|
|
|
6
6
|
readonly bold?: boolean;
|
|
7
7
|
readonly italic?: boolean;
|
|
8
8
|
readonly underline?: boolean;
|
|
9
|
+
readonly strike?: boolean;
|
|
9
10
|
readonly fontFamily?: string;
|
|
10
11
|
readonly sizePt?: number;
|
|
11
12
|
readonly color?: LayoutColor;
|
|
@@ -25,6 +26,8 @@ declare class OdtRun {
|
|
|
25
26
|
set italic(value: boolean);
|
|
26
27
|
get underline(): boolean;
|
|
27
28
|
set underline(value: boolean);
|
|
29
|
+
get strike(): boolean;
|
|
30
|
+
set strike(value: boolean);
|
|
28
31
|
get fontFamily(): string | undefined;
|
|
29
32
|
set fontFamily(value: string);
|
|
30
33
|
get sizePt(): number | undefined;
|
|
@@ -24,6 +24,8 @@ interface DrawingRunInit {
|
|
|
24
24
|
readonly text: string;
|
|
25
25
|
readonly bold?: boolean;
|
|
26
26
|
readonly italic?: boolean;
|
|
27
|
+
readonly underline?: boolean;
|
|
28
|
+
readonly strike?: boolean;
|
|
27
29
|
readonly fontFamily?: string;
|
|
28
30
|
readonly sizePt?: number;
|
|
29
31
|
readonly color?: LayoutColor;
|
|
@@ -24,6 +24,8 @@ interface DrawingRunInit {
|
|
|
24
24
|
readonly text: string;
|
|
25
25
|
readonly bold?: boolean;
|
|
26
26
|
readonly italic?: boolean;
|
|
27
|
+
readonly underline?: boolean;
|
|
28
|
+
readonly strike?: boolean;
|
|
27
29
|
readonly fontFamily?: string;
|
|
28
30
|
readonly sizePt?: number;
|
|
29
31
|
readonly color?: LayoutColor;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as Box } from "./geometry-DaJr8yQW.cjs";
|
|
2
|
-
import { n as ParagraphInit, t as OdtParagraph } from "./paragraph-
|
|
3
|
-
import { t as OdtList } from "./list-
|
|
2
|
+
import { n as ParagraphInit, t as OdtParagraph } from "./paragraph-DXIJfPMw.cjs";
|
|
3
|
+
import { t as OdtList } from "./list-CxoEJwNO.cjs";
|
|
4
4
|
import { Package, XmlElement, XmlNode } from "odf.js";
|
|
5
5
|
//#region src/edit/odp/shape.d.ts
|
|
6
6
|
declare class OdpShape {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as Box } from "./geometry-DaJr8yQW.js";
|
|
2
|
-
import { n as ParagraphInit, t as OdtParagraph } from "./paragraph-
|
|
3
|
-
import { t as OdtList } from "./list-
|
|
2
|
+
import { n as ParagraphInit, t as OdtParagraph } from "./paragraph-DV4_ZNGr.js";
|
|
3
|
+
import { t as OdtList } from "./list-DA1hCBVI.js";
|
|
4
4
|
import { Package, XmlElement, XmlNode } from "odf.js";
|
|
5
5
|
//#region src/edit/odp/shape.d.ts
|
|
6
6
|
declare class OdpShape {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { n as ParagraphInit, t as OdtParagraph } from "./paragraph-
|
|
1
|
+
import { n as ParagraphInit, t as OdtParagraph } from "./paragraph-DXIJfPMw.cjs";
|
|
2
|
+
import { Color, ContentCellBorders } from "document-schema.js";
|
|
2
3
|
import { Package, XmlElement, XmlNode } from "odf.js";
|
|
3
4
|
//#region src/edit/odt/table.d.ts
|
|
4
5
|
interface TableInit {
|
|
@@ -6,6 +7,12 @@ interface TableInit {
|
|
|
6
7
|
readonly columns: number;
|
|
7
8
|
readonly columnWidthsPt?: readonly number[];
|
|
8
9
|
}
|
|
10
|
+
interface CellDecoration {
|
|
11
|
+
readonly background?: Color;
|
|
12
|
+
readonly borders?: ContentCellBorders;
|
|
13
|
+
}
|
|
14
|
+
declare function readCellDecoration(pkg: Package, element: XmlElement): CellDecoration;
|
|
15
|
+
declare function buildCellStyle(pkg: Package, decoration: CellDecoration): string;
|
|
9
16
|
declare class OdtTableCell {
|
|
10
17
|
private readonly node;
|
|
11
18
|
private readonly pkg;
|
|
@@ -17,6 +24,10 @@ declare class OdtTableCell {
|
|
|
17
24
|
set colSpan(value: number | undefined);
|
|
18
25
|
get rowSpan(): number | undefined;
|
|
19
26
|
set rowSpan(value: number | undefined);
|
|
27
|
+
get background(): Color | undefined;
|
|
28
|
+
set background(value: Color | undefined);
|
|
29
|
+
get borders(): ContentCellBorders | undefined;
|
|
30
|
+
set borders(value: ContentCellBorders | undefined);
|
|
20
31
|
}
|
|
21
32
|
declare class OdtTableRow {
|
|
22
33
|
private readonly node;
|
|
@@ -45,4 +56,4 @@ declare class OdtTable {
|
|
|
45
56
|
}
|
|
46
57
|
declare function buildTable(pkg: Package, init: TableInit): XmlElement;
|
|
47
58
|
//#endregion
|
|
48
|
-
export {
|
|
59
|
+
export { TableInit as a, readCellDecoration as c, OdtTableRow as i, OdtTable as n, buildCellStyle as o, OdtTableCell as r, buildTable as s, CellDecoration as t };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { n as ParagraphInit, t as OdtParagraph } from "./paragraph-
|
|
1
|
+
import { n as ParagraphInit, t as OdtParagraph } from "./paragraph-DV4_ZNGr.js";
|
|
2
|
+
import { Color, ContentCellBorders } from "document-schema.js";
|
|
2
3
|
import { Package, XmlElement, XmlNode } from "odf.js";
|
|
3
4
|
//#region src/edit/odt/table.d.ts
|
|
4
5
|
interface TableInit {
|
|
@@ -6,6 +7,12 @@ interface TableInit {
|
|
|
6
7
|
readonly columns: number;
|
|
7
8
|
readonly columnWidthsPt?: readonly number[];
|
|
8
9
|
}
|
|
10
|
+
interface CellDecoration {
|
|
11
|
+
readonly background?: Color;
|
|
12
|
+
readonly borders?: ContentCellBorders;
|
|
13
|
+
}
|
|
14
|
+
declare function readCellDecoration(pkg: Package, element: XmlElement): CellDecoration;
|
|
15
|
+
declare function buildCellStyle(pkg: Package, decoration: CellDecoration): string;
|
|
9
16
|
declare class OdtTableCell {
|
|
10
17
|
private readonly node;
|
|
11
18
|
private readonly pkg;
|
|
@@ -17,6 +24,10 @@ declare class OdtTableCell {
|
|
|
17
24
|
set colSpan(value: number | undefined);
|
|
18
25
|
get rowSpan(): number | undefined;
|
|
19
26
|
set rowSpan(value: number | undefined);
|
|
27
|
+
get background(): Color | undefined;
|
|
28
|
+
set background(value: Color | undefined);
|
|
29
|
+
get borders(): ContentCellBorders | undefined;
|
|
30
|
+
set borders(value: ContentCellBorders | undefined);
|
|
20
31
|
}
|
|
21
32
|
declare class OdtTableRow {
|
|
22
33
|
private readonly node;
|
|
@@ -45,4 +56,4 @@ declare class OdtTable {
|
|
|
45
56
|
}
|
|
46
57
|
declare function buildTable(pkg: Package, init: TableInit): XmlElement;
|
|
47
58
|
//#endregion
|
|
48
|
-
export {
|
|
59
|
+
export { TableInit as a, readCellDecoration as c, OdtTableRow as i, OdtTable as n, buildCellStyle as o, OdtTableCell as r, buildTable as s, CellDecoration as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as Box } from "./geometry-DaJr8yQW.js";
|
|
2
|
-
import { t as DrawingParagraphInit } from "./shape-
|
|
2
|
+
import { t as DrawingParagraphInit } from "./shape-D5IoGzf9.js";
|
|
3
3
|
import { XmlElement } from "ooxml.js";
|
|
4
4
|
//#region src/edit/pptx/table.d.ts
|
|
5
5
|
interface PptxTableInit {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as Box } from "./geometry-DaJr8yQW.cjs";
|
|
2
|
-
import { t as DrawingParagraphInit } from "./shape-
|
|
2
|
+
import { t as DrawingParagraphInit } from "./shape-BwBiRGha.cjs";
|
|
3
3
|
import { XmlElement } from "ooxml.js";
|
|
4
4
|
//#region src/edit/pptx/table.d.ts
|
|
5
5
|
interface PptxTableInit {
|
package/package.json
CHANGED