odf.js 6.2.0 → 6.3.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 +22 -2
- package/dist/{cascade-BDkyOmoo.d.cts → cascade-BpMwrjkB.d.cts} +1 -1
- package/dist/{cascade-CaVinmvp.d.ts → cascade-PDS3hgrP.d.ts} +1 -1
- package/dist/{codec-B72LApRl.d.cts → codec-BnzBd5_I.d.cts} +10 -8
- package/dist/{codec-rbZGlr37.d.ts → codec-Dg_HWuH1.d.ts} +10 -8
- package/dist/codec.d.cts +1 -1
- package/dist/codec.d.ts +1 -1
- package/dist/{embedded-UQQNFd5U.js → embedded-BONPxvS3.js} +1 -2
- package/dist/{embedded-BsO-SvtW.cjs → embedded-wrtHCJ68.cjs} +1 -2
- package/dist/index.cjs +20 -1
- package/dist/index.d.cts +12 -10
- package/dist/index.d.ts +12 -10
- package/dist/index.js +9 -7
- package/dist/{list-DwTyo_B2.d.cts → list-Bttwr1mk.d.cts} +7 -1
- package/dist/{list-X_GJY7P3.d.ts → list-vhXd0Jf6.d.ts} +7 -1
- package/dist/metadata-BUzwE_-u.d.ts +10 -0
- package/dist/metadata-CYXgXL_h.d.cts +10 -0
- package/dist/ooo1/read.cjs +1 -1
- package/dist/ooo1/read.js +1 -1
- package/dist/package-io/scaffold.cjs +64 -0
- package/dist/package-io/scaffold.d.cts +2 -0
- package/dist/package-io/scaffold.d.ts +2 -0
- package/dist/package-io/scaffold.js +61 -0
- package/dist/paragraph-BdwsQisB.d.cts +28 -0
- package/dist/paragraph-BoVy1LrN.d.ts +28 -0
- package/dist/{registry-Dajfxsbz.d.ts → registry-C_16-N6i.d.ts} +2 -0
- package/dist/{registry-B-ZkdQv1.d.cts → registry-PoQIRgbY.d.cts} +2 -0
- package/dist/scaffold-44EIMGll.d.cts +8 -0
- package/dist/scaffold-ehGsIpZ5.d.ts +8 -0
- package/dist/{shapes-BCjeY90t.d.cts → shapes-BQhXAk0D.d.cts} +1 -1
- package/dist/{shapes-QkOsc-WT.d.ts → shapes-DUzrrf7b.d.ts} +1 -1
- package/dist/styles/properties.cjs +1 -1
- package/dist/styles/properties.js +2 -2
- package/dist/styles/registry.cjs +9 -6
- package/dist/styles/registry.d.cts +1 -1
- package/dist/styles/registry.d.ts +1 -1
- package/dist/styles/registry.js +9 -6
- package/dist/{table-CYvFMlP6.d.cts → table-ByhqRnSG.d.cts} +3 -1
- package/dist/{table-DclDgC5h.d.ts → table-DElqGcT0.d.ts} +3 -1
- package/dist/text-B8350HA2.d.ts +17 -0
- package/dist/text-pmlTqzgi.d.cts +17 -0
- package/dist/typed/draw/embedded.cjs +1 -1
- package/dist/typed/draw/embedded.js +1 -1
- package/dist/typed/draw/shapes.d.cts +1 -1
- package/dist/typed/draw/shapes.d.ts +1 -1
- package/dist/typed/odb/form.cjs +1 -1
- package/dist/typed/odb/form.js +1 -1
- package/dist/typed/ods/read.cjs +1 -1
- package/dist/typed/ods/read.js +1 -1
- package/dist/typed/odt/read.cjs +1 -1
- package/dist/typed/odt/read.js +1 -1
- package/dist/typed/odt/write.cjs +409 -0
- package/dist/typed/odt/write.d.cts +2 -0
- package/dist/typed/odt/write.d.ts +2 -0
- package/dist/typed/odt/write.js +406 -0
- package/dist/typed/shared/cascade.d.cts +1 -1
- package/dist/typed/shared/cascade.d.ts +1 -1
- package/dist/typed/shared/list.cjs +49 -0
- package/dist/typed/shared/list.d.cts +2 -2
- package/dist/typed/shared/list.d.ts +2 -2
- package/dist/typed/shared/list.js +48 -1
- package/dist/typed/shared/metadata.cjs +41 -0
- package/dist/typed/shared/metadata.d.cts +2 -2
- package/dist/typed/shared/metadata.d.ts +2 -2
- package/dist/typed/shared/metadata.js +41 -2
- package/dist/typed/shared/paragraph.cjs +118 -2
- package/dist/typed/shared/paragraph.d.cts +2 -2
- package/dist/typed/shared/paragraph.d.ts +2 -2
- package/dist/typed/shared/paragraph.js +117 -5
- package/dist/typed/shared/table.cjs +81 -0
- package/dist/typed/shared/table.d.cts +2 -2
- package/dist/typed/shared/table.d.ts +2 -2
- package/dist/typed/shared/table.js +84 -4
- package/dist/typed/shared/text.cjs +60 -0
- package/dist/typed/shared/text.d.cts +2 -2
- package/dist/typed/shared/text.d.ts +2 -2
- package/dist/typed/shared/text.js +60 -2
- package/dist/write-7Uu_wlkL.d.cts +13 -0
- package/dist/write-DGcI9W7Z.d.ts +13 -0
- package/package.json +2 -2
- package/dist/metadata-01SgHkRR.d.cts +0 -7
- package/dist/metadata-D1SOBTh8.d.ts +0 -7
- package/dist/paragraph-ByTzS8Li.d.ts +0 -18
- package/dist/paragraph-CVULactG.d.cts +0 -18
- package/dist/text-Bn3C7lnm.d.ts +0 -10
- package/dist/text-CDUCcwje.d.cts +0 -10
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_xml_fragment = require("../../xml/fragment.cjs");
|
|
2
3
|
const require_xml_entities = require("../../xml/entities.cjs");
|
|
3
4
|
const require_styles_properties = require("../../styles/properties.cjs");
|
|
5
|
+
const require_styles_serialize = require("../../styles/serialize.cjs");
|
|
4
6
|
const require_xml_query = require("../../xml/query.cjs");
|
|
5
7
|
const require_typed_shared_text = require("./text.cjs");
|
|
6
8
|
const require_typed_shared_cascade = require("./cascade.cjs");
|
|
@@ -42,8 +44,10 @@ function collectRuns(container, baseProperties, pkg, out, walk, hyperlinkTarget)
|
|
|
42
44
|
...baseProperties,
|
|
43
45
|
...require_typed_shared_cascade.resolveStyle(styleName, "text", pkg).properties
|
|
44
46
|
}, pkg, out, walk, hyperlinkTarget);
|
|
45
|
-
} else if (node.tag === "text:a")
|
|
46
|
-
|
|
47
|
+
} else if (node.tag === "text:a") {
|
|
48
|
+
const rawHref = require_xml_query.attrValue(node, "xlink:href");
|
|
49
|
+
collectRuns(node, baseProperties, pkg, out, walk, (rawHref === void 0 ? void 0 : require_xml_entities.decodeXmlText(rawHref)) ?? hyperlinkTarget);
|
|
50
|
+
} else if (require_typed_shared_text.isOdfFieldElement(node)) {
|
|
47
51
|
const startRun = out.length;
|
|
48
52
|
collectRuns(node, baseProperties, pkg, out, walk, hyperlinkTarget);
|
|
49
53
|
walk.extents.push({
|
|
@@ -277,7 +281,119 @@ function readParagraphOrHeading(element, paragraph) {
|
|
|
277
281
|
}
|
|
278
282
|
return paragraph;
|
|
279
283
|
}
|
|
284
|
+
function odfRunProperties(run) {
|
|
285
|
+
const properties = {};
|
|
286
|
+
if (run.bold !== void 0) properties.bold = run.bold;
|
|
287
|
+
if (run.italic !== void 0) properties.italic = run.italic;
|
|
288
|
+
if (run.underline !== void 0) properties.underline = run.underline;
|
|
289
|
+
if (run.strike !== void 0) properties.strike = run.strike;
|
|
290
|
+
if (run.fontFamily !== void 0) properties.fontFamily = run.fontFamily;
|
|
291
|
+
if (run.sizePt !== void 0) properties.sizePt = run.sizePt;
|
|
292
|
+
if (run.color !== void 0) properties.color = run.color;
|
|
293
|
+
return properties;
|
|
294
|
+
}
|
|
295
|
+
function odfParagraphProperties(paragraph) {
|
|
296
|
+
const properties = {};
|
|
297
|
+
if (paragraph.alignment !== void 0) properties.alignment = paragraph.alignment;
|
|
298
|
+
if (paragraph.spacingBeforePt !== void 0) properties.spacingBeforePt = paragraph.spacingBeforePt;
|
|
299
|
+
if (paragraph.spacingAfterPt !== void 0) properties.spacingAfterPt = paragraph.spacingAfterPt;
|
|
300
|
+
if (paragraph.lineSpacing !== void 0) properties.lineSpacing = paragraph.lineSpacing;
|
|
301
|
+
if (paragraph.indentLeftPt !== void 0) properties.indentLeftPt = paragraph.indentLeftPt;
|
|
302
|
+
if (paragraph.indentFirstLinePt !== void 0) properties.indentFirstLinePt = paragraph.indentFirstLinePt;
|
|
303
|
+
if (paragraph.pageBreakBefore !== void 0) properties.pageBreakBefore = paragraph.pageBreakBefore;
|
|
304
|
+
if (paragraph.pageBreakAfter !== void 0) properties.pageBreakAfter = paragraph.pageBreakAfter;
|
|
305
|
+
return properties;
|
|
306
|
+
}
|
|
307
|
+
const KEY_SEPARATOR = "\0";
|
|
308
|
+
function runFormattingKey(run) {
|
|
309
|
+
const hyperlink = run.hyperlink === void 0 ? "" : `link${KEY_SEPARATOR}${run.hyperlink}`;
|
|
310
|
+
return `${require_styles_serialize.canonicalPropertiesString(odfRunProperties(run))}${KEY_SEPARATOR}${hyperlink}`;
|
|
311
|
+
}
|
|
312
|
+
function segmentOdfParagraphRuns(runs) {
|
|
313
|
+
const merged = [];
|
|
314
|
+
for (const run of runs) {
|
|
315
|
+
if (run.text.length === 0) continue;
|
|
316
|
+
const previous = merged[merged.length - 1];
|
|
317
|
+
if (previous !== void 0 && runFormattingKey(previous) === runFormattingKey(run)) {
|
|
318
|
+
merged[merged.length - 1] = {
|
|
319
|
+
...previous,
|
|
320
|
+
text: previous.text + run.text
|
|
321
|
+
};
|
|
322
|
+
continue;
|
|
323
|
+
}
|
|
324
|
+
merged.push(run);
|
|
325
|
+
}
|
|
326
|
+
const canonical = [];
|
|
327
|
+
for (const [index, run] of merged.entries()) {
|
|
328
|
+
const previousText = merged[index - 1]?.text;
|
|
329
|
+
const nextText = merged[index + 1]?.text;
|
|
330
|
+
const protectLeading = previousText === void 0 || previousText.endsWith(" ");
|
|
331
|
+
const protectTrailing = nextText === void 0 || nextText.startsWith(" ");
|
|
332
|
+
for (const segment of require_typed_shared_text.segmentOdfText(run.text, protectLeading, protectTrailing)) canonical.push({
|
|
333
|
+
...run,
|
|
334
|
+
text: segment.text
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
return canonical;
|
|
338
|
+
}
|
|
339
|
+
function writeOdfFormattedRunNodes(canonical, from, to, registry) {
|
|
340
|
+
const nodes = [];
|
|
341
|
+
let index = from;
|
|
342
|
+
while (index < to) {
|
|
343
|
+
const properties = odfRunProperties(canonical[index]);
|
|
344
|
+
const key = require_styles_serialize.canonicalPropertiesString(properties);
|
|
345
|
+
let end = index + 1;
|
|
346
|
+
while (end < to && require_styles_serialize.canonicalPropertiesString(odfRunProperties(canonical[end])) === key) end += 1;
|
|
347
|
+
const inner = [];
|
|
348
|
+
for (let position = index; position < end; position += 1) {
|
|
349
|
+
const previousText = canonical[position - 1]?.text;
|
|
350
|
+
const nextText = canonical[position + 1]?.text;
|
|
351
|
+
inner.push(...require_typed_shared_text.buildOdfInlineNodes(require_typed_shared_text.segmentOdfText(canonical[position].text, previousText === void 0 || previousText.endsWith(" "), nextText === void 0 || nextText.startsWith(" "))));
|
|
352
|
+
}
|
|
353
|
+
if (Object.keys(properties).length === 0) nodes.push(...inner);
|
|
354
|
+
else nodes.push(require_xml_fragment.el("text:span", { "text:style-name": require_xml_entities.encodeXmlText(registry.intern({
|
|
355
|
+
properties,
|
|
356
|
+
family: "text"
|
|
357
|
+
})) }, inner));
|
|
358
|
+
index = end;
|
|
359
|
+
}
|
|
360
|
+
return nodes;
|
|
361
|
+
}
|
|
362
|
+
function writeOdfParagraphChildren(runs, registry) {
|
|
363
|
+
const canonical = segmentOdfParagraphRuns(runs);
|
|
364
|
+
const children = [];
|
|
365
|
+
let index = 0;
|
|
366
|
+
while (index < canonical.length) {
|
|
367
|
+
const target = canonical[index].hyperlink;
|
|
368
|
+
let end = index + 1;
|
|
369
|
+
while (end < canonical.length && canonical[end].hyperlink === target) end += 1;
|
|
370
|
+
const nodes = writeOdfFormattedRunNodes(canonical, index, end, registry);
|
|
371
|
+
if (target === void 0) children.push(...nodes);
|
|
372
|
+
else children.push(require_xml_fragment.el("text:a", {
|
|
373
|
+
"xlink:type": "simple",
|
|
374
|
+
"xlink:href": require_xml_entities.encodeXmlText(target)
|
|
375
|
+
}, nodes));
|
|
376
|
+
index = end;
|
|
377
|
+
}
|
|
378
|
+
return children;
|
|
379
|
+
}
|
|
380
|
+
function writeOdfParagraph(paragraph, registry, options = {}) {
|
|
381
|
+
const properties = odfParagraphProperties(paragraph);
|
|
382
|
+
const attributes = {};
|
|
383
|
+
if (Object.keys(properties).length > 0) attributes["text:style-name"] = require_xml_entities.encodeXmlText(registry.intern({
|
|
384
|
+
properties,
|
|
385
|
+
family: "paragraph",
|
|
386
|
+
...options.parentStyleName === void 0 ? {} : { parentStyleName: options.parentStyleName }
|
|
387
|
+
}));
|
|
388
|
+
else if (options.parentStyleName !== void 0) attributes["text:style-name"] = require_xml_entities.encodeXmlText(options.parentStyleName);
|
|
389
|
+
if (paragraph.headingLevel !== void 0) attributes["text:outline-level"] = String(paragraph.headingLevel);
|
|
390
|
+
return require_xml_fragment.el(paragraph.headingLevel === void 0 ? "text:p" : "text:h", attributes, [...writeOdfParagraphChildren(paragraph.runs, registry), ...options.trailingNodes ?? []]);
|
|
391
|
+
}
|
|
280
392
|
//#endregion
|
|
393
|
+
exports.odfParagraphProperties = odfParagraphProperties;
|
|
394
|
+
exports.odfRunProperties = odfRunProperties;
|
|
281
395
|
exports.readOdfConstructBodyBlocks = readOdfConstructBodyBlocks;
|
|
282
396
|
exports.readOdfParagraph = readOdfParagraph;
|
|
283
397
|
exports.readParagraphOrHeading = readParagraphOrHeading;
|
|
398
|
+
exports.segmentOdfParagraphRuns = segmentOdfParagraphRuns;
|
|
399
|
+
exports.writeOdfParagraph = writeOdfParagraph;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
export { OdfParagraphContext, readOdfConstructBodyBlocks, readOdfParagraph, readParagraphOrHeading };
|
|
1
|
+
import { a as readOdfConstructBodyBlocks, c as segmentOdfParagraphRuns, i as odfRunProperties, l as writeOdfParagraph, n as OdfParagraphWriteOptions, o as readOdfParagraph, r as odfParagraphProperties, s as readParagraphOrHeading, t as OdfParagraphContext } from "../../paragraph-BdwsQisB.cjs";
|
|
2
|
+
export { OdfParagraphContext, OdfParagraphWriteOptions, odfParagraphProperties, odfRunProperties, readOdfConstructBodyBlocks, readOdfParagraph, readParagraphOrHeading, segmentOdfParagraphRuns, writeOdfParagraph };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
export { OdfParagraphContext, readOdfConstructBodyBlocks, readOdfParagraph, readParagraphOrHeading };
|
|
1
|
+
import { a as readOdfConstructBodyBlocks, c as segmentOdfParagraphRuns, i as odfRunProperties, l as writeOdfParagraph, n as OdfParagraphWriteOptions, o as readOdfParagraph, r as odfParagraphProperties, s as readParagraphOrHeading, t as OdfParagraphContext } from "../../paragraph-BoVy1LrN.js";
|
|
2
|
+
export { OdfParagraphContext, OdfParagraphWriteOptions, odfParagraphProperties, odfRunProperties, readOdfConstructBodyBlocks, readOdfParagraph, readParagraphOrHeading, segmentOdfParagraphRuns, writeOdfParagraph };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { el } from "../../xml/fragment.js";
|
|
2
|
+
import { decodeXmlText, encodeXmlText } from "../../xml/entities.js";
|
|
2
3
|
import { parseParagraphProperties, parseTextProperties } from "../../styles/properties.js";
|
|
4
|
+
import { canonicalPropertiesString } from "../../styles/serialize.js";
|
|
3
5
|
import { attrValue, childrenWithTag, findChildElement } from "../../xml/query.js";
|
|
4
|
-
import { decodeOdfText, getOdfSpaceCount, isOdfFieldElement } from "./text.js";
|
|
6
|
+
import { buildOdfInlineNodes, decodeOdfText, getOdfSpaceCount, isOdfFieldElement, segmentOdfText } from "./text.js";
|
|
5
7
|
import { resolveStyle, resolveStyleElementChain } from "./cascade.js";
|
|
6
8
|
import { mintOdfListNumId, readOdfListParagraphs } from "./list.js";
|
|
7
9
|
import { isOdfBlockScopedHalf, isOdfExtensionElement, odfAttributeElement, odfBookmarkAnchorDescriptor, odfFieldDescriptor, odfResidue, pairOdfMarkerHalves } from "./constructs.js";
|
|
@@ -41,8 +43,10 @@ function collectRuns(container, baseProperties, pkg, out, walk, hyperlinkTarget)
|
|
|
41
43
|
...baseProperties,
|
|
42
44
|
...resolveStyle(styleName, "text", pkg).properties
|
|
43
45
|
}, pkg, out, walk, hyperlinkTarget);
|
|
44
|
-
} else if (node.tag === "text:a")
|
|
45
|
-
|
|
46
|
+
} else if (node.tag === "text:a") {
|
|
47
|
+
const rawHref = attrValue(node, "xlink:href");
|
|
48
|
+
collectRuns(node, baseProperties, pkg, out, walk, (rawHref === void 0 ? void 0 : decodeXmlText(rawHref)) ?? hyperlinkTarget);
|
|
49
|
+
} else if (isOdfFieldElement(node)) {
|
|
46
50
|
const startRun = out.length;
|
|
47
51
|
collectRuns(node, baseProperties, pkg, out, walk, hyperlinkTarget);
|
|
48
52
|
walk.extents.push({
|
|
@@ -276,5 +280,113 @@ function readParagraphOrHeading(element, paragraph) {
|
|
|
276
280
|
}
|
|
277
281
|
return paragraph;
|
|
278
282
|
}
|
|
283
|
+
function odfRunProperties(run) {
|
|
284
|
+
const properties = {};
|
|
285
|
+
if (run.bold !== void 0) properties.bold = run.bold;
|
|
286
|
+
if (run.italic !== void 0) properties.italic = run.italic;
|
|
287
|
+
if (run.underline !== void 0) properties.underline = run.underline;
|
|
288
|
+
if (run.strike !== void 0) properties.strike = run.strike;
|
|
289
|
+
if (run.fontFamily !== void 0) properties.fontFamily = run.fontFamily;
|
|
290
|
+
if (run.sizePt !== void 0) properties.sizePt = run.sizePt;
|
|
291
|
+
if (run.color !== void 0) properties.color = run.color;
|
|
292
|
+
return properties;
|
|
293
|
+
}
|
|
294
|
+
function odfParagraphProperties(paragraph) {
|
|
295
|
+
const properties = {};
|
|
296
|
+
if (paragraph.alignment !== void 0) properties.alignment = paragraph.alignment;
|
|
297
|
+
if (paragraph.spacingBeforePt !== void 0) properties.spacingBeforePt = paragraph.spacingBeforePt;
|
|
298
|
+
if (paragraph.spacingAfterPt !== void 0) properties.spacingAfterPt = paragraph.spacingAfterPt;
|
|
299
|
+
if (paragraph.lineSpacing !== void 0) properties.lineSpacing = paragraph.lineSpacing;
|
|
300
|
+
if (paragraph.indentLeftPt !== void 0) properties.indentLeftPt = paragraph.indentLeftPt;
|
|
301
|
+
if (paragraph.indentFirstLinePt !== void 0) properties.indentFirstLinePt = paragraph.indentFirstLinePt;
|
|
302
|
+
if (paragraph.pageBreakBefore !== void 0) properties.pageBreakBefore = paragraph.pageBreakBefore;
|
|
303
|
+
if (paragraph.pageBreakAfter !== void 0) properties.pageBreakAfter = paragraph.pageBreakAfter;
|
|
304
|
+
return properties;
|
|
305
|
+
}
|
|
306
|
+
const KEY_SEPARATOR = "\0";
|
|
307
|
+
function runFormattingKey(run) {
|
|
308
|
+
const hyperlink = run.hyperlink === void 0 ? "" : `link${KEY_SEPARATOR}${run.hyperlink}`;
|
|
309
|
+
return `${canonicalPropertiesString(odfRunProperties(run))}${KEY_SEPARATOR}${hyperlink}`;
|
|
310
|
+
}
|
|
311
|
+
function segmentOdfParagraphRuns(runs) {
|
|
312
|
+
const merged = [];
|
|
313
|
+
for (const run of runs) {
|
|
314
|
+
if (run.text.length === 0) continue;
|
|
315
|
+
const previous = merged[merged.length - 1];
|
|
316
|
+
if (previous !== void 0 && runFormattingKey(previous) === runFormattingKey(run)) {
|
|
317
|
+
merged[merged.length - 1] = {
|
|
318
|
+
...previous,
|
|
319
|
+
text: previous.text + run.text
|
|
320
|
+
};
|
|
321
|
+
continue;
|
|
322
|
+
}
|
|
323
|
+
merged.push(run);
|
|
324
|
+
}
|
|
325
|
+
const canonical = [];
|
|
326
|
+
for (const [index, run] of merged.entries()) {
|
|
327
|
+
const previousText = merged[index - 1]?.text;
|
|
328
|
+
const nextText = merged[index + 1]?.text;
|
|
329
|
+
const protectLeading = previousText === void 0 || previousText.endsWith(" ");
|
|
330
|
+
const protectTrailing = nextText === void 0 || nextText.startsWith(" ");
|
|
331
|
+
for (const segment of segmentOdfText(run.text, protectLeading, protectTrailing)) canonical.push({
|
|
332
|
+
...run,
|
|
333
|
+
text: segment.text
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
return canonical;
|
|
337
|
+
}
|
|
338
|
+
function writeOdfFormattedRunNodes(canonical, from, to, registry) {
|
|
339
|
+
const nodes = [];
|
|
340
|
+
let index = from;
|
|
341
|
+
while (index < to) {
|
|
342
|
+
const properties = odfRunProperties(canonical[index]);
|
|
343
|
+
const key = canonicalPropertiesString(properties);
|
|
344
|
+
let end = index + 1;
|
|
345
|
+
while (end < to && canonicalPropertiesString(odfRunProperties(canonical[end])) === key) end += 1;
|
|
346
|
+
const inner = [];
|
|
347
|
+
for (let position = index; position < end; position += 1) {
|
|
348
|
+
const previousText = canonical[position - 1]?.text;
|
|
349
|
+
const nextText = canonical[position + 1]?.text;
|
|
350
|
+
inner.push(...buildOdfInlineNodes(segmentOdfText(canonical[position].text, previousText === void 0 || previousText.endsWith(" "), nextText === void 0 || nextText.startsWith(" "))));
|
|
351
|
+
}
|
|
352
|
+
if (Object.keys(properties).length === 0) nodes.push(...inner);
|
|
353
|
+
else nodes.push(el("text:span", { "text:style-name": encodeXmlText(registry.intern({
|
|
354
|
+
properties,
|
|
355
|
+
family: "text"
|
|
356
|
+
})) }, inner));
|
|
357
|
+
index = end;
|
|
358
|
+
}
|
|
359
|
+
return nodes;
|
|
360
|
+
}
|
|
361
|
+
function writeOdfParagraphChildren(runs, registry) {
|
|
362
|
+
const canonical = segmentOdfParagraphRuns(runs);
|
|
363
|
+
const children = [];
|
|
364
|
+
let index = 0;
|
|
365
|
+
while (index < canonical.length) {
|
|
366
|
+
const target = canonical[index].hyperlink;
|
|
367
|
+
let end = index + 1;
|
|
368
|
+
while (end < canonical.length && canonical[end].hyperlink === target) end += 1;
|
|
369
|
+
const nodes = writeOdfFormattedRunNodes(canonical, index, end, registry);
|
|
370
|
+
if (target === void 0) children.push(...nodes);
|
|
371
|
+
else children.push(el("text:a", {
|
|
372
|
+
"xlink:type": "simple",
|
|
373
|
+
"xlink:href": encodeXmlText(target)
|
|
374
|
+
}, nodes));
|
|
375
|
+
index = end;
|
|
376
|
+
}
|
|
377
|
+
return children;
|
|
378
|
+
}
|
|
379
|
+
function writeOdfParagraph(paragraph, registry, options = {}) {
|
|
380
|
+
const properties = odfParagraphProperties(paragraph);
|
|
381
|
+
const attributes = {};
|
|
382
|
+
if (Object.keys(properties).length > 0) attributes["text:style-name"] = encodeXmlText(registry.intern({
|
|
383
|
+
properties,
|
|
384
|
+
family: "paragraph",
|
|
385
|
+
...options.parentStyleName === void 0 ? {} : { parentStyleName: options.parentStyleName }
|
|
386
|
+
}));
|
|
387
|
+
else if (options.parentStyleName !== void 0) attributes["text:style-name"] = encodeXmlText(options.parentStyleName);
|
|
388
|
+
if (paragraph.headingLevel !== void 0) attributes["text:outline-level"] = String(paragraph.headingLevel);
|
|
389
|
+
return el(paragraph.headingLevel === void 0 ? "text:p" : "text:h", attributes, [...writeOdfParagraphChildren(paragraph.runs, registry), ...options.trailingNodes ?? []]);
|
|
390
|
+
}
|
|
279
391
|
//#endregion
|
|
280
|
-
export { readOdfConstructBodyBlocks, readOdfParagraph, readParagraphOrHeading };
|
|
392
|
+
export { odfParagraphProperties, odfRunProperties, readOdfConstructBodyBlocks, readOdfParagraph, readParagraphOrHeading, segmentOdfParagraphRuns, writeOdfParagraph };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_xml_fragment = require("../../xml/fragment.cjs");
|
|
3
|
+
const require_xml_entities = require("../../xml/entities.cjs");
|
|
2
4
|
const require_typed_shared_units = require("./units.cjs");
|
|
3
5
|
const require_typed_shared_color = require("./color.cjs");
|
|
4
6
|
const require_xml_query = require("../../xml/query.cjs");
|
|
@@ -152,6 +154,84 @@ function readTableRow(rowElement, pkg) {
|
|
|
152
154
|
heightPt: resolveRowHeightPt(rowElement, pkg)
|
|
153
155
|
};
|
|
154
156
|
}
|
|
157
|
+
function tableColumnStyle(widthPt, registry) {
|
|
158
|
+
if (widthPt <= 0) return;
|
|
159
|
+
return registry.intern({
|
|
160
|
+
properties: {},
|
|
161
|
+
family: "table-column",
|
|
162
|
+
propertyElements: [require_xml_fragment.el("style:table-column-properties", { "style:column-width": require_typed_shared_units.formatOdfLength(widthPt) })]
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
function tableRowStyle(heightPt, registry) {
|
|
166
|
+
if (heightPt === void 0) return;
|
|
167
|
+
return registry.intern({
|
|
168
|
+
properties: {},
|
|
169
|
+
family: "table-row",
|
|
170
|
+
propertyElements: [require_xml_fragment.el("style:table-row-properties", { "style:row-height": require_typed_shared_units.formatOdfLength(heightPt) })]
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
function formatBorderEdge(border) {
|
|
174
|
+
return `${require_typed_shared_units.formatOdfLength(border.widthPt)} ${border.style ?? "solid"} ${require_typed_shared_color.formatOdfColor(border.color)}`;
|
|
175
|
+
}
|
|
176
|
+
function tableCellStyle(cell, registry) {
|
|
177
|
+
const attributes = {};
|
|
178
|
+
if (cell.background !== void 0) attributes["fo:background-color"] = require_typed_shared_color.formatOdfColor(cell.background);
|
|
179
|
+
const borders = cell.borders;
|
|
180
|
+
if (borders !== void 0) for (const edge of BORDER_EDGE_KEYS) {
|
|
181
|
+
const border = borders[edge];
|
|
182
|
+
if (border !== void 0) attributes[BORDER_EDGE_ATTRS[edge]] = formatBorderEdge(border);
|
|
183
|
+
}
|
|
184
|
+
if (Object.keys(attributes).length === 0) return;
|
|
185
|
+
return registry.intern({
|
|
186
|
+
properties: {},
|
|
187
|
+
family: "table-cell",
|
|
188
|
+
propertyElements: [require_xml_fragment.el("style:table-cell-properties", attributes)]
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
function writeCellBlocks(cell, registry) {
|
|
192
|
+
return cell.blocks.map((block) => {
|
|
193
|
+
if (block.kind !== "paragraph") throw new Error(`writeOdfTable: a table cell carrying a "${block.kind}" block cannot be written -- odf.js's table reader reads only paragraphs and headings out of a cell, so writing one would lose it on the way back in`);
|
|
194
|
+
return require_typed_shared_paragraph.writeOdfParagraph(block, registry);
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
function coverageKey(row, column) {
|
|
198
|
+
return `${row},${column}`;
|
|
199
|
+
}
|
|
200
|
+
function writeOdfTable(table, registry, tableName) {
|
|
201
|
+
const columns = table.columnWidthsPt.map((widthPt) => {
|
|
202
|
+
const styleName = tableColumnStyle(widthPt, registry);
|
|
203
|
+
return require_xml_fragment.el("table:table-column", styleName === void 0 ? {} : { "table:style-name": require_xml_entities.encodeXmlText(styleName) });
|
|
204
|
+
});
|
|
205
|
+
const covered = /* @__PURE__ */ new Set();
|
|
206
|
+
const rows = table.rows.map((row, rowIndex) => {
|
|
207
|
+
const cells = row.cells.map((cell, columnIndex) => {
|
|
208
|
+
if (covered.has(coverageKey(rowIndex, columnIndex))) return require_xml_fragment.el("table:covered-table-cell");
|
|
209
|
+
const colSpan = cell.colSpan ?? 1;
|
|
210
|
+
const rowSpan = cell.rowSpan ?? 1;
|
|
211
|
+
for (let r = rowIndex; r < rowIndex + rowSpan; r += 1) for (let c = columnIndex; c < columnIndex + colSpan; c += 1) if (r !== rowIndex || c !== columnIndex) covered.add(coverageKey(r, c));
|
|
212
|
+
const attributes = {};
|
|
213
|
+
const styleName = tableCellStyle(cell, registry);
|
|
214
|
+
if (styleName !== void 0) attributes["table:style-name"] = require_xml_entities.encodeXmlText(styleName);
|
|
215
|
+
if (cell.colSpan !== void 0) attributes["table:number-columns-spanned"] = String(cell.colSpan);
|
|
216
|
+
if (cell.rowSpan !== void 0) attributes["table:number-rows-spanned"] = String(cell.rowSpan);
|
|
217
|
+
return require_xml_fragment.el("table:table-cell", attributes, writeCellBlocks(cell, registry));
|
|
218
|
+
});
|
|
219
|
+
const rowStyleName = tableRowStyle(row.heightPt, registry);
|
|
220
|
+
return require_xml_fragment.el("table:table-row", rowStyleName === void 0 ? {} : { "table:style-name": require_xml_entities.encodeXmlText(rowStyleName) }, cells);
|
|
221
|
+
});
|
|
222
|
+
const totalWidthPt = table.columnWidthsPt.reduce((total, widthPt) => total + widthPt, 0);
|
|
223
|
+
const tableProperties = { "table:align": "margins" };
|
|
224
|
+
if (totalWidthPt > 0) tableProperties["style:width"] = require_typed_shared_units.formatOdfLength(totalWidthPt);
|
|
225
|
+
const tableStyleName = registry.intern({
|
|
226
|
+
properties: {},
|
|
227
|
+
family: "table",
|
|
228
|
+
propertyElements: [require_xml_fragment.el("style:table-properties", tableProperties)]
|
|
229
|
+
});
|
|
230
|
+
return require_xml_fragment.el("table:table", {
|
|
231
|
+
"table:name": require_xml_entities.encodeXmlText(tableName),
|
|
232
|
+
"table:style-name": require_xml_entities.encodeXmlText(tableStyleName)
|
|
233
|
+
}, [...columns, ...rows]);
|
|
234
|
+
}
|
|
155
235
|
function readOdfTable(tableElement, pkg) {
|
|
156
236
|
const columnWidthsPt = [];
|
|
157
237
|
for (const column of require_xml_query.childrenWithTag(tableElement, "table:table-column")) {
|
|
@@ -174,3 +254,4 @@ function readOdfTable(tableElement, pkg) {
|
|
|
174
254
|
//#endregion
|
|
175
255
|
exports.readCellStyleDecoration = readCellStyleDecoration;
|
|
176
256
|
exports.readOdfTable = readOdfTable;
|
|
257
|
+
exports.writeOdfTable = writeOdfTable;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as readCellStyleDecoration, r as readOdfTable, t as CellStyleDecoration } from "../../table-
|
|
2
|
-
export { CellStyleDecoration, readCellStyleDecoration, readOdfTable };
|
|
1
|
+
import { i as writeOdfTable, n as readCellStyleDecoration, r as readOdfTable, t as CellStyleDecoration } from "../../table-ByhqRnSG.cjs";
|
|
2
|
+
export { CellStyleDecoration, readCellStyleDecoration, readOdfTable, writeOdfTable };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as readCellStyleDecoration, r as readOdfTable, t as CellStyleDecoration } from "../../table-
|
|
2
|
-
export { CellStyleDecoration, readCellStyleDecoration, readOdfTable };
|
|
1
|
+
import { i as writeOdfTable, n as readCellStyleDecoration, r as readOdfTable, t as CellStyleDecoration } from "../../table-DElqGcT0.js";
|
|
2
|
+
export { CellStyleDecoration, readCellStyleDecoration, readOdfTable, writeOdfTable };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { el } from "../../xml/fragment.js";
|
|
2
|
+
import { encodeXmlText } from "../../xml/entities.js";
|
|
3
|
+
import { formatOdfLength, parseOdfLength } from "./units.js";
|
|
4
|
+
import { formatOdfColor, parseOdfColor } from "./color.js";
|
|
3
5
|
import { attrValue, childrenWithTag } from "../../xml/query.js";
|
|
4
6
|
import { findStyleElement } from "./cascade.js";
|
|
5
|
-
import { readOdfParagraph, readParagraphOrHeading } from "./paragraph.js";
|
|
7
|
+
import { readOdfParagraph, readParagraphOrHeading, writeOdfParagraph } from "./paragraph.js";
|
|
6
8
|
//#region src/typed/shared/table.ts
|
|
7
9
|
function readRepeatCount(element, attrName) {
|
|
8
10
|
const raw = attrValue(element, attrName);
|
|
@@ -151,6 +153,84 @@ function readTableRow(rowElement, pkg) {
|
|
|
151
153
|
heightPt: resolveRowHeightPt(rowElement, pkg)
|
|
152
154
|
};
|
|
153
155
|
}
|
|
156
|
+
function tableColumnStyle(widthPt, registry) {
|
|
157
|
+
if (widthPt <= 0) return;
|
|
158
|
+
return registry.intern({
|
|
159
|
+
properties: {},
|
|
160
|
+
family: "table-column",
|
|
161
|
+
propertyElements: [el("style:table-column-properties", { "style:column-width": formatOdfLength(widthPt) })]
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
function tableRowStyle(heightPt, registry) {
|
|
165
|
+
if (heightPt === void 0) return;
|
|
166
|
+
return registry.intern({
|
|
167
|
+
properties: {},
|
|
168
|
+
family: "table-row",
|
|
169
|
+
propertyElements: [el("style:table-row-properties", { "style:row-height": formatOdfLength(heightPt) })]
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
function formatBorderEdge(border) {
|
|
173
|
+
return `${formatOdfLength(border.widthPt)} ${border.style ?? "solid"} ${formatOdfColor(border.color)}`;
|
|
174
|
+
}
|
|
175
|
+
function tableCellStyle(cell, registry) {
|
|
176
|
+
const attributes = {};
|
|
177
|
+
if (cell.background !== void 0) attributes["fo:background-color"] = formatOdfColor(cell.background);
|
|
178
|
+
const borders = cell.borders;
|
|
179
|
+
if (borders !== void 0) for (const edge of BORDER_EDGE_KEYS) {
|
|
180
|
+
const border = borders[edge];
|
|
181
|
+
if (border !== void 0) attributes[BORDER_EDGE_ATTRS[edge]] = formatBorderEdge(border);
|
|
182
|
+
}
|
|
183
|
+
if (Object.keys(attributes).length === 0) return;
|
|
184
|
+
return registry.intern({
|
|
185
|
+
properties: {},
|
|
186
|
+
family: "table-cell",
|
|
187
|
+
propertyElements: [el("style:table-cell-properties", attributes)]
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
function writeCellBlocks(cell, registry) {
|
|
191
|
+
return cell.blocks.map((block) => {
|
|
192
|
+
if (block.kind !== "paragraph") throw new Error(`writeOdfTable: a table cell carrying a "${block.kind}" block cannot be written -- odf.js's table reader reads only paragraphs and headings out of a cell, so writing one would lose it on the way back in`);
|
|
193
|
+
return writeOdfParagraph(block, registry);
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
function coverageKey(row, column) {
|
|
197
|
+
return `${row},${column}`;
|
|
198
|
+
}
|
|
199
|
+
function writeOdfTable(table, registry, tableName) {
|
|
200
|
+
const columns = table.columnWidthsPt.map((widthPt) => {
|
|
201
|
+
const styleName = tableColumnStyle(widthPt, registry);
|
|
202
|
+
return el("table:table-column", styleName === void 0 ? {} : { "table:style-name": encodeXmlText(styleName) });
|
|
203
|
+
});
|
|
204
|
+
const covered = /* @__PURE__ */ new Set();
|
|
205
|
+
const rows = table.rows.map((row, rowIndex) => {
|
|
206
|
+
const cells = row.cells.map((cell, columnIndex) => {
|
|
207
|
+
if (covered.has(coverageKey(rowIndex, columnIndex))) return el("table:covered-table-cell");
|
|
208
|
+
const colSpan = cell.colSpan ?? 1;
|
|
209
|
+
const rowSpan = cell.rowSpan ?? 1;
|
|
210
|
+
for (let r = rowIndex; r < rowIndex + rowSpan; r += 1) for (let c = columnIndex; c < columnIndex + colSpan; c += 1) if (r !== rowIndex || c !== columnIndex) covered.add(coverageKey(r, c));
|
|
211
|
+
const attributes = {};
|
|
212
|
+
const styleName = tableCellStyle(cell, registry);
|
|
213
|
+
if (styleName !== void 0) attributes["table:style-name"] = encodeXmlText(styleName);
|
|
214
|
+
if (cell.colSpan !== void 0) attributes["table:number-columns-spanned"] = String(cell.colSpan);
|
|
215
|
+
if (cell.rowSpan !== void 0) attributes["table:number-rows-spanned"] = String(cell.rowSpan);
|
|
216
|
+
return el("table:table-cell", attributes, writeCellBlocks(cell, registry));
|
|
217
|
+
});
|
|
218
|
+
const rowStyleName = tableRowStyle(row.heightPt, registry);
|
|
219
|
+
return el("table:table-row", rowStyleName === void 0 ? {} : { "table:style-name": encodeXmlText(rowStyleName) }, cells);
|
|
220
|
+
});
|
|
221
|
+
const totalWidthPt = table.columnWidthsPt.reduce((total, widthPt) => total + widthPt, 0);
|
|
222
|
+
const tableProperties = { "table:align": "margins" };
|
|
223
|
+
if (totalWidthPt > 0) tableProperties["style:width"] = formatOdfLength(totalWidthPt);
|
|
224
|
+
const tableStyleName = registry.intern({
|
|
225
|
+
properties: {},
|
|
226
|
+
family: "table",
|
|
227
|
+
propertyElements: [el("style:table-properties", tableProperties)]
|
|
228
|
+
});
|
|
229
|
+
return el("table:table", {
|
|
230
|
+
"table:name": encodeXmlText(tableName),
|
|
231
|
+
"table:style-name": encodeXmlText(tableStyleName)
|
|
232
|
+
}, [...columns, ...rows]);
|
|
233
|
+
}
|
|
154
234
|
function readOdfTable(tableElement, pkg) {
|
|
155
235
|
const columnWidthsPt = [];
|
|
156
236
|
for (const column of childrenWithTag(tableElement, "table:table-column")) {
|
|
@@ -171,4 +251,4 @@ function readOdfTable(tableElement, pkg) {
|
|
|
171
251
|
};
|
|
172
252
|
}
|
|
173
253
|
//#endregion
|
|
174
|
-
export { readCellStyleDecoration, readOdfTable };
|
|
254
|
+
export { readCellStyleDecoration, readOdfTable, writeOdfTable };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_xml_fragment = require("../../xml/fragment.cjs");
|
|
2
3
|
const require_xml_entities = require("../../xml/entities.cjs");
|
|
3
4
|
const require_xml_query = require("../../xml/query.cjs");
|
|
4
5
|
//#region src/typed/shared/text.ts
|
|
@@ -92,10 +93,69 @@ function decodeOdfText(container) {
|
|
|
92
93
|
for (const child of container.children) text += decodeOdfNode(child);
|
|
93
94
|
return text;
|
|
94
95
|
}
|
|
96
|
+
const SPACE = " ";
|
|
97
|
+
const TAB = " ";
|
|
98
|
+
const LINE_BREAK = "\n";
|
|
99
|
+
function segmentOdfText(text, protectLeading, protectTrailing) {
|
|
100
|
+
const segments = [];
|
|
101
|
+
let plain = "";
|
|
102
|
+
const flushPlain = () => {
|
|
103
|
+
if (plain.length > 0) {
|
|
104
|
+
segments.push({
|
|
105
|
+
kind: "text",
|
|
106
|
+
text: plain
|
|
107
|
+
});
|
|
108
|
+
plain = "";
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
let index = 0;
|
|
112
|
+
while (index < text.length) {
|
|
113
|
+
const character = text[index];
|
|
114
|
+
if (character === TAB || character === LINE_BREAK) {
|
|
115
|
+
flushPlain();
|
|
116
|
+
segments.push({
|
|
117
|
+
kind: character === TAB ? "tab" : "lineBreak",
|
|
118
|
+
text: character
|
|
119
|
+
});
|
|
120
|
+
index += 1;
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
if (character !== SPACE) {
|
|
124
|
+
plain += character;
|
|
125
|
+
index += 1;
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
let end = index;
|
|
129
|
+
while (end < text.length && text[end] === SPACE) end += 1;
|
|
130
|
+
const spaces = text.slice(index, end);
|
|
131
|
+
if (spaces.length > 1 || index === 0 && protectLeading || end === text.length && protectTrailing) {
|
|
132
|
+
flushPlain();
|
|
133
|
+
segments.push({
|
|
134
|
+
kind: "space",
|
|
135
|
+
text: spaces
|
|
136
|
+
});
|
|
137
|
+
} else plain += spaces;
|
|
138
|
+
index = end;
|
|
139
|
+
}
|
|
140
|
+
flushPlain();
|
|
141
|
+
return segments;
|
|
142
|
+
}
|
|
143
|
+
function buildOdfInlineNodes(segments) {
|
|
144
|
+
return segments.map((segment) => {
|
|
145
|
+
switch (segment.kind) {
|
|
146
|
+
case "text": return require_xml_fragment.txt(require_xml_entities.encodeXmlText(segment.text));
|
|
147
|
+
case "space": return segment.text.length === 1 ? require_xml_fragment.el("text:s") : require_xml_fragment.el("text:s", { "text:c": String(segment.text.length) });
|
|
148
|
+
case "tab": return require_xml_fragment.el("text:tab");
|
|
149
|
+
case "lineBreak": return require_xml_fragment.el("text:line-break");
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
}
|
|
95
153
|
//#endregion
|
|
96
154
|
exports.ODF_FIELD_TAGS = ODF_FIELD_TAGS;
|
|
155
|
+
exports.buildOdfInlineNodes = buildOdfInlineNodes;
|
|
97
156
|
exports.decodeOdfText = decodeOdfText;
|
|
98
157
|
exports.getOdfSpaceCount = getOdfSpaceCount;
|
|
99
158
|
exports.isOdfFieldElement = isOdfFieldElement;
|
|
100
159
|
exports.measureOdfNodeLength = measureOdfNodeLength;
|
|
160
|
+
exports.segmentOdfText = segmentOdfText;
|
|
101
161
|
exports.sumOdfNodeLength = sumOdfNodeLength;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as measureOdfNodeLength, i as
|
|
2
|
-
export { ODF_FIELD_TAGS, decodeOdfText, getOdfSpaceCount, isOdfFieldElement, measureOdfNodeLength, sumOdfNodeLength };
|
|
1
|
+
import { a as decodeOdfText, c as measureOdfNodeLength, i as buildOdfInlineNodes, l as segmentOdfText, n as OdfTextSegment, o as getOdfSpaceCount, r as OdfTextSegmentKind, s as isOdfFieldElement, t as ODF_FIELD_TAGS, u as sumOdfNodeLength } from "../../text-pmlTqzgi.cjs";
|
|
2
|
+
export { ODF_FIELD_TAGS, OdfTextSegment, OdfTextSegmentKind, buildOdfInlineNodes, decodeOdfText, getOdfSpaceCount, isOdfFieldElement, measureOdfNodeLength, segmentOdfText, sumOdfNodeLength };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as measureOdfNodeLength, i as
|
|
2
|
-
export { ODF_FIELD_TAGS, decodeOdfText, getOdfSpaceCount, isOdfFieldElement, measureOdfNodeLength, sumOdfNodeLength };
|
|
1
|
+
import { a as decodeOdfText, c as measureOdfNodeLength, i as buildOdfInlineNodes, l as segmentOdfText, n as OdfTextSegment, o as getOdfSpaceCount, r as OdfTextSegmentKind, s as isOdfFieldElement, t as ODF_FIELD_TAGS, u as sumOdfNodeLength } from "../../text-B8350HA2.js";
|
|
2
|
+
export { ODF_FIELD_TAGS, OdfTextSegment, OdfTextSegmentKind, buildOdfInlineNodes, decodeOdfText, getOdfSpaceCount, isOdfFieldElement, measureOdfNodeLength, segmentOdfText, sumOdfNodeLength };
|