ooxml.js 4.6.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -138,7 +138,7 @@ const content = readXlsxContent(decodePackage(bytes)); // ContentDocument, kind:
138
138
  const pkg = buildXlsxPackageFromContent(content); // a fresh Package built from scratch, not a write-back into `pkg`
139
139
  ```
140
140
 
141
- `readDocxContent` is the only reader in this package that returns a docx's comments, footnotes, endnotes, header/footer parts and text, section break kinds, and `word/numbering.xml` definitions: those sit on `DocxDocument` outside its `sections` (a section's `breakType` excepted — that rides `ContentSection` itself), which is exactly the part of it `ContentDocument` — and therefore the tree — has no place for. They do not survive `buildDocxPackageFromContent` either (it writes none of those parts), so this is about which reader returns them, not about which pair round-trips them. `endnotes`, `headerFooterParts`, and `sectionHeaderFooters` are required fields on the published `DocxDocument` shape — a reader always populates them (an empty array when the docx spells none), and code constructing a `DocxDocument` by hand rather than reading one must spell them too.
141
+ `readDocxContent` is the only reader in this package that returns a docx's comments, footnotes, endnotes, header/footer parts, section break kinds, and `word/numbering.xml` definitions: those sit on `DocxDocument` outside its `sections` (a section's `breakType` excepted — that rides `ContentSection` itself), which is exactly the part of it `ContentDocument` — and therefore the tree — has no place for. They do not survive `buildDocxPackageFromContent` either (it writes none of those parts), so this is about which reader returns them, not about which pair round-trips them. `endnotes`, `headerFooterParts`, and `sectionHeaderFooters` are required fields on the published `DocxDocument` shape — a reader always populates them (an empty array when the docx spells none), and code constructing a `DocxDocument` by hand rather than reading one must spell them too.
142
142
 
143
143
  #### Fidelity constructs
144
144
 
@@ -280,7 +280,7 @@ The package layers a lossless core outward to lossy convenience views:
280
280
  - **`src/package-io/`** — `read.ts`/`write.ts` unzip, classify each entry as XML or binary (`looksLikeXml` byte sniff), and parse/serialize.
281
281
  - **`src/codec.ts`** — public round-trip surface: `packageCodec`/`xmlCodec` (`z.codec()` pairs) plus `decodePackage`/`encodePackage` wrappers.
282
282
  - **`src/compact.ts`** — the ooxml.js format: `compactCodec`/`compactPackageCodec` plus `toCompact`/`fromCompact`/`decodeCompactPackage`/`encodeCompactPackage` wrappers.
283
- - **`src/typed/`** — lossy projections. `readDocxContent` resolves the full style cascade (`docDefaults` → `basedOn` → paragraph-mark → character styles → direct formatting) into ordered `sections` plus comments/footnotes/headers/footers/numbering; `readPptxContent` resolves placeholder → layout → master → theme inheritance into `slides` (presentation order via `p:sldIdLst`); `readXlsxWorkbook` covers cell values/formulas, merged ranges, defined names. `typed/shared/` holds shared OOXML primitives (`drawingml.ts` geometry/theme/colour, `color.ts` `ColorTransform` cascade, `units.ts`, `metadata.ts`, `source-path.ts`). Types come from `document-schema.js`. Only the docx and xlsx `ContentDocument`-shaped pairs encode back to a `Package`; everything else is one-way, and faithful round-tripping goes through `decodePackage`/`encodePackage`.
283
+ - **`src/typed/`** — lossy projections. `readDocxContent` resolves the full style cascade (`docDefaults` → `basedOn` → paragraph-mark → character styles → direct formatting) into ordered `sections` plus comments/footnotes/header-footer parts/numbering; `readPptxContent` resolves placeholder → layout → master → theme inheritance into `slides` (presentation order via `p:sldIdLst`); `readXlsxWorkbook` covers cell values/formulas, merged ranges, defined names. `typed/shared/` holds shared OOXML primitives (`drawingml.ts` geometry/theme/colour, `color.ts` `ColorTransform` cascade, `units.ts`, `metadata.ts`, `source-path.ts`). Types come from `document-schema.js`. Only the docx and xlsx `ContentDocument`-shaped pairs encode back to a `Package`; everything else is one-way, and faithful round-tripping goes through `decodePackage`/`encodePackage`.
284
284
  - **`src/typed/document-package.ts`** — the `DocumentPackage`-native surface, and nothing else: `readDocx`/`readPptx`/`readXlsx` are their content-level reader composed with `document-schema.js`'s `assemblePackage`, `buildDocxPackage`/`buildXlsxPackage` are `flattenPackage` composed with their content-level writer. One module rather than one per format, because the adapters are format-uniform and the reasoning behind them (why a reader mints styles rather than calling bare `decompose`, why a writer's kind guard lives at this boundary, what a docx's non-content parts do instead of riding the tree) is one argument stated once.
285
285
  - **`src/typed/docx/`** — `read.ts` and `write.ts` are a read/write pair over `ContentSection[]`. `constructs.ts` owns the fidelity construct vocabulary both halves share: the descriptor shapes (`contentControl` from `w:sdt`, `field` from `w:fldChar`/`w:fldSimple`, `anchor` from `w:bookmarkStart`/`End`, `provenance` from `w:ins`/`w:del`/`w:moveFrom`/`w:moveTo`) and the rule deciding which occurrences are block-scoped enough to bracket. `buildDocxPackageFromContent` builds a complete docx `Package` from scratch; it writes no `styles.xml`, `numbering.xml`, comments, footnotes, or headers/footers, so the `DocxDocument` fields outside `sections` do not survive the pair.
286
286
  - **`src/typed/xlsx/`** — a `ContentDocument`-shaped read/write pair alongside the lossy `readXlsxWorkbook` (both exported; different callers). `readXlsxContent` reads column widths, row heights, hidden rows/columns, merged ranges, every cell value kind, print settings, and cell comments (`comments.ts`: legacy `xl/comments{N}.xml` notes plus `[MS-XLSX]` threaded comments, both resolved through the worksheet part's own relationships, never by part name); `buildXlsxPackageFromContent` builds a complete xlsx `Package` from scratch (never editing the decoded package). `number-format.ts`/`styles.ts`/`serial.ts` run both ways: reading classifies style index → format code → kind (`percentage`/`currency`/`date`/`time`/`dateTime`); writing emits interned `numFmt` codes, fed back through the classifier in tests. The classifier is not a formatter (`displayText` is the typed-value spelling). Scope limits: `currency` with no ISO code writes as plain `number`; non-canonical temporal values degrade to text; cell comments read but do not write (`buildXlsxPackageFromContent` emits no comment part, so they do not survive this pair); column widths re-approximate through xlsx's own character-width unit on every write, so a width drifts slightly on each round trip rather than reaching a fixed point.
@@ -297,9 +297,9 @@ The package layers a lossless core outward to lossy convenience views:
297
297
 
298
298
  - **A `Content` suffix means the flat form, not a lesser one.** `readDocx` and `readDocxContent` are the same read; the suffix says which shape comes back (`DocumentPackage` versus the flat `DocxDocument`/`ContentDocument`), never which is more faithful. The pair that genuinely differs in what it reads is `readXlsxWorkbook`, whose name says so by naming its own return type rather than taking a suffix.
299
299
  - **A construct marker brackets whole blocks, never a sub-sequence of runs.** A construct covering a sub-sequence of one paragraph's runs lands on that paragraph's `constructs` field as a run range (see the fidelity-constructs section above) — bookmarks, fields, internal links, comment extents, note references, and `w:ffData` form fields alike. An inline SDT or a few inserted words inside an otherwise untouched paragraph are still read exactly as before — the text survives, the construct does not — as is a bookmark whose two halves sit in different paragraphs. So does a block extent that crosses another, or that straddles a section break or table-cell boundary: neither is expressible as balanced brackets (nor as a tree group, which is what the marker pair promotes to), and both are dropped — a drop `document-schema.js`'s extent-scope note ratifies — rather than emitted at a position that would decode to a different nesting.
300
- - **The docx pair round-trips `sections`, not a whole `DocxDocument`.** Numbering definitions, cell border styling/shading, section break kinds (`w:sectPr/w:type` onto `ContentSection.breakType`, both directions), and `w:themeColor` (without `themeShade`/`themeTint`) are read; images read into `ContentImageBlock` (floating `wp:anchor` position not recorded); `PAGE`/`NUMPAGES` fields resolve to Word's cached text. Headers and footers are read both as the flat per-part text arrays the reader always produced and structurally — each referenced part as block flow (`headerFooterParts`) plus per-section default/first/even references (`sectionHeaderFooters`); collapsing the flat arrays into that model wants a breaking change to a published shape and is tracked rather than taken. An inline `w:object`/`o:OLEObject` whose payload part is itself a ZIP archive — a modern producer's embedded xlsx/docx/pptx, detected by magic bytes through `archive-codec` — or a classic OLE compound-file `.bin` whose root storage carries the embedded file as an OLE-packaged `Package` stream, read through `archive-codec`'s bounded CFB reader, is decoded into a nested content document and emitted as a `ContentEmbeddedObjectBlock` beside its containing paragraph's own block, sized from `w:dxaOrig`/`w:dyaOrig`; the object's VML preview picture (`v:imagedata`) and a `w:object` inside a footnote (notes ride as text, with no block flow to lift an object into — a header/footer's own objects DO recover, those parts being walked as block flow) are not read, a compound file holding native legacy streams (BIFF and friends — no `Package` stream, or a packaged file that is not a ZIP) stays opaque, and a payload that does not decode as one of the three OOXML flavours (a plain archive, corrupt zip or compound-file data, a bodyless docx) degrades to no embedded block rather than failing the host read. The writer emits such a block back out as the inverse `w:object`/`o:OLEObject`: the nested document is re-serialised through its own format's builder into a fresh `word/embeddings/oleObject<N>.<docx|xlsx|pptx>` ZIP part carrying its relationship and content-type override, and `w:dxaOrig`/`w:dyaOrig` are derived from the block's frame (twips). An embedded presentation document serialises through an injected port — `BuildDocxContentOptions.serialiseEmbeddedPresentation`, a presentation `ContentDocument` → pptx-bytes function this package accepts because it has no PresentationML writer of its own, and the ecosystem's one pptx writer lives one layer up in documents.js (which exports `embeddedPresentationSerialiser`, wired from its own pptx builder, for exactly this call); with no serialiser injected, a `ContentDocument` carrying one is refused with a thrown error rather than a silent drop, and no VML preview picture is regenerated (the reader never read one into the model, and real previews are WMF/EMF this ecosystem has no writer for; Word shows a blank until activated). The writer emits no `styles.xml`, `numbering.xml`, comments, footnotes, endnotes, or headers/footers, so the `DocxDocument` fields outside `sections` do not come back — a paragraph's `styleId` is still written as a `w:pStyle` reference, resolving to nothing, since every property the style would have contributed is already spelled as direct formatting by then.
300
+ - **The docx pair round-trips `sections`, not a whole `DocxDocument`.** Numbering definitions, cell border styling/shading, section break kinds (`w:sectPr/w:type` onto `ContentSection.breakType`, both directions), and `w:themeColor` (without `themeShade`/`themeTint`) are read; images read into `ContentImageBlock` (floating `wp:anchor` position not recorded); `PAGE`/`NUMPAGES` fields resolve to Word's cached text. Headers and footers are read structurally every `word/header*.xml` / `word/footer*.xml` part as block flow (`headerFooterParts`, referenced or not) plus per-section default/first/even references (`sectionHeaderFooters`). An inline `w:object`/`o:OLEObject` whose payload part is itself a ZIP archive — a modern producer's embedded xlsx/docx/pptx, detected by magic bytes through `archive-codec` — or a classic OLE compound-file `.bin` whose root storage carries the embedded file as an OLE-packaged `Package` stream, read through `archive-codec`'s bounded CFB reader, is decoded into a nested content document and emitted as a `ContentEmbeddedObjectBlock` beside its containing paragraph's own block, sized from `w:dxaOrig`/`w:dyaOrig`; the object's VML preview picture (`v:imagedata`) and a `w:object` inside a footnote (notes ride as text, with no block flow to lift an object into — a header/footer's own objects DO recover, those parts being walked as block flow) are not read, a compound file holding native legacy streams (BIFF and friends — no `Package` stream, or a packaged file that is not a ZIP) stays opaque, and a payload that does not decode as one of the three OOXML flavours (a plain archive, corrupt zip or compound-file data, a bodyless docx) degrades to no embedded block rather than failing the host read. The writer emits such a block back out as the inverse `w:object`/`o:OLEObject`: the nested document is re-serialised through its own format's builder into a fresh `word/embeddings/oleObject<N>.<docx|xlsx|pptx>` ZIP part carrying its relationship and content-type override, and `w:dxaOrig`/`w:dyaOrig` are derived from the block's frame (twips). An embedded presentation document serialises through an injected port — `BuildDocxContentOptions.serialiseEmbeddedPresentation`, a presentation `ContentDocument` → pptx-bytes function this package accepts because it has no PresentationML writer of its own, and the ecosystem's one pptx writer lives one layer up in documents.js (which exports `embeddedPresentationSerialiser`, wired from its own pptx builder, for exactly this call); with no serialiser injected, a `ContentDocument` carrying one is refused with a thrown error rather than a silent drop, and no VML preview picture is regenerated (the reader never read one into the model, and real previews are WMF/EMF this ecosystem has no writer for; Word shows a blank until activated). The writer emits no `styles.xml`, `numbering.xml`, comments, footnotes, endnotes, or headers/footers, so the `DocxDocument` fields outside `sections` do not come back — a paragraph's `styleId` is still written as a `w:pStyle` reference, resolving to nothing, since every property the style would have contributed is already spelled as direct formatting by then.
301
301
  - **pptx is read-only.** Connector shapes (`p:cxnSp`) are skipped; shape rotation composes through groups; a dynamic field (`a:fld`, e.g. slidenum/datetime) reads as an ordinary run plus a `field` run construct carrying `@type` as the instruction and the cached `a:t` as the result; an internal slide-jump link (`a:hlinkClick` resolving to a slide relationship, no `TargetMode`) records a `link` run construct with an internal target naming the destination slide's package part path (e.g. `ppt/slides/slide2.xml` — PresentationML addresses slides by part relationship, never by name; the flat run's `hyperlink` field stays reserved for external URIs, and an action-only `ppaction://hlinkshowjump` names no target part and records nothing); a chart graphic frame reads its chart part's cached series/category model into a table block (header row = series names, one row per category index); a SmartArt graphic frame reads its diagram data model's node text as paragraphs in diagram order (depth-first over `parOf` connections, siblings by `srcOrd`); an OLE graphic frame reads the fallback picture its `mc:Fallback` carries (or, with none reachable, a paragraph naming the `p:oleObj`'s `progId`), and when the payload part is itself a ZIP archive — a modern producer's embedded xlsx/docx/pptx, detected by magic bytes through `archive-codec` — or a classic OLE compound-file `.bin` whose root storage carries the embedded file as an OLE-packaged `Package` stream, read through `archive-codec`'s bounded CFB reader, also decodes it into a nested content document and emits it as an `embeddedObject` block beside the picture, sized to the frame's own geometry; a compound file holding native legacy streams (no `Package` stream, or a packaged file that is not a ZIP) stays opaque external-application data, and a payload that does not decode as one of the three OOXML flavours degrades to no embedded block rather than failing the slide read.
302
- - **xlsx has no native percentage/currency/date/time cell type.** Both directions are closed via the number-format engine: reading classifies style → format code → kind; writing emits interned `numFmt` codes, fed back through the classifier in tests. `displayText` is the typed-value spelling, not the producer's rendered string. A chart graphic frame reads as an embedded `chart` object (`embeddedObjects`, one row per series over the shared category axis, values verbatim `c:v` text, frame resolved through the sheet's own column widths and row heights), and a drawing picture (`xdr:pic`) as a `ContentSheetImage` (`images`, media bytes sniffed through the drawing part's relationships, frame resolved the same way) — one-way rows, since the writer emits no drawing part. A workbook's general defined names and table/List objects ride the tree reader's root `definitions` table (`readXlsx`), the landing the schema's own verdict gives a named range; the flat reader and the write pair carry neither. `dataValidation` and `conditionalFormatting` rules quarantine verbatim on their range's anchor cell through the residue channel, pending the corpus-gated vocabulary the construct inventory defers.
302
+ - **xlsx has no native percentage/currency/date/time cell type.** Both directions are closed via the number-format engine: reading classifies style → format code → kind; writing emits interned `numFmt` codes, fed back through the classifier in tests. `displayText` is the typed-value spelling, not the producer's rendered string. A chart graphic frame reads as an embedded `chart` object (`embeddedObjects`, one row per series over the shared category axis, values verbatim `c:v` text, frame resolved through the sheet's own column widths and row heights), and a drawing picture (`xdr:pic`) as a `ContentSheetImage` (`images`, media bytes sniffed through the drawing part's relationships, frame resolved the same way) — both rows under any of the drawing's three anchor spellings (`twoCellAnchor` marker pairs, `oneCellAnchor` sized by its own `xdr:ext`, and `absoluteAnchor`, whose page-absolute `xdr:pos` is re-based into the cell anchor vocabulary through that same grid geometry) — one-way rows, since the writer emits no drawing part. A workbook's general defined names and table/List objects ride the tree reader's root `definitions` table (`readXlsx`), the landing the schema's own verdict gives a named range; the flat reader and the write pair carry neither. `dataValidation` and `conditionalFormatting` rules quarantine verbatim on their range's anchor cell through the residue channel, pending the corpus-gated vocabulary the construct inventory defers.
303
303
  - **`test:smoke` depends on a fresh build.** It runs `tsdown && vitest run --project smoke`, always rebuilding `dist/` first. A bare `vitest` runs both projects; `smoke` fails loudly (`Cannot find module '../dist/index.js'`) if `dist/` is unbuilt.
304
304
  - **Binary-vs-XML part classification is a byte sniff, not an extension check.** `looksLikeXml` looks for a leading `<` after skipping a UTF-8 BOM and whitespace; any future binary format starting with `<` would misclassify.
305
305
  - **`Array.isArray` narrows `unknown` to `any[]`, not `unknown[]`.** Indexing the result reintroduces `any` and trips `no-unsafe-assignment`. `compact.ts` and `xml/parse.ts` each define a local `isUnknownArray` guard (`value is unknown[]`) — use it wherever the narrowed element is read.
@@ -11,7 +11,7 @@ import "./color-fFIKAs-Y.cjs";
11
11
  import "./metadata-D6o-kLpg.cjs";
12
12
  import "./write-Dn_CL8qb.cjs";
13
13
  import "./document-package-Dcd0KSvQ.cjs";
14
- import "./read-LTgVJIPU.cjs";
14
+ import "./read-A9CC5Toq.cjs";
15
15
  import "./numbering-C53LT-Jx.cjs";
16
16
  import "./read-BoV9SZy4.cjs";
17
17
  import "./xlsx-CpX5nzGV.cjs";
@@ -11,7 +11,7 @@ import "./color-fFIKAs-Y.js";
11
11
  import "./metadata-o_WH9V_I.js";
12
12
  import "./write-inqdKHR3.js";
13
13
  import "./document-package-BqYJqSDu.js";
14
- import "./read-D30xHgEp.js";
14
+ import "./read-DA55zDgD.js";
15
15
  import "./numbering-D0YfuiOO.js";
16
16
  import "./read-ZWJPDvG-.js";
17
17
  import "./xlsx-DacFqZeF.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-mAL1djiN.cjs";
1
+ import { i as xmlCodec, n as encodePackage, r as packageCodec, t as decodePackage } from "./codec-ChjAoVUL.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-CR6QtZWA.js";
1
+ import { i as xmlCodec, n as encodePackage, r as packageCodec, t as decodePackage } from "./codec-Daj8L7UQ.js";
2
2
  export { decodePackage, encodePackage, packageCodec, xmlCodec };
package/dist/index.cjs CHANGED
@@ -15,7 +15,7 @@ const require_typed_util = require("./typed/util.cjs");
15
15
  const require_typed_shared_color = require("./typed/shared/color.cjs");
16
16
  const require_typed_shared_metadata = require("./typed/shared/metadata.cjs");
17
17
  const require_image_sniff = require("./image/sniff.cjs");
18
- const require_read = require("./read-D-L3dItC.cjs");
18
+ const require_read = require("./read-Cj23Gllx.cjs");
19
19
  const require_typed_xlsx_content = require("./typed/xlsx/content.cjs");
20
20
  const require_typed_docx_numbering = require("./typed/docx/numbering.cjs");
21
21
  const require_typed_xlsx_build = require("./typed/xlsx/build.cjs");
@@ -285,6 +285,7 @@ Object.defineProperty(exports, "FieldDescriptorSchema", {
285
285
  }
286
286
  });
287
287
  exports.FootnoteSchema = require_read.FootnoteSchema;
288
+ exports.HeaderFooterPartSchema = require_read.HeaderFooterPartSchema;
288
289
  Object.defineProperty(exports, "HeadingGroupSchema", {
289
290
  enumerable: true,
290
291
  get: function() {
@@ -398,6 +399,7 @@ Object.defineProperty(exports, "SectionGroupSchema", {
398
399
  return document_schema_js.SectionGroupSchema;
399
400
  }
400
401
  });
402
+ exports.SectionHeaderFooterReferencesSchema = require_read.SectionHeaderFooterReferencesSchema;
401
403
  Object.defineProperty(exports, "ShapeConstructGroupSchema", {
402
404
  enumerable: true,
403
405
  get: function() {
package/dist/index.d.cts CHANGED
@@ -15,11 +15,11 @@ import { n as DocumentMetadataSchema, t as DocumentMetadata } from "./metadata-D
15
15
  import { n as sniffImageFormat, t as ImageFormat } from "./sniff-DjpnUZRp.cjs";
16
16
  import { i as buildDocxPackageFromContent, n as DocxContent, r as EmbeddedPresentationSerialiser, t as BuildDocxContentOptions } from "./write-Dn_CL8qb.cjs";
17
17
  import { a as readXlsx, i as readPptx, n as buildXlsxPackage, r as readDocx, t as buildDocxPackage } from "./document-package-Dcd0KSvQ.cjs";
18
- import { a as Footnote, d as readDocxContent, i as DocxDocumentSchema, n as CommentSchema, o as FootnoteSchema, r as DocxDocument, t as Comment } from "./read-LTgVJIPU.cjs";
18
+ import { a as Footnote, c as HeaderFooterPartSchema, d as readDocxContent, i as DocxDocumentSchema, l as SectionHeaderFooterReferences, n as CommentSchema, o as FootnoteSchema, r as DocxDocument, s as HeaderFooterPart, t as Comment, u as SectionHeaderFooterReferencesSchema } from "./read-A9CC5Toq.cjs";
19
19
  import { a as NumberingLevelSchema, i as NumberingLevel, n as NumberingDefinitionSchema, o as readNumberingDefinitions, r as NumberingDefinitions, t as NumberingDefinition } from "./numbering-C53LT-Jx.cjs";
20
20
  import { n as PptxDocumentSchema, r as readPptxContent, t as PptxDocument } from "./read-BoV9SZy4.cjs";
21
21
  import { a as XlsxSheet, c as XlsxWorkbookSchema, i as XlsxCellSchema, l as readXlsxWorkbook, n as DefinedNameSchema, o as XlsxSheetSchema, r as XlsxCell, s as XlsxWorkbook, t as DefinedName } from "./xlsx-CpX5nzGV.cjs";
22
22
  import { t as readXlsxContent } from "./content-C79O3esU.cjs";
23
23
  import { t as buildXlsxPackageFromContent } from "./build-D-ldsmtA.cjs";
24
- import { $ as ContentShapeSchema, $n as isHeadingGroupNode, $t as PackageChildren, A as ContentConstructStart, An as SlideDescriptor, At as DrawPageChild, B as ContentImageBlock, Bn as StylesTableSchema, Bt as LinkDescriptorSchema, C as ContentBorderSchema, Cn as ShapeDescriptor, Ct as ContentTableRow, D as ContentCellValueSchema, Dn as SheetDescriptor, Dt as DivisionDescriptorSchema, E as ContentCellValue, En as SheetChild, Et as DivisionDescriptor, F as ContentControlLockSchema, Fn as StyleParagraphProperties, Ft as FieldDescriptorSchema, G as ContentPageBreakSchema, Gn as decompose, Gt as ListGroupSchema, H as ContentListMembership, Hn as applyRunStyleProperties, Ht as LinkTargetSchema, I as ContentControlType, In as StyleParagraphPropertiesSchema, It as HeadingGroupNode, J as ContentRun, Jn as flattenPackage, Jt as MarginsSchema, K as ContentParagraph, Kn as factorStyles, Kt as ListParagraph, L as ContentControlTypeSchema, Ln as StyleRunProperties, Lt as HeadingGroupSchema, M as ContentControlDescriptor, Mn as SlideGroupSchema, Mt as DrawPageGroupNode, N as ContentControlDescriptorSchema, Nn as StyleEntry, Nt as DrawPageGroupSchema, O as ContentConstructEnd, On as SheetGroupNode, Ot as DocumentPackage, P as ContentControlLock, Pn as StyleEntrySchema, Pt as FieldDescriptor, Q as ContentShape, Qn as isDrawPageGroupNode, Qt as PackageBlockLeafSchema, R as ContentDocument, Rn as StyleRunPropertiesSchema, Rt as HeadingParagraph, S as ContentBorder, Sn as ShapeConstructGroupSchema, St as ContentTableCellSchema, T as ContentCellBordersSchema, Tn as ShapeGroupSchema, Tt as ContentTableSchema, U as ContentListMembershipSchema, Un as assemblePackage, Ut as ListChild, V as ContentImageBlockSchema, Vn as applyParagraphStyleProperties, Vt as LinkTarget, W as ContentPageBreak, Wn as colorToRgbHex, Wt as ListGroupNode, X as ContentSection, Xn as isContentConstructEnd, Xt as PAGE_SIZE_LETTER, Y as ContentRunSchema, Yn as isContentBlock, Yt as PAGE_SIZE_A4, Z as ContentSectionSchema, Zn as isContentConstructStart, Zt as PackageBlockLeaf, _ as ConstructDescriptorSchema, _n as SectionDescriptor, _t as ContentSlideSchema, a as Alignment, an as PackageNodeSchema, ar as isSectionConstructGroupNode, at as ContentSheetImage, b as ContentBlock, bn as ShapeChild, bt as ContentTable, c as AnchorDescriptorSchema, cn as ProvenanceChange, cr as isShapeGroupNode, ct as ContentSheetPrintRangeSchema, d as Box, dn as ProvenanceDescriptorSchema, dr as overlayStyleEntries, dt as ContentSheetRepeatRange, en as PackageGroup, er as isListGroupNode, et as ContentSheet, f as BoxSchema, fn as SLIDE_SIZE_STANDARD, fr as resolveStyleChain, ft as ContentSheetRepeatRangeSchema, g as ConstructDescriptor, gn as SectionConstructGroupSchema, gt as ContentSlide, h as ColorSchema, hn as SectionConstructGroupNode, ht as ContentSheetSchema, i as xmlCodec, in as PackageNode, ir as isPackageNode, it as ContentSheetColumnSchema, j as ContentConstructStartSchema, jn as SlideGroupNode, jt as DrawPageDescriptor, k as ContentConstructEndSchema, kn as SheetGroupSchema, kt as DocumentPackageSchema, l as AnchorType, ln as ProvenanceChangeSchema, lr as isSheetGroupNode, lt as ContentSheetPrintSettings, m as Color, mn as SectionChild, mt as ContentSheetRowSchema, n as encodePackage, nn as PackageLeaf, nr as isPackageGroup, nt as ContentSheetCellSchema, o as AlignmentSchema, on as PageSize, or as isSectionGroupNode, ot as ContentSheetImageSchema, p as COLOR_BLACK, pn as SLIDE_SIZE_WIDESCREEN, pr as rgbHexToColor, pt as ContentSheetRow, q as ContentParagraphSchema, qn as findConstructMarkerImbalance, qt as Margins, r as packageCodec, rn as PackageLeafSchema, rr as isPackageLeaf, rt as ContentSheetColumn, s as AnchorDescriptor, sn as PageSizeSchema, sr as isShapeConstructGroupNode, st as ContentSheetPrintRange, t as decodePackage, tn as PackageGroupSchema, tr as isPackageBlockLeaf, tt as ContentSheetCell, u as AnchorTypeSchema, un as ProvenanceDescriptor, ur as isSlideGroupNode, ut as ContentSheetPrintSettingsSchema, v as ConstructMarkerImbalance, vn as SectionGroupNode, vt as ContentStrokeStyle, w as ContentCellBorders, wn as ShapeGroupNode, wt as ContentTableRowSchema, x as ContentBlockSchema, xn as ShapeConstructGroupNode, xt as ContentTableCell, y as ConstructMarkerImbalanceError, yn as SectionGroupSchema, yt as ContentStrokeStyleSchema, z as ContentDocumentSchema, zn as StylesTable, zt as LinkDescriptor } from "./codec-mAL1djiN.cjs";
25
- export { type Alignment, AlignmentSchema, type AnchorDescriptor, AnchorDescriptorSchema, type AnchorType, AnchorTypeSchema, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, BoxSchema, type BuildDocxContentOptions, COLOR_BLACK, type Color, ColorSchema, type ColorTransform, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type ConstructDescriptor, ConstructDescriptorSchema, type ConstructMarkerImbalance, ConstructMarkerImbalanceError, type ContentBlock, ContentBlockSchema, type ContentBorder, ContentBorderSchema, type ContentCellBorders, ContentCellBordersSchema, type ContentCellValue, ContentCellValueSchema, type ContentConstructEnd, ContentConstructEndSchema, type ContentConstructStart, ContentConstructStartSchema, type ContentControlDescriptor, ContentControlDescriptorSchema, type ContentControlLock, ContentControlLockSchema, type ContentControlType, ContentControlTypeSchema, type ContentDocument, ContentDocumentSchema, type ContentImageBlock, ContentImageBlockSchema, type ContentListMembership, ContentListMembershipSchema, type ContentPageBreak, ContentPageBreakSchema, type ContentParagraph, ContentParagraphSchema, type ContentRun, ContentRunSchema, type ContentSection, ContentSectionSchema, type ContentShape, ContentShapeSchema, type ContentSheet, type ContentSheetCell, ContentSheetCellSchema, type ContentSheetColumn, ContentSheetColumnSchema, type ContentSheetImage, ContentSheetImageSchema, type ContentSheetPrintRange, ContentSheetPrintRangeSchema, type ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, type ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, type ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, type ContentSlide, ContentSlideSchema, type ContentStrokeStyle, ContentStrokeStyleSchema, type ContentTable, type ContentTableCell, ContentTableCellSchema, type ContentTableRow, ContentTableRowSchema, ContentTableSchema, type DefinedName, DefinedNameSchema, type DivisionDescriptor, DivisionDescriptorSchema, type DocumentMetadata, DocumentMetadataSchema, type DocumentPackage, DocumentPackageSchema, type DocxContent, type DocxDocument, DocxDocumentSchema, type DrawPageChild, type DrawPageDescriptor, type DrawPageGroupNode, DrawPageGroupSchema, type EmbeddedPresentationSerialiser, type FieldDescriptor, FieldDescriptorSchema, type Footnote, FootnoteSchema, type HeadingGroupNode, HeadingGroupSchema, type HeadingParagraph, type ImageFormat, type LinkDescriptor, LinkDescriptorSchema, type LinkTarget, LinkTargetSchema, type ListChild, type ListGroupNode, ListGroupSchema, type ListParagraph, type Margins, MarginsSchema, type NumberingDefinition, NumberingDefinitionSchema, type NumberingDefinitions, type NumberingLevel, NumberingLevelSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, type PackageBlockLeaf, PackageBlockLeafSchema, type PackageChildren, type PackageGroup, PackageGroupSchema, type PackageLeaf, PackageLeafSchema, type PackageNode, PackageNodeSchema, PackageSchema, type PageSize, PageSizeSchema, type Part, PartSchema, type PptxDocument, PptxDocumentSchema, type ProvenanceChange, ProvenanceChangeSchema, type ProvenanceDescriptor, ProvenanceDescriptorSchema, type Relationship, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, type SectionChild, type SectionConstructGroupNode, SectionConstructGroupSchema, type SectionDescriptor, type SectionGroupNode, SectionGroupSchema, type ShapeChild, type ShapeConstructGroupNode, ShapeConstructGroupSchema, type ShapeDescriptor, type ShapeGroupNode, ShapeGroupSchema, type SheetChild, type SheetDescriptor, type SheetGroupNode, SheetGroupSchema, type SlideDescriptor, type SlideGroupNode, SlideGroupSchema, type StyleEntry, StyleEntrySchema, type StyleParagraphProperties, StyleParagraphPropertiesSchema, type StyleRunProperties, StyleRunPropertiesSchema, type StylesTable, StylesTableSchema, type XlsxCell, XlsxCellSchema, type XlsxSheet, XlsxSheetSchema, type XlsxWorkbook, XlsxWorkbookSchema, type XmlCdata, XmlCdataSchema, type XmlComment, XmlCommentSchema, type XmlDeclaration, XmlDeclarationSchema, type XmlElement, XmlElementSchema, type XmlNode, XmlNodeSchema, type XmlPart, XmlPartSchema, type XmlPi, XmlPiSchema, type XmlText, XmlTextSchema, applyColorTransforms, applyParagraphStyleProperties, applyRunStyleProperties, assemblePackage, attr, base64ToBytes, buildDocxPackage, buildDocxPackageFromContent, buildXlsxPackage, buildXlsxPackageFromContent, buildXml, bytesToBase64, childrenWithTag, colorToRgbHex, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, decompose, el, elementsWithTag, encodeCompactPackage, encodePackage, encodeXmlText, factorStyles, findConstructMarkerImbalance, flattenPackage, fromCompact, isCompactXmlNode, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isPackageBlockLeaf, isPackageGroup, isPackageLeaf, isPackageNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isXmlNode, overlayStyleEntries, packageCodec, parsePackage, parseXml, readDocx, readDocxContent, readNumberingDefinitions, readPptx, readPptxContent, readXlsx, readXlsxContent, readXlsxWorkbook, resolveRelationships, resolveStyleChain, rgbHexToColor, rootElement, serializePackage, sniffImageFormat, textContent, toCompact, txt, unzipPackage, walk, xmlCodec, zipPackage };
24
+ import { $ as ContentShapeSchema, $n as isHeadingGroupNode, $t as PackageChildren, A as ContentConstructStart, An as SlideDescriptor, At as DrawPageChild, B as ContentImageBlock, Bn as StylesTableSchema, Bt as LinkDescriptorSchema, C as ContentBorderSchema, Cn as ShapeDescriptor, Ct as ContentTableRow, D as ContentCellValueSchema, Dn as SheetDescriptor, Dt as DivisionDescriptorSchema, E as ContentCellValue, En as SheetChild, Et as DivisionDescriptor, F as ContentControlLockSchema, Fn as StyleParagraphProperties, Ft as FieldDescriptorSchema, G as ContentPageBreakSchema, Gn as decompose, Gt as ListGroupSchema, H as ContentListMembership, Hn as applyRunStyleProperties, Ht as LinkTargetSchema, I as ContentControlType, In as StyleParagraphPropertiesSchema, It as HeadingGroupNode, J as ContentRun, Jn as flattenPackage, Jt as MarginsSchema, K as ContentParagraph, Kn as factorStyles, Kt as ListParagraph, L as ContentControlTypeSchema, Ln as StyleRunProperties, Lt as HeadingGroupSchema, M as ContentControlDescriptor, Mn as SlideGroupSchema, Mt as DrawPageGroupNode, N as ContentControlDescriptorSchema, Nn as StyleEntry, Nt as DrawPageGroupSchema, O as ContentConstructEnd, On as SheetGroupNode, Ot as DocumentPackage, P as ContentControlLock, Pn as StyleEntrySchema, Pt as FieldDescriptor, Q as ContentShape, Qn as isDrawPageGroupNode, Qt as PackageBlockLeafSchema, R as ContentDocument, Rn as StyleRunPropertiesSchema, Rt as HeadingParagraph, S as ContentBorder, Sn as ShapeConstructGroupSchema, St as ContentTableCellSchema, T as ContentCellBordersSchema, Tn as ShapeGroupSchema, Tt as ContentTableSchema, U as ContentListMembershipSchema, Un as assemblePackage, Ut as ListChild, V as ContentImageBlockSchema, Vn as applyParagraphStyleProperties, Vt as LinkTarget, W as ContentPageBreak, Wn as colorToRgbHex, Wt as ListGroupNode, X as ContentSection, Xn as isContentConstructEnd, Xt as PAGE_SIZE_LETTER, Y as ContentRunSchema, Yn as isContentBlock, Yt as PAGE_SIZE_A4, Z as ContentSectionSchema, Zn as isContentConstructStart, Zt as PackageBlockLeaf, _ as ConstructDescriptorSchema, _n as SectionDescriptor, _t as ContentSlideSchema, a as Alignment, an as PackageNodeSchema, ar as isSectionConstructGroupNode, at as ContentSheetImage, b as ContentBlock, bn as ShapeChild, bt as ContentTable, c as AnchorDescriptorSchema, cn as ProvenanceChange, cr as isShapeGroupNode, ct as ContentSheetPrintRangeSchema, d as Box, dn as ProvenanceDescriptorSchema, dr as overlayStyleEntries, dt as ContentSheetRepeatRange, en as PackageGroup, er as isListGroupNode, et as ContentSheet, f as BoxSchema, fn as SLIDE_SIZE_STANDARD, fr as resolveStyleChain, ft as ContentSheetRepeatRangeSchema, g as ConstructDescriptor, gn as SectionConstructGroupSchema, gt as ContentSlide, h as ColorSchema, hn as SectionConstructGroupNode, ht as ContentSheetSchema, i as xmlCodec, in as PackageNode, ir as isPackageNode, it as ContentSheetColumnSchema, j as ContentConstructStartSchema, jn as SlideGroupNode, jt as DrawPageDescriptor, k as ContentConstructEndSchema, kn as SheetGroupSchema, kt as DocumentPackageSchema, l as AnchorType, ln as ProvenanceChangeSchema, lr as isSheetGroupNode, lt as ContentSheetPrintSettings, m as Color, mn as SectionChild, mt as ContentSheetRowSchema, n as encodePackage, nn as PackageLeaf, nr as isPackageGroup, nt as ContentSheetCellSchema, o as AlignmentSchema, on as PageSize, or as isSectionGroupNode, ot as ContentSheetImageSchema, p as COLOR_BLACK, pn as SLIDE_SIZE_WIDESCREEN, pr as rgbHexToColor, pt as ContentSheetRow, q as ContentParagraphSchema, qn as findConstructMarkerImbalance, qt as Margins, r as packageCodec, rn as PackageLeafSchema, rr as isPackageLeaf, rt as ContentSheetColumn, s as AnchorDescriptor, sn as PageSizeSchema, sr as isShapeConstructGroupNode, st as ContentSheetPrintRange, t as decodePackage, tn as PackageGroupSchema, tr as isPackageBlockLeaf, tt as ContentSheetCell, u as AnchorTypeSchema, un as ProvenanceDescriptor, ur as isSlideGroupNode, ut as ContentSheetPrintSettingsSchema, v as ConstructMarkerImbalance, vn as SectionGroupNode, vt as ContentStrokeStyle, w as ContentCellBorders, wn as ShapeGroupNode, wt as ContentTableRowSchema, x as ContentBlockSchema, xn as ShapeConstructGroupNode, xt as ContentTableCell, y as ConstructMarkerImbalanceError, yn as SectionGroupSchema, yt as ContentStrokeStyleSchema, z as ContentDocumentSchema, zn as StylesTable, zt as LinkDescriptor } from "./codec-ChjAoVUL.cjs";
25
+ export { type Alignment, AlignmentSchema, type AnchorDescriptor, AnchorDescriptorSchema, type AnchorType, AnchorTypeSchema, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, BoxSchema, type BuildDocxContentOptions, COLOR_BLACK, type Color, ColorSchema, type ColorTransform, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type ConstructDescriptor, ConstructDescriptorSchema, type ConstructMarkerImbalance, ConstructMarkerImbalanceError, type ContentBlock, ContentBlockSchema, type ContentBorder, ContentBorderSchema, type ContentCellBorders, ContentCellBordersSchema, type ContentCellValue, ContentCellValueSchema, type ContentConstructEnd, ContentConstructEndSchema, type ContentConstructStart, ContentConstructStartSchema, type ContentControlDescriptor, ContentControlDescriptorSchema, type ContentControlLock, ContentControlLockSchema, type ContentControlType, ContentControlTypeSchema, type ContentDocument, ContentDocumentSchema, type ContentImageBlock, ContentImageBlockSchema, type ContentListMembership, ContentListMembershipSchema, type ContentPageBreak, ContentPageBreakSchema, type ContentParagraph, ContentParagraphSchema, type ContentRun, ContentRunSchema, type ContentSection, ContentSectionSchema, type ContentShape, ContentShapeSchema, type ContentSheet, type ContentSheetCell, ContentSheetCellSchema, type ContentSheetColumn, ContentSheetColumnSchema, type ContentSheetImage, ContentSheetImageSchema, type ContentSheetPrintRange, ContentSheetPrintRangeSchema, type ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, type ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, type ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, type ContentSlide, ContentSlideSchema, type ContentStrokeStyle, ContentStrokeStyleSchema, type ContentTable, type ContentTableCell, ContentTableCellSchema, type ContentTableRow, ContentTableRowSchema, ContentTableSchema, type DefinedName, DefinedNameSchema, type DivisionDescriptor, DivisionDescriptorSchema, type DocumentMetadata, DocumentMetadataSchema, type DocumentPackage, DocumentPackageSchema, type DocxContent, type DocxDocument, DocxDocumentSchema, type DrawPageChild, type DrawPageDescriptor, type DrawPageGroupNode, DrawPageGroupSchema, type EmbeddedPresentationSerialiser, type FieldDescriptor, FieldDescriptorSchema, type Footnote, FootnoteSchema, type HeaderFooterPart, HeaderFooterPartSchema, type HeadingGroupNode, HeadingGroupSchema, type HeadingParagraph, type ImageFormat, type LinkDescriptor, LinkDescriptorSchema, type LinkTarget, LinkTargetSchema, type ListChild, type ListGroupNode, ListGroupSchema, type ListParagraph, type Margins, MarginsSchema, type NumberingDefinition, NumberingDefinitionSchema, type NumberingDefinitions, type NumberingLevel, NumberingLevelSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, type PackageBlockLeaf, PackageBlockLeafSchema, type PackageChildren, type PackageGroup, PackageGroupSchema, type PackageLeaf, PackageLeafSchema, type PackageNode, PackageNodeSchema, PackageSchema, type PageSize, PageSizeSchema, type Part, PartSchema, type PptxDocument, PptxDocumentSchema, type ProvenanceChange, ProvenanceChangeSchema, type ProvenanceDescriptor, ProvenanceDescriptorSchema, type Relationship, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, type SectionChild, type SectionConstructGroupNode, SectionConstructGroupSchema, type SectionDescriptor, type SectionGroupNode, SectionGroupSchema, type SectionHeaderFooterReferences, SectionHeaderFooterReferencesSchema, type ShapeChild, type ShapeConstructGroupNode, ShapeConstructGroupSchema, type ShapeDescriptor, type ShapeGroupNode, ShapeGroupSchema, type SheetChild, type SheetDescriptor, type SheetGroupNode, SheetGroupSchema, type SlideDescriptor, type SlideGroupNode, SlideGroupSchema, type StyleEntry, StyleEntrySchema, type StyleParagraphProperties, StyleParagraphPropertiesSchema, type StyleRunProperties, StyleRunPropertiesSchema, type StylesTable, StylesTableSchema, type XlsxCell, XlsxCellSchema, type XlsxSheet, XlsxSheetSchema, type XlsxWorkbook, XlsxWorkbookSchema, type XmlCdata, XmlCdataSchema, type XmlComment, XmlCommentSchema, type XmlDeclaration, XmlDeclarationSchema, type XmlElement, XmlElementSchema, type XmlNode, XmlNodeSchema, type XmlPart, XmlPartSchema, type XmlPi, XmlPiSchema, type XmlText, XmlTextSchema, applyColorTransforms, applyParagraphStyleProperties, applyRunStyleProperties, assemblePackage, attr, base64ToBytes, buildDocxPackage, buildDocxPackageFromContent, buildXlsxPackage, buildXlsxPackageFromContent, buildXml, bytesToBase64, childrenWithTag, colorToRgbHex, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, decompose, el, elementsWithTag, encodeCompactPackage, encodePackage, encodeXmlText, factorStyles, findConstructMarkerImbalance, flattenPackage, fromCompact, isCompactXmlNode, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isPackageBlockLeaf, isPackageGroup, isPackageLeaf, isPackageNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isXmlNode, overlayStyleEntries, packageCodec, parsePackage, parseXml, readDocx, readDocxContent, readNumberingDefinitions, readPptx, readPptxContent, readXlsx, readXlsxContent, readXlsxWorkbook, resolveRelationships, resolveStyleChain, rgbHexToColor, rootElement, serializePackage, sniffImageFormat, textContent, toCompact, txt, unzipPackage, walk, xmlCodec, zipPackage };
package/dist/index.d.ts CHANGED
@@ -15,11 +15,11 @@ import { n as DocumentMetadataSchema, t as DocumentMetadata } from "./metadata-o
15
15
  import { n as sniffImageFormat, t as ImageFormat } from "./sniff-DjpnUZRp.js";
16
16
  import { i as buildDocxPackageFromContent, n as DocxContent, r as EmbeddedPresentationSerialiser, t as BuildDocxContentOptions } from "./write-inqdKHR3.js";
17
17
  import { a as readXlsx, i as readPptx, n as buildXlsxPackage, r as readDocx, t as buildDocxPackage } from "./document-package-BqYJqSDu.js";
18
- import { a as Footnote, d as readDocxContent, i as DocxDocumentSchema, n as CommentSchema, o as FootnoteSchema, r as DocxDocument, t as Comment } from "./read-D30xHgEp.js";
18
+ import { a as Footnote, c as HeaderFooterPartSchema, d as readDocxContent, i as DocxDocumentSchema, l as SectionHeaderFooterReferences, n as CommentSchema, o as FootnoteSchema, r as DocxDocument, s as HeaderFooterPart, t as Comment, u as SectionHeaderFooterReferencesSchema } from "./read-DA55zDgD.js";
19
19
  import { a as NumberingLevelSchema, i as NumberingLevel, n as NumberingDefinitionSchema, o as readNumberingDefinitions, r as NumberingDefinitions, t as NumberingDefinition } from "./numbering-D0YfuiOO.js";
20
20
  import { n as PptxDocumentSchema, r as readPptxContent, t as PptxDocument } from "./read-ZWJPDvG-.js";
21
21
  import { a as XlsxSheet, c as XlsxWorkbookSchema, i as XlsxCellSchema, l as readXlsxWorkbook, n as DefinedNameSchema, o as XlsxSheetSchema, r as XlsxCell, s as XlsxWorkbook, t as DefinedName } from "./xlsx-DacFqZeF.js";
22
22
  import { t as readXlsxContent } from "./content-MEmp_Rlx.js";
23
23
  import { t as buildXlsxPackageFromContent } from "./build-q0qMH_ML.js";
24
- import { $ as ContentShapeSchema, $n as isHeadingGroupNode, $t as PackageChildren, A as ContentConstructStart, An as SlideDescriptor, At as DrawPageChild, B as ContentImageBlock, Bn as StylesTableSchema, Bt as LinkDescriptorSchema, C as ContentBorderSchema, Cn as ShapeDescriptor, Ct as ContentTableRow, D as ContentCellValueSchema, Dn as SheetDescriptor, Dt as DivisionDescriptorSchema, E as ContentCellValue, En as SheetChild, Et as DivisionDescriptor, F as ContentControlLockSchema, Fn as StyleParagraphProperties, Ft as FieldDescriptorSchema, G as ContentPageBreakSchema, Gn as decompose, Gt as ListGroupSchema, H as ContentListMembership, Hn as applyRunStyleProperties, Ht as LinkTargetSchema, I as ContentControlType, In as StyleParagraphPropertiesSchema, It as HeadingGroupNode, J as ContentRun, Jn as flattenPackage, Jt as MarginsSchema, K as ContentParagraph, Kn as factorStyles, Kt as ListParagraph, L as ContentControlTypeSchema, Ln as StyleRunProperties, Lt as HeadingGroupSchema, M as ContentControlDescriptor, Mn as SlideGroupSchema, Mt as DrawPageGroupNode, N as ContentControlDescriptorSchema, Nn as StyleEntry, Nt as DrawPageGroupSchema, O as ContentConstructEnd, On as SheetGroupNode, Ot as DocumentPackage, P as ContentControlLock, Pn as StyleEntrySchema, Pt as FieldDescriptor, Q as ContentShape, Qn as isDrawPageGroupNode, Qt as PackageBlockLeafSchema, R as ContentDocument, Rn as StyleRunPropertiesSchema, Rt as HeadingParagraph, S as ContentBorder, Sn as ShapeConstructGroupSchema, St as ContentTableCellSchema, T as ContentCellBordersSchema, Tn as ShapeGroupSchema, Tt as ContentTableSchema, U as ContentListMembershipSchema, Un as assemblePackage, Ut as ListChild, V as ContentImageBlockSchema, Vn as applyParagraphStyleProperties, Vt as LinkTarget, W as ContentPageBreak, Wn as colorToRgbHex, Wt as ListGroupNode, X as ContentSection, Xn as isContentConstructEnd, Xt as PAGE_SIZE_LETTER, Y as ContentRunSchema, Yn as isContentBlock, Yt as PAGE_SIZE_A4, Z as ContentSectionSchema, Zn as isContentConstructStart, Zt as PackageBlockLeaf, _ as ConstructDescriptorSchema, _n as SectionDescriptor, _t as ContentSlideSchema, a as Alignment, an as PackageNodeSchema, ar as isSectionConstructGroupNode, at as ContentSheetImage, b as ContentBlock, bn as ShapeChild, bt as ContentTable, c as AnchorDescriptorSchema, cn as ProvenanceChange, cr as isShapeGroupNode, ct as ContentSheetPrintRangeSchema, d as Box, dn as ProvenanceDescriptorSchema, dr as overlayStyleEntries, dt as ContentSheetRepeatRange, en as PackageGroup, er as isListGroupNode, et as ContentSheet, f as BoxSchema, fn as SLIDE_SIZE_STANDARD, fr as resolveStyleChain, ft as ContentSheetRepeatRangeSchema, g as ConstructDescriptor, gn as SectionConstructGroupSchema, gt as ContentSlide, h as ColorSchema, hn as SectionConstructGroupNode, ht as ContentSheetSchema, i as xmlCodec, in as PackageNode, ir as isPackageNode, it as ContentSheetColumnSchema, j as ContentConstructStartSchema, jn as SlideGroupNode, jt as DrawPageDescriptor, k as ContentConstructEndSchema, kn as SheetGroupSchema, kt as DocumentPackageSchema, l as AnchorType, ln as ProvenanceChangeSchema, lr as isSheetGroupNode, lt as ContentSheetPrintSettings, m as Color, mn as SectionChild, mt as ContentSheetRowSchema, n as encodePackage, nn as PackageLeaf, nr as isPackageGroup, nt as ContentSheetCellSchema, o as AlignmentSchema, on as PageSize, or as isSectionGroupNode, ot as ContentSheetImageSchema, p as COLOR_BLACK, pn as SLIDE_SIZE_WIDESCREEN, pr as rgbHexToColor, pt as ContentSheetRow, q as ContentParagraphSchema, qn as findConstructMarkerImbalance, qt as Margins, r as packageCodec, rn as PackageLeafSchema, rr as isPackageLeaf, rt as ContentSheetColumn, s as AnchorDescriptor, sn as PageSizeSchema, sr as isShapeConstructGroupNode, st as ContentSheetPrintRange, t as decodePackage, tn as PackageGroupSchema, tr as isPackageBlockLeaf, tt as ContentSheetCell, u as AnchorTypeSchema, un as ProvenanceDescriptor, ur as isSlideGroupNode, ut as ContentSheetPrintSettingsSchema, v as ConstructMarkerImbalance, vn as SectionGroupNode, vt as ContentStrokeStyle, w as ContentCellBorders, wn as ShapeGroupNode, wt as ContentTableRowSchema, x as ContentBlockSchema, xn as ShapeConstructGroupNode, xt as ContentTableCell, y as ConstructMarkerImbalanceError, yn as SectionGroupSchema, yt as ContentStrokeStyleSchema, z as ContentDocumentSchema, zn as StylesTable, zt as LinkDescriptor } from "./codec-CR6QtZWA.js";
25
- export { type Alignment, AlignmentSchema, type AnchorDescriptor, AnchorDescriptorSchema, type AnchorType, AnchorTypeSchema, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, BoxSchema, type BuildDocxContentOptions, COLOR_BLACK, type Color, ColorSchema, type ColorTransform, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type ConstructDescriptor, ConstructDescriptorSchema, type ConstructMarkerImbalance, ConstructMarkerImbalanceError, type ContentBlock, ContentBlockSchema, type ContentBorder, ContentBorderSchema, type ContentCellBorders, ContentCellBordersSchema, type ContentCellValue, ContentCellValueSchema, type ContentConstructEnd, ContentConstructEndSchema, type ContentConstructStart, ContentConstructStartSchema, type ContentControlDescriptor, ContentControlDescriptorSchema, type ContentControlLock, ContentControlLockSchema, type ContentControlType, ContentControlTypeSchema, type ContentDocument, ContentDocumentSchema, type ContentImageBlock, ContentImageBlockSchema, type ContentListMembership, ContentListMembershipSchema, type ContentPageBreak, ContentPageBreakSchema, type ContentParagraph, ContentParagraphSchema, type ContentRun, ContentRunSchema, type ContentSection, ContentSectionSchema, type ContentShape, ContentShapeSchema, type ContentSheet, type ContentSheetCell, ContentSheetCellSchema, type ContentSheetColumn, ContentSheetColumnSchema, type ContentSheetImage, ContentSheetImageSchema, type ContentSheetPrintRange, ContentSheetPrintRangeSchema, type ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, type ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, type ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, type ContentSlide, ContentSlideSchema, type ContentStrokeStyle, ContentStrokeStyleSchema, type ContentTable, type ContentTableCell, ContentTableCellSchema, type ContentTableRow, ContentTableRowSchema, ContentTableSchema, type DefinedName, DefinedNameSchema, type DivisionDescriptor, DivisionDescriptorSchema, type DocumentMetadata, DocumentMetadataSchema, type DocumentPackage, DocumentPackageSchema, type DocxContent, type DocxDocument, DocxDocumentSchema, type DrawPageChild, type DrawPageDescriptor, type DrawPageGroupNode, DrawPageGroupSchema, type EmbeddedPresentationSerialiser, type FieldDescriptor, FieldDescriptorSchema, type Footnote, FootnoteSchema, type HeadingGroupNode, HeadingGroupSchema, type HeadingParagraph, type ImageFormat, type LinkDescriptor, LinkDescriptorSchema, type LinkTarget, LinkTargetSchema, type ListChild, type ListGroupNode, ListGroupSchema, type ListParagraph, type Margins, MarginsSchema, type NumberingDefinition, NumberingDefinitionSchema, type NumberingDefinitions, type NumberingLevel, NumberingLevelSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, type PackageBlockLeaf, PackageBlockLeafSchema, type PackageChildren, type PackageGroup, PackageGroupSchema, type PackageLeaf, PackageLeafSchema, type PackageNode, PackageNodeSchema, PackageSchema, type PageSize, PageSizeSchema, type Part, PartSchema, type PptxDocument, PptxDocumentSchema, type ProvenanceChange, ProvenanceChangeSchema, type ProvenanceDescriptor, ProvenanceDescriptorSchema, type Relationship, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, type SectionChild, type SectionConstructGroupNode, SectionConstructGroupSchema, type SectionDescriptor, type SectionGroupNode, SectionGroupSchema, type ShapeChild, type ShapeConstructGroupNode, ShapeConstructGroupSchema, type ShapeDescriptor, type ShapeGroupNode, ShapeGroupSchema, type SheetChild, type SheetDescriptor, type SheetGroupNode, SheetGroupSchema, type SlideDescriptor, type SlideGroupNode, SlideGroupSchema, type StyleEntry, StyleEntrySchema, type StyleParagraphProperties, StyleParagraphPropertiesSchema, type StyleRunProperties, StyleRunPropertiesSchema, type StylesTable, StylesTableSchema, type XlsxCell, XlsxCellSchema, type XlsxSheet, XlsxSheetSchema, type XlsxWorkbook, XlsxWorkbookSchema, type XmlCdata, XmlCdataSchema, type XmlComment, XmlCommentSchema, type XmlDeclaration, XmlDeclarationSchema, type XmlElement, XmlElementSchema, type XmlNode, XmlNodeSchema, type XmlPart, XmlPartSchema, type XmlPi, XmlPiSchema, type XmlText, XmlTextSchema, applyColorTransforms, applyParagraphStyleProperties, applyRunStyleProperties, assemblePackage, attr, base64ToBytes, buildDocxPackage, buildDocxPackageFromContent, buildXlsxPackage, buildXlsxPackageFromContent, buildXml, bytesToBase64, childrenWithTag, colorToRgbHex, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, decompose, el, elementsWithTag, encodeCompactPackage, encodePackage, encodeXmlText, factorStyles, findConstructMarkerImbalance, flattenPackage, fromCompact, isCompactXmlNode, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isPackageBlockLeaf, isPackageGroup, isPackageLeaf, isPackageNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isXmlNode, overlayStyleEntries, packageCodec, parsePackage, parseXml, readDocx, readDocxContent, readNumberingDefinitions, readPptx, readPptxContent, readXlsx, readXlsxContent, readXlsxWorkbook, resolveRelationships, resolveStyleChain, rgbHexToColor, rootElement, serializePackage, sniffImageFormat, textContent, toCompact, txt, unzipPackage, walk, xmlCodec, zipPackage };
24
+ import { $ as ContentShapeSchema, $n as isHeadingGroupNode, $t as PackageChildren, A as ContentConstructStart, An as SlideDescriptor, At as DrawPageChild, B as ContentImageBlock, Bn as StylesTableSchema, Bt as LinkDescriptorSchema, C as ContentBorderSchema, Cn as ShapeDescriptor, Ct as ContentTableRow, D as ContentCellValueSchema, Dn as SheetDescriptor, Dt as DivisionDescriptorSchema, E as ContentCellValue, En as SheetChild, Et as DivisionDescriptor, F as ContentControlLockSchema, Fn as StyleParagraphProperties, Ft as FieldDescriptorSchema, G as ContentPageBreakSchema, Gn as decompose, Gt as ListGroupSchema, H as ContentListMembership, Hn as applyRunStyleProperties, Ht as LinkTargetSchema, I as ContentControlType, In as StyleParagraphPropertiesSchema, It as HeadingGroupNode, J as ContentRun, Jn as flattenPackage, Jt as MarginsSchema, K as ContentParagraph, Kn as factorStyles, Kt as ListParagraph, L as ContentControlTypeSchema, Ln as StyleRunProperties, Lt as HeadingGroupSchema, M as ContentControlDescriptor, Mn as SlideGroupSchema, Mt as DrawPageGroupNode, N as ContentControlDescriptorSchema, Nn as StyleEntry, Nt as DrawPageGroupSchema, O as ContentConstructEnd, On as SheetGroupNode, Ot as DocumentPackage, P as ContentControlLock, Pn as StyleEntrySchema, Pt as FieldDescriptor, Q as ContentShape, Qn as isDrawPageGroupNode, Qt as PackageBlockLeafSchema, R as ContentDocument, Rn as StyleRunPropertiesSchema, Rt as HeadingParagraph, S as ContentBorder, Sn as ShapeConstructGroupSchema, St as ContentTableCellSchema, T as ContentCellBordersSchema, Tn as ShapeGroupSchema, Tt as ContentTableSchema, U as ContentListMembershipSchema, Un as assemblePackage, Ut as ListChild, V as ContentImageBlockSchema, Vn as applyParagraphStyleProperties, Vt as LinkTarget, W as ContentPageBreak, Wn as colorToRgbHex, Wt as ListGroupNode, X as ContentSection, Xn as isContentConstructEnd, Xt as PAGE_SIZE_LETTER, Y as ContentRunSchema, Yn as isContentBlock, Yt as PAGE_SIZE_A4, Z as ContentSectionSchema, Zn as isContentConstructStart, Zt as PackageBlockLeaf, _ as ConstructDescriptorSchema, _n as SectionDescriptor, _t as ContentSlideSchema, a as Alignment, an as PackageNodeSchema, ar as isSectionConstructGroupNode, at as ContentSheetImage, b as ContentBlock, bn as ShapeChild, bt as ContentTable, c as AnchorDescriptorSchema, cn as ProvenanceChange, cr as isShapeGroupNode, ct as ContentSheetPrintRangeSchema, d as Box, dn as ProvenanceDescriptorSchema, dr as overlayStyleEntries, dt as ContentSheetRepeatRange, en as PackageGroup, er as isListGroupNode, et as ContentSheet, f as BoxSchema, fn as SLIDE_SIZE_STANDARD, fr as resolveStyleChain, ft as ContentSheetRepeatRangeSchema, g as ConstructDescriptor, gn as SectionConstructGroupSchema, gt as ContentSlide, h as ColorSchema, hn as SectionConstructGroupNode, ht as ContentSheetSchema, i as xmlCodec, in as PackageNode, ir as isPackageNode, it as ContentSheetColumnSchema, j as ContentConstructStartSchema, jn as SlideGroupNode, jt as DrawPageDescriptor, k as ContentConstructEndSchema, kn as SheetGroupSchema, kt as DocumentPackageSchema, l as AnchorType, ln as ProvenanceChangeSchema, lr as isSheetGroupNode, lt as ContentSheetPrintSettings, m as Color, mn as SectionChild, mt as ContentSheetRowSchema, n as encodePackage, nn as PackageLeaf, nr as isPackageGroup, nt as ContentSheetCellSchema, o as AlignmentSchema, on as PageSize, or as isSectionGroupNode, ot as ContentSheetImageSchema, p as COLOR_BLACK, pn as SLIDE_SIZE_WIDESCREEN, pr as rgbHexToColor, pt as ContentSheetRow, q as ContentParagraphSchema, qn as findConstructMarkerImbalance, qt as Margins, r as packageCodec, rn as PackageLeafSchema, rr as isPackageLeaf, rt as ContentSheetColumn, s as AnchorDescriptor, sn as PageSizeSchema, sr as isShapeConstructGroupNode, st as ContentSheetPrintRange, t as decodePackage, tn as PackageGroupSchema, tr as isPackageBlockLeaf, tt as ContentSheetCell, u as AnchorTypeSchema, un as ProvenanceDescriptor, ur as isSlideGroupNode, ut as ContentSheetPrintSettingsSchema, v as ConstructMarkerImbalance, vn as SectionGroupNode, vt as ContentStrokeStyle, w as ContentCellBorders, wn as ShapeGroupNode, wt as ContentTableRowSchema, x as ContentBlockSchema, xn as ShapeConstructGroupNode, xt as ContentTableCell, y as ConstructMarkerImbalanceError, yn as SectionGroupSchema, yt as ContentStrokeStyleSchema, z as ContentDocumentSchema, zn as StylesTable, zt as LinkDescriptor } from "./codec-Daj8L7UQ.js";
25
+ export { type Alignment, AlignmentSchema, type AnchorDescriptor, AnchorDescriptorSchema, type AnchorType, AnchorTypeSchema, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, BoxSchema, type BuildDocxContentOptions, COLOR_BLACK, type Color, ColorSchema, type ColorTransform, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type ConstructDescriptor, ConstructDescriptorSchema, type ConstructMarkerImbalance, ConstructMarkerImbalanceError, type ContentBlock, ContentBlockSchema, type ContentBorder, ContentBorderSchema, type ContentCellBorders, ContentCellBordersSchema, type ContentCellValue, ContentCellValueSchema, type ContentConstructEnd, ContentConstructEndSchema, type ContentConstructStart, ContentConstructStartSchema, type ContentControlDescriptor, ContentControlDescriptorSchema, type ContentControlLock, ContentControlLockSchema, type ContentControlType, ContentControlTypeSchema, type ContentDocument, ContentDocumentSchema, type ContentImageBlock, ContentImageBlockSchema, type ContentListMembership, ContentListMembershipSchema, type ContentPageBreak, ContentPageBreakSchema, type ContentParagraph, ContentParagraphSchema, type ContentRun, ContentRunSchema, type ContentSection, ContentSectionSchema, type ContentShape, ContentShapeSchema, type ContentSheet, type ContentSheetCell, ContentSheetCellSchema, type ContentSheetColumn, ContentSheetColumnSchema, type ContentSheetImage, ContentSheetImageSchema, type ContentSheetPrintRange, ContentSheetPrintRangeSchema, type ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, type ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, type ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, type ContentSlide, ContentSlideSchema, type ContentStrokeStyle, ContentStrokeStyleSchema, type ContentTable, type ContentTableCell, ContentTableCellSchema, type ContentTableRow, ContentTableRowSchema, ContentTableSchema, type DefinedName, DefinedNameSchema, type DivisionDescriptor, DivisionDescriptorSchema, type DocumentMetadata, DocumentMetadataSchema, type DocumentPackage, DocumentPackageSchema, type DocxContent, type DocxDocument, DocxDocumentSchema, type DrawPageChild, type DrawPageDescriptor, type DrawPageGroupNode, DrawPageGroupSchema, type EmbeddedPresentationSerialiser, type FieldDescriptor, FieldDescriptorSchema, type Footnote, FootnoteSchema, type HeaderFooterPart, HeaderFooterPartSchema, type HeadingGroupNode, HeadingGroupSchema, type HeadingParagraph, type ImageFormat, type LinkDescriptor, LinkDescriptorSchema, type LinkTarget, LinkTargetSchema, type ListChild, type ListGroupNode, ListGroupSchema, type ListParagraph, type Margins, MarginsSchema, type NumberingDefinition, NumberingDefinitionSchema, type NumberingDefinitions, type NumberingLevel, NumberingLevelSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, type PackageBlockLeaf, PackageBlockLeafSchema, type PackageChildren, type PackageGroup, PackageGroupSchema, type PackageLeaf, PackageLeafSchema, type PackageNode, PackageNodeSchema, PackageSchema, type PageSize, PageSizeSchema, type Part, PartSchema, type PptxDocument, PptxDocumentSchema, type ProvenanceChange, ProvenanceChangeSchema, type ProvenanceDescriptor, ProvenanceDescriptorSchema, type Relationship, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, type SectionChild, type SectionConstructGroupNode, SectionConstructGroupSchema, type SectionDescriptor, type SectionGroupNode, SectionGroupSchema, type SectionHeaderFooterReferences, SectionHeaderFooterReferencesSchema, type ShapeChild, type ShapeConstructGroupNode, ShapeConstructGroupSchema, type ShapeDescriptor, type ShapeGroupNode, ShapeGroupSchema, type SheetChild, type SheetDescriptor, type SheetGroupNode, SheetGroupSchema, type SlideDescriptor, type SlideGroupNode, SlideGroupSchema, type StyleEntry, StyleEntrySchema, type StyleParagraphProperties, StyleParagraphPropertiesSchema, type StyleRunProperties, StyleRunPropertiesSchema, type StylesTable, StylesTableSchema, type XlsxCell, XlsxCellSchema, type XlsxSheet, XlsxSheetSchema, type XlsxWorkbook, XlsxWorkbookSchema, type XmlCdata, XmlCdataSchema, type XmlComment, XmlCommentSchema, type XmlDeclaration, XmlDeclarationSchema, type XmlElement, XmlElementSchema, type XmlNode, XmlNodeSchema, type XmlPart, XmlPartSchema, type XmlPi, XmlPiSchema, type XmlText, XmlTextSchema, applyColorTransforms, applyParagraphStyleProperties, applyRunStyleProperties, assemblePackage, attr, base64ToBytes, buildDocxPackage, buildDocxPackageFromContent, buildXlsxPackage, buildXlsxPackageFromContent, buildXml, bytesToBase64, childrenWithTag, colorToRgbHex, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, decompose, el, elementsWithTag, encodeCompactPackage, encodePackage, encodeXmlText, factorStyles, findConstructMarkerImbalance, flattenPackage, fromCompact, isCompactXmlNode, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isPackageBlockLeaf, isPackageGroup, isPackageLeaf, isPackageNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isXmlNode, overlayStyleEntries, packageCodec, parsePackage, parseXml, readDocx, readDocxContent, readNumberingDefinitions, readPptx, readPptxContent, readXlsx, readXlsxContent, readXlsxWorkbook, resolveRelationships, resolveStyleChain, rgbHexToColor, rootElement, serializePackage, sniffImageFormat, textContent, toCompact, txt, unzipPackage, walk, xmlCodec, zipPackage };
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ import { attr, childrenWithTag, decodeEntities, elementsWithTag, resolveRelation
14
14
  import { applyColorTransforms } from "./typed/shared/color.js";
15
15
  import { DocumentMetadataSchema } from "./typed/shared/metadata.js";
16
16
  import { sniffImageFormat } from "./image/sniff.js";
17
- import { l as PptxDocumentSchema, n as DocxDocumentSchema, o as readDocxContent, r as FootnoteSchema, t as CommentSchema, u as readPptxContent } from "./read-DGknK1YY.js";
17
+ import { a as SectionHeaderFooterReferencesSchema, i as HeaderFooterPartSchema, l as PptxDocumentSchema, n as DocxDocumentSchema, o as readDocxContent, r as FootnoteSchema, t as CommentSchema, u as readPptxContent } from "./read-DPR6ihXO.js";
18
18
  import { readXlsxContent } from "./typed/xlsx/content.js";
19
19
  import { NumberingDefinitionSchema, NumberingLevelSchema, readNumberingDefinitions } from "./typed/docx/numbering.js";
20
20
  import { buildXlsxPackageFromContent } from "./typed/xlsx/build.js";
@@ -22,4 +22,4 @@ import { buildDocxPackageFromContent } from "./typed/docx/write.js";
22
22
  import { buildDocxPackage, buildXlsxPackage, readDocx, readPptx, readXlsx } from "./typed/document-package.js";
23
23
  import { DefinedNameSchema, XlsxCellSchema, XlsxSheetSchema, XlsxWorkbookSchema, readXlsxWorkbook } from "./typed/xlsx.js";
24
24
  import { AlignmentSchema, AnchorDescriptorSchema, AnchorTypeSchema, BoxSchema, COLOR_BLACK, ColorSchema, ConstructDescriptorSchema, ConstructMarkerImbalanceError, ContentBlockSchema, ContentBorderSchema, ContentCellBordersSchema, ContentCellValueSchema, ContentConstructEndSchema, ContentConstructStartSchema, ContentControlDescriptorSchema, ContentControlLockSchema, ContentControlTypeSchema, ContentDocumentSchema, ContentImageBlockSchema, ContentListMembershipSchema, ContentPageBreakSchema, ContentParagraphSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetImageSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeStyleSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, DivisionDescriptorSchema, DocumentPackageSchema, DrawPageGroupSchema, FieldDescriptorSchema, HeadingGroupSchema, LinkDescriptorSchema, LinkTargetSchema, ListGroupSchema, MarginsSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PackageBlockLeafSchema, PackageGroupSchema, PackageLeafSchema, PackageNodeSchema, PageSizeSchema, ProvenanceChangeSchema, ProvenanceDescriptorSchema, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SectionConstructGroupSchema, SectionGroupSchema, ShapeConstructGroupSchema, ShapeGroupSchema, SheetGroupSchema, SlideGroupSchema, StyleEntrySchema, StyleParagraphPropertiesSchema, StyleRunPropertiesSchema, StylesTableSchema, applyParagraphStyleProperties, applyRunStyleProperties, assemblePackage, colorToRgbHex, decompose, factorStyles, findConstructMarkerImbalance, flattenPackage, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isPackageBlockLeaf, isPackageGroup, isPackageLeaf, isPackageNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, overlayStyleEntries, resolveStyleChain, rgbHexToColor } from "document-schema.js";
25
- export { AlignmentSchema, AnchorDescriptorSchema, AnchorTypeSchema, AttributeSchema, BinaryPartSchema, BoxSchema, COLOR_BLACK, ColorSchema, CommentSchema, CompactPackageSchema, CompactPartSchema, CompactXmlNodeSchema, ConstructDescriptorSchema, ConstructMarkerImbalanceError, ContentBlockSchema, ContentBorderSchema, ContentCellBordersSchema, ContentCellValueSchema, ContentConstructEndSchema, ContentConstructStartSchema, ContentControlDescriptorSchema, ContentControlLockSchema, ContentControlTypeSchema, ContentDocumentSchema, ContentImageBlockSchema, ContentListMembershipSchema, ContentPageBreakSchema, ContentParagraphSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetImageSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeStyleSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, DefinedNameSchema, DivisionDescriptorSchema, DocumentMetadataSchema, DocumentPackageSchema, DocxDocumentSchema, DrawPageGroupSchema, FieldDescriptorSchema, FootnoteSchema, HeadingGroupSchema, LinkDescriptorSchema, LinkTargetSchema, ListGroupSchema, MarginsSchema, NumberingDefinitionSchema, NumberingLevelSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PackageBlockLeafSchema, PackageGroupSchema, PackageLeafSchema, PackageNodeSchema, PackageSchema, PageSizeSchema, PartSchema, PptxDocumentSchema, ProvenanceChangeSchema, ProvenanceDescriptorSchema, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SectionConstructGroupSchema, SectionGroupSchema, ShapeConstructGroupSchema, ShapeGroupSchema, SheetGroupSchema, SlideGroupSchema, StyleEntrySchema, StyleParagraphPropertiesSchema, StyleRunPropertiesSchema, StylesTableSchema, XlsxCellSchema, XlsxSheetSchema, XlsxWorkbookSchema, XmlCdataSchema, XmlCommentSchema, XmlDeclarationSchema, XmlElementSchema, XmlNodeSchema, XmlPartSchema, XmlPiSchema, XmlTextSchema, applyColorTransforms, applyParagraphStyleProperties, applyRunStyleProperties, assemblePackage, attr, base64ToBytes, buildDocxPackage, buildDocxPackageFromContent, buildXlsxPackage, buildXlsxPackageFromContent, buildXml, bytesToBase64, childrenWithTag, colorToRgbHex, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, decompose, el, elementsWithTag, encodeCompactPackage, encodePackage, encodeXmlText, factorStyles, findConstructMarkerImbalance, flattenPackage, fromCompact, isCompactXmlNode, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isPackageBlockLeaf, isPackageGroup, isPackageLeaf, isPackageNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isXmlNode, overlayStyleEntries, packageCodec, parsePackage, parseXml, readDocx, readDocxContent, readNumberingDefinitions, readPptx, readPptxContent, readXlsx, readXlsxContent, readXlsxWorkbook, resolveRelationships, resolveStyleChain, rgbHexToColor, rootElement, serializePackage, sniffImageFormat, textContent, toCompact, txt, unzipPackage, walk, xmlCodec, zipPackage };
25
+ export { AlignmentSchema, AnchorDescriptorSchema, AnchorTypeSchema, AttributeSchema, BinaryPartSchema, BoxSchema, COLOR_BLACK, ColorSchema, CommentSchema, CompactPackageSchema, CompactPartSchema, CompactXmlNodeSchema, ConstructDescriptorSchema, ConstructMarkerImbalanceError, ContentBlockSchema, ContentBorderSchema, ContentCellBordersSchema, ContentCellValueSchema, ContentConstructEndSchema, ContentConstructStartSchema, ContentControlDescriptorSchema, ContentControlLockSchema, ContentControlTypeSchema, ContentDocumentSchema, ContentImageBlockSchema, ContentListMembershipSchema, ContentPageBreakSchema, ContentParagraphSchema, ContentRunSchema, ContentSectionSchema, ContentShapeSchema, ContentSheetCellSchema, ContentSheetColumnSchema, ContentSheetImageSchema, ContentSheetPrintRangeSchema, ContentSheetPrintSettingsSchema, ContentSheetRepeatRangeSchema, ContentSheetRowSchema, ContentSheetSchema, ContentSlideSchema, ContentStrokeStyleSchema, ContentTableCellSchema, ContentTableRowSchema, ContentTableSchema, DefinedNameSchema, DivisionDescriptorSchema, DocumentMetadataSchema, DocumentPackageSchema, DocxDocumentSchema, DrawPageGroupSchema, FieldDescriptorSchema, FootnoteSchema, HeaderFooterPartSchema, HeadingGroupSchema, LinkDescriptorSchema, LinkTargetSchema, ListGroupSchema, MarginsSchema, NumberingDefinitionSchema, NumberingLevelSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PackageBlockLeafSchema, PackageGroupSchema, PackageLeafSchema, PackageNodeSchema, PackageSchema, PageSizeSchema, PartSchema, PptxDocumentSchema, ProvenanceChangeSchema, ProvenanceDescriptorSchema, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SectionConstructGroupSchema, SectionGroupSchema, SectionHeaderFooterReferencesSchema, ShapeConstructGroupSchema, ShapeGroupSchema, SheetGroupSchema, SlideGroupSchema, StyleEntrySchema, StyleParagraphPropertiesSchema, StyleRunPropertiesSchema, StylesTableSchema, XlsxCellSchema, XlsxSheetSchema, XlsxWorkbookSchema, XmlCdataSchema, XmlCommentSchema, XmlDeclarationSchema, XmlElementSchema, XmlNodeSchema, XmlPartSchema, XmlPiSchema, XmlTextSchema, applyColorTransforms, applyParagraphStyleProperties, applyRunStyleProperties, assemblePackage, attr, base64ToBytes, buildDocxPackage, buildDocxPackageFromContent, buildXlsxPackage, buildXlsxPackageFromContent, buildXml, bytesToBase64, childrenWithTag, colorToRgbHex, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, decompose, el, elementsWithTag, encodeCompactPackage, encodePackage, encodeXmlText, factorStyles, findConstructMarkerImbalance, flattenPackage, fromCompact, isCompactXmlNode, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isPackageBlockLeaf, isPackageGroup, isPackageLeaf, isPackageNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isXmlNode, overlayStyleEntries, packageCodec, parsePackage, parseXml, readDocx, readDocxContent, readNumberingDefinitions, readPptx, readPptxContent, readXlsx, readXlsxContent, readXlsxWorkbook, resolveRelationships, resolveStyleChain, rgbHexToColor, rootElement, serializePackage, sniffImageFormat, textContent, toCompact, txt, unzipPackage, walk, xmlCodec, zipPackage };
@@ -97,8 +97,6 @@ declare const DocxDocumentSchema: z.ZodObject<{
97
97
  type: z.ZodOptional<z.ZodString>;
98
98
  text: z.ZodString;
99
99
  }, z.core.$strip>>;
100
- headers: z.ZodArray<z.ZodString>;
101
- footers: z.ZodArray<z.ZodString>;
102
100
  headerFooterParts: z.ZodArray<z.ZodObject<{
103
101
  path: z.ZodString;
104
102
  kind: z.ZodEnum<{
@@ -564,8 +564,6 @@ const DocxDocumentSchema = zod.z.object({
564
564
  comments: zod.z.array(CommentSchema),
565
565
  footnotes: zod.z.array(FootnoteSchema),
566
566
  endnotes: zod.z.array(FootnoteSchema),
567
- headers: zod.z.array(zod.z.string()),
568
- footers: zod.z.array(zod.z.string()),
569
567
  headerFooterParts: zod.z.array(HeaderFooterPartSchema),
570
568
  sectionHeaderFooters: zod.z.array(SectionHeaderFooterReferencesSchema),
571
569
  numbering: zod.z.record(zod.z.string(), require_typed_docx_numbering.NumberingDefinitionSchema)
@@ -1274,9 +1272,10 @@ function readSectionHeaderFooters(sectPr, ctx) {
1274
1272
  }
1275
1273
  return references;
1276
1274
  }
1277
- function readHeaderFooterParts(pkg, ctx, referencedPaths) {
1275
+ function readHeaderFooterParts(pkg, ctx) {
1278
1276
  const parts = [];
1279
- for (const path of [...referencedPaths].sort()) {
1277
+ const paths = Object.keys(pkg.parts).filter((path) => (path.startsWith("word/header") || path.startsWith("word/footer")) && path.endsWith(".xml")).sort();
1278
+ for (const path of paths) {
1280
1279
  const root = require_typed_util.rootElement(pkg.parts[path]);
1281
1280
  if (root === void 0) continue;
1282
1281
  const kind = root.tag === "w:ftr" ? "footer" : "header";
@@ -1367,16 +1366,6 @@ function readNotesPart(pkg, path, noteTag) {
1367
1366
  }
1368
1367
  return out;
1369
1368
  }
1370
- function readHeaderFooterText(pkg, prefix) {
1371
- const out = [];
1372
- for (const path of Object.keys(pkg.parts)) {
1373
- if (!path.startsWith(prefix) || !path.endsWith(".xml")) continue;
1374
- const part = pkg.parts[path];
1375
- if (part?.kind !== "xml") continue;
1376
- out.push(require_typed_util.elementsWithTag(part.nodes, "w:t").map(require_typed_util.textContent).join(""));
1377
- }
1378
- return out;
1379
- }
1380
1369
  function readDocxContent(pkg) {
1381
1370
  const documentRoot = require_typed_util.rootElement(pkg.parts[DOCUMENT_PART_PATH]);
1382
1371
  if (documentRoot === void 0) throw new Error(`readDocxContent: package has no ${DOCUMENT_PART_PATH} part`);
@@ -1392,17 +1381,13 @@ function readDocxContent(pkg) {
1392
1381
  pkg
1393
1382
  };
1394
1383
  const { sections, headerFooters } = readSections(body, ctx);
1395
- const referencedPaths = /* @__PURE__ */ new Set();
1396
- for (const references of headerFooters) for (const slot of [references.header, references.footer]) for (const path of Object.values(slot ?? {})) referencedPaths.add(path);
1397
1384
  return {
1398
1385
  metadata: require_typed_shared_metadata.readCoreProperties(pkg),
1399
1386
  sections,
1400
1387
  comments: readComments(pkg),
1401
1388
  footnotes: readNotesPart(pkg, "word/footnotes.xml", "w:footnote"),
1402
1389
  endnotes: readNotesPart(pkg, "word/endnotes.xml", "w:endnote"),
1403
- headers: readHeaderFooterText(pkg, "word/header"),
1404
- footers: readHeaderFooterText(pkg, "word/footer"),
1405
- headerFooterParts: readHeaderFooterParts(pkg, ctx, referencedPaths),
1390
+ headerFooterParts: readHeaderFooterParts(pkg, ctx),
1406
1391
  sectionHeaderFooters: headerFooters,
1407
1392
  numbering: require_typed_docx_numbering.readNumberingDefinitions(pkg)
1408
1393
  };
@@ -97,8 +97,6 @@ declare const DocxDocumentSchema: z.ZodObject<{
97
97
  type: z.ZodOptional<z.ZodString>;
98
98
  text: z.ZodString;
99
99
  }, z.core.$strip>>;
100
- headers: z.ZodArray<z.ZodString>;
101
- footers: z.ZodArray<z.ZodString>;
102
100
  headerFooterParts: z.ZodArray<z.ZodObject<{
103
101
  path: z.ZodString;
104
102
  kind: z.ZodEnum<{
@@ -564,8 +564,6 @@ const DocxDocumentSchema = z.object({
564
564
  comments: z.array(CommentSchema),
565
565
  footnotes: z.array(FootnoteSchema),
566
566
  endnotes: z.array(FootnoteSchema),
567
- headers: z.array(z.string()),
568
- footers: z.array(z.string()),
569
567
  headerFooterParts: z.array(HeaderFooterPartSchema),
570
568
  sectionHeaderFooters: z.array(SectionHeaderFooterReferencesSchema),
571
569
  numbering: z.record(z.string(), NumberingDefinitionSchema)
@@ -1274,9 +1272,10 @@ function readSectionHeaderFooters(sectPr, ctx) {
1274
1272
  }
1275
1273
  return references;
1276
1274
  }
1277
- function readHeaderFooterParts(pkg, ctx, referencedPaths) {
1275
+ function readHeaderFooterParts(pkg, ctx) {
1278
1276
  const parts = [];
1279
- for (const path of [...referencedPaths].sort()) {
1277
+ const paths = Object.keys(pkg.parts).filter((path) => (path.startsWith("word/header") || path.startsWith("word/footer")) && path.endsWith(".xml")).sort();
1278
+ for (const path of paths) {
1280
1279
  const root = rootElement(pkg.parts[path]);
1281
1280
  if (root === void 0) continue;
1282
1281
  const kind = root.tag === "w:ftr" ? "footer" : "header";
@@ -1367,16 +1366,6 @@ function readNotesPart(pkg, path, noteTag) {
1367
1366
  }
1368
1367
  return out;
1369
1368
  }
1370
- function readHeaderFooterText(pkg, prefix) {
1371
- const out = [];
1372
- for (const path of Object.keys(pkg.parts)) {
1373
- if (!path.startsWith(prefix) || !path.endsWith(".xml")) continue;
1374
- const part = pkg.parts[path];
1375
- if (part?.kind !== "xml") continue;
1376
- out.push(elementsWithTag(part.nodes, "w:t").map(textContent).join(""));
1377
- }
1378
- return out;
1379
- }
1380
1369
  function readDocxContent(pkg) {
1381
1370
  const documentRoot = rootElement(pkg.parts[DOCUMENT_PART_PATH]);
1382
1371
  if (documentRoot === void 0) throw new Error(`readDocxContent: package has no ${DOCUMENT_PART_PATH} part`);
@@ -1392,17 +1381,13 @@ function readDocxContent(pkg) {
1392
1381
  pkg
1393
1382
  };
1394
1383
  const { sections, headerFooters } = readSections(body, ctx);
1395
- const referencedPaths = /* @__PURE__ */ new Set();
1396
- for (const references of headerFooters) for (const slot of [references.header, references.footer]) for (const path of Object.values(slot ?? {})) referencedPaths.add(path);
1397
1384
  return {
1398
1385
  metadata: readCoreProperties(pkg),
1399
1386
  sections,
1400
1387
  comments: readComments(pkg),
1401
1388
  footnotes: readNotesPart(pkg, "word/footnotes.xml", "w:footnote"),
1402
1389
  endnotes: readNotesPart(pkg, "word/endnotes.xml", "w:endnote"),
1403
- headers: readHeaderFooterText(pkg, "word/header"),
1404
- footers: readHeaderFooterText(pkg, "word/footer"),
1405
- headerFooterParts: readHeaderFooterParts(pkg, ctx, referencedPaths),
1390
+ headerFooterParts: readHeaderFooterParts(pkg, ctx),
1406
1391
  sectionHeaderFooters: headerFooters,
1407
1392
  numbering: readNumberingDefinitions(pkg)
1408
1393
  };
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_read = require("../read-D-L3dItC.cjs");
2
+ const require_read = require("../read-Cj23Gllx.cjs");
3
3
  const require_typed_xlsx_content = require("./xlsx/content.cjs");
4
4
  const require_typed_xlsx_build = require("./xlsx/build.cjs");
5
5
  const require_typed_docx_write = require("./docx/write.cjs");
@@ -1,4 +1,4 @@
1
- import { o as readDocxContent, u as readPptxContent } from "../read-DGknK1YY.js";
1
+ import { o as readDocxContent, u as readPptxContent } from "../read-DPR6ihXO.js";
2
2
  import { readXlsxContent } from "./xlsx/content.js";
3
3
  import { buildXlsxPackageFromContent } from "./xlsx/build.js";
4
4
  import { buildDocxPackageFromContent } from "./docx/write.js";
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_read = require("../../read-D-L3dItC.cjs");
2
+ const require_read = require("../../read-Cj23Gllx.cjs");
3
3
  exports.CommentSchema = require_read.CommentSchema;
4
4
  exports.DocxDocumentSchema = require_read.DocxDocumentSchema;
5
5
  exports.FootnoteSchema = require_read.FootnoteSchema;
@@ -1,2 +1,2 @@
1
- import { a as Footnote, c as HeaderFooterPartSchema, d as readDocxContent, i as DocxDocumentSchema, l as SectionHeaderFooterReferences, n as CommentSchema, o as FootnoteSchema, r as DocxDocument, s as HeaderFooterPart, t as Comment, u as SectionHeaderFooterReferencesSchema } from "../../read-LTgVJIPU.cjs";
1
+ import { a as Footnote, c as HeaderFooterPartSchema, d as readDocxContent, i as DocxDocumentSchema, l as SectionHeaderFooterReferences, n as CommentSchema, o as FootnoteSchema, r as DocxDocument, s as HeaderFooterPart, t as Comment, u as SectionHeaderFooterReferencesSchema } from "../../read-A9CC5Toq.cjs";
2
2
  export { Comment, CommentSchema, DocxDocument, DocxDocumentSchema, Footnote, FootnoteSchema, HeaderFooterPart, HeaderFooterPartSchema, SectionHeaderFooterReferences, SectionHeaderFooterReferencesSchema, readDocxContent };
@@ -1,2 +1,2 @@
1
- import { a as Footnote, c as HeaderFooterPartSchema, d as readDocxContent, i as DocxDocumentSchema, l as SectionHeaderFooterReferences, n as CommentSchema, o as FootnoteSchema, r as DocxDocument, s as HeaderFooterPart, t as Comment, u as SectionHeaderFooterReferencesSchema } from "../../read-D30xHgEp.js";
1
+ import { a as Footnote, c as HeaderFooterPartSchema, d as readDocxContent, i as DocxDocumentSchema, l as SectionHeaderFooterReferences, n as CommentSchema, o as FootnoteSchema, r as DocxDocument, s as HeaderFooterPart, t as Comment, u as SectionHeaderFooterReferencesSchema } from "../../read-DA55zDgD.js";
2
2
  export { Comment, CommentSchema, DocxDocument, DocxDocumentSchema, Footnote, FootnoteSchema, HeaderFooterPart, HeaderFooterPartSchema, SectionHeaderFooterReferences, SectionHeaderFooterReferencesSchema, readDocxContent };
@@ -1,2 +1,2 @@
1
- import { a as SectionHeaderFooterReferencesSchema, i as HeaderFooterPartSchema, n as DocxDocumentSchema, o as readDocxContent, r as FootnoteSchema, t as CommentSchema } from "../../read-DGknK1YY.js";
1
+ import { a as SectionHeaderFooterReferencesSchema, i as HeaderFooterPartSchema, n as DocxDocumentSchema, o as readDocxContent, r as FootnoteSchema, t as CommentSchema } from "../../read-DPR6ihXO.js";
2
2
  export { CommentSchema, DocxDocumentSchema, FootnoteSchema, HeaderFooterPartSchema, SectionHeaderFooterReferencesSchema, readDocxContent };
@@ -1,4 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_read = require("../read-D-L3dItC.cjs");
2
+ const require_read = require("../read-Cj23Gllx.cjs");
3
3
  exports.readEmbeddedOoxmlPayload = require_read.readEmbeddedOoxmlPayload;
4
4
  exports.readEmbeddedPayloadPart = require_read.readEmbeddedPayloadPart;
@@ -1,2 +1,2 @@
1
- import { c as readEmbeddedPayloadPart, s as readEmbeddedOoxmlPayload } from "../read-DGknK1YY.js";
1
+ import { c as readEmbeddedPayloadPart, s as readEmbeddedOoxmlPayload } from "../read-DPR6ihXO.js";
2
2
  export { readEmbeddedOoxmlPayload, readEmbeddedPayloadPart };
@@ -1,4 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_read = require("../../read-D-L3dItC.cjs");
2
+ const require_read = require("../../read-Cj23Gllx.cjs");
3
3
  exports.PptxDocumentSchema = require_read.PptxDocumentSchema;
4
4
  exports.readPptxContent = require_read.readPptxContent;
@@ -1,2 +1,2 @@
1
- import { l as PptxDocumentSchema, u as readPptxContent } from "../../read-DGknK1YY.js";
1
+ import { l as PptxDocumentSchema, u as readPptxContent } from "../../read-DPR6ihXO.js";
2
2
  export { PptxDocumentSchema, readPptxContent };
@@ -55,6 +55,34 @@ var SheetGridGeometry = class {
55
55
  for (let index = 0; index < row; index++) yPt += this.rowHeightPt(index);
56
56
  return yPt;
57
57
  }
58
+ locateColumn(xPt) {
59
+ let index = 0;
60
+ let boundaryPt = 0;
61
+ let widthPt = this.columnWidthPt(index);
62
+ while (boundaryPt + widthPt <= xPt) {
63
+ boundaryPt += widthPt;
64
+ index += 1;
65
+ widthPt = this.columnWidthPt(index);
66
+ }
67
+ return {
68
+ index,
69
+ offsetPt: xPt - boundaryPt
70
+ };
71
+ }
72
+ locateRow(yPt) {
73
+ let index = 0;
74
+ let boundaryPt = 0;
75
+ let heightPt = this.rowHeightPt(index);
76
+ while (boundaryPt + heightPt <= yPt) {
77
+ boundaryPt += heightPt;
78
+ index += 1;
79
+ heightPt = this.rowHeightPt(index);
80
+ }
81
+ return {
82
+ index,
83
+ offsetPt: yPt - boundaryPt
84
+ };
85
+ }
58
86
  };
59
87
  function readAnchorChild(marker, tag) {
60
88
  const child = require_typed_util.childrenWithTag(marker, tag)[0];
@@ -62,6 +90,11 @@ function readAnchorChild(marker, tag) {
62
90
  const parsed = text === void 0 || text === "" ? NaN : Number(text);
63
91
  return Number.isFinite(parsed) ? parsed : 0;
64
92
  }
93
+ function numericAttr(element, name) {
94
+ const raw = require_typed_util.attr(element, name);
95
+ const parsed = raw === void 0 ? NaN : Number(raw);
96
+ return Number.isFinite(parsed) ? parsed : 0;
97
+ }
65
98
  function readAnchorMarker(parent, tag) {
66
99
  const marker = require_typed_util.childrenWithTag(parent, tag)[0];
67
100
  if (marker === void 0) return;
@@ -72,6 +105,65 @@ function readAnchorMarker(parent, tag) {
72
105
  rowOffEmu: readAnchorChild(marker, "xdr:rowOff")
73
106
  };
74
107
  }
108
+ function readAnchorExtEmu(anchor) {
109
+ const ext = require_typed_util.childrenWithTag(anchor, "xdr:ext")[0];
110
+ if (ext === void 0) return;
111
+ return {
112
+ cxEmu: numericAttr(ext, "cx"),
113
+ cyEmu: numericAttr(ext, "cy")
114
+ };
115
+ }
116
+ function readAnchorPlacement(anchor, geometry) {
117
+ if (anchor.tag === "xdr:twoCellAnchor") {
118
+ const from = readAnchorMarker(anchor, "xdr:from");
119
+ const to = readAnchorMarker(anchor, "xdr:to");
120
+ if (from === void 0 || to === void 0) return;
121
+ const xPt = geometry.xPt(from.column, from.colOffEmu);
122
+ const yPt = geometry.yPt(from.row, from.rowOffEmu);
123
+ return {
124
+ xPt,
125
+ yPt,
126
+ widthPt: geometry.xPt(to.column, to.colOffEmu) - xPt,
127
+ heightPt: geometry.yPt(to.row, to.rowOffEmu) - yPt,
128
+ anchorRow: from.row,
129
+ anchorColumn: from.column,
130
+ offsetXPt: require_typed_shared_units.emuToPt(from.colOffEmu),
131
+ offsetYPt: require_typed_shared_units.emuToPt(from.rowOffEmu)
132
+ };
133
+ }
134
+ if (anchor.tag === "xdr:oneCellAnchor") {
135
+ const from = readAnchorMarker(anchor, "xdr:from");
136
+ const ext = readAnchorExtEmu(anchor);
137
+ if (from === void 0 || ext === void 0) return;
138
+ return {
139
+ xPt: geometry.xPt(from.column, from.colOffEmu),
140
+ yPt: geometry.yPt(from.row, from.rowOffEmu),
141
+ widthPt: require_typed_shared_units.emuToPt(ext.cxEmu),
142
+ heightPt: require_typed_shared_units.emuToPt(ext.cyEmu),
143
+ anchorRow: from.row,
144
+ anchorColumn: from.column,
145
+ offsetXPt: require_typed_shared_units.emuToPt(from.colOffEmu),
146
+ offsetYPt: require_typed_shared_units.emuToPt(from.rowOffEmu)
147
+ };
148
+ }
149
+ const pos = require_typed_util.childrenWithTag(anchor, "xdr:pos")[0];
150
+ const ext = readAnchorExtEmu(anchor);
151
+ if (pos === void 0 || ext === void 0) return;
152
+ const xPt = require_typed_shared_units.emuToPt(numericAttr(pos, "x"));
153
+ const yPt = require_typed_shared_units.emuToPt(numericAttr(pos, "y"));
154
+ const column = geometry.locateColumn(xPt);
155
+ const row = geometry.locateRow(yPt);
156
+ return {
157
+ xPt,
158
+ yPt,
159
+ widthPt: require_typed_shared_units.emuToPt(ext.cxEmu),
160
+ heightPt: require_typed_shared_units.emuToPt(ext.cyEmu),
161
+ anchorRow: row.index,
162
+ anchorColumn: column.index,
163
+ offsetXPt: column.offsetPt,
164
+ offsetYPt: row.offsetPt
165
+ };
166
+ }
75
167
  function emptyWorksheet() {
76
168
  return {
77
169
  type: "element",
@@ -100,6 +192,11 @@ function chartCells(chartRoot, frame) {
100
192
  });
101
193
  return cells;
102
194
  }
195
+ const ANCHOR_TAGS = [
196
+ "xdr:twoCellAnchor",
197
+ "xdr:oneCellAnchor",
198
+ "xdr:absoluteAnchor"
199
+ ];
103
200
  function readSheetDrawing(pkg, worksheetPath, worksheet) {
104
201
  let drawingPath;
105
202
  for (const rel of require_typed_util.resolveRelationships(pkg, worksheetPath).values()) if (rel.type.endsWith(DRAWING_REL_SUFFIX)) {
@@ -119,45 +216,43 @@ function readSheetDrawing(pkg, worksheetPath, worksheet) {
119
216
  const geometry = new SheetGridGeometry(worksheet);
120
217
  const objects = [];
121
218
  const images = [];
122
- for (const anchor of require_typed_util.childrenWithTag(drawingRoot, "xdr:twoCellAnchor")) {
123
- const from = readAnchorMarker(anchor, "xdr:from");
124
- const to = readAnchorMarker(anchor, "xdr:to");
125
- if (from === void 0 || to === void 0) continue;
126
- const xPt = geometry.xPt(from.column, from.colOffEmu);
127
- const yPt = geometry.yPt(from.row, from.rowOffEmu);
219
+ for (const node of drawingRoot.children) {
220
+ if (node.type !== "element" || !ANCHOR_TAGS.includes(node.tag)) continue;
221
+ const placement = readAnchorPlacement(node, geometry);
222
+ if (placement === void 0) continue;
128
223
  const frameBox = {
129
- xPt,
130
- yPt,
131
- widthPt: geometry.xPt(to.column, to.colOffEmu) - xPt,
132
- heightPt: geometry.yPt(to.row, to.rowOffEmu) - yPt
224
+ xPt: placement.xPt,
225
+ yPt: placement.yPt,
226
+ widthPt: placement.widthPt,
227
+ heightPt: placement.heightPt
133
228
  };
134
- for (const frame of require_typed_util.elementsWithTag([anchor], "xdr:graphicFrame")) {
229
+ for (const frame of require_typed_util.elementsWithTag([node], "xdr:graphicFrame")) {
135
230
  const chart = readChartFrame(pkg, frame, drawingRels);
136
231
  if (chart === void 0) continue;
137
232
  objects.push({
138
233
  objectKind: "chart",
139
234
  document: chartDocument(pkg, chart.root, frameBox, chart.name),
140
235
  frame: frameBox,
141
- anchorRow: from.row,
142
- anchorColumn: from.column,
143
- offsetXPt: require_typed_shared_units.emuToPt(from.colOffEmu),
144
- offsetYPt: require_typed_shared_units.emuToPt(from.rowOffEmu)
236
+ anchorRow: placement.anchorRow,
237
+ anchorColumn: placement.anchorColumn,
238
+ offsetXPt: placement.offsetXPt,
239
+ offsetYPt: placement.offsetYPt
145
240
  });
146
241
  }
147
- for (const pic of require_typed_util.elementsWithTag([anchor], "xdr:pic")) {
242
+ for (const pic of require_typed_util.elementsWithTag([node], "xdr:pic")) {
148
243
  const media = readPictureMedia(pkg, pic, drawingRels);
149
244
  if (media === void 0) continue;
150
- if (frameBox.widthPt <= 0 || frameBox.heightPt <= 0) continue;
245
+ if (placement.widthPt <= 0 || placement.heightPt <= 0) continue;
151
246
  images.push({
152
247
  kind: "image",
153
248
  format: media.format,
154
249
  base64: media.base64,
155
- widthPt: frameBox.widthPt,
156
- heightPt: frameBox.heightPt,
157
- anchorRow: from.row,
158
- anchorColumn: from.column,
159
- offsetXPt: require_typed_shared_units.emuToPt(from.colOffEmu),
160
- offsetYPt: require_typed_shared_units.emuToPt(from.rowOffEmu)
250
+ widthPt: placement.widthPt,
251
+ heightPt: placement.heightPt,
252
+ anchorRow: placement.anchorRow,
253
+ anchorColumn: placement.anchorColumn,
254
+ offsetXPt: placement.offsetXPt,
255
+ offsetYPt: placement.offsetYPt
161
256
  });
162
257
  }
163
258
  }
@@ -54,6 +54,34 @@ var SheetGridGeometry = class {
54
54
  for (let index = 0; index < row; index++) yPt += this.rowHeightPt(index);
55
55
  return yPt;
56
56
  }
57
+ locateColumn(xPt) {
58
+ let index = 0;
59
+ let boundaryPt = 0;
60
+ let widthPt = this.columnWidthPt(index);
61
+ while (boundaryPt + widthPt <= xPt) {
62
+ boundaryPt += widthPt;
63
+ index += 1;
64
+ widthPt = this.columnWidthPt(index);
65
+ }
66
+ return {
67
+ index,
68
+ offsetPt: xPt - boundaryPt
69
+ };
70
+ }
71
+ locateRow(yPt) {
72
+ let index = 0;
73
+ let boundaryPt = 0;
74
+ let heightPt = this.rowHeightPt(index);
75
+ while (boundaryPt + heightPt <= yPt) {
76
+ boundaryPt += heightPt;
77
+ index += 1;
78
+ heightPt = this.rowHeightPt(index);
79
+ }
80
+ return {
81
+ index,
82
+ offsetPt: yPt - boundaryPt
83
+ };
84
+ }
57
85
  };
58
86
  function readAnchorChild(marker, tag) {
59
87
  const child = childrenWithTag(marker, tag)[0];
@@ -61,6 +89,11 @@ function readAnchorChild(marker, tag) {
61
89
  const parsed = text === void 0 || text === "" ? NaN : Number(text);
62
90
  return Number.isFinite(parsed) ? parsed : 0;
63
91
  }
92
+ function numericAttr(element, name) {
93
+ const raw = attr(element, name);
94
+ const parsed = raw === void 0 ? NaN : Number(raw);
95
+ return Number.isFinite(parsed) ? parsed : 0;
96
+ }
64
97
  function readAnchorMarker(parent, tag) {
65
98
  const marker = childrenWithTag(parent, tag)[0];
66
99
  if (marker === void 0) return;
@@ -71,6 +104,65 @@ function readAnchorMarker(parent, tag) {
71
104
  rowOffEmu: readAnchorChild(marker, "xdr:rowOff")
72
105
  };
73
106
  }
107
+ function readAnchorExtEmu(anchor) {
108
+ const ext = childrenWithTag(anchor, "xdr:ext")[0];
109
+ if (ext === void 0) return;
110
+ return {
111
+ cxEmu: numericAttr(ext, "cx"),
112
+ cyEmu: numericAttr(ext, "cy")
113
+ };
114
+ }
115
+ function readAnchorPlacement(anchor, geometry) {
116
+ if (anchor.tag === "xdr:twoCellAnchor") {
117
+ const from = readAnchorMarker(anchor, "xdr:from");
118
+ const to = readAnchorMarker(anchor, "xdr:to");
119
+ if (from === void 0 || to === void 0) return;
120
+ const xPt = geometry.xPt(from.column, from.colOffEmu);
121
+ const yPt = geometry.yPt(from.row, from.rowOffEmu);
122
+ return {
123
+ xPt,
124
+ yPt,
125
+ widthPt: geometry.xPt(to.column, to.colOffEmu) - xPt,
126
+ heightPt: geometry.yPt(to.row, to.rowOffEmu) - yPt,
127
+ anchorRow: from.row,
128
+ anchorColumn: from.column,
129
+ offsetXPt: emuToPt(from.colOffEmu),
130
+ offsetYPt: emuToPt(from.rowOffEmu)
131
+ };
132
+ }
133
+ if (anchor.tag === "xdr:oneCellAnchor") {
134
+ const from = readAnchorMarker(anchor, "xdr:from");
135
+ const ext = readAnchorExtEmu(anchor);
136
+ if (from === void 0 || ext === void 0) return;
137
+ return {
138
+ xPt: geometry.xPt(from.column, from.colOffEmu),
139
+ yPt: geometry.yPt(from.row, from.rowOffEmu),
140
+ widthPt: emuToPt(ext.cxEmu),
141
+ heightPt: emuToPt(ext.cyEmu),
142
+ anchorRow: from.row,
143
+ anchorColumn: from.column,
144
+ offsetXPt: emuToPt(from.colOffEmu),
145
+ offsetYPt: emuToPt(from.rowOffEmu)
146
+ };
147
+ }
148
+ const pos = childrenWithTag(anchor, "xdr:pos")[0];
149
+ const ext = readAnchorExtEmu(anchor);
150
+ if (pos === void 0 || ext === void 0) return;
151
+ const xPt = emuToPt(numericAttr(pos, "x"));
152
+ const yPt = emuToPt(numericAttr(pos, "y"));
153
+ const column = geometry.locateColumn(xPt);
154
+ const row = geometry.locateRow(yPt);
155
+ return {
156
+ xPt,
157
+ yPt,
158
+ widthPt: emuToPt(ext.cxEmu),
159
+ heightPt: emuToPt(ext.cyEmu),
160
+ anchorRow: row.index,
161
+ anchorColumn: column.index,
162
+ offsetXPt: column.offsetPt,
163
+ offsetYPt: row.offsetPt
164
+ };
165
+ }
74
166
  function emptyWorksheet() {
75
167
  return {
76
168
  type: "element",
@@ -99,6 +191,11 @@ function chartCells(chartRoot, frame) {
99
191
  });
100
192
  return cells;
101
193
  }
194
+ const ANCHOR_TAGS = [
195
+ "xdr:twoCellAnchor",
196
+ "xdr:oneCellAnchor",
197
+ "xdr:absoluteAnchor"
198
+ ];
102
199
  function readSheetDrawing(pkg, worksheetPath, worksheet) {
103
200
  let drawingPath;
104
201
  for (const rel of resolveRelationships(pkg, worksheetPath).values()) if (rel.type.endsWith(DRAWING_REL_SUFFIX)) {
@@ -118,45 +215,43 @@ function readSheetDrawing(pkg, worksheetPath, worksheet) {
118
215
  const geometry = new SheetGridGeometry(worksheet);
119
216
  const objects = [];
120
217
  const images = [];
121
- for (const anchor of childrenWithTag(drawingRoot, "xdr:twoCellAnchor")) {
122
- const from = readAnchorMarker(anchor, "xdr:from");
123
- const to = readAnchorMarker(anchor, "xdr:to");
124
- if (from === void 0 || to === void 0) continue;
125
- const xPt = geometry.xPt(from.column, from.colOffEmu);
126
- const yPt = geometry.yPt(from.row, from.rowOffEmu);
218
+ for (const node of drawingRoot.children) {
219
+ if (node.type !== "element" || !ANCHOR_TAGS.includes(node.tag)) continue;
220
+ const placement = readAnchorPlacement(node, geometry);
221
+ if (placement === void 0) continue;
127
222
  const frameBox = {
128
- xPt,
129
- yPt,
130
- widthPt: geometry.xPt(to.column, to.colOffEmu) - xPt,
131
- heightPt: geometry.yPt(to.row, to.rowOffEmu) - yPt
223
+ xPt: placement.xPt,
224
+ yPt: placement.yPt,
225
+ widthPt: placement.widthPt,
226
+ heightPt: placement.heightPt
132
227
  };
133
- for (const frame of elementsWithTag([anchor], "xdr:graphicFrame")) {
228
+ for (const frame of elementsWithTag([node], "xdr:graphicFrame")) {
134
229
  const chart = readChartFrame(pkg, frame, drawingRels);
135
230
  if (chart === void 0) continue;
136
231
  objects.push({
137
232
  objectKind: "chart",
138
233
  document: chartDocument(pkg, chart.root, frameBox, chart.name),
139
234
  frame: frameBox,
140
- anchorRow: from.row,
141
- anchorColumn: from.column,
142
- offsetXPt: emuToPt(from.colOffEmu),
143
- offsetYPt: emuToPt(from.rowOffEmu)
235
+ anchorRow: placement.anchorRow,
236
+ anchorColumn: placement.anchorColumn,
237
+ offsetXPt: placement.offsetXPt,
238
+ offsetYPt: placement.offsetYPt
144
239
  });
145
240
  }
146
- for (const pic of elementsWithTag([anchor], "xdr:pic")) {
241
+ for (const pic of elementsWithTag([node], "xdr:pic")) {
147
242
  const media = readPictureMedia(pkg, pic, drawingRels);
148
243
  if (media === void 0) continue;
149
- if (frameBox.widthPt <= 0 || frameBox.heightPt <= 0) continue;
244
+ if (placement.widthPt <= 0 || placement.heightPt <= 0) continue;
150
245
  images.push({
151
246
  kind: "image",
152
247
  format: media.format,
153
248
  base64: media.base64,
154
- widthPt: frameBox.widthPt,
155
- heightPt: frameBox.heightPt,
156
- anchorRow: from.row,
157
- anchorColumn: from.column,
158
- offsetXPt: emuToPt(from.colOffEmu),
159
- offsetYPt: emuToPt(from.rowOffEmu)
249
+ widthPt: placement.widthPt,
250
+ heightPt: placement.heightPt,
251
+ anchorRow: placement.anchorRow,
252
+ anchorColumn: placement.anchorColumn,
253
+ offsetXPt: placement.offsetXPt,
254
+ offsetYPt: placement.offsetYPt
160
255
  });
161
256
  }
162
257
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ooxml.js",
3
- "version": "4.6.0",
3
+ "version": "5.0.0",
4
4
  "description": "Type-safe, lossless round-trip conversion between OOXML packages (docx, pptx, xlsx) and JSON, built on Zod 4 codecs.",
5
5
  "type": "module",
6
6
  "repository": {