ooxml.js 4.4.3 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -299,7 +299,7 @@ The package layers a lossless core outward to lossy convenience views:
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
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>` 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 has no serialiser here — pptx is read-only in this package — so 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) a one-way row, 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) — 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.
@@ -18,7 +18,7 @@ import "./xlsx-DacFqZeF.js";
18
18
  import "./content-MEmp_Rlx.js";
19
19
  import "./build-q0qMH_ML.js";
20
20
  import { z } from "zod";
21
- import { Alignment as Alignment$1, AlignmentSchema, AnchorDescriptor as AnchorDescriptor$1, AnchorDescriptorSchema, AnchorType, AnchorTypeSchema, Box as Box$1, BoxSchema, COLOR_BLACK as COLOR_BLACK$1, Color as Color$1, ColorSchema, ConstructDescriptor as ConstructDescriptor$1, ConstructDescriptorSchema, ConstructMarkerImbalance, ConstructMarkerImbalanceError, ContentBlock as ContentBlock$1, ContentBlockSchema as ContentBlockSchema$1, ContentBorder, ContentBorderSchema, ContentCellBorders as ContentCellBorders$1, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentConstructEnd, ContentConstructEndSchema, ContentConstructStart, ContentConstructStartSchema, ContentControlDescriptor as ContentControlDescriptor$1, ContentControlDescriptorSchema, ContentControlLock, ContentControlLockSchema, ContentControlType, ContentControlTypeSchema, ContentDocument as ContentDocument$1, ContentDocumentSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph as ContentParagraph$1, ContentParagraphSchema, ContentRun, ContentRunSchema, ContentSection as ContentSection$1, ContentSectionSchema as ContentSectionSchema$1, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange as ContentSheetPrintRange$1, ContentSheetPrintRangeSchema, ContentSheetPrintSettings as ContentSheetPrintSettings$1, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange as ContentSheetRepeatRange$1, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema as ContentSlideSchema$1, ContentStrokeStyle, ContentStrokeStyleSchema, ContentTable as ContentTable$1, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, DivisionDescriptor, DivisionDescriptorSchema, DocumentPackage as DocumentPackage$1, DocumentPackageSchema, DrawPageChild, DrawPageDescriptor, DrawPageGroupNode, DrawPageGroupSchema, FieldDescriptor, FieldDescriptorSchema, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, LinkDescriptor, LinkDescriptorSchema, LinkTarget, LinkTargetSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, Margins, MarginsSchema, PAGE_SIZE_A4 as PAGE_SIZE_A4$1, PAGE_SIZE_LETTER as PAGE_SIZE_LETTER$1, PackageBlockLeaf, PackageBlockLeafSchema, PackageChildren, PackageGroup, PackageGroupSchema, PackageLeaf, PackageLeafSchema, PackageNode, PackageNodeSchema, PageSize as PageSize$1, PageSizeSchema, ProvenanceChange as ProvenanceChange$1, ProvenanceChangeSchema, ProvenanceDescriptor as ProvenanceDescriptor$1, ProvenanceDescriptorSchema, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN as SLIDE_SIZE_WIDESCREEN$1, SectionChild, SectionConstructGroupNode, SectionConstructGroupSchema, SectionDescriptor, SectionGroupNode, SectionGroupSchema, ShapeChild, ShapeConstructGroupNode, ShapeConstructGroupSchema, ShapeDescriptor, ShapeGroupNode, ShapeGroupSchema, SheetChild, SheetDescriptor, SheetGroupNode, SheetGroupSchema, SlideDescriptor, SlideGroupNode, SlideGroupSchema, StyleEntry, StyleEntrySchema, StyleParagraphProperties, StyleParagraphPropertiesSchema, StyleRunProperties, StyleRunPropertiesSchema, StylesTable, StylesTableSchema, applyParagraphStyleProperties, applyRunStyleProperties, assemblePackage as assemblePackage$1, colorToRgbHex as colorToRgbHex$1, decompose, factorStyles, findConstructMarkerImbalance as findConstructMarkerImbalance$1, flattenPackage as flattenPackage$1, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isPackageBlockLeaf, isPackageGroup, isPackageLeaf, isPackageNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, overlayStyleEntries, resolveStyleChain, rgbHexToColor as rgbHexToColor$1 } from "document-schema.js";
21
+ import { Alignment as Alignment$1, AlignmentSchema, AnchorDescriptor as AnchorDescriptor$1, AnchorDescriptorSchema, AnchorType, AnchorTypeSchema, Box as Box$1, BoxSchema, COLOR_BLACK as COLOR_BLACK$1, Color as Color$1, ColorSchema, ConstructDescriptor as ConstructDescriptor$1, ConstructDescriptorSchema, ConstructMarkerImbalance, ConstructMarkerImbalanceError, ContentBlock as ContentBlock$1, ContentBlockSchema as ContentBlockSchema$1, ContentBorder, ContentBorderSchema, ContentCellBorders as ContentCellBorders$1, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentConstructEnd, ContentConstructEndSchema, ContentConstructStart, ContentConstructStartSchema, ContentControlDescriptor as ContentControlDescriptor$1, ContentControlDescriptorSchema, ContentControlLock, ContentControlLockSchema, ContentControlType, ContentControlTypeSchema, ContentDocument as ContentDocument$1, ContentDocumentSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph as ContentParagraph$1, ContentParagraphSchema, ContentRun, ContentRunSchema, ContentSection as ContentSection$1, ContentSectionSchema as ContentSectionSchema$1, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage as ContentSheetImage$1, ContentSheetImageSchema, ContentSheetPrintRange as ContentSheetPrintRange$1, ContentSheetPrintRangeSchema, ContentSheetPrintSettings as ContentSheetPrintSettings$1, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange as ContentSheetRepeatRange$1, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema as ContentSlideSchema$1, ContentStrokeStyle, ContentStrokeStyleSchema, ContentTable as ContentTable$1, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, DivisionDescriptor, DivisionDescriptorSchema, DocumentPackage as DocumentPackage$1, DocumentPackageSchema, DrawPageChild, DrawPageDescriptor, DrawPageGroupNode, DrawPageGroupSchema, FieldDescriptor, FieldDescriptorSchema, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, LinkDescriptor, LinkDescriptorSchema, LinkTarget, LinkTargetSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, Margins, MarginsSchema, PAGE_SIZE_A4 as PAGE_SIZE_A4$1, PAGE_SIZE_LETTER as PAGE_SIZE_LETTER$1, PackageBlockLeaf, PackageBlockLeafSchema, PackageChildren, PackageGroup, PackageGroupSchema, PackageLeaf, PackageLeafSchema, PackageNode, PackageNodeSchema, PageSize as PageSize$1, PageSizeSchema, ProvenanceChange as ProvenanceChange$1, ProvenanceChangeSchema, ProvenanceDescriptor as ProvenanceDescriptor$1, ProvenanceDescriptorSchema, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN as SLIDE_SIZE_WIDESCREEN$1, SectionChild, SectionConstructGroupNode, SectionConstructGroupSchema, SectionDescriptor, SectionGroupNode, SectionGroupSchema, ShapeChild, ShapeConstructGroupNode, ShapeConstructGroupSchema, ShapeDescriptor, ShapeGroupNode, ShapeGroupSchema, SheetChild, SheetDescriptor, SheetGroupNode, SheetGroupSchema, SlideDescriptor, SlideGroupNode, SlideGroupSchema, StyleEntry, StyleEntrySchema, StyleParagraphProperties, StyleParagraphPropertiesSchema, StyleRunProperties, StyleRunPropertiesSchema, StylesTable, StylesTableSchema, applyParagraphStyleProperties, applyRunStyleProperties, assemblePackage as assemblePackage$1, colorToRgbHex as colorToRgbHex$1, decompose, factorStyles, findConstructMarkerImbalance as findConstructMarkerImbalance$1, flattenPackage as flattenPackage$1, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isPackageBlockLeaf, isPackageGroup, isPackageLeaf, isPackageNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, overlayStyleEntries, resolveStyleChain, rgbHexToColor as rgbHexToColor$1 } from "document-schema.js";
22
22
  //#region src/codec.d.ts
23
23
  declare const xmlCodec: z.ZodCodec<z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
24
24
  type: z.ZodLiteral<"text">;
@@ -87,4 +87,4 @@ declare const packageCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint
87
87
  declare function decodePackage(bytes: Uint8Array<ArrayBuffer>): Package;
88
88
  declare function encodePackage(pkg: Package): Uint8Array<ArrayBuffer>;
89
89
  //#endregion
90
- export { ContentShapeSchema as $, isHeadingGroupNode as $n, PackageChildren as $t, ContentConstructStart as A, SlideDescriptor as An, DrawPageChild as At, ContentImageBlock as B, StylesTableSchema as Bn, LinkDescriptorSchema as Bt, ContentBorderSchema as C, ShapeDescriptor as Cn, ContentTableRow as Ct, ContentCellValueSchema as D, SheetDescriptor as Dn, DivisionDescriptorSchema as Dt, ContentCellValue as E, SheetChild as En, DivisionDescriptor as Et, ContentControlLockSchema as F, StyleParagraphProperties as Fn, FieldDescriptorSchema as Ft, ContentPageBreakSchema as G, decompose as Gn, ListGroupSchema as Gt, ContentListMembership as H, applyRunStyleProperties as Hn, LinkTargetSchema as Ht, ContentControlType as I, StyleParagraphPropertiesSchema as In, HeadingGroupNode as It, ContentRun as J, flattenPackage$1 as Jn, MarginsSchema as Jt, ContentParagraph$1 as K, factorStyles as Kn, ListParagraph as Kt, ContentControlTypeSchema as L, StyleRunProperties as Ln, HeadingGroupSchema as Lt, ContentControlDescriptor$1 as M, SlideGroupSchema as Mn, DrawPageGroupNode as Mt, ContentControlDescriptorSchema as N, StyleEntry as Nn, DrawPageGroupSchema as Nt, ContentConstructEnd as O, SheetGroupNode as On, DocumentPackage$1 as Ot, ContentControlLock as P, StyleEntrySchema as Pn, FieldDescriptor as Pt, ContentShape as Q, isDrawPageGroupNode as Qn, PackageBlockLeafSchema as Qt, ContentDocument$1 as R, StyleRunPropertiesSchema as Rn, HeadingParagraph as Rt, ContentBorder as S, ShapeConstructGroupSchema as Sn, ContentTableCellSchema as St, ContentCellBordersSchema as T, ShapeGroupSchema as Tn, ContentTableSchema as Tt, ContentListMembershipSchema as U, assemblePackage$1 as Un, ListChild as Ut, ContentImageBlockSchema as V, applyParagraphStyleProperties as Vn, LinkTarget as Vt, ContentPageBreak as W, colorToRgbHex$1 as Wn, ListGroupNode as Wt, ContentSection$1 as X, isContentConstructEnd as Xn, PAGE_SIZE_LETTER$1 as Xt, ContentRunSchema as Y, isContentBlock as Yn, PAGE_SIZE_A4$1 as Yt, ContentSectionSchema$1 as Z, isContentConstructStart as Zn, PackageBlockLeaf as Zt, ConstructDescriptorSchema as _, SectionDescriptor as _n, ContentSlideSchema$1 as _t, Alignment$1 as a, PackageNodeSchema as an, isSectionConstructGroupNode as ar, ContentSheetImage as at, ContentBlock$1 as b, ShapeChild as bn, ContentTable$1 as bt, AnchorDescriptorSchema as c, ProvenanceChange$1 as cn, isShapeGroupNode as cr, ContentSheetPrintRangeSchema as ct, Box$1 as d, ProvenanceDescriptorSchema as dn, overlayStyleEntries as dr, ContentSheetRepeatRange$1 as dt, PackageGroup as en, isListGroupNode as er, ContentSheet as et, BoxSchema as f, SLIDE_SIZE_STANDARD as fn, resolveStyleChain as fr, ContentSheetRepeatRangeSchema as ft, ConstructDescriptor$1 as g, SectionConstructGroupSchema as gn, ContentSlide as gt, ColorSchema as h, SectionConstructGroupNode as hn, ContentSheetSchema as ht, xmlCodec as i, PackageNode as in, isPackageNode as ir, ContentSheetColumnSchema as it, ContentConstructStartSchema as j, SlideGroupNode as jn, DrawPageDescriptor as jt, ContentConstructEndSchema as k, SheetGroupSchema as kn, DocumentPackageSchema as kt, AnchorType as l, ProvenanceChangeSchema as ln, isSheetGroupNode as lr, ContentSheetPrintSettings$1 as lt, Color$1 as m, SectionChild as mn, ContentSheetRowSchema as mt, encodePackage as n, PackageLeaf as nn, isPackageGroup as nr, ContentSheetCellSchema as nt, AlignmentSchema as o, PageSize$1 as on, isSectionGroupNode as or, ContentSheetImageSchema as ot, COLOR_BLACK$1 as p, SLIDE_SIZE_WIDESCREEN$1 as pn, rgbHexToColor$1 as pr, ContentSheetRow as pt, ContentParagraphSchema as q, findConstructMarkerImbalance$1 as qn, Margins as qt, packageCodec as r, PackageLeafSchema as rn, isPackageLeaf as rr, ContentSheetColumn as rt, AnchorDescriptor$1 as s, PageSizeSchema as sn, isShapeConstructGroupNode as sr, ContentSheetPrintRange$1 as st, decodePackage as t, PackageGroupSchema as tn, isPackageBlockLeaf as tr, ContentSheetCell as tt, AnchorTypeSchema as u, ProvenanceDescriptor$1 as un, isSlideGroupNode as ur, ContentSheetPrintSettingsSchema as ut, ConstructMarkerImbalance as v, SectionGroupNode as vn, ContentStrokeStyle as vt, ContentCellBorders$1 as w, ShapeGroupNode as wn, ContentTableRowSchema as wt, ContentBlockSchema$1 as x, ShapeConstructGroupNode as xn, ContentTableCell as xt, ConstructMarkerImbalanceError as y, SectionGroupSchema as yn, ContentStrokeStyleSchema as yt, ContentDocumentSchema as z, StylesTable as zn, LinkDescriptor as zt };
90
+ export { ContentShapeSchema as $, isHeadingGroupNode as $n, PackageChildren as $t, ContentConstructStart as A, SlideDescriptor as An, DrawPageChild as At, ContentImageBlock as B, StylesTableSchema as Bn, LinkDescriptorSchema as Bt, ContentBorderSchema as C, ShapeDescriptor as Cn, ContentTableRow as Ct, ContentCellValueSchema as D, SheetDescriptor as Dn, DivisionDescriptorSchema as Dt, ContentCellValue as E, SheetChild as En, DivisionDescriptor as Et, ContentControlLockSchema as F, StyleParagraphProperties as Fn, FieldDescriptorSchema as Ft, ContentPageBreakSchema as G, decompose as Gn, ListGroupSchema as Gt, ContentListMembership as H, applyRunStyleProperties as Hn, LinkTargetSchema as Ht, ContentControlType as I, StyleParagraphPropertiesSchema as In, HeadingGroupNode as It, ContentRun as J, flattenPackage$1 as Jn, MarginsSchema as Jt, ContentParagraph$1 as K, factorStyles as Kn, ListParagraph as Kt, ContentControlTypeSchema as L, StyleRunProperties as Ln, HeadingGroupSchema as Lt, ContentControlDescriptor$1 as M, SlideGroupSchema as Mn, DrawPageGroupNode as Mt, ContentControlDescriptorSchema as N, StyleEntry as Nn, DrawPageGroupSchema as Nt, ContentConstructEnd as O, SheetGroupNode as On, DocumentPackage$1 as Ot, ContentControlLock as P, StyleEntrySchema as Pn, FieldDescriptor as Pt, ContentShape as Q, isDrawPageGroupNode as Qn, PackageBlockLeafSchema as Qt, ContentDocument$1 as R, StyleRunPropertiesSchema as Rn, HeadingParagraph as Rt, ContentBorder as S, ShapeConstructGroupSchema as Sn, ContentTableCellSchema as St, ContentCellBordersSchema as T, ShapeGroupSchema as Tn, ContentTableSchema as Tt, ContentListMembershipSchema as U, assemblePackage$1 as Un, ListChild as Ut, ContentImageBlockSchema as V, applyParagraphStyleProperties as Vn, LinkTarget as Vt, ContentPageBreak as W, colorToRgbHex$1 as Wn, ListGroupNode as Wt, ContentSection$1 as X, isContentConstructEnd as Xn, PAGE_SIZE_LETTER$1 as Xt, ContentRunSchema as Y, isContentBlock as Yn, PAGE_SIZE_A4$1 as Yt, ContentSectionSchema$1 as Z, isContentConstructStart as Zn, PackageBlockLeaf as Zt, ConstructDescriptorSchema as _, SectionDescriptor as _n, ContentSlideSchema$1 as _t, Alignment$1 as a, PackageNodeSchema as an, isSectionConstructGroupNode as ar, ContentSheetImage$1 as at, ContentBlock$1 as b, ShapeChild as bn, ContentTable$1 as bt, AnchorDescriptorSchema as c, ProvenanceChange$1 as cn, isShapeGroupNode as cr, ContentSheetPrintRangeSchema as ct, Box$1 as d, ProvenanceDescriptorSchema as dn, overlayStyleEntries as dr, ContentSheetRepeatRange$1 as dt, PackageGroup as en, isListGroupNode as er, ContentSheet as et, BoxSchema as f, SLIDE_SIZE_STANDARD as fn, resolveStyleChain as fr, ContentSheetRepeatRangeSchema as ft, ConstructDescriptor$1 as g, SectionConstructGroupSchema as gn, ContentSlide as gt, ColorSchema as h, SectionConstructGroupNode as hn, ContentSheetSchema as ht, xmlCodec as i, PackageNode as in, isPackageNode as ir, ContentSheetColumnSchema as it, ContentConstructStartSchema as j, SlideGroupNode as jn, DrawPageDescriptor as jt, ContentConstructEndSchema as k, SheetGroupSchema as kn, DocumentPackageSchema as kt, AnchorType as l, ProvenanceChangeSchema as ln, isSheetGroupNode as lr, ContentSheetPrintSettings$1 as lt, Color$1 as m, SectionChild as mn, ContentSheetRowSchema as mt, encodePackage as n, PackageLeaf as nn, isPackageGroup as nr, ContentSheetCellSchema as nt, AlignmentSchema as o, PageSize$1 as on, isSectionGroupNode as or, ContentSheetImageSchema as ot, COLOR_BLACK$1 as p, SLIDE_SIZE_WIDESCREEN$1 as pn, rgbHexToColor$1 as pr, ContentSheetRow as pt, ContentParagraphSchema as q, findConstructMarkerImbalance$1 as qn, Margins as qt, packageCodec as r, PackageLeafSchema as rn, isPackageLeaf as rr, ContentSheetColumn as rt, AnchorDescriptor$1 as s, PageSizeSchema as sn, isShapeConstructGroupNode as sr, ContentSheetPrintRange$1 as st, decodePackage as t, PackageGroupSchema as tn, isPackageBlockLeaf as tr, ContentSheetCell as tt, AnchorTypeSchema as u, ProvenanceDescriptor$1 as un, isSlideGroupNode as ur, ContentSheetPrintSettingsSchema as ut, ConstructMarkerImbalance as v, SectionGroupNode as vn, ContentStrokeStyle as vt, ContentCellBorders$1 as w, ShapeGroupNode as wn, ContentTableRowSchema as wt, ContentBlockSchema$1 as x, ShapeConstructGroupNode as xn, ContentTableCell as xt, ConstructMarkerImbalanceError as y, SectionGroupSchema as yn, ContentStrokeStyleSchema as yt, ContentDocumentSchema as z, StylesTable as zn, LinkDescriptor as zt };
@@ -18,7 +18,7 @@ import "./xlsx-CpX5nzGV.cjs";
18
18
  import "./content-C79O3esU.cjs";
19
19
  import "./build-D-ldsmtA.cjs";
20
20
  import { z } from "zod";
21
- import { Alignment as Alignment$1, AlignmentSchema, AnchorDescriptor as AnchorDescriptor$1, AnchorDescriptorSchema, AnchorType, AnchorTypeSchema, Box as Box$1, BoxSchema, COLOR_BLACK, Color as Color$1, ColorSchema, ConstructDescriptor as ConstructDescriptor$1, ConstructDescriptorSchema, ConstructMarkerImbalance, ConstructMarkerImbalanceError, ContentBlock as ContentBlock$1, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders as ContentCellBorders$1, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentConstructEnd, ContentConstructEndSchema, ContentConstructStart, ContentConstructStartSchema, ContentControlDescriptor as ContentControlDescriptor$1, ContentControlDescriptorSchema, ContentControlLock, ContentControlLockSchema, ContentControlType, ContentControlTypeSchema, ContentDocument as ContentDocument$1, ContentDocumentSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph as ContentParagraph$1, ContentParagraphSchema, ContentRun, ContentRunSchema, ContentSection as ContentSection$1, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange as ContentSheetPrintRange$1, ContentSheetPrintRangeSchema, ContentSheetPrintSettings as ContentSheetPrintSettings$1, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange as ContentSheetRepeatRange$1, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentTable as ContentTable$1, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, DivisionDescriptor, DivisionDescriptorSchema, DocumentPackage as DocumentPackage$1, DocumentPackageSchema, DrawPageChild, DrawPageDescriptor, DrawPageGroupNode, DrawPageGroupSchema, FieldDescriptor, FieldDescriptorSchema, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, LinkDescriptor, LinkDescriptorSchema, LinkTarget, LinkTargetSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, Margins, MarginsSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PackageBlockLeaf, PackageBlockLeafSchema, PackageChildren, PackageGroup, PackageGroupSchema, PackageLeaf, PackageLeafSchema, PackageNode, PackageNodeSchema, PageSize as PageSize$1, PageSizeSchema, ProvenanceChange as ProvenanceChange$1, ProvenanceChangeSchema, ProvenanceDescriptor as ProvenanceDescriptor$1, ProvenanceDescriptorSchema, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SectionChild, SectionConstructGroupNode, SectionConstructGroupSchema, SectionDescriptor, SectionGroupNode, SectionGroupSchema, ShapeChild, ShapeConstructGroupNode, ShapeConstructGroupSchema, ShapeDescriptor, ShapeGroupNode, ShapeGroupSchema, SheetChild, SheetDescriptor, SheetGroupNode, SheetGroupSchema, SlideDescriptor, SlideGroupNode, SlideGroupSchema, StyleEntry, StyleEntrySchema, StyleParagraphProperties, StyleParagraphPropertiesSchema, StyleRunProperties, StyleRunPropertiesSchema, StylesTable, 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";
21
+ import { Alignment as Alignment$1, AlignmentSchema, AnchorDescriptor as AnchorDescriptor$1, AnchorDescriptorSchema, AnchorType, AnchorTypeSchema, Box as Box$1, BoxSchema, COLOR_BLACK, Color as Color$1, ColorSchema, ConstructDescriptor as ConstructDescriptor$1, ConstructDescriptorSchema, ConstructMarkerImbalance, ConstructMarkerImbalanceError, ContentBlock as ContentBlock$1, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders as ContentCellBorders$1, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentConstructEnd, ContentConstructEndSchema, ContentConstructStart, ContentConstructStartSchema, ContentControlDescriptor as ContentControlDescriptor$1, ContentControlDescriptorSchema, ContentControlLock, ContentControlLockSchema, ContentControlType, ContentControlTypeSchema, ContentDocument as ContentDocument$1, ContentDocumentSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph as ContentParagraph$1, ContentParagraphSchema, ContentRun, ContentRunSchema, ContentSection as ContentSection$1, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage as ContentSheetImage$1, ContentSheetImageSchema, ContentSheetPrintRange as ContentSheetPrintRange$1, ContentSheetPrintRangeSchema, ContentSheetPrintSettings as ContentSheetPrintSettings$1, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange as ContentSheetRepeatRange$1, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentTable as ContentTable$1, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, DivisionDescriptor, DivisionDescriptorSchema, DocumentPackage as DocumentPackage$1, DocumentPackageSchema, DrawPageChild, DrawPageDescriptor, DrawPageGroupNode, DrawPageGroupSchema, FieldDescriptor, FieldDescriptorSchema, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, LinkDescriptor, LinkDescriptorSchema, LinkTarget, LinkTargetSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, Margins, MarginsSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PackageBlockLeaf, PackageBlockLeafSchema, PackageChildren, PackageGroup, PackageGroupSchema, PackageLeaf, PackageLeafSchema, PackageNode, PackageNodeSchema, PageSize as PageSize$1, PageSizeSchema, ProvenanceChange as ProvenanceChange$1, ProvenanceChangeSchema, ProvenanceDescriptor as ProvenanceDescriptor$1, ProvenanceDescriptorSchema, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SectionChild, SectionConstructGroupNode, SectionConstructGroupSchema, SectionDescriptor, SectionGroupNode, SectionGroupSchema, ShapeChild, ShapeConstructGroupNode, ShapeConstructGroupSchema, ShapeDescriptor, ShapeGroupNode, ShapeGroupSchema, SheetChild, SheetDescriptor, SheetGroupNode, SheetGroupSchema, SlideDescriptor, SlideGroupNode, SlideGroupSchema, StyleEntry, StyleEntrySchema, StyleParagraphProperties, StyleParagraphPropertiesSchema, StyleRunProperties, StyleRunPropertiesSchema, StylesTable, 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";
22
22
  //#region src/codec.d.ts
23
23
  declare const xmlCodec: z.ZodCodec<z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
24
24
  type: z.ZodLiteral<"text">;
@@ -87,4 +87,4 @@ declare const packageCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint
87
87
  declare function decodePackage(bytes: Uint8Array<ArrayBuffer>): Package;
88
88
  declare function encodePackage(pkg: Package): Uint8Array<ArrayBuffer>;
89
89
  //#endregion
90
- export { ContentShapeSchema as $, isHeadingGroupNode as $n, PackageChildren as $t, ContentConstructStart as A, SlideDescriptor as An, DrawPageChild as At, ContentImageBlock as B, StylesTableSchema as Bn, LinkDescriptorSchema as Bt, ContentBorderSchema as C, ShapeDescriptor as Cn, ContentTableRow as Ct, ContentCellValueSchema as D, SheetDescriptor as Dn, DivisionDescriptorSchema as Dt, ContentCellValue as E, SheetChild as En, DivisionDescriptor as Et, ContentControlLockSchema as F, StyleParagraphProperties as Fn, FieldDescriptorSchema as Ft, ContentPageBreakSchema as G, decompose as Gn, ListGroupSchema as Gt, ContentListMembership as H, applyRunStyleProperties as Hn, LinkTargetSchema as Ht, ContentControlType as I, StyleParagraphPropertiesSchema as In, HeadingGroupNode as It, ContentRun as J, flattenPackage as Jn, MarginsSchema as Jt, ContentParagraph$1 as K, factorStyles as Kn, ListParagraph as Kt, ContentControlTypeSchema as L, StyleRunProperties as Ln, HeadingGroupSchema as Lt, ContentControlDescriptor$1 as M, SlideGroupSchema as Mn, DrawPageGroupNode as Mt, ContentControlDescriptorSchema as N, StyleEntry as Nn, DrawPageGroupSchema as Nt, ContentConstructEnd as O, SheetGroupNode as On, DocumentPackage$1 as Ot, ContentControlLock as P, StyleEntrySchema as Pn, FieldDescriptor as Pt, ContentShape as Q, isDrawPageGroupNode as Qn, PackageBlockLeafSchema as Qt, ContentDocument$1 as R, StyleRunPropertiesSchema as Rn, HeadingParagraph as Rt, ContentBorder as S, ShapeConstructGroupSchema as Sn, ContentTableCellSchema as St, ContentCellBordersSchema as T, ShapeGroupSchema as Tn, ContentTableSchema as Tt, ContentListMembershipSchema as U, assemblePackage as Un, ListChild as Ut, ContentImageBlockSchema as V, applyParagraphStyleProperties as Vn, LinkTarget as Vt, ContentPageBreak as W, colorToRgbHex as Wn, ListGroupNode as Wt, ContentSection$1 as X, isContentConstructEnd as Xn, PAGE_SIZE_LETTER as Xt, ContentRunSchema as Y, isContentBlock as Yn, PAGE_SIZE_A4 as Yt, ContentSectionSchema as Z, isContentConstructStart as Zn, PackageBlockLeaf as Zt, ConstructDescriptorSchema as _, SectionDescriptor as _n, ContentSlideSchema as _t, Alignment$1 as a, PackageNodeSchema as an, isSectionConstructGroupNode as ar, ContentSheetImage as at, ContentBlock$1 as b, ShapeChild as bn, ContentTable$1 as bt, AnchorDescriptorSchema as c, ProvenanceChange$1 as cn, isShapeGroupNode as cr, ContentSheetPrintRangeSchema as ct, Box$1 as d, ProvenanceDescriptorSchema as dn, overlayStyleEntries as dr, ContentSheetRepeatRange$1 as dt, PackageGroup as en, isListGroupNode as er, ContentSheet as et, BoxSchema as f, SLIDE_SIZE_STANDARD as fn, resolveStyleChain as fr, ContentSheetRepeatRangeSchema as ft, ConstructDescriptor$1 as g, SectionConstructGroupSchema as gn, ContentSlide as gt, ColorSchema as h, SectionConstructGroupNode as hn, ContentSheetSchema as ht, xmlCodec as i, PackageNode as in, isPackageNode as ir, ContentSheetColumnSchema as it, ContentConstructStartSchema as j, SlideGroupNode as jn, DrawPageDescriptor as jt, ContentConstructEndSchema as k, SheetGroupSchema as kn, DocumentPackageSchema as kt, AnchorType as l, ProvenanceChangeSchema as ln, isSheetGroupNode as lr, ContentSheetPrintSettings$1 as lt, Color$1 as m, SectionChild as mn, ContentSheetRowSchema as mt, encodePackage as n, PackageLeaf as nn, isPackageGroup as nr, ContentSheetCellSchema as nt, AlignmentSchema as o, PageSize$1 as on, isSectionGroupNode as or, ContentSheetImageSchema as ot, COLOR_BLACK as p, SLIDE_SIZE_WIDESCREEN as pn, rgbHexToColor as pr, ContentSheetRow as pt, ContentParagraphSchema as q, findConstructMarkerImbalance as qn, Margins as qt, packageCodec as r, PackageLeafSchema as rn, isPackageLeaf as rr, ContentSheetColumn as rt, AnchorDescriptor$1 as s, PageSizeSchema as sn, isShapeConstructGroupNode as sr, ContentSheetPrintRange$1 as st, decodePackage as t, PackageGroupSchema as tn, isPackageBlockLeaf as tr, ContentSheetCell as tt, AnchorTypeSchema as u, ProvenanceDescriptor$1 as un, isSlideGroupNode as ur, ContentSheetPrintSettingsSchema as ut, ConstructMarkerImbalance as v, SectionGroupNode as vn, ContentStrokeStyle as vt, ContentCellBorders$1 as w, ShapeGroupNode as wn, ContentTableRowSchema as wt, ContentBlockSchema as x, ShapeConstructGroupNode as xn, ContentTableCell as xt, ConstructMarkerImbalanceError as y, SectionGroupSchema as yn, ContentStrokeStyleSchema as yt, ContentDocumentSchema as z, StylesTable as zn, LinkDescriptor as zt };
90
+ export { ContentShapeSchema as $, isHeadingGroupNode as $n, PackageChildren as $t, ContentConstructStart as A, SlideDescriptor as An, DrawPageChild as At, ContentImageBlock as B, StylesTableSchema as Bn, LinkDescriptorSchema as Bt, ContentBorderSchema as C, ShapeDescriptor as Cn, ContentTableRow as Ct, ContentCellValueSchema as D, SheetDescriptor as Dn, DivisionDescriptorSchema as Dt, ContentCellValue as E, SheetChild as En, DivisionDescriptor as Et, ContentControlLockSchema as F, StyleParagraphProperties as Fn, FieldDescriptorSchema as Ft, ContentPageBreakSchema as G, decompose as Gn, ListGroupSchema as Gt, ContentListMembership as H, applyRunStyleProperties as Hn, LinkTargetSchema as Ht, ContentControlType as I, StyleParagraphPropertiesSchema as In, HeadingGroupNode as It, ContentRun as J, flattenPackage as Jn, MarginsSchema as Jt, ContentParagraph$1 as K, factorStyles as Kn, ListParagraph as Kt, ContentControlTypeSchema as L, StyleRunProperties as Ln, HeadingGroupSchema as Lt, ContentControlDescriptor$1 as M, SlideGroupSchema as Mn, DrawPageGroupNode as Mt, ContentControlDescriptorSchema as N, StyleEntry as Nn, DrawPageGroupSchema as Nt, ContentConstructEnd as O, SheetGroupNode as On, DocumentPackage$1 as Ot, ContentControlLock as P, StyleEntrySchema as Pn, FieldDescriptor as Pt, ContentShape as Q, isDrawPageGroupNode as Qn, PackageBlockLeafSchema as Qt, ContentDocument$1 as R, StyleRunPropertiesSchema as Rn, HeadingParagraph as Rt, ContentBorder as S, ShapeConstructGroupSchema as Sn, ContentTableCellSchema as St, ContentCellBordersSchema as T, ShapeGroupSchema as Tn, ContentTableSchema as Tt, ContentListMembershipSchema as U, assemblePackage as Un, ListChild as Ut, ContentImageBlockSchema as V, applyParagraphStyleProperties as Vn, LinkTarget as Vt, ContentPageBreak as W, colorToRgbHex as Wn, ListGroupNode as Wt, ContentSection$1 as X, isContentConstructEnd as Xn, PAGE_SIZE_LETTER as Xt, ContentRunSchema as Y, isContentBlock as Yn, PAGE_SIZE_A4 as Yt, ContentSectionSchema as Z, isContentConstructStart as Zn, PackageBlockLeaf as Zt, ConstructDescriptorSchema as _, SectionDescriptor as _n, ContentSlideSchema as _t, Alignment$1 as a, PackageNodeSchema as an, isSectionConstructGroupNode as ar, ContentSheetImage$1 as at, ContentBlock$1 as b, ShapeChild as bn, ContentTable$1 as bt, AnchorDescriptorSchema as c, ProvenanceChange$1 as cn, isShapeGroupNode as cr, ContentSheetPrintRangeSchema as ct, Box$1 as d, ProvenanceDescriptorSchema as dn, overlayStyleEntries as dr, ContentSheetRepeatRange$1 as dt, PackageGroup as en, isListGroupNode as er, ContentSheet as et, BoxSchema as f, SLIDE_SIZE_STANDARD as fn, resolveStyleChain as fr, ContentSheetRepeatRangeSchema as ft, ConstructDescriptor$1 as g, SectionConstructGroupSchema as gn, ContentSlide as gt, ColorSchema as h, SectionConstructGroupNode as hn, ContentSheetSchema as ht, xmlCodec as i, PackageNode as in, isPackageNode as ir, ContentSheetColumnSchema as it, ContentConstructStartSchema as j, SlideGroupNode as jn, DrawPageDescriptor as jt, ContentConstructEndSchema as k, SheetGroupSchema as kn, DocumentPackageSchema as kt, AnchorType as l, ProvenanceChangeSchema as ln, isSheetGroupNode as lr, ContentSheetPrintSettings$1 as lt, Color$1 as m, SectionChild as mn, ContentSheetRowSchema as mt, encodePackage as n, PackageLeaf as nn, isPackageGroup as nr, ContentSheetCellSchema as nt, AlignmentSchema as o, PageSize$1 as on, isSectionGroupNode as or, ContentSheetImageSchema as ot, COLOR_BLACK as p, SLIDE_SIZE_WIDESCREEN as pn, rgbHexToColor as pr, ContentSheetRow as pt, ContentParagraphSchema as q, findConstructMarkerImbalance as qn, Margins as qt, packageCodec as r, PackageLeafSchema as rn, isPackageLeaf as rr, ContentSheetColumn as rt, AnchorDescriptor$1 as s, PageSizeSchema as sn, isShapeConstructGroupNode as sr, ContentSheetPrintRange$1 as st, decodePackage as t, PackageGroupSchema as tn, isPackageBlockLeaf as tr, ContentSheetCell as tt, AnchorTypeSchema as u, ProvenanceDescriptor$1 as un, isSlideGroupNode as ur, ContentSheetPrintSettingsSchema as ut, ConstructMarkerImbalance as v, SectionGroupNode as vn, ContentStrokeStyle as vt, ContentCellBorders$1 as w, ShapeGroupNode as wn, ContentTableRowSchema as wt, ContentBlockSchema as x, ShapeConstructGroupNode as xn, ContentTableCell as xt, ConstructMarkerImbalanceError as y, SectionGroupSchema as yn, ContentStrokeStyleSchema as yt, ContentDocumentSchema as z, StylesTable as zn, LinkDescriptor as zt };
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-CoqS3uGe.cjs";
1
+ import { i as xmlCodec, n as encodePackage, r as packageCodec, t as decodePackage } from "./codec-CbZEJgb3.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-CzqiAWdz.js";
1
+ import { i as xmlCodec, n as encodePackage, r as packageCodec, t as decodePackage } from "./codec-CUdvXX8t.js";
2
2
  export { decodePackage, encodePackage, packageCodec, xmlCodec };
package/dist/index.d.cts CHANGED
@@ -21,5 +21,5 @@ import { n as PptxDocumentSchema, r as readPptxContent, t as PptxDocument } from
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-CoqS3uGe.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-CbZEJgb3.cjs";
25
25
  export { type Alignment, AlignmentSchema, type AnchorDescriptor, AnchorDescriptorSchema, type AnchorType, AnchorTypeSchema, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, BoxSchema, 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 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 };
package/dist/index.d.ts CHANGED
@@ -21,5 +21,5 @@ import { n as PptxDocumentSchema, r as readPptxContent, t as PptxDocument } from
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-CzqiAWdz.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-CUdvXX8t.js";
25
25
  export { type Alignment, AlignmentSchema, type AnchorDescriptor, AnchorDescriptorSchema, type AnchorType, AnchorTypeSchema, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, BoxSchema, 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 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 };
@@ -368,14 +368,14 @@ function readSheet(pkg, entry, sheetIndex, sharedStrings, definedNamesBySheet, c
368
368
  const cells = readCells(worksheet, sharedStrings, context);
369
369
  applyCellComments(require_typed_xlsx_comments.readSheetCellComments(pkg, entry.path), cells);
370
370
  applyCellResidueRules(worksheet, cells);
371
- const embeddedObjects = require_typed_xlsx_drawings.readSheetEmbeddedObjects(pkg, entry.path, worksheet);
371
+ const drawing = require_typed_xlsx_drawings.readSheetDrawing(pkg, entry.path, worksheet);
372
372
  return {
373
373
  name: entry.name,
374
374
  cells,
375
375
  columns: readColumns(worksheet),
376
376
  rows: readRows(worksheet),
377
- images: [],
378
- ...embeddedObjects === void 0 ? {} : { embeddedObjects },
377
+ images: drawing.images,
378
+ ...drawing.embeddedObjects === void 0 ? {} : { embeddedObjects: drawing.embeddedObjects },
379
379
  printSettings: require_typed_xlsx_print_settings.readPrintSettings(worksheet, sheetIndex, definedNamesBySheet)
380
380
  };
381
381
  }
@@ -6,7 +6,7 @@ import { classifyNumberFormat } from "./number-format.js";
6
6
  import { readXmlBool } from "./util.js";
7
7
  import { readPrintSettings } from "./print-settings.js";
8
8
  import { columnWidthCharsToPt } from "./units.js";
9
- import { readSheetEmbeddedObjects } from "./drawings.js";
9
+ import { readSheetDrawing } from "./drawings.js";
10
10
  import { readDate1904, serialToIsoDate, serialToIsoDateTime, serialToIsoTime } from "./serial.js";
11
11
  import { loadSharedStrings } from "./shared-strings.js";
12
12
  import { readCellStyles } from "./styles.js";
@@ -367,14 +367,14 @@ function readSheet(pkg, entry, sheetIndex, sharedStrings, definedNamesBySheet, c
367
367
  const cells = readCells(worksheet, sharedStrings, context);
368
368
  applyCellComments(readSheetCellComments(pkg, entry.path), cells);
369
369
  applyCellResidueRules(worksheet, cells);
370
- const embeddedObjects = readSheetEmbeddedObjects(pkg, entry.path, worksheet);
370
+ const drawing = readSheetDrawing(pkg, entry.path, worksheet);
371
371
  return {
372
372
  name: entry.name,
373
373
  cells,
374
374
  columns: readColumns(worksheet),
375
375
  rows: readRows(worksheet),
376
- images: [],
377
- ...embeddedObjects === void 0 ? {} : { embeddedObjects },
376
+ images: drawing.images,
377
+ ...drawing.embeddedObjects === void 0 ? {} : { embeddedObjects: drawing.embeddedObjects },
378
378
  printSettings: readPrintSettings(worksheet, sheetIndex, definedNamesBySheet)
379
379
  };
380
380
  }
@@ -1,6 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_util_base64 = require("../../util/base64.cjs");
2
3
  const require_typed_util = require("../util.cjs");
3
4
  const require_typed_shared_metadata = require("../shared/metadata.cjs");
5
+ const require_image_sniff = require("../../image/sniff.cjs");
4
6
  const require_typed_shared_units = require("../shared/units.cjs");
5
7
  const require_typed_pptx_chart = require("../pptx/chart.cjs");
6
8
  const require_typed_xlsx_print_settings = require("./print-settings.cjs");
@@ -98,32 +100,40 @@ function chartCells(chartRoot, frame) {
98
100
  });
99
101
  return cells;
100
102
  }
101
- function readSheetEmbeddedObjects(pkg, worksheetPath, worksheet) {
103
+ function readSheetDrawing(pkg, worksheetPath, worksheet) {
102
104
  let drawingPath;
103
105
  for (const rel of require_typed_util.resolveRelationships(pkg, worksheetPath).values()) if (rel.type.endsWith(DRAWING_REL_SUFFIX)) {
104
106
  drawingPath = rel.target;
105
107
  break;
106
108
  }
107
- const drawingRoot = drawingPath === void 0 ? void 0 : require_typed_util.rootElement(pkg.parts[drawingPath]);
108
- if (drawingRoot === void 0) return;
109
- const drawingRels = drawingPath === void 0 ? void 0 : require_typed_util.resolveRelationships(pkg, drawingPath);
109
+ if (drawingPath === void 0) return {
110
+ embeddedObjects: void 0,
111
+ images: []
112
+ };
113
+ const drawingRoot = require_typed_util.rootElement(pkg.parts[drawingPath]);
114
+ if (drawingRoot === void 0) return {
115
+ embeddedObjects: void 0,
116
+ images: []
117
+ };
118
+ const drawingRels = require_typed_util.resolveRelationships(pkg, drawingPath);
110
119
  const geometry = new SheetGridGeometry(worksheet);
111
120
  const objects = [];
121
+ const images = [];
112
122
  for (const anchor of require_typed_util.childrenWithTag(drawingRoot, "xdr:twoCellAnchor")) {
113
123
  const from = readAnchorMarker(anchor, "xdr:from");
114
124
  const to = readAnchorMarker(anchor, "xdr:to");
115
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);
128
+ const frameBox = {
129
+ xPt,
130
+ yPt,
131
+ widthPt: geometry.xPt(to.column, to.colOffEmu) - xPt,
132
+ heightPt: geometry.yPt(to.row, to.rowOffEmu) - yPt
133
+ };
116
134
  for (const frame of require_typed_util.elementsWithTag([anchor], "xdr:graphicFrame")) {
117
135
  const chart = readChartFrame(pkg, frame, drawingRels);
118
136
  if (chart === void 0) continue;
119
- const xPt = geometry.xPt(from.column, from.colOffEmu);
120
- const yPt = geometry.yPt(from.row, from.rowOffEmu);
121
- const frameBox = {
122
- xPt,
123
- yPt,
124
- widthPt: geometry.xPt(to.column, to.colOffEmu) - xPt,
125
- heightPt: geometry.yPt(to.row, to.rowOffEmu) - yPt
126
- };
127
137
  objects.push({
128
138
  objectKind: "chart",
129
139
  document: chartDocument(pkg, chart.root, frameBox, chart.name),
@@ -134,8 +144,39 @@ function readSheetEmbeddedObjects(pkg, worksheetPath, worksheet) {
134
144
  offsetYPt: require_typed_shared_units.emuToPt(from.rowOffEmu)
135
145
  });
136
146
  }
147
+ for (const pic of require_typed_util.elementsWithTag([anchor], "xdr:pic")) {
148
+ const media = readPictureMedia(pkg, pic, drawingRels);
149
+ if (media === void 0) continue;
150
+ if (frameBox.widthPt <= 0 || frameBox.heightPt <= 0) continue;
151
+ images.push({
152
+ kind: "image",
153
+ format: media.format,
154
+ 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)
161
+ });
162
+ }
137
163
  }
138
- return objects.length === 0 ? void 0 : objects;
164
+ return {
165
+ embeddedObjects: objects.length === 0 ? void 0 : objects,
166
+ images
167
+ };
168
+ }
169
+ function readPictureMedia(pkg, pic, drawingRels) {
170
+ const blip = require_typed_util.elementsWithTag([pic], "a:blip")[0];
171
+ const rId = blip === void 0 ? void 0 : require_typed_util.attr(blip, "r:embed");
172
+ const target = rId === void 0 ? void 0 : drawingRels.get(rId)?.target;
173
+ const mediaPart = target === void 0 ? void 0 : pkg.parts[target];
174
+ if (mediaPart?.kind !== "binary") return;
175
+ const format = require_image_sniff.sniffImageFormat(require_util_base64.base64ToBytes(mediaPart.base64));
176
+ return format === void 0 ? void 0 : {
177
+ format,
178
+ base64: mediaPart.base64
179
+ };
139
180
  }
140
181
  function readChartFrame(pkg, frame, drawingRels) {
141
182
  const graphic = require_typed_util.childrenWithTag(frame, "a:graphic")[0];
@@ -167,4 +208,4 @@ function chartDocument(pkg, chartRoot, frame, name) {
167
208
  };
168
209
  }
169
210
  //#endregion
170
- exports.readSheetEmbeddedObjects = readSheetEmbeddedObjects;
211
+ exports.readSheetDrawing = readSheetDrawing;
@@ -1,7 +1,11 @@
1
1
  import { l as XmlElement } from "../../node-CkBWRjNR.cjs";
2
2
  import { r as Package } from "../../package-L24lkba-.cjs";
3
- import { ContentEmbeddedObject } from "document-schema.js";
3
+ import { ContentEmbeddedObject, ContentSheetImage } from "document-schema.js";
4
4
  //#region src/typed/xlsx/drawings.d.ts
5
- declare function readSheetEmbeddedObjects(pkg: Package, worksheetPath: string, worksheet: XmlElement): ContentEmbeddedObject[] | undefined;
5
+ interface SheetDrawing {
6
+ readonly embeddedObjects: ContentEmbeddedObject[] | undefined;
7
+ readonly images: ContentSheetImage[];
8
+ }
9
+ declare function readSheetDrawing(pkg: Package, worksheetPath: string, worksheet: XmlElement): SheetDrawing;
6
10
  //#endregion
7
- export { readSheetEmbeddedObjects };
11
+ export { SheetDrawing, readSheetDrawing };
@@ -1,7 +1,11 @@
1
1
  import { l as XmlElement } from "../../node-CkBWRjNR.js";
2
2
  import { r as Package } from "../../package-BUojjTXf.js";
3
- import { ContentEmbeddedObject } from "document-schema.js";
3
+ import { ContentEmbeddedObject, ContentSheetImage } from "document-schema.js";
4
4
  //#region src/typed/xlsx/drawings.d.ts
5
- declare function readSheetEmbeddedObjects(pkg: Package, worksheetPath: string, worksheet: XmlElement): ContentEmbeddedObject[] | undefined;
5
+ interface SheetDrawing {
6
+ readonly embeddedObjects: ContentEmbeddedObject[] | undefined;
7
+ readonly images: ContentSheetImage[];
8
+ }
9
+ declare function readSheetDrawing(pkg: Package, worksheetPath: string, worksheet: XmlElement): SheetDrawing;
6
10
  //#endregion
7
- export { readSheetEmbeddedObjects };
11
+ export { SheetDrawing, readSheetDrawing };
@@ -1,5 +1,7 @@
1
+ import { base64ToBytes } from "../../util/base64.js";
1
2
  import { attr, childrenWithTag, elementsWithTag, resolveRelationships, rootElement } from "../util.js";
2
3
  import { readCoreProperties } from "../shared/metadata.js";
4
+ import { sniffImageFormat } from "../../image/sniff.js";
3
5
  import { emuToPt } from "../shared/units.js";
4
6
  import { readChartTable } from "../pptx/chart.js";
5
7
  import { readPrintSettings } from "./print-settings.js";
@@ -97,32 +99,40 @@ function chartCells(chartRoot, frame) {
97
99
  });
98
100
  return cells;
99
101
  }
100
- function readSheetEmbeddedObjects(pkg, worksheetPath, worksheet) {
102
+ function readSheetDrawing(pkg, worksheetPath, worksheet) {
101
103
  let drawingPath;
102
104
  for (const rel of resolveRelationships(pkg, worksheetPath).values()) if (rel.type.endsWith(DRAWING_REL_SUFFIX)) {
103
105
  drawingPath = rel.target;
104
106
  break;
105
107
  }
106
- const drawingRoot = drawingPath === void 0 ? void 0 : rootElement(pkg.parts[drawingPath]);
107
- if (drawingRoot === void 0) return;
108
- const drawingRels = drawingPath === void 0 ? void 0 : resolveRelationships(pkg, drawingPath);
108
+ if (drawingPath === void 0) return {
109
+ embeddedObjects: void 0,
110
+ images: []
111
+ };
112
+ const drawingRoot = rootElement(pkg.parts[drawingPath]);
113
+ if (drawingRoot === void 0) return {
114
+ embeddedObjects: void 0,
115
+ images: []
116
+ };
117
+ const drawingRels = resolveRelationships(pkg, drawingPath);
109
118
  const geometry = new SheetGridGeometry(worksheet);
110
119
  const objects = [];
120
+ const images = [];
111
121
  for (const anchor of childrenWithTag(drawingRoot, "xdr:twoCellAnchor")) {
112
122
  const from = readAnchorMarker(anchor, "xdr:from");
113
123
  const to = readAnchorMarker(anchor, "xdr:to");
114
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);
127
+ const frameBox = {
128
+ xPt,
129
+ yPt,
130
+ widthPt: geometry.xPt(to.column, to.colOffEmu) - xPt,
131
+ heightPt: geometry.yPt(to.row, to.rowOffEmu) - yPt
132
+ };
115
133
  for (const frame of elementsWithTag([anchor], "xdr:graphicFrame")) {
116
134
  const chart = readChartFrame(pkg, frame, drawingRels);
117
135
  if (chart === void 0) continue;
118
- const xPt = geometry.xPt(from.column, from.colOffEmu);
119
- const yPt = geometry.yPt(from.row, from.rowOffEmu);
120
- const frameBox = {
121
- xPt,
122
- yPt,
123
- widthPt: geometry.xPt(to.column, to.colOffEmu) - xPt,
124
- heightPt: geometry.yPt(to.row, to.rowOffEmu) - yPt
125
- };
126
136
  objects.push({
127
137
  objectKind: "chart",
128
138
  document: chartDocument(pkg, chart.root, frameBox, chart.name),
@@ -133,8 +143,39 @@ function readSheetEmbeddedObjects(pkg, worksheetPath, worksheet) {
133
143
  offsetYPt: emuToPt(from.rowOffEmu)
134
144
  });
135
145
  }
146
+ for (const pic of elementsWithTag([anchor], "xdr:pic")) {
147
+ const media = readPictureMedia(pkg, pic, drawingRels);
148
+ if (media === void 0) continue;
149
+ if (frameBox.widthPt <= 0 || frameBox.heightPt <= 0) continue;
150
+ images.push({
151
+ kind: "image",
152
+ format: media.format,
153
+ 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)
160
+ });
161
+ }
136
162
  }
137
- return objects.length === 0 ? void 0 : objects;
163
+ return {
164
+ embeddedObjects: objects.length === 0 ? void 0 : objects,
165
+ images
166
+ };
167
+ }
168
+ function readPictureMedia(pkg, pic, drawingRels) {
169
+ const blip = elementsWithTag([pic], "a:blip")[0];
170
+ const rId = blip === void 0 ? void 0 : attr(blip, "r:embed");
171
+ const target = rId === void 0 ? void 0 : drawingRels.get(rId)?.target;
172
+ const mediaPart = target === void 0 ? void 0 : pkg.parts[target];
173
+ if (mediaPart?.kind !== "binary") return;
174
+ const format = sniffImageFormat(base64ToBytes(mediaPart.base64));
175
+ return format === void 0 ? void 0 : {
176
+ format,
177
+ base64: mediaPart.base64
178
+ };
138
179
  }
139
180
  function readChartFrame(pkg, frame, drawingRels) {
140
181
  const graphic = childrenWithTag(frame, "a:graphic")[0];
@@ -166,4 +207,4 @@ function chartDocument(pkg, chartRoot, frame, name) {
166
207
  };
167
208
  }
168
209
  //#endregion
169
- export { readSheetEmbeddedObjects };
210
+ export { readSheetDrawing };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ooxml.js",
3
- "version": "4.4.3",
3
+ "version": "4.5.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": {
@@ -80,7 +80,7 @@
80
80
  "license": "MIT",
81
81
  "packageManager": "pnpm@11.6.0",
82
82
  "dependencies": {
83
- "archive-codec": "^1.1.0",
83
+ "archive-codec": "^1.1.1",
84
84
  "document-schema.js": "^4.8.0",
85
85
  "fast-xml-parser": "^5.10.1",
86
86
  "fflate": "^0.8.3",