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
@@ -363,6 +363,9 @@ function readSheet(tableElement, pkg) {
363
363
  if (embeddedObjects.length > 0) sheet.embeddedObjects = embeddedObjects;
364
364
  return sheet;
365
365
  }
366
+ function collectOdsExtensionElementResidue(children, source) {
367
+ for (const child of children) if (child.type === "element" && require_typed_shared_constructs.isOdfExtensionElement(child)) require_typed_shared_constructs.addOdfPackageResidue(source, child.tag, "ods", child);
368
+ }
366
369
  function readOdsContent(pkg) {
367
370
  const contentPart = pkg.parts[CONTENT_PART$2];
368
371
  const root = contentPart?.kind === "xml" ? require_xml_query.rootElement(contentPart.nodes) : void 0;
@@ -375,28 +378,62 @@ function readOdsContent(pkg) {
375
378
  if (sheet !== void 0) sheets.push(sheet);
376
379
  }
377
380
  const definitions = {};
378
- if (spreadsheet !== void 0) require_typed_shared_constructs.collectOdfNamedExpressions(spreadsheet.children, definitions);
381
+ const source = {};
382
+ if (spreadsheet !== void 0) {
383
+ require_typed_shared_constructs.collectOdfNamedExpressions(spreadsheet.children, definitions);
384
+ require_typed_shared_constructs.addOdfPackageResidue(source, "calculation-settings", "ods", ...require_xml_query.childrenWithTag(spreadsheet, "table:calculation-settings"));
385
+ collectOdsExtensionElementResidue(spreadsheet.children, source);
386
+ for (const table of tables) collectOdsExtensionElementResidue(table.children, source);
387
+ }
388
+ require_typed_shared_constructs.collectOdfNonContentPartResidue(pkg, "ods", source);
379
389
  return {
380
390
  metadata: require_typed_shared_metadata.readOdfMetadata(pkg),
381
391
  sheets,
382
- ...Object.keys(definitions).length > 0 ? { definitions } : {}
392
+ ...Object.keys(definitions).length > 0 ? { definitions } : {},
393
+ ...Object.keys(source).length > 0 ? { source } : {}
383
394
  };
384
395
  }
385
396
  function readOds(pkg) {
386
- const { metadata, sheets, definitions } = readOdsContent(pkg);
397
+ const { metadata, sheets, definitions, source } = readOdsContent(pkg);
387
398
  const assembled = (0, document_schema_js.assemblePackage)({
388
399
  kind: "spreadsheet",
389
400
  metadata,
390
401
  sheets
391
402
  });
392
403
  if (definitions !== void 0) assembled.definitions = definitions;
404
+ if (source !== void 0) assembled.source = source;
393
405
  return assembled;
394
406
  }
395
407
  //#endregion
396
408
  //#region src/typed/odt/read.ts
409
+ const ODT_HEADER_FOOTER_TAGS = /* @__PURE__ */ new Map([
410
+ ["style:header", {
411
+ kind: "header",
412
+ variant: "default"
413
+ }],
414
+ ["style:header-left", {
415
+ kind: "header",
416
+ variant: "left"
417
+ }],
418
+ ["style:header-first", {
419
+ kind: "header",
420
+ variant: "first"
421
+ }],
422
+ ["style:footer", {
423
+ kind: "footer",
424
+ variant: "default"
425
+ }],
426
+ ["style:footer-left", {
427
+ kind: "footer",
428
+ variant: "left"
429
+ }],
430
+ ["style:footer-first", {
431
+ kind: "footer",
432
+ variant: "first"
433
+ }]
434
+ ]);
397
435
  const CONTENT_PART$1 = "content.xml";
398
- const STYLES_PART = "styles.xml";
399
- const AUTOMATIC_STYLE_PARTS = [CONTENT_PART$1, STYLES_PART];
436
+ const AUTOMATIC_STYLE_PARTS = [CONTENT_PART$1, "styles.xml"];
400
437
  function readOutlineLevel(headingElement) {
401
438
  const raw = require_xml_query.attrValue(headingElement, "text:outline-level");
402
439
  if (raw === void 0) return 1;
@@ -411,6 +448,18 @@ function readParagraphOrHeading(element, paragraph) {
411
448
  }
412
449
  return paragraph;
413
450
  }
451
+ function resolveParagraphMasterPageName(element, pkg, state) {
452
+ const styleName = require_xml_query.attrValue(element, "text:style-name");
453
+ if (state.masterPageByStyleName.has(styleName)) return state.masterPageByStyleName.get(styleName);
454
+ let resolved;
455
+ for (const style of require_typed_shared_cascade.resolveStyleElementChain(styleName, "paragraph", pkg).elements) {
456
+ const properties = require_xml_query.findChildElement(style.children, "style:paragraph-properties");
457
+ const name = properties === void 0 ? void 0 : require_xml_query.attrValue(properties, "style:master-page-name");
458
+ if (name !== void 0) resolved = name;
459
+ }
460
+ state.masterPageByStyleName.set(styleName, resolved);
461
+ return resolved;
462
+ }
414
463
  function readAnchoredFrameSources(paragraphElement, pkg, state) {
415
464
  if (!state.liftFrames) return [];
416
465
  const sources = [];
@@ -464,6 +513,13 @@ function readBlocks(nodes, pkg, state, baseIndex = 0) {
464
513
  const emitParagraphs = (reads) => {
465
514
  let cursor = baseIndex + blocks.length;
466
515
  for (const read of reads) {
516
+ if (read.masterPageName !== void 0 && read.masterPageName !== state.masterPage) {
517
+ state.sectionSplits.push({
518
+ index: cursor,
519
+ masterPage: read.masterPageName
520
+ });
521
+ state.masterPage = read.masterPageName;
522
+ }
467
523
  const lifted = read.liftedSources.flatMap((source) => source.blocks);
468
524
  for (const half of read.halves) {
469
525
  const eventIndex = require_typed_shared_constructs.odfMarkerHalfEventIndex(half, read.element, cursor, liftedBlocksBeforeHalf(read, half.element));
@@ -495,7 +551,8 @@ function readBlocks(nodes, pkg, state, baseIndex = 0) {
495
551
  format: "odt"
496
552
  })),
497
553
  halves,
498
- liftedSources: readAnchoredFrameSources(element, pkg, state)
554
+ liftedSources: readAnchoredFrameSources(element, pkg, state),
555
+ masterPageName: resolveParagraphMasterPageName(element, pkg, state)
499
556
  };
500
557
  };
501
558
  for (const node of nodes) {
@@ -524,6 +581,7 @@ function readBlocks(nodes, pkg, state, baseIndex = 0) {
524
581
  order,
525
582
  descriptor: require_typed_shared_constructs.odfDivisionDescriptor(node, pkg)
526
583
  });
584
+ require_typed_shared_constructs.addOdfPackageResidue(state.packageResidue, "dde-links", "odt", ...require_xml_query.childrenWithTag(node, "text:dde-source"));
527
585
  } else if (require_typed_shared_constructs.isOdfIndexWrapper(node)) {
528
586
  const startIndex = baseIndex + blocks.length;
529
587
  const order = state.order++;
@@ -536,7 +594,11 @@ function readBlocks(nodes, pkg, state, baseIndex = 0) {
536
594
  descriptor: require_typed_shared_constructs.odfIndexControlDescriptor(node)
537
595
  });
538
596
  } else if (node.tag === "text:index-title") blocks.push(...readBlocks(node.children, pkg, state, baseIndex + blocks.length));
539
- else if (node.tag === "office:forms") blocks.push(...require_typed_shared_forms.readOdfFormControlConstructs(node, "odt"));
597
+ else if (node.tag === "office:forms") {
598
+ blocks.push(...require_typed_shared_forms.readOdfFormControlConstructs(node, "odt"));
599
+ require_typed_shared_constructs.addOdfPackageResidue(state.packageResidue, "xforms", "odt", ...require_xml_query.childrenWithTag(node, "xforms:model"));
600
+ } else if (node.tag === "text:dde-connection-decls") require_typed_shared_constructs.addOdfPackageResidue(state.packageResidue, "dde-connections", "odt", ...require_xml_query.childrenWithTag(node, "text:dde-connection-decl"));
601
+ else if (require_typed_shared_constructs.isOdfExtensionElement(node)) require_typed_shared_constructs.addOdfPackageResidue(state.packageResidue, node.tag, "odt", node);
540
602
  }
541
603
  return blocks;
542
604
  }
@@ -564,12 +626,8 @@ function findPageLayoutElement(pkg, pageLayoutName) {
564
626
  if (found !== void 0) return found;
565
627
  }
566
628
  }
567
- function readFirstMasterPageGeometry(pkg) {
568
- const stylesPart = pkg.parts[STYLES_PART];
569
- const stylesRoot = stylesPart?.kind === "xml" ? require_xml_query.rootElement(stylesPart.nodes) : void 0;
570
- const masterStyles = stylesRoot === void 0 ? void 0 : require_xml_query.findChildElement(stylesRoot.children, "office:master-styles");
571
- const masterPage = masterStyles === void 0 ? void 0 : require_xml_query.findChildElement(masterStyles.children, "style:master-page");
572
- const layout = findPageLayoutElement(pkg, masterPage === void 0 ? void 0 : require_xml_query.attrValue(masterPage, "style:page-layout-name"));
629
+ function resolveMasterPageGeometry(pkg, masterPage) {
630
+ const layout = findPageLayoutElement(pkg, require_xml_query.attrValue(masterPage, "style:page-layout-name"));
573
631
  const properties = layout === void 0 ? void 0 : require_xml_query.findChildElement(layout.children, "style:page-layout-properties");
574
632
  const pageSize = properties === void 0 ? void 0 : require_typed_shared_geometry.parsePageSize(properties);
575
633
  const margins = properties === void 0 ? void 0 : require_typed_shared_geometry.parseMargins(properties);
@@ -578,6 +636,40 @@ function readFirstMasterPageGeometry(pkg) {
578
636
  margins: margins ?? DEFAULT_MARGINS
579
637
  };
580
638
  }
639
+ function splitOdtSections(walked, extents, splits, initialMasterPage, geometryByMasterPage) {
640
+ let initial = initialMasterPage;
641
+ let boundaries = splits;
642
+ const firstSplit = splits[0];
643
+ if (firstSplit?.index === 0) {
644
+ initial = firstSplit.masterPage;
645
+ boundaries = splits.slice(1);
646
+ }
647
+ const sections = [];
648
+ const masterPages = [];
649
+ for (let segment = 0; segment <= boundaries.length; segment += 1) {
650
+ const start = segment === 0 ? 0 : boundaries[segment - 1].index;
651
+ const end = segment === boundaries.length ? walked.length : boundaries[segment].index;
652
+ const masterPage = segment === 0 ? initial : boundaries[segment - 1].masterPage;
653
+ const geometry = masterPage === void 0 ? void 0 : geometryByMasterPage.get(masterPage);
654
+ const segmentExtents = extents.filter((extent) => extent.startIndex >= start && extent.endIndex <= end).map((extent) => ({
655
+ ...extent,
656
+ startIndex: extent.startIndex - start,
657
+ endIndex: extent.endIndex - start
658
+ }));
659
+ const blocks = require_typed_shared_constructs.insertOdfConstructMarkers(walked.slice(start, end), segmentExtents);
660
+ sections.push({
661
+ pageSize: geometry?.pageSize ?? document_schema_js.PAGE_SIZE_A4,
662
+ margins: geometry?.margins ?? DEFAULT_MARGINS,
663
+ blocks,
664
+ ...segment > 0 ? { breakType: "nextPage" } : {}
665
+ });
666
+ masterPages.push(masterPage);
667
+ }
668
+ return {
669
+ sections,
670
+ masterPages
671
+ };
672
+ }
581
673
  function readOdtContent(pkg, options = {}) {
582
674
  const contentPart = pkg.parts[CONTENT_PART$1];
583
675
  if (contentPart?.kind !== "xml") throw new Error(`readOdtContent: package has no ${CONTENT_PART$1} part`);
@@ -586,7 +678,13 @@ function readOdtContent(pkg, options = {}) {
586
678
  const textElement = body === void 0 ? void 0 : require_xml_query.findChildElement(body.children, "office:text");
587
679
  if (textElement === void 0) throw new Error(`readOdtContent: ${CONTENT_PART$1} has no office:body/office:text element`);
588
680
  const metadata = require_typed_shared_metadata.readOdfMetadata(pkg);
589
- const { pageSize, margins } = readFirstMasterPageGeometry(pkg);
681
+ const masterPageElements = require_typed_shared_masterpage.readOdfMasterPageElements(pkg);
682
+ const geometryByMasterPage = /* @__PURE__ */ new Map();
683
+ for (const masterPage of masterPageElements) {
684
+ const name = require_xml_query.attrValue(masterPage, "style:name");
685
+ if (name !== void 0) geometryByMasterPage.set(name, resolveMasterPageGeometry(pkg, masterPage));
686
+ }
687
+ const firstMasterPageName = masterPageElements.map((masterPage) => require_xml_query.attrValue(masterPage, "style:name")).find((name) => name !== void 0);
590
688
  const provenanceRegions = /* @__PURE__ */ new Map();
591
689
  require_typed_shared_constructs.collectOdfProvenanceRegions(textElement.children, provenanceRegions);
592
690
  const definitions = {
@@ -608,6 +706,10 @@ function readOdtContent(pkg, options = {}) {
608
706
  wrapperExtents: [],
609
707
  markerEvents: [],
610
708
  liftFrames: options.frames !== "none",
709
+ sectionSplits: [],
710
+ masterPageByStyleName: /* @__PURE__ */ new Map(),
711
+ packageResidue: {},
712
+ masterPage: firstMasterPageName,
611
713
  order: 0
612
714
  };
613
715
  const walked = readBlocks(textElement.children, pkg, state);
@@ -622,24 +724,49 @@ function readOdtContent(pkg, options = {}) {
622
724
  descriptor
623
725
  });
624
726
  }
727
+ const { sections, masterPages } = splitOdtSections(walked, extents, state.sectionSplits, firstMasterPageName, geometryByMasterPage);
728
+ const headerFooterParts = [];
729
+ for (const masterPage of masterPageElements) {
730
+ const masterPageName = require_xml_query.attrValue(masterPage, "style:name");
731
+ if (masterPageName === void 0) continue;
732
+ for (const child of masterPage.children) {
733
+ if (child.type !== "element") continue;
734
+ const slot = ODT_HEADER_FOOTER_TAGS.get(child.tag);
735
+ if (slot === void 0 || require_xml_query.attrValue(child, "style:display") === "false") continue;
736
+ const blocks = require_typed_shared_paragraph.readOdfConstructBodyBlocks(child, pkg, {
737
+ provenanceRegions,
738
+ definitions,
739
+ listIdState: state.listIdState,
740
+ format: "odt"
741
+ }, state.listIdState);
742
+ if (blocks.length > 0) headerFooterParts.push({
743
+ masterPage: masterPageName,
744
+ kind: slot.kind,
745
+ variant: slot.variant,
746
+ blocks
747
+ });
748
+ }
749
+ }
750
+ const packageResidue = { ...state.packageResidue };
751
+ require_typed_shared_constructs.collectOdfNonContentPartResidue(pkg, "odt", packageResidue);
625
752
  return {
626
753
  metadata,
627
- sections: [{
628
- pageSize,
629
- margins,
630
- blocks: require_typed_shared_constructs.insertOdfConstructMarkers(walked, extents)
631
- }],
632
- ...Object.keys(definitions.entries).length > 0 ? { definitions: definitions.entries } : {}
754
+ sections,
755
+ ...Object.keys(definitions.entries).length > 0 ? { definitions: definitions.entries } : {},
756
+ ...headerFooterParts.length > 0 ? { headerFooterParts } : {},
757
+ ...masterPageElements.length > 0 ? { sectionMasterPages: masterPages } : {},
758
+ ...Object.keys(packageResidue).length > 0 ? { source: packageResidue } : {}
633
759
  };
634
760
  }
635
761
  function readOdt(pkg, options = {}) {
636
- const { metadata, sections, definitions } = readOdtContent(pkg, options);
762
+ const { metadata, sections, definitions, source } = readOdtContent(pkg, options);
637
763
  const assembled = (0, document_schema_js.assemblePackage)({
638
764
  kind: "wordprocessing",
639
765
  metadata,
640
766
  sections
641
767
  });
642
768
  if (definitions !== void 0) assembled.definitions = definitions;
769
+ if (source !== void 0) assembled.source = source;
643
770
  return assembled;
644
771
  }
645
772
  //#endregion
@@ -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 { s as OdfResidueFormat } from "./constructs-Dy_DMFs3.cjs";
3
+ import { l as OdfResidueFormat } from "./constructs-BSC_5kfU.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;
@@ -1,6 +1,6 @@
1
1
  import { r as Package } from "./package-BUojjTXf.js";
2
- import { t as OdtDocument } from "./read-DHuiGh_y.js";
3
- import { n as OdbFormDefinition } from "./forms-D1-0spCe.js";
2
+ import { t as OdtDocument } from "./read-24g5eZw6.js";
3
+ import { n as OdbFormDefinition } from "./forms-iwRSwhOn.js";
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-L24lkba-.cjs";
2
- import { t as OdtDocument } from "./read-Cs1ktkWB.cjs";
3
- import { n as OdbFormDefinition } from "./forms-cIjw-Jf-.cjs";
2
+ import { t as OdtDocument } from "./read-rwDsgR0d.cjs";
3
+ import { n as OdbFormDefinition } from "./forms-BydLKkI0.cjs";
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.cjs";
2
- import { s as OdfResidueFormat } from "./constructs-Dy_DMFs3.cjs";
2
+ import { l as OdfResidueFormat } from "./constructs-BSC_5kfU.cjs";
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.js";
2
- import { s as OdfResidueFormat } from "./constructs-CJpDDQV0.js";
2
+ import { l as OdfResidueFormat } from "./constructs-B1yajQJB.js";
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-FMIPM1fw.cjs");
41
+ const require_embedded = require("./embedded-DbLrCGPi.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
@@ -13,9 +13,9 @@ import { n as writeMimetype, t as readMimetype } from "./mimetype-CPNMj04s.cjs";
13
13
  import { n as txt, t as el } from "./fragment-B1og_8uA.cjs";
14
14
  import { n as encodeXmlText, t as decodeXmlText } from "./entities-BZlXvHqu.cjs";
15
15
  import { a as ManifestProblem, c as buildManifest, d as syncManifest, f as validateManifest, i as ManifestEntrySchema, l as readManifest, n as Manifest, o as ManifestProblemSchema, p as writeManifest, r as ManifestEntry, s as ManifestSchema, t as BuildManifestOptions, u as setDocumentMediaType } from "./manifest-BALwu2JR.cjs";
16
- import { a as formatPt, c as parseStyleElementProperties, i as formatPercentageMultiplier, l as parseTextProperties, n as StyleProperties, o as paragraphPropertiesToAttributes, r as StylePropertiesSchema, s as parseParagraphProperties, t as ParsedProperties, u as textPropertiesToAttributes } from "./properties-BF_Fv6B3.cjs";
17
- import { n as canonicalPropertiesString, t as buildStylePropertyElements } from "./serialize-9xvti0FF.cjs";
18
- import { a as StyleRegistry, i as StyleFamily, n as OtherPartRef, o as StyleRegistryOptions, r as STYLE_FAMILIES, s as isStyleFamily, t as InternRequest } from "./registry-CaJpWDke.cjs";
16
+ import { a as formatPt, c as parseStyleElementProperties, i as formatPercentageMultiplier, l as parseTextProperties, n as StyleProperties, o as paragraphPropertiesToAttributes, r as StylePropertiesSchema, s as parseParagraphProperties, t as ParsedProperties, u as textPropertiesToAttributes } from "./properties-C-JKQZUD.cjs";
17
+ import { n as canonicalPropertiesString, t as buildStylePropertyElements } from "./serialize-D1fti8C5.cjs";
18
+ import { a as StyleRegistry, i as StyleFamily, n as OtherPartRef, o as StyleRegistryOptions, r as STYLE_FAMILIES, s as isStyleFamily, t as InternRequest } from "./registry-CphRYjDD.cjs";
19
19
  import { t as ensureSpan } from "./span-BtmvlqZH.cjs";
20
20
  import { a as rootElement, i as findChildElement, n as childrenWithTag, r as elementsWithTag, t as attrValue } from "./query-P-Y5DK0-.cjs";
21
21
  import { n as formatOdfLength, r as parseOdfLength, t as LengthUnit } from "./units-7pCiECuP.cjs";
@@ -23,26 +23,26 @@ import { a as parseCellReference, i as columnLettersToIndex, n as cellReference,
23
23
  import { n as parseOdfColor, t as formatOdfColor } from "./color-CqXjt_to.cjs";
24
24
  import { i as parsePageSize, n as parseLinePoints, r as parseMargins, t as parseBox } from "./geometry-lKWJ_ifA.cjs";
25
25
  import { a as measureOdfNodeLength, n as decodeOdfText, o as sumOdfNodeLength, r as getOdfSpaceCount } from "./text-BAi1tapc.cjs";
26
- import { a as resolveStyle, i as findStyleElement, n as StyleCascadeResult, o as resolveStyleElementChain, r as StyleElementChainResult, t as CascadeDiagnostic } from "./cascade-BmvsXcAz.cjs";
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 { n as readOdfParagraph } from "./paragraph-BBmSl_sK.cjs";
29
+ import { r as readOdfParagraph } from "./paragraph-CuEMXbDg.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
- import { n as resolvePageLayoutProperties, t as resolveDrawPageSize } from "./masterpage-XJ2v2khe.cjs";
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-ztNK8w6V.cjs";
36
- import { n as readOdp, r as readOdpContent, t as OdpDocument } from "./read-CTfeWaWq.cjs";
37
- import { i as readOdtContent, n as OdtReadOptions, r as readOdt, t as OdtDocument } from "./read-Cs1ktkWB.cjs";
38
- import { n as readOdg, r as readOdgContent, t as OdgDocument } from "./read-DOYWO6BM.cjs";
39
- import { n as readOds, r as readOdsContent, t as OdsDocument } from "./read-B4238IGr.cjs";
35
+ import { i as readDrawObjectReference, r as EmbeddedDrawObject, t as EmbeddedDocumentKind } from "./embedded-rKOsAsjg.cjs";
36
+ import { n as readOdp, r as readOdpContent, t as OdpDocument } from "./read-CDSmR3qt.cjs";
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
+ import { n as readOdg, r as readOdgContent, t as OdgDocument } from "./read-IOYq80AA.cjs";
39
+ import { n as readOds, r as readOdsContent, t as OdsDocument } from "./read-C3Ei_MYc.cjs";
40
40
  import { a as readOdfFormulaMathMl, i as readOdfFormulaContent, r as readOdfFormula, t as OdfFormulaDocument } from "./read-DUCm1nUv.cjs";
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-cIjw-Jf-.cjs";
45
- import { n as readOdbForm, t as OdbForm } from "./form-BGCT81ss.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";
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-BoPvy83Y.cjs";
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 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 };
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";
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
@@ -13,9 +13,9 @@ import { n as writeMimetype, t as readMimetype } from "./mimetype-BfkwTeaW.js";
13
13
  import { n as txt, t as el } from "./fragment-B1ZV7T5Z.js";
14
14
  import { n as encodeXmlText, t as decodeXmlText } from "./entities-BZlXvHqu.js";
15
15
  import { a as ManifestProblem, c as buildManifest, d as syncManifest, f as validateManifest, i as ManifestEntrySchema, l as readManifest, n as Manifest, o as ManifestProblemSchema, p as writeManifest, r as ManifestEntry, s as ManifestSchema, t as BuildManifestOptions, u as setDocumentMediaType } from "./manifest-CP1sqyGU.js";
16
- import { a as formatPt, c as parseStyleElementProperties, i as formatPercentageMultiplier, l as parseTextProperties, n as StyleProperties, o as paragraphPropertiesToAttributes, r as StylePropertiesSchema, s as parseParagraphProperties, t as ParsedProperties, u as textPropertiesToAttributes } from "./properties-DjAIdPry.js";
17
- import { n as canonicalPropertiesString, t as buildStylePropertyElements } from "./serialize-DvaE_t5D.js";
18
- import { a as StyleRegistry, i as StyleFamily, n as OtherPartRef, o as StyleRegistryOptions, r as STYLE_FAMILIES, s as isStyleFamily, t as InternRequest } from "./registry-BVeEpUMI.js";
16
+ import { a as formatPt, c as parseStyleElementProperties, i as formatPercentageMultiplier, l as parseTextProperties, n as StyleProperties, o as paragraphPropertiesToAttributes, r as StylePropertiesSchema, s as parseParagraphProperties, t as ParsedProperties, u as textPropertiesToAttributes } from "./properties-Rral02h1.js";
17
+ import { n as canonicalPropertiesString, t as buildStylePropertyElements } from "./serialize-B-lq0LiG.js";
18
+ import { a as StyleRegistry, i as StyleFamily, n as OtherPartRef, o as StyleRegistryOptions, r as STYLE_FAMILIES, s as isStyleFamily, t as InternRequest } from "./registry-D5RGBteE.js";
19
19
  import { t as ensureSpan } from "./span-KXroEGuH.js";
20
20
  import { a as rootElement, i as findChildElement, n as childrenWithTag, r as elementsWithTag, t as attrValue } from "./query-sECN-7vU.js";
21
21
  import { n as formatOdfLength, r as parseOdfLength, t as LengthUnit } from "./units-7pCiECuP.js";
@@ -23,26 +23,26 @@ import { a as parseCellReference, i as columnLettersToIndex, n as cellReference,
23
23
  import { n as parseOdfColor, t as formatOdfColor } from "./color-CqXjt_to.js";
24
24
  import { i as parsePageSize, n as parseLinePoints, r as parseMargins, t as parseBox } from "./geometry-DnhkIhAM.js";
25
25
  import { a as measureOdfNodeLength, n as decodeOdfText, o as sumOdfNodeLength, r as getOdfSpaceCount } from "./text-gJ5R0q3u.js";
26
- import { a as resolveStyle, i as findStyleElement, n as StyleCascadeResult, o as resolveStyleElementChain, r as StyleElementChainResult, t as CascadeDiagnostic } from "./cascade-rhqUQrUa.js";
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 { n as readOdfParagraph } from "./paragraph-6hzAZpmi.js";
29
+ import { r as readOdfParagraph } from "./paragraph-BE71DZ0t.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
- import { n as resolvePageLayoutProperties, t as resolveDrawPageSize } from "./masterpage-C1McDhMv.js";
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-CLuwn306.js";
36
- import { n as readOdp, r as readOdpContent, t as OdpDocument } from "./read-Db_GZ0ZH.js";
37
- import { i as readOdtContent, n as OdtReadOptions, r as readOdt, t as OdtDocument } from "./read-DHuiGh_y.js";
38
- import { n as readOdg, r as readOdgContent, t as OdgDocument } from "./read-lc0t0UHK.js";
39
- import { n as readOds, r as readOdsContent, t as OdsDocument } from "./read-CdvX2qnz.js";
35
+ import { i as readDrawObjectReference, r as EmbeddedDrawObject, t as EmbeddedDocumentKind } from "./embedded-ClsebpWi.js";
36
+ import { n as readOdp, r as readOdpContent, t as OdpDocument } from "./read-DfEHXwgn.js";
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
+ import { n as readOdg, r as readOdgContent, t as OdgDocument } from "./read-BLoaDxr_.js";
39
+ import { n as readOds, r as readOdsContent, t as OdsDocument } from "./read-DJqvINGW.js";
40
40
  import { a as readOdfFormulaMathMl, i as readOdfFormulaContent, r as readOdfFormula, t as OdfFormulaDocument } from "./read-BnN7u9Y2.js";
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-D1-0spCe.js";
45
- import { n as readOdbForm, t as OdbForm } from "./form-D3H5H2NL.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";
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-BQB05qN1.js";
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 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 };
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";
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-BBJoUl86.js";
40
+ import { a as readOdtContent, i as readOdt, o as readOds, s as readOdsContent, t as readDrawObjectReference } from "./embedded-BSSdoKcK.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";
@@ -4,5 +4,6 @@ import { PageSize } from "document-schema.js";
4
4
  //#region src/typed/shared/masterpage.d.ts
5
5
  declare function resolvePageLayoutProperties(pkg: Package, masterPageName: string | undefined): XmlElement | undefined;
6
6
  declare function resolveDrawPageSize(page: XmlElement, pkg: Package): PageSize | undefined;
7
+ declare function readOdfMasterPageElements(pkg: Package): XmlElement[];
7
8
  //#endregion
8
- export { resolvePageLayoutProperties as n, resolveDrawPageSize as t };
9
+ export { resolveDrawPageSize as n, resolvePageLayoutProperties as r, readOdfMasterPageElements as t };
@@ -4,5 +4,6 @@ import { PageSize } from "document-schema.js";
4
4
  //#region src/typed/shared/masterpage.d.ts
5
5
  declare function resolvePageLayoutProperties(pkg: Package, masterPageName: string | undefined): XmlElement | undefined;
6
6
  declare function resolveDrawPageSize(page: XmlElement, pkg: Package): PageSize | undefined;
7
+ declare function readOdfMasterPageElements(pkg: Package): XmlElement[];
7
8
  //#endregion
8
- export { resolvePageLayoutProperties as n, resolveDrawPageSize as t };
9
+ export { resolveDrawPageSize as n, resolvePageLayoutProperties as r, readOdfMasterPageElements as t };
@@ -1,8 +1,8 @@
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 OdfMarkerHalf, r as OdfDefinitionsSink, s as OdfResidueFormat } from "./constructs-CJpDDQV0.js";
5
- import { ContentParagraph, ProvenanceDescriptor } from "document-schema.js";
4
+ import { a as OdfDefinitionsSink, l as OdfResidueFormat, s as OdfMarkerHalf } from "./constructs-B1yajQJB.js";
5
+ import { ContentBlock, ContentParagraph, ProvenanceDescriptor } from "document-schema.js";
6
6
  //#region src/typed/shared/paragraph.d.ts
7
7
  interface OdfParagraphContext {
8
8
  readonly provenanceRegions?: ReadonlyMap<string, ProvenanceDescriptor>;
@@ -11,6 +11,7 @@ interface OdfParagraphContext {
11
11
  readonly listIdState?: OdfListIdState;
12
12
  readonly format?: OdfResidueFormat;
13
13
  }
14
+ declare function readOdfConstructBodyBlocks(body: XmlElement, pkg: Package, context: OdfParagraphContext, listIdState: OdfListIdState): ContentBlock[];
14
15
  declare function readOdfParagraph(pElement: XmlElement, pkg: Package, context?: OdfParagraphContext): ContentParagraph;
15
16
  //#endregion
16
- export { readOdfParagraph as n, OdfParagraphContext as t };
17
+ export { readOdfConstructBodyBlocks as n, readOdfParagraph as r, OdfParagraphContext as t };
@@ -1,8 +1,8 @@
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 OdfMarkerHalf, r as OdfDefinitionsSink, s as OdfResidueFormat } from "./constructs-Dy_DMFs3.cjs";
5
- import { ContentParagraph, ProvenanceDescriptor } from "document-schema.js";
4
+ import { a as OdfDefinitionsSink, l as OdfResidueFormat, s as OdfMarkerHalf } from "./constructs-BSC_5kfU.cjs";
5
+ import { ContentBlock, ContentParagraph, ProvenanceDescriptor } from "document-schema.js";
6
6
  //#region src/typed/shared/paragraph.d.ts
7
7
  interface OdfParagraphContext {
8
8
  readonly provenanceRegions?: ReadonlyMap<string, ProvenanceDescriptor>;
@@ -11,6 +11,7 @@ interface OdfParagraphContext {
11
11
  readonly listIdState?: OdfListIdState;
12
12
  readonly format?: OdfResidueFormat;
13
13
  }
14
+ declare function readOdfConstructBodyBlocks(body: XmlElement, pkg: Package, context: OdfParagraphContext, listIdState: OdfListIdState): ContentBlock[];
14
15
  declare function readOdfParagraph(pElement: XmlElement, pkg: Package, context?: OdfParagraphContext): ContentParagraph;
15
16
  //#endregion
16
- export { readOdfParagraph as n, OdfParagraphContext as t };
17
+ export { readOdfConstructBodyBlocks as n, readOdfParagraph as r, OdfParagraphContext as t };
@@ -24,6 +24,8 @@ declare const StylePropertiesSchema: z.ZodObject<{
24
24
  lineSpacing: z.ZodOptional<z.ZodNumber>;
25
25
  indentLeftPt: z.ZodOptional<z.ZodNumber>;
26
26
  indentFirstLinePt: z.ZodOptional<z.ZodNumber>;
27
+ pageBreakBefore: z.ZodOptional<z.ZodBoolean>;
28
+ pageBreakAfter: z.ZodOptional<z.ZodBoolean>;
27
29
  }, z.core.$strip>;
28
30
  type StyleProperties = z.infer<typeof StylePropertiesSchema>;
29
31
  interface ParsedProperties {
@@ -24,6 +24,8 @@ declare const StylePropertiesSchema: z.ZodObject<{
24
24
  lineSpacing: z.ZodOptional<z.ZodNumber>;
25
25
  indentLeftPt: z.ZodOptional<z.ZodNumber>;
26
26
  indentFirstLinePt: z.ZodOptional<z.ZodNumber>;
27
+ pageBreakBefore: z.ZodOptional<z.ZodBoolean>;
28
+ pageBreakAfter: z.ZodOptional<z.ZodBoolean>;
27
29
  }, z.core.$strip>;
28
30
  type StyleProperties = z.infer<typeof StylePropertiesSchema>;
29
31
  interface ParsedProperties {
@@ -0,0 +1,25 @@
1
+ import { r as Package } from "./package-BUojjTXf.js";
2
+ import { ContentBlock, ContentSection, DefinitionsTable, DocumentPackage, LayoutMetadata, SourceResidue } 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
+ headerFooterParts?: OdtHeaderFooterPart[];
12
+ sectionMasterPages?: (string | undefined)[];
13
+ source?: Record<string, SourceResidue>;
14
+ }
15
+ type OdtHeaderFooterVariant = 'default' | 'left' | 'first';
16
+ interface OdtHeaderFooterPart {
17
+ readonly masterPage: string;
18
+ readonly kind: 'header' | 'footer';
19
+ readonly variant: OdtHeaderFooterVariant;
20
+ readonly blocks: ContentBlock[];
21
+ }
22
+ declare function readOdtContent(pkg: Package, options?: OdtReadOptions): OdtDocument;
23
+ declare function readOdt(pkg: Package, options?: OdtReadOptions): DocumentPackage;
24
+ //#endregion
25
+ export { readOdt as a, OdtReadOptions as i, OdtHeaderFooterPart as n, readOdtContent as o, OdtHeaderFooterVariant as r, OdtDocument as t };
@@ -1,9 +1,10 @@
1
1
  import { r as Package } from "./package-BUojjTXf.js";
2
- import { ContentDrawPage, DocumentPackage, LayoutMetadata } from "document-schema.js";
2
+ import { ContentDrawPage, DocumentPackage, LayoutMetadata, SourceResidue } from "document-schema.js";
3
3
  //#region src/typed/odg/read.d.ts
4
4
  interface OdgDocument {
5
5
  metadata: LayoutMetadata;
6
6
  pages: ContentDrawPage[];
7
+ source?: Record<string, SourceResidue>;
7
8
  }
8
9
  declare function readOdgContent(pkg: Package): OdgDocument;
9
10
  declare function readOdg(pkg: Package): DocumentPackage;
@@ -1,10 +1,11 @@
1
1
  import { r as Package } from "./package-L24lkba-.cjs";
2
- import { ContentSheet, DefinitionsTable, DocumentPackage, LayoutMetadata } from "document-schema.js";
2
+ import { ContentSheet, DefinitionsTable, DocumentPackage, LayoutMetadata, SourceResidue } from "document-schema.js";
3
3
  //#region src/typed/ods/read.d.ts
4
4
  interface OdsDocument {
5
5
  metadata: LayoutMetadata;
6
6
  sheets: ContentSheet[];
7
7
  definitions?: DefinitionsTable;
8
+ source?: Record<string, SourceResidue>;
8
9
  }
9
10
  declare function readOdsContent(pkg: Package): OdsDocument;
10
11
  declare function readOds(pkg: Package): DocumentPackage;