odf.js 5.3.0 → 5.5.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 (48) hide show
  1. package/README.md +3 -3
  2. package/dist/{codec-LgpdP32n.d.cts → codec-C3i7QbVt.d.cts} +4 -4
  3. package/dist/{codec-sFSMk-if.d.ts → codec-CbPSWzQ2.d.ts} +4 -4
  4. package/dist/codec.d.cts +1 -1
  5. package/dist/codec.d.ts +1 -1
  6. package/dist/{constructs-B1yajQJB.d.ts → constructs-C1S8qlVv.d.ts} +1 -1
  7. package/dist/{constructs-BSC_5kfU.d.cts → constructs-FLBse5UV.d.cts} +1 -1
  8. package/dist/{embedded-rKOsAsjg.d.cts → embedded-BzPTTzdf.d.cts} +1 -1
  9. package/dist/{embedded-DbLrCGPi.cjs → embedded-CBTvjVKb.cjs} +8 -21
  10. package/dist/{embedded-BSSdoKcK.js → embedded-D2MXjcFm.js} +9 -22
  11. package/dist/{embedded-ClsebpWi.d.ts → embedded-Zv8KtFUo.d.ts} +1 -1
  12. package/dist/{form-D8wh-xhJ.d.cts → form-CWWCkG-r.d.cts} +1 -1
  13. package/dist/{form-CsOrcORr.d.ts → form-RJTtSmwn.d.ts} +1 -1
  14. package/dist/{forms-iwRSwhOn.d.ts → forms-CyLw7lpE.d.ts} +1 -1
  15. package/dist/{forms-BydLKkI0.d.cts → forms-Eh1N15Qy.d.cts} +1 -1
  16. package/dist/index.cjs +1 -1
  17. package/dist/index.d.cts +5 -5
  18. package/dist/index.d.ts +5 -5
  19. package/dist/index.js +1 -1
  20. package/dist/{paragraph-CuEMXbDg.d.cts → paragraph-DaMqmhe3.d.cts} +3 -2
  21. package/dist/{paragraph-BE71DZ0t.d.ts → paragraph-hzoy-Wos.d.ts} +3 -2
  22. package/dist/typed/draw/embedded.cjs +1 -1
  23. package/dist/typed/draw/embedded.d.cts +1 -1
  24. package/dist/typed/draw/embedded.d.ts +1 -1
  25. package/dist/typed/draw/embedded.js +1 -1
  26. package/dist/typed/odb/form.cjs +1 -1
  27. package/dist/typed/odb/form.d.cts +1 -1
  28. package/dist/typed/odb/form.d.ts +1 -1
  29. package/dist/typed/odb/form.js +1 -1
  30. package/dist/typed/ods/read.cjs +1 -1
  31. package/dist/typed/ods/read.js +1 -1
  32. package/dist/typed/odt/read.cjs +1 -1
  33. package/dist/typed/odt/read.js +1 -1
  34. package/dist/typed/shared/constructs.cjs +2 -2
  35. package/dist/typed/shared/constructs.d.cts +1 -1
  36. package/dist/typed/shared/constructs.d.ts +1 -1
  37. package/dist/typed/shared/constructs.js +2 -2
  38. package/dist/typed/shared/forms.d.cts +1 -1
  39. package/dist/typed/shared/forms.d.ts +1 -1
  40. package/dist/typed/shared/paragraph.cjs +28 -1
  41. package/dist/typed/shared/paragraph.d.cts +2 -2
  42. package/dist/typed/shared/paragraph.d.ts +2 -2
  43. package/dist/typed/shared/paragraph.js +28 -2
  44. package/dist/typed/shared/table.cjs +6 -1
  45. package/dist/typed/shared/table.js +7 -2
  46. package/dist/typed/shared/text.cjs +3 -0
  47. package/dist/typed/shared/text.js +3 -0
  48. package/package.json +1 -1
package/README.md CHANGED
@@ -59,7 +59,7 @@ Under active development. Built and shipped:
59
59
  - **Style interning** (`src/styles/`) — `StyleRegistry` adopts existing automatic styles, finds-or-mints on `intern()`, fingerprints on canonical serialized properties (never `JSON.stringify`), collision-checked across all four style containers.
60
60
  - **Shared typed primitives** (`src/typed/shared/`) — unit parsing, A1 cell-reference computation with repeat-count cursor advancement, colour/geometry/master-page parsing into `document-schema.js` types, whitespace-run decoding, the read-side style cascade, shared `readOdfParagraph`/`readOdfTable`, the `draw:transform`/`draw:g` group-flattening geometry resolver, an `svg:d`/`draw:points` path parser, and `meta.xml` reading.
61
61
  - **Typed readers, at two levels** — `readOdt`/`readOdp`/`readOdg`/`readOds`/`readOdfFormula` resolve a `Package` into a `document-schema.js` **`DocumentPackage`**: the single hierarchical artefact, with a minted styles table. Beneath each sits its `*Content` sibling (`readOdtContent`, `readOdpContent`, `readOdgContent`, `readOdsContent`, `readOdfFormulaContent`) producing the flat `ContentDocument`-level shape instead. See [Reading a document](#reading-a-document).
62
- - **What each reader actually covers** — wordprocessing (`readOdt`), presentation (`readOdp`), drawing (`readOdg`: vector primitives in `draw:z-index`-aware paint order), spreadsheet (`readOds`: every `office:value-type`, cell/page-anchored images, and embedded sub-documents including charts), each expressed in `document-schema.js`'s own `ContentSection`/`ContentSlide`/`ContentDrawPage`/`ContentSheet` vocabulary — plus the fidelity construct vocabulary in `readOdt` (fields, bookmarks, tracked changes, notes, annotations, divisions, index wrappers, forms, and anchored frames; see [Fidelity constructs](#fidelity-constructs)).
62
+ - **What each reader actually covers** — wordprocessing (`readOdt`), presentation (`readOdp`), drawing (`readOdg`: vector primitives in `draw:z-index`-aware paint order), spreadsheet (`readOds`: every `office:value-type`, cell/page-anchored images, and embedded sub-documents including charts), each expressed in `document-schema.js`'s own `ContentSection`/`ContentSlide`/`ContentDrawPage`/`ContentSheet` vocabulary — plus the fidelity construct vocabulary in `readOdt` (fields including the cross-reference displays, bookmarks and reference-marks, tracked changes, notes, annotations, divisions, index wrappers, forms, and anchored frames; see [Fidelity constructs](#fidelity-constructs)).
63
63
  - **`readOdfFormulaMathMl`** — resolves a standalone/embedded `.odf` formula's bare-MathML `content.xml` into raw MathML nodes plus a StarMath annotation, with no pivot shaping at all. **`readOdfFormulaContent`** wraps that into a real `'formula'`-kind `ContentDocument`, and **`readOdfFormula`** into a `DocumentPackage`.
64
64
  - **`readOdm`** — resolves a `.odm` master document into an ordered list of chapter references (`{ name, href, filterName? }`); chapters are genuinely external `.odt` files by ODF design, never cached.
65
65
  - **`readOdbInventory`** — resolves a `.odb` into connection info, table names, query definitions (`{ name, command, escapeProcessing? }` with real SQL text), and form/report `{ name, href }` pairs. A sub-document directory is named after an opaque *persistent* name (`forms/Obj11`), not the user-visible name.
@@ -239,8 +239,8 @@ Layered from a lossless core outward, mirroring `ooxml.js`:
239
239
 
240
240
  `readOdt` reads ODF's fidelity constructs into `document-schema.js`'s harmonised construct vocabulary — the semantic channel of the family's two-channel fidelity model (the quarantined residue channel is the other half). Two residue rows carry genuine producer fixtures (`conditional-format.ods`, `transitions.odp` — real LibreOffice output, generated through the same UNO calls the Calc/Impress UIs use); every other fixture below the unit suites is programmatic, built to the OASIS element grammar, with real-producer verification outstanding.
241
241
 
242
- - **Fields** — every inline field element (the simple set, the variable/user-field/sequence instance families, the database displays) reads as ordinary runs carrying its cached text plus a run-level field extent on the paragraph, instruction being the serialised element and `cachedResult` its own text content. Field master declarations (`text:*-decls`) read into the package-root definitions table, keyed per family.
243
- - **Bookmarks and tracked changes** — paired marker halves at run scope pair inside one paragraph; halves at paragraph edges pair across blocks into `constructStart`/`constructEnd` markers. Change markers resolve their `text:change-id` against the `text:changed-region` definitions (either id spelling, `xml:id` today and ODF 1.0's `text:id`), carrying author and date as provenance.
242
+ - **Fields** — every inline field element (the simple set, the variable/user-field/sequence instance families, the database displays, and the `*-ref` cross-reference displays — `text:bookmark-ref`, `text:reference-ref`, `text:note-ref`, `text:sequence-ref`) reads as ordinary runs carrying its cached text plus a run-level field extent on the paragraph, instruction being the serialised element and `cachedResult` its own text content. Field master declarations (`text:*-decls`) read into the package-root definitions table, keyed per family.
243
+ - **Bookmarks, reference-marks, and tracked changes** — paired marker halves at run scope pair inside one paragraph; halves at paragraph edges pair across blocks into `constructStart`/`constructEnd` markers. A `text:reference-mark` is a point bookmark anchor; a `text:reference-mark-start`/`-end` pair is a range anchor in its own pairing family (ODF keeps reference-mark names and bookmark names in separate namespaces, so a same-named bookmark and reference-mark pair independently). Change markers resolve their `text:change-id` against the `text:changed-region` definitions (either id spelling, `xml:id` today and ODF 1.0's `text:id`), carrying author and date as provenance.
244
244
  - **Notes and annotations** — a `text:note`'s citation becomes a run, its body a definitions entry, an anchor extent naming both; an `office:annotation` does the same and pairs with `office:annotation-end` by `office:name` over a range, falling back to a point anchor when no end arrives.
245
245
  - **Divisions and index wrappers** — `text:section` brackets its blocks as a division construct (name, protected, column count, and a `text:section-source`'s external-chapter link); the seven index wrappers bracket their cached `text:index-body` blocks as `index` content controls, with the wrapper's `*-source` build rules quarantined in residue.
246
246
  - **Forms** — `office:forms` in an ordinary text document reads as point content controls in pre-order through the same form-tree walker the `.odb` reader uses; `form:properties` bags quarantine into residue.
@@ -18,13 +18,13 @@ import "./text-BAi1tapc.cjs";
18
18
  import "./cascade-DWQfTwaM.cjs";
19
19
  import "./metadata-1j1zm9Cx.cjs";
20
20
  import "./list-KZeXA0mR.cjs";
21
- import "./paragraph-CuEMXbDg.cjs";
21
+ import "./paragraph-DaMqmhe3.cjs";
22
22
  import "./table-BH_Q2n_N.cjs";
23
23
  import "./transform-DKEjydnm.cjs";
24
24
  import "./masterpage-Bt6gxuoL.cjs";
25
25
  import "./path-DE7wkIcz.cjs";
26
26
  import "./shapes-8o3NjBLU.cjs";
27
- import "./embedded-rKOsAsjg.cjs";
27
+ import "./embedded-BzPTTzdf.cjs";
28
28
  import "./read-CDSmR3qt.cjs";
29
29
  import "./read-rwDsgR0d.cjs";
30
30
  import "./read-IOYq80AA.cjs";
@@ -33,8 +33,8 @@ import "./read-DUCm1nUv.cjs";
33
33
  import "./read-ydLJ8bid.cjs";
34
34
  import "./read-BV2an1ok.cjs";
35
35
  import "./subdocument-yY8ASE4N.cjs";
36
- import "./forms-BydLKkI0.cjs";
37
- import "./form-D8wh-xhJ.cjs";
36
+ import "./forms-Eh1N15Qy.cjs";
37
+ import "./form-CWWCkG-r.cjs";
38
38
  import "./report-D6WNYaVn.cjs";
39
39
  import { z } from "zod";
40
40
  import { Alignment as Alignment$1, AlignmentSchema, DocumentPackage as DocumentPackage$1 } from "document-schema.js";
@@ -18,13 +18,13 @@ import "./text-gJ5R0q3u.js";
18
18
  import "./cascade-BZ7zqXhL.js";
19
19
  import "./metadata-BXpjrAS-.js";
20
20
  import "./list-Qeuawtew.js";
21
- import "./paragraph-BE71DZ0t.js";
21
+ import "./paragraph-hzoy-Wos.js";
22
22
  import "./table-ByOoGcq_.js";
23
23
  import "./transform-C7GrZZdR.js";
24
24
  import "./masterpage-By_F05W4.js";
25
25
  import "./path-DE7wkIcz.js";
26
26
  import "./shapes-CCB8ydqD.js";
27
- import "./embedded-ClsebpWi.js";
27
+ import "./embedded-Zv8KtFUo.js";
28
28
  import "./read-DfEHXwgn.js";
29
29
  import "./read-24g5eZw6.js";
30
30
  import "./read-BLoaDxr_.js";
@@ -33,8 +33,8 @@ import "./read-BnN7u9Y2.js";
33
33
  import "./read-DYYxbvfo.js";
34
34
  import "./read-CvjbdgH3.js";
35
35
  import "./subdocument-BwW3FZC_.js";
36
- import "./forms-iwRSwhOn.js";
37
- import "./form-CsOrcORr.js";
36
+ import "./forms-CyLw7lpE.js";
37
+ import "./form-RJTtSmwn.js";
38
38
  import "./report-DbslT2OR.js";
39
39
  import { z } from "zod";
40
40
  import { Alignment as Alignment$1, AlignmentSchema as AlignmentSchema$1, DocumentPackage as DocumentPackage$1 } from "document-schema.js";
package/dist/codec.d.cts CHANGED
@@ -1,2 +1,2 @@
1
- import { i as xmlCodec, n as encodePackage, r as packageCodec, t as decodePackage } from "./codec-LgpdP32n.cjs";
1
+ import { i as xmlCodec, n as encodePackage, r as packageCodec, t as decodePackage } from "./codec-C3i7QbVt.cjs";
2
2
  export { decodePackage, encodePackage, packageCodec, xmlCodec };
package/dist/codec.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { i as xmlCodec, n as encodePackage, r as packageCodec, t as decodePackage } from "./codec-sFSMk-if.js";
1
+ import { i as xmlCodec, n as encodePackage, r as packageCodec, t as decodePackage } from "./codec-CbPSWzQ2.js";
2
2
  export { decodePackage, encodePackage, packageCodec, xmlCodec };
@@ -17,7 +17,7 @@ declare function odfDivisionDescriptor(sectionElement: XmlElement, pkg: Package)
17
17
  declare const ODF_INDEX_WRAPPER_TAGS: ReadonlySet<string>;
18
18
  declare function isOdfIndexWrapper(element: XmlElement): boolean;
19
19
  declare function odfIndexControlDescriptor(wrapper: XmlElement): ContentControlDescriptor;
20
- type OdfMarkerKind = 'bookmark' | 'change' | 'annotation';
20
+ type OdfMarkerKind = 'bookmark' | 'referenceMark' | 'change' | 'annotation';
21
21
  interface OdfMarkerHalf {
22
22
  readonly kind: OdfMarkerKind;
23
23
  readonly side: 'start' | 'end';
@@ -17,7 +17,7 @@ declare function odfDivisionDescriptor(sectionElement: XmlElement, pkg: Package)
17
17
  declare const ODF_INDEX_WRAPPER_TAGS: ReadonlySet<string>;
18
18
  declare function isOdfIndexWrapper(element: XmlElement): boolean;
19
19
  declare function odfIndexControlDescriptor(wrapper: XmlElement): ContentControlDescriptor;
20
- type OdfMarkerKind = 'bookmark' | 'change' | 'annotation';
20
+ type OdfMarkerKind = 'bookmark' | 'referenceMark' | 'change' | 'annotation';
21
21
  interface OdfMarkerHalf {
22
22
  readonly kind: OdfMarkerKind;
23
23
  readonly side: 'start' | 'end';
@@ -1,6 +1,6 @@
1
1
  import { l as XmlElement } from "./node-CkBWRjNR.cjs";
2
2
  import { r as Package } from "./package-L24lkba-.cjs";
3
- import { l as OdfResidueFormat } from "./constructs-BSC_5kfU.cjs";
3
+ import { l as OdfResidueFormat } from "./constructs-FLBse5UV.cjs";
4
4
  import { Box, ContentDocument, ContentEmbeddedObjectKind, SourceResidue } from "document-schema.js";
5
5
  //#region src/typed/draw/embedded.d.ts
6
6
  type EmbeddedDocumentKind = ContentEmbeddedObjectKind;
@@ -434,20 +434,6 @@ const ODT_HEADER_FOOTER_TAGS = /* @__PURE__ */ new Map([
434
434
  ]);
435
435
  const CONTENT_PART$1 = "content.xml";
436
436
  const AUTOMATIC_STYLE_PARTS = [CONTENT_PART$1, "styles.xml"];
437
- function readOutlineLevel(headingElement) {
438
- const raw = require_xml_query.attrValue(headingElement, "text:outline-level");
439
- if (raw === void 0) return 1;
440
- const parsed = Number.parseInt(raw, 10);
441
- return Number.isInteger(parsed) && parsed > 0 ? parsed : 1;
442
- }
443
- function readParagraphOrHeading(element, paragraph) {
444
- if (element.tag === "text:h") {
445
- const outlineLevel = readOutlineLevel(element);
446
- paragraph.styleId = `Heading${outlineLevel}`;
447
- paragraph.headingLevel = outlineLevel;
448
- }
449
- return paragraph;
450
- }
451
437
  function resolveParagraphMasterPageName(element, pkg, state) {
452
438
  const styleName = require_xml_query.attrValue(element, "text:style-name");
453
439
  if (state.masterPageByStyleName.has(styleName)) return state.masterPageByStyleName.get(styleName);
@@ -541,15 +527,16 @@ function readBlocks(nodes, pkg, state, baseIndex = 0) {
541
527
  };
542
528
  const readOneParagraph = (element) => {
543
529
  const halves = [];
530
+ const paragraph = require_typed_shared_paragraph.readOdfParagraph(element, pkg, {
531
+ provenanceRegions: state.provenanceRegions,
532
+ markersOut: halves,
533
+ definitions: state.definitions,
534
+ listIdState: state.listIdState,
535
+ format: "odt"
536
+ });
544
537
  return {
545
538
  element,
546
- paragraph: readParagraphOrHeading(element, require_typed_shared_paragraph.readOdfParagraph(element, pkg, {
547
- provenanceRegions: state.provenanceRegions,
548
- markersOut: halves,
549
- definitions: state.definitions,
550
- listIdState: state.listIdState,
551
- format: "odt"
552
- })),
539
+ paragraph: require_typed_shared_paragraph.readParagraphOrHeading(element, paragraph),
553
540
  halves,
554
541
  liftedSources: readAnchoredFrameSources(element, pkg, state),
555
542
  masterPageName: resolveParagraphMasterPageName(element, pkg, state)
@@ -6,7 +6,7 @@ import { findStyleElement, resolveStyleElementChain } from "./typed/shared/casca
6
6
  import { readOdfMetadata } from "./typed/shared/metadata.js";
7
7
  import { mintOdfListNumId, readOdfListParagraphs } from "./typed/shared/list.js";
8
8
  import { addOdfPackageResidue, collectOdfDataStyleDefinitions, collectOdfFieldMasterDefinitions, collectOdfFontFaceDefinitions, collectOdfNamedExpressions, collectOdfNonContentPartResidue, collectOdfProvenanceRegions, insertOdfConstructMarkers, isOdfExtensionElement, isOdfIndexWrapper, odfDivisionDescriptor, odfIndexControlDescriptor, odfMarkerHalfEventIndex, odfResidue, resolveOdfMarkerEvents } from "./typed/shared/constructs.js";
9
- import { readOdfConstructBodyBlocks, readOdfParagraph } from "./typed/shared/paragraph.js";
9
+ import { readOdfConstructBodyBlocks, readOdfParagraph, readParagraphOrHeading } from "./typed/shared/paragraph.js";
10
10
  import { readCellStyleDecoration, readOdfTable } from "./typed/shared/table.js";
11
11
  import { parseOdfTransform } from "./typed/shared/transform.js";
12
12
  import { readOdfMasterPageElements, resolvePageLayoutProperties } from "./typed/shared/masterpage.js";
@@ -434,20 +434,6 @@ const ODT_HEADER_FOOTER_TAGS = /* @__PURE__ */ new Map([
434
434
  ]);
435
435
  const CONTENT_PART$1 = "content.xml";
436
436
  const AUTOMATIC_STYLE_PARTS = [CONTENT_PART$1, "styles.xml"];
437
- function readOutlineLevel(headingElement) {
438
- const raw = attrValue(headingElement, "text:outline-level");
439
- if (raw === void 0) return 1;
440
- const parsed = Number.parseInt(raw, 10);
441
- return Number.isInteger(parsed) && parsed > 0 ? parsed : 1;
442
- }
443
- function readParagraphOrHeading(element, paragraph) {
444
- if (element.tag === "text:h") {
445
- const outlineLevel = readOutlineLevel(element);
446
- paragraph.styleId = `Heading${outlineLevel}`;
447
- paragraph.headingLevel = outlineLevel;
448
- }
449
- return paragraph;
450
- }
451
437
  function resolveParagraphMasterPageName(element, pkg, state) {
452
438
  const styleName = attrValue(element, "text:style-name");
453
439
  if (state.masterPageByStyleName.has(styleName)) return state.masterPageByStyleName.get(styleName);
@@ -541,15 +527,16 @@ function readBlocks(nodes, pkg, state, baseIndex = 0) {
541
527
  };
542
528
  const readOneParagraph = (element) => {
543
529
  const halves = [];
530
+ const paragraph = readOdfParagraph(element, pkg, {
531
+ provenanceRegions: state.provenanceRegions,
532
+ markersOut: halves,
533
+ definitions: state.definitions,
534
+ listIdState: state.listIdState,
535
+ format: "odt"
536
+ });
544
537
  return {
545
538
  element,
546
- paragraph: readParagraphOrHeading(element, readOdfParagraph(element, pkg, {
547
- provenanceRegions: state.provenanceRegions,
548
- markersOut: halves,
549
- definitions: state.definitions,
550
- listIdState: state.listIdState,
551
- format: "odt"
552
- })),
539
+ paragraph: readParagraphOrHeading(element, paragraph),
553
540
  halves,
554
541
  liftedSources: readAnchoredFrameSources(element, pkg, state),
555
542
  masterPageName: resolveParagraphMasterPageName(element, pkg, state)
@@ -1,6 +1,6 @@
1
1
  import { l as XmlElement } from "./node-CkBWRjNR.js";
2
2
  import { r as Package } from "./package-BUojjTXf.js";
3
- import { l as OdfResidueFormat } from "./constructs-B1yajQJB.js";
3
+ import { l as OdfResidueFormat } from "./constructs-C1S8qlVv.js";
4
4
  import { Box, ContentDocument, ContentEmbeddedObjectKind, SourceResidue } from "document-schema.js";
5
5
  //#region src/typed/draw/embedded.d.ts
6
6
  type EmbeddedDocumentKind = ContentEmbeddedObjectKind;
@@ -1,6 +1,6 @@
1
1
  import { r as Package } from "./package-L24lkba-.cjs";
2
2
  import { t as OdtDocument } from "./read-rwDsgR0d.cjs";
3
- import { n as OdbFormDefinition } from "./forms-BydLKkI0.cjs";
3
+ import { n as OdbFormDefinition } from "./forms-Eh1N15Qy.cjs";
4
4
  //#region src/typed/odb/form.d.ts
5
5
  interface OdbForm {
6
6
  name: string;
@@ -1,6 +1,6 @@
1
1
  import { r as Package } from "./package-BUojjTXf.js";
2
2
  import { t as OdtDocument } from "./read-24g5eZw6.js";
3
- import { n as OdbFormDefinition } from "./forms-iwRSwhOn.js";
3
+ import { n as OdbFormDefinition } from "./forms-CyLw7lpE.js";
4
4
  //#region src/typed/odb/form.d.ts
5
5
  interface OdbForm {
6
6
  name: string;
@@ -1,5 +1,5 @@
1
1
  import { l as XmlElement } from "./node-CkBWRjNR.js";
2
- import { l as OdfResidueFormat } from "./constructs-B1yajQJB.js";
2
+ import { l as OdfResidueFormat } from "./constructs-C1S8qlVv.js";
3
3
  import { ContentBlock } from "document-schema.js";
4
4
  //#region src/typed/shared/forms.d.ts
5
5
  interface OdbFormControl {
@@ -1,5 +1,5 @@
1
1
  import { l as XmlElement } from "./node-CkBWRjNR.cjs";
2
- import { l as OdfResidueFormat } from "./constructs-BSC_5kfU.cjs";
2
+ import { l as OdfResidueFormat } from "./constructs-FLBse5UV.cjs";
3
3
  import { ContentBlock } from "document-schema.js";
4
4
  //#region src/typed/shared/forms.d.ts
5
5
  interface OdbFormControl {
package/dist/index.cjs CHANGED
@@ -38,7 +38,7 @@ const require_typed_formula_read = require("./typed/formula/read.cjs");
38
38
  const require_typed_odb_subdocument = require("./typed/odb/subdocument.cjs");
39
39
  const require_typed_odg_read = require("./typed/odg/read.cjs");
40
40
  const require_typed_odp_read = require("./typed/odp/read.cjs");
41
- const require_embedded = require("./embedded-DbLrCGPi.cjs");
41
+ const require_embedded = require("./embedded-CBTvjVKb.cjs");
42
42
  const require_typed_shared_forms = require("./typed/shared/forms.cjs");
43
43
  const require_typed_odm_read = require("./typed/odm/read.cjs");
44
44
  const require_typed_odb_read = require("./typed/odb/read.cjs");
package/dist/index.d.cts CHANGED
@@ -26,13 +26,13 @@ import { a as measureOdfNodeLength, n as decodeOdfText, o as sumOdfNodeLength, r
26
26
  import { a as resolveStyle, i as findStyleElement, n as StyleCascadeResult, o as resolveStyleElementChain, r as StyleElementChainResult, t as CascadeDiagnostic } from "./cascade-DWQfTwaM.cjs";
27
27
  import { n as readOdfMetadata, t as META_PART } from "./metadata-1j1zm9Cx.cjs";
28
28
  import { a as resolveOdfListKind, i as readOdfListParagraphs, n as OdfListParagraphReader, r as mintOdfListNumId, t as OdfListIdState } from "./list-KZeXA0mR.cjs";
29
- import { r as readOdfParagraph } from "./paragraph-CuEMXbDg.cjs";
29
+ import { r as readOdfParagraph } from "./paragraph-DaMqmhe3.cjs";
30
30
  import { r as readOdfTable } from "./table-BH_Q2n_N.cjs";
31
31
  import { a as composeOdfGroupTransform, c as resolveOdfShapeGeometry, i as applyOdfTransform, n as OdfShapeGeometry, o as netRotationDeg, r as OdfTransformFunction, s as parseOdfTransform, t as OdfPoint } from "./transform-DKEjydnm.cjs";
32
32
  import { n as resolveDrawPageSize, r as resolvePageLayoutProperties } from "./masterpage-Bt6gxuoL.cjs";
33
33
  import { a as buildOdfSubpaths, c as parseOdfViewBox, i as OdfViewBox, l as rawSubpathFromPoints, n as OdfRawSegment, o as parseOdfPathData, r as OdfRawSubpath, s as parseOdfPointsList, t as OdfRawPoint, u as scaleOdfRawPoint } from "./path-DE7wkIcz.cjs";
34
34
  import { a as walkDrawShapes, i as readDrawPageContent, n as readDrawFrame, r as readDrawImageBlock, t as DrawPageContent } from "./shapes-8o3NjBLU.cjs";
35
- import { i as readDrawObjectReference, r as EmbeddedDrawObject, t as EmbeddedDocumentKind } from "./embedded-rKOsAsjg.cjs";
35
+ import { i as readDrawObjectReference, r as EmbeddedDrawObject, t as EmbeddedDocumentKind } from "./embedded-BzPTTzdf.cjs";
36
36
  import { n as readOdp, r as readOdpContent, t as OdpDocument } from "./read-CDSmR3qt.cjs";
37
37
  import { a as readOdt, i as OdtReadOptions, n as OdtHeaderFooterPart, o as readOdtContent, r as OdtHeaderFooterVariant, t as OdtDocument } from "./read-rwDsgR0d.cjs";
38
38
  import { n as readOdg, r as readOdgContent, t as OdgDocument } from "./read-IOYq80AA.cjs";
@@ -41,8 +41,8 @@ import { a as readOdfFormulaMathMl, i as readOdfFormulaContent, r as readOdfForm
41
41
  import { n as OdmSection, r as readOdm, t as OdmDocument } from "./read-ydLJ8bid.cjs";
42
42
  import { a as readOdbInventory, i as OdbQueryInfo, n as OdbConnectionInfo, o as resolveOdbComponent, r as OdbInventory, t as OdbComponentInfo } from "./read-BV2an1ok.cjs";
43
43
  import { n as subDocumentPackage, t as SubDocumentPackageOptions } from "./subdocument-yY8ASE4N.cjs";
44
- import { i as readOdfFormDefinitions, n as OdbFormDefinition, r as readOdfFormControlConstructs, t as OdbFormControl } from "./forms-BydLKkI0.cjs";
45
- import { n as readOdbForm, t as OdbForm } from "./form-D8wh-xhJ.cjs";
44
+ import { i as readOdfFormDefinitions, n as OdbFormDefinition, r as readOdfFormControlConstructs, t as OdbFormControl } from "./forms-Eh1N15Qy.cjs";
45
+ import { n as readOdbForm, t as OdbForm } from "./form-CWWCkG-r.cjs";
46
46
  import { a as OdbReportGroup, i as OdbReportFunction, n as OdbReportBand, o as readOdbReport, r as OdbReportElement, t as OdbReport } from "./report-D6WNYaVn.cjs";
47
- import { a as Alignment, i as xmlCodec, n as encodePackage, o as AlignmentSchema, r as packageCodec, s as DocumentPackage, t as decodePackage } from "./codec-LgpdP32n.cjs";
47
+ import { a as Alignment, i as xmlCodec, n as encodePackage, o as AlignmentSchema, r as packageCodec, s as DocumentPackage, t as decodePackage } from "./codec-C3i7QbVt.cjs";
48
48
  export { type Alignment, AlignmentSchema, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type BuildManifestOptions, type CascadeDiagnostic, type DocumentPackage, type DrawPageContent, type EmbeddedDocumentKind, type EmbeddedDrawObject, type ImageFormat, type InternRequest, type LengthUnit, MANIFEST_PART, META_PART, MIMETYPE_PART, type Manifest, type ManifestEntry, ManifestEntrySchema, type ManifestProblem, ManifestProblemSchema, ManifestSchema, ODF_MEDIA_TYPES, ODF_NAMESPACES, type OdbComponentInfo, type OdbConnectionInfo, type OdbForm, type OdbFormControl, type OdbFormDefinition, type OdbInventory, type OdbQueryInfo, type OdbReport, type OdbReportBand, type OdbReportElement, type OdbReportFunction, type OdbReportGroup, type OdfExtension, type OdfFormulaDocument, type OdfListIdState, type OdfListParagraphReader, type OdfNamespacePrefix, type OdfPoint, type OdfRawPoint, type OdfRawSegment, type OdfRawSubpath, type OdfShapeGeometry, type OdfTransformFunction, type OdfViewBox, type OdgDocument, type OdmDocument, type OdmSection, type OdpDocument, type OdsDocument, type OdtDocument, type OdtHeaderFooterPart, type OdtHeaderFooterVariant, type OdtReadOptions, type OtherPartRef, type Package, PackageSchema, type ParsedProperties, type Part, PartSchema, STYLE_FAMILIES, type StyleCascadeResult, type StyleElementChainResult, type StyleFamily, type StyleProperties, StylePropertiesSchema, StyleRegistry, type StyleRegistryOptions, type SubDocumentPackageOptions, TableCursor, type XmlCdata, XmlCdataSchema, type XmlComment, XmlCommentSchema, type XmlDeclaration, XmlDeclarationSchema, type XmlElement, XmlElementSchema, type XmlNode, XmlNodeSchema, type XmlPart, XmlPartSchema, type XmlPi, XmlPiSchema, type XmlText, XmlTextSchema, type ZipEntry, applyOdfTransform, attrValue, base64ToBytes, buildManifest, buildOdfSubpaths, buildStylePropertyElements, buildXml, bytesToBase64, canonicalPropertiesString, cellReference, childrenWithTag, columnIndexToLetters, columnLettersToIndex, composeOdfGroupTransform, decodeOdfText, decodePackage, decodeXmlText, el, elementsWithTag, encodePackage, encodeXmlText, ensureSpan, findChildElement, findStyleElement, formatOdfColor, formatOdfLength, formatPercentageMultiplier, formatPt, getOdfSpaceCount, isStyleFamily, isXmlNode, measureOdfNodeLength, mediaTypeForExtension, mintOdfListNumId, netRotationDeg, packageCodec, paragraphPropertiesToAttributes, parseBox, parseCellReference, parseOdfLength as parseLength, parseOdfLength, parseLinePoints, parseMargins, parseOdfColor, parseOdfPathData, parseOdfPointsList, parseOdfTransform, parseOdfViewBox, parsePackage, parsePageSize, parseParagraphProperties, parseStyleElementProperties, parseTextProperties, parseXml, rawSubpathFromPoints, readDrawFrame, readDrawImageBlock, readDrawObjectReference, readDrawPageContent, readManifest, readMimetype, readOdbForm, readOdbInventory, readOdbReport, readOdfFormControlConstructs, readOdfFormDefinitions, readOdfFormula, readOdfFormulaContent, readOdfFormulaMathMl, readOdfListParagraphs, readOdfMetadata, readOdfParagraph, readOdfTable, readOdg, readOdgContent, readOdm, readOdp, readOdpContent, readOds, readOdsContent, readOdt, readOdtContent, resolveDrawPageSize, resolveOdbComponent, resolveOdfListKind, resolveOdfShapeGeometry, resolvePageLayoutProperties, resolveStyle, resolveStyleElementChain, rootElement, scaleOdfRawPoint, serializePackage, setDocumentMediaType, sniffImageFormat, subDocumentPackage, sumOdfNodeLength, syncManifest, textPropertiesToAttributes, txt, unzipPackage, validateManifest, walkDrawShapes, writeManifest, writeMimetype, xmlCodec, xmlnsAttributes, zipPackage };
package/dist/index.d.ts CHANGED
@@ -26,13 +26,13 @@ import { a as measureOdfNodeLength, n as decodeOdfText, o as sumOdfNodeLength, r
26
26
  import { a as resolveStyle, i as findStyleElement, n as StyleCascadeResult, o as resolveStyleElementChain, r as StyleElementChainResult, t as CascadeDiagnostic } from "./cascade-BZ7zqXhL.js";
27
27
  import { n as readOdfMetadata, t as META_PART } from "./metadata-BXpjrAS-.js";
28
28
  import { a as resolveOdfListKind, i as readOdfListParagraphs, n as OdfListParagraphReader, r as mintOdfListNumId, t as OdfListIdState } from "./list-Qeuawtew.js";
29
- import { r as readOdfParagraph } from "./paragraph-BE71DZ0t.js";
29
+ import { r as readOdfParagraph } from "./paragraph-hzoy-Wos.js";
30
30
  import { r as readOdfTable } from "./table-ByOoGcq_.js";
31
31
  import { a as composeOdfGroupTransform, c as resolveOdfShapeGeometry, i as applyOdfTransform, n as OdfShapeGeometry, o as netRotationDeg, r as OdfTransformFunction, s as parseOdfTransform, t as OdfPoint } from "./transform-C7GrZZdR.js";
32
32
  import { n as resolveDrawPageSize, r as resolvePageLayoutProperties } from "./masterpage-By_F05W4.js";
33
33
  import { a as buildOdfSubpaths, c as parseOdfViewBox, i as OdfViewBox, l as rawSubpathFromPoints, n as OdfRawSegment, o as parseOdfPathData, r as OdfRawSubpath, s as parseOdfPointsList, t as OdfRawPoint, u as scaleOdfRawPoint } from "./path-DE7wkIcz.js";
34
34
  import { a as walkDrawShapes, i as readDrawPageContent, n as readDrawFrame, r as readDrawImageBlock, t as DrawPageContent } from "./shapes-CCB8ydqD.js";
35
- import { i as readDrawObjectReference, r as EmbeddedDrawObject, t as EmbeddedDocumentKind } from "./embedded-ClsebpWi.js";
35
+ import { i as readDrawObjectReference, r as EmbeddedDrawObject, t as EmbeddedDocumentKind } from "./embedded-Zv8KtFUo.js";
36
36
  import { n as readOdp, r as readOdpContent, t as OdpDocument } from "./read-DfEHXwgn.js";
37
37
  import { a as readOdt, i as OdtReadOptions, n as OdtHeaderFooterPart, o as readOdtContent, r as OdtHeaderFooterVariant, t as OdtDocument } from "./read-24g5eZw6.js";
38
38
  import { n as readOdg, r as readOdgContent, t as OdgDocument } from "./read-BLoaDxr_.js";
@@ -41,8 +41,8 @@ import { a as readOdfFormulaMathMl, i as readOdfFormulaContent, r as readOdfForm
41
41
  import { n as OdmSection, r as readOdm, t as OdmDocument } from "./read-DYYxbvfo.js";
42
42
  import { a as readOdbInventory, i as OdbQueryInfo, n as OdbConnectionInfo, o as resolveOdbComponent, r as OdbInventory, t as OdbComponentInfo } from "./read-CvjbdgH3.js";
43
43
  import { n as subDocumentPackage, t as SubDocumentPackageOptions } from "./subdocument-BwW3FZC_.js";
44
- import { i as readOdfFormDefinitions, n as OdbFormDefinition, r as readOdfFormControlConstructs, t as OdbFormControl } from "./forms-iwRSwhOn.js";
45
- import { n as readOdbForm, t as OdbForm } from "./form-CsOrcORr.js";
44
+ import { i as readOdfFormDefinitions, n as OdbFormDefinition, r as readOdfFormControlConstructs, t as OdbFormControl } from "./forms-CyLw7lpE.js";
45
+ import { n as readOdbForm, t as OdbForm } from "./form-RJTtSmwn.js";
46
46
  import { a as OdbReportGroup, i as OdbReportFunction, n as OdbReportBand, o as readOdbReport, r as OdbReportElement, t as OdbReport } from "./report-DbslT2OR.js";
47
- import { a as Alignment, i as xmlCodec, n as encodePackage, o as AlignmentSchema, r as packageCodec, s as DocumentPackage, t as decodePackage } from "./codec-sFSMk-if.js";
47
+ import { a as Alignment, i as xmlCodec, n as encodePackage, o as AlignmentSchema, r as packageCodec, s as DocumentPackage, t as decodePackage } from "./codec-CbPSWzQ2.js";
48
48
  export { type Alignment, AlignmentSchema, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type BuildManifestOptions, type CascadeDiagnostic, type DocumentPackage, type DrawPageContent, type EmbeddedDocumentKind, type EmbeddedDrawObject, type ImageFormat, type InternRequest, type LengthUnit, MANIFEST_PART, META_PART, MIMETYPE_PART, type Manifest, type ManifestEntry, ManifestEntrySchema, type ManifestProblem, ManifestProblemSchema, ManifestSchema, ODF_MEDIA_TYPES, ODF_NAMESPACES, type OdbComponentInfo, type OdbConnectionInfo, type OdbForm, type OdbFormControl, type OdbFormDefinition, type OdbInventory, type OdbQueryInfo, type OdbReport, type OdbReportBand, type OdbReportElement, type OdbReportFunction, type OdbReportGroup, type OdfExtension, type OdfFormulaDocument, type OdfListIdState, type OdfListParagraphReader, type OdfNamespacePrefix, type OdfPoint, type OdfRawPoint, type OdfRawSegment, type OdfRawSubpath, type OdfShapeGeometry, type OdfTransformFunction, type OdfViewBox, type OdgDocument, type OdmDocument, type OdmSection, type OdpDocument, type OdsDocument, type OdtDocument, type OdtHeaderFooterPart, type OdtHeaderFooterVariant, type OdtReadOptions, type OtherPartRef, type Package, PackageSchema, type ParsedProperties, type Part, PartSchema, STYLE_FAMILIES, type StyleCascadeResult, type StyleElementChainResult, type StyleFamily, type StyleProperties, StylePropertiesSchema, StyleRegistry, type StyleRegistryOptions, type SubDocumentPackageOptions, TableCursor, type XmlCdata, XmlCdataSchema, type XmlComment, XmlCommentSchema, type XmlDeclaration, XmlDeclarationSchema, type XmlElement, XmlElementSchema, type XmlNode, XmlNodeSchema, type XmlPart, XmlPartSchema, type XmlPi, XmlPiSchema, type XmlText, XmlTextSchema, type ZipEntry, applyOdfTransform, attrValue, base64ToBytes, buildManifest, buildOdfSubpaths, buildStylePropertyElements, buildXml, bytesToBase64, canonicalPropertiesString, cellReference, childrenWithTag, columnIndexToLetters, columnLettersToIndex, composeOdfGroupTransform, decodeOdfText, decodePackage, decodeXmlText, el, elementsWithTag, encodePackage, encodeXmlText, ensureSpan, findChildElement, findStyleElement, formatOdfColor, formatOdfLength, formatPercentageMultiplier, formatPt, getOdfSpaceCount, isStyleFamily, isXmlNode, measureOdfNodeLength, mediaTypeForExtension, mintOdfListNumId, netRotationDeg, packageCodec, paragraphPropertiesToAttributes, parseBox, parseCellReference, parseOdfLength as parseLength, parseOdfLength, parseLinePoints, parseMargins, parseOdfColor, parseOdfPathData, parseOdfPointsList, parseOdfTransform, parseOdfViewBox, parsePackage, parsePageSize, parseParagraphProperties, parseStyleElementProperties, parseTextProperties, parseXml, rawSubpathFromPoints, readDrawFrame, readDrawImageBlock, readDrawObjectReference, readDrawPageContent, readManifest, readMimetype, readOdbForm, readOdbInventory, readOdbReport, readOdfFormControlConstructs, readOdfFormDefinitions, readOdfFormula, readOdfFormulaContent, readOdfFormulaMathMl, readOdfListParagraphs, readOdfMetadata, readOdfParagraph, readOdfTable, readOdg, readOdgContent, readOdm, readOdp, readOdpContent, readOds, readOdsContent, readOdt, readOdtContent, resolveDrawPageSize, resolveOdbComponent, resolveOdfListKind, resolveOdfShapeGeometry, resolvePageLayoutProperties, resolveStyle, resolveStyleElementChain, rootElement, scaleOdfRawPoint, serializePackage, setDocumentMediaType, sniffImageFormat, subDocumentPackage, sumOdfNodeLength, syncManifest, textPropertiesToAttributes, txt, unzipPackage, validateManifest, walkDrawShapes, writeManifest, writeMimetype, xmlCodec, xmlnsAttributes, zipPackage };
package/dist/index.js CHANGED
@@ -37,7 +37,7 @@ import { readOdfFormula, readOdfFormulaContent, readOdfFormulaMathMl } from "./t
37
37
  import { subDocumentPackage } from "./typed/odb/subdocument.js";
38
38
  import { readOdg, readOdgContent } from "./typed/odg/read.js";
39
39
  import { readOdp, readOdpContent } from "./typed/odp/read.js";
40
- import { a as readOdtContent, i as readOdt, o as readOds, s as readOdsContent, t as readDrawObjectReference } from "./embedded-BSSdoKcK.js";
40
+ import { a as readOdtContent, i as readOdt, o as readOds, s as readOdsContent, t as readDrawObjectReference } from "./embedded-D2MXjcFm.js";
41
41
  import { readOdfFormControlConstructs, readOdfFormDefinitions } from "./typed/shared/forms.js";
42
42
  import { readOdm } from "./typed/odm/read.js";
43
43
  import { readOdbInventory, resolveOdbComponent } from "./typed/odb/read.js";
@@ -1,7 +1,7 @@
1
1
  import { l as XmlElement } from "./node-CkBWRjNR.cjs";
2
2
  import { r as Package } from "./package-L24lkba-.cjs";
3
3
  import { t as OdfListIdState } from "./list-KZeXA0mR.cjs";
4
- import { a as OdfDefinitionsSink, l as OdfResidueFormat, s as OdfMarkerHalf } from "./constructs-BSC_5kfU.cjs";
4
+ import { a as OdfDefinitionsSink, l as OdfResidueFormat, s as OdfMarkerHalf } from "./constructs-FLBse5UV.cjs";
5
5
  import { ContentBlock, ContentParagraph, ProvenanceDescriptor } from "document-schema.js";
6
6
  //#region src/typed/shared/paragraph.d.ts
7
7
  interface OdfParagraphContext {
@@ -13,5 +13,6 @@ interface OdfParagraphContext {
13
13
  }
14
14
  declare function readOdfConstructBodyBlocks(body: XmlElement, pkg: Package, context: OdfParagraphContext, listIdState: OdfListIdState): ContentBlock[];
15
15
  declare function readOdfParagraph(pElement: XmlElement, pkg: Package, context?: OdfParagraphContext): ContentParagraph;
16
+ declare function readParagraphOrHeading(element: XmlElement, paragraph: ContentParagraph): ContentParagraph;
16
17
  //#endregion
17
- export { readOdfConstructBodyBlocks as n, readOdfParagraph as r, OdfParagraphContext as t };
18
+ export { readParagraphOrHeading as i, readOdfConstructBodyBlocks as n, readOdfParagraph as r, OdfParagraphContext as t };
@@ -1,7 +1,7 @@
1
1
  import { l as XmlElement } from "./node-CkBWRjNR.js";
2
2
  import { r as Package } from "./package-BUojjTXf.js";
3
3
  import { t as OdfListIdState } from "./list-Qeuawtew.js";
4
- import { a as OdfDefinitionsSink, l as OdfResidueFormat, s as OdfMarkerHalf } from "./constructs-B1yajQJB.js";
4
+ import { a as OdfDefinitionsSink, l as OdfResidueFormat, s as OdfMarkerHalf } from "./constructs-C1S8qlVv.js";
5
5
  import { ContentBlock, ContentParagraph, ProvenanceDescriptor } from "document-schema.js";
6
6
  //#region src/typed/shared/paragraph.d.ts
7
7
  interface OdfParagraphContext {
@@ -13,5 +13,6 @@ interface OdfParagraphContext {
13
13
  }
14
14
  declare function readOdfConstructBodyBlocks(body: XmlElement, pkg: Package, context: OdfParagraphContext, listIdState: OdfListIdState): ContentBlock[];
15
15
  declare function readOdfParagraph(pElement: XmlElement, pkg: Package, context?: OdfParagraphContext): ContentParagraph;
16
+ declare function readParagraphOrHeading(element: XmlElement, paragraph: ContentParagraph): ContentParagraph;
16
17
  //#endregion
17
- export { readOdfConstructBodyBlocks as n, readOdfParagraph as r, OdfParagraphContext as t };
18
+ export { readParagraphOrHeading as i, readOdfConstructBodyBlocks as n, readOdfParagraph as r, OdfParagraphContext as t };
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_embedded = require("../../embedded-DbLrCGPi.cjs");
2
+ const require_embedded = require("../../embedded-CBTvjVKb.cjs");
3
3
  exports.readDrawObjectReference = require_embedded.readDrawObjectReference;
4
4
  exports.readEmbeddedObjectDocument = require_embedded.readEmbeddedObjectDocument;
5
5
  exports.readOdfChartContent = require_embedded.readOdfChartContent;
@@ -1,2 +1,2 @@
1
- import { a as readEmbeddedObjectDocument, i as readDrawObjectReference, n as EmbeddedDocumentRead, o as readOdfChartContent, r as EmbeddedDrawObject, t as EmbeddedDocumentKind } from "../../embedded-rKOsAsjg.cjs";
1
+ import { a as readEmbeddedObjectDocument, i as readDrawObjectReference, n as EmbeddedDocumentRead, o as readOdfChartContent, r as EmbeddedDrawObject, t as EmbeddedDocumentKind } from "../../embedded-BzPTTzdf.cjs";
2
2
  export { EmbeddedDocumentKind, EmbeddedDocumentRead, EmbeddedDrawObject, readDrawObjectReference, readEmbeddedObjectDocument, readOdfChartContent };
@@ -1,2 +1,2 @@
1
- import { a as readEmbeddedObjectDocument, i as readDrawObjectReference, n as EmbeddedDocumentRead, o as readOdfChartContent, r as EmbeddedDrawObject, t as EmbeddedDocumentKind } from "../../embedded-ClsebpWi.js";
1
+ import { a as readEmbeddedObjectDocument, i as readDrawObjectReference, n as EmbeddedDocumentRead, o as readOdfChartContent, r as EmbeddedDrawObject, t as EmbeddedDocumentKind } from "../../embedded-Zv8KtFUo.js";
2
2
  export { EmbeddedDocumentKind, EmbeddedDocumentRead, EmbeddedDrawObject, readDrawObjectReference, readEmbeddedObjectDocument, readOdfChartContent };
@@ -1,2 +1,2 @@
1
- import { n as readEmbeddedObjectDocument, r as readOdfChartContent, t as readDrawObjectReference } from "../../embedded-BSSdoKcK.js";
1
+ import { n as readEmbeddedObjectDocument, r as readOdfChartContent, t as readDrawObjectReference } from "../../embedded-D2MXjcFm.js";
2
2
  export { readDrawObjectReference, readEmbeddedObjectDocument, readOdfChartContent };
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_xml_query = require("../../xml/query.cjs");
3
3
  const require_typed_odb_subdocument = require("./subdocument.cjs");
4
- const require_embedded = require("../../embedded-DbLrCGPi.cjs");
4
+ const require_embedded = require("../../embedded-CBTvjVKb.cjs");
5
5
  const require_typed_shared_forms = require("../shared/forms.cjs");
6
6
  const require_typed_odb_read = require("./read.cjs");
7
7
  //#region src/typed/odb/form.ts
@@ -1,2 +1,2 @@
1
- import { n as readOdbForm, t as OdbForm } from "../../form-D8wh-xhJ.cjs";
1
+ import { n as readOdbForm, t as OdbForm } from "../../form-CWWCkG-r.cjs";
2
2
  export { OdbForm, readOdbForm };
@@ -1,2 +1,2 @@
1
- import { n as readOdbForm, t as OdbForm } from "../../form-CsOrcORr.js";
1
+ import { n as readOdbForm, t as OdbForm } from "../../form-RJTtSmwn.js";
2
2
  export { OdbForm, readOdbForm };
@@ -1,6 +1,6 @@
1
1
  import { findChildElement, rootElement } from "../../xml/query.js";
2
2
  import { subDocumentPackage } from "./subdocument.js";
3
- import { a as readOdtContent } from "../../embedded-BSSdoKcK.js";
3
+ import { a as readOdtContent } from "../../embedded-D2MXjcFm.js";
4
4
  import { readOdfFormDefinitions } from "../shared/forms.js";
5
5
  import { resolveOdbComponent } from "./read.js";
6
6
  //#region src/typed/odb/form.ts
@@ -1,4 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_embedded = require("../../embedded-DbLrCGPi.cjs");
2
+ const require_embedded = require("../../embedded-CBTvjVKb.cjs");
3
3
  exports.readOds = require_embedded.readOds;
4
4
  exports.readOdsContent = require_embedded.readOdsContent;
@@ -1,2 +1,2 @@
1
- import { o as readOds, s as readOdsContent } from "../../embedded-BSSdoKcK.js";
1
+ import { o as readOds, s as readOdsContent } from "../../embedded-D2MXjcFm.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-DbLrCGPi.cjs");
2
+ const require_embedded = require("../../embedded-CBTvjVKb.cjs");
3
3
  exports.readOdt = require_embedded.readOdt;
4
4
  exports.readOdtContent = require_embedded.readOdtContent;
@@ -1,2 +1,2 @@
1
- import { a as readOdtContent, i as readOdt } from "../../embedded-BSSdoKcK.js";
1
+ import { a as readOdtContent, i as readOdt } from "../../embedded-D2MXjcFm.js";
2
2
  export { readOdt, readOdtContent };
@@ -198,8 +198,8 @@ function isOdfBlockScopedHalf(half, paragraphElement) {
198
198
  function pairOdfMarkerHalves(halves, paragraphElement) {
199
199
  const byKey = /* @__PURE__ */ new Map();
200
200
  for (const half of halves) {
201
- const existing = byKey.get(half.key);
202
- if (existing === void 0) byKey.set(half.key, [half]);
201
+ const existing = byKey.get(`${half.kind} ${half.key}`);
202
+ if (existing === void 0) byKey.set(`${half.kind} ${half.key}`, [half]);
203
203
  else existing.push(half);
204
204
  }
205
205
  const extents = [];
@@ -1,2 +1,2 @@
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";
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-FLBse5UV.cjs";
2
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 { 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";
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-C1S8qlVv.js";
2
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 };
@@ -197,8 +197,8 @@ function isOdfBlockScopedHalf(half, paragraphElement) {
197
197
  function pairOdfMarkerHalves(halves, paragraphElement) {
198
198
  const byKey = /* @__PURE__ */ new Map();
199
199
  for (const half of halves) {
200
- const existing = byKey.get(half.key);
201
- if (existing === void 0) byKey.set(half.key, [half]);
200
+ const existing = byKey.get(`${half.kind} ${half.key}`);
201
+ if (existing === void 0) byKey.set(`${half.kind} ${half.key}`, [half]);
202
202
  else existing.push(half);
203
203
  }
204
204
  const extents = [];
@@ -1,2 +1,2 @@
1
- import { i as readOdfFormDefinitions, n as OdbFormDefinition, r as readOdfFormControlConstructs, t as OdbFormControl } from "../../forms-BydLKkI0.cjs";
1
+ import { i as readOdfFormDefinitions, n as OdbFormDefinition, r as readOdfFormControlConstructs, t as OdbFormControl } from "../../forms-Eh1N15Qy.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-iwRSwhOn.js";
1
+ import { i as readOdfFormDefinitions, n as OdbFormDefinition, r as readOdfFormControlConstructs, t as OdbFormControl } from "../../forms-CyLw7lpE.js";
2
2
  export { OdbFormControl, OdbFormDefinition, readOdfFormControlConstructs, readOdfFormDefinitions };
@@ -51,7 +51,7 @@ function collectRuns(container, baseProperties, pkg, out, walk, hyperlinkTarget
51
51
  startRun,
52
52
  endRun: out.length
53
53
  });
54
- } else if (node.tag === "text:bookmark") {
54
+ } else if (node.tag === "text:bookmark" || node.tag === "text:reference-mark") {
55
55
  const name = require_xml_query.attrValue(node, "text:name");
56
56
  if (name !== void 0) {
57
57
  const runPosition = out.length;
@@ -61,6 +61,18 @@ function collectRuns(container, baseProperties, pkg, out, walk, hyperlinkTarget
61
61
  endRun: runPosition
62
62
  });
63
63
  }
64
+ } else if (node.tag === "text:reference-mark-start" || node.tag === "text:reference-mark-end") {
65
+ const name = require_xml_query.attrValue(node, "text:name");
66
+ if (name !== void 0) walk.halves.push({
67
+ kind: "referenceMark",
68
+ side: node.tag === "text:reference-mark-start" ? "start" : "end",
69
+ key: require_xml_entities.decodeXmlText(name),
70
+ element: node,
71
+ parent: container,
72
+ runPosition: out.length,
73
+ order: walk.order++,
74
+ descriptor: () => require_typed_shared_constructs.odfBookmarkAnchorDescriptor(require_xml_entities.decodeXmlText(name))
75
+ });
64
76
  } else if (node.tag === "text:bookmark-start" || node.tag === "text:bookmark-end") {
65
77
  const name = require_xml_query.attrValue(node, "text:name");
66
78
  if (name !== void 0) walk.halves.push({
@@ -251,6 +263,21 @@ function readOdfParagraph(pElement, pkg, context = {}) {
251
263
  pageBreakAfter: paragraphProperties.pageBreakAfter
252
264
  };
253
265
  }
266
+ function readOutlineLevel(headingElement) {
267
+ const raw = require_xml_query.attrValue(headingElement, "text:outline-level");
268
+ if (raw === void 0) return 1;
269
+ const parsed = Number.parseInt(raw, 10);
270
+ return Number.isInteger(parsed) && parsed > 0 ? parsed : 1;
271
+ }
272
+ function readParagraphOrHeading(element, paragraph) {
273
+ if (element.tag === "text:h") {
274
+ const outlineLevel = readOutlineLevel(element);
275
+ paragraph.styleId = `Heading${outlineLevel}`;
276
+ paragraph.headingLevel = outlineLevel;
277
+ }
278
+ return paragraph;
279
+ }
254
280
  //#endregion
255
281
  exports.readOdfConstructBodyBlocks = readOdfConstructBodyBlocks;
256
282
  exports.readOdfParagraph = readOdfParagraph;
283
+ exports.readParagraphOrHeading = readParagraphOrHeading;
@@ -1,2 +1,2 @@
1
- import { n as readOdfConstructBodyBlocks, r as readOdfParagraph, t as OdfParagraphContext } from "../../paragraph-CuEMXbDg.cjs";
2
- export { OdfParagraphContext, readOdfConstructBodyBlocks, readOdfParagraph };
1
+ import { i as readParagraphOrHeading, n as readOdfConstructBodyBlocks, r as readOdfParagraph, t as OdfParagraphContext } from "../../paragraph-DaMqmhe3.cjs";
2
+ export { OdfParagraphContext, readOdfConstructBodyBlocks, readOdfParagraph, readParagraphOrHeading };
@@ -1,2 +1,2 @@
1
- import { n as readOdfConstructBodyBlocks, r as readOdfParagraph, t as OdfParagraphContext } from "../../paragraph-BE71DZ0t.js";
2
- export { OdfParagraphContext, readOdfConstructBodyBlocks, readOdfParagraph };
1
+ import { i as readParagraphOrHeading, n as readOdfConstructBodyBlocks, r as readOdfParagraph, t as OdfParagraphContext } from "../../paragraph-hzoy-Wos.js";
2
+ export { OdfParagraphContext, readOdfConstructBodyBlocks, readOdfParagraph, readParagraphOrHeading };
@@ -50,7 +50,7 @@ function collectRuns(container, baseProperties, pkg, out, walk, hyperlinkTarget
50
50
  startRun,
51
51
  endRun: out.length
52
52
  });
53
- } else if (node.tag === "text:bookmark") {
53
+ } else if (node.tag === "text:bookmark" || node.tag === "text:reference-mark") {
54
54
  const name = attrValue(node, "text:name");
55
55
  if (name !== void 0) {
56
56
  const runPosition = out.length;
@@ -60,6 +60,18 @@ function collectRuns(container, baseProperties, pkg, out, walk, hyperlinkTarget
60
60
  endRun: runPosition
61
61
  });
62
62
  }
63
+ } else if (node.tag === "text:reference-mark-start" || node.tag === "text:reference-mark-end") {
64
+ const name = attrValue(node, "text:name");
65
+ if (name !== void 0) walk.halves.push({
66
+ kind: "referenceMark",
67
+ side: node.tag === "text:reference-mark-start" ? "start" : "end",
68
+ key: decodeXmlText(name),
69
+ element: node,
70
+ parent: container,
71
+ runPosition: out.length,
72
+ order: walk.order++,
73
+ descriptor: () => odfBookmarkAnchorDescriptor(decodeXmlText(name))
74
+ });
63
75
  } else if (node.tag === "text:bookmark-start" || node.tag === "text:bookmark-end") {
64
76
  const name = attrValue(node, "text:name");
65
77
  if (name !== void 0) walk.halves.push({
@@ -250,5 +262,19 @@ function readOdfParagraph(pElement, pkg, context = {}) {
250
262
  pageBreakAfter: paragraphProperties.pageBreakAfter
251
263
  };
252
264
  }
265
+ function readOutlineLevel(headingElement) {
266
+ const raw = attrValue(headingElement, "text:outline-level");
267
+ if (raw === void 0) return 1;
268
+ const parsed = Number.parseInt(raw, 10);
269
+ return Number.isInteger(parsed) && parsed > 0 ? parsed : 1;
270
+ }
271
+ function readParagraphOrHeading(element, paragraph) {
272
+ if (element.tag === "text:h") {
273
+ const outlineLevel = readOutlineLevel(element);
274
+ paragraph.styleId = `Heading${outlineLevel}`;
275
+ paragraph.headingLevel = outlineLevel;
276
+ }
277
+ return paragraph;
278
+ }
253
279
  //#endregion
254
- export { readOdfConstructBodyBlocks, readOdfParagraph };
280
+ export { readOdfConstructBodyBlocks, readOdfParagraph, readParagraphOrHeading };
@@ -115,7 +115,12 @@ function readCellStyleDecoration(elements) {
115
115
  };
116
116
  }
117
117
  function readTableCell(cellElement, pkg) {
118
- const blocks = require_xml_query.childrenWithTag(cellElement, "text:p").map((p) => require_typed_shared_paragraph.readOdfParagraph(p, pkg));
118
+ const blocks = [];
119
+ for (const child of cellElement.children) {
120
+ if (child.type !== "element") continue;
121
+ if (child.tag === "text:p") blocks.push(require_typed_shared_paragraph.readOdfParagraph(child, pkg));
122
+ else if (child.tag === "text:h") blocks.push(require_typed_shared_paragraph.readParagraphOrHeading(child, require_typed_shared_paragraph.readOdfParagraph(child, pkg)));
123
+ }
119
124
  const colSpanRaw = require_xml_query.attrValue(cellElement, "table:number-columns-spanned");
120
125
  const rowSpanRaw = require_xml_query.attrValue(cellElement, "table:number-rows-spanned");
121
126
  const styleName = require_xml_query.attrValue(cellElement, "table:style-name");
@@ -2,7 +2,7 @@ import { parseOdfLength } from "./units.js";
2
2
  import { parseOdfColor } from "./color.js";
3
3
  import { attrValue, childrenWithTag } from "../../xml/query.js";
4
4
  import { findStyleElement } from "./cascade.js";
5
- import { readOdfParagraph } from "./paragraph.js";
5
+ import { readOdfParagraph, readParagraphOrHeading } from "./paragraph.js";
6
6
  //#region src/typed/shared/table.ts
7
7
  function readRepeatCount(element, attrName) {
8
8
  const raw = attrValue(element, attrName);
@@ -114,7 +114,12 @@ function readCellStyleDecoration(elements) {
114
114
  };
115
115
  }
116
116
  function readTableCell(cellElement, pkg) {
117
- const blocks = childrenWithTag(cellElement, "text:p").map((p) => readOdfParagraph(p, pkg));
117
+ const blocks = [];
118
+ for (const child of cellElement.children) {
119
+ if (child.type !== "element") continue;
120
+ if (child.tag === "text:p") blocks.push(readOdfParagraph(child, pkg));
121
+ else if (child.tag === "text:h") blocks.push(readParagraphOrHeading(child, readOdfParagraph(child, pkg)));
122
+ }
118
123
  const colSpanRaw = attrValue(cellElement, "table:number-columns-spanned");
119
124
  const rowSpanRaw = attrValue(cellElement, "table:number-rows-spanned");
120
125
  const styleName = attrValue(cellElement, "table:style-name");
@@ -46,6 +46,9 @@ const ODF_FIELD_TAGS = /* @__PURE__ */ new Set([
46
46
  "text:user-field-input",
47
47
  "text:sequence",
48
48
  "text:sequence-ref",
49
+ "text:bookmark-ref",
50
+ "text:note-ref",
51
+ "text:reference-ref",
49
52
  "text:database-display",
50
53
  "text:database-name",
51
54
  "text:database-next",
@@ -45,6 +45,9 @@ const ODF_FIELD_TAGS = /* @__PURE__ */ new Set([
45
45
  "text:user-field-input",
46
46
  "text:sequence",
47
47
  "text:sequence-ref",
48
+ "text:bookmark-ref",
49
+ "text:note-ref",
50
+ "text:reference-ref",
48
51
  "text:database-display",
49
52
  "text:database-name",
50
53
  "text:database-next",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "odf.js",
3
- "version": "5.3.0",
3
+ "version": "5.5.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": {