ooxml.js 2.0.3 → 2.0.4

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/dist/index.cjs CHANGED
@@ -2,6 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  let zod = require("zod");
3
3
  let fast_xml_parser = require("fast-xml-parser");
4
4
  let fflate = require("fflate");
5
+ let document_content_model = require("document-content-model");
5
6
  //#region src/model/node.ts
6
7
  const AttributeSchema = zod.z.object({
7
8
  name: zod.z.string(),
@@ -28,14 +29,14 @@ const XmlPiSchema = zod.z.object({
28
29
  target: zod.z.string(),
29
30
  content: zod.z.string()
30
31
  });
31
- function isRecord$2(value) {
32
+ function isRecord$1(value) {
32
33
  return typeof value === "object" && value !== null && !Array.isArray(value);
33
34
  }
34
35
  function isAttribute(value) {
35
- return isRecord$2(value) && typeof value.name === "string" && typeof value.value === "string";
36
+ return isRecord$1(value) && typeof value.name === "string" && typeof value.value === "string";
36
37
  }
37
38
  function isXmlNode(value) {
38
- if (!isRecord$2(value)) return false;
39
+ if (!isRecord$1(value)) return false;
39
40
  const t = value.type;
40
41
  if (t === "text" || t === "cdata" || t === "comment") return typeof value.value === "string";
41
42
  if (t === "declaration") return Array.isArray(value.attributes) && value.attributes.every(isAttribute);
@@ -130,7 +131,7 @@ const PARSER = new fast_xml_parser.XMLParser({
130
131
  function parseXml(xml) {
131
132
  return parseNodes(PARSER.parse(xml));
132
133
  }
133
- function isRecord$1(value) {
134
+ function isRecord(value) {
134
135
  return typeof value === "object" && value !== null && !Array.isArray(value);
135
136
  }
136
137
  function isUnknownArray$1(value) {
@@ -145,7 +146,7 @@ function parseNodes(raw) {
145
146
  return raw.map(parseNode);
146
147
  }
147
148
  function parseNode(raw) {
148
- if (!isRecord$1(raw)) throw new Error("fast-xml-parser node was not an object");
149
+ if (!isRecord(raw)) throw new Error("fast-xml-parser node was not an object");
149
150
  let tagKey;
150
151
  for (const key of Object.keys(raw)) if (key !== ":@") {
151
152
  if (tagKey !== void 0) throw new Error("XML node had multiple tag keys");
@@ -183,7 +184,7 @@ function parseNode(raw) {
183
184
  }
184
185
  function parseAttributes(raw) {
185
186
  if (raw === void 0) return [];
186
- if (!isRecord$1(raw)) throw new Error("XML attributes were not an object");
187
+ if (!isRecord(raw)) throw new Error("XML attributes were not an object");
187
188
  const attrs = [];
188
189
  for (const key of Object.keys(raw)) {
189
190
  if (!key.startsWith("@_")) throw new Error(`unexpected attribute key without @_ prefix: ${key}`);
@@ -197,7 +198,7 @@ function parseAttributes(raw) {
197
198
  function scalarText(raw) {
198
199
  if (!isUnknownArray$1(raw) || raw.length === 0) throw new Error("expected a scalar-text wrapper array");
199
200
  const first = raw[0];
200
- if (!isRecord$1(first)) throw new Error("scalar-text wrapper was not an object");
201
+ if (!isRecord(first)) throw new Error("scalar-text wrapper was not an object");
201
202
  return asString(first["#text"]);
202
203
  }
203
204
  //#endregion
@@ -534,73 +535,7 @@ function encodeCompactPackage(cpkg) {
534
535
  return zod.z.encode(compactPackageCodec, cpkg);
535
536
  }
536
537
  //#endregion
537
- //#region src/typed/shared/geometry.ts
538
- const BoxSchema = zod.z.object({
539
- xPt: zod.z.number(),
540
- yPt: zod.z.number(),
541
- widthPt: zod.z.number().nonnegative(),
542
- heightPt: zod.z.number().nonnegative()
543
- });
544
- const PageSizeSchema = zod.z.object({
545
- widthPt: zod.z.number().positive(),
546
- heightPt: zod.z.number().positive()
547
- });
548
- const MarginsSchema = zod.z.object({
549
- topPt: zod.z.number().nonnegative(),
550
- rightPt: zod.z.number().nonnegative(),
551
- bottomPt: zod.z.number().nonnegative(),
552
- leftPt: zod.z.number().nonnegative()
553
- });
554
- const PAGE_SIZE_LETTER = {
555
- widthPt: 612,
556
- heightPt: 792
557
- };
558
- const PAGE_SIZE_A4 = {
559
- widthPt: 595.28,
560
- heightPt: 841.89
561
- };
562
- const SLIDE_SIZE_WIDESCREEN = {
563
- widthPt: 960,
564
- heightPt: 540
565
- };
566
- const SLIDE_SIZE_STANDARD = {
567
- widthPt: 720,
568
- heightPt: 540
569
- };
570
- //#endregion
571
538
  //#region src/typed/shared/color.ts
572
- const ColorSchema = zod.z.object({
573
- r: zod.z.number().min(0).max(1),
574
- g: zod.z.number().min(0).max(1),
575
- b: zod.z.number().min(0).max(1)
576
- });
577
- const COLOR_BLACK = {
578
- r: 0,
579
- g: 0,
580
- b: 0
581
- };
582
- const HEX_COLOR_PATTERN = /^#?([0-9a-fA-F]{6})$/;
583
- const HEX_BYTE_MAX = 255;
584
- function rgbHexToColor(hex) {
585
- const match = HEX_COLOR_PATTERN.exec(hex);
586
- if (match === null) throw new Error(`not a 6-digit hex colour: ${hex}`);
587
- const digits = match[1];
588
- if (digits === void 0) throw new Error(`not a 6-digit hex colour: ${hex}`);
589
- const r = Number.parseInt(digits.slice(0, 2), 16);
590
- const g = Number.parseInt(digits.slice(2, 4), 16);
591
- const b = Number.parseInt(digits.slice(4, 6), 16);
592
- return {
593
- r: r / HEX_BYTE_MAX,
594
- g: g / HEX_BYTE_MAX,
595
- b: b / HEX_BYTE_MAX
596
- };
597
- }
598
- function toHexByte(component) {
599
- return Math.round(component * HEX_BYTE_MAX).toString(16).padStart(2, "0");
600
- }
601
- function colorToRgbHex(color) {
602
- return `${toHexByte(color.r)}${toHexByte(color.g)}${toHexByte(color.b)}`;
603
- }
604
539
  const OOXML_PERCENT_SCALE = 1e5;
605
540
  function clamp01(x) {
606
541
  return Math.max(0, Math.min(1, x));
@@ -683,14 +618,6 @@ function applyColorTransforms(base, transforms) {
683
618
  return color;
684
619
  }
685
620
  //#endregion
686
- //#region src/typed/shared/style.ts
687
- const AlignmentSchema = zod.z.enum([
688
- "left",
689
- "center",
690
- "right",
691
- "justify"
692
- ]);
693
- //#endregion
694
621
  //#region src/typed/shared/metadata.ts
695
622
  const DocumentMetadataSchema = zod.z.object({
696
623
  title: zod.z.string().optional(),
@@ -730,103 +657,6 @@ function readCoreProperties(pkg) {
730
657
  };
731
658
  }
732
659
  //#endregion
733
- //#region src/typed/shared/content.ts
734
- const ContentRunSchema = zod.z.object({
735
- text: zod.z.string(),
736
- bold: zod.z.boolean().optional(),
737
- italic: zod.z.boolean().optional(),
738
- underline: zod.z.boolean().optional(),
739
- strike: zod.z.boolean().optional(),
740
- fontFamily: zod.z.string().optional(),
741
- sizePt: zod.z.number().positive().optional(),
742
- color: ColorSchema.optional(),
743
- hyperlink: zod.z.string().optional()
744
- });
745
- const ContentListMembershipSchema = zod.z.object({
746
- numId: zod.z.string(),
747
- level: zod.z.number().int().nonnegative()
748
- });
749
- const ContentParagraphSchema = zod.z.object({
750
- kind: zod.z.literal("paragraph"),
751
- runs: zod.z.array(ContentRunSchema),
752
- styleId: zod.z.string().optional(),
753
- alignment: AlignmentSchema.optional(),
754
- list: ContentListMembershipSchema.optional(),
755
- spacingBeforePt: zod.z.number().optional(),
756
- spacingAfterPt: zod.z.number().optional(),
757
- lineSpacing: zod.z.number().positive().optional(),
758
- indentLeftPt: zod.z.number().optional(),
759
- indentFirstLinePt: zod.z.number().optional()
760
- });
761
- const ContentImageBlockSchema = zod.z.object({
762
- kind: zod.z.literal("image"),
763
- format: zod.z.enum(["png", "jpeg"]),
764
- base64: zod.z.string(),
765
- widthPt: zod.z.number().positive(),
766
- heightPt: zod.z.number().positive(),
767
- altText: zod.z.string().optional()
768
- });
769
- const ContentPageBreakSchema = zod.z.object({ kind: zod.z.literal("pageBreak") });
770
- function isRecord(value) {
771
- return typeof value === "object" && value !== null && !Array.isArray(value);
772
- }
773
- function isContentRun(value) {
774
- return isRecord(value) && typeof value.text === "string";
775
- }
776
- function isContentTableCell(value) {
777
- return isRecord(value) && Array.isArray(value.blocks) && value.blocks.every(isContentBlock);
778
- }
779
- function isContentTableRow(value) {
780
- return isRecord(value) && Array.isArray(value.cells) && value.cells.every(isContentTableCell) && (value.heightPt === void 0 || typeof value.heightPt === "number");
781
- }
782
- function isContentBlock(value) {
783
- if (!isRecord(value)) return false;
784
- const kind = value.kind;
785
- if (kind === "paragraph") return Array.isArray(value.runs) && value.runs.every(isContentRun);
786
- if (kind === "image") return (value.format === "png" || value.format === "jpeg") && typeof value.base64 === "string" && typeof value.widthPt === "number" && typeof value.heightPt === "number";
787
- if (kind === "pageBreak") return true;
788
- if (kind === "table") return Array.isArray(value.rows) && value.rows.every(isContentTableRow) && Array.isArray(value.columnWidthsPt) && value.columnWidthsPt.every((w) => typeof w === "number");
789
- return false;
790
- }
791
- const ContentBlockSchema = zod.z.custom(isContentBlock);
792
- const ContentTableCellSchema = zod.z.object({
793
- blocks: zod.z.array(ContentBlockSchema),
794
- colSpan: zod.z.number().int().positive().optional(),
795
- rowSpan: zod.z.number().int().positive().optional(),
796
- background: ColorSchema.optional()
797
- });
798
- const ContentTableRowSchema = zod.z.object({
799
- cells: zod.z.array(ContentTableCellSchema),
800
- heightPt: zod.z.number().positive().optional()
801
- });
802
- const ContentTableSchema = zod.z.object({
803
- kind: zod.z.literal("table"),
804
- rows: zod.z.array(ContentTableRowSchema),
805
- columnWidthsPt: zod.z.array(zod.z.number().positive())
806
- });
807
- const ContentSectionSchema = zod.z.object({
808
- pageSize: PageSizeSchema,
809
- margins: MarginsSchema,
810
- blocks: zod.z.array(ContentBlockSchema)
811
- });
812
- const ContentShapeSchema = zod.z.object({
813
- name: zod.z.string().optional(),
814
- frame: BoxSchema,
815
- rotationDeg: zod.z.number().optional(),
816
- insetLeftPt: zod.z.number().nonnegative(),
817
- insetTopPt: zod.z.number().nonnegative(),
818
- insetRightPt: zod.z.number().nonnegative(),
819
- insetBottomPt: zod.z.number().nonnegative(),
820
- fontScale: zod.z.number().positive().optional(),
821
- lineSpacingReduction: zod.z.number().nonnegative().optional(),
822
- blocks: zod.z.array(ContentBlockSchema)
823
- });
824
- const ContentSlideSchema = zod.z.object({
825
- size: PageSizeSchema,
826
- shapes: zod.z.array(ContentShapeSchema),
827
- notes: zod.z.string()
828
- });
829
- //#endregion
830
660
  //#region src/image/sniff.ts
831
661
  const PNG_SIGNATURE = [
832
662
  137,
@@ -909,11 +739,11 @@ const CLR_SCHEME_SLOTS = [
909
739
  function readThemeSlotColor(colorEl) {
910
740
  if (colorEl.tag === "a:srgbClr") {
911
741
  const val = attr(colorEl, "val");
912
- return val === void 0 ? void 0 : rgbHexToColor(val);
742
+ return val === void 0 ? void 0 : (0, document_content_model.rgbHexToColor)(val);
913
743
  }
914
744
  if (colorEl.tag === "a:sysClr") {
915
745
  const lastClr = attr(colorEl, "lastClr");
916
- if (lastClr !== void 0) return rgbHexToColor(lastClr);
746
+ if (lastClr !== void 0) return (0, document_content_model.rgbHexToColor)(lastClr);
917
747
  return attr(colorEl, "val") === "window" ? {
918
748
  r: 1,
919
749
  g: 1,
@@ -1002,7 +832,7 @@ function readSchemeColor(schemeClrEl, colorMap, theme) {
1002
832
  }
1003
833
  function readSrgbColor(srgbClrEl) {
1004
834
  const val = attr(srgbClrEl, "val");
1005
- return val === void 0 ? void 0 : applyColorTransforms(rgbHexToColor(val), readColorTransforms(srgbClrEl));
835
+ return val === void 0 ? void 0 : applyColorTransforms((0, document_content_model.rgbHexToColor)(val), readColorTransforms(srgbClrEl));
1006
836
  }
1007
837
  function readSolidFillColor(solidFillEl, colorMap, theme) {
1008
838
  if (solidFillEl === void 0) return;
@@ -1079,7 +909,7 @@ function readUnderline(u) {
1079
909
  function readRunColor(colorEl) {
1080
910
  if (colorEl === void 0) return;
1081
911
  const val = attr(colorEl, "w:val");
1082
- return val === void 0 || val === "auto" ? void 0 : rgbHexToColor(val);
912
+ return val === void 0 || val === "auto" ? void 0 : (0, document_content_model.rgbHexToColor)(val);
1083
913
  }
1084
914
  function readRunFontFamily(rFonts, theme) {
1085
915
  if (rFonts === void 0) return;
@@ -1197,7 +1027,7 @@ const FootnoteSchema = zod.z.object({
1197
1027
  });
1198
1028
  const DocxDocumentSchema = zod.z.object({
1199
1029
  metadata: DocumentMetadataSchema,
1200
- sections: zod.z.array(ContentSectionSchema),
1030
+ sections: zod.z.array(document_content_model.ContentSectionSchema),
1201
1031
  comments: zod.z.array(CommentSchema),
1202
1032
  footnotes: zod.z.array(FootnoteSchema),
1203
1033
  headers: zod.z.array(zod.z.string()),
@@ -1217,7 +1047,7 @@ function readPageSize(sectPr) {
1217
1047
  const pgSz = childrenWithTag(sectPr, "w:pgSz")[0];
1218
1048
  const w = pgSz === void 0 ? void 0 : attr(pgSz, "w:w");
1219
1049
  const h = pgSz === void 0 ? void 0 : attr(pgSz, "w:h");
1220
- return w === void 0 || h === void 0 ? PAGE_SIZE_LETTER : {
1050
+ return w === void 0 || h === void 0 ? document_content_model.PAGE_SIZE_LETTER : {
1221
1051
  widthPt: twipsToPt(Number(w)),
1222
1052
  heightPt: twipsToPt(Number(h))
1223
1053
  };
@@ -1333,7 +1163,7 @@ function readParagraph$1(paragraph, context, rels) {
1333
1163
  function readCellShading(tcPr) {
1334
1164
  const shd = tcPr === void 0 ? void 0 : childrenWithTag(tcPr, "w:shd")[0];
1335
1165
  const fill = shd === void 0 ? void 0 : attr(shd, "w:fill");
1336
- return fill === void 0 || fill === "auto" || fill === "none" ? void 0 : rgbHexToColor(fill);
1166
+ return fill === void 0 || fill === "auto" || fill === "none" ? void 0 : (0, document_content_model.rgbHexToColor)(fill);
1337
1167
  }
1338
1168
  function readRawCell(tc, context, rels) {
1339
1169
  const tcPr = childrenWithTag(tc, "w:tcPr")[0];
@@ -1433,7 +1263,7 @@ function readSections(body, context, rels) {
1433
1263
  currentBlocks.push(...readBodyBlocks([node], context, rels));
1434
1264
  }
1435
1265
  if (currentBlocks.length > 0 || sections.length === 0) sections.push({
1436
- pageSize: PAGE_SIZE_LETTER,
1266
+ pageSize: document_content_model.PAGE_SIZE_LETTER,
1437
1267
  margins: DEFAULT_MARGINS,
1438
1268
  blocks: currentBlocks
1439
1269
  });
@@ -1593,7 +1423,7 @@ function resolveDefaultRunProperties(placeholderType, level, context) {
1593
1423
  //#region src/typed/pptx/read.ts
1594
1424
  const PptxDocumentSchema = zod.z.object({
1595
1425
  metadata: DocumentMetadataSchema,
1596
- slides: zod.z.array(ContentSlideSchema)
1426
+ slides: zod.z.array(document_content_model.ContentSlideSchema)
1597
1427
  });
1598
1428
  const PRESENTATION_PATH = "ppt/presentation.xml";
1599
1429
  const TABLE_GRAPHIC_URI = "http://schemas.openxmlformats.org/drawingml/2006/table";
@@ -1601,7 +1431,7 @@ function readSlideSize(presentationRoot) {
1601
1431
  const sldSz = presentationRoot === void 0 ? void 0 : childrenWithTag(presentationRoot, "p:sldSz")[0];
1602
1432
  const cx = sldSz === void 0 ? void 0 : attr(sldSz, "cx");
1603
1433
  const cy = sldSz === void 0 ? void 0 : attr(sldSz, "cy");
1604
- return cx === void 0 || cy === void 0 ? SLIDE_SIZE_WIDESCREEN : {
1434
+ return cx === void 0 || cy === void 0 ? document_content_model.SLIDE_SIZE_WIDESCREEN : {
1605
1435
  widthPt: emuToPt(Number(cx)),
1606
1436
  heightPt: emuToPt(Number(cy))
1607
1437
  };
@@ -2076,41 +1906,151 @@ function readXlsx(pkg) {
2076
1906
  };
2077
1907
  }
2078
1908
  //#endregion
2079
- exports.AlignmentSchema = AlignmentSchema;
1909
+ Object.defineProperty(exports, "AlignmentSchema", {
1910
+ enumerable: true,
1911
+ get: function() {
1912
+ return document_content_model.AlignmentSchema;
1913
+ }
1914
+ });
2080
1915
  exports.AttributeSchema = AttributeSchema;
2081
1916
  exports.BinaryPartSchema = BinaryPartSchema;
2082
- exports.BoxSchema = BoxSchema;
2083
- exports.COLOR_BLACK = COLOR_BLACK;
2084
- exports.ColorSchema = ColorSchema;
1917
+ Object.defineProperty(exports, "BoxSchema", {
1918
+ enumerable: true,
1919
+ get: function() {
1920
+ return document_content_model.BoxSchema;
1921
+ }
1922
+ });
1923
+ Object.defineProperty(exports, "COLOR_BLACK", {
1924
+ enumerable: true,
1925
+ get: function() {
1926
+ return document_content_model.COLOR_BLACK;
1927
+ }
1928
+ });
1929
+ Object.defineProperty(exports, "ColorSchema", {
1930
+ enumerable: true,
1931
+ get: function() {
1932
+ return document_content_model.ColorSchema;
1933
+ }
1934
+ });
2085
1935
  exports.CommentSchema = CommentSchema;
2086
1936
  exports.CompactPackageSchema = CompactPackageSchema;
2087
1937
  exports.CompactPartSchema = CompactPartSchema;
2088
1938
  exports.CompactXmlNodeSchema = CompactXmlNodeSchema;
2089
- exports.ContentBlockSchema = ContentBlockSchema;
2090
- exports.ContentImageBlockSchema = ContentImageBlockSchema;
2091
- exports.ContentListMembershipSchema = ContentListMembershipSchema;
2092
- exports.ContentPageBreakSchema = ContentPageBreakSchema;
2093
- exports.ContentParagraphSchema = ContentParagraphSchema;
2094
- exports.ContentRunSchema = ContentRunSchema;
2095
- exports.ContentSectionSchema = ContentSectionSchema;
2096
- exports.ContentShapeSchema = ContentShapeSchema;
2097
- exports.ContentSlideSchema = ContentSlideSchema;
2098
- exports.ContentTableCellSchema = ContentTableCellSchema;
2099
- exports.ContentTableRowSchema = ContentTableRowSchema;
2100
- exports.ContentTableSchema = ContentTableSchema;
1939
+ Object.defineProperty(exports, "ContentBlockSchema", {
1940
+ enumerable: true,
1941
+ get: function() {
1942
+ return document_content_model.ContentBlockSchema;
1943
+ }
1944
+ });
1945
+ Object.defineProperty(exports, "ContentImageBlockSchema", {
1946
+ enumerable: true,
1947
+ get: function() {
1948
+ return document_content_model.ContentImageBlockSchema;
1949
+ }
1950
+ });
1951
+ Object.defineProperty(exports, "ContentListMembershipSchema", {
1952
+ enumerable: true,
1953
+ get: function() {
1954
+ return document_content_model.ContentListMembershipSchema;
1955
+ }
1956
+ });
1957
+ Object.defineProperty(exports, "ContentPageBreakSchema", {
1958
+ enumerable: true,
1959
+ get: function() {
1960
+ return document_content_model.ContentPageBreakSchema;
1961
+ }
1962
+ });
1963
+ Object.defineProperty(exports, "ContentParagraphSchema", {
1964
+ enumerable: true,
1965
+ get: function() {
1966
+ return document_content_model.ContentParagraphSchema;
1967
+ }
1968
+ });
1969
+ Object.defineProperty(exports, "ContentRunSchema", {
1970
+ enumerable: true,
1971
+ get: function() {
1972
+ return document_content_model.ContentRunSchema;
1973
+ }
1974
+ });
1975
+ Object.defineProperty(exports, "ContentSectionSchema", {
1976
+ enumerable: true,
1977
+ get: function() {
1978
+ return document_content_model.ContentSectionSchema;
1979
+ }
1980
+ });
1981
+ Object.defineProperty(exports, "ContentShapeSchema", {
1982
+ enumerable: true,
1983
+ get: function() {
1984
+ return document_content_model.ContentShapeSchema;
1985
+ }
1986
+ });
1987
+ Object.defineProperty(exports, "ContentSlideSchema", {
1988
+ enumerable: true,
1989
+ get: function() {
1990
+ return document_content_model.ContentSlideSchema;
1991
+ }
1992
+ });
1993
+ Object.defineProperty(exports, "ContentTableCellSchema", {
1994
+ enumerable: true,
1995
+ get: function() {
1996
+ return document_content_model.ContentTableCellSchema;
1997
+ }
1998
+ });
1999
+ Object.defineProperty(exports, "ContentTableRowSchema", {
2000
+ enumerable: true,
2001
+ get: function() {
2002
+ return document_content_model.ContentTableRowSchema;
2003
+ }
2004
+ });
2005
+ Object.defineProperty(exports, "ContentTableSchema", {
2006
+ enumerable: true,
2007
+ get: function() {
2008
+ return document_content_model.ContentTableSchema;
2009
+ }
2010
+ });
2101
2011
  exports.DefinedNameSchema = DefinedNameSchema;
2102
2012
  exports.DocumentMetadataSchema = DocumentMetadataSchema;
2103
2013
  exports.DocxDocumentSchema = DocxDocumentSchema;
2104
2014
  exports.FootnoteSchema = FootnoteSchema;
2105
- exports.MarginsSchema = MarginsSchema;
2106
- exports.PAGE_SIZE_A4 = PAGE_SIZE_A4;
2107
- exports.PAGE_SIZE_LETTER = PAGE_SIZE_LETTER;
2015
+ Object.defineProperty(exports, "MarginsSchema", {
2016
+ enumerable: true,
2017
+ get: function() {
2018
+ return document_content_model.MarginsSchema;
2019
+ }
2020
+ });
2021
+ Object.defineProperty(exports, "PAGE_SIZE_A4", {
2022
+ enumerable: true,
2023
+ get: function() {
2024
+ return document_content_model.PAGE_SIZE_A4;
2025
+ }
2026
+ });
2027
+ Object.defineProperty(exports, "PAGE_SIZE_LETTER", {
2028
+ enumerable: true,
2029
+ get: function() {
2030
+ return document_content_model.PAGE_SIZE_LETTER;
2031
+ }
2032
+ });
2108
2033
  exports.PackageSchema = PackageSchema;
2109
- exports.PageSizeSchema = PageSizeSchema;
2034
+ Object.defineProperty(exports, "PageSizeSchema", {
2035
+ enumerable: true,
2036
+ get: function() {
2037
+ return document_content_model.PageSizeSchema;
2038
+ }
2039
+ });
2110
2040
  exports.PartSchema = PartSchema;
2111
2041
  exports.PptxDocumentSchema = PptxDocumentSchema;
2112
- exports.SLIDE_SIZE_STANDARD = SLIDE_SIZE_STANDARD;
2113
- exports.SLIDE_SIZE_WIDESCREEN = SLIDE_SIZE_WIDESCREEN;
2042
+ Object.defineProperty(exports, "SLIDE_SIZE_STANDARD", {
2043
+ enumerable: true,
2044
+ get: function() {
2045
+ return document_content_model.SLIDE_SIZE_STANDARD;
2046
+ }
2047
+ });
2048
+ Object.defineProperty(exports, "SLIDE_SIZE_WIDESCREEN", {
2049
+ enumerable: true,
2050
+ get: function() {
2051
+ return document_content_model.SLIDE_SIZE_WIDESCREEN;
2052
+ }
2053
+ });
2114
2054
  exports.XlsxCellSchema = XlsxCellSchema;
2115
2055
  exports.XlsxSheetSchema = XlsxSheetSchema;
2116
2056
  exports.XlsxWorkbookSchema = XlsxWorkbookSchema;
@@ -2128,7 +2068,12 @@ exports.base64ToBytes = base64ToBytes;
2128
2068
  exports.buildXml = buildXml;
2129
2069
  exports.bytesToBase64 = bytesToBase64;
2130
2070
  exports.childrenWithTag = childrenWithTag;
2131
- exports.colorToRgbHex = colorToRgbHex;
2071
+ Object.defineProperty(exports, "colorToRgbHex", {
2072
+ enumerable: true,
2073
+ get: function() {
2074
+ return document_content_model.colorToRgbHex;
2075
+ }
2076
+ });
2132
2077
  exports.compactCodec = compactCodec;
2133
2078
  exports.compactPackageCodec = compactPackageCodec;
2134
2079
  exports.decodeCompactPackage = decodeCompactPackage;
@@ -2139,7 +2084,12 @@ exports.encodeCompactPackage = encodeCompactPackage;
2139
2084
  exports.encodePackage = encodePackage;
2140
2085
  exports.fromCompact = fromCompact;
2141
2086
  exports.isCompactXmlNode = isCompactXmlNode;
2142
- exports.isContentBlock = isContentBlock;
2087
+ Object.defineProperty(exports, "isContentBlock", {
2088
+ enumerable: true,
2089
+ get: function() {
2090
+ return document_content_model.isContentBlock;
2091
+ }
2092
+ });
2143
2093
  exports.isXmlNode = isXmlNode;
2144
2094
  exports.packageCodec = packageCodec;
2145
2095
  exports.parsePackage = parsePackage;
@@ -2148,7 +2098,12 @@ exports.readDocx = readDocx;
2148
2098
  exports.readPptx = readPptx;
2149
2099
  exports.readXlsx = readXlsx;
2150
2100
  exports.resolveRelationships = resolveRelationships;
2151
- exports.rgbHexToColor = rgbHexToColor;
2101
+ Object.defineProperty(exports, "rgbHexToColor", {
2102
+ enumerable: true,
2103
+ get: function() {
2104
+ return document_content_model.rgbHexToColor;
2105
+ }
2106
+ });
2152
2107
  exports.rootElement = rootElement;
2153
2108
  exports.serializePackage = serializePackage;
2154
2109
  exports.sniffImageFormat = sniffImageFormat;