odf.js 2.7.1 → 2.7.3

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 (88) hide show
  1. package/dist/a1-5e9veCyu.d.ts +18 -0
  2. package/dist/base64--HuymRl_.d.ts +5 -0
  3. package/dist/build-Z1KRkSEB.d.ts +5 -0
  4. package/dist/cascade-8u4q16_U.d.ts +22 -0
  5. package/dist/codec-C0HcLUmU.d.ts +107 -0
  6. package/dist/codec.d.ts +1 -71
  7. package/dist/color-CqXjt_to.d.ts +6 -0
  8. package/dist/embedded-CNMqOrnt.d.ts +13 -0
  9. package/dist/entities-BZlXvHqu.d.ts +5 -0
  10. package/dist/form-DcGOX5RW.d.ts +31 -0
  11. package/dist/fragment-B1ZV7T5Z.d.ts +6 -0
  12. package/dist/geometry-DnhkIhAM.d.ts +12 -0
  13. package/dist/image/sniff.d.ts +1 -4
  14. package/dist/index.d.ts +43 -44
  15. package/dist/manifest-xxJ4FpSe.d.ts +40 -0
  16. package/dist/manifest.d.ts +1 -39
  17. package/dist/masterpage-7nBnqFj-.d.ts +8 -0
  18. package/dist/media-type-BOLkcHkJ.d.ts +20 -0
  19. package/dist/media-type.d.ts +1 -19
  20. package/dist/metadata-32LoP2TK.d.ts +7 -0
  21. package/dist/mimetype-uF-RHNpR.d.ts +6 -0
  22. package/dist/mimetype.d.ts +1 -5
  23. package/dist/ns-Cihto3Fx.d.ts +33 -0
  24. package/dist/ns.d.ts +1 -32
  25. package/dist/package-io/read.d.ts +1 -4
  26. package/dist/package-io/write.d.ts +1 -6
  27. package/dist/paragraph-DWNnedIE.d.ts +7 -0
  28. package/dist/parse-A8_8sdpX.d.ts +5 -0
  29. package/dist/path-DE7wkIcz.d.ts +34 -0
  30. package/dist/properties-DjAIdPry.d.ts +44 -0
  31. package/dist/query-sECN-7vU.d.ts +9 -0
  32. package/dist/read-B0aBfNRf.d.ts +10 -0
  33. package/dist/read-BkFbEves.d.ts +15 -0
  34. package/dist/read-Bleh4LfR.d.ts +14 -0
  35. package/dist/read-BoIUENWq.d.ts +28 -0
  36. package/dist/read-C7gT8wtc.d.ts +10 -0
  37. package/dist/read-CxdHrV1m.d.ts +10 -0
  38. package/dist/read-DhLNXgiM.d.ts +5 -0
  39. package/dist/read-Dn9qyBBs.d.ts +10 -0
  40. package/dist/registry-R43n1hcL.d.ts +37 -0
  41. package/dist/report-MpwUgXbA.d.ts +48 -0
  42. package/dist/serialize-DvaE_t5D.d.ts +7 -0
  43. package/dist/shapes-BJAtBY24.d.ts +18 -0
  44. package/dist/sniff-DjpnUZRp.d.ts +5 -0
  45. package/dist/span-KXroEGuH.d.ts +5 -0
  46. package/dist/styles/properties.d.ts +1 -43
  47. package/dist/styles/registry.d.ts +1 -36
  48. package/dist/styles/serialize.d.ts +1 -6
  49. package/dist/styles/span.d.ts +1 -4
  50. package/dist/subdocument-DQNQF7wV.d.ts +8 -0
  51. package/dist/table-D81TZyBn.d.ts +14 -0
  52. package/dist/text-CkNojpZm.d.ts +8 -0
  53. package/dist/transform-C7GrZZdR.d.ts +26 -0
  54. package/dist/typed/draw/embedded.d.ts +1 -12
  55. package/dist/typed/draw/shapes.d.ts +1 -17
  56. package/dist/typed/formula/read.d.ts +1 -13
  57. package/dist/typed/odb/form.d.ts +1 -30
  58. package/dist/typed/odb/read.d.ts +1 -27
  59. package/dist/typed/odb/report.d.ts +1 -47
  60. package/dist/typed/odb/subdocument.d.ts +1 -7
  61. package/dist/typed/odg/read.d.ts +1 -9
  62. package/dist/typed/odm/read.d.ts +1 -14
  63. package/dist/typed/odp/read.d.ts +1 -9
  64. package/dist/typed/ods/read.d.ts +1 -9
  65. package/dist/typed/odt/read.d.ts +1 -9
  66. package/dist/typed/shared/a1.d.ts +1 -17
  67. package/dist/typed/shared/cascade.d.ts +1 -21
  68. package/dist/typed/shared/color.d.ts +1 -5
  69. package/dist/typed/shared/geometry.d.ts +1 -11
  70. package/dist/typed/shared/masterpage.d.ts +1 -7
  71. package/dist/typed/shared/metadata.d.ts +1 -6
  72. package/dist/typed/shared/paragraph.d.ts +1 -6
  73. package/dist/typed/shared/path.d.ts +1 -33
  74. package/dist/typed/shared/table.d.ts +1 -13
  75. package/dist/typed/shared/text.d.ts +1 -7
  76. package/dist/typed/shared/transform.d.ts +1 -25
  77. package/dist/typed/shared/units.d.ts +1 -5
  78. package/dist/units-7pCiECuP.d.ts +6 -0
  79. package/dist/util/base64.d.ts +1 -4
  80. package/dist/write-C0nwVuPI.d.ts +7 -0
  81. package/dist/xml/build.d.ts +1 -4
  82. package/dist/xml/entities.d.ts +1 -4
  83. package/dist/xml/fragment.d.ts +1 -5
  84. package/dist/xml/parse.d.ts +1 -4
  85. package/dist/xml/query.d.ts +1 -8
  86. package/dist/zip-ie17sOo5.d.ts +9 -0
  87. package/dist/zip.d.ts +1 -8
  88. package/package.json +1 -1
@@ -0,0 +1,18 @@
1
+ //#region src/typed/shared/a1.d.ts
2
+ declare function columnIndexToLetters(index: number): string;
3
+ declare function cellReference(columnIndex: number, rowIndex: number): string;
4
+ declare function columnLettersToIndex(letters: string): number | undefined;
5
+ declare function parseCellReference(reference: string): {
6
+ column: number;
7
+ row: number;
8
+ } | undefined;
9
+ declare class TableCursor {
10
+ private columnCursor;
11
+ private rowCursor;
12
+ get columnIndex(): number;
13
+ get rowIndex(): number;
14
+ nextCell(repeatCount?: number): string;
15
+ nextRow(repeatCount?: number): void;
16
+ }
17
+ //#endregion
18
+ export { parseCellReference as a, columnLettersToIndex as i, cellReference as n, columnIndexToLetters as r, TableCursor as t };
@@ -0,0 +1,5 @@
1
+ //#region src/util/base64.d.ts
2
+ declare function bytesToBase64(bytes: Uint8Array<ArrayBuffer>): string;
3
+ declare function base64ToBytes(b64: string): Uint8Array<ArrayBuffer>;
4
+ //#endregion
5
+ export { bytesToBase64 as n, base64ToBytes as t };
@@ -0,0 +1,5 @@
1
+ import { d as XmlNode } from "./node-CkBWRjNR.js";
2
+ //#region src/xml/build.d.ts
3
+ declare function buildXml(nodes: XmlNode[]): string;
4
+ //#endregion
5
+ export { buildXml as t };
@@ -0,0 +1,22 @@
1
+ import { l as XmlElement } from "./node-CkBWRjNR.js";
2
+ import { Package } from "./model/package.js";
3
+ import { n as StyleProperties } from "./properties-DjAIdPry.js";
4
+ import { i as StyleFamily } from "./registry-R43n1hcL.js";
5
+ //#region src/typed/shared/cascade.d.ts
6
+ interface CascadeDiagnostic {
7
+ severity: 'warning';
8
+ message: string;
9
+ }
10
+ interface StyleCascadeResult {
11
+ properties: StyleProperties;
12
+ diagnostics: CascadeDiagnostic[];
13
+ }
14
+ interface StyleElementChainResult {
15
+ elements: XmlElement[];
16
+ diagnostics: CascadeDiagnostic[];
17
+ }
18
+ declare function resolveStyleElementChain(styleName: string | undefined, family: StyleFamily, pkg: Package): StyleElementChainResult;
19
+ declare function resolveStyle(styleName: string | undefined, family: StyleFamily, pkg: Package): StyleCascadeResult;
20
+ declare function findStyleElement(styleName: string, family: StyleFamily, pkg: Package): XmlElement | undefined;
21
+ //#endregion
22
+ export { resolveStyle as a, findStyleElement as i, StyleCascadeResult as n, resolveStyleElementChain as o, StyleElementChainResult as r, CascadeDiagnostic as t };
@@ -0,0 +1,107 @@
1
+ import { d as XmlNode } from "./node-CkBWRjNR.js";
2
+ import { Package } from "./model/package.js";
3
+ import "./read-DhLNXgiM.js";
4
+ import "./write-C0nwVuPI.js";
5
+ import "./parse-A8_8sdpX.js";
6
+ import "./build-Z1KRkSEB.js";
7
+ import "./mimetype-uF-RHNpR.js";
8
+ import "./fragment-B1ZV7T5Z.js";
9
+ import "./manifest-xxJ4FpSe.js";
10
+ import "./properties-DjAIdPry.js";
11
+ import "./serialize-DvaE_t5D.js";
12
+ import "./registry-R43n1hcL.js";
13
+ import "./span-KXroEGuH.js";
14
+ import "./query-sECN-7vU.js";
15
+ import "./color-CqXjt_to.js";
16
+ import "./geometry-DnhkIhAM.js";
17
+ import "./text-CkNojpZm.js";
18
+ import "./cascade-8u4q16_U.js";
19
+ import "./metadata-32LoP2TK.js";
20
+ import "./paragraph-DWNnedIE.js";
21
+ import "./table-D81TZyBn.js";
22
+ import "./transform-C7GrZZdR.js";
23
+ import "./masterpage-7nBnqFj-.js";
24
+ import "./path-DE7wkIcz.js";
25
+ import "./shapes-BJAtBY24.js";
26
+ import "./embedded-CNMqOrnt.js";
27
+ import "./read-CxdHrV1m.js";
28
+ import "./read-Dn9qyBBs.js";
29
+ import "./read-C7gT8wtc.js";
30
+ import "./read-B0aBfNRf.js";
31
+ import "./read-Bleh4LfR.js";
32
+ import "./read-BkFbEves.js";
33
+ import "./read-BoIUENWq.js";
34
+ import "./subdocument-DQNQF7wV.js";
35
+ import "./form-DcGOX5RW.js";
36
+ import "./report-MpwUgXbA.js";
37
+ import { z } from "zod";
38
+ import { Alignment as Alignment$1, AlignmentSchema as AlignmentSchema$1 } from "document-schema.js";
39
+ //#region src/codec.d.ts
40
+ declare const xmlCodec: z.ZodCodec<z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
41
+ type: z.ZodLiteral<"text">;
42
+ value: z.ZodString;
43
+ }, z.core.$strip>, z.ZodObject<{
44
+ type: z.ZodLiteral<"cdata">;
45
+ value: z.ZodString;
46
+ }, z.core.$strip>, z.ZodObject<{
47
+ type: z.ZodLiteral<"comment">;
48
+ value: z.ZodString;
49
+ }, z.core.$strip>, z.ZodObject<{
50
+ type: z.ZodLiteral<"declaration">;
51
+ attributes: z.ZodArray<z.ZodObject<{
52
+ name: z.ZodString;
53
+ value: z.ZodString;
54
+ }, z.core.$strip>>;
55
+ }, z.core.$strip>, z.ZodObject<{
56
+ type: z.ZodLiteral<"pi">;
57
+ target: z.ZodString;
58
+ content: z.ZodString;
59
+ }, z.core.$strip>, z.ZodObject<{
60
+ type: z.ZodLiteral<"element">;
61
+ tag: z.ZodString;
62
+ attributes: z.ZodArray<z.ZodObject<{
63
+ name: z.ZodString;
64
+ value: z.ZodString;
65
+ }, z.core.$strip>>;
66
+ children: z.ZodArray<z.ZodCustom<XmlNode, XmlNode>>;
67
+ }, z.core.$strip>], "type">>>;
68
+ declare const packageCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodObject<{
69
+ parts: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
70
+ kind: z.ZodLiteral<"xml">;
71
+ nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
72
+ type: z.ZodLiteral<"text">;
73
+ value: z.ZodString;
74
+ }, z.core.$strip>, z.ZodObject<{
75
+ type: z.ZodLiteral<"cdata">;
76
+ value: z.ZodString;
77
+ }, z.core.$strip>, z.ZodObject<{
78
+ type: z.ZodLiteral<"comment">;
79
+ value: z.ZodString;
80
+ }, z.core.$strip>, z.ZodObject<{
81
+ type: z.ZodLiteral<"declaration">;
82
+ attributes: z.ZodArray<z.ZodObject<{
83
+ name: z.ZodString;
84
+ value: z.ZodString;
85
+ }, z.core.$strip>>;
86
+ }, z.core.$strip>, z.ZodObject<{
87
+ type: z.ZodLiteral<"pi">;
88
+ target: z.ZodString;
89
+ content: z.ZodString;
90
+ }, z.core.$strip>, z.ZodObject<{
91
+ type: z.ZodLiteral<"element">;
92
+ tag: z.ZodString;
93
+ attributes: z.ZodArray<z.ZodObject<{
94
+ name: z.ZodString;
95
+ value: z.ZodString;
96
+ }, z.core.$strip>>;
97
+ children: z.ZodArray<z.ZodCustom<XmlNode, XmlNode>>;
98
+ }, z.core.$strip>], "type">>;
99
+ }, z.core.$strip>, z.ZodObject<{
100
+ kind: z.ZodLiteral<"binary">;
101
+ base64: z.ZodString;
102
+ }, z.core.$strip>], "kind">>;
103
+ }, z.core.$strip>>;
104
+ declare function decodePackage(bytes: Uint8Array<ArrayBuffer>): Package;
105
+ declare function encodePackage(pkg: Package): Uint8Array<ArrayBuffer>;
106
+ //#endregion
107
+ export { Alignment$1 as a, xmlCodec as i, encodePackage as n, AlignmentSchema$1 as o, packageCodec as r, decodePackage as t };
package/dist/codec.d.ts CHANGED
@@ -1,72 +1,2 @@
1
- import { d as XmlNode } from "./node-CkBWRjNR.js";
2
- import { Package } from "./model/package.js";
3
- import { z } from "zod";
4
- //#region src/codec.d.ts
5
- declare const xmlCodec: z.ZodCodec<z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
6
- type: z.ZodLiteral<"text">;
7
- value: z.ZodString;
8
- }, z.core.$strip>, z.ZodObject<{
9
- type: z.ZodLiteral<"cdata">;
10
- value: z.ZodString;
11
- }, z.core.$strip>, z.ZodObject<{
12
- type: z.ZodLiteral<"comment">;
13
- value: z.ZodString;
14
- }, z.core.$strip>, z.ZodObject<{
15
- type: z.ZodLiteral<"declaration">;
16
- attributes: z.ZodArray<z.ZodObject<{
17
- name: z.ZodString;
18
- value: z.ZodString;
19
- }, z.core.$strip>>;
20
- }, z.core.$strip>, z.ZodObject<{
21
- type: z.ZodLiteral<"pi">;
22
- target: z.ZodString;
23
- content: z.ZodString;
24
- }, z.core.$strip>, z.ZodObject<{
25
- type: z.ZodLiteral<"element">;
26
- tag: z.ZodString;
27
- attributes: z.ZodArray<z.ZodObject<{
28
- name: z.ZodString;
29
- value: z.ZodString;
30
- }, z.core.$strip>>;
31
- children: z.ZodArray<z.ZodCustom<XmlNode, XmlNode>>;
32
- }, z.core.$strip>], "type">>>;
33
- declare const packageCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodObject<{
34
- parts: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
35
- kind: z.ZodLiteral<"xml">;
36
- nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
37
- type: z.ZodLiteral<"text">;
38
- value: z.ZodString;
39
- }, z.core.$strip>, z.ZodObject<{
40
- type: z.ZodLiteral<"cdata">;
41
- value: z.ZodString;
42
- }, z.core.$strip>, z.ZodObject<{
43
- type: z.ZodLiteral<"comment">;
44
- value: z.ZodString;
45
- }, z.core.$strip>, z.ZodObject<{
46
- type: z.ZodLiteral<"declaration">;
47
- attributes: z.ZodArray<z.ZodObject<{
48
- name: z.ZodString;
49
- value: z.ZodString;
50
- }, z.core.$strip>>;
51
- }, z.core.$strip>, z.ZodObject<{
52
- type: z.ZodLiteral<"pi">;
53
- target: z.ZodString;
54
- content: z.ZodString;
55
- }, z.core.$strip>, z.ZodObject<{
56
- type: z.ZodLiteral<"element">;
57
- tag: z.ZodString;
58
- attributes: z.ZodArray<z.ZodObject<{
59
- name: z.ZodString;
60
- value: z.ZodString;
61
- }, z.core.$strip>>;
62
- children: z.ZodArray<z.ZodCustom<XmlNode, XmlNode>>;
63
- }, z.core.$strip>], "type">>;
64
- }, z.core.$strip>, z.ZodObject<{
65
- kind: z.ZodLiteral<"binary">;
66
- base64: z.ZodString;
67
- }, z.core.$strip>], "kind">>;
68
- }, z.core.$strip>>;
69
- declare function decodePackage(bytes: Uint8Array<ArrayBuffer>): Package;
70
- declare function encodePackage(pkg: Package): Uint8Array<ArrayBuffer>;
71
- //#endregion
1
+ import { i as xmlCodec, n as encodePackage, r as packageCodec, t as decodePackage } from "./codec-C0HcLUmU.js";
72
2
  export { decodePackage, encodePackage, packageCodec, xmlCodec };
@@ -0,0 +1,6 @@
1
+ import { Color } from "document-schema.js";
2
+ //#region src/typed/shared/color.d.ts
3
+ declare function parseOdfColor(value: string): Color | undefined;
4
+ declare function formatOdfColor(color: Color): string;
5
+ //#endregion
6
+ export { parseOdfColor as n, formatOdfColor as t };
@@ -0,0 +1,13 @@
1
+ import { l as XmlElement } from "./node-CkBWRjNR.js";
2
+ import { Package } from "./model/package.js";
3
+ import { ContentEmbeddedObjectKind } from "document-schema.js";
4
+ //#region src/typed/draw/embedded.d.ts
5
+ type EmbeddedDocumentKind = ContentEmbeddedObjectKind;
6
+ interface EmbeddedDrawObject {
7
+ objectKind: EmbeddedDocumentKind;
8
+ package: Package;
9
+ href: string;
10
+ }
11
+ declare function readDrawObjectReference(frame: XmlElement, pkg: Package): EmbeddedDrawObject | undefined;
12
+ //#endregion
13
+ export { EmbeddedDrawObject as n, readDrawObjectReference as r, EmbeddedDocumentKind as t };
@@ -0,0 +1,5 @@
1
+ //#region src/xml/entities.d.ts
2
+ declare function encodeXmlText(value: string): string;
3
+ declare function decodeXmlText(value: string): string;
4
+ //#endregion
5
+ export { encodeXmlText as n, decodeXmlText as t };
@@ -0,0 +1,31 @@
1
+ import { Package } from "./model/package.js";
2
+ import { t as OdtDocument } from "./read-Dn9qyBBs.js";
3
+ //#region src/typed/odb/form.d.ts
4
+ interface OdbFormControl {
5
+ tag: string;
6
+ name?: string;
7
+ controlImplementation?: string;
8
+ dataField?: string;
9
+ id?: string;
10
+ label?: string;
11
+ controls: OdbFormControl[];
12
+ }
13
+ interface OdbFormDefinition {
14
+ name?: string;
15
+ command?: string;
16
+ commandType?: string;
17
+ datasource?: string;
18
+ filter?: string;
19
+ order?: string;
20
+ controls: OdbFormControl[];
21
+ subForms: OdbFormDefinition[];
22
+ }
23
+ interface OdbForm {
24
+ name: string;
25
+ href: string;
26
+ document: OdtDocument;
27
+ forms: OdbFormDefinition[];
28
+ }
29
+ declare function readOdbForm(pkg: Package, formName: string): OdbForm;
30
+ //#endregion
31
+ export { readOdbForm as i, OdbFormControl as n, OdbFormDefinition as r, OdbForm 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,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 };
@@ -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.ts CHANGED
@@ -1,47 +1,46 @@
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";
17
- import { ParsedProperties, StyleProperties, StylePropertiesSchema, formatPercentageMultiplier, formatPt, paragraphPropertiesToAttributes, parseParagraphProperties, parseStyleElementProperties, parseTextProperties, textPropertiesToAttributes } from "./styles/properties.js";
18
- import { buildStylePropertyElements, canonicalPropertiesString } from "./styles/serialize.js";
19
- import { InternRequest, OtherPartRef, STYLE_FAMILIES, StyleFamily, StyleRegistry, StyleRegistryOptions, isStyleFamily } from "./styles/registry.js";
20
- import { ensureSpan } from "./styles/span.js";
21
- import { attrValue, childrenWithTag, elementsWithTag, findChildElement, rootElement } from "./xml/query.js";
22
- import { LengthUnit, formatOdfLength, parseOdfLength } from "./typed/shared/units.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 { decodeOdfText, getOdfSpaceCount, measureOdfNodeLength, sumOdfNodeLength } from "./typed/shared/text.js";
27
- import { CascadeDiagnostic, StyleCascadeResult, StyleElementChainResult, findStyleElement, resolveStyle, resolveStyleElementChain } from "./typed/shared/cascade.js";
28
- import { META_PART, readOdfMetadata } from "./typed/shared/metadata.js";
29
- import { readOdfParagraph } from "./typed/shared/paragraph.js";
30
- import { readOdfTable } from "./typed/shared/table.js";
31
- import { OdfPoint, OdfShapeGeometry, OdfTransformFunction, applyOdfTransform, composeOdfGroupTransform, netRotationDeg, parseOdfTransform, resolveOdfShapeGeometry } from "./typed/shared/transform.js";
32
- import { resolveDrawPageSize, resolvePageLayoutProperties } from "./typed/shared/masterpage.js";
33
- import { OdfRawPoint, OdfRawSegment, OdfRawSubpath, OdfViewBox, buildOdfSubpaths, parseOdfPathData, parseOdfPointsList, parseOdfViewBox, rawSubpathFromPoints, scaleOdfRawPoint } from "./typed/shared/path.js";
34
- import { DrawPageContent, readDrawFrame, readDrawImageBlock, readDrawPageContent, walkDrawShapes } from "./typed/draw/shapes.js";
35
- import { EmbeddedDocumentKind, EmbeddedDrawObject, readDrawObjectReference } from "./typed/draw/embedded.js";
36
- import { OdpDocument, readOdp } from "./typed/odp/read.js";
37
- import { OdtDocument, readOdt } from "./typed/odt/read.js";
38
- import { OdgDocument, readOdg } from "./typed/odg/read.js";
39
- import { OdsDocument, readOds } from "./typed/ods/read.js";
40
- import { OdfFormulaDocument, readOdfFormula, readOdfFormulaDocument } from "./typed/formula/read.js";
41
- import { OdmDocument, OdmSection, readOdm } from "./typed/odm/read.js";
42
- import { OdbComponentInfo, OdbConnectionInfo, OdbInventory, OdbQueryInfo, readOdbInventory, resolveOdbComponent } from "./typed/odb/read.js";
43
- import { SubDocumentPackageOptions, subDocumentPackage } from "./typed/odb/subdocument.js";
44
- import { OdbForm, OdbFormControl, OdbFormDefinition, readOdbForm } from "./typed/odb/form.js";
45
- import { OdbReport, OdbReportBand, OdbReportElement, OdbReportFunction, OdbReportGroup, readOdbReport } from "./typed/odb/report.js";
46
- import { Alignment, AlignmentSchema } from "document-schema.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";
21
+ import { n as formatOdfLength, r as parseOdfLength, t as LengthUnit } from "./units-7pCiECuP.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 { i as sumOdfNodeLength, n as getOdfSpaceCount, r as measureOdfNodeLength, t as decodeOdfText } from "./text-CkNojpZm.js";
26
+ import { a as resolveStyle, i as findStyleElement, n as StyleCascadeResult, o as resolveStyleElementChain, r as StyleElementChainResult, t as CascadeDiagnostic } from "./cascade-8u4q16_U.js";
27
+ import { n as readOdfMetadata, t as META_PART } from "./metadata-32LoP2TK.js";
28
+ import { t as readOdfParagraph } from "./paragraph-DWNnedIE.js";
29
+ import { r as readOdfTable } from "./table-D81TZyBn.js";
30
+ 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";
31
+ import { n as resolvePageLayoutProperties, t as resolveDrawPageSize } from "./masterpage-7nBnqFj-.js";
32
+ 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";
33
+ import { a as walkDrawShapes, i as readDrawPageContent, n as readDrawFrame, r as readDrawImageBlock, t as DrawPageContent } from "./shapes-BJAtBY24.js";
34
+ import { n as EmbeddedDrawObject, r as readDrawObjectReference, t as EmbeddedDocumentKind } from "./embedded-CNMqOrnt.js";
35
+ import { n as readOdp, t as OdpDocument } from "./read-CxdHrV1m.js";
36
+ import { n as readOdt, t as OdtDocument } from "./read-Dn9qyBBs.js";
37
+ import { n as readOdg, t as OdgDocument } from "./read-C7gT8wtc.js";
38
+ import { n as readOds, t as OdsDocument } from "./read-B0aBfNRf.js";
39
+ import { i as readOdfFormulaDocument, r as readOdfFormula, t as OdfFormulaDocument } from "./read-Bleh4LfR.js";
40
+ import { n as OdmSection, r as readOdm, t as OdmDocument } from "./read-BkFbEves.js";
41
+ import { a as readOdbInventory, i as OdbQueryInfo, n as OdbConnectionInfo, o as resolveOdbComponent, r as OdbInventory, t as OdbComponentInfo } from "./read-BoIUENWq.js";
42
+ import { n as subDocumentPackage, t as SubDocumentPackageOptions } from "./subdocument-DQNQF7wV.js";
43
+ import { i as readOdbForm, n as OdbFormControl, r as OdbFormDefinition, t as OdbForm } from "./form-DcGOX5RW.js";
44
+ import { a as OdbReportGroup, i as OdbReportFunction, n as OdbReportBand, o as readOdbReport, r as OdbReportElement, t as OdbReport } from "./report-MpwUgXbA.js";
45
+ import { a as Alignment, i as xmlCodec, n as encodePackage, o as AlignmentSchema, r as packageCodec, t as decodePackage } from "./codec-C0HcLUmU.js";
47
46
  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.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 };
@@ -1,40 +1,2 @@
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
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";
40
2
  export { BuildManifestOptions, Manifest, ManifestEntry, ManifestEntrySchema, ManifestProblem, 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,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.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,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 };
@@ -1,6 +1,2 @@
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
1
+ import { n as writeMimetype, t as readMimetype } from "./mimetype-uF-RHNpR.js";
6
2
  export { readMimetype, writeMimetype };