odf.js 2.7.1 → 2.7.2

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,33 @@
1
+ //#region src/ns.d.ts
2
+ declare const ODF_NAMESPACES: Readonly<{
3
+ office: "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
4
+ style: "urn:oasis:names:tc:opendocument:xmlns:style:1.0";
5
+ text: "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
6
+ table: "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
7
+ draw: "urn:oasis:names:tc:opendocument:xmlns:drawing:1.0";
8
+ fo: "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0";
9
+ svg: "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0";
10
+ xlink: "http://www.w3.org/1999/xlink";
11
+ dc: "http://purl.org/dc/elements/1.1/";
12
+ meta: "urn:oasis:names:tc:opendocument:xmlns:meta:1.0";
13
+ number: "urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0";
14
+ chart: "urn:oasis:names:tc:opendocument:xmlns:chart:1.0";
15
+ dr3d: "urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0";
16
+ math: "http://www.w3.org/1998/Math/MathML";
17
+ form: "urn:oasis:names:tc:opendocument:xmlns:form:1.0";
18
+ script: "urn:oasis:names:tc:opendocument:xmlns:script:1.0";
19
+ config: "urn:oasis:names:tc:opendocument:xmlns:config:1.0";
20
+ presentation: "urn:oasis:names:tc:opendocument:xmlns:presentation:1.0";
21
+ smil: "urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0";
22
+ anim: "urn:oasis:names:tc:opendocument:xmlns:animation:1.0";
23
+ xforms: "http://www.w3.org/2002/xforms";
24
+ xsd: "http://www.w3.org/2001/XMLSchema";
25
+ xsi: "http://www.w3.org/2001/XMLSchema-instance";
26
+ manifest: "urn:oasis:names:tc:opendocument:xmlns:manifest:1.0";
27
+ db: "urn:oasis:names:tc:opendocument:xmlns:database:1.0";
28
+ rpt: "http://openoffice.org/2005/report";
29
+ }>;
30
+ type OdfNamespacePrefix = keyof typeof ODF_NAMESPACES;
31
+ declare function xmlnsAttributes(prefixes: readonly OdfNamespacePrefix[]): Record<string, string>;
32
+ //#endregion
33
+ export { OdfNamespacePrefix as n, xmlnsAttributes as r, ODF_NAMESPACES as t };
package/dist/ns.d.ts CHANGED
@@ -1,33 +1,2 @@
1
- //#region src/ns.d.ts
2
- declare const ODF_NAMESPACES: Readonly<{
3
- office: "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
4
- style: "urn:oasis:names:tc:opendocument:xmlns:style:1.0";
5
- text: "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
6
- table: "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
7
- draw: "urn:oasis:names:tc:opendocument:xmlns:drawing:1.0";
8
- fo: "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0";
9
- svg: "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0";
10
- xlink: "http://www.w3.org/1999/xlink";
11
- dc: "http://purl.org/dc/elements/1.1/";
12
- meta: "urn:oasis:names:tc:opendocument:xmlns:meta:1.0";
13
- number: "urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0";
14
- chart: "urn:oasis:names:tc:opendocument:xmlns:chart:1.0";
15
- dr3d: "urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0";
16
- math: "http://www.w3.org/1998/Math/MathML";
17
- form: "urn:oasis:names:tc:opendocument:xmlns:form:1.0";
18
- script: "urn:oasis:names:tc:opendocument:xmlns:script:1.0";
19
- config: "urn:oasis:names:tc:opendocument:xmlns:config:1.0";
20
- presentation: "urn:oasis:names:tc:opendocument:xmlns:presentation:1.0";
21
- smil: "urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0";
22
- anim: "urn:oasis:names:tc:opendocument:xmlns:animation:1.0";
23
- xforms: "http://www.w3.org/2002/xforms";
24
- xsd: "http://www.w3.org/2001/XMLSchema";
25
- xsi: "http://www.w3.org/2001/XMLSchema-instance";
26
- manifest: "urn:oasis:names:tc:opendocument:xmlns:manifest:1.0";
27
- db: "urn:oasis:names:tc:opendocument:xmlns:database:1.0";
28
- rpt: "http://openoffice.org/2005/report";
29
- }>;
30
- type OdfNamespacePrefix = keyof typeof ODF_NAMESPACES;
31
- declare function xmlnsAttributes(prefixes: readonly OdfNamespacePrefix[]): Record<string, string>;
32
- //#endregion
1
+ import { n as OdfNamespacePrefix, r as xmlnsAttributes, t as ODF_NAMESPACES } from "./ns-Cihto3Fx.js";
33
2
  export { ODF_NAMESPACES, OdfNamespacePrefix, xmlnsAttributes };
@@ -1,5 +1,2 @@
1
- import { Package } from "../model/package.js";
2
- //#region src/package-io/read.d.ts
3
- declare function parsePackage(bytes: Uint8Array<ArrayBuffer>): Package;
4
- //#endregion
1
+ import { t as parsePackage } from "../read-DhLNXgiM.js";
5
2
  export { parsePackage };
@@ -1,7 +1,2 @@
1
- import { Package } from "../model/package.js";
2
- //#region src/package-io/write.d.ts
3
- declare const MIMETYPE_PART = "mimetype";
4
- declare const MANIFEST_PART = "META-INF/manifest.xml";
5
- declare function serializePackage(pkg: Package): Uint8Array<ArrayBuffer>;
6
- //#endregion
1
+ import { n as MIMETYPE_PART, r as serializePackage, t as MANIFEST_PART } from "../write-C0nwVuPI.js";
7
2
  export { MANIFEST_PART, MIMETYPE_PART, serializePackage };
@@ -0,0 +1,7 @@
1
+ import { l as XmlElement } from "./node-CkBWRjNR.js";
2
+ import { Package } from "./model/package.js";
3
+ import { ContentParagraph } from "document-schema.js";
4
+ //#region src/typed/shared/paragraph.d.ts
5
+ declare function readOdfParagraph(pElement: XmlElement, pkg: Package): ContentParagraph;
6
+ //#endregion
7
+ export { readOdfParagraph as t };
@@ -0,0 +1,5 @@
1
+ import { d as XmlNode } from "./node-CkBWRjNR.js";
2
+ //#region src/xml/parse.d.ts
3
+ declare function parseXml(xml: string): XmlNode[];
4
+ //#endregion
5
+ export { parseXml as t };
@@ -0,0 +1,34 @@
1
+ import { Box, ContentPathPoint, ContentSubpath } from "document-schema.js";
2
+ //#region src/typed/shared/path.d.ts
3
+ interface OdfRawPoint {
4
+ readonly x: number;
5
+ readonly y: number;
6
+ }
7
+ type OdfRawSegment = {
8
+ readonly kind: 'line';
9
+ readonly to: OdfRawPoint;
10
+ } | {
11
+ readonly kind: 'cubic';
12
+ readonly control1: OdfRawPoint;
13
+ readonly control2: OdfRawPoint;
14
+ readonly to: OdfRawPoint;
15
+ };
16
+ interface OdfRawSubpath {
17
+ readonly start: OdfRawPoint;
18
+ readonly segments: readonly OdfRawSegment[];
19
+ readonly closed: boolean;
20
+ }
21
+ interface OdfViewBox {
22
+ readonly minX: number;
23
+ readonly minY: number;
24
+ readonly width: number;
25
+ readonly height: number;
26
+ }
27
+ declare function parseOdfViewBox(value: string): OdfViewBox | undefined;
28
+ declare function parseOdfPointsList(value: string): OdfRawPoint[];
29
+ declare function rawSubpathFromPoints(points: readonly OdfRawPoint[], closed: boolean): OdfRawSubpath | undefined;
30
+ declare function parseOdfPathData(d: string): OdfRawSubpath[];
31
+ declare function scaleOdfRawPoint(point: OdfRawPoint, viewBox: OdfViewBox, frame: Box): ContentPathPoint;
32
+ declare function buildOdfSubpaths(rawSubpaths: readonly OdfRawSubpath[], viewBox: OdfViewBox, frame: Box): ContentSubpath[];
33
+ //#endregion
34
+ export { buildOdfSubpaths as a, parseOdfViewBox as c, OdfViewBox as i, rawSubpathFromPoints as l, OdfRawSegment as n, parseOdfPathData as o, OdfRawSubpath as r, parseOdfPointsList as s, OdfRawPoint as t, scaleOdfRawPoint as u };
@@ -0,0 +1,44 @@
1
+ import { l as XmlElement, t as Attribute } from "./node-CkBWRjNR.js";
2
+ import { z } from "zod";
3
+ //#region src/styles/properties.d.ts
4
+ declare const StylePropertiesSchema: z.ZodObject<{
5
+ bold: z.ZodOptional<z.ZodBoolean>;
6
+ italic: z.ZodOptional<z.ZodBoolean>;
7
+ underline: z.ZodOptional<z.ZodBoolean>;
8
+ strike: z.ZodOptional<z.ZodBoolean>;
9
+ fontFamily: z.ZodOptional<z.ZodString>;
10
+ sizePt: z.ZodOptional<z.ZodNumber>;
11
+ color: z.ZodOptional<z.ZodObject<{
12
+ r: z.ZodNumber;
13
+ g: z.ZodNumber;
14
+ b: z.ZodNumber;
15
+ }, z.core.$strip>>;
16
+ alignment: z.ZodOptional<z.ZodEnum<{
17
+ left: "left";
18
+ center: "center";
19
+ right: "right";
20
+ justify: "justify";
21
+ }>>;
22
+ spacingBeforePt: z.ZodOptional<z.ZodNumber>;
23
+ spacingAfterPt: z.ZodOptional<z.ZodNumber>;
24
+ lineSpacing: z.ZodOptional<z.ZodNumber>;
25
+ indentLeftPt: z.ZodOptional<z.ZodNumber>;
26
+ indentFirstLinePt: z.ZodOptional<z.ZodNumber>;
27
+ }, z.core.$strip>;
28
+ type StyleProperties = z.infer<typeof StylePropertiesSchema>;
29
+ interface ParsedProperties {
30
+ properties: Partial<StyleProperties>;
31
+ hasUnknown: boolean;
32
+ }
33
+ declare function formatPt(valuePt: number): string;
34
+ declare function formatPercentageMultiplier(multiplier: number): string;
35
+ declare function parseTextProperties(element: XmlElement): ParsedProperties;
36
+ declare function parseParagraphProperties(element: XmlElement): ParsedProperties;
37
+ declare function parseStyleElementProperties(styleElement: XmlElement): {
38
+ properties: StyleProperties;
39
+ hasUnknown: boolean;
40
+ };
41
+ declare function textPropertiesToAttributes(properties: StyleProperties): Attribute[];
42
+ declare function paragraphPropertiesToAttributes(properties: StyleProperties): Attribute[];
43
+ //#endregion
44
+ export { formatPt as a, parseStyleElementProperties as c, formatPercentageMultiplier as i, parseTextProperties as l, StyleProperties as n, paragraphPropertiesToAttributes as o, StylePropertiesSchema as r, parseParagraphProperties as s, ParsedProperties as t, textPropertiesToAttributes as u };
@@ -0,0 +1,9 @@
1
+ import { d as XmlNode, l as XmlElement } from "./node-CkBWRjNR.js";
2
+ //#region src/xml/query.d.ts
3
+ declare function rootElement(nodes: readonly XmlNode[]): XmlElement | undefined;
4
+ declare function findChildElement(nodes: readonly XmlNode[], tag: string): XmlElement | undefined;
5
+ declare function childrenWithTag(element: XmlElement, tag: string): XmlElement[];
6
+ declare function elementsWithTag(nodes: readonly XmlNode[], tag: string): XmlElement[];
7
+ declare function attrValue(element: XmlElement, name: string): string | undefined;
8
+ //#endregion
9
+ export { rootElement as a, findChildElement as i, childrenWithTag as n, elementsWithTag as r, attrValue as t };
@@ -0,0 +1,10 @@
1
+ import { Package } from "./model/package.js";
2
+ import { ContentSheet, LayoutMetadata } from "document-schema.js";
3
+ //#region src/typed/ods/read.d.ts
4
+ interface OdsDocument {
5
+ metadata: LayoutMetadata;
6
+ sheets: ContentSheet[];
7
+ }
8
+ declare function readOds(pkg: Package): OdsDocument;
9
+ //#endregion
10
+ export { readOds as n, OdsDocument as t };
@@ -0,0 +1,15 @@
1
+ import { d as XmlNode } from "./node-CkBWRjNR.js";
2
+ import { Package } from "./model/package.js";
3
+ //#region src/typed/odm/read.d.ts
4
+ interface OdmSection {
5
+ name: string;
6
+ href: string;
7
+ filterName?: string;
8
+ inlineContent?: readonly XmlNode[];
9
+ }
10
+ interface OdmDocument {
11
+ sections: readonly OdmSection[];
12
+ }
13
+ declare function readOdm(pkg: Package): OdmDocument;
14
+ //#endregion
15
+ export { OdmSection as n, readOdm as r, OdmDocument as t };
@@ -0,0 +1,14 @@
1
+ import { d as XmlNode, l as XmlElement } from "./node-CkBWRjNR.js";
2
+ import { Package } from "./model/package.js";
3
+ import { ContentDocument, LayoutMetadata } from "document-schema.js";
4
+ //#region src/typed/formula/read.d.ts
5
+ interface OdfFormulaDocument {
6
+ starMath?: string;
7
+ mathml: XmlNode[];
8
+ metadata: LayoutMetadata;
9
+ }
10
+ declare function findMathRoot(nodes: readonly XmlNode[]): XmlElement | undefined;
11
+ declare function readOdfFormula(pkg: Package): OdfFormulaDocument;
12
+ declare function readOdfFormulaDocument(pkg: Package): ContentDocument;
13
+ //#endregion
14
+ export { readOdfFormulaDocument as i, findMathRoot as n, readOdfFormula as r, OdfFormulaDocument as t };
@@ -0,0 +1,28 @@
1
+ import { Package } from "./model/package.js";
2
+ //#region src/typed/odb/read.d.ts
3
+ interface OdbConnectionInfo {
4
+ type: 'embedded' | 'external';
5
+ driverClass?: string;
6
+ url?: string;
7
+ }
8
+ interface OdbQueryInfo {
9
+ name: string;
10
+ command: string;
11
+ escapeProcessing?: boolean;
12
+ }
13
+ interface OdbComponentInfo {
14
+ name: string;
15
+ href: string;
16
+ asTemplate?: boolean;
17
+ }
18
+ interface OdbInventory {
19
+ connection: OdbConnectionInfo | undefined;
20
+ tables: string[];
21
+ queries: OdbQueryInfo[];
22
+ forms: OdbComponentInfo[];
23
+ reports: OdbComponentInfo[];
24
+ }
25
+ declare function resolveOdbComponent(pkg: Package, kind: 'form' | 'report', name: string): OdbComponentInfo;
26
+ declare function readOdbInventory(pkg: Package): OdbInventory;
27
+ //#endregion
28
+ export { readOdbInventory as a, OdbQueryInfo as i, OdbConnectionInfo as n, resolveOdbComponent as o, OdbInventory as r, OdbComponentInfo as t };
@@ -0,0 +1,10 @@
1
+ import { Package } from "./model/package.js";
2
+ import { ContentDrawPage, LayoutMetadata } from "document-schema.js";
3
+ //#region src/typed/odg/read.d.ts
4
+ interface OdgDocument {
5
+ metadata: LayoutMetadata;
6
+ pages: ContentDrawPage[];
7
+ }
8
+ declare function readOdg(pkg: Package): OdgDocument;
9
+ //#endregion
10
+ export { readOdg as n, OdgDocument as t };
@@ -0,0 +1,10 @@
1
+ import { Package } from "./model/package.js";
2
+ import { ContentSlide, LayoutMetadata } from "document-schema.js";
3
+ //#region src/typed/odp/read.d.ts
4
+ interface OdpDocument {
5
+ metadata: LayoutMetadata;
6
+ slides: ContentSlide[];
7
+ }
8
+ declare function readOdp(pkg: Package): OdpDocument;
9
+ //#endregion
10
+ export { readOdp as n, OdpDocument as t };
@@ -0,0 +1,5 @@
1
+ import { Package } from "./model/package.js";
2
+ //#region src/package-io/read.d.ts
3
+ declare function parsePackage(bytes: Uint8Array<ArrayBuffer>): Package;
4
+ //#endregion
5
+ export { parsePackage as t };
@@ -0,0 +1,10 @@
1
+ import { Package } from "./model/package.js";
2
+ import { ContentSection, LayoutMetadata } from "document-schema.js";
3
+ //#region src/typed/odt/read.d.ts
4
+ interface OdtDocument {
5
+ metadata: LayoutMetadata;
6
+ sections: ContentSection[];
7
+ }
8
+ declare function readOdt(pkg: Package): OdtDocument;
9
+ //#endregion
10
+ export { readOdt as n, OdtDocument as t };
@@ -0,0 +1,37 @@
1
+ import { Package } from "./model/package.js";
2
+ import { n as StyleProperties } from "./properties-DjAIdPry.js";
3
+ //#region src/styles/registry.d.ts
4
+ declare const STYLE_FAMILIES: readonly ["paragraph", "text", "table", "table-column", "table-row", "table-cell", "graphic"];
5
+ type StyleFamily = (typeof STYLE_FAMILIES)[number];
6
+ declare function isStyleFamily(value: string): value is StyleFamily;
7
+ interface InternRequest {
8
+ properties: StyleProperties;
9
+ family: StyleFamily;
10
+ parentStyleName?: string;
11
+ }
12
+ interface OtherPartRef {
13
+ pkg: Package;
14
+ partPath: string;
15
+ }
16
+ interface StyleRegistryOptions {
17
+ otherPart?: OtherPartRef;
18
+ additionalReservedNames?: readonly string[];
19
+ }
20
+ declare class StyleRegistry {
21
+ private readonly automaticStyles;
22
+ private readonly prefixes;
23
+ private readonly reservedByFamily;
24
+ private readonly knownStyles;
25
+ private readonly fingerprintToName;
26
+ private readonly nameToFingerprint;
27
+ private readonly familyCounters;
28
+ private constructor();
29
+ static forPart(pkg: Package, partPath: string, options?: StyleRegistryOptions): StyleRegistry;
30
+ fingerprint(request: InternRequest): string;
31
+ intern(request: InternRequest): string;
32
+ private mintName;
33
+ names(): readonly string[];
34
+ gc(referenced: ReadonlySet<string>): number;
35
+ }
36
+ //#endregion
37
+ export { StyleRegistry as a, StyleFamily as i, OtherPartRef as n, StyleRegistryOptions as o, STYLE_FAMILIES as r, isStyleFamily as s, InternRequest as t };
@@ -0,0 +1,48 @@
1
+ import { Package } from "./model/package.js";
2
+ //#region src/typed/odb/report.d.ts
3
+ interface OdbReportElement {
4
+ tag: string;
5
+ name?: string;
6
+ text?: string;
7
+ formula?: string;
8
+ dataField?: string;
9
+ }
10
+ interface OdbReportBand {
11
+ kind: 'report-header' | 'page-header' | 'group-header' | 'detail' | 'group-footer' | 'page-footer' | 'report-footer';
12
+ name?: string;
13
+ elements: OdbReportElement[];
14
+ }
15
+ interface OdbReportFunction {
16
+ name: string;
17
+ formula: string;
18
+ }
19
+ interface OdbReportGroup {
20
+ groupExpression?: string;
21
+ sortExpression?: string;
22
+ sortAscending?: boolean;
23
+ startNewColumn?: boolean;
24
+ resetPageNumber?: boolean;
25
+ keepTogether?: string;
26
+ header?: OdbReportBand;
27
+ footer?: OdbReportBand;
28
+ functions: OdbReportFunction[];
29
+ groups: OdbReportGroup[];
30
+ }
31
+ interface OdbReport {
32
+ name: string;
33
+ href: string;
34
+ command?: string;
35
+ commandType?: string;
36
+ caption?: string;
37
+ mimeType?: string;
38
+ reportHeader?: OdbReportBand;
39
+ pageHeader?: OdbReportBand;
40
+ groups: OdbReportGroup[];
41
+ detail?: OdbReportBand;
42
+ pageFooter?: OdbReportBand;
43
+ reportFooter?: OdbReportBand;
44
+ functions: OdbReportFunction[];
45
+ }
46
+ declare function readOdbReport(pkg: Package, reportName: string): OdbReport;
47
+ //#endregion
48
+ export { OdbReportGroup as a, OdbReportFunction as i, OdbReportBand as n, readOdbReport as o, OdbReportElement as r, OdbReport as t };
@@ -0,0 +1,7 @@
1
+ import { l as XmlElement } from "./node-CkBWRjNR.js";
2
+ import { n as StyleProperties } from "./properties-DjAIdPry.js";
3
+ //#region src/styles/serialize.d.ts
4
+ declare function buildStylePropertyElements(properties: StyleProperties): XmlElement[];
5
+ declare function canonicalPropertiesString(properties: StyleProperties): string;
6
+ //#endregion
7
+ export { canonicalPropertiesString as n, buildStylePropertyElements as t };
@@ -0,0 +1,18 @@
1
+ import { d as XmlNode, l as XmlElement } from "./node-CkBWRjNR.js";
2
+ import { Package } from "./model/package.js";
3
+ import { r as OdfTransformFunction } from "./transform-C7GrZZdR.js";
4
+ import { Box, ContentImageBlock, ContentShape, ContentVector } from "document-schema.js";
5
+ //#region src/typed/draw/shapes.d.ts
6
+ declare function readDrawImageBlock(image: XmlElement, frame: XmlElement, frameBox: Box, pkg: Package): ContentImageBlock | undefined;
7
+ declare function readDrawFrame(frame: XmlElement, groupFunctions: readonly OdfTransformFunction[], pkg: Package): ContentShape | undefined;
8
+ declare function walkDrawShapes(children: readonly XmlNode[], groupFunctions: readonly OdfTransformFunction[], pkg: Package, out: ContentShape[], indexState?: DocumentIndexState): void;
9
+ interface DocumentIndexState {
10
+ next: number;
11
+ }
12
+ interface DrawPageContent {
13
+ readonly shapes: ContentShape[];
14
+ readonly vectors: ContentVector[];
15
+ }
16
+ declare function readDrawPageContent(children: readonly XmlNode[], pkg: Package): DrawPageContent;
17
+ //#endregion
18
+ export { walkDrawShapes as a, readDrawPageContent as i, readDrawFrame as n, readDrawImageBlock as r, DrawPageContent as t };
@@ -0,0 +1,5 @@
1
+ //#region src/image/sniff.d.ts
2
+ type ImageFormat = 'png' | 'jpeg';
3
+ declare function sniffImageFormat(bytes: Uint8Array<ArrayBuffer>): ImageFormat | undefined;
4
+ //#endregion
5
+ export { sniffImageFormat as n, ImageFormat as t };
@@ -0,0 +1,5 @@
1
+ import { l as XmlElement } from "./node-CkBWRjNR.js";
2
+ //#region src/styles/span.d.ts
3
+ declare function ensureSpan(paragraph: XmlElement, start: number, end: number, styleName: string): XmlElement;
4
+ //#endregion
5
+ export { ensureSpan as t };
@@ -1,44 +1,2 @@
1
- import { l as XmlElement, t as Attribute } from "../node-CkBWRjNR.js";
2
- import { z } from "zod";
3
- //#region src/styles/properties.d.ts
4
- declare const StylePropertiesSchema: z.ZodObject<{
5
- bold: z.ZodOptional<z.ZodBoolean>;
6
- italic: z.ZodOptional<z.ZodBoolean>;
7
- underline: z.ZodOptional<z.ZodBoolean>;
8
- strike: z.ZodOptional<z.ZodBoolean>;
9
- fontFamily: z.ZodOptional<z.ZodString>;
10
- sizePt: z.ZodOptional<z.ZodNumber>;
11
- color: z.ZodOptional<z.ZodObject<{
12
- r: z.ZodNumber;
13
- g: z.ZodNumber;
14
- b: z.ZodNumber;
15
- }, z.core.$strip>>;
16
- alignment: z.ZodOptional<z.ZodEnum<{
17
- left: "left";
18
- center: "center";
19
- right: "right";
20
- justify: "justify";
21
- }>>;
22
- spacingBeforePt: z.ZodOptional<z.ZodNumber>;
23
- spacingAfterPt: z.ZodOptional<z.ZodNumber>;
24
- lineSpacing: z.ZodOptional<z.ZodNumber>;
25
- indentLeftPt: z.ZodOptional<z.ZodNumber>;
26
- indentFirstLinePt: z.ZodOptional<z.ZodNumber>;
27
- }, z.core.$strip>;
28
- type StyleProperties = z.infer<typeof StylePropertiesSchema>;
29
- interface ParsedProperties {
30
- properties: Partial<StyleProperties>;
31
- hasUnknown: boolean;
32
- }
33
- declare function formatPt(valuePt: number): string;
34
- declare function formatPercentageMultiplier(multiplier: number): string;
35
- declare function parseTextProperties(element: XmlElement): ParsedProperties;
36
- declare function parseParagraphProperties(element: XmlElement): ParsedProperties;
37
- declare function parseStyleElementProperties(styleElement: XmlElement): {
38
- properties: StyleProperties;
39
- hasUnknown: boolean;
40
- };
41
- declare function textPropertiesToAttributes(properties: StyleProperties): Attribute[];
42
- declare function paragraphPropertiesToAttributes(properties: StyleProperties): Attribute[];
43
- //#endregion
1
+ 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";
44
2
  export { ParsedProperties, StyleProperties, StylePropertiesSchema, formatPercentageMultiplier, formatPt, paragraphPropertiesToAttributes, parseParagraphProperties, parseStyleElementProperties, parseTextProperties, textPropertiesToAttributes };
@@ -1,37 +1,2 @@
1
- import { Package } from "../model/package.js";
2
- import { StyleProperties } from "./properties.js";
3
- //#region src/styles/registry.d.ts
4
- declare const STYLE_FAMILIES: readonly ["paragraph", "text", "table", "table-column", "table-row", "table-cell", "graphic"];
5
- type StyleFamily = (typeof STYLE_FAMILIES)[number];
6
- declare function isStyleFamily(value: string): value is StyleFamily;
7
- interface InternRequest {
8
- properties: StyleProperties;
9
- family: StyleFamily;
10
- parentStyleName?: string;
11
- }
12
- interface OtherPartRef {
13
- pkg: Package;
14
- partPath: string;
15
- }
16
- interface StyleRegistryOptions {
17
- otherPart?: OtherPartRef;
18
- additionalReservedNames?: readonly string[];
19
- }
20
- declare class StyleRegistry {
21
- private readonly automaticStyles;
22
- private readonly prefixes;
23
- private readonly reservedByFamily;
24
- private readonly knownStyles;
25
- private readonly fingerprintToName;
26
- private readonly nameToFingerprint;
27
- private readonly familyCounters;
28
- private constructor();
29
- static forPart(pkg: Package, partPath: string, options?: StyleRegistryOptions): StyleRegistry;
30
- fingerprint(request: InternRequest): string;
31
- intern(request: InternRequest): string;
32
- private mintName;
33
- names(): readonly string[];
34
- gc(referenced: ReadonlySet<string>): number;
35
- }
36
- //#endregion
1
+ 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";
37
2
  export { InternRequest, OtherPartRef, STYLE_FAMILIES, StyleFamily, StyleRegistry, StyleRegistryOptions, isStyleFamily };
@@ -1,7 +1,2 @@
1
- import { l as XmlElement } from "../node-CkBWRjNR.js";
2
- import { StyleProperties } from "./properties.js";
3
- //#region src/styles/serialize.d.ts
4
- declare function buildStylePropertyElements(properties: StyleProperties): XmlElement[];
5
- declare function canonicalPropertiesString(properties: StyleProperties): string;
6
- //#endregion
1
+ import { n as canonicalPropertiesString, t as buildStylePropertyElements } from "../serialize-DvaE_t5D.js";
7
2
  export { buildStylePropertyElements, canonicalPropertiesString };
@@ -1,5 +1,2 @@
1
- import { l as XmlElement } from "../node-CkBWRjNR.js";
2
- //#region src/styles/span.d.ts
3
- declare function ensureSpan(paragraph: XmlElement, start: number, end: number, styleName: string): XmlElement;
4
- //#endregion
1
+ import { t as ensureSpan } from "../span-KXroEGuH.js";
5
2
  export { ensureSpan };
@@ -0,0 +1,8 @@
1
+ import { Package } from "./model/package.js";
2
+ //#region src/typed/odb/subdocument.d.ts
3
+ interface SubDocumentPackageOptions {
4
+ allowMissingContent?: boolean;
5
+ }
6
+ declare function subDocumentPackage(pkg: Package, prefix: string, options?: SubDocumentPackageOptions): Package;
7
+ //#endregion
8
+ export { subDocumentPackage as n, SubDocumentPackageOptions as t };
@@ -0,0 +1,14 @@
1
+ import { l as XmlElement } from "./node-CkBWRjNR.js";
2
+ import { Package } from "./model/package.js";
3
+ import { Alignment, Color, ContentCellBorders, ContentTable } from "document-schema.js";
4
+ //#region src/typed/shared/table.d.ts
5
+ interface CellStyleDecoration {
6
+ background?: Color;
7
+ borders?: ContentCellBorders;
8
+ alignment?: Alignment;
9
+ verticalAlignment?: 'top' | 'middle' | 'bottom';
10
+ }
11
+ declare function readCellStyleDecoration(elements: readonly XmlElement[]): CellStyleDecoration;
12
+ declare function readOdfTable(tableElement: XmlElement, pkg: Package): ContentTable;
13
+ //#endregion
14
+ export { readCellStyleDecoration as n, readOdfTable as r, CellStyleDecoration as t };
@@ -0,0 +1,8 @@
1
+ import { d as XmlNode, l as XmlElement } from "./node-CkBWRjNR.js";
2
+ //#region src/typed/shared/text.d.ts
3
+ declare function getOdfSpaceCount(element: XmlElement): number;
4
+ declare function measureOdfNodeLength(node: XmlNode): number;
5
+ declare function sumOdfNodeLength(nodes: readonly XmlNode[]): number;
6
+ declare function decodeOdfText(container: XmlElement): string;
7
+ //#endregion
8
+ export { sumOdfNodeLength as i, getOdfSpaceCount as n, measureOdfNodeLength as r, decodeOdfText as t };
@@ -0,0 +1,26 @@
1
+ import { l as XmlElement } from "./node-CkBWRjNR.js";
2
+ import { Box } from "document-schema.js";
3
+ //#region src/typed/shared/transform.d.ts
4
+ type OdfTransformFunction = {
5
+ readonly kind: 'rotate';
6
+ readonly angleRad: number;
7
+ } | {
8
+ readonly kind: 'translate';
9
+ readonly xPt: number;
10
+ readonly yPt: number;
11
+ };
12
+ interface OdfPoint {
13
+ readonly xPt: number;
14
+ readonly yPt: number;
15
+ }
16
+ declare function parseOdfTransform(value: string): OdfTransformFunction[];
17
+ declare function applyOdfTransform(functions: readonly OdfTransformFunction[], point: OdfPoint): OdfPoint;
18
+ declare function netRotationDeg(functions: readonly OdfTransformFunction[]): number;
19
+ interface OdfShapeGeometry {
20
+ readonly frame: Box;
21
+ readonly rotationDeg: number | undefined;
22
+ }
23
+ declare function resolveOdfShapeGeometry(element: XmlElement): OdfShapeGeometry | undefined;
24
+ declare function composeOdfGroupTransform(groupFunctions: readonly OdfTransformFunction[], child: OdfShapeGeometry): OdfShapeGeometry;
25
+ //#endregion
26
+ export { composeOdfGroupTransform as a, resolveOdfShapeGeometry as c, applyOdfTransform as i, OdfShapeGeometry as n, netRotationDeg as o, OdfTransformFunction as r, parseOdfTransform as s, OdfPoint as t };
@@ -1,13 +1,2 @@
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
1
+ import { n as EmbeddedDrawObject, r as readDrawObjectReference, t as EmbeddedDocumentKind } from "../../embedded-CNMqOrnt.js";
13
2
  export { EmbeddedDocumentKind, EmbeddedDrawObject, readDrawObjectReference };
@@ -1,18 +1,2 @@
1
- import { d as XmlNode, l as XmlElement } from "../../node-CkBWRjNR.js";
2
- import { Package } from "../../model/package.js";
3
- import { OdfTransformFunction } from "../shared/transform.js";
4
- import { Box, ContentImageBlock, ContentShape, ContentVector } from "document-schema.js";
5
- //#region src/typed/draw/shapes.d.ts
6
- declare function readDrawImageBlock(image: XmlElement, frame: XmlElement, frameBox: Box, pkg: Package): ContentImageBlock | undefined;
7
- declare function readDrawFrame(frame: XmlElement, groupFunctions: readonly OdfTransformFunction[], pkg: Package): ContentShape | undefined;
8
- declare function walkDrawShapes(children: readonly XmlNode[], groupFunctions: readonly OdfTransformFunction[], pkg: Package, out: ContentShape[], indexState?: DocumentIndexState): void;
9
- interface DocumentIndexState {
10
- next: number;
11
- }
12
- interface DrawPageContent {
13
- readonly shapes: ContentShape[];
14
- readonly vectors: ContentVector[];
15
- }
16
- declare function readDrawPageContent(children: readonly XmlNode[], pkg: Package): DrawPageContent;
17
- //#endregion
1
+ import { a as walkDrawShapes, i as readDrawPageContent, n as readDrawFrame, r as readDrawImageBlock, t as DrawPageContent } from "../../shapes-BJAtBY24.js";
18
2
  export { DrawPageContent, readDrawFrame, readDrawImageBlock, readDrawPageContent, walkDrawShapes };