ooxml.js 4.0.12 → 4.1.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
@@ -295,8 +295,8 @@ The package layers a lossless core outward to lossy convenience views:
295
295
 
296
296
  - **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.
297
297
  - **A construct marker brackets whole blocks, never a sub-sequence of runs.** `document-schema.js`'s flat form has no run-level extent, so an inline field, a mid-paragraph bookmark, a run-level content control, or a few inserted words inside an otherwise untouched paragraph are read exactly as before — the text survives, the construct does not. So does an extent that crosses another, or that straddles a section break: neither is expressible as balanced brackets, and both are dropped rather than emitted at a position that would decode to a different nesting.
298
- - **The docx pair round-trips `sections`, not a whole `DocxDocument`.** Numbering definitions, cell border styling/shading, 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. The writer emits no `styles.xml`, `numbering.xml`, comments, footnotes, 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.
299
- - **pptx is read-only.** Connector shapes (`p:cxnSp`) are skipped; shape rotation composes through groups; 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`) the embedded payload itself is an external application's data and is not decoded.
298
+ - **The docx pair round-trips `sections`, not a whole `DocxDocument`.** Numbering definitions, cell border styling/shading, 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. 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` — 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`), a `w:object` inside a header/footer/footnote (recovery walks the document body's block flow only), and the classic non-ZIP OLE compound-file `.bin` payload are not read, and a ZIP payload that does not decode as one of the three OOXML flavours (a plain archive, corrupt zip data, a bodyless docx) degrades to no embedded block rather than failing the host read. The writer emits no `styles.xml`, `numbering.xml`, comments, footnotes, 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.
299
+ - **pptx is read-only.** Connector shapes (`p:cxnSp`) are skipped; shape rotation composes through groups; 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` — 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; the classic non-ZIP OLE compound-file `.bin` payload stays opaque external-application data, and a ZIP payload that does not decode as one of the three OOXML flavours degrades to no embedded block rather than failing the slide read.
300
300
  - **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.
301
301
  - **`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.
302
302
  - **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.
@@ -318,6 +318,7 @@ Conventional Commits, enforced workspace-wide by commitlint through a root `comm
318
318
 
319
319
  ## References
320
320
 
321
+ - [archive-codec](../archive-codec/README.md) — ZIP detection and container primitives; this package's embedded-object recovery checks an OLE payload part's bytes through `isZipArchive` before decoding the nested package.
321
322
  - [document-schema.js](../document-schema.js/README.md) — canonical `ContentBlock`/`ContentSection`/geometry/colour schemas and `ContentDocument`/`LayoutMetadata` types shared with `odf.js` and `documents.js`, plus the `DocumentPackage` tree and the `decompose`/`flattenPackage`/`assemblePackage`/`factorStyles` transform this package's primary readers and writers are built on.
322
323
  - [odf.js](../odf.js/README.md) — sibling OpenDocument Format package, also on `document-schema.js`.
323
324
  - [documents.js](https://github.com/ExaDev/documents.js) — adds PDF conversion and a read-and-write docx/pptx editor on top of this package.
@@ -1,6 +1,6 @@
1
1
  import { d as XmlNode } from "./node-CkBWRjNR.cjs";
2
2
  import { r as Package } from "./package-L24lkba-.cjs";
3
- import "./read-DzmMJPHd.cjs";
3
+ import "./read-VbRhmjOh.cjs";
4
4
  import "./write-6JmxvaK5.cjs";
5
5
  import "./parse-CP5FLZqv.cjs";
6
6
  import "./build-XSm3I8LT.cjs";
@@ -1,6 +1,6 @@
1
1
  import { d as XmlNode } from "./node-CkBWRjNR.js";
2
2
  import { r as Package } from "./package-BUojjTXf.js";
3
- import "./read-CMDEXqGw.js";
3
+ import "./read-CevviAf2.js";
4
4
  import "./write-CT-EgVT7.js";
5
5
  import "./parse-A8_8sdpX.js";
6
6
  import "./build-Z1KRkSEB.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-CZkWeDXF.cjs";
1
+ import { i as xmlCodec, n as encodePackage, r as packageCodec, t as decodePackage } from "./codec-DO0MNF45.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-BOGj_yQL.js";
1
+ import { i as xmlCodec, n as encodePackage, r as packageCodec, t as decodePackage } from "./codec-DxnbKt4O.js";
2
2
  export { decodePackage, encodePackage, packageCodec, xmlCodec };
package/dist/index.cjs CHANGED
@@ -15,12 +15,11 @@ 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-DPAy4uu8.cjs");
19
+ const require_typed_xlsx_content = require("./typed/xlsx/content.cjs");
18
20
  const require_typed_docx_numbering = require("./typed/docx/numbering.cjs");
19
- const require_typed_docx_read = require("./typed/docx/read.cjs");
20
21
  const require_typed_docx_write = require("./typed/docx/write.cjs");
21
- const require_typed_pptx_read = require("./typed/pptx/read.cjs");
22
22
  const require_typed_xlsx_build = require("./typed/xlsx/build.cjs");
23
- const require_typed_xlsx_content = require("./typed/xlsx/content.cjs");
24
23
  const require_typed_document_package = require("./typed/document-package.cjs");
25
24
  const require_typed_xlsx = require("./typed/xlsx.cjs");
26
25
  let document_schema_js = require("document-schema.js");
@@ -62,7 +61,7 @@ Object.defineProperty(exports, "ColorSchema", {
62
61
  return document_schema_js.ColorSchema;
63
62
  }
64
63
  });
65
- exports.CommentSchema = require_typed_docx_read.CommentSchema;
64
+ exports.CommentSchema = require_read.CommentSchema;
66
65
  exports.CompactPackageSchema = require_compact.CompactPackageSchema;
67
66
  exports.CompactPartSchema = require_compact.CompactPartSchema;
68
67
  exports.CompactXmlNodeSchema = require_compact.CompactXmlNodeSchema;
@@ -272,7 +271,7 @@ Object.defineProperty(exports, "DocumentPackageSchema", {
272
271
  return document_schema_js.DocumentPackageSchema;
273
272
  }
274
273
  });
275
- exports.DocxDocumentSchema = require_typed_docx_read.DocxDocumentSchema;
274
+ exports.DocxDocumentSchema = require_read.DocxDocumentSchema;
276
275
  Object.defineProperty(exports, "DrawPageGroupSchema", {
277
276
  enumerable: true,
278
277
  get: function() {
@@ -285,7 +284,7 @@ Object.defineProperty(exports, "FieldDescriptorSchema", {
285
284
  return document_schema_js.FieldDescriptorSchema;
286
285
  }
287
286
  });
288
- exports.FootnoteSchema = require_typed_docx_read.FootnoteSchema;
287
+ exports.FootnoteSchema = require_read.FootnoteSchema;
289
288
  Object.defineProperty(exports, "HeadingGroupSchema", {
290
289
  enumerable: true,
291
290
  get: function() {
@@ -362,7 +361,7 @@ Object.defineProperty(exports, "PageSizeSchema", {
362
361
  }
363
362
  });
364
363
  exports.PartSchema = require_model_package.PartSchema;
365
- exports.PptxDocumentSchema = require_typed_pptx_read.PptxDocumentSchema;
364
+ exports.PptxDocumentSchema = require_read.PptxDocumentSchema;
366
365
  Object.defineProperty(exports, "ProvenanceChangeSchema", {
367
366
  enumerable: true,
368
367
  get: function() {
@@ -635,10 +634,10 @@ exports.packageCodec = require_codec.packageCodec;
635
634
  exports.parsePackage = require_package_io_read.parsePackage;
636
635
  exports.parseXml = require_xml_parse.parseXml;
637
636
  exports.readDocx = require_typed_document_package.readDocx;
638
- exports.readDocxContent = require_typed_docx_read.readDocxContent;
637
+ exports.readDocxContent = require_read.readDocxContent;
639
638
  exports.readNumberingDefinitions = require_typed_docx_numbering.readNumberingDefinitions;
640
639
  exports.readPptx = require_typed_document_package.readPptx;
641
- exports.readPptxContent = require_typed_pptx_read.readPptxContent;
640
+ exports.readPptxContent = require_read.readPptxContent;
642
641
  exports.readXlsx = require_typed_document_package.readXlsx;
643
642
  exports.readXlsxContent = require_typed_xlsx_content.readXlsxContent;
644
643
  exports.readXlsxWorkbook = require_typed_xlsx.readXlsxWorkbook;
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { _ as isXmlNode, a as XmlComment, c as XmlDeclarationSchema, d as XmlNode, f as XmlNodeSchema, g as XmlTextSchema, h as XmlText, i as XmlCdataSchema, l as XmlElement, m as XmlPiSchema, n as AttributeSchema, o as XmlCommentSchema, p as XmlPi, r as XmlCdata, s as XmlDeclaration, t as Attribute, u as XmlElementSchema } from "./node-CkBWRjNR.cjs";
2
2
  import { a as Part, c as XmlPartSchema, i as PackageSchema, n as BinaryPartSchema, o as PartSchema, r as Package, s as XmlPart, t as BinaryPart } from "./package-L24lkba-.cjs";
3
- import { t as parsePackage } from "./read-DzmMJPHd.cjs";
3
+ import { n as parsePackage } from "./read-VbRhmjOh.cjs";
4
4
  import { t as serializePackage } from "./write-6JmxvaK5.cjs";
5
5
  import { t as parseXml } from "./parse-CP5FLZqv.cjs";
6
6
  import { t as buildXml } from "./build-XSm3I8LT.cjs";
@@ -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-UlQ-Nhgi.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-CZkWeDXF.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-DO0MNF45.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
@@ -1,6 +1,6 @@
1
1
  import { _ as isXmlNode, a as XmlComment, c as XmlDeclarationSchema, d as XmlNode, f as XmlNodeSchema, g as XmlTextSchema, h as XmlText, i as XmlCdataSchema, l as XmlElement, m as XmlPiSchema, n as AttributeSchema, o as XmlCommentSchema, p as XmlPi, r as XmlCdata, s as XmlDeclaration, t as Attribute, u as XmlElementSchema } from "./node-CkBWRjNR.js";
2
2
  import { a as Part, c as XmlPartSchema, i as PackageSchema, n as BinaryPartSchema, o as PartSchema, r as Package, s as XmlPart, t as BinaryPart } from "./package-BUojjTXf.js";
3
- import { t as parsePackage } from "./read-CMDEXqGw.js";
3
+ import { n as parsePackage } from "./read-CevviAf2.js";
4
4
  import { t as serializePackage } from "./write-CT-EgVT7.js";
5
5
  import { t as parseXml } from "./parse-A8_8sdpX.js";
6
6
  import { t as buildXml } from "./build-Z1KRkSEB.js";
@@ -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-t6ZfmfQM.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-BOGj_yQL.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-DxnbKt4O.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 };
package/dist/index.js CHANGED
@@ -14,12 +14,11 @@ 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 { c as readPptxContent, i as readDocxContent, n as DocxDocumentSchema, r as FootnoteSchema, s as PptxDocumentSchema, t as CommentSchema } from "./read-Legu2Pt-.js";
18
+ import { readXlsxContent } from "./typed/xlsx/content.js";
17
19
  import { NumberingDefinitionSchema, NumberingLevelSchema, readNumberingDefinitions } from "./typed/docx/numbering.js";
18
- import { CommentSchema, DocxDocumentSchema, FootnoteSchema, readDocxContent } from "./typed/docx/read.js";
19
20
  import { buildDocxPackageFromContent } from "./typed/docx/write.js";
20
- import { PptxDocumentSchema, readPptxContent } from "./typed/pptx/read.js";
21
21
  import { buildXlsxPackageFromContent } from "./typed/xlsx/build.js";
22
- import { readXlsxContent } from "./typed/xlsx/content.js";
23
22
  import { buildDocxPackage, buildXlsxPackage, readDocx, readPptx, readXlsx } from "./typed/document-package.js";
24
23
  import { DefinedNameSchema, XlsxCellSchema, XlsxSheetSchema, XlsxWorkbookSchema, readXlsxWorkbook } from "./typed/xlsx.js";
25
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";
@@ -4,7 +4,9 @@ const require_xml_parse = require("../xml/parse.cjs");
4
4
  const require_zip = require("../zip.cjs");
5
5
  //#region src/package-io/read.ts
6
6
  function parsePackage(bytes) {
7
- const entries = require_zip.unzipPackage(bytes);
7
+ return packageFromEntries(require_zip.unzipPackage(bytes));
8
+ }
9
+ function packageFromEntries(entries) {
8
10
  const parts = {};
9
11
  for (const [path, partBytes] of Object.entries(entries)) if (looksLikeXml(partBytes)) {
10
12
  const xml = new TextDecoder("utf-8").decode(partBytes);
@@ -32,4 +34,5 @@ function looksLikeXml(bytes) {
32
34
  return false;
33
35
  }
34
36
  //#endregion
37
+ exports.packageFromEntries = packageFromEntries;
35
38
  exports.parsePackage = parsePackage;
@@ -1,2 +1,2 @@
1
- import { t as parsePackage } from "../read-DzmMJPHd.cjs";
2
- export { parsePackage };
1
+ import { n as parsePackage, t as packageFromEntries } from "../read-VbRhmjOh.cjs";
2
+ export { packageFromEntries, parsePackage };
@@ -1,2 +1,2 @@
1
- import { t as parsePackage } from "../read-CMDEXqGw.js";
2
- export { parsePackage };
1
+ import { n as parsePackage, t as packageFromEntries } from "../read-CevviAf2.js";
2
+ export { packageFromEntries, parsePackage };
@@ -3,7 +3,9 @@ import { parseXml } from "../xml/parse.js";
3
3
  import { unzipPackage } from "../zip.js";
4
4
  //#region src/package-io/read.ts
5
5
  function parsePackage(bytes) {
6
- const entries = unzipPackage(bytes);
6
+ return packageFromEntries(unzipPackage(bytes));
7
+ }
8
+ function packageFromEntries(entries) {
7
9
  const parts = {};
8
10
  for (const [path, partBytes] of Object.entries(entries)) if (looksLikeXml(partBytes)) {
9
11
  const xml = new TextDecoder("utf-8").decode(partBytes);
@@ -31,4 +33,4 @@ function looksLikeXml(bytes) {
31
33
  return false;
32
34
  }
33
35
  //#endregion
34
- export { parsePackage };
36
+ export { packageFromEntries, parsePackage };
@@ -1,5 +1,6 @@
1
1
  import { r as Package } from "./package-BUojjTXf.js";
2
2
  //#region src/package-io/read.d.ts
3
3
  declare function parsePackage(bytes: Uint8Array<ArrayBuffer>): Package;
4
+ declare function packageFromEntries(entries: Record<string, Uint8Array<ArrayBuffer>>): Package;
4
5
  //#endregion
5
- export { parsePackage as t };
6
+ export { parsePackage as n, packageFromEntries as t };