odf.js 5.2.0 → 5.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.
Files changed (92) hide show
  1. package/README.md +3 -1
  2. package/dist/{cascade-rhqUQrUa.d.ts → cascade-BZ7zqXhL.d.ts} +2 -2
  3. package/dist/{cascade-BmvsXcAz.d.cts → cascade-DWQfTwaM.d.cts} +2 -2
  4. package/dist/{codec-BoPvy83Y.d.cts → codec-LgpdP32n.d.cts} +13 -13
  5. package/dist/{codec-BQB05qN1.d.ts → codec-sFSMk-if.d.ts} +13 -13
  6. package/dist/codec.d.cts +1 -1
  7. package/dist/codec.d.ts +1 -1
  8. package/dist/{constructs-CJpDDQV0.d.ts → constructs-B1yajQJB.d.ts} +8 -1
  9. package/dist/{constructs-Dy_DMFs3.d.cts → constructs-BSC_5kfU.d.cts} +8 -1
  10. package/dist/{embedded-BBJoUl86.js → embedded-BSSdoKcK.js} +151 -24
  11. package/dist/{embedded-CLuwn306.d.ts → embedded-ClsebpWi.d.ts} +1 -1
  12. package/dist/{embedded-FMIPM1fw.cjs → embedded-DbLrCGPi.cjs} +148 -21
  13. package/dist/{embedded-ztNK8w6V.d.cts → embedded-rKOsAsjg.d.cts} +1 -1
  14. package/dist/{form-D3H5H2NL.d.ts → form-CsOrcORr.d.ts} +2 -2
  15. package/dist/{form-BGCT81ss.d.cts → form-D8wh-xhJ.d.cts} +2 -2
  16. package/dist/{forms-cIjw-Jf-.d.cts → forms-BydLKkI0.d.cts} +1 -1
  17. package/dist/{forms-D1-0spCe.d.ts → forms-iwRSwhOn.d.ts} +1 -1
  18. package/dist/index.cjs +1 -1
  19. package/dist/index.d.cts +15 -15
  20. package/dist/index.d.ts +15 -15
  21. package/dist/index.js +1 -1
  22. package/dist/{masterpage-XJ2v2khe.d.cts → masterpage-Bt6gxuoL.d.cts} +2 -1
  23. package/dist/{masterpage-C1McDhMv.d.ts → masterpage-By_F05W4.d.ts} +2 -1
  24. package/dist/{paragraph-6hzAZpmi.d.ts → paragraph-BE71DZ0t.d.ts} +4 -3
  25. package/dist/{paragraph-BBmSl_sK.d.cts → paragraph-CuEMXbDg.d.cts} +4 -3
  26. package/dist/{properties-BF_Fv6B3.d.cts → properties-C-JKQZUD.d.cts} +2 -0
  27. package/dist/{properties-DjAIdPry.d.ts → properties-Rral02h1.d.ts} +2 -0
  28. package/dist/read-24g5eZw6.d.ts +25 -0
  29. package/dist/{read-lc0t0UHK.d.ts → read-BLoaDxr_.d.ts} +2 -1
  30. package/dist/{read-B4238IGr.d.cts → read-C3Ei_MYc.d.cts} +2 -1
  31. package/dist/{read-CTfeWaWq.d.cts → read-CDSmR3qt.d.cts} +2 -1
  32. package/dist/{read-CdvX2qnz.d.ts → read-DJqvINGW.d.ts} +2 -1
  33. package/dist/{read-Db_GZ0ZH.d.ts → read-DfEHXwgn.d.ts} +2 -1
  34. package/dist/{read-DOYWO6BM.d.cts → read-IOYq80AA.d.cts} +2 -1
  35. package/dist/read-rwDsgR0d.d.cts +25 -0
  36. package/dist/{registry-CaJpWDke.d.cts → registry-CphRYjDD.d.cts} +1 -1
  37. package/dist/{registry-BVeEpUMI.d.ts → registry-D5RGBteE.d.ts} +1 -1
  38. package/dist/{serialize-DvaE_t5D.d.ts → serialize-B-lq0LiG.d.ts} +1 -1
  39. package/dist/{serialize-9xvti0FF.d.cts → serialize-D1fti8C5.d.cts} +1 -1
  40. package/dist/styles/properties.cjs +25 -3
  41. package/dist/styles/properties.d.cts +1 -1
  42. package/dist/styles/properties.d.ts +1 -1
  43. package/dist/styles/properties.js +25 -3
  44. package/dist/styles/registry.d.cts +1 -1
  45. package/dist/styles/registry.d.ts +1 -1
  46. package/dist/styles/serialize.d.cts +1 -1
  47. package/dist/styles/serialize.d.ts +1 -1
  48. package/dist/typed/draw/embedded.cjs +1 -1
  49. package/dist/typed/draw/embedded.d.cts +1 -1
  50. package/dist/typed/draw/embedded.d.ts +1 -1
  51. package/dist/typed/draw/embedded.js +1 -1
  52. package/dist/typed/draw/shapes.cjs +4 -1
  53. package/dist/typed/draw/shapes.js +4 -1
  54. package/dist/typed/odb/form.cjs +1 -1
  55. package/dist/typed/odb/form.d.cts +1 -1
  56. package/dist/typed/odb/form.d.ts +1 -1
  57. package/dist/typed/odb/form.js +1 -1
  58. package/dist/typed/odg/read.cjs +14 -4
  59. package/dist/typed/odg/read.d.cts +1 -1
  60. package/dist/typed/odg/read.d.ts +1 -1
  61. package/dist/typed/odg/read.js +14 -4
  62. package/dist/typed/odp/read.cjs +51 -4
  63. package/dist/typed/odp/read.d.cts +1 -1
  64. package/dist/typed/odp/read.d.ts +1 -1
  65. package/dist/typed/odp/read.js +52 -5
  66. package/dist/typed/ods/read.cjs +1 -1
  67. package/dist/typed/ods/read.d.cts +1 -1
  68. package/dist/typed/ods/read.d.ts +1 -1
  69. package/dist/typed/ods/read.js +1 -1
  70. package/dist/typed/odt/read.cjs +1 -1
  71. package/dist/typed/odt/read.d.cts +2 -2
  72. package/dist/typed/odt/read.d.ts +2 -2
  73. package/dist/typed/odt/read.js +1 -1
  74. package/dist/typed/shared/cascade.d.cts +1 -1
  75. package/dist/typed/shared/cascade.d.ts +1 -1
  76. package/dist/typed/shared/constructs.cjs +73 -0
  77. package/dist/typed/shared/constructs.d.cts +2 -2
  78. package/dist/typed/shared/constructs.d.ts +2 -2
  79. package/dist/typed/shared/constructs.js +67 -1
  80. package/dist/typed/shared/forms.d.cts +1 -1
  81. package/dist/typed/shared/forms.d.ts +1 -1
  82. package/dist/typed/shared/masterpage.cjs +7 -0
  83. package/dist/typed/shared/masterpage.d.cts +2 -2
  84. package/dist/typed/shared/masterpage.d.ts +2 -2
  85. package/dist/typed/shared/masterpage.js +7 -1
  86. package/dist/typed/shared/paragraph.cjs +17 -6
  87. package/dist/typed/shared/paragraph.d.cts +2 -2
  88. package/dist/typed/shared/paragraph.d.ts +2 -2
  89. package/dist/typed/shared/paragraph.js +18 -8
  90. package/package.json +2 -2
  91. package/dist/read-Cs1ktkWB.d.cts +0 -15
  92. package/dist/read-DHuiGh_y.d.ts +0 -15
@@ -1,6 +1,7 @@
1
- import { childrenWithTag, elementsWithTag, findChildElement, rootElement } from "../../xml/query.js";
1
+ import { attrValue, childrenWithTag, elementsWithTag, findChildElement, rootElement } from "../../xml/query.js";
2
2
  import { decodeOdfText } from "../shared/text.js";
3
3
  import { readOdfMetadata } from "../shared/metadata.js";
4
+ import { collectOdfNonContentPartResidue, collectOdfUnmappedShapeResidue, odfAttributeElement, odfResidue } from "../shared/constructs.js";
4
5
  import { resolveDrawPageSize } from "../shared/masterpage.js";
5
6
  import { walkDrawShapes } from "../draw/shapes.js";
6
7
  import { SLIDE_SIZE_WIDESCREEN, assemblePackage } from "document-schema.js";
@@ -14,13 +15,53 @@ function readSlideNotes(page) {
14
15
  if (notes === void 0) return "";
15
16
  return elementsWithTag(notes.children, "text:p").map(decodeOdfText).join("\n");
16
17
  }
18
+ const ODP_TRANSITION_ATTRIBUTES = [
19
+ "presentation:transition-type",
20
+ "presentation:transition-style",
21
+ "presentation:transition-speed",
22
+ "presentation:duration",
23
+ "smil:type",
24
+ "smil:subtype",
25
+ "smil:direction",
26
+ "smil:fadeColor"
27
+ ];
28
+ function findDrawingPageProperties(pkg, styleName) {
29
+ if (styleName === void 0) return;
30
+ for (const partPath of ["content.xml", "styles.xml"]) {
31
+ const part = pkg.parts[partPath];
32
+ if (part?.kind !== "xml") continue;
33
+ const root = rootElement(part.nodes);
34
+ if (root === void 0) continue;
35
+ for (const containerTag of ["office:automatic-styles", "office:styles"]) {
36
+ const container = findChildElement(root.children, containerTag);
37
+ if (container === void 0) continue;
38
+ for (const style of childrenWithTag(container, "style:style")) if (attrValue(style, "style:family") === "drawing-page" && attrValue(style, "style:name") === styleName) return childrenWithTag(style, "style:drawing-page-properties")[0];
39
+ }
40
+ }
41
+ }
42
+ const ODP_PRESENTATION_EXTRA_TAGS = /* @__PURE__ */ new Set([
43
+ "presentation:sound",
44
+ "presentation:animations",
45
+ "anim:par",
46
+ "anim:seq"
47
+ ]);
48
+ function readSlideResidue(page, pkg) {
49
+ const elements = [];
50
+ const drawingPageProperties = findDrawingPageProperties(pkg, attrValue(page, "draw:style-name"));
51
+ if (drawingPageProperties !== void 0 && ODP_TRANSITION_ATTRIBUTES.some((name) => attrValue(drawingPageProperties, name) !== void 0)) elements.push(odfAttributeElement(drawingPageProperties, ...ODP_TRANSITION_ATTRIBUTES));
52
+ for (const child of page.children) if (child.type === "element" && ODP_PRESENTATION_EXTRA_TAGS.has(child.tag)) elements.push(child);
53
+ collectOdfUnmappedShapeResidue(page.children, elements);
54
+ return elements.length > 0 ? odfResidue("odp", ...elements) : void 0;
55
+ }
17
56
  function readSlide(page, pkg, listIdState) {
18
57
  const shapes = [];
19
58
  walkDrawShapes(page.children, [], pkg, shapes, { next: 0 }, listIdState);
59
+ const source = readSlideResidue(page, pkg);
20
60
  return {
21
61
  size: readSlideSize(page, pkg),
22
62
  shapes,
23
- notes: readSlideNotes(page)
63
+ notes: readSlideNotes(page),
64
+ ...source !== void 0 ? { source } : {}
24
65
  };
25
66
  }
26
67
  function readOdpContent(pkg) {
@@ -30,18 +71,24 @@ function readOdpContent(pkg) {
30
71
  const presentation = body === void 0 ? void 0 : findChildElement(body.children, "office:presentation");
31
72
  const pages = presentation === void 0 ? [] : childrenWithTag(presentation, "draw:page");
32
73
  const listIdState = { next: 1 };
74
+ const slides = pages.map((page) => readSlide(page, pkg, listIdState));
75
+ const source = {};
76
+ collectOdfNonContentPartResidue(pkg, "odp", source);
33
77
  return {
34
78
  metadata: readOdfMetadata(pkg),
35
- slides: pages.map((page) => readSlide(page, pkg, listIdState))
79
+ slides,
80
+ ...Object.keys(source).length > 0 ? { source } : {}
36
81
  };
37
82
  }
38
83
  function readOdp(pkg) {
39
- const { metadata, slides } = readOdpContent(pkg);
40
- return assemblePackage({
84
+ const { metadata, slides, source } = readOdpContent(pkg);
85
+ const assembled = assemblePackage({
41
86
  kind: "presentation",
42
87
  metadata,
43
88
  slides
44
89
  });
90
+ if (source !== void 0) assembled.source = source;
91
+ return assembled;
45
92
  }
46
93
  //#endregion
47
94
  export { readOdp, readOdpContent };
@@ -1,4 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_embedded = require("../../embedded-FMIPM1fw.cjs");
2
+ const require_embedded = require("../../embedded-DbLrCGPi.cjs");
3
3
  exports.readOds = require_embedded.readOds;
4
4
  exports.readOdsContent = require_embedded.readOdsContent;
@@ -1,2 +1,2 @@
1
- import { n as readOds, r as readOdsContent, t as OdsDocument } from "../../read-B4238IGr.cjs";
1
+ import { n as readOds, r as readOdsContent, t as OdsDocument } from "../../read-C3Ei_MYc.cjs";
2
2
  export { OdsDocument, readOds, readOdsContent };
@@ -1,2 +1,2 @@
1
- import { n as readOds, r as readOdsContent, t as OdsDocument } from "../../read-CdvX2qnz.js";
1
+ import { n as readOds, r as readOdsContent, t as OdsDocument } from "../../read-DJqvINGW.js";
2
2
  export { OdsDocument, readOds, readOdsContent };
@@ -1,2 +1,2 @@
1
- import { o as readOds, s as readOdsContent } from "../../embedded-BBJoUl86.js";
1
+ import { o as readOds, s as readOdsContent } from "../../embedded-BSSdoKcK.js";
2
2
  export { readOds, readOdsContent };
@@ -1,4 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_embedded = require("../../embedded-FMIPM1fw.cjs");
2
+ const require_embedded = require("../../embedded-DbLrCGPi.cjs");
3
3
  exports.readOdt = require_embedded.readOdt;
4
4
  exports.readOdtContent = require_embedded.readOdtContent;
@@ -1,2 +1,2 @@
1
- import { i as readOdtContent, n as OdtReadOptions, r as readOdt, t as OdtDocument } from "../../read-Cs1ktkWB.cjs";
2
- export { OdtDocument, OdtReadOptions, readOdt, readOdtContent };
1
+ import { a as readOdt, i as OdtReadOptions, n as OdtHeaderFooterPart, o as readOdtContent, r as OdtHeaderFooterVariant, t as OdtDocument } from "../../read-rwDsgR0d.cjs";
2
+ export { OdtDocument, OdtHeaderFooterPart, OdtHeaderFooterVariant, OdtReadOptions, readOdt, readOdtContent };
@@ -1,2 +1,2 @@
1
- import { i as readOdtContent, n as OdtReadOptions, r as readOdt, t as OdtDocument } from "../../read-DHuiGh_y.js";
2
- export { OdtDocument, OdtReadOptions, readOdt, readOdtContent };
1
+ import { a as readOdt, i as OdtReadOptions, n as OdtHeaderFooterPart, o as readOdtContent, r as OdtHeaderFooterVariant, t as OdtDocument } from "../../read-24g5eZw6.js";
2
+ export { OdtDocument, OdtHeaderFooterPart, OdtHeaderFooterVariant, OdtReadOptions, readOdt, readOdtContent };
@@ -1,2 +1,2 @@
1
- import { a as readOdtContent, i as readOdt } from "../../embedded-BBJoUl86.js";
1
+ import { a as readOdtContent, i as readOdt } from "../../embedded-BSSdoKcK.js";
2
2
  export { readOdt, readOdtContent };
@@ -1,2 +1,2 @@
1
- import { a as resolveStyle, i as findStyleElement, n as StyleCascadeResult, o as resolveStyleElementChain, r as StyleElementChainResult, t as CascadeDiagnostic } from "../../cascade-BmvsXcAz.cjs";
1
+ import { a as resolveStyle, i as findStyleElement, n as StyleCascadeResult, o as resolveStyleElementChain, r as StyleElementChainResult, t as CascadeDiagnostic } from "../../cascade-DWQfTwaM.cjs";
2
2
  export { CascadeDiagnostic, StyleCascadeResult, StyleElementChainResult, findStyleElement, resolveStyle, resolveStyleElementChain };
@@ -1,2 +1,2 @@
1
- import { a as resolveStyle, i as findStyleElement, n as StyleCascadeResult, o as resolveStyleElementChain, r as StyleElementChainResult, t as CascadeDiagnostic } from "../../cascade-rhqUQrUa.js";
1
+ import { a as resolveStyle, i as findStyleElement, n as StyleCascadeResult, o as resolveStyleElementChain, r as StyleElementChainResult, t as CascadeDiagnostic } from "../../cascade-BZ7zqXhL.js";
2
2
  export { CascadeDiagnostic, StyleCascadeResult, StyleElementChainResult, findStyleElement, resolveStyle, resolveStyleElementChain };
@@ -28,6 +28,72 @@ function odfResidue(format, ...elements) {
28
28
  xml: require_xml_build.buildXml(elements)
29
29
  };
30
30
  }
31
+ const ODF_EXTENSION_NAMESPACE_PREFIXES = /* @__PURE__ */ new Set([
32
+ "loext:",
33
+ "calcext:",
34
+ "officeooo:",
35
+ "ooo:",
36
+ "oooc:",
37
+ "ooow:",
38
+ "formx:",
39
+ "field:",
40
+ "drawooo:",
41
+ "tableooo:"
42
+ ]);
43
+ function isOdfExtensionElement(element) {
44
+ return [...ODF_EXTENSION_NAMESPACE_PREFIXES].some((prefix) => element.tag.startsWith(prefix));
45
+ }
46
+ const ODF_UNMAPPED_SHAPE_TAGS = /* @__PURE__ */ new Set([
47
+ "dr3d:scene",
48
+ "draw:connector",
49
+ "draw:measure",
50
+ "draw:applet",
51
+ "draw:plugin",
52
+ "draw:floating-frame"
53
+ ]);
54
+ function collectOdfUnmappedShapeResidue(children, out) {
55
+ for (const node of children) {
56
+ if (node.type !== "element") continue;
57
+ if (node.tag === "draw:g") collectOdfUnmappedShapeResidue(node.children, out);
58
+ else if (ODF_UNMAPPED_SHAPE_TAGS.has(node.tag) || isOdfExtensionElement(node)) out.push(node);
59
+ }
60
+ }
61
+ function odfAttributeElement(element, ...attributeNames) {
62
+ return {
63
+ ...element,
64
+ children: [],
65
+ attributes: element.attributes.filter((attribute) => attributeNames.includes(attribute.name))
66
+ };
67
+ }
68
+ function addOdfPackageResidue(out, key, format, ...elements) {
69
+ if (elements.length === 0) return;
70
+ const addition = require_xml_build.buildXml(elements);
71
+ const existing = out[key];
72
+ out[key] = existing === void 0 ? {
73
+ format,
74
+ xml: addition
75
+ } : {
76
+ format,
77
+ xml: `${existing.xml}${addition}`
78
+ };
79
+ }
80
+ const ODF_CONSUMED_PART_PATHS = /* @__PURE__ */ new Set([
81
+ "content.xml",
82
+ "styles.xml",
83
+ "meta.xml",
84
+ "META-INF/manifest.xml"
85
+ ]);
86
+ function isEmbeddedObjectPart(path) {
87
+ const [firstSegment] = path.split("/");
88
+ return firstSegment !== void 0 && /^Object \d+$/.test(firstSegment);
89
+ }
90
+ function collectOdfNonContentPartResidue(pkg, format, out) {
91
+ for (const [path, part] of Object.entries(pkg.parts)) {
92
+ if (part.kind !== "xml" || ODF_CONSUMED_PART_PATHS.has(path) || isEmbeddedObjectPart(path)) continue;
93
+ const elements = part.nodes.filter((node) => node.type === "element");
94
+ if (elements.length > 0) out[path] = odfResidue(format, ...elements);
95
+ }
96
+ }
31
97
  function readOdfBooleanAttribute(element, name) {
32
98
  const raw = require_xml_query.attrValue(element, name);
33
99
  if (raw === "true") return true;
@@ -372,15 +438,22 @@ function collectOdfNamedExpressions(nodes, out) {
372
438
  }
373
439
  }
374
440
  //#endregion
441
+ exports.ODF_CONSUMED_PART_PATHS = ODF_CONSUMED_PART_PATHS;
375
442
  exports.ODF_INDEX_WRAPPER_TAGS = ODF_INDEX_WRAPPER_TAGS;
443
+ exports.ODF_UNMAPPED_SHAPE_TAGS = ODF_UNMAPPED_SHAPE_TAGS;
444
+ exports.addOdfPackageResidue = addOdfPackageResidue;
376
445
  exports.collectOdfDataStyleDefinitions = collectOdfDataStyleDefinitions;
377
446
  exports.collectOdfFieldMasterDefinitions = collectOdfFieldMasterDefinitions;
378
447
  exports.collectOdfFontFaceDefinitions = collectOdfFontFaceDefinitions;
379
448
  exports.collectOdfNamedExpressions = collectOdfNamedExpressions;
449
+ exports.collectOdfNonContentPartResidue = collectOdfNonContentPartResidue;
380
450
  exports.collectOdfProvenanceRegions = collectOdfProvenanceRegions;
451
+ exports.collectOdfUnmappedShapeResidue = collectOdfUnmappedShapeResidue;
381
452
  exports.insertOdfConstructMarkers = insertOdfConstructMarkers;
382
453
  exports.isOdfBlockScopedHalf = isOdfBlockScopedHalf;
454
+ exports.isOdfExtensionElement = isOdfExtensionElement;
383
455
  exports.isOdfIndexWrapper = isOdfIndexWrapper;
456
+ exports.odfAttributeElement = odfAttributeElement;
384
457
  exports.odfBookmarkAnchorDescriptor = odfBookmarkAnchorDescriptor;
385
458
  exports.odfChangedRegionId = odfChangedRegionId;
386
459
  exports.odfDivisionDescriptor = odfDivisionDescriptor;
@@ -1,2 +1,2 @@
1
- import { C as pairOdfMarkerHalves, S as odfResidue, _ as odfChangedRegionId, a as OdfMarkerHalf, b as odfIndexControlDescriptor, c as collectOdfDataStyleDefinitions, d as collectOdfNamedExpressions, f as collectOdfProvenanceRegions, g as odfBookmarkAnchorDescriptor, h as isOdfIndexWrapper, i as OdfMarkerEvent, l as collectOdfFieldMasterDefinitions, m as isOdfBlockScopedHalf, n as OdfConstructExtent, o as OdfMarkerKind, p as insertOdfConstructMarkers, r as OdfDefinitionsSink, s as OdfResidueFormat, t as ODF_INDEX_WRAPPER_TAGS, u as collectOdfFontFaceDefinitions, v as odfDivisionDescriptor, w as resolveOdfMarkerEvents, x as odfMarkerHalfEventIndex, y as odfFieldDescriptor } from "../../constructs-Dy_DMFs3.cjs";
2
- export { ODF_INDEX_WRAPPER_TAGS, OdfConstructExtent, OdfDefinitionsSink, OdfMarkerEvent, OdfMarkerHalf, OdfMarkerKind, OdfResidueFormat, collectOdfDataStyleDefinitions, collectOdfFieldMasterDefinitions, collectOdfFontFaceDefinitions, collectOdfNamedExpressions, collectOdfProvenanceRegions, insertOdfConstructMarkers, isOdfBlockScopedHalf, isOdfIndexWrapper, odfBookmarkAnchorDescriptor, odfChangedRegionId, odfDivisionDescriptor, odfFieldDescriptor, odfIndexControlDescriptor, odfMarkerHalfEventIndex, odfResidue, pairOdfMarkerHalves, resolveOdfMarkerEvents };
1
+ import { A as pairOdfMarkerHalves, C as odfBookmarkAnchorDescriptor, D as odfIndexControlDescriptor, E as odfFieldDescriptor, O as odfMarkerHalfEventIndex, S as odfAttributeElement, T as odfDivisionDescriptor, _ as collectOdfUnmappedShapeResidue, a as OdfDefinitionsSink, b as isOdfExtensionElement, c as OdfMarkerKind, d as collectOdfDataStyleDefinitions, f as collectOdfFieldMasterDefinitions, g as collectOdfProvenanceRegions, h as collectOdfNonContentPartResidue, i as OdfConstructExtent, j as resolveOdfMarkerEvents, k as odfResidue, l as OdfResidueFormat, m as collectOdfNamedExpressions, n as ODF_INDEX_WRAPPER_TAGS, o as OdfMarkerEvent, p as collectOdfFontFaceDefinitions, r as ODF_UNMAPPED_SHAPE_TAGS, s as OdfMarkerHalf, t as ODF_CONSUMED_PART_PATHS, u as addOdfPackageResidue, v as insertOdfConstructMarkers, w as odfChangedRegionId, x as isOdfIndexWrapper, y as isOdfBlockScopedHalf } from "../../constructs-BSC_5kfU.cjs";
2
+ export { ODF_CONSUMED_PART_PATHS, ODF_INDEX_WRAPPER_TAGS, ODF_UNMAPPED_SHAPE_TAGS, OdfConstructExtent, OdfDefinitionsSink, OdfMarkerEvent, OdfMarkerHalf, OdfMarkerKind, OdfResidueFormat, addOdfPackageResidue, collectOdfDataStyleDefinitions, collectOdfFieldMasterDefinitions, collectOdfFontFaceDefinitions, collectOdfNamedExpressions, collectOdfNonContentPartResidue, collectOdfProvenanceRegions, collectOdfUnmappedShapeResidue, insertOdfConstructMarkers, isOdfBlockScopedHalf, isOdfExtensionElement, isOdfIndexWrapper, odfAttributeElement, odfBookmarkAnchorDescriptor, odfChangedRegionId, odfDivisionDescriptor, odfFieldDescriptor, odfIndexControlDescriptor, odfMarkerHalfEventIndex, odfResidue, pairOdfMarkerHalves, resolveOdfMarkerEvents };
@@ -1,2 +1,2 @@
1
- import { C as pairOdfMarkerHalves, S as odfResidue, _ as odfChangedRegionId, a as OdfMarkerHalf, b as odfIndexControlDescriptor, c as collectOdfDataStyleDefinitions, d as collectOdfNamedExpressions, f as collectOdfProvenanceRegions, g as odfBookmarkAnchorDescriptor, h as isOdfIndexWrapper, i as OdfMarkerEvent, l as collectOdfFieldMasterDefinitions, m as isOdfBlockScopedHalf, n as OdfConstructExtent, o as OdfMarkerKind, p as insertOdfConstructMarkers, r as OdfDefinitionsSink, s as OdfResidueFormat, t as ODF_INDEX_WRAPPER_TAGS, u as collectOdfFontFaceDefinitions, v as odfDivisionDescriptor, w as resolveOdfMarkerEvents, x as odfMarkerHalfEventIndex, y as odfFieldDescriptor } from "../../constructs-CJpDDQV0.js";
2
- export { ODF_INDEX_WRAPPER_TAGS, OdfConstructExtent, OdfDefinitionsSink, OdfMarkerEvent, OdfMarkerHalf, OdfMarkerKind, OdfResidueFormat, collectOdfDataStyleDefinitions, collectOdfFieldMasterDefinitions, collectOdfFontFaceDefinitions, collectOdfNamedExpressions, collectOdfProvenanceRegions, insertOdfConstructMarkers, isOdfBlockScopedHalf, isOdfIndexWrapper, odfBookmarkAnchorDescriptor, odfChangedRegionId, odfDivisionDescriptor, odfFieldDescriptor, odfIndexControlDescriptor, odfMarkerHalfEventIndex, odfResidue, pairOdfMarkerHalves, resolveOdfMarkerEvents };
1
+ import { A as pairOdfMarkerHalves, C as odfBookmarkAnchorDescriptor, D as odfIndexControlDescriptor, E as odfFieldDescriptor, O as odfMarkerHalfEventIndex, S as odfAttributeElement, T as odfDivisionDescriptor, _ as collectOdfUnmappedShapeResidue, a as OdfDefinitionsSink, b as isOdfExtensionElement, c as OdfMarkerKind, d as collectOdfDataStyleDefinitions, f as collectOdfFieldMasterDefinitions, g as collectOdfProvenanceRegions, h as collectOdfNonContentPartResidue, i as OdfConstructExtent, j as resolveOdfMarkerEvents, k as odfResidue, l as OdfResidueFormat, m as collectOdfNamedExpressions, n as ODF_INDEX_WRAPPER_TAGS, o as OdfMarkerEvent, p as collectOdfFontFaceDefinitions, r as ODF_UNMAPPED_SHAPE_TAGS, s as OdfMarkerHalf, t as ODF_CONSUMED_PART_PATHS, u as addOdfPackageResidue, v as insertOdfConstructMarkers, w as odfChangedRegionId, x as isOdfIndexWrapper, y as isOdfBlockScopedHalf } from "../../constructs-B1yajQJB.js";
2
+ export { ODF_CONSUMED_PART_PATHS, ODF_INDEX_WRAPPER_TAGS, ODF_UNMAPPED_SHAPE_TAGS, OdfConstructExtent, OdfDefinitionsSink, OdfMarkerEvent, OdfMarkerHalf, OdfMarkerKind, OdfResidueFormat, addOdfPackageResidue, collectOdfDataStyleDefinitions, collectOdfFieldMasterDefinitions, collectOdfFontFaceDefinitions, collectOdfNamedExpressions, collectOdfNonContentPartResidue, collectOdfProvenanceRegions, collectOdfUnmappedShapeResidue, insertOdfConstructMarkers, isOdfBlockScopedHalf, isOdfExtensionElement, isOdfIndexWrapper, odfAttributeElement, odfBookmarkAnchorDescriptor, odfChangedRegionId, odfDivisionDescriptor, odfFieldDescriptor, odfIndexControlDescriptor, odfMarkerHalfEventIndex, odfResidue, pairOdfMarkerHalves, resolveOdfMarkerEvents };
@@ -27,6 +27,72 @@ function odfResidue(format, ...elements) {
27
27
  xml: buildXml(elements)
28
28
  };
29
29
  }
30
+ const ODF_EXTENSION_NAMESPACE_PREFIXES = /* @__PURE__ */ new Set([
31
+ "loext:",
32
+ "calcext:",
33
+ "officeooo:",
34
+ "ooo:",
35
+ "oooc:",
36
+ "ooow:",
37
+ "formx:",
38
+ "field:",
39
+ "drawooo:",
40
+ "tableooo:"
41
+ ]);
42
+ function isOdfExtensionElement(element) {
43
+ return [...ODF_EXTENSION_NAMESPACE_PREFIXES].some((prefix) => element.tag.startsWith(prefix));
44
+ }
45
+ const ODF_UNMAPPED_SHAPE_TAGS = /* @__PURE__ */ new Set([
46
+ "dr3d:scene",
47
+ "draw:connector",
48
+ "draw:measure",
49
+ "draw:applet",
50
+ "draw:plugin",
51
+ "draw:floating-frame"
52
+ ]);
53
+ function collectOdfUnmappedShapeResidue(children, out) {
54
+ for (const node of children) {
55
+ if (node.type !== "element") continue;
56
+ if (node.tag === "draw:g") collectOdfUnmappedShapeResidue(node.children, out);
57
+ else if (ODF_UNMAPPED_SHAPE_TAGS.has(node.tag) || isOdfExtensionElement(node)) out.push(node);
58
+ }
59
+ }
60
+ function odfAttributeElement(element, ...attributeNames) {
61
+ return {
62
+ ...element,
63
+ children: [],
64
+ attributes: element.attributes.filter((attribute) => attributeNames.includes(attribute.name))
65
+ };
66
+ }
67
+ function addOdfPackageResidue(out, key, format, ...elements) {
68
+ if (elements.length === 0) return;
69
+ const addition = buildXml(elements);
70
+ const existing = out[key];
71
+ out[key] = existing === void 0 ? {
72
+ format,
73
+ xml: addition
74
+ } : {
75
+ format,
76
+ xml: `${existing.xml}${addition}`
77
+ };
78
+ }
79
+ const ODF_CONSUMED_PART_PATHS = /* @__PURE__ */ new Set([
80
+ "content.xml",
81
+ "styles.xml",
82
+ "meta.xml",
83
+ "META-INF/manifest.xml"
84
+ ]);
85
+ function isEmbeddedObjectPart(path) {
86
+ const [firstSegment] = path.split("/");
87
+ return firstSegment !== void 0 && /^Object \d+$/.test(firstSegment);
88
+ }
89
+ function collectOdfNonContentPartResidue(pkg, format, out) {
90
+ for (const [path, part] of Object.entries(pkg.parts)) {
91
+ if (part.kind !== "xml" || ODF_CONSUMED_PART_PATHS.has(path) || isEmbeddedObjectPart(path)) continue;
92
+ const elements = part.nodes.filter((node) => node.type === "element");
93
+ if (elements.length > 0) out[path] = odfResidue(format, ...elements);
94
+ }
95
+ }
30
96
  function readOdfBooleanAttribute(element, name) {
31
97
  const raw = attrValue(element, name);
32
98
  if (raw === "true") return true;
@@ -371,4 +437,4 @@ function collectOdfNamedExpressions(nodes, out) {
371
437
  }
372
438
  }
373
439
  //#endregion
374
- export { ODF_INDEX_WRAPPER_TAGS, collectOdfDataStyleDefinitions, collectOdfFieldMasterDefinitions, collectOdfFontFaceDefinitions, collectOdfNamedExpressions, collectOdfProvenanceRegions, insertOdfConstructMarkers, isOdfBlockScopedHalf, isOdfIndexWrapper, odfBookmarkAnchorDescriptor, odfChangedRegionId, odfDivisionDescriptor, odfFieldDescriptor, odfIndexControlDescriptor, odfMarkerHalfEventIndex, odfResidue, pairOdfMarkerHalves, resolveOdfMarkerEvents };
440
+ export { ODF_CONSUMED_PART_PATHS, ODF_INDEX_WRAPPER_TAGS, ODF_UNMAPPED_SHAPE_TAGS, addOdfPackageResidue, collectOdfDataStyleDefinitions, collectOdfFieldMasterDefinitions, collectOdfFontFaceDefinitions, collectOdfNamedExpressions, collectOdfNonContentPartResidue, collectOdfProvenanceRegions, collectOdfUnmappedShapeResidue, insertOdfConstructMarkers, isOdfBlockScopedHalf, isOdfExtensionElement, isOdfIndexWrapper, odfAttributeElement, odfBookmarkAnchorDescriptor, odfChangedRegionId, odfDivisionDescriptor, odfFieldDescriptor, odfIndexControlDescriptor, odfMarkerHalfEventIndex, odfResidue, pairOdfMarkerHalves, resolveOdfMarkerEvents };
@@ -1,2 +1,2 @@
1
- import { i as readOdfFormDefinitions, n as OdbFormDefinition, r as readOdfFormControlConstructs, t as OdbFormControl } from "../../forms-cIjw-Jf-.cjs";
1
+ import { i as readOdfFormDefinitions, n as OdbFormDefinition, r as readOdfFormControlConstructs, t as OdbFormControl } from "../../forms-BydLKkI0.cjs";
2
2
  export { OdbFormControl, OdbFormDefinition, readOdfFormControlConstructs, readOdfFormDefinitions };
@@ -1,2 +1,2 @@
1
- import { i as readOdfFormDefinitions, n as OdbFormDefinition, r as readOdfFormControlConstructs, t as OdbFormControl } from "../../forms-D1-0spCe.js";
1
+ import { i as readOdfFormDefinitions, n as OdbFormDefinition, r as readOdfFormControlConstructs, t as OdbFormControl } from "../../forms-iwRSwhOn.js";
2
2
  export { OdbFormControl, OdbFormDefinition, readOdfFormControlConstructs, readOdfFormDefinitions };
@@ -34,6 +34,13 @@ function resolveDrawPageSize(page, pkg) {
34
34
  const properties = resolvePageLayoutProperties(pkg, require_xml_query.attrValue(page, "draw:master-page-name"));
35
35
  return properties === void 0 ? void 0 : require_typed_shared_geometry.parsePageSize(properties);
36
36
  }
37
+ function readOdfMasterPageElements(pkg) {
38
+ const stylesPart = pkg.parts[STYLES_PART];
39
+ const stylesRoot = stylesPart?.kind === "xml" ? require_xml_query.rootElement(stylesPart.nodes) : void 0;
40
+ const masterStyles = stylesRoot === void 0 ? void 0 : require_xml_query.findChildElement(stylesRoot.children, "office:master-styles");
41
+ return masterStyles === void 0 ? [] : require_xml_query.childrenWithTag(masterStyles, "style:master-page");
42
+ }
37
43
  //#endregion
44
+ exports.readOdfMasterPageElements = readOdfMasterPageElements;
38
45
  exports.resolveDrawPageSize = resolveDrawPageSize;
39
46
  exports.resolvePageLayoutProperties = resolvePageLayoutProperties;
@@ -1,2 +1,2 @@
1
- import { n as resolvePageLayoutProperties, t as resolveDrawPageSize } from "../../masterpage-XJ2v2khe.cjs";
2
- export { resolveDrawPageSize, resolvePageLayoutProperties };
1
+ import { n as resolveDrawPageSize, r as resolvePageLayoutProperties, t as readOdfMasterPageElements } from "../../masterpage-Bt6gxuoL.cjs";
2
+ export { readOdfMasterPageElements, resolveDrawPageSize, resolvePageLayoutProperties };
@@ -1,2 +1,2 @@
1
- import { n as resolvePageLayoutProperties, t as resolveDrawPageSize } from "../../masterpage-C1McDhMv.js";
2
- export { resolveDrawPageSize, resolvePageLayoutProperties };
1
+ import { n as resolveDrawPageSize, r as resolvePageLayoutProperties, t as readOdfMasterPageElements } from "../../masterpage-By_F05W4.js";
2
+ export { readOdfMasterPageElements, resolveDrawPageSize, resolvePageLayoutProperties };
@@ -33,5 +33,11 @@ function resolveDrawPageSize(page, pkg) {
33
33
  const properties = resolvePageLayoutProperties(pkg, attrValue(page, "draw:master-page-name"));
34
34
  return properties === void 0 ? void 0 : parsePageSize(properties);
35
35
  }
36
+ function readOdfMasterPageElements(pkg) {
37
+ const stylesPart = pkg.parts[STYLES_PART];
38
+ const stylesRoot = stylesPart?.kind === "xml" ? rootElement(stylesPart.nodes) : void 0;
39
+ const masterStyles = stylesRoot === void 0 ? void 0 : findChildElement(stylesRoot.children, "office:master-styles");
40
+ return masterStyles === void 0 ? [] : childrenWithTag(masterStyles, "style:master-page");
41
+ }
36
42
  //#endregion
37
- export { resolveDrawPageSize, resolvePageLayoutProperties };
43
+ export { readOdfMasterPageElements, resolveDrawPageSize, resolvePageLayoutProperties };
@@ -177,6 +177,10 @@ function collectRuns(container, baseProperties, pkg, out, walk, hyperlinkTarget
177
177
  order: walk.order++,
178
178
  descriptor: () => void 0
179
179
  });
180
+ } else if (node.tag === "text:ruby" || node.tag === "text:meta" || require_typed_shared_constructs.isOdfExtensionElement(node)) {
181
+ if (node.tag === "text:ruby") for (const base of require_xml_query.childrenWithTag(node, "text:ruby-base")) collectRuns(base, baseProperties, pkg, out, walk, hyperlinkTarget);
182
+ else collectRuns(node, baseProperties, pkg, out, walk, hyperlinkTarget);
183
+ walk.residueElements.push(node);
180
184
  }
181
185
  }
182
186
  }
@@ -201,21 +205,25 @@ function runFromText(text, properties) {
201
205
  function readOdfParagraph(pElement, pkg, context = {}) {
202
206
  const styleName = require_xml_query.attrValue(pElement, "text:style-name");
203
207
  const paragraphProperties = require_typed_shared_cascade.resolveStyle(styleName, "paragraph", pkg).properties;
204
- let source;
205
- if (context.format !== void 0 && styleName !== void 0) {
206
- const unknownElements = require_typed_shared_cascade.resolveStyleElementChain(styleName, "paragraph", pkg).elements.flatMap((style) => [...require_xml_query.childrenWithTag(style, "style:paragraph-properties").filter((properties) => require_styles_properties.parseParagraphProperties(properties).hasUnknown), ...require_xml_query.childrenWithTag(style, "style:text-properties").filter((properties) => require_styles_properties.parseTextProperties(properties).hasUnknown)]);
207
- if (unknownElements.length > 0) source = require_typed_shared_constructs.odfResidue(context.format, ...unknownElements);
208
- }
209
208
  const runs = [];
210
209
  const walk = {
211
210
  extents: [],
212
211
  halves: [],
212
+ residueElements: [],
213
213
  order: 0,
214
214
  provenanceRegions: context.provenanceRegions,
215
215
  definitions: context.definitions,
216
216
  listIdState: context.listIdState ?? { next: 1 }
217
217
  };
218
218
  collectRuns(pElement, paragraphProperties, pkg, runs, walk);
219
+ let source;
220
+ if (context.format !== void 0) {
221
+ const residueElements = [];
222
+ if (styleName !== void 0) residueElements.push(...require_typed_shared_cascade.resolveStyleElementChain(styleName, "paragraph", pkg).elements.flatMap((style) => [...require_xml_query.childrenWithTag(style, "style:paragraph-properties").filter((properties) => require_styles_properties.parseParagraphProperties(properties).hasUnknown), ...require_xml_query.childrenWithTag(style, "style:text-properties").filter((properties) => require_styles_properties.parseTextProperties(properties).hasUnknown)]));
223
+ if (require_xml_query.attrValue(pElement, "text:is-list-header") !== void 0) residueElements.push(require_typed_shared_constructs.odfAttributeElement(pElement, "text:is-list-header"));
224
+ residueElements.push(...walk.residueElements);
225
+ if (residueElements.length > 0) source = require_typed_shared_constructs.odfResidue(context.format, ...residueElements);
226
+ }
219
227
  const { extents: pairedExtents, paired } = require_typed_shared_constructs.pairOdfMarkerHalves(walk.halves, pElement);
220
228
  walk.extents.push(...pairedExtents);
221
229
  for (const half of walk.halves) if (half.kind === "annotation" && half.side === "start" && !paired.has(half.element) && !require_typed_shared_constructs.isOdfBlockScopedHalf(half, pElement)) {
@@ -238,8 +246,11 @@ function readOdfParagraph(pElement, pkg, context = {}) {
238
246
  spacingAfterPt: paragraphProperties.spacingAfterPt,
239
247
  lineSpacing: paragraphProperties.lineSpacing,
240
248
  indentLeftPt: paragraphProperties.indentLeftPt,
241
- indentFirstLinePt: paragraphProperties.indentFirstLinePt
249
+ indentFirstLinePt: paragraphProperties.indentFirstLinePt,
250
+ pageBreakBefore: paragraphProperties.pageBreakBefore,
251
+ pageBreakAfter: paragraphProperties.pageBreakAfter
242
252
  };
243
253
  }
244
254
  //#endregion
255
+ exports.readOdfConstructBodyBlocks = readOdfConstructBodyBlocks;
245
256
  exports.readOdfParagraph = readOdfParagraph;
@@ -1,2 +1,2 @@
1
- import { n as readOdfParagraph, t as OdfParagraphContext } from "../../paragraph-BBmSl_sK.cjs";
2
- export { OdfParagraphContext, readOdfParagraph };
1
+ import { n as readOdfConstructBodyBlocks, r as readOdfParagraph, t as OdfParagraphContext } from "../../paragraph-CuEMXbDg.cjs";
2
+ export { OdfParagraphContext, readOdfConstructBodyBlocks, readOdfParagraph };
@@ -1,2 +1,2 @@
1
- import { n as readOdfParagraph, t as OdfParagraphContext } from "../../paragraph-6hzAZpmi.js";
2
- export { OdfParagraphContext, readOdfParagraph };
1
+ import { n as readOdfConstructBodyBlocks, r as readOdfParagraph, t as OdfParagraphContext } from "../../paragraph-BE71DZ0t.js";
2
+ export { OdfParagraphContext, readOdfConstructBodyBlocks, readOdfParagraph };
@@ -4,7 +4,7 @@ import { attrValue, childrenWithTag, findChildElement } from "../../xml/query.js
4
4
  import { decodeOdfText, getOdfSpaceCount, isOdfFieldElement } from "./text.js";
5
5
  import { resolveStyle, resolveStyleElementChain } from "./cascade.js";
6
6
  import { mintOdfListNumId, readOdfListParagraphs } from "./list.js";
7
- import { isOdfBlockScopedHalf, odfBookmarkAnchorDescriptor, odfFieldDescriptor, odfResidue, pairOdfMarkerHalves } from "./constructs.js";
7
+ import { isOdfBlockScopedHalf, isOdfExtensionElement, odfAttributeElement, odfBookmarkAnchorDescriptor, odfFieldDescriptor, odfResidue, pairOdfMarkerHalves } from "./constructs.js";
8
8
  //#region src/typed/shared/paragraph.ts
9
9
  function readOdfConstructBodyBlocks(body, pkg, context, listIdState) {
10
10
  const blocks = [];
@@ -176,6 +176,10 @@ function collectRuns(container, baseProperties, pkg, out, walk, hyperlinkTarget
176
176
  order: walk.order++,
177
177
  descriptor: () => void 0
178
178
  });
179
+ } else if (node.tag === "text:ruby" || node.tag === "text:meta" || isOdfExtensionElement(node)) {
180
+ if (node.tag === "text:ruby") for (const base of childrenWithTag(node, "text:ruby-base")) collectRuns(base, baseProperties, pkg, out, walk, hyperlinkTarget);
181
+ else collectRuns(node, baseProperties, pkg, out, walk, hyperlinkTarget);
182
+ walk.residueElements.push(node);
179
183
  }
180
184
  }
181
185
  }
@@ -200,21 +204,25 @@ function runFromText(text, properties) {
200
204
  function readOdfParagraph(pElement, pkg, context = {}) {
201
205
  const styleName = attrValue(pElement, "text:style-name");
202
206
  const paragraphProperties = resolveStyle(styleName, "paragraph", pkg).properties;
203
- let source;
204
- if (context.format !== void 0 && styleName !== void 0) {
205
- const unknownElements = resolveStyleElementChain(styleName, "paragraph", pkg).elements.flatMap((style) => [...childrenWithTag(style, "style:paragraph-properties").filter((properties) => parseParagraphProperties(properties).hasUnknown), ...childrenWithTag(style, "style:text-properties").filter((properties) => parseTextProperties(properties).hasUnknown)]);
206
- if (unknownElements.length > 0) source = odfResidue(context.format, ...unknownElements);
207
- }
208
207
  const runs = [];
209
208
  const walk = {
210
209
  extents: [],
211
210
  halves: [],
211
+ residueElements: [],
212
212
  order: 0,
213
213
  provenanceRegions: context.provenanceRegions,
214
214
  definitions: context.definitions,
215
215
  listIdState: context.listIdState ?? { next: 1 }
216
216
  };
217
217
  collectRuns(pElement, paragraphProperties, pkg, runs, walk);
218
+ let source;
219
+ if (context.format !== void 0) {
220
+ const residueElements = [];
221
+ if (styleName !== void 0) residueElements.push(...resolveStyleElementChain(styleName, "paragraph", pkg).elements.flatMap((style) => [...childrenWithTag(style, "style:paragraph-properties").filter((properties) => parseParagraphProperties(properties).hasUnknown), ...childrenWithTag(style, "style:text-properties").filter((properties) => parseTextProperties(properties).hasUnknown)]));
222
+ if (attrValue(pElement, "text:is-list-header") !== void 0) residueElements.push(odfAttributeElement(pElement, "text:is-list-header"));
223
+ residueElements.push(...walk.residueElements);
224
+ if (residueElements.length > 0) source = odfResidue(context.format, ...residueElements);
225
+ }
218
226
  const { extents: pairedExtents, paired } = pairOdfMarkerHalves(walk.halves, pElement);
219
227
  walk.extents.push(...pairedExtents);
220
228
  for (const half of walk.halves) if (half.kind === "annotation" && half.side === "start" && !paired.has(half.element) && !isOdfBlockScopedHalf(half, pElement)) {
@@ -237,8 +245,10 @@ function readOdfParagraph(pElement, pkg, context = {}) {
237
245
  spacingAfterPt: paragraphProperties.spacingAfterPt,
238
246
  lineSpacing: paragraphProperties.lineSpacing,
239
247
  indentLeftPt: paragraphProperties.indentLeftPt,
240
- indentFirstLinePt: paragraphProperties.indentFirstLinePt
248
+ indentFirstLinePt: paragraphProperties.indentFirstLinePt,
249
+ pageBreakBefore: paragraphProperties.pageBreakBefore,
250
+ pageBreakAfter: paragraphProperties.pageBreakAfter
241
251
  };
242
252
  }
243
253
  //#endregion
244
- export { readOdfParagraph };
254
+ export { readOdfConstructBodyBlocks, readOdfParagraph };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "odf.js",
3
- "version": "5.2.0",
3
+ "version": "5.3.0",
4
4
  "description": "Type-safe, lossless round-trip conversion between OpenDocument Format packages (odt, ods, odp) and JSON, hand-written and dependency-minimal, built on Zod 4 codecs.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -79,7 +79,7 @@
79
79
  "license": "MIT",
80
80
  "packageManager": "pnpm@11.6.0",
81
81
  "dependencies": {
82
- "document-schema.js": "^4.8.0",
82
+ "document-schema.js": "^4.9.0",
83
83
  "fast-xml-parser": "^5.10.1",
84
84
  "fflate": "^0.8.3",
85
85
  "zod": "^4.4.3"
@@ -1,15 +0,0 @@
1
- import { r as Package } from "./package-L24lkba-.cjs";
2
- import { ContentSection, DefinitionsTable, DocumentPackage, LayoutMetadata } from "document-schema.js";
3
- //#region src/typed/odt/read.d.ts
4
- interface OdtReadOptions {
5
- frames?: 'lift' | 'none';
6
- }
7
- interface OdtDocument {
8
- metadata: LayoutMetadata;
9
- sections: ContentSection[];
10
- definitions?: DefinitionsTable;
11
- }
12
- declare function readOdtContent(pkg: Package, options?: OdtReadOptions): OdtDocument;
13
- declare function readOdt(pkg: Package, options?: OdtReadOptions): DocumentPackage;
14
- //#endregion
15
- export { readOdtContent as i, OdtReadOptions as n, readOdt as r, OdtDocument as t };
@@ -1,15 +0,0 @@
1
- import { r as Package } from "./package-BUojjTXf.js";
2
- import { ContentSection, DefinitionsTable, DocumentPackage, LayoutMetadata } from "document-schema.js";
3
- //#region src/typed/odt/read.d.ts
4
- interface OdtReadOptions {
5
- frames?: 'lift' | 'none';
6
- }
7
- interface OdtDocument {
8
- metadata: LayoutMetadata;
9
- sections: ContentSection[];
10
- definitions?: DefinitionsTable;
11
- }
12
- declare function readOdtContent(pkg: Package, options?: OdtReadOptions): OdtDocument;
13
- declare function readOdt(pkg: Package, options?: OdtReadOptions): DocumentPackage;
14
- //#endregion
15
- export { readOdtContent as i, OdtReadOptions as n, readOdt as r, OdtDocument as t };