odf.js 2.7.0 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/codec.d.ts +71 -1
- package/dist/image/sniff.d.ts +4 -1
- package/dist/index.d.ts +44 -43
- package/dist/manifest.d.ts +39 -1
- package/dist/media-type.d.ts +19 -1
- package/dist/mimetype.d.ts +5 -1
- package/dist/ns.d.ts +32 -1
- package/dist/package-io/read.d.ts +4 -1
- package/dist/package-io/write.d.ts +6 -1
- package/dist/styles/properties.d.ts +43 -1
- package/dist/styles/registry.d.ts +36 -1
- package/dist/styles/serialize.d.ts +6 -1
- package/dist/styles/span.d.ts +4 -1
- package/dist/typed/draw/embedded.d.ts +12 -1
- package/dist/typed/draw/shapes.d.ts +17 -1
- package/dist/typed/formula/read.d.ts +13 -1
- package/dist/typed/odb/form.d.ts +30 -1
- package/dist/typed/odb/read.d.ts +27 -1
- package/dist/typed/odb/report.d.ts +47 -1
- package/dist/typed/odb/subdocument.d.ts +7 -1
- package/dist/typed/odg/read.d.ts +9 -1
- package/dist/typed/odm/read.d.ts +14 -1
- package/dist/typed/odp/read.d.ts +9 -1
- package/dist/typed/ods/read.d.ts +9 -1
- package/dist/typed/odt/read.d.ts +9 -1
- package/dist/typed/shared/a1.d.ts +17 -1
- package/dist/typed/shared/cascade.d.ts +21 -1
- package/dist/typed/shared/color.d.ts +5 -1
- package/dist/typed/shared/geometry.d.ts +11 -1
- package/dist/typed/shared/masterpage.d.ts +7 -1
- package/dist/typed/shared/metadata.d.ts +6 -1
- package/dist/typed/shared/paragraph.d.ts +6 -1
- package/dist/typed/shared/path.d.ts +33 -1
- package/dist/typed/shared/table.d.ts +13 -1
- package/dist/typed/shared/text.d.ts +7 -1
- package/dist/typed/shared/transform.d.ts +25 -1
- package/dist/typed/shared/units.d.ts +5 -1
- package/dist/util/base64.d.ts +4 -1
- package/dist/xml/build.d.ts +4 -1
- package/dist/xml/entities.d.ts +4 -1
- package/dist/xml/fragment.d.ts +5 -1
- package/dist/xml/parse.d.ts +4 -1
- package/dist/xml/query.d.ts +8 -1
- package/dist/zip.d.ts +8 -1
- package/package.json +1 -1
- package/dist/a1-5e9veCyu.d.ts +0 -18
- package/dist/base64--HuymRl_.d.ts +0 -5
- package/dist/build-Z1KRkSEB.d.ts +0 -5
- package/dist/cascade-8u4q16_U.d.ts +0 -22
- package/dist/codec-C0HcLUmU.d.ts +0 -107
- package/dist/color-CqXjt_to.d.ts +0 -6
- package/dist/embedded-CNMqOrnt.d.ts +0 -13
- package/dist/entities-BZlXvHqu.d.ts +0 -5
- package/dist/form-DcGOX5RW.d.ts +0 -31
- package/dist/fragment-B1ZV7T5Z.d.ts +0 -6
- package/dist/geometry-DnhkIhAM.d.ts +0 -12
- package/dist/manifest-xxJ4FpSe.d.ts +0 -40
- package/dist/masterpage-7nBnqFj-.d.ts +0 -8
- package/dist/media-type-BOLkcHkJ.d.ts +0 -20
- package/dist/metadata-32LoP2TK.d.ts +0 -7
- package/dist/mimetype-uF-RHNpR.d.ts +0 -6
- package/dist/ns-Cihto3Fx.d.ts +0 -33
- package/dist/paragraph-DWNnedIE.d.ts +0 -7
- package/dist/parse-A8_8sdpX.d.ts +0 -5
- package/dist/path-DE7wkIcz.d.ts +0 -34
- package/dist/properties-DjAIdPry.d.ts +0 -44
- package/dist/query-sECN-7vU.d.ts +0 -9
- package/dist/read-B0aBfNRf.d.ts +0 -10
- package/dist/read-BkFbEves.d.ts +0 -15
- package/dist/read-Bleh4LfR.d.ts +0 -14
- package/dist/read-BoIUENWq.d.ts +0 -28
- package/dist/read-C7gT8wtc.d.ts +0 -10
- package/dist/read-CxdHrV1m.d.ts +0 -10
- package/dist/read-DhLNXgiM.d.ts +0 -5
- package/dist/read-Dn9qyBBs.d.ts +0 -10
- package/dist/registry-R43n1hcL.d.ts +0 -37
- package/dist/report-MpwUgXbA.d.ts +0 -48
- package/dist/serialize-DvaE_t5D.d.ts +0 -7
- package/dist/shapes-BJAtBY24.d.ts +0 -18
- package/dist/sniff-DjpnUZRp.d.ts +0 -5
- package/dist/span-KXroEGuH.d.ts +0 -5
- package/dist/subdocument-DQNQF7wV.d.ts +0 -8
- package/dist/table-D81TZyBn.d.ts +0 -14
- package/dist/text-CkNojpZm.d.ts +0 -8
- package/dist/transform-C7GrZZdR.d.ts +0 -26
- package/dist/units-7pCiECuP.d.ts +0 -6
- package/dist/write-C0nwVuPI.d.ts +0 -7
- package/dist/zip-ie17sOo5.d.ts +0 -9
package/dist/typed/odp/read.d.ts
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
import {
|
|
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
|
|
2
10
|
export { OdpDocument, readOdp };
|
package/dist/typed/ods/read.d.ts
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
import {
|
|
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
|
|
2
10
|
export { OdsDocument, readOds };
|
package/dist/typed/odt/read.d.ts
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
import {
|
|
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
|
|
2
10
|
export { OdtDocument, readOdt };
|
|
@@ -1,2 +1,18 @@
|
|
|
1
|
-
|
|
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
|
|
2
18
|
export { TableCursor, cellReference, columnIndexToLetters, columnLettersToIndex, parseCellReference };
|
|
@@ -1,2 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { l as XmlElement } from "../../node-CkBWRjNR.js";
|
|
2
|
+
import { Package } from "../../model/package.js";
|
|
3
|
+
import { StyleProperties } from "../../styles/properties.js";
|
|
4
|
+
import { StyleFamily } from "../../styles/registry.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
|
|
2
22
|
export { CascadeDiagnostic, StyleCascadeResult, StyleElementChainResult, findStyleElement, resolveStyle, resolveStyleElementChain };
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import {
|
|
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
|
|
2
6
|
export { formatOdfColor, parseOdfColor };
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
import {
|
|
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
|
|
2
12
|
export { parseBox, parseLinePoints, parseMargins, parsePageSize };
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
import {
|
|
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
|
|
2
8
|
export { resolveDrawPageSize, resolvePageLayoutProperties };
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import {
|
|
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
|
|
2
7
|
export { META_PART, readOdfMetadata };
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import {
|
|
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
|
|
2
7
|
export { readOdfParagraph };
|
|
@@ -1,2 +1,34 @@
|
|
|
1
|
-
import {
|
|
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
|
|
2
34
|
export { OdfRawPoint, OdfRawSegment, OdfRawSubpath, OdfViewBox, buildOdfSubpaths, parseOdfPathData, parseOdfPointsList, parseOdfViewBox, rawSubpathFromPoints, scaleOdfRawPoint };
|
|
@@ -1,2 +1,14 @@
|
|
|
1
|
-
import {
|
|
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
|
|
2
14
|
export { CellStyleDecoration, readCellStyleDecoration, readOdfTable };
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
import {
|
|
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
|
|
2
8
|
export { decodeOdfText, getOdfSpaceCount, measureOdfNodeLength, sumOdfNodeLength };
|
|
@@ -1,2 +1,26 @@
|
|
|
1
|
-
import {
|
|
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
|
|
2
26
|
export { OdfPoint, OdfShapeGeometry, OdfTransformFunction, applyOdfTransform, composeOdfGroupTransform, netRotationDeg, parseOdfTransform, resolveOdfShapeGeometry };
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/typed/shared/units.d.ts
|
|
2
|
+
type LengthUnit = 'cm' | 'mm' | 'in' | 'pt' | 'pc' | 'px';
|
|
3
|
+
declare function parseOdfLength(value: string): number | undefined;
|
|
4
|
+
declare function formatOdfLength(pt: number, unit?: LengthUnit): string;
|
|
5
|
+
//#endregion
|
|
2
6
|
export { LengthUnit, formatOdfLength, parseOdfLength };
|
package/dist/util/base64.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
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
|
|
2
5
|
export { base64ToBytes, bytesToBase64 };
|
package/dist/xml/build.d.ts
CHANGED
package/dist/xml/entities.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/xml/entities.d.ts
|
|
2
|
+
declare function encodeXmlText(value: string): string;
|
|
3
|
+
declare function decodeXmlText(value: string): string;
|
|
4
|
+
//#endregion
|
|
2
5
|
export { decodeXmlText, encodeXmlText };
|
package/dist/xml/fragment.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import {
|
|
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
|
|
2
6
|
export { el, txt };
|
package/dist/xml/parse.d.ts
CHANGED
package/dist/xml/query.d.ts
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
import {
|
|
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
|
|
2
9
|
export { attrValue, childrenWithTag, elementsWithTag, findChildElement, rootElement };
|
package/dist/zip.d.ts
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/zip.d.ts
|
|
2
|
+
interface ZipEntry {
|
|
3
|
+
readonly bytes: Uint8Array<ArrayBuffer>;
|
|
4
|
+
readonly stored?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare function unzipPackage(bytes: Uint8Array<ArrayBuffer>): Record<string, Uint8Array<ArrayBuffer>>;
|
|
7
|
+
declare function zipPackage(entries: readonly (readonly [string, ZipEntry])[]): Uint8Array<ArrayBuffer>;
|
|
8
|
+
//#endregion
|
|
2
9
|
export { ZipEntry, unzipPackage, zipPackage };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "odf.js",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"description": "Type-safe, lossless round-trip conversion between OpenDocument Format packages (odt, ods, odp) and JSON, hand-written and dependency-minimal, built on Zod 4 codecs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
package/dist/a1-5e9veCyu.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
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 };
|
package/dist/build-Z1KRkSEB.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
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 };
|
package/dist/codec-C0HcLUmU.d.ts
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
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/color-CqXjt_to.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
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 };
|
|
@@ -1,13 +0,0 @@
|
|
|
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 };
|
package/dist/form-DcGOX5RW.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
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 };
|
|
@@ -1,6 +0,0 @@
|
|
|
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 };
|
|
@@ -1,12 +0,0 @@
|
|
|
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,40 +0,0 @@
|
|
|
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,8 +0,0 @@
|
|
|
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 };
|
|
@@ -1,20 +0,0 @@
|
|
|
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 };
|