odf.js 2.4.22 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/README.md +16 -0
  2. package/dist/a1-5e9veCyu.d.cts +18 -0
  3. package/dist/a1-5e9veCyu.d.ts +18 -0
  4. package/dist/base64--HuymRl_.d.cts +5 -0
  5. package/dist/base64--HuymRl_.d.ts +5 -0
  6. package/dist/build-XSm3I8LT.d.cts +5 -0
  7. package/dist/build-Z1KRkSEB.d.ts +5 -0
  8. package/dist/cascade-8u4q16_U.d.ts +22 -0
  9. package/dist/cascade-qYa3mgnE.d.cts +22 -0
  10. package/dist/codec-CqVFFwD0.d.ts +107 -0
  11. package/dist/codec-Dg0R3WGd.d.cts +107 -0
  12. package/dist/codec.d.cts +2 -72
  13. package/dist/codec.d.ts +2 -72
  14. package/dist/color-CqXjt_to.d.cts +6 -0
  15. package/dist/color-CqXjt_to.d.ts +6 -0
  16. package/dist/embedded-CNMqOrnt.d.ts +13 -0
  17. package/dist/embedded-D7Kr1Sce.d.cts +13 -0
  18. package/dist/entities-BZlXvHqu.d.cts +5 -0
  19. package/dist/entities-BZlXvHqu.d.ts +5 -0
  20. package/dist/form-BC-wb1M2.d.cts +31 -0
  21. package/dist/form-DcGOX5RW.d.ts +31 -0
  22. package/dist/fragment-B1ZV7T5Z.d.ts +6 -0
  23. package/dist/fragment-B1og_8uA.d.cts +6 -0
  24. package/dist/geometry-DnhkIhAM.d.ts +12 -0
  25. package/dist/geometry-lKWJ_ifA.d.cts +12 -0
  26. package/dist/image/sniff.d.cts +1 -4
  27. package/dist/image/sniff.d.ts +1 -4
  28. package/dist/index.d.cts +43 -43
  29. package/dist/index.d.ts +43 -43
  30. package/dist/manifest-CmsCOCEi.d.cts +40 -0
  31. package/dist/manifest-xxJ4FpSe.d.ts +40 -0
  32. package/dist/manifest.cjs +0 -1
  33. package/dist/manifest.d.cts +2 -41
  34. package/dist/manifest.d.ts +2 -41
  35. package/dist/manifest.js +1 -1
  36. package/dist/masterpage-7nBnqFj-.d.ts +8 -0
  37. package/dist/masterpage-EmefIRgy.d.cts +8 -0
  38. package/dist/media-type-BOLkcHkJ.d.cts +20 -0
  39. package/dist/media-type-BOLkcHkJ.d.ts +20 -0
  40. package/dist/media-type.d.cts +1 -19
  41. package/dist/media-type.d.ts +1 -19
  42. package/dist/metadata-32LoP2TK.d.ts +7 -0
  43. package/dist/metadata-frJqeeSB.d.cts +7 -0
  44. package/dist/mimetype-BcLX0N-N.d.cts +6 -0
  45. package/dist/mimetype-uF-RHNpR.d.ts +6 -0
  46. package/dist/mimetype.cjs +0 -1
  47. package/dist/mimetype.d.cts +2 -7
  48. package/dist/mimetype.d.ts +2 -7
  49. package/dist/mimetype.js +1 -1
  50. package/dist/ns-Cihto3Fx.d.cts +33 -0
  51. package/dist/ns-Cihto3Fx.d.ts +33 -0
  52. package/dist/ns.d.cts +1 -32
  53. package/dist/ns.d.ts +1 -32
  54. package/dist/package-io/read.d.cts +1 -4
  55. package/dist/package-io/read.d.ts +1 -4
  56. package/dist/package-io/write.d.cts +1 -6
  57. package/dist/package-io/write.d.ts +1 -6
  58. package/dist/paragraph-9ii2naJC.d.cts +7 -0
  59. package/dist/paragraph-DWNnedIE.d.ts +7 -0
  60. package/dist/parse-A8_8sdpX.d.ts +5 -0
  61. package/dist/parse-CP5FLZqv.d.cts +5 -0
  62. package/dist/path-DE7wkIcz.d.cts +34 -0
  63. package/dist/path-DE7wkIcz.d.ts +34 -0
  64. package/dist/properties-BF_Fv6B3.d.cts +44 -0
  65. package/dist/properties-DjAIdPry.d.ts +44 -0
  66. package/dist/query-P-Y5DK0-.d.cts +9 -0
  67. package/dist/query-sECN-7vU.d.ts +9 -0
  68. package/dist/read-B0aBfNRf.d.ts +10 -0
  69. package/dist/read-BKS_zlGG.d.cts +10 -0
  70. package/dist/read-Bd16x8VD.d.cts +10 -0
  71. package/dist/read-BkFbEves.d.ts +15 -0
  72. package/dist/read-Bleh4LfR.d.ts +14 -0
  73. package/dist/read-BoIUENWq.d.ts +28 -0
  74. package/dist/read-C7gT8wtc.d.ts +10 -0
  75. package/dist/read-CFMsXSl7.d.cts +5 -0
  76. package/dist/read-CxdHrV1m.d.ts +10 -0
  77. package/dist/read-D4DKvOY7.d.cts +10 -0
  78. package/dist/read-DNNf5_6n.d.cts +15 -0
  79. package/dist/read-DapcRIZV.d.cts +10 -0
  80. package/dist/read-DhLNXgiM.d.ts +5 -0
  81. package/dist/read-Dn9qyBBs.d.ts +10 -0
  82. package/dist/read-DrdmKX0x.d.cts +28 -0
  83. package/dist/read-DyR9HfLT.d.cts +14 -0
  84. package/dist/registry-Dy6pjoh3.d.cts +37 -0
  85. package/dist/registry-R43n1hcL.d.ts +37 -0
  86. package/dist/report-BuCJ7_YU.d.cts +48 -0
  87. package/dist/report-MpwUgXbA.d.ts +48 -0
  88. package/dist/serialize-9xvti0FF.d.cts +7 -0
  89. package/dist/serialize-DvaE_t5D.d.ts +7 -0
  90. package/dist/shapes-BJAtBY24.d.ts +18 -0
  91. package/dist/shapes-CHc96HKu.d.cts +18 -0
  92. package/dist/sniff-DjpnUZRp.d.cts +5 -0
  93. package/dist/sniff-DjpnUZRp.d.ts +5 -0
  94. package/dist/span-BtmvlqZH.d.cts +5 -0
  95. package/dist/span-KXroEGuH.d.ts +5 -0
  96. package/dist/style-CwuPFm34.d.cts +2 -0
  97. package/dist/style-Jzwx2Q-Y.d.ts +2 -0
  98. package/dist/styles/properties.cjs +0 -1
  99. package/dist/styles/properties.d.cts +2 -45
  100. package/dist/styles/properties.d.ts +2 -45
  101. package/dist/styles/properties.js +1 -1
  102. package/dist/styles/registry.d.cts +1 -36
  103. package/dist/styles/registry.d.ts +1 -36
  104. package/dist/styles/serialize.d.cts +1 -6
  105. package/dist/styles/serialize.d.ts +1 -6
  106. package/dist/styles/span.d.cts +1 -4
  107. package/dist/styles/span.d.ts +1 -4
  108. package/dist/subdocument-CIxH3a5V.d.cts +8 -0
  109. package/dist/subdocument-DQNQF7wV.d.ts +8 -0
  110. package/dist/table-D81TZyBn.d.ts +14 -0
  111. package/dist/table-sweV3r9n.d.cts +14 -0
  112. package/dist/text-Cal14ZaX.d.cts +8 -0
  113. package/dist/text-CkNojpZm.d.ts +8 -0
  114. package/dist/transform-C7GrZZdR.d.ts +26 -0
  115. package/dist/transform-DKEjydnm.d.cts +26 -0
  116. package/dist/typed/draw/embedded.d.cts +1 -12
  117. package/dist/typed/draw/embedded.d.ts +1 -12
  118. package/dist/typed/draw/shapes.d.cts +1 -17
  119. package/dist/typed/draw/shapes.d.ts +1 -17
  120. package/dist/typed/formula/read.d.cts +1 -13
  121. package/dist/typed/formula/read.d.ts +1 -13
  122. package/dist/typed/odb/form.d.cts +1 -30
  123. package/dist/typed/odb/form.d.ts +1 -30
  124. package/dist/typed/odb/read.d.cts +1 -27
  125. package/dist/typed/odb/read.d.ts +1 -27
  126. package/dist/typed/odb/report.d.cts +1 -47
  127. package/dist/typed/odb/report.d.ts +1 -47
  128. package/dist/typed/odb/subdocument.d.cts +1 -7
  129. package/dist/typed/odb/subdocument.d.ts +1 -7
  130. package/dist/typed/odg/read.d.cts +1 -9
  131. package/dist/typed/odg/read.d.ts +1 -9
  132. package/dist/typed/odm/read.d.cts +1 -14
  133. package/dist/typed/odm/read.d.ts +1 -14
  134. package/dist/typed/odp/read.d.cts +1 -9
  135. package/dist/typed/odp/read.d.ts +1 -9
  136. package/dist/typed/ods/read.d.cts +1 -9
  137. package/dist/typed/ods/read.d.ts +1 -9
  138. package/dist/typed/odt/read.d.cts +1 -9
  139. package/dist/typed/odt/read.d.ts +1 -9
  140. package/dist/typed/shared/a1.d.cts +1 -17
  141. package/dist/typed/shared/a1.d.ts +1 -17
  142. package/dist/typed/shared/cascade.d.cts +1 -21
  143. package/dist/typed/shared/cascade.d.ts +1 -21
  144. package/dist/typed/shared/color.d.cts +1 -5
  145. package/dist/typed/shared/color.d.ts +1 -5
  146. package/dist/typed/shared/geometry.d.cts +1 -11
  147. package/dist/typed/shared/geometry.d.ts +1 -11
  148. package/dist/typed/shared/masterpage.d.cts +1 -7
  149. package/dist/typed/shared/masterpage.d.ts +1 -7
  150. package/dist/typed/shared/metadata.d.cts +1 -6
  151. package/dist/typed/shared/metadata.d.ts +1 -6
  152. package/dist/typed/shared/paragraph.d.cts +1 -6
  153. package/dist/typed/shared/paragraph.d.ts +1 -6
  154. package/dist/typed/shared/path.d.cts +1 -33
  155. package/dist/typed/shared/path.d.ts +1 -33
  156. package/dist/typed/shared/style.d.cts +1 -1
  157. package/dist/typed/shared/style.d.ts +1 -1
  158. package/dist/typed/shared/table.d.cts +1 -13
  159. package/dist/typed/shared/table.d.ts +1 -13
  160. package/dist/typed/shared/text.d.cts +1 -7
  161. package/dist/typed/shared/text.d.ts +1 -7
  162. package/dist/typed/shared/transform.d.cts +1 -25
  163. package/dist/typed/shared/transform.d.ts +1 -25
  164. package/dist/util/base64.d.cts +1 -4
  165. package/dist/util/base64.d.ts +1 -4
  166. package/dist/write-C0nwVuPI.d.ts +7 -0
  167. package/dist/write-Dfb2tirK.d.cts +7 -0
  168. package/dist/xml/build.d.cts +1 -4
  169. package/dist/xml/build.d.ts +1 -4
  170. package/dist/xml/entities.d.cts +1 -4
  171. package/dist/xml/entities.d.ts +1 -4
  172. package/dist/xml/fragment.d.cts +1 -5
  173. package/dist/xml/fragment.d.ts +1 -5
  174. package/dist/xml/parse.d.cts +1 -4
  175. package/dist/xml/parse.d.ts +1 -4
  176. package/dist/xml/query.d.cts +1 -8
  177. package/dist/xml/query.d.ts +1 -8
  178. package/dist/zip-ie17sOo5.d.cts +9 -0
  179. package/dist/zip-ie17sOo5.d.ts +9 -0
  180. package/dist/zip.d.cts +1 -8
  181. package/dist/zip.d.ts +1 -8
  182. package/package.json +1 -1
@@ -0,0 +1,12 @@
1
+ import { l as XmlElement } from "./node-CkBWRjNR.js";
2
+ import { Box, ContentPathPoint, Margins, PageSize } from "document-schema.js";
3
+ //#region src/typed/shared/geometry.d.ts
4
+ declare function parsePageSize(pageLayoutProperties: XmlElement): PageSize | undefined;
5
+ declare function parseMargins(pageLayoutProperties: XmlElement): Margins | undefined;
6
+ declare function parseBox(element: XmlElement): Box | undefined;
7
+ declare function parseLinePoints(element: XmlElement): {
8
+ from: ContentPathPoint;
9
+ to: ContentPathPoint;
10
+ } | undefined;
11
+ //#endregion
12
+ export { parsePageSize as i, parseLinePoints as n, parseMargins as r, parseBox as t };
@@ -0,0 +1,12 @@
1
+ import { l as XmlElement } from "./node-CkBWRjNR.cjs";
2
+ import { Box, ContentPathPoint, Margins, PageSize } from "document-schema.js";
3
+ //#region src/typed/shared/geometry.d.ts
4
+ declare function parsePageSize(pageLayoutProperties: XmlElement): PageSize | undefined;
5
+ declare function parseMargins(pageLayoutProperties: XmlElement): Margins | undefined;
6
+ declare function parseBox(element: XmlElement): Box | undefined;
7
+ declare function parseLinePoints(element: XmlElement): {
8
+ from: ContentPathPoint;
9
+ to: ContentPathPoint;
10
+ } | undefined;
11
+ //#endregion
12
+ export { parsePageSize as i, parseLinePoints as n, parseMargins as r, parseBox 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,47 +1,47 @@
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 { BinaryPart, BinaryPartSchema, Package, PackageSchema, Part, PartSchema, XmlPart, XmlPartSchema } from "./model/package.cjs";
3
- import { decodePackage, encodePackage, packageCodec, xmlCodec } from "./codec.cjs";
4
- import { ImageFormat, sniffImageFormat } from "./image/sniff.cjs";
5
- import { parsePackage } from "./package-io/read.cjs";
6
- import { MANIFEST_PART, MIMETYPE_PART, serializePackage } from "./package-io/write.cjs";
7
- import { parseXml } from "./xml/parse.cjs";
8
- import { buildXml } from "./xml/build.cjs";
9
- import { ZipEntry, unzipPackage, zipPackage } from "./zip.cjs";
10
- import { base64ToBytes, bytesToBase64 } from "./util/base64.cjs";
11
- import { ODF_NAMESPACES, OdfNamespacePrefix, xmlnsAttributes } from "./ns.cjs";
12
- import { ODF_MEDIA_TYPES, OdfExtension, mediaTypeForExtension } from "./media-type.cjs";
13
- import { readMimetype, writeMimetype } from "./mimetype.cjs";
14
- import { el, txt } from "./xml/fragment.cjs";
15
- import { decodeXmlText, encodeXmlText } from "./xml/entities.cjs";
16
- import { BuildManifestOptions, Manifest, ManifestEntry, ManifestEntrySchema, ManifestProblem, ManifestProblemSchema, ManifestSchema, buildManifest, readManifest, setDocumentMediaType, syncManifest, validateManifest, writeManifest } from "./manifest.cjs";
3
+ import { t as parsePackage } from "./read-CFMsXSl7.cjs";
4
+ import { n as MIMETYPE_PART, r as serializePackage, t as MANIFEST_PART } from "./write-Dfb2tirK.cjs";
5
+ import { t as parseXml } from "./parse-CP5FLZqv.cjs";
6
+ import { t as buildXml } from "./build-XSm3I8LT.cjs";
7
+ import { n as unzipPackage, r as zipPackage, t as ZipEntry } from "./zip-ie17sOo5.cjs";
8
+ import { n as bytesToBase64, t as base64ToBytes } from "./base64--HuymRl_.cjs";
9
+ import { n as OdfNamespacePrefix, r as xmlnsAttributes, t as ODF_NAMESPACES } from "./ns-Cihto3Fx.cjs";
10
+ import { n as OdfExtension, r as mediaTypeForExtension, t as ODF_MEDIA_TYPES } from "./media-type-BOLkcHkJ.cjs";
11
+ import { n as sniffImageFormat, t as ImageFormat } from "./sniff-DjpnUZRp.cjs";
12
+ import { n as writeMimetype, t as readMimetype } from "./mimetype-BcLX0N-N.cjs";
13
+ import { n as txt, t as el } from "./fragment-B1og_8uA.cjs";
14
+ import { n as encodeXmlText, t as decodeXmlText } from "./entities-BZlXvHqu.cjs";
15
+ import { a as ManifestProblem, c as buildManifest, d as syncManifest, f as validateManifest, i as ManifestEntrySchema, l as readManifest, n as Manifest, o as ManifestProblemSchema, p as writeManifest, r as ManifestEntry, s as ManifestSchema, t as BuildManifestOptions, u as setDocumentMediaType } from "./manifest-CmsCOCEi.cjs";
16
+ import { a as formatPt, c as parseStyleElementProperties, i as formatPercentageMultiplier, l as parseTextProperties, n as StyleProperties, o as paragraphPropertiesToAttributes, r as StylePropertiesSchema, s as parseParagraphProperties, t as ParsedProperties, u as textPropertiesToAttributes } from "./properties-BF_Fv6B3.cjs";
17
+ import { n as canonicalPropertiesString, t as buildStylePropertyElements } from "./serialize-9xvti0FF.cjs";
18
+ import { a as StyleRegistry, i as StyleFamily, n as OtherPartRef, o as StyleRegistryOptions, r as STYLE_FAMILIES, s as isStyleFamily, t as InternRequest } from "./registry-Dy6pjoh3.cjs";
19
+ import { t as ensureSpan } from "./span-BtmvlqZH.cjs";
20
+ import { a as rootElement, i as findChildElement, n as childrenWithTag, r as elementsWithTag, t as attrValue } from "./query-P-Y5DK0-.cjs";
17
21
  import { n as formatOdfLength, r as parseOdfLength, t as LengthUnit } from "./units-7pCiECuP.cjs";
18
- import { ParsedProperties, StyleProperties, StylePropertiesSchema, formatPercentageMultiplier, formatPt, paragraphPropertiesToAttributes, parseParagraphProperties, parseStyleElementProperties, parseTextProperties, textPropertiesToAttributes } from "./styles/properties.cjs";
19
- import { buildStylePropertyElements, canonicalPropertiesString } from "./styles/serialize.cjs";
20
- import { InternRequest, OtherPartRef, STYLE_FAMILIES, StyleFamily, StyleRegistry, StyleRegistryOptions, isStyleFamily } from "./styles/registry.cjs";
21
- import { ensureSpan } from "./styles/span.cjs";
22
- import { attrValue, childrenWithTag, elementsWithTag, findChildElement, rootElement } from "./xml/query.cjs";
23
- import { TableCursor, cellReference, columnIndexToLetters, columnLettersToIndex, parseCellReference } from "./typed/shared/a1.cjs";
24
- import { formatOdfColor, parseOdfColor } from "./typed/shared/color.cjs";
25
- import { parseBox, parseLinePoints, parseMargins, parsePageSize } from "./typed/shared/geometry.cjs";
26
- import { Alignment, AlignmentSchema } from "./typed/shared/style.cjs";
27
- import { decodeOdfText, getOdfSpaceCount, measureOdfNodeLength, sumOdfNodeLength } from "./typed/shared/text.cjs";
28
- import { CascadeDiagnostic, StyleCascadeResult, StyleElementChainResult, findStyleElement, resolveStyle, resolveStyleElementChain } from "./typed/shared/cascade.cjs";
29
- import { META_PART, readOdfMetadata } from "./typed/shared/metadata.cjs";
30
- import { readOdfParagraph } from "./typed/shared/paragraph.cjs";
31
- import { readOdfTable } from "./typed/shared/table.cjs";
32
- import { OdfPoint, OdfShapeGeometry, OdfTransformFunction, applyOdfTransform, composeOdfGroupTransform, netRotationDeg, parseOdfTransform, resolveOdfShapeGeometry } from "./typed/shared/transform.cjs";
33
- import { resolveDrawPageSize, resolvePageLayoutProperties } from "./typed/shared/masterpage.cjs";
34
- import { OdfRawPoint, OdfRawSegment, OdfRawSubpath, OdfViewBox, buildOdfSubpaths, parseOdfPathData, parseOdfPointsList, parseOdfViewBox, rawSubpathFromPoints, scaleOdfRawPoint } from "./typed/shared/path.cjs";
35
- import { DrawPageContent, readDrawFrame, readDrawImageBlock, readDrawPageContent, walkDrawShapes } from "./typed/draw/shapes.cjs";
36
- import { EmbeddedDocumentKind, EmbeddedDrawObject, readDrawObjectReference } from "./typed/draw/embedded.cjs";
37
- import { OdpDocument, readOdp } from "./typed/odp/read.cjs";
38
- import { OdtDocument, readOdt } from "./typed/odt/read.cjs";
39
- import { OdgDocument, readOdg } from "./typed/odg/read.cjs";
40
- import { OdsDocument, readOds } from "./typed/ods/read.cjs";
41
- import { OdfFormulaDocument, readOdfFormula, readOdfFormulaDocument } from "./typed/formula/read.cjs";
42
- import { OdmDocument, OdmSection, readOdm } from "./typed/odm/read.cjs";
43
- import { OdbComponentInfo, OdbConnectionInfo, OdbInventory, OdbQueryInfo, readOdbInventory, resolveOdbComponent } from "./typed/odb/read.cjs";
44
- import { SubDocumentPackageOptions, subDocumentPackage } from "./typed/odb/subdocument.cjs";
45
- import { OdbForm, OdbFormControl, OdbFormDefinition, readOdbForm } from "./typed/odb/form.cjs";
46
- import { OdbReport, OdbReportBand, OdbReportElement, OdbReportFunction, OdbReportGroup, readOdbReport } from "./typed/odb/report.cjs";
22
+ import { a as parseCellReference, i as columnLettersToIndex, n as cellReference, r as columnIndexToLetters, t as TableCursor } from "./a1-5e9veCyu.cjs";
23
+ import { n as parseOdfColor, t as formatOdfColor } from "./color-CqXjt_to.cjs";
24
+ import { i as parsePageSize, n as parseLinePoints, r as parseMargins, t as parseBox } from "./geometry-lKWJ_ifA.cjs";
25
+ import { n as AlignmentSchema, t as Alignment } from "./style-CwuPFm34.cjs";
26
+ import { i as sumOdfNodeLength, n as getOdfSpaceCount, r as measureOdfNodeLength, t as decodeOdfText } from "./text-Cal14ZaX.cjs";
27
+ import { a as resolveStyle, i as findStyleElement, n as StyleCascadeResult, o as resolveStyleElementChain, r as StyleElementChainResult, t as CascadeDiagnostic } from "./cascade-qYa3mgnE.cjs";
28
+ import { n as readOdfMetadata, t as META_PART } from "./metadata-frJqeeSB.cjs";
29
+ import { t as readOdfParagraph } from "./paragraph-9ii2naJC.cjs";
30
+ import { r as readOdfTable } from "./table-sweV3r9n.cjs";
31
+ import { a as composeOdfGroupTransform, c as resolveOdfShapeGeometry, i as applyOdfTransform, n as OdfShapeGeometry, o as netRotationDeg, r as OdfTransformFunction, s as parseOdfTransform, t as OdfPoint } from "./transform-DKEjydnm.cjs";
32
+ import { n as resolvePageLayoutProperties, t as resolveDrawPageSize } from "./masterpage-EmefIRgy.cjs";
33
+ import { a as buildOdfSubpaths, c as parseOdfViewBox, i as OdfViewBox, l as rawSubpathFromPoints, n as OdfRawSegment, o as parseOdfPathData, r as OdfRawSubpath, s as parseOdfPointsList, t as OdfRawPoint, u as scaleOdfRawPoint } from "./path-DE7wkIcz.cjs";
34
+ import { a as walkDrawShapes, i as readDrawPageContent, n as readDrawFrame, r as readDrawImageBlock, t as DrawPageContent } from "./shapes-CHc96HKu.cjs";
35
+ import { n as EmbeddedDrawObject, r as readDrawObjectReference, t as EmbeddedDocumentKind } from "./embedded-D7Kr1Sce.cjs";
36
+ import { n as readOdp, t as OdpDocument } from "./read-Bd16x8VD.cjs";
37
+ import { n as readOdt, t as OdtDocument } from "./read-BKS_zlGG.cjs";
38
+ import { n as readOdg, t as OdgDocument } from "./read-DapcRIZV.cjs";
39
+ import { n as readOds, t as OdsDocument } from "./read-D4DKvOY7.cjs";
40
+ import { i as readOdfFormulaDocument, r as readOdfFormula, t as OdfFormulaDocument } from "./read-DyR9HfLT.cjs";
41
+ import { n as OdmSection, r as readOdm, t as OdmDocument } from "./read-DNNf5_6n.cjs";
42
+ import { a as readOdbInventory, i as OdbQueryInfo, n as OdbConnectionInfo, o as resolveOdbComponent, r as OdbInventory, t as OdbComponentInfo } from "./read-DrdmKX0x.cjs";
43
+ import { n as subDocumentPackage, t as SubDocumentPackageOptions } from "./subdocument-CIxH3a5V.cjs";
44
+ import { i as readOdbForm, n as OdbFormControl, r as OdbFormDefinition, t as OdbForm } from "./form-BC-wb1M2.cjs";
45
+ import { a as OdbReportGroup, i as OdbReportFunction, n as OdbReportBand, o as readOdbReport, r as OdbReportElement, t as OdbReport } from "./report-BuCJ7_YU.cjs";
46
+ import { i as xmlCodec, n as encodePackage, r as packageCodec, t as decodePackage } from "./codec-Dg0R3WGd.cjs";
47
47
  export { type Alignment, AlignmentSchema, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type BuildManifestOptions, type CascadeDiagnostic, type DrawPageContent, type EmbeddedDocumentKind, type EmbeddedDrawObject, type ImageFormat, type InternRequest, type LengthUnit, MANIFEST_PART, META_PART, MIMETYPE_PART, type Manifest, type ManifestEntry, ManifestEntrySchema, type ManifestProblem, ManifestProblemSchema, ManifestSchema, ODF_MEDIA_TYPES, ODF_NAMESPACES, type OdbComponentInfo, type OdbConnectionInfo, type OdbForm, type OdbFormControl, type OdbFormDefinition, type OdbInventory, type OdbQueryInfo, type OdbReport, type OdbReportBand, type OdbReportElement, type OdbReportFunction, type OdbReportGroup, type OdfExtension, type OdfFormulaDocument, type OdfNamespacePrefix, type OdfPoint, type OdfRawPoint, type OdfRawSegment, type OdfRawSubpath, type OdfShapeGeometry, type OdfTransformFunction, type OdfViewBox, type OdgDocument, type OdmDocument, type OdmSection, type OdpDocument, type OdsDocument, type OdtDocument, type OtherPartRef, type Package, PackageSchema, type ParsedProperties, type Part, PartSchema, STYLE_FAMILIES, type StyleCascadeResult, type StyleElementChainResult, type StyleFamily, type StyleProperties, StylePropertiesSchema, StyleRegistry, type StyleRegistryOptions, type SubDocumentPackageOptions, TableCursor, type XmlCdata, XmlCdataSchema, type XmlComment, XmlCommentSchema, type XmlDeclaration, XmlDeclarationSchema, type XmlElement, XmlElementSchema, type XmlNode, XmlNodeSchema, type XmlPart, XmlPartSchema, type XmlPi, XmlPiSchema, type XmlText, XmlTextSchema, type ZipEntry, applyOdfTransform, attrValue, base64ToBytes, buildManifest, buildOdfSubpaths, buildStylePropertyElements, buildXml, bytesToBase64, canonicalPropertiesString, cellReference, childrenWithTag, columnIndexToLetters, columnLettersToIndex, composeOdfGroupTransform, decodeOdfText, decodePackage, decodeXmlText, el, elementsWithTag, encodePackage, encodeXmlText, ensureSpan, findChildElement, findStyleElement, formatOdfColor, formatOdfLength, formatPercentageMultiplier, formatPt, getOdfSpaceCount, isStyleFamily, isXmlNode, measureOdfNodeLength, mediaTypeForExtension, netRotationDeg, packageCodec, paragraphPropertiesToAttributes, parseBox, parseCellReference, parseOdfLength as parseLength, parseOdfLength, parseLinePoints, parseMargins, parseOdfColor, parseOdfPathData, parseOdfPointsList, parseOdfTransform, parseOdfViewBox, parsePackage, parsePageSize, parseParagraphProperties, parseStyleElementProperties, parseTextProperties, parseXml, rawSubpathFromPoints, readDrawFrame, readDrawImageBlock, readDrawObjectReference, readDrawPageContent, readManifest, readMimetype, readOdbForm, readOdbInventory, readOdbReport, readOdfFormula, readOdfFormulaDocument, readOdfMetadata, readOdfParagraph, readOdfTable, readOdg, readOdm, readOdp, readOds, readOdt, resolveDrawPageSize, resolveOdbComponent, resolveOdfShapeGeometry, resolvePageLayoutProperties, resolveStyle, resolveStyleElementChain, rootElement, scaleOdfRawPoint, serializePackage, setDocumentMediaType, sniffImageFormat, subDocumentPackage, sumOdfNodeLength, syncManifest, textPropertiesToAttributes, txt, unzipPackage, validateManifest, walkDrawShapes, writeManifest, writeMimetype, xmlCodec, xmlnsAttributes, zipPackage };
package/dist/index.d.ts CHANGED
@@ -1,47 +1,47 @@
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 { BinaryPart, BinaryPartSchema, Package, PackageSchema, Part, PartSchema, XmlPart, XmlPartSchema } from "./model/package.js";
3
- import { decodePackage, encodePackage, packageCodec, xmlCodec } from "./codec.js";
4
- import { ImageFormat, sniffImageFormat } from "./image/sniff.js";
5
- import { parsePackage } from "./package-io/read.js";
6
- import { MANIFEST_PART, MIMETYPE_PART, serializePackage } from "./package-io/write.js";
7
- import { parseXml } from "./xml/parse.js";
8
- import { buildXml } from "./xml/build.js";
9
- import { ZipEntry, unzipPackage, zipPackage } from "./zip.js";
10
- import { base64ToBytes, bytesToBase64 } from "./util/base64.js";
11
- import { ODF_NAMESPACES, OdfNamespacePrefix, xmlnsAttributes } from "./ns.js";
12
- import { ODF_MEDIA_TYPES, OdfExtension, mediaTypeForExtension } from "./media-type.js";
13
- import { readMimetype, writeMimetype } from "./mimetype.js";
14
- import { el, txt } from "./xml/fragment.js";
15
- import { decodeXmlText, encodeXmlText } from "./xml/entities.js";
16
- import { BuildManifestOptions, Manifest, ManifestEntry, ManifestEntrySchema, ManifestProblem, ManifestProblemSchema, ManifestSchema, buildManifest, readManifest, setDocumentMediaType, syncManifest, validateManifest, writeManifest } from "./manifest.js";
3
+ import { t as parsePackage } from "./read-DhLNXgiM.js";
4
+ import { n as MIMETYPE_PART, r as serializePackage, t as MANIFEST_PART } from "./write-C0nwVuPI.js";
5
+ import { t as parseXml } from "./parse-A8_8sdpX.js";
6
+ import { t as buildXml } from "./build-Z1KRkSEB.js";
7
+ import { n as unzipPackage, r as zipPackage, t as ZipEntry } from "./zip-ie17sOo5.js";
8
+ import { n as bytesToBase64, t as base64ToBytes } from "./base64--HuymRl_.js";
9
+ import { n as OdfNamespacePrefix, r as xmlnsAttributes, t as ODF_NAMESPACES } from "./ns-Cihto3Fx.js";
10
+ import { n as OdfExtension, r as mediaTypeForExtension, t as ODF_MEDIA_TYPES } from "./media-type-BOLkcHkJ.js";
11
+ import { n as sniffImageFormat, t as ImageFormat } from "./sniff-DjpnUZRp.js";
12
+ import { n as writeMimetype, t as readMimetype } from "./mimetype-uF-RHNpR.js";
13
+ import { n as txt, t as el } from "./fragment-B1ZV7T5Z.js";
14
+ import { n as encodeXmlText, t as decodeXmlText } from "./entities-BZlXvHqu.js";
15
+ import { a as ManifestProblem, c as buildManifest, d as syncManifest, f as validateManifest, i as ManifestEntrySchema, l as readManifest, n as Manifest, o as ManifestProblemSchema, p as writeManifest, r as ManifestEntry, s as ManifestSchema, t as BuildManifestOptions, u as setDocumentMediaType } from "./manifest-xxJ4FpSe.js";
16
+ import { a as formatPt, c as parseStyleElementProperties, i as formatPercentageMultiplier, l as parseTextProperties, n as StyleProperties, o as paragraphPropertiesToAttributes, r as StylePropertiesSchema, s as parseParagraphProperties, t as ParsedProperties, u as textPropertiesToAttributes } from "./properties-DjAIdPry.js";
17
+ import { n as canonicalPropertiesString, t as buildStylePropertyElements } from "./serialize-DvaE_t5D.js";
18
+ import { a as StyleRegistry, i as StyleFamily, n as OtherPartRef, o as StyleRegistryOptions, r as STYLE_FAMILIES, s as isStyleFamily, t as InternRequest } from "./registry-R43n1hcL.js";
19
+ import { t as ensureSpan } from "./span-KXroEGuH.js";
20
+ import { a as rootElement, i as findChildElement, n as childrenWithTag, r as elementsWithTag, t as attrValue } from "./query-sECN-7vU.js";
17
21
  import { n as formatOdfLength, r as parseOdfLength, t as LengthUnit } from "./units-7pCiECuP.js";
18
- import { ParsedProperties, StyleProperties, StylePropertiesSchema, formatPercentageMultiplier, formatPt, paragraphPropertiesToAttributes, parseParagraphProperties, parseStyleElementProperties, parseTextProperties, textPropertiesToAttributes } from "./styles/properties.js";
19
- import { buildStylePropertyElements, canonicalPropertiesString } from "./styles/serialize.js";
20
- import { InternRequest, OtherPartRef, STYLE_FAMILIES, StyleFamily, StyleRegistry, StyleRegistryOptions, isStyleFamily } from "./styles/registry.js";
21
- import { ensureSpan } from "./styles/span.js";
22
- import { attrValue, childrenWithTag, elementsWithTag, findChildElement, rootElement } from "./xml/query.js";
23
- import { TableCursor, cellReference, columnIndexToLetters, columnLettersToIndex, parseCellReference } from "./typed/shared/a1.js";
24
- import { formatOdfColor, parseOdfColor } from "./typed/shared/color.js";
25
- import { parseBox, parseLinePoints, parseMargins, parsePageSize } from "./typed/shared/geometry.js";
26
- import { Alignment, AlignmentSchema } from "./typed/shared/style.js";
27
- import { decodeOdfText, getOdfSpaceCount, measureOdfNodeLength, sumOdfNodeLength } from "./typed/shared/text.js";
28
- import { CascadeDiagnostic, StyleCascadeResult, StyleElementChainResult, findStyleElement, resolveStyle, resolveStyleElementChain } from "./typed/shared/cascade.js";
29
- import { META_PART, readOdfMetadata } from "./typed/shared/metadata.js";
30
- import { readOdfParagraph } from "./typed/shared/paragraph.js";
31
- import { readOdfTable } from "./typed/shared/table.js";
32
- import { OdfPoint, OdfShapeGeometry, OdfTransformFunction, applyOdfTransform, composeOdfGroupTransform, netRotationDeg, parseOdfTransform, resolveOdfShapeGeometry } from "./typed/shared/transform.js";
33
- import { resolveDrawPageSize, resolvePageLayoutProperties } from "./typed/shared/masterpage.js";
34
- import { OdfRawPoint, OdfRawSegment, OdfRawSubpath, OdfViewBox, buildOdfSubpaths, parseOdfPathData, parseOdfPointsList, parseOdfViewBox, rawSubpathFromPoints, scaleOdfRawPoint } from "./typed/shared/path.js";
35
- import { DrawPageContent, readDrawFrame, readDrawImageBlock, readDrawPageContent, walkDrawShapes } from "./typed/draw/shapes.js";
36
- import { EmbeddedDocumentKind, EmbeddedDrawObject, readDrawObjectReference } from "./typed/draw/embedded.js";
37
- import { OdpDocument, readOdp } from "./typed/odp/read.js";
38
- import { OdtDocument, readOdt } from "./typed/odt/read.js";
39
- import { OdgDocument, readOdg } from "./typed/odg/read.js";
40
- import { OdsDocument, readOds } from "./typed/ods/read.js";
41
- import { OdfFormulaDocument, readOdfFormula, readOdfFormulaDocument } from "./typed/formula/read.js";
42
- import { OdmDocument, OdmSection, readOdm } from "./typed/odm/read.js";
43
- import { OdbComponentInfo, OdbConnectionInfo, OdbInventory, OdbQueryInfo, readOdbInventory, resolveOdbComponent } from "./typed/odb/read.js";
44
- import { SubDocumentPackageOptions, subDocumentPackage } from "./typed/odb/subdocument.js";
45
- import { OdbForm, OdbFormControl, OdbFormDefinition, readOdbForm } from "./typed/odb/form.js";
46
- import { OdbReport, OdbReportBand, OdbReportElement, OdbReportFunction, OdbReportGroup, readOdbReport } from "./typed/odb/report.js";
22
+ import { a as parseCellReference, i as columnLettersToIndex, n as cellReference, r as columnIndexToLetters, t as TableCursor } from "./a1-5e9veCyu.js";
23
+ import { n as parseOdfColor, t as formatOdfColor } from "./color-CqXjt_to.js";
24
+ import { i as parsePageSize, n as parseLinePoints, r as parseMargins, t as parseBox } from "./geometry-DnhkIhAM.js";
25
+ import { n as AlignmentSchema, t as Alignment } from "./style-Jzwx2Q-Y.js";
26
+ import { i as sumOdfNodeLength, n as getOdfSpaceCount, r as measureOdfNodeLength, t as decodeOdfText } from "./text-CkNojpZm.js";
27
+ import { a as resolveStyle, i as findStyleElement, n as StyleCascadeResult, o as resolveStyleElementChain, r as StyleElementChainResult, t as CascadeDiagnostic } from "./cascade-8u4q16_U.js";
28
+ import { n as readOdfMetadata, t as META_PART } from "./metadata-32LoP2TK.js";
29
+ import { t as readOdfParagraph } from "./paragraph-DWNnedIE.js";
30
+ import { r as readOdfTable } from "./table-D81TZyBn.js";
31
+ import { a as composeOdfGroupTransform, c as resolveOdfShapeGeometry, i as applyOdfTransform, n as OdfShapeGeometry, o as netRotationDeg, r as OdfTransformFunction, s as parseOdfTransform, t as OdfPoint } from "./transform-C7GrZZdR.js";
32
+ import { n as resolvePageLayoutProperties, t as resolveDrawPageSize } from "./masterpage-7nBnqFj-.js";
33
+ import { a as buildOdfSubpaths, c as parseOdfViewBox, i as OdfViewBox, l as rawSubpathFromPoints, n as OdfRawSegment, o as parseOdfPathData, r as OdfRawSubpath, s as parseOdfPointsList, t as OdfRawPoint, u as scaleOdfRawPoint } from "./path-DE7wkIcz.js";
34
+ import { a as walkDrawShapes, i as readDrawPageContent, n as readDrawFrame, r as readDrawImageBlock, t as DrawPageContent } from "./shapes-BJAtBY24.js";
35
+ import { n as EmbeddedDrawObject, r as readDrawObjectReference, t as EmbeddedDocumentKind } from "./embedded-CNMqOrnt.js";
36
+ import { n as readOdp, t as OdpDocument } from "./read-CxdHrV1m.js";
37
+ import { n as readOdt, t as OdtDocument } from "./read-Dn9qyBBs.js";
38
+ import { n as readOdg, t as OdgDocument } from "./read-C7gT8wtc.js";
39
+ import { n as readOds, t as OdsDocument } from "./read-B0aBfNRf.js";
40
+ import { i as readOdfFormulaDocument, r as readOdfFormula, t as OdfFormulaDocument } from "./read-Bleh4LfR.js";
41
+ import { n as OdmSection, r as readOdm, t as OdmDocument } from "./read-BkFbEves.js";
42
+ import { a as readOdbInventory, i as OdbQueryInfo, n as OdbConnectionInfo, o as resolveOdbComponent, r as OdbInventory, t as OdbComponentInfo } from "./read-BoIUENWq.js";
43
+ import { n as subDocumentPackage, t as SubDocumentPackageOptions } from "./subdocument-DQNQF7wV.js";
44
+ import { i as readOdbForm, n as OdbFormControl, r as OdbFormDefinition, t as OdbForm } from "./form-DcGOX5RW.js";
45
+ import { a as OdbReportGroup, i as OdbReportFunction, n as OdbReportBand, o as readOdbReport, r as OdbReportElement, t as OdbReport } from "./report-MpwUgXbA.js";
46
+ import { i as xmlCodec, n as encodePackage, r as packageCodec, t as decodePackage } from "./codec-CqVFFwD0.js";
47
47
  export { type Alignment, AlignmentSchema, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type BuildManifestOptions, type CascadeDiagnostic, type DrawPageContent, type EmbeddedDocumentKind, type EmbeddedDrawObject, type ImageFormat, type InternRequest, type LengthUnit, MANIFEST_PART, META_PART, MIMETYPE_PART, type Manifest, type ManifestEntry, ManifestEntrySchema, type ManifestProblem, ManifestProblemSchema, ManifestSchema, ODF_MEDIA_TYPES, ODF_NAMESPACES, type OdbComponentInfo, type OdbConnectionInfo, type OdbForm, type OdbFormControl, type OdbFormDefinition, type OdbInventory, type OdbQueryInfo, type OdbReport, type OdbReportBand, type OdbReportElement, type OdbReportFunction, type OdbReportGroup, type OdfExtension, type OdfFormulaDocument, type OdfNamespacePrefix, type OdfPoint, type OdfRawPoint, type OdfRawSegment, type OdfRawSubpath, type OdfShapeGeometry, type OdfTransformFunction, type OdfViewBox, type OdgDocument, type OdmDocument, type OdmSection, type OdpDocument, type OdsDocument, type OdtDocument, type OtherPartRef, type Package, PackageSchema, type ParsedProperties, type Part, PartSchema, STYLE_FAMILIES, type StyleCascadeResult, type StyleElementChainResult, type StyleFamily, type StyleProperties, StylePropertiesSchema, StyleRegistry, type StyleRegistryOptions, type SubDocumentPackageOptions, TableCursor, type XmlCdata, XmlCdataSchema, type XmlComment, XmlCommentSchema, type XmlDeclaration, XmlDeclarationSchema, type XmlElement, XmlElementSchema, type XmlNode, XmlNodeSchema, type XmlPart, XmlPartSchema, type XmlPi, XmlPiSchema, type XmlText, XmlTextSchema, type ZipEntry, applyOdfTransform, attrValue, base64ToBytes, buildManifest, buildOdfSubpaths, buildStylePropertyElements, buildXml, bytesToBase64, canonicalPropertiesString, cellReference, childrenWithTag, columnIndexToLetters, columnLettersToIndex, composeOdfGroupTransform, decodeOdfText, decodePackage, decodeXmlText, el, elementsWithTag, encodePackage, encodeXmlText, ensureSpan, findChildElement, findStyleElement, formatOdfColor, formatOdfLength, formatPercentageMultiplier, formatPt, getOdfSpaceCount, isStyleFamily, isXmlNode, measureOdfNodeLength, mediaTypeForExtension, netRotationDeg, packageCodec, paragraphPropertiesToAttributes, parseBox, parseCellReference, parseOdfLength as parseLength, parseOdfLength, parseLinePoints, parseMargins, parseOdfColor, parseOdfPathData, parseOdfPointsList, parseOdfTransform, parseOdfViewBox, parsePackage, parsePageSize, parseParagraphProperties, parseStyleElementProperties, parseTextProperties, parseXml, rawSubpathFromPoints, readDrawFrame, readDrawImageBlock, readDrawObjectReference, readDrawPageContent, readManifest, readMimetype, readOdbForm, readOdbInventory, readOdbReport, readOdfFormula, readOdfFormulaDocument, readOdfMetadata, readOdfParagraph, readOdfTable, readOdg, readOdm, readOdp, readOds, readOdt, resolveDrawPageSize, resolveOdbComponent, resolveOdfShapeGeometry, resolvePageLayoutProperties, resolveStyle, resolveStyleElementChain, rootElement, scaleOdfRawPoint, serializePackage, setDocumentMediaType, sniffImageFormat, subDocumentPackage, sumOdfNodeLength, syncManifest, textPropertiesToAttributes, txt, unzipPackage, validateManifest, walkDrawShapes, writeManifest, writeMimetype, xmlCodec, xmlnsAttributes, zipPackage };
@@ -0,0 +1,40 @@
1
+ import { Package } from "./model/package.cjs";
2
+ import { z } from "zod";
3
+ //#region src/manifest.d.ts
4
+ declare const ManifestEntrySchema: z.ZodObject<{
5
+ fullPath: z.ZodString;
6
+ mediaType: z.ZodString;
7
+ version: z.ZodOptional<z.ZodString>;
8
+ }, z.core.$strip>;
9
+ type ManifestEntry = z.infer<typeof ManifestEntrySchema>;
10
+ declare const ManifestSchema: z.ZodObject<{
11
+ version: z.ZodString;
12
+ entries: z.ZodArray<z.ZodObject<{
13
+ fullPath: z.ZodString;
14
+ mediaType: z.ZodString;
15
+ version: z.ZodOptional<z.ZodString>;
16
+ }, z.core.$strip>>;
17
+ }, z.core.$strip>;
18
+ type Manifest = z.infer<typeof ManifestSchema>;
19
+ declare const ManifestProblemSchema: z.ZodObject<{
20
+ severity: z.ZodEnum<{
21
+ error: "error";
22
+ warning: "warning";
23
+ }>;
24
+ message: z.ZodString;
25
+ path: z.ZodOptional<z.ZodString>;
26
+ }, z.core.$strip>;
27
+ type ManifestProblem = z.infer<typeof ManifestProblemSchema>;
28
+ declare function readManifest(pkg: Package): Manifest;
29
+ interface BuildManifestOptions {
30
+ documentMediaType?: string;
31
+ version?: string;
32
+ mediaTypeOverrides?: Readonly<Record<string, string>>;
33
+ }
34
+ declare function buildManifest(pkg: Package, options?: BuildManifestOptions): Manifest;
35
+ declare function writeManifest(pkg: Package, manifest: Manifest): void;
36
+ declare function syncManifest(pkg: Package, options?: BuildManifestOptions): void;
37
+ declare function validateManifest(pkg: Package): ManifestProblem[];
38
+ declare function setDocumentMediaType(pkg: Package, mediaType: string, version?: string): void;
39
+ //#endregion
40
+ export { ManifestProblem as a, buildManifest as c, syncManifest as d, validateManifest as f, ManifestEntrySchema as i, readManifest as l, Manifest as n, ManifestProblemSchema as o, writeManifest as p, ManifestEntry as r, ManifestSchema as s, BuildManifestOptions as t, setDocumentMediaType as u };
@@ -0,0 +1,40 @@
1
+ import { Package } from "./model/package.js";
2
+ import { z } from "zod";
3
+ //#region src/manifest.d.ts
4
+ declare const ManifestEntrySchema: z.ZodObject<{
5
+ fullPath: z.ZodString;
6
+ mediaType: z.ZodString;
7
+ version: z.ZodOptional<z.ZodString>;
8
+ }, z.core.$strip>;
9
+ type ManifestEntry = z.infer<typeof ManifestEntrySchema>;
10
+ declare const ManifestSchema: z.ZodObject<{
11
+ version: z.ZodString;
12
+ entries: z.ZodArray<z.ZodObject<{
13
+ fullPath: z.ZodString;
14
+ mediaType: z.ZodString;
15
+ version: z.ZodOptional<z.ZodString>;
16
+ }, z.core.$strip>>;
17
+ }, z.core.$strip>;
18
+ type Manifest = z.infer<typeof ManifestSchema>;
19
+ declare const ManifestProblemSchema: z.ZodObject<{
20
+ severity: z.ZodEnum<{
21
+ error: "error";
22
+ warning: "warning";
23
+ }>;
24
+ message: z.ZodString;
25
+ path: z.ZodOptional<z.ZodString>;
26
+ }, z.core.$strip>;
27
+ type ManifestProblem = z.infer<typeof ManifestProblemSchema>;
28
+ declare function readManifest(pkg: Package): Manifest;
29
+ interface BuildManifestOptions {
30
+ documentMediaType?: string;
31
+ version?: string;
32
+ mediaTypeOverrides?: Readonly<Record<string, string>>;
33
+ }
34
+ declare function buildManifest(pkg: Package, options?: BuildManifestOptions): Manifest;
35
+ declare function writeManifest(pkg: Package, manifest: Manifest): void;
36
+ declare function syncManifest(pkg: Package, options?: BuildManifestOptions): void;
37
+ declare function validateManifest(pkg: Package): ManifestProblem[];
38
+ declare function setDocumentMediaType(pkg: Package, mediaType: string, version?: string): void;
39
+ //#endregion
40
+ export { ManifestProblem as a, buildManifest as c, syncManifest as d, validateManifest as f, ManifestEntrySchema as i, readManifest as l, Manifest as n, ManifestProblemSchema as o, writeManifest as p, ManifestEntry as r, ManifestSchema as s, BuildManifestOptions as t, setDocumentMediaType as u };
package/dist/manifest.cjs CHANGED
@@ -240,7 +240,6 @@ function setDocumentMediaType(pkg, mediaType, version = DEFAULT_MANIFEST_VERSION
240
240
  });
241
241
  }
242
242
  //#endregion
243
- exports.MANIFEST_PART = require_package_io_write.MANIFEST_PART;
244
243
  exports.ManifestEntrySchema = ManifestEntrySchema;
245
244
  exports.ManifestProblemSchema = ManifestProblemSchema;
246
245
  exports.ManifestSchema = ManifestSchema;
@@ -1,41 +1,2 @@
1
- import { Package } from "./model/package.cjs";
2
- import { MANIFEST_PART } from "./package-io/write.cjs";
3
- import { z } from "zod";
4
- //#region src/manifest.d.ts
5
- declare const ManifestEntrySchema: z.ZodObject<{
6
- fullPath: z.ZodString;
7
- mediaType: z.ZodString;
8
- version: z.ZodOptional<z.ZodString>;
9
- }, z.core.$strip>;
10
- type ManifestEntry = z.infer<typeof ManifestEntrySchema>;
11
- declare const ManifestSchema: z.ZodObject<{
12
- version: z.ZodString;
13
- entries: z.ZodArray<z.ZodObject<{
14
- fullPath: z.ZodString;
15
- mediaType: z.ZodString;
16
- version: z.ZodOptional<z.ZodString>;
17
- }, z.core.$strip>>;
18
- }, z.core.$strip>;
19
- type Manifest = z.infer<typeof ManifestSchema>;
20
- declare const ManifestProblemSchema: z.ZodObject<{
21
- severity: z.ZodEnum<{
22
- error: "error";
23
- warning: "warning";
24
- }>;
25
- message: z.ZodString;
26
- path: z.ZodOptional<z.ZodString>;
27
- }, z.core.$strip>;
28
- type ManifestProblem = z.infer<typeof ManifestProblemSchema>;
29
- declare function readManifest(pkg: Package): Manifest;
30
- interface BuildManifestOptions {
31
- documentMediaType?: string;
32
- version?: string;
33
- mediaTypeOverrides?: Readonly<Record<string, string>>;
34
- }
35
- declare function buildManifest(pkg: Package, options?: BuildManifestOptions): Manifest;
36
- declare function writeManifest(pkg: Package, manifest: Manifest): void;
37
- declare function syncManifest(pkg: Package, options?: BuildManifestOptions): void;
38
- declare function validateManifest(pkg: Package): ManifestProblem[];
39
- declare function setDocumentMediaType(pkg: Package, mediaType: string, version?: string): void;
40
- //#endregion
41
- export { BuildManifestOptions, MANIFEST_PART, Manifest, ManifestEntry, ManifestEntrySchema, ManifestProblem, ManifestProblemSchema, ManifestSchema, buildManifest, readManifest, setDocumentMediaType, syncManifest, validateManifest, writeManifest };
1
+ import { a as ManifestProblem, c as buildManifest, d as syncManifest, f as validateManifest, i as ManifestEntrySchema, l as readManifest, n as Manifest, o as ManifestProblemSchema, p as writeManifest, r as ManifestEntry, s as ManifestSchema, t as BuildManifestOptions, u as setDocumentMediaType } from "./manifest-CmsCOCEi.cjs";
2
+ export { BuildManifestOptions, Manifest, ManifestEntry, ManifestEntrySchema, ManifestProblem, ManifestProblemSchema, ManifestSchema, buildManifest, readManifest, setDocumentMediaType, syncManifest, validateManifest, writeManifest };
@@ -1,41 +1,2 @@
1
- import { Package } from "./model/package.js";
2
- import { MANIFEST_PART } from "./package-io/write.js";
3
- import { z } from "zod";
4
- //#region src/manifest.d.ts
5
- declare const ManifestEntrySchema: z.ZodObject<{
6
- fullPath: z.ZodString;
7
- mediaType: z.ZodString;
8
- version: z.ZodOptional<z.ZodString>;
9
- }, z.core.$strip>;
10
- type ManifestEntry = z.infer<typeof ManifestEntrySchema>;
11
- declare const ManifestSchema: z.ZodObject<{
12
- version: z.ZodString;
13
- entries: z.ZodArray<z.ZodObject<{
14
- fullPath: z.ZodString;
15
- mediaType: z.ZodString;
16
- version: z.ZodOptional<z.ZodString>;
17
- }, z.core.$strip>>;
18
- }, z.core.$strip>;
19
- type Manifest = z.infer<typeof ManifestSchema>;
20
- declare const ManifestProblemSchema: z.ZodObject<{
21
- severity: z.ZodEnum<{
22
- error: "error";
23
- warning: "warning";
24
- }>;
25
- message: z.ZodString;
26
- path: z.ZodOptional<z.ZodString>;
27
- }, z.core.$strip>;
28
- type ManifestProblem = z.infer<typeof ManifestProblemSchema>;
29
- declare function readManifest(pkg: Package): Manifest;
30
- interface BuildManifestOptions {
31
- documentMediaType?: string;
32
- version?: string;
33
- mediaTypeOverrides?: Readonly<Record<string, string>>;
34
- }
35
- declare function buildManifest(pkg: Package, options?: BuildManifestOptions): Manifest;
36
- declare function writeManifest(pkg: Package, manifest: Manifest): void;
37
- declare function syncManifest(pkg: Package, options?: BuildManifestOptions): void;
38
- declare function validateManifest(pkg: Package): ManifestProblem[];
39
- declare function setDocumentMediaType(pkg: Package, mediaType: string, version?: string): void;
40
- //#endregion
41
- export { BuildManifestOptions, MANIFEST_PART, Manifest, ManifestEntry, ManifestEntrySchema, ManifestProblem, ManifestProblemSchema, ManifestSchema, buildManifest, readManifest, setDocumentMediaType, syncManifest, validateManifest, writeManifest };
1
+ import { a as ManifestProblem, c as buildManifest, d as syncManifest, f as validateManifest, i as ManifestEntrySchema, l as readManifest, n as Manifest, o as ManifestProblemSchema, p as writeManifest, r as ManifestEntry, s as ManifestSchema, t as BuildManifestOptions, u as setDocumentMediaType } from "./manifest-xxJ4FpSe.js";
2
+ export { BuildManifestOptions, Manifest, ManifestEntry, ManifestEntrySchema, ManifestProblem, ManifestProblemSchema, ManifestSchema, buildManifest, readManifest, setDocumentMediaType, syncManifest, validateManifest, writeManifest };
package/dist/manifest.js CHANGED
@@ -239,4 +239,4 @@ function setDocumentMediaType(pkg, mediaType, version = DEFAULT_MANIFEST_VERSION
239
239
  });
240
240
  }
241
241
  //#endregion
242
- export { MANIFEST_PART, ManifestEntrySchema, ManifestProblemSchema, ManifestSchema, buildManifest, readManifest, setDocumentMediaType, syncManifest, validateManifest, writeManifest };
242
+ export { ManifestEntrySchema, ManifestProblemSchema, ManifestSchema, buildManifest, readManifest, setDocumentMediaType, syncManifest, validateManifest, writeManifest };
@@ -0,0 +1,8 @@
1
+ import { l as XmlElement } from "./node-CkBWRjNR.js";
2
+ import { Package } from "./model/package.js";
3
+ import { PageSize } from "document-schema.js";
4
+ //#region src/typed/shared/masterpage.d.ts
5
+ declare function resolvePageLayoutProperties(pkg: Package, masterPageName: string | undefined): XmlElement | undefined;
6
+ declare function resolveDrawPageSize(page: XmlElement, pkg: Package): PageSize | undefined;
7
+ //#endregion
8
+ export { resolvePageLayoutProperties as n, resolveDrawPageSize as t };
@@ -0,0 +1,8 @@
1
+ import { l as XmlElement } from "./node-CkBWRjNR.cjs";
2
+ import { Package } from "./model/package.cjs";
3
+ import { PageSize } from "document-schema.js";
4
+ //#region src/typed/shared/masterpage.d.ts
5
+ declare function resolvePageLayoutProperties(pkg: Package, masterPageName: string | undefined): XmlElement | undefined;
6
+ declare function resolveDrawPageSize(page: XmlElement, pkg: Package): PageSize | undefined;
7
+ //#endregion
8
+ export { resolvePageLayoutProperties as n, resolveDrawPageSize as t };
@@ -0,0 +1,20 @@
1
+ //#region src/media-type.d.ts
2
+ declare const ODF_MEDIA_TYPES: Readonly<{
3
+ odt: "application/vnd.oasis.opendocument.text";
4
+ ott: "application/vnd.oasis.opendocument.text-template";
5
+ ods: "application/vnd.oasis.opendocument.spreadsheet";
6
+ ots: "application/vnd.oasis.opendocument.spreadsheet-template";
7
+ odp: "application/vnd.oasis.opendocument.presentation";
8
+ otp: "application/vnd.oasis.opendocument.presentation-template";
9
+ odg: "application/vnd.oasis.opendocument.graphics";
10
+ otg: "application/vnd.oasis.opendocument.graphics-template";
11
+ odf: "application/vnd.oasis.opendocument.formula";
12
+ otf: "application/vnd.oasis.opendocument.formula-template";
13
+ odm: "application/vnd.oasis.opendocument.text-master";
14
+ otm: "application/vnd.oasis.opendocument.text-master-template";
15
+ odb: "application/vnd.oasis.opendocument.base";
16
+ }>;
17
+ type OdfExtension = keyof typeof ODF_MEDIA_TYPES;
18
+ declare function mediaTypeForExtension(extension: string): string | undefined;
19
+ //#endregion
20
+ export { OdfExtension as n, mediaTypeForExtension as r, ODF_MEDIA_TYPES as t };
@@ -0,0 +1,20 @@
1
+ //#region src/media-type.d.ts
2
+ declare const ODF_MEDIA_TYPES: Readonly<{
3
+ odt: "application/vnd.oasis.opendocument.text";
4
+ ott: "application/vnd.oasis.opendocument.text-template";
5
+ ods: "application/vnd.oasis.opendocument.spreadsheet";
6
+ ots: "application/vnd.oasis.opendocument.spreadsheet-template";
7
+ odp: "application/vnd.oasis.opendocument.presentation";
8
+ otp: "application/vnd.oasis.opendocument.presentation-template";
9
+ odg: "application/vnd.oasis.opendocument.graphics";
10
+ otg: "application/vnd.oasis.opendocument.graphics-template";
11
+ odf: "application/vnd.oasis.opendocument.formula";
12
+ otf: "application/vnd.oasis.opendocument.formula-template";
13
+ odm: "application/vnd.oasis.opendocument.text-master";
14
+ otm: "application/vnd.oasis.opendocument.text-master-template";
15
+ odb: "application/vnd.oasis.opendocument.base";
16
+ }>;
17
+ type OdfExtension = keyof typeof ODF_MEDIA_TYPES;
18
+ declare function mediaTypeForExtension(extension: string): string | undefined;
19
+ //#endregion
20
+ export { OdfExtension as n, mediaTypeForExtension as r, ODF_MEDIA_TYPES as t };
@@ -1,20 +1,2 @@
1
- //#region src/media-type.d.ts
2
- declare const ODF_MEDIA_TYPES: Readonly<{
3
- odt: "application/vnd.oasis.opendocument.text";
4
- ott: "application/vnd.oasis.opendocument.text-template";
5
- ods: "application/vnd.oasis.opendocument.spreadsheet";
6
- ots: "application/vnd.oasis.opendocument.spreadsheet-template";
7
- odp: "application/vnd.oasis.opendocument.presentation";
8
- otp: "application/vnd.oasis.opendocument.presentation-template";
9
- odg: "application/vnd.oasis.opendocument.graphics";
10
- otg: "application/vnd.oasis.opendocument.graphics-template";
11
- odf: "application/vnd.oasis.opendocument.formula";
12
- otf: "application/vnd.oasis.opendocument.formula-template";
13
- odm: "application/vnd.oasis.opendocument.text-master";
14
- otm: "application/vnd.oasis.opendocument.text-master-template";
15
- odb: "application/vnd.oasis.opendocument.base";
16
- }>;
17
- type OdfExtension = keyof typeof ODF_MEDIA_TYPES;
18
- declare function mediaTypeForExtension(extension: string): string | undefined;
19
- //#endregion
1
+ import { n as OdfExtension, r as mediaTypeForExtension, t as ODF_MEDIA_TYPES } from "./media-type-BOLkcHkJ.cjs";
20
2
  export { ODF_MEDIA_TYPES, OdfExtension, mediaTypeForExtension };
@@ -1,20 +1,2 @@
1
- //#region src/media-type.d.ts
2
- declare const ODF_MEDIA_TYPES: Readonly<{
3
- odt: "application/vnd.oasis.opendocument.text";
4
- ott: "application/vnd.oasis.opendocument.text-template";
5
- ods: "application/vnd.oasis.opendocument.spreadsheet";
6
- ots: "application/vnd.oasis.opendocument.spreadsheet-template";
7
- odp: "application/vnd.oasis.opendocument.presentation";
8
- otp: "application/vnd.oasis.opendocument.presentation-template";
9
- odg: "application/vnd.oasis.opendocument.graphics";
10
- otg: "application/vnd.oasis.opendocument.graphics-template";
11
- odf: "application/vnd.oasis.opendocument.formula";
12
- otf: "application/vnd.oasis.opendocument.formula-template";
13
- odm: "application/vnd.oasis.opendocument.text-master";
14
- otm: "application/vnd.oasis.opendocument.text-master-template";
15
- odb: "application/vnd.oasis.opendocument.base";
16
- }>;
17
- type OdfExtension = keyof typeof ODF_MEDIA_TYPES;
18
- declare function mediaTypeForExtension(extension: string): string | undefined;
19
- //#endregion
1
+ import { n as OdfExtension, r as mediaTypeForExtension, t as ODF_MEDIA_TYPES } from "./media-type-BOLkcHkJ.js";
20
2
  export { ODF_MEDIA_TYPES, OdfExtension, mediaTypeForExtension };
@@ -0,0 +1,7 @@
1
+ import { Package } from "./model/package.js";
2
+ import { LayoutMetadata } from "document-schema.js";
3
+ //#region src/typed/shared/metadata.d.ts
4
+ declare const META_PART = "meta.xml";
5
+ declare function readOdfMetadata(pkg: Package): LayoutMetadata;
6
+ //#endregion
7
+ export { readOdfMetadata as n, META_PART as t };
@@ -0,0 +1,7 @@
1
+ import { Package } from "./model/package.cjs";
2
+ import { LayoutMetadata } from "document-schema.js";
3
+ //#region src/typed/shared/metadata.d.ts
4
+ declare const META_PART = "meta.xml";
5
+ declare function readOdfMetadata(pkg: Package): LayoutMetadata;
6
+ //#endregion
7
+ export { readOdfMetadata as n, META_PART as t };
@@ -0,0 +1,6 @@
1
+ import { Package } from "./model/package.cjs";
2
+ //#region src/mimetype.d.ts
3
+ declare function readMimetype(pkg: Package): string | undefined;
4
+ declare function writeMimetype(pkg: Package, mediaType: string): void;
5
+ //#endregion
6
+ export { writeMimetype as n, readMimetype as t };
@@ -0,0 +1,6 @@
1
+ import { Package } from "./model/package.js";
2
+ //#region src/mimetype.d.ts
3
+ declare function readMimetype(pkg: Package): string | undefined;
4
+ declare function writeMimetype(pkg: Package, mediaType: string): void;
5
+ //#endregion
6
+ export { writeMimetype as n, readMimetype as t };
package/dist/mimetype.cjs CHANGED
@@ -14,6 +14,5 @@ function writeMimetype(pkg, mediaType) {
14
14
  };
15
15
  }
16
16
  //#endregion
17
- exports.MIMETYPE_PART = require_package_io_write.MIMETYPE_PART;
18
17
  exports.readMimetype = readMimetype;
19
18
  exports.writeMimetype = writeMimetype;