ooxml.js 2.9.4 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/README.md +7 -6
  2. package/dist/base64--HuymRl_.d.cts +5 -0
  3. package/dist/base64--HuymRl_.d.ts +5 -0
  4. package/dist/build-C0gS5QeG.d.ts +6 -0
  5. package/dist/build-CBL9scQK.d.cts +6 -0
  6. package/dist/build-XSm3I8LT.d.cts +5 -0
  7. package/dist/build-Z1KRkSEB.d.ts +5 -0
  8. package/dist/codec-B52c8v4h.d.ts +88 -0
  9. package/dist/codec-nIFHuTm-.d.cts +88 -0
  10. package/dist/codec.d.cts +2 -72
  11. package/dist/codec.d.ts +2 -72
  12. package/dist/color-fFIKAs-Y.d.cts +9 -0
  13. package/dist/color-fFIKAs-Y.d.ts +9 -0
  14. package/dist/compact-B1qg9oex.d.cts +70 -0
  15. package/dist/compact-f0TfhicN.d.ts +70 -0
  16. package/dist/compact.d.cts +1 -69
  17. package/dist/compact.d.ts +1 -69
  18. package/dist/content-UlQ-Nhgi.d.cts +6 -0
  19. package/dist/content-t6ZfmfQM.d.ts +6 -0
  20. package/dist/entities-6DuTszqf.d.cts +4 -0
  21. package/dist/entities-6DuTszqf.d.ts +4 -0
  22. package/dist/fragment-B1ZV7T5Z.d.ts +6 -0
  23. package/dist/fragment-B1og_8uA.d.cts +6 -0
  24. package/dist/image/sniff.d.cts +1 -4
  25. package/dist/image/sniff.d.ts +1 -4
  26. package/dist/index.d.cts +20 -21
  27. package/dist/index.d.ts +20 -21
  28. package/dist/metadata-D6o-kLpg.d.cts +16 -0
  29. package/dist/metadata-o_WH9V_I.d.ts +16 -0
  30. package/dist/numbering-C53LT-Jx.d.cts +23 -0
  31. package/dist/numbering-D0YfuiOO.d.ts +23 -0
  32. package/dist/package-io/read.d.cts +1 -4
  33. package/dist/package-io/read.d.ts +1 -4
  34. package/dist/package-io/write.d.cts +1 -4
  35. package/dist/package-io/write.d.ts +1 -4
  36. package/dist/parse-A8_8sdpX.d.ts +5 -0
  37. package/dist/parse-CP5FLZqv.d.cts +5 -0
  38. package/dist/read-B2-FFhqI.d.ts +60 -0
  39. package/dist/read-BLMpCzzG.d.ts +45 -0
  40. package/dist/read-CMDEXqGw.d.ts +5 -0
  41. package/dist/read-D_CpruL_.d.cts +60 -0
  42. package/dist/read-DymSS-X4.d.cts +45 -0
  43. package/dist/read-DzmMJPHd.d.cts +5 -0
  44. package/dist/sniff-DjpnUZRp.d.cts +5 -0
  45. package/dist/sniff-DjpnUZRp.d.ts +5 -0
  46. package/dist/typed/docx/numbering.d.cts +1 -22
  47. package/dist/typed/docx/numbering.d.ts +1 -22
  48. package/dist/typed/docx/read.d.cts +1 -59
  49. package/dist/typed/docx/read.d.ts +1 -59
  50. package/dist/typed/pptx/read.d.cts +1 -44
  51. package/dist/typed/pptx/read.d.ts +1 -44
  52. package/dist/typed/shared/color.d.cts +1 -8
  53. package/dist/typed/shared/color.d.ts +1 -8
  54. package/dist/typed/shared/metadata.d.cts +1 -15
  55. package/dist/typed/shared/metadata.d.ts +1 -15
  56. package/dist/typed/util.d.cts +1 -17
  57. package/dist/typed/util.d.ts +1 -17
  58. package/dist/typed/xlsx/build.d.cts +1 -5
  59. package/dist/typed/xlsx/build.d.ts +1 -5
  60. package/dist/typed/xlsx/content.d.cts +1 -5
  61. package/dist/typed/xlsx/content.d.ts +1 -5
  62. package/dist/typed/xlsx.d.cts +1 -42
  63. package/dist/typed/xlsx.d.ts +1 -42
  64. package/dist/util/base64.d.cts +1 -4
  65. package/dist/util/base64.d.ts +1 -4
  66. package/dist/util-DFe4UbvU.d.ts +18 -0
  67. package/dist/util-M3JJlDhF.d.cts +18 -0
  68. package/dist/write-6JmxvaK5.d.cts +5 -0
  69. package/dist/write-CT-EgVT7.d.ts +5 -0
  70. package/dist/xlsx-B97t4YE-.d.cts +43 -0
  71. package/dist/xlsx-BxKODiLX.d.ts +43 -0
  72. package/dist/xml/build.d.cts +1 -4
  73. package/dist/xml/build.d.ts +1 -4
  74. package/dist/xml/entities.d.cts +1 -3
  75. package/dist/xml/entities.d.ts +1 -3
  76. package/dist/xml/fragment.d.cts +1 -5
  77. package/dist/xml/fragment.d.ts +1 -5
  78. package/dist/xml/parse.d.cts +1 -4
  79. package/dist/xml/parse.d.ts +1 -4
  80. package/dist/zip-Ckbv-mtV.d.cts +5 -0
  81. package/dist/zip-Ckbv-mtV.d.ts +5 -0
  82. package/dist/zip.d.cts +1 -4
  83. package/dist/zip.d.ts +1 -4
  84. package/package.json +1 -1
package/dist/compact.d.ts CHANGED
@@ -1,70 +1,2 @@
1
- import { d as XmlNode } from "./node-CkBWRjNR.js";
2
- import { r as Package } from "./package-BUojjTXf.js";
3
- import { z } from "zod";
4
- //#region src/compact.d.ts
5
- type CompactAttrPairs = number[];
6
- type CompactElement = [0, number, CompactAttrPairs, CompactXmlNode[]];
7
- type CompactText = [1, number];
8
- type CompactCdata = [2, number];
9
- type CompactComment = [3, number];
10
- type CompactDeclaration = [4, CompactAttrPairs];
11
- type CompactPi = [5, number, number];
12
- type CompactXmlNode = CompactElement | CompactText | CompactCdata | CompactComment | CompactDeclaration | CompactPi;
13
- declare function isCompactXmlNode(value: unknown): value is CompactXmlNode;
14
- declare const CompactXmlNodeSchema: z.ZodCustom<CompactXmlNode, CompactXmlNode>;
15
- declare const CompactPartSchema: z.ZodUnion<readonly [z.ZodArray<z.ZodCustom<CompactXmlNode, CompactXmlNode>>, z.ZodNumber]>;
16
- type CompactPart = z.infer<typeof CompactPartSchema>;
17
- declare const CompactPackageSchema: z.ZodObject<{
18
- s: z.ZodArray<z.ZodString>;
19
- p: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodCustom<CompactXmlNode, CompactXmlNode>>, z.ZodNumber]>>;
20
- }, z.core.$strip>;
21
- type CompactPackage = z.infer<typeof CompactPackageSchema>;
22
- declare const compactCodec: z.ZodCodec<z.ZodObject<{
23
- parts: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
24
- kind: z.ZodLiteral<"xml">;
25
- nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
26
- type: z.ZodLiteral<"text">;
27
- value: z.ZodString;
28
- }, z.core.$strip>, z.ZodObject<{
29
- type: z.ZodLiteral<"cdata">;
30
- value: z.ZodString;
31
- }, z.core.$strip>, z.ZodObject<{
32
- type: z.ZodLiteral<"comment">;
33
- value: z.ZodString;
34
- }, z.core.$strip>, z.ZodObject<{
35
- type: z.ZodLiteral<"declaration">;
36
- attributes: z.ZodArray<z.ZodObject<{
37
- name: z.ZodString;
38
- value: z.ZodString;
39
- }, z.core.$strip>>;
40
- }, z.core.$strip>, z.ZodObject<{
41
- type: z.ZodLiteral<"pi">;
42
- target: z.ZodString;
43
- content: z.ZodString;
44
- }, z.core.$strip>, z.ZodObject<{
45
- type: z.ZodLiteral<"element">;
46
- tag: z.ZodString;
47
- attributes: z.ZodArray<z.ZodObject<{
48
- name: z.ZodString;
49
- value: z.ZodString;
50
- }, z.core.$strip>>;
51
- children: z.ZodArray<z.ZodCustom<XmlNode, XmlNode>>;
52
- }, z.core.$strip>], "type">>;
53
- }, z.core.$strip>, z.ZodObject<{
54
- kind: z.ZodLiteral<"binary">;
55
- base64: z.ZodString;
56
- }, z.core.$strip>], "kind">>;
57
- }, z.core.$strip>, z.ZodObject<{
58
- s: z.ZodArray<z.ZodString>;
59
- p: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodCustom<CompactXmlNode, CompactXmlNode>>, z.ZodNumber]>>;
60
- }, z.core.$strip>>;
61
- declare function toCompact(pkg: Package): CompactPackage;
62
- declare function fromCompact(cpkg: CompactPackage): Package;
63
- declare const compactPackageCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodObject<{
64
- s: z.ZodArray<z.ZodString>;
65
- p: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodCustom<CompactXmlNode, CompactXmlNode>>, z.ZodNumber]>>;
66
- }, z.core.$strip>>;
67
- declare function decodeCompactPackage(bytes: Uint8Array<ArrayBuffer>): CompactPackage;
68
- declare function encodeCompactPackage(cpkg: CompactPackage): Uint8Array<ArrayBuffer>;
69
- //#endregion
1
+ import { _ as encodeCompactPackage, a as CompactElement, b as toCompact, c as CompactPart, d as CompactText, f as CompactXmlNode, g as decodeCompactPackage, h as compactPackageCodec, i as CompactDeclaration, l as CompactPartSchema, m as compactCodec, n as CompactCdata, o as CompactPackage, p as CompactXmlNodeSchema, r as CompactComment, s as CompactPackageSchema, t as CompactAttrPairs, u as CompactPi, v as fromCompact, y as isCompactXmlNode } from "./compact-f0TfhicN.js";
70
2
  export { CompactAttrPairs, CompactCdata, CompactComment, CompactDeclaration, CompactElement, CompactPackage, CompactPackageSchema, CompactPart, CompactPartSchema, CompactPi, CompactText, CompactXmlNode, CompactXmlNodeSchema, compactCodec, compactPackageCodec, decodeCompactPackage, encodeCompactPackage, fromCompact, isCompactXmlNode, toCompact };
@@ -0,0 +1,6 @@
1
+ import { r as Package } from "./package-L24lkba-.cjs";
2
+ import { ContentDocument } from "document-schema.js";
3
+ //#region src/typed/xlsx/content.d.ts
4
+ declare function readXlsxContent(pkg: Package): ContentDocument;
5
+ //#endregion
6
+ export { readXlsxContent as t };
@@ -0,0 +1,6 @@
1
+ import { r as Package } from "./package-BUojjTXf.js";
2
+ import { ContentDocument } from "document-schema.js";
3
+ //#region src/typed/xlsx/content.d.ts
4
+ declare function readXlsxContent(pkg: Package): ContentDocument;
5
+ //#endregion
6
+ export { readXlsxContent as t };
@@ -0,0 +1,4 @@
1
+ //#region src/xml/entities.d.ts
2
+ declare function encodeXmlText(value: string): string;
3
+ //#endregion
4
+ export { encodeXmlText as t };
@@ -0,0 +1,4 @@
1
+ //#region src/xml/entities.d.ts
2
+ declare function encodeXmlText(value: string): string;
3
+ //#endregion
4
+ export { encodeXmlText as t };
@@ -0,0 +1,6 @@
1
+ import { d as XmlNode, h as XmlText, l as XmlElement } from "./node-CkBWRjNR.js";
2
+ //#region src/xml/fragment.d.ts
3
+ declare function el(tag: string, attrs?: Record<string, string>, children?: XmlNode[]): XmlElement;
4
+ declare function txt(value: string): XmlText;
5
+ //#endregion
6
+ export { txt as n, el as t };
@@ -0,0 +1,6 @@
1
+ import { d as XmlNode, h as XmlText, l as XmlElement } from "./node-CkBWRjNR.cjs";
2
+ //#region src/xml/fragment.d.ts
3
+ declare function el(tag: string, attrs?: Record<string, string>, children?: XmlNode[]): XmlElement;
4
+ declare function txt(value: string): XmlText;
5
+ //#endregion
6
+ export { txt as n, el as t };
@@ -1,5 +1,2 @@
1
- //#region src/image/sniff.d.ts
2
- type ImageFormat = 'png' | 'jpeg';
3
- declare function sniffImageFormat(bytes: Uint8Array<ArrayBuffer>): ImageFormat | undefined;
4
- //#endregion
1
+ import { n as sniffImageFormat, t as ImageFormat } from "../sniff-DjpnUZRp.cjs";
5
2
  export { ImageFormat, sniffImageFormat };
@@ -1,5 +1,2 @@
1
- //#region src/image/sniff.d.ts
2
- type ImageFormat = 'png' | 'jpeg';
3
- declare function sniffImageFormat(bytes: Uint8Array<ArrayBuffer>): ImageFormat | undefined;
4
- //#endregion
1
+ import { n as sniffImageFormat, t as ImageFormat } from "../sniff-DjpnUZRp.js";
5
2
  export { ImageFormat, sniffImageFormat };
package/dist/index.d.cts CHANGED
@@ -1,24 +1,23 @@
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 { decodePackage, encodePackage, packageCodec, xmlCodec } from "./codec.cjs";
4
- import { CompactAttrPairs, CompactPackage, CompactPackageSchema, CompactPart, CompactPartSchema, CompactXmlNode, CompactXmlNodeSchema, compactCodec, compactPackageCodec, decodeCompactPackage, encodeCompactPackage, fromCompact, isCompactXmlNode, toCompact } from "./compact.cjs";
5
- import { ImageFormat, sniffImageFormat } from "./image/sniff.cjs";
6
- import { parsePackage } from "./package-io/read.cjs";
7
- import { serializePackage } from "./package-io/write.cjs";
8
- import { parseXml } from "./xml/parse.cjs";
9
- import { buildXml } from "./xml/build.cjs";
10
- import { el, txt } from "./xml/fragment.cjs";
11
- import { encodeXmlText } from "./xml/entities.cjs";
12
- import { unzipPackage, zipPackage } from "./zip.cjs";
13
- import { base64ToBytes, bytesToBase64 } from "./util/base64.cjs";
14
- import { Relationship, attr, childrenWithTag, decodeEntities, elementsWithTag, resolveRelationships, rootElement, textContent, walk } from "./typed/util.cjs";
15
- import { ColorTransform, applyColorTransforms } from "./typed/shared/color.cjs";
16
- import { DocumentMetadata, DocumentMetadataSchema } from "./typed/shared/metadata.cjs";
17
- import { Comment, CommentSchema, DocxDocument, DocxDocumentSchema, Footnote, FootnoteSchema, readDocx } from "./typed/docx/read.cjs";
18
- import { NumberingDefinition, NumberingDefinitionSchema, NumberingDefinitions, NumberingLevel, NumberingLevelSchema, readNumberingDefinitions } from "./typed/docx/numbering.cjs";
19
- import { PptxDocument, PptxDocumentSchema, readPptx } from "./typed/pptx/read.cjs";
20
- import { DefinedName, DefinedNameSchema, XlsxCell, XlsxCellSchema, XlsxSheet, XlsxSheetSchema, XlsxWorkbook, XlsxWorkbookSchema, readXlsx } from "./typed/xlsx.cjs";
21
- import { readXlsxContent } from "./typed/xlsx/content.cjs";
22
- import { buildXlsxPackage } from "./typed/xlsx/build.cjs";
23
- import { Alignment, AlignmentSchema, Box, BoxSchema, COLOR_BLACK, CONTENT_FORMAT_VERSION, Color, ColorSchema, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentDocument, ContentDocumentSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, Margins, MarginsSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, PageSizeSchema, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, colorToRgbHex, isContentBlock, rgbHexToColor } from "document-schema.js";
3
+ import { t as parsePackage } from "./read-DzmMJPHd.cjs";
4
+ import { t as serializePackage } from "./write-6JmxvaK5.cjs";
5
+ import { t as parseXml } from "./parse-CP5FLZqv.cjs";
6
+ import { t as buildXml } from "./build-XSm3I8LT.cjs";
7
+ import { n as txt, t as el } from "./fragment-B1og_8uA.cjs";
8
+ import { t as encodeXmlText } from "./entities-6DuTszqf.cjs";
9
+ import { n as zipPackage, t as unzipPackage } from "./zip-Ckbv-mtV.cjs";
10
+ import { n as bytesToBase64, t as base64ToBytes } from "./base64--HuymRl_.cjs";
11
+ import { a as elementsWithTag, c as textContent, i as decodeEntities, l as walk, n as attr, o as resolveRelationships, r as childrenWithTag, s as rootElement, t as Relationship } from "./util-M3JJlDhF.cjs";
12
+ import { _ as encodeCompactPackage, b as toCompact, c as CompactPart, f as CompactXmlNode, g as decodeCompactPackage, h as compactPackageCodec, l as CompactPartSchema, m as compactCodec, o as CompactPackage, p as CompactXmlNodeSchema, s as CompactPackageSchema, t as CompactAttrPairs, v as fromCompact, y as isCompactXmlNode } from "./compact-B1qg9oex.cjs";
13
+ import { n as applyColorTransforms, t as ColorTransform } from "./color-fFIKAs-Y.cjs";
14
+ import { n as DocumentMetadataSchema, t as DocumentMetadata } from "./metadata-D6o-kLpg.cjs";
15
+ import { n as sniffImageFormat, t as ImageFormat } from "./sniff-DjpnUZRp.cjs";
16
+ import { a as Footnote, i as DocxDocumentSchema, n as CommentSchema, o as FootnoteSchema, r as DocxDocument, s as readDocx, t as Comment } from "./read-D_CpruL_.cjs";
17
+ import { a as NumberingLevelSchema, i as NumberingLevel, n as NumberingDefinitionSchema, o as readNumberingDefinitions, r as NumberingDefinitions, t as NumberingDefinition } from "./numbering-C53LT-Jx.cjs";
18
+ import { n as PptxDocumentSchema, r as readPptx, t as PptxDocument } from "./read-DymSS-X4.cjs";
19
+ import { a as XlsxSheet, c as XlsxWorkbookSchema, i as XlsxCellSchema, l as readXlsx, n as DefinedNameSchema, o as XlsxSheetSchema, r as XlsxCell, s as XlsxWorkbook, t as DefinedName } from "./xlsx-B97t4YE-.cjs";
20
+ import { t as readXlsxContent } from "./content-UlQ-Nhgi.cjs";
21
+ import { t as buildXlsxPackage } from "./build-CBL9scQK.cjs";
22
+ import { $ as ContentSlide, A as ContentParagraphSchema, B as ContentSheetColumn, C as ContentImageBlock, D as ContentPageBreak, E as ContentListMembershipSchema, F as ContentShape, G as ContentSheetPrintRangeSchema, H as ContentSheetImage, I as ContentShapeSchema, J as ContentSheetRepeatRange, K as ContentSheetPrintSettings, L as ContentSheet, M as ContentRunSchema, N as ContentSection, O as ContentPageBreakSchema, P as ContentSectionSchema, Q as ContentSheetSchema, R as ContentSheetCell, S as ContentDocumentSchema, T as ContentListMembership, U as ContentSheetImageSchema, V as ContentSheetColumnSchema, W as ContentSheetPrintRange, X as ContentSheetRow, Y as ContentSheetRepeatRangeSchema, Z as ContentSheetRowSchema, _ as ContentCellBorders, _t as colorToRgbHex, a as Alignment, at as ContentTableCellSchema, b as ContentCellValueSchema, c as BoxSchema, ct as ContentTableSchema, d as Color, dt as PAGE_SIZE_A4, et as ContentSlideSchema, f as ColorSchema, ft as PAGE_SIZE_LETTER, g as ContentBorderSchema, gt as SLIDE_SIZE_WIDESCREEN, h as ContentBorder, ht as SLIDE_SIZE_STANDARD, i as xmlCodec, it as ContentTableCell, j as ContentRun, k as ContentParagraph, l as COLOR_BLACK, lt as Margins, m as ContentBlockSchema, mt as PageSizeSchema, n as encodePackage, nt as ContentStrokeStyleSchema, o as AlignmentSchema, ot as ContentTableRow, p as ContentBlock, pt as PageSize, q as ContentSheetPrintSettingsSchema, r as packageCodec, rt as ContentTable, s as Box, st as ContentTableRowSchema, t as decodePackage, tt as ContentStrokeStyle, u as CONTENT_FORMAT_VERSION, ut as MarginsSchema, v as ContentCellBordersSchema, vt as isContentBlock, w as ContentImageBlockSchema, x as ContentDocument, y as ContentCellValue, yt as rgbHexToColor, z as ContentSheetCellSchema } from "./codec-nIFHuTm-.cjs";
24
23
  export { type Alignment, AlignmentSchema, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, BoxSchema, COLOR_BLACK, CONTENT_FORMAT_VERSION, type Color, ColorSchema, type ColorTransform, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type ContentBlock, ContentBlockSchema, type ContentBorder, ContentBorderSchema, type ContentCellBorders, ContentCellBordersSchema, type ContentCellValue, ContentCellValueSchema, 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 DocumentMetadata, DocumentMetadataSchema, type DocxDocument, DocxDocumentSchema, type Footnote, FootnoteSchema, type ImageFormat, type Margins, MarginsSchema, type NumberingDefinition, NumberingDefinitionSchema, type NumberingDefinitions, type NumberingLevel, NumberingLevelSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, PackageSchema, type PageSize, PageSizeSchema, type Part, PartSchema, type PptxDocument, PptxDocumentSchema, type Relationship, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, 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, attr, base64ToBytes, buildXlsxPackage, buildXml, bytesToBase64, childrenWithTag, colorToRgbHex, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, el, elementsWithTag, encodeCompactPackage, encodePackage, encodeXmlText, fromCompact, isCompactXmlNode, isContentBlock, isXmlNode, packageCodec, parsePackage, parseXml, readDocx, readNumberingDefinitions, readPptx, readXlsx, readXlsxContent, resolveRelationships, rgbHexToColor, rootElement, serializePackage, sniffImageFormat, textContent, toCompact, txt, unzipPackage, walk, xmlCodec, zipPackage };
package/dist/index.d.ts CHANGED
@@ -1,24 +1,23 @@
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 { decodePackage, encodePackage, packageCodec, xmlCodec } from "./codec.js";
4
- import { CompactAttrPairs, CompactPackage, CompactPackageSchema, CompactPart, CompactPartSchema, CompactXmlNode, CompactXmlNodeSchema, compactCodec, compactPackageCodec, decodeCompactPackage, encodeCompactPackage, fromCompact, isCompactXmlNode, toCompact } from "./compact.js";
5
- import { ImageFormat, sniffImageFormat } from "./image/sniff.js";
6
- import { parsePackage } from "./package-io/read.js";
7
- import { serializePackage } from "./package-io/write.js";
8
- import { parseXml } from "./xml/parse.js";
9
- import { buildXml } from "./xml/build.js";
10
- import { el, txt } from "./xml/fragment.js";
11
- import { encodeXmlText } from "./xml/entities.js";
12
- import { unzipPackage, zipPackage } from "./zip.js";
13
- import { base64ToBytes, bytesToBase64 } from "./util/base64.js";
14
- import { Relationship, attr, childrenWithTag, decodeEntities, elementsWithTag, resolveRelationships, rootElement, textContent, walk } from "./typed/util.js";
15
- import { ColorTransform, applyColorTransforms } from "./typed/shared/color.js";
16
- import { DocumentMetadata, DocumentMetadataSchema } from "./typed/shared/metadata.js";
17
- import { Comment, CommentSchema, DocxDocument, DocxDocumentSchema, Footnote, FootnoteSchema, readDocx } from "./typed/docx/read.js";
18
- import { NumberingDefinition, NumberingDefinitionSchema, NumberingDefinitions, NumberingLevel, NumberingLevelSchema, readNumberingDefinitions } from "./typed/docx/numbering.js";
19
- import { PptxDocument, PptxDocumentSchema, readPptx } from "./typed/pptx/read.js";
20
- import { DefinedName, DefinedNameSchema, XlsxCell, XlsxCellSchema, XlsxSheet, XlsxSheetSchema, XlsxWorkbook, XlsxWorkbookSchema, readXlsx } from "./typed/xlsx.js";
21
- import { readXlsxContent } from "./typed/xlsx/content.js";
22
- import { buildXlsxPackage } from "./typed/xlsx/build.js";
23
- import { Alignment, AlignmentSchema, Box, BoxSchema, COLOR_BLACK, CONTENT_FORMAT_VERSION, Color, ColorSchema, ContentBlock, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentDocument, ContentDocumentSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, Margins, MarginsSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, PageSizeSchema, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, colorToRgbHex, isContentBlock, rgbHexToColor } from "document-schema.js";
3
+ import { t as parsePackage } from "./read-CMDEXqGw.js";
4
+ import { t as serializePackage } from "./write-CT-EgVT7.js";
5
+ import { t as parseXml } from "./parse-A8_8sdpX.js";
6
+ import { t as buildXml } from "./build-Z1KRkSEB.js";
7
+ import { n as txt, t as el } from "./fragment-B1ZV7T5Z.js";
8
+ import { t as encodeXmlText } from "./entities-6DuTszqf.js";
9
+ import { n as zipPackage, t as unzipPackage } from "./zip-Ckbv-mtV.js";
10
+ import { n as bytesToBase64, t as base64ToBytes } from "./base64--HuymRl_.js";
11
+ import { a as elementsWithTag, c as textContent, i as decodeEntities, l as walk, n as attr, o as resolveRelationships, r as childrenWithTag, s as rootElement, t as Relationship } from "./util-DFe4UbvU.js";
12
+ import { _ as encodeCompactPackage, b as toCompact, c as CompactPart, f as CompactXmlNode, g as decodeCompactPackage, h as compactPackageCodec, l as CompactPartSchema, m as compactCodec, o as CompactPackage, p as CompactXmlNodeSchema, s as CompactPackageSchema, t as CompactAttrPairs, v as fromCompact, y as isCompactXmlNode } from "./compact-f0TfhicN.js";
13
+ import { n as applyColorTransforms, t as ColorTransform } from "./color-fFIKAs-Y.js";
14
+ import { n as DocumentMetadataSchema, t as DocumentMetadata } from "./metadata-o_WH9V_I.js";
15
+ import { n as sniffImageFormat, t as ImageFormat } from "./sniff-DjpnUZRp.js";
16
+ import { a as Footnote, i as DocxDocumentSchema, n as CommentSchema, o as FootnoteSchema, r as DocxDocument, s as readDocx, t as Comment } from "./read-B2-FFhqI.js";
17
+ import { a as NumberingLevelSchema, i as NumberingLevel, n as NumberingDefinitionSchema, o as readNumberingDefinitions, r as NumberingDefinitions, t as NumberingDefinition } from "./numbering-D0YfuiOO.js";
18
+ import { n as PptxDocumentSchema, r as readPptx, t as PptxDocument } from "./read-BLMpCzzG.js";
19
+ import { a as XlsxSheet, c as XlsxWorkbookSchema, i as XlsxCellSchema, l as readXlsx, n as DefinedNameSchema, o as XlsxSheetSchema, r as XlsxCell, s as XlsxWorkbook, t as DefinedName } from "./xlsx-BxKODiLX.js";
20
+ import { t as readXlsxContent } from "./content-t6ZfmfQM.js";
21
+ import { t as buildXlsxPackage } from "./build-C0gS5QeG.js";
22
+ import { $ as ContentSlide, A as ContentParagraphSchema, B as ContentSheetColumn, C as ContentImageBlock, D as ContentPageBreak, E as ContentListMembershipSchema, F as ContentShape, G as ContentSheetPrintRangeSchema, H as ContentSheetImage, I as ContentShapeSchema, J as ContentSheetRepeatRange, K as ContentSheetPrintSettings, L as ContentSheet, M as ContentRunSchema, N as ContentSection, O as ContentPageBreakSchema, P as ContentSectionSchema, Q as ContentSheetSchema, R as ContentSheetCell, S as ContentDocumentSchema, T as ContentListMembership, U as ContentSheetImageSchema, V as ContentSheetColumnSchema, W as ContentSheetPrintRange, X as ContentSheetRow, Y as ContentSheetRepeatRangeSchema, Z as ContentSheetRowSchema, _ as ContentCellBorders, _t as colorToRgbHex, a as Alignment, at as ContentTableCellSchema, b as ContentCellValueSchema, c as BoxSchema, ct as ContentTableSchema, d as Color, dt as PAGE_SIZE_A4, et as ContentSlideSchema, f as ColorSchema, ft as PAGE_SIZE_LETTER, g as ContentBorderSchema, gt as SLIDE_SIZE_WIDESCREEN, h as ContentBorder, ht as SLIDE_SIZE_STANDARD, i as xmlCodec, it as ContentTableCell, j as ContentRun, k as ContentParagraph, l as COLOR_BLACK, lt as Margins, m as ContentBlockSchema, mt as PageSizeSchema, n as encodePackage, nt as ContentStrokeStyleSchema, o as AlignmentSchema, ot as ContentTableRow, p as ContentBlock, pt as PageSize, q as ContentSheetPrintSettingsSchema, r as packageCodec, rt as ContentTable, s as Box, st as ContentTableRowSchema, t as decodePackage, tt as ContentStrokeStyle, u as CONTENT_FORMAT_VERSION, ut as MarginsSchema, v as ContentCellBordersSchema, vt as isContentBlock, w as ContentImageBlockSchema, x as ContentDocument, y as ContentCellValue, yt as rgbHexToColor, z as ContentSheetCellSchema } from "./codec-B52c8v4h.js";
24
23
  export { type Alignment, AlignmentSchema, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, BoxSchema, COLOR_BLACK, CONTENT_FORMAT_VERSION, type Color, ColorSchema, type ColorTransform, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type ContentBlock, ContentBlockSchema, type ContentBorder, ContentBorderSchema, type ContentCellBorders, ContentCellBordersSchema, type ContentCellValue, ContentCellValueSchema, 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 DocumentMetadata, DocumentMetadataSchema, type DocxDocument, DocxDocumentSchema, type Footnote, FootnoteSchema, type ImageFormat, type Margins, MarginsSchema, type NumberingDefinition, NumberingDefinitionSchema, type NumberingDefinitions, type NumberingLevel, NumberingLevelSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, PackageSchema, type PageSize, PageSizeSchema, type Part, PartSchema, type PptxDocument, PptxDocumentSchema, type Relationship, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, 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, attr, base64ToBytes, buildXlsxPackage, buildXml, bytesToBase64, childrenWithTag, colorToRgbHex, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, el, elementsWithTag, encodeCompactPackage, encodePackage, encodeXmlText, fromCompact, isCompactXmlNode, isContentBlock, isXmlNode, packageCodec, parsePackage, parseXml, readDocx, readNumberingDefinitions, readPptx, readXlsx, readXlsxContent, resolveRelationships, rgbHexToColor, rootElement, serializePackage, sniffImageFormat, textContent, toCompact, txt, unzipPackage, walk, xmlCodec, zipPackage };
@@ -0,0 +1,16 @@
1
+ import { r as Package } from "./package-L24lkba-.cjs";
2
+ import { z } from "zod";
3
+ //#region src/typed/shared/metadata.d.ts
4
+ declare const DocumentMetadataSchema: z.ZodObject<{
5
+ title: z.ZodOptional<z.ZodString>;
6
+ author: z.ZodOptional<z.ZodString>;
7
+ subject: z.ZodOptional<z.ZodString>;
8
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
9
+ creator: z.ZodOptional<z.ZodString>;
10
+ createdIso: z.ZodOptional<z.ZodString>;
11
+ modifiedIso: z.ZodOptional<z.ZodString>;
12
+ }, z.core.$strip>;
13
+ type DocumentMetadata = z.infer<typeof DocumentMetadataSchema>;
14
+ declare function readCoreProperties(pkg: Package): DocumentMetadata;
15
+ //#endregion
16
+ export { DocumentMetadataSchema as n, readCoreProperties as r, DocumentMetadata as t };
@@ -0,0 +1,16 @@
1
+ import { r as Package } from "./package-BUojjTXf.js";
2
+ import { z } from "zod";
3
+ //#region src/typed/shared/metadata.d.ts
4
+ declare const DocumentMetadataSchema: z.ZodObject<{
5
+ title: z.ZodOptional<z.ZodString>;
6
+ author: z.ZodOptional<z.ZodString>;
7
+ subject: z.ZodOptional<z.ZodString>;
8
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
9
+ creator: z.ZodOptional<z.ZodString>;
10
+ createdIso: z.ZodOptional<z.ZodString>;
11
+ modifiedIso: z.ZodOptional<z.ZodString>;
12
+ }, z.core.$strip>;
13
+ type DocumentMetadata = z.infer<typeof DocumentMetadataSchema>;
14
+ declare function readCoreProperties(pkg: Package): DocumentMetadata;
15
+ //#endregion
16
+ export { DocumentMetadataSchema as n, readCoreProperties as r, DocumentMetadata as t };
@@ -0,0 +1,23 @@
1
+ import { r as Package } from "./package-L24lkba-.cjs";
2
+ import { z } from "zod";
3
+ //#region src/typed/docx/numbering.d.ts
4
+ declare const NumberingLevelSchema: z.ZodObject<{
5
+ format: z.ZodString;
6
+ text: z.ZodString;
7
+ startAt: z.ZodNumber;
8
+ restart: z.ZodOptional<z.ZodNumber>;
9
+ }, z.core.$strip>;
10
+ type NumberingLevel = z.infer<typeof NumberingLevelSchema>;
11
+ declare const NumberingDefinitionSchema: z.ZodObject<{
12
+ levels: z.ZodRecord<z.ZodString, z.ZodObject<{
13
+ format: z.ZodString;
14
+ text: z.ZodString;
15
+ startAt: z.ZodNumber;
16
+ restart: z.ZodOptional<z.ZodNumber>;
17
+ }, z.core.$strip>>;
18
+ }, z.core.$strip>;
19
+ type NumberingDefinition = z.infer<typeof NumberingDefinitionSchema>;
20
+ type NumberingDefinitions = Readonly<Record<string, NumberingDefinition>>;
21
+ declare function readNumberingDefinitions(pkg: Package): NumberingDefinitions;
22
+ //#endregion
23
+ export { NumberingLevelSchema as a, NumberingLevel as i, NumberingDefinitionSchema as n, readNumberingDefinitions as o, NumberingDefinitions as r, NumberingDefinition as t };
@@ -0,0 +1,23 @@
1
+ import { r as Package } from "./package-BUojjTXf.js";
2
+ import { z } from "zod";
3
+ //#region src/typed/docx/numbering.d.ts
4
+ declare const NumberingLevelSchema: z.ZodObject<{
5
+ format: z.ZodString;
6
+ text: z.ZodString;
7
+ startAt: z.ZodNumber;
8
+ restart: z.ZodOptional<z.ZodNumber>;
9
+ }, z.core.$strip>;
10
+ type NumberingLevel = z.infer<typeof NumberingLevelSchema>;
11
+ declare const NumberingDefinitionSchema: z.ZodObject<{
12
+ levels: z.ZodRecord<z.ZodString, z.ZodObject<{
13
+ format: z.ZodString;
14
+ text: z.ZodString;
15
+ startAt: z.ZodNumber;
16
+ restart: z.ZodOptional<z.ZodNumber>;
17
+ }, z.core.$strip>>;
18
+ }, z.core.$strip>;
19
+ type NumberingDefinition = z.infer<typeof NumberingDefinitionSchema>;
20
+ type NumberingDefinitions = Readonly<Record<string, NumberingDefinition>>;
21
+ declare function readNumberingDefinitions(pkg: Package): NumberingDefinitions;
22
+ //#endregion
23
+ export { NumberingLevelSchema as a, NumberingLevel as i, NumberingDefinitionSchema as n, readNumberingDefinitions as o, NumberingDefinitions as r, NumberingDefinition as t };
@@ -1,5 +1,2 @@
1
- import { r as Package } from "../package-L24lkba-.cjs";
2
- //#region src/package-io/read.d.ts
3
- declare function parsePackage(bytes: Uint8Array<ArrayBuffer>): Package;
4
- //#endregion
1
+ import { t as parsePackage } from "../read-DzmMJPHd.cjs";
5
2
  export { parsePackage };
@@ -1,5 +1,2 @@
1
- import { r as Package } from "../package-BUojjTXf.js";
2
- //#region src/package-io/read.d.ts
3
- declare function parsePackage(bytes: Uint8Array<ArrayBuffer>): Package;
4
- //#endregion
1
+ import { t as parsePackage } from "../read-CMDEXqGw.js";
5
2
  export { parsePackage };
@@ -1,5 +1,2 @@
1
- import { r as Package } from "../package-L24lkba-.cjs";
2
- //#region src/package-io/write.d.ts
3
- declare function serializePackage(pkg: Package): Uint8Array<ArrayBuffer>;
4
- //#endregion
1
+ import { t as serializePackage } from "../write-6JmxvaK5.cjs";
5
2
  export { serializePackage };
@@ -1,5 +1,2 @@
1
- import { r as Package } from "../package-BUojjTXf.js";
2
- //#region src/package-io/write.d.ts
3
- declare function serializePackage(pkg: Package): Uint8Array<ArrayBuffer>;
4
- //#endregion
1
+ import { t as serializePackage } from "../write-CT-EgVT7.js";
5
2
  export { serializePackage };
@@ -0,0 +1,5 @@
1
+ import { d as XmlNode } from "./node-CkBWRjNR.js";
2
+ //#region src/xml/parse.d.ts
3
+ declare function parseXml(xml: string): XmlNode[];
4
+ //#endregion
5
+ export { parseXml as t };
@@ -0,0 +1,5 @@
1
+ import { d as XmlNode } from "./node-CkBWRjNR.cjs";
2
+ //#region src/xml/parse.d.ts
3
+ declare function parseXml(xml: string): XmlNode[];
4
+ //#endregion
5
+ export { parseXml as t };
@@ -0,0 +1,60 @@
1
+ import { r as Package } from "./package-BUojjTXf.js";
2
+ import { z } from "zod";
3
+ import { ContentBlock } from "document-schema.js";
4
+ //#region src/typed/docx/read.d.ts
5
+ declare const CommentSchema: z.ZodObject<{
6
+ author: z.ZodOptional<z.ZodString>;
7
+ text: z.ZodString;
8
+ }, z.core.$strip>;
9
+ type Comment = z.infer<typeof CommentSchema>;
10
+ declare const FootnoteSchema: z.ZodObject<{
11
+ type: z.ZodOptional<z.ZodString>;
12
+ text: z.ZodString;
13
+ }, z.core.$strip>;
14
+ type Footnote = z.infer<typeof FootnoteSchema>;
15
+ declare const DocxDocumentSchema: z.ZodObject<{
16
+ metadata: z.ZodObject<{
17
+ title: z.ZodOptional<z.ZodString>;
18
+ author: z.ZodOptional<z.ZodString>;
19
+ subject: z.ZodOptional<z.ZodString>;
20
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
21
+ creator: z.ZodOptional<z.ZodString>;
22
+ createdIso: z.ZodOptional<z.ZodString>;
23
+ modifiedIso: z.ZodOptional<z.ZodString>;
24
+ }, z.core.$strip>;
25
+ sections: z.ZodArray<z.ZodObject<{
26
+ pageSize: z.ZodObject<{
27
+ widthPt: z.ZodNumber;
28
+ heightPt: z.ZodNumber;
29
+ }, z.core.$strip>;
30
+ margins: z.ZodObject<{
31
+ topPt: z.ZodNumber;
32
+ rightPt: z.ZodNumber;
33
+ bottomPt: z.ZodNumber;
34
+ leftPt: z.ZodNumber;
35
+ }, z.core.$strip>;
36
+ blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
37
+ }, z.core.$strip>>;
38
+ comments: z.ZodArray<z.ZodObject<{
39
+ author: z.ZodOptional<z.ZodString>;
40
+ text: z.ZodString;
41
+ }, z.core.$strip>>;
42
+ footnotes: z.ZodArray<z.ZodObject<{
43
+ type: z.ZodOptional<z.ZodString>;
44
+ text: z.ZodString;
45
+ }, z.core.$strip>>;
46
+ headers: z.ZodArray<z.ZodString>;
47
+ footers: z.ZodArray<z.ZodString>;
48
+ numbering: z.ZodRecord<z.ZodString, z.ZodObject<{
49
+ levels: z.ZodRecord<z.ZodString, z.ZodObject<{
50
+ format: z.ZodString;
51
+ text: z.ZodString;
52
+ startAt: z.ZodNumber;
53
+ restart: z.ZodOptional<z.ZodNumber>;
54
+ }, z.core.$strip>>;
55
+ }, z.core.$strip>>;
56
+ }, z.core.$strip>;
57
+ type DocxDocument = z.infer<typeof DocxDocumentSchema>;
58
+ declare function readDocx(pkg: Package): DocxDocument;
59
+ //#endregion
60
+ export { Footnote as a, DocxDocumentSchema as i, CommentSchema as n, FootnoteSchema as o, DocxDocument as r, readDocx as s, Comment as t };
@@ -0,0 +1,45 @@
1
+ import { r as Package } from "./package-BUojjTXf.js";
2
+ import { z } from "zod";
3
+ import { ContentBlock } from "document-schema.js";
4
+ //#region src/typed/pptx/read.d.ts
5
+ declare const PptxDocumentSchema: z.ZodObject<{
6
+ metadata: z.ZodObject<{
7
+ title: z.ZodOptional<z.ZodString>;
8
+ author: z.ZodOptional<z.ZodString>;
9
+ subject: z.ZodOptional<z.ZodString>;
10
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
11
+ creator: z.ZodOptional<z.ZodString>;
12
+ createdIso: z.ZodOptional<z.ZodString>;
13
+ modifiedIso: z.ZodOptional<z.ZodString>;
14
+ }, z.core.$strip>;
15
+ slides: z.ZodArray<z.ZodObject<{
16
+ size: z.ZodObject<{
17
+ widthPt: z.ZodNumber;
18
+ heightPt: z.ZodNumber;
19
+ }, z.core.$strip>;
20
+ shapes: z.ZodArray<z.ZodObject<{
21
+ name: z.ZodOptional<z.ZodString>;
22
+ frame: z.ZodObject<{
23
+ xPt: z.ZodNumber;
24
+ yPt: z.ZodNumber;
25
+ widthPt: z.ZodNumber;
26
+ heightPt: z.ZodNumber;
27
+ }, z.core.$strip>;
28
+ rotationDeg: z.ZodOptional<z.ZodNumber>;
29
+ insetLeftPt: z.ZodNumber;
30
+ insetTopPt: z.ZodNumber;
31
+ insetRightPt: z.ZodNumber;
32
+ insetBottomPt: z.ZodNumber;
33
+ fontScale: z.ZodOptional<z.ZodNumber>;
34
+ lineSpacingReduction: z.ZodOptional<z.ZodNumber>;
35
+ paintOrder: z.ZodOptional<z.ZodNumber>;
36
+ sourcePath: z.ZodOptional<z.ZodString>;
37
+ blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
38
+ }, z.core.$strip>>;
39
+ notes: z.ZodString;
40
+ }, z.core.$strip>>;
41
+ }, z.core.$strip>;
42
+ type PptxDocument = z.infer<typeof PptxDocumentSchema>;
43
+ declare function readPptx(pkg: Package): PptxDocument;
44
+ //#endregion
45
+ export { PptxDocumentSchema as n, readPptx as r, PptxDocument as t };
@@ -0,0 +1,5 @@
1
+ import { r as Package } from "./package-BUojjTXf.js";
2
+ //#region src/package-io/read.d.ts
3
+ declare function parsePackage(bytes: Uint8Array<ArrayBuffer>): Package;
4
+ //#endregion
5
+ export { parsePackage as t };
@@ -0,0 +1,60 @@
1
+ import { r as Package } from "./package-L24lkba-.cjs";
2
+ import { z } from "zod";
3
+ import { ContentBlock } from "document-schema.js";
4
+ //#region src/typed/docx/read.d.ts
5
+ declare const CommentSchema: z.ZodObject<{
6
+ author: z.ZodOptional<z.ZodString>;
7
+ text: z.ZodString;
8
+ }, z.core.$strip>;
9
+ type Comment = z.infer<typeof CommentSchema>;
10
+ declare const FootnoteSchema: z.ZodObject<{
11
+ type: z.ZodOptional<z.ZodString>;
12
+ text: z.ZodString;
13
+ }, z.core.$strip>;
14
+ type Footnote = z.infer<typeof FootnoteSchema>;
15
+ declare const DocxDocumentSchema: z.ZodObject<{
16
+ metadata: z.ZodObject<{
17
+ title: z.ZodOptional<z.ZodString>;
18
+ author: z.ZodOptional<z.ZodString>;
19
+ subject: z.ZodOptional<z.ZodString>;
20
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
21
+ creator: z.ZodOptional<z.ZodString>;
22
+ createdIso: z.ZodOptional<z.ZodString>;
23
+ modifiedIso: z.ZodOptional<z.ZodString>;
24
+ }, z.core.$strip>;
25
+ sections: z.ZodArray<z.ZodObject<{
26
+ pageSize: z.ZodObject<{
27
+ widthPt: z.ZodNumber;
28
+ heightPt: z.ZodNumber;
29
+ }, z.core.$strip>;
30
+ margins: z.ZodObject<{
31
+ topPt: z.ZodNumber;
32
+ rightPt: z.ZodNumber;
33
+ bottomPt: z.ZodNumber;
34
+ leftPt: z.ZodNumber;
35
+ }, z.core.$strip>;
36
+ blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
37
+ }, z.core.$strip>>;
38
+ comments: z.ZodArray<z.ZodObject<{
39
+ author: z.ZodOptional<z.ZodString>;
40
+ text: z.ZodString;
41
+ }, z.core.$strip>>;
42
+ footnotes: z.ZodArray<z.ZodObject<{
43
+ type: z.ZodOptional<z.ZodString>;
44
+ text: z.ZodString;
45
+ }, z.core.$strip>>;
46
+ headers: z.ZodArray<z.ZodString>;
47
+ footers: z.ZodArray<z.ZodString>;
48
+ numbering: z.ZodRecord<z.ZodString, z.ZodObject<{
49
+ levels: z.ZodRecord<z.ZodString, z.ZodObject<{
50
+ format: z.ZodString;
51
+ text: z.ZodString;
52
+ startAt: z.ZodNumber;
53
+ restart: z.ZodOptional<z.ZodNumber>;
54
+ }, z.core.$strip>>;
55
+ }, z.core.$strip>>;
56
+ }, z.core.$strip>;
57
+ type DocxDocument = z.infer<typeof DocxDocumentSchema>;
58
+ declare function readDocx(pkg: Package): DocxDocument;
59
+ //#endregion
60
+ export { Footnote as a, DocxDocumentSchema as i, CommentSchema as n, FootnoteSchema as o, DocxDocument as r, readDocx as s, Comment as t };
@@ -0,0 +1,45 @@
1
+ import { r as Package } from "./package-L24lkba-.cjs";
2
+ import { z } from "zod";
3
+ import { ContentBlock } from "document-schema.js";
4
+ //#region src/typed/pptx/read.d.ts
5
+ declare const PptxDocumentSchema: z.ZodObject<{
6
+ metadata: z.ZodObject<{
7
+ title: z.ZodOptional<z.ZodString>;
8
+ author: z.ZodOptional<z.ZodString>;
9
+ subject: z.ZodOptional<z.ZodString>;
10
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
11
+ creator: z.ZodOptional<z.ZodString>;
12
+ createdIso: z.ZodOptional<z.ZodString>;
13
+ modifiedIso: z.ZodOptional<z.ZodString>;
14
+ }, z.core.$strip>;
15
+ slides: z.ZodArray<z.ZodObject<{
16
+ size: z.ZodObject<{
17
+ widthPt: z.ZodNumber;
18
+ heightPt: z.ZodNumber;
19
+ }, z.core.$strip>;
20
+ shapes: z.ZodArray<z.ZodObject<{
21
+ name: z.ZodOptional<z.ZodString>;
22
+ frame: z.ZodObject<{
23
+ xPt: z.ZodNumber;
24
+ yPt: z.ZodNumber;
25
+ widthPt: z.ZodNumber;
26
+ heightPt: z.ZodNumber;
27
+ }, z.core.$strip>;
28
+ rotationDeg: z.ZodOptional<z.ZodNumber>;
29
+ insetLeftPt: z.ZodNumber;
30
+ insetTopPt: z.ZodNumber;
31
+ insetRightPt: z.ZodNumber;
32
+ insetBottomPt: z.ZodNumber;
33
+ fontScale: z.ZodOptional<z.ZodNumber>;
34
+ lineSpacingReduction: z.ZodOptional<z.ZodNumber>;
35
+ paintOrder: z.ZodOptional<z.ZodNumber>;
36
+ sourcePath: z.ZodOptional<z.ZodString>;
37
+ blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
38
+ }, z.core.$strip>>;
39
+ notes: z.ZodString;
40
+ }, z.core.$strip>>;
41
+ }, z.core.$strip>;
42
+ type PptxDocument = z.infer<typeof PptxDocumentSchema>;
43
+ declare function readPptx(pkg: Package): PptxDocument;
44
+ //#endregion
45
+ export { PptxDocumentSchema as n, readPptx as r, PptxDocument as t };
@@ -0,0 +1,5 @@
1
+ import { r as Package } from "./package-L24lkba-.cjs";
2
+ //#region src/package-io/read.d.ts
3
+ declare function parsePackage(bytes: Uint8Array<ArrayBuffer>): Package;
4
+ //#endregion
5
+ export { parsePackage as t };
@@ -0,0 +1,5 @@
1
+ //#region src/image/sniff.d.ts
2
+ type ImageFormat = 'png' | 'jpeg';
3
+ declare function sniffImageFormat(bytes: Uint8Array<ArrayBuffer>): ImageFormat | undefined;
4
+ //#endregion
5
+ export { sniffImageFormat as n, ImageFormat as t };