ooxml.js 6.0.0 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -23
- package/dist/{build-XSm3I8LT.d.cts → build--uPsivid.d.cts} +1 -1
- package/dist/{build-q0qMH_ML.d.ts → build-BOI7rIog.d.ts} +1 -1
- package/dist/{build-D-ldsmtA.d.cts → build-BY9Mn-4K.d.cts} +1 -1
- package/dist/{build-Z1KRkSEB.d.ts → build-DgBE0bmv.d.ts} +1 -1
- package/dist/{codec-DdrBDJSU.d.cts → codec-BBM1RYx7.d.cts} +19 -19
- package/dist/{codec-CHbouqVZ.d.ts → codec-Cva8QD7-.d.ts} +19 -19
- package/dist/codec.d.cts +1 -1
- package/dist/codec.d.ts +1 -1
- package/dist/{color-fFIKAs-Y.d.cts → color-DLoZOrg3.d.cts} +1 -1
- package/dist/{color-fFIKAs-Y.d.ts → color-DLoZOrg3.d.ts} +1 -1
- package/dist/{compact-f0TfhicN.d.ts → compact-CmOeA2dl.d.ts} +2 -2
- package/dist/{compact-B1qg9oex.d.cts → compact-DMCbYORW.d.cts} +2 -2
- package/dist/compact.d.cts +1 -1
- package/dist/compact.d.ts +1 -1
- package/dist/{content-C79O3esU.d.cts → content-BiYr86lr.d.cts} +1 -1
- package/dist/{content-MEmp_Rlx.d.ts → content-D1pmxaUb.d.ts} +1 -1
- package/dist/{document-tree-BV4sMCXO.d.ts → document-tree-B17XbBOR.d.ts} +2 -2
- package/dist/{document-tree-BSPf6fkr.d.cts → document-tree-CjI-Z4Tp.d.cts} +2 -2
- package/dist/{fragment-B1og_8uA.d.cts → fragment-9dNg-m46.d.cts} +1 -1
- package/dist/{fragment-B1ZV7T5Z.d.ts → fragment-ClgCV_if.d.ts} +1 -1
- package/dist/image/sniff.d.cts +1 -1
- package/dist/image/sniff.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +21 -21
- package/dist/index.d.ts +21 -21
- package/dist/index.js +1 -1
- package/dist/{metadata-o_WH9V_I.d.ts → metadata-Bjfa88HQ.d.ts} +1 -1
- package/dist/{metadata-D6o-kLpg.d.cts → metadata-C74-XCrx.d.cts} +1 -1
- package/dist/model/node.d.cts +1 -1
- package/dist/model/node.d.ts +1 -1
- package/dist/model/package.d.cts +1 -1
- package/dist/model/package.d.ts +1 -1
- package/dist/{node-CkBWRjNR.d.cts → node-B6JX5CRX.d.cts} +1 -1
- package/dist/{node-CkBWRjNR.d.ts → node-B6JX5CRX.d.ts} +1 -1
- package/dist/{numbering-D0YfuiOO.d.ts → numbering-CUMTFxfk.d.ts} +1 -1
- package/dist/{numbering-C53LT-Jx.d.cts → numbering-vpq3iLPm.d.cts} +1 -1
- package/dist/{package-L24lkba-.d.cts → package-DMk9fuTI.d.cts} +1 -1
- package/dist/package-io/read.d.cts +1 -1
- package/dist/package-io/read.d.ts +1 -1
- package/dist/package-io/write.d.cts +1 -1
- package/dist/package-io/write.d.ts +1 -1
- package/dist/{package-BUojjTXf.d.ts → package-otZYrxiO.d.ts} +1 -1
- package/dist/{parse-A8_8sdpX.d.ts → parse-BLukZ2z0.d.ts} +1 -1
- package/dist/{parse-CP5FLZqv.d.cts → parse-DcVtB3jT.d.cts} +1 -1
- package/dist/{read-ZWJPDvG-.d.ts → read-B5kexLpc.d.ts} +1 -1
- package/dist/{read-DPR6ihXO.js → read-BZ_jycSX.js} +3 -1
- package/dist/{read-CevviAf2.d.ts → read-BlcKA9Cg.d.ts} +1 -1
- package/dist/{read-BoV9SZy4.d.cts → read-C1h_Q4kx.d.cts} +1 -1
- package/dist/{read-Cj23Gllx.cjs → read-CXksZHJW.cjs} +3 -1
- package/dist/{read-A9CC5Toq.d.cts → read-D6kQeo-T.d.cts} +1 -1
- package/dist/{read-DA55zDgD.d.ts → read-D_kXw2N2.d.ts} +1 -1
- package/dist/{read-VbRhmjOh.d.cts → read-uKN0paUP.d.cts} +1 -1
- package/dist/{sniff-DjpnUZRp.d.cts → sniff-DGOBHA0O.d.cts} +1 -1
- package/dist/{sniff-DjpnUZRp.d.ts → sniff-DGOBHA0O.d.ts} +1 -1
- package/dist/typed/document-tree.cjs +1 -1
- package/dist/typed/document-tree.d.cts +1 -1
- package/dist/typed/document-tree.d.ts +1 -1
- package/dist/typed/document-tree.js +1 -1
- package/dist/typed/docx/constructs.d.cts +3 -3
- package/dist/typed/docx/constructs.d.ts +3 -3
- package/dist/typed/docx/numbering.d.cts +1 -1
- package/dist/typed/docx/numbering.d.ts +1 -1
- package/dist/typed/docx/read.cjs +1 -1
- package/dist/typed/docx/read.d.cts +1 -1
- package/dist/typed/docx/read.d.ts +1 -1
- package/dist/typed/docx/read.js +1 -1
- package/dist/typed/docx/styles.d.cts +1 -1
- package/dist/typed/docx/styles.d.ts +1 -1
- package/dist/typed/docx/write.d.cts +1 -1
- package/dist/typed/docx/write.d.ts +1 -1
- package/dist/typed/embedded.cjs +1 -1
- package/dist/typed/embedded.d.cts +2 -2
- package/dist/typed/embedded.d.ts +2 -2
- package/dist/typed/embedded.js +1 -1
- package/dist/typed/pptx/chart.d.cts +1 -1
- package/dist/typed/pptx/chart.d.ts +1 -1
- package/dist/typed/pptx/diagram.d.cts +1 -1
- package/dist/typed/pptx/diagram.d.ts +1 -1
- package/dist/typed/pptx/inherit.d.cts +2 -2
- package/dist/typed/pptx/inherit.d.ts +2 -2
- package/dist/typed/pptx/read.cjs +1 -1
- package/dist/typed/pptx/read.d.cts +1 -1
- package/dist/typed/pptx/read.d.ts +1 -1
- package/dist/typed/pptx/read.js +1 -1
- package/dist/typed/shared/color.d.cts +1 -1
- package/dist/typed/shared/color.d.ts +1 -1
- package/dist/typed/shared/drawingml.d.cts +1 -1
- package/dist/typed/shared/drawingml.d.ts +1 -1
- package/dist/typed/shared/metadata.d.cts +1 -1
- package/dist/typed/shared/metadata.d.ts +1 -1
- package/dist/typed/util.d.cts +1 -1
- package/dist/typed/util.d.ts +1 -1
- package/dist/typed/xlsx/build.cjs +12 -4
- package/dist/typed/xlsx/build.d.cts +1 -1
- package/dist/typed/xlsx/build.d.ts +1 -1
- package/dist/typed/xlsx/build.js +12 -4
- package/dist/typed/xlsx/comments.d.cts +1 -1
- package/dist/typed/xlsx/comments.d.ts +1 -1
- package/dist/typed/xlsx/conditional-format.cjs +519 -0
- package/dist/typed/xlsx/conditional-format.d.cts +16 -0
- package/dist/typed/xlsx/conditional-format.d.ts +16 -0
- package/dist/typed/xlsx/conditional-format.js +516 -0
- package/dist/typed/xlsx/content.cjs +11 -7
- package/dist/typed/xlsx/content.d.cts +1 -1
- package/dist/typed/xlsx/content.d.ts +1 -1
- package/dist/typed/xlsx/content.js +12 -8
- package/dist/typed/xlsx/data-validation.cjs +116 -0
- package/dist/typed/xlsx/data-validation.d.cts +11 -0
- package/dist/typed/xlsx/data-validation.d.ts +11 -0
- package/dist/typed/xlsx/data-validation.js +114 -0
- package/dist/typed/xlsx/defined-names.d.cts +1 -1
- package/dist/typed/xlsx/defined-names.d.ts +1 -1
- package/dist/typed/xlsx/definitions.d.cts +1 -1
- package/dist/typed/xlsx/definitions.d.ts +1 -1
- package/dist/typed/xlsx/drawings.d.cts +2 -2
- package/dist/typed/xlsx/drawings.d.ts +2 -2
- package/dist/typed/xlsx/number-format.d.cts +14 -14
- package/dist/typed/xlsx/number-format.d.ts +14 -14
- package/dist/typed/xlsx/print-settings.d.cts +1 -1
- package/dist/typed/xlsx/print-settings.d.ts +1 -1
- package/dist/typed/xlsx/rule-residue.cjs +29 -0
- package/dist/typed/xlsx/rule-residue.d.cts +7 -0
- package/dist/typed/xlsx/rule-residue.d.ts +7 -0
- package/dist/typed/xlsx/rule-residue.js +27 -0
- package/dist/typed/xlsx/serial.d.cts +1 -1
- package/dist/typed/xlsx/serial.d.ts +1 -1
- package/dist/typed/xlsx/shared-strings.d.cts +1 -1
- package/dist/typed/xlsx/shared-strings.d.ts +1 -1
- package/dist/typed/xlsx/sqref.cjs +24 -0
- package/dist/typed/xlsx/sqref.d.cts +7 -0
- package/dist/typed/xlsx/sqref.d.ts +7 -0
- package/dist/typed/xlsx/sqref.js +21 -0
- package/dist/typed/xlsx/styles.cjs +14 -2
- package/dist/typed/xlsx/styles.d.cts +10 -6
- package/dist/typed/xlsx/styles.d.ts +10 -6
- package/dist/typed/xlsx/styles.js +12 -3
- package/dist/typed/xlsx.d.cts +1 -1
- package/dist/typed/xlsx.d.ts +1 -1
- package/dist/util/base64.cjs +4 -4
- package/dist/util/base64.js +4 -4
- package/dist/{util-DFe4UbvU.d.ts → util-DKrYuajM.d.ts} +2 -2
- package/dist/{util-M3JJlDhF.d.cts → util-xRsVgH-g.d.cts} +2 -2
- package/dist/{write-Dn_CL8qb.d.cts → write-BGTpp3RS.d.cts} +3 -3
- package/dist/{write-6JmxvaK5.d.cts → write-Ba1IxfDT.d.cts} +1 -1
- package/dist/{write-CT-EgVT7.d.ts → write-C4902scQ.d.ts} +1 -1
- package/dist/{write-inqdKHR3.d.ts → write-Cnfu3zdB.d.ts} +3 -3
- package/dist/{xlsx-DacFqZeF.d.ts → xlsx-B3JGnx0l.d.ts} +1 -1
- package/dist/{xlsx-CpX5nzGV.d.cts → xlsx-DCgJ8IbV.d.cts} +1 -1
- package/dist/xml/build.d.cts +1 -1
- package/dist/xml/build.d.ts +1 -1
- package/dist/xml/fragment.d.cts +1 -1
- package/dist/xml/fragment.d.ts +1 -1
- package/dist/xml/parse.d.cts +1 -1
- package/dist/xml/parse.d.ts +1 -1
- package/package.json +3 -11
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { l as XmlElement } from "../../node-B6JX5CRX.cjs";
|
|
2
|
+
import { r as Package } from "../../package-DMk9fuTI.cjs";
|
|
2
3
|
import { CellNumberFormat } from "./number-format.cjs";
|
|
3
4
|
import { Alignment, Color, ContentCellBorders } from "document-schema.js";
|
|
4
5
|
//#region src/typed/xlsx/styles.d.ts
|
|
@@ -8,9 +9,12 @@ interface CellStyleEntry {
|
|
|
8
9
|
background?: Color;
|
|
9
10
|
borders?: ContentCellBorders;
|
|
10
11
|
alignment?: Alignment;
|
|
11
|
-
verticalAlignment?:
|
|
12
|
+
verticalAlignment?: "top" | "middle" | "bottom";
|
|
12
13
|
}
|
|
14
|
+
declare function colorFromElement(colorEl: XmlElement | undefined): Color | undefined;
|
|
15
|
+
declare function readColorRgb(container: XmlElement, colorTag: string): Color | undefined;
|
|
13
16
|
declare function readCellStyles(pkg: Package): readonly CellStyleEntry[];
|
|
17
|
+
declare function readDxfElements(pkg: Package): readonly XmlElement[];
|
|
14
18
|
declare function readCellFormatCodes(pkg: Package): readonly (string | undefined)[];
|
|
15
19
|
declare const DEFAULT_CELL_FORMAT_INDEX = 0;
|
|
16
20
|
interface DeclaredNumberFormat {
|
|
@@ -21,10 +25,10 @@ interface CellFormatDecoration {
|
|
|
21
25
|
background?: Color;
|
|
22
26
|
borders?: ContentCellBorders;
|
|
23
27
|
alignment?: Alignment;
|
|
24
|
-
verticalAlignment?:
|
|
28
|
+
verticalAlignment?: "top" | "middle" | "bottom";
|
|
25
29
|
}
|
|
26
30
|
interface DeclaredFill {
|
|
27
|
-
patternType:
|
|
31
|
+
patternType: "none" | "gray125" | "solid";
|
|
28
32
|
rgb?: string;
|
|
29
33
|
}
|
|
30
34
|
interface DeclaredBorder {
|
|
@@ -53,7 +57,7 @@ interface CellFormatRecord {
|
|
|
53
57
|
borderId: number;
|
|
54
58
|
alignment?: {
|
|
55
59
|
horizontal?: Alignment;
|
|
56
|
-
vertical?:
|
|
60
|
+
vertical?: "top" | "middle" | "bottom";
|
|
57
61
|
};
|
|
58
62
|
}
|
|
59
63
|
declare class CellFormatTable {
|
|
@@ -84,4 +88,4 @@ declare const RESERVED_BORDER_INDICES: {
|
|
|
84
88
|
readonly firstReal: 1;
|
|
85
89
|
};
|
|
86
90
|
//#endregion
|
|
87
|
-
export { CellFormatDecoration, CellFormatRecord, CellFormatTable, CellStyleEntry, DEFAULT_CELL_FORMAT_INDEX, DeclaredBorder, DeclaredFill, DeclaredNumberFormat, GENERAL_NUM_FMT_ID, RESERVED_BORDER_INDICES, RESERVED_FILL_INDICES, readCellFormatCodes, readCellStyles };
|
|
91
|
+
export { CellFormatDecoration, CellFormatRecord, CellFormatTable, CellStyleEntry, DEFAULT_CELL_FORMAT_INDEX, DeclaredBorder, DeclaredFill, DeclaredNumberFormat, GENERAL_NUM_FMT_ID, RESERVED_BORDER_INDICES, RESERVED_FILL_INDICES, colorFromElement, readCellFormatCodes, readCellStyles, readColorRgb, readDxfElements };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { l as XmlElement } from "../../node-B6JX5CRX.js";
|
|
2
|
+
import { r as Package } from "../../package-otZYrxiO.js";
|
|
2
3
|
import { CellNumberFormat } from "./number-format.js";
|
|
3
4
|
import { Alignment, Color, ContentCellBorders } from "document-schema.js";
|
|
4
5
|
//#region src/typed/xlsx/styles.d.ts
|
|
@@ -8,9 +9,12 @@ interface CellStyleEntry {
|
|
|
8
9
|
background?: Color;
|
|
9
10
|
borders?: ContentCellBorders;
|
|
10
11
|
alignment?: Alignment;
|
|
11
|
-
verticalAlignment?:
|
|
12
|
+
verticalAlignment?: "top" | "middle" | "bottom";
|
|
12
13
|
}
|
|
14
|
+
declare function colorFromElement(colorEl: XmlElement | undefined): Color | undefined;
|
|
15
|
+
declare function readColorRgb(container: XmlElement, colorTag: string): Color | undefined;
|
|
13
16
|
declare function readCellStyles(pkg: Package): readonly CellStyleEntry[];
|
|
17
|
+
declare function readDxfElements(pkg: Package): readonly XmlElement[];
|
|
14
18
|
declare function readCellFormatCodes(pkg: Package): readonly (string | undefined)[];
|
|
15
19
|
declare const DEFAULT_CELL_FORMAT_INDEX = 0;
|
|
16
20
|
interface DeclaredNumberFormat {
|
|
@@ -21,10 +25,10 @@ interface CellFormatDecoration {
|
|
|
21
25
|
background?: Color;
|
|
22
26
|
borders?: ContentCellBorders;
|
|
23
27
|
alignment?: Alignment;
|
|
24
|
-
verticalAlignment?:
|
|
28
|
+
verticalAlignment?: "top" | "middle" | "bottom";
|
|
25
29
|
}
|
|
26
30
|
interface DeclaredFill {
|
|
27
|
-
patternType:
|
|
31
|
+
patternType: "none" | "gray125" | "solid";
|
|
28
32
|
rgb?: string;
|
|
29
33
|
}
|
|
30
34
|
interface DeclaredBorder {
|
|
@@ -53,7 +57,7 @@ interface CellFormatRecord {
|
|
|
53
57
|
borderId: number;
|
|
54
58
|
alignment?: {
|
|
55
59
|
horizontal?: Alignment;
|
|
56
|
-
vertical?:
|
|
60
|
+
vertical?: "top" | "middle" | "bottom";
|
|
57
61
|
};
|
|
58
62
|
}
|
|
59
63
|
declare class CellFormatTable {
|
|
@@ -84,4 +88,4 @@ declare const RESERVED_BORDER_INDICES: {
|
|
|
84
88
|
readonly firstReal: 1;
|
|
85
89
|
};
|
|
86
90
|
//#endregion
|
|
87
|
-
export { CellFormatDecoration, CellFormatRecord, CellFormatTable, CellStyleEntry, DEFAULT_CELL_FORMAT_INDEX, DeclaredBorder, DeclaredFill, DeclaredNumberFormat, GENERAL_NUM_FMT_ID, RESERVED_BORDER_INDICES, RESERVED_FILL_INDICES, readCellFormatCodes, readCellStyles };
|
|
91
|
+
export { CellFormatDecoration, CellFormatRecord, CellFormatTable, CellStyleEntry, DEFAULT_CELL_FORMAT_INDEX, DeclaredBorder, DeclaredFill, DeclaredNumberFormat, GENERAL_NUM_FMT_ID, RESERVED_BORDER_INDICES, RESERVED_FILL_INDICES, colorFromElement, readCellFormatCodes, readCellStyles, readColorRgb, readDxfElements };
|
|
@@ -82,8 +82,7 @@ const BORDER_WEIGHT_UPPER_PT = {
|
|
|
82
82
|
thin: 1.125,
|
|
83
83
|
medium: 1.875
|
|
84
84
|
};
|
|
85
|
-
function
|
|
86
|
-
const colorEl = childrenWithTag(container, colorTag)[0];
|
|
85
|
+
function colorFromElement(colorEl) {
|
|
87
86
|
if (colorEl === void 0) return;
|
|
88
87
|
const raw = attr(colorEl, "rgb");
|
|
89
88
|
if (raw === void 0) return;
|
|
@@ -95,6 +94,9 @@ function readColorRgb(container, colorTag) {
|
|
|
95
94
|
return;
|
|
96
95
|
}
|
|
97
96
|
}
|
|
97
|
+
function readColorRgb(container, colorTag) {
|
|
98
|
+
return colorFromElement(childrenWithTag(container, colorTag)[0]);
|
|
99
|
+
}
|
|
98
100
|
function readFillBackground(fill) {
|
|
99
101
|
const patternFill = childrenWithTag(fill, "patternFill")[0];
|
|
100
102
|
if (patternFill === void 0 || attr(patternFill, "patternType") !== "solid") return;
|
|
@@ -181,6 +183,13 @@ function readCellStyles(pkg) {
|
|
|
181
183
|
return entry;
|
|
182
184
|
});
|
|
183
185
|
}
|
|
186
|
+
function readDxfElements(pkg) {
|
|
187
|
+
const styleSheet = rootElement(pkg.parts[STYLES_PATH]);
|
|
188
|
+
if (styleSheet === void 0) return [];
|
|
189
|
+
const dxfsEl = childrenWithTag(styleSheet, "dxfs")[0];
|
|
190
|
+
if (dxfsEl === void 0) return [];
|
|
191
|
+
return childrenWithTag(dxfsEl, "dxf");
|
|
192
|
+
}
|
|
184
193
|
function parseChildIndex(value) {
|
|
185
194
|
if (value === void 0) return;
|
|
186
195
|
const n = Number.parseInt(value, 10);
|
|
@@ -336,4 +345,4 @@ const RESERVED_BORDER_INDICES = {
|
|
|
336
345
|
firstReal: FIRST_REAL_BORDER_INDEX
|
|
337
346
|
};
|
|
338
347
|
//#endregion
|
|
339
|
-
export { CellFormatTable, DEFAULT_CELL_FORMAT_INDEX, GENERAL_NUM_FMT_ID, RESERVED_BORDER_INDICES, RESERVED_FILL_INDICES, readCellFormatCodes, readCellStyles };
|
|
348
|
+
export { CellFormatTable, DEFAULT_CELL_FORMAT_INDEX, GENERAL_NUM_FMT_ID, RESERVED_BORDER_INDICES, RESERVED_FILL_INDICES, colorFromElement, readCellFormatCodes, readCellStyles, readColorRgb, readDxfElements };
|
package/dist/typed/xlsx.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as XlsxSheet, c as XlsxWorkbookSchema, i as XlsxCellSchema, l as readXlsxWorkbook, n as DefinedNameSchema, o as XlsxSheetSchema, r as XlsxCell, s as XlsxWorkbook, t as DefinedName } from "../xlsx-
|
|
1
|
+
import { a as XlsxSheet, c as XlsxWorkbookSchema, i as XlsxCellSchema, l as readXlsxWorkbook, n as DefinedNameSchema, o as XlsxSheetSchema, r as XlsxCell, s as XlsxWorkbook, t as DefinedName } from "../xlsx-DCgJ8IbV.cjs";
|
|
2
2
|
export { DefinedName, DefinedNameSchema, XlsxCell, XlsxCellSchema, XlsxSheet, XlsxSheetSchema, XlsxWorkbook, XlsxWorkbookSchema, readXlsxWorkbook };
|
package/dist/typed/xlsx.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as XlsxSheet, c as XlsxWorkbookSchema, i as XlsxCellSchema, l as readXlsxWorkbook, n as DefinedNameSchema, o as XlsxSheetSchema, r as XlsxCell, s as XlsxWorkbook, t as DefinedName } from "../xlsx-
|
|
1
|
+
import { a as XlsxSheet, c as XlsxWorkbookSchema, i as XlsxCellSchema, l as readXlsxWorkbook, n as DefinedNameSchema, o as XlsxSheetSchema, r as XlsxCell, s as XlsxWorkbook, t as DefinedName } from "../xlsx-B3JGnx0l.js";
|
|
2
2
|
export { DefinedName, DefinedNameSchema, XlsxCell, XlsxCellSchema, XlsxSheet, XlsxSheetSchema, XlsxWorkbook, XlsxWorkbookSchema, readXlsxWorkbook };
|
package/dist/util/base64.cjs
CHANGED
|
@@ -13,10 +13,10 @@ function bytesToBase64(bytes) {
|
|
|
13
13
|
const b0 = bytes[i];
|
|
14
14
|
const b1 = i + 1 < len ? bytes[i + 1] : 0;
|
|
15
15
|
const b2 = i + 2 < len ? bytes[i + 2] : 0;
|
|
16
|
-
out += TABLE
|
|
17
|
-
out += TABLE
|
|
18
|
-
out += i + 1 < len ? TABLE
|
|
19
|
-
out += i + 2 < len ? TABLE
|
|
16
|
+
out += TABLE.charAt(b0 >> 2);
|
|
17
|
+
out += TABLE.charAt((b0 & 3) << 4 | b1 >> 4);
|
|
18
|
+
out += i + 1 < len ? TABLE.charAt((b1 & 15) << 2 | b2 >> 6) : "=";
|
|
19
|
+
out += i + 2 < len ? TABLE.charAt(b2 & 63) : "=";
|
|
20
20
|
}
|
|
21
21
|
return out;
|
|
22
22
|
}
|
package/dist/util/base64.js
CHANGED
|
@@ -12,10 +12,10 @@ function bytesToBase64(bytes) {
|
|
|
12
12
|
const b0 = bytes[i];
|
|
13
13
|
const b1 = i + 1 < len ? bytes[i + 1] : 0;
|
|
14
14
|
const b2 = i + 2 < len ? bytes[i + 2] : 0;
|
|
15
|
-
out += TABLE
|
|
16
|
-
out += TABLE
|
|
17
|
-
out += i + 1 < len ? TABLE
|
|
18
|
-
out += i + 2 < len ? TABLE
|
|
15
|
+
out += TABLE.charAt(b0 >> 2);
|
|
16
|
+
out += TABLE.charAt((b0 & 3) << 4 | b1 >> 4);
|
|
17
|
+
out += i + 1 < len ? TABLE.charAt((b1 & 15) << 2 | b2 >> 6) : "=";
|
|
18
|
+
out += i + 2 < len ? TABLE.charAt(b2 & 63) : "=";
|
|
19
19
|
}
|
|
20
20
|
return out;
|
|
21
21
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as XmlNode, l as XmlElement } from "./node-
|
|
2
|
-
import { a as Part, r as Package } from "./package-
|
|
1
|
+
import { d as XmlNode, l as XmlElement } from "./node-B6JX5CRX.js";
|
|
2
|
+
import { a as Part, r as Package } from "./package-otZYrxiO.js";
|
|
3
3
|
//#region src/typed/util.d.ts
|
|
4
4
|
declare function walk(nodes: XmlNode[]): Generator<XmlNode>;
|
|
5
5
|
declare function elementsWithTag(nodes: XmlNode[], tag: string): XmlElement[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as XmlNode, l as XmlElement } from "./node-
|
|
2
|
-
import { a as Part, r as Package } from "./package-
|
|
1
|
+
import { d as XmlNode, l as XmlElement } from "./node-B6JX5CRX.cjs";
|
|
2
|
+
import { a as Part, r as Package } from "./package-DMk9fuTI.cjs";
|
|
3
3
|
//#region src/typed/util.d.ts
|
|
4
4
|
declare function walk(nodes: XmlNode[]): Generator<XmlNode>;
|
|
5
5
|
declare function elementsWithTag(nodes: XmlNode[], tag: string): XmlElement[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as Package } from "./package-
|
|
2
|
-
import { t as DocumentMetadata } from "./metadata-
|
|
1
|
+
import { r as Package } from "./package-DMk9fuTI.cjs";
|
|
2
|
+
import { t as DocumentMetadata } from "./metadata-C74-XCrx.cjs";
|
|
3
3
|
import { ContentDocument, ContentSection } from "document-schema.js";
|
|
4
4
|
//#region src/typed/docx/write.d.ts
|
|
5
5
|
interface DocxContent {
|
|
@@ -7,7 +7,7 @@ interface DocxContent {
|
|
|
7
7
|
readonly sections: readonly ContentSection[];
|
|
8
8
|
}
|
|
9
9
|
type EmbeddedPresentationSerialiser = (document: Extract<ContentDocument, {
|
|
10
|
-
kind:
|
|
10
|
+
kind: "presentation";
|
|
11
11
|
}>) => Uint8Array<ArrayBuffer>;
|
|
12
12
|
interface BuildDocxContentOptions {
|
|
13
13
|
readonly serialiseEmbeddedPresentation?: EmbeddedPresentationSerialiser;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as Package } from "./package-
|
|
2
|
-
import { t as DocumentMetadata } from "./metadata-
|
|
1
|
+
import { r as Package } from "./package-otZYrxiO.js";
|
|
2
|
+
import { t as DocumentMetadata } from "./metadata-Bjfa88HQ.js";
|
|
3
3
|
import { ContentDocument, ContentSection } from "document-schema.js";
|
|
4
4
|
//#region src/typed/docx/write.d.ts
|
|
5
5
|
interface DocxContent {
|
|
@@ -7,7 +7,7 @@ interface DocxContent {
|
|
|
7
7
|
readonly sections: readonly ContentSection[];
|
|
8
8
|
}
|
|
9
9
|
type EmbeddedPresentationSerialiser = (document: Extract<ContentDocument, {
|
|
10
|
-
kind:
|
|
10
|
+
kind: "presentation";
|
|
11
11
|
}>) => Uint8Array<ArrayBuffer>;
|
|
12
12
|
interface BuildDocxContentOptions {
|
|
13
13
|
readonly serialiseEmbeddedPresentation?: EmbeddedPresentationSerialiser;
|
package/dist/xml/build.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as buildXml } from "../build
|
|
1
|
+
import { t as buildXml } from "../build--uPsivid.cjs";
|
|
2
2
|
export { buildXml };
|
package/dist/xml/build.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as buildXml } from "../build-
|
|
1
|
+
import { t as buildXml } from "../build-DgBE0bmv.js";
|
|
2
2
|
export { buildXml };
|
package/dist/xml/fragment.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as txt, t as el } from "../fragment-
|
|
1
|
+
import { n as txt, t as el } from "../fragment-9dNg-m46.cjs";
|
|
2
2
|
export { el, txt };
|
package/dist/xml/fragment.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as txt, t as el } from "../fragment-
|
|
1
|
+
import { n as txt, t as el } from "../fragment-ClgCV_if.js";
|
|
2
2
|
export { el, txt };
|
package/dist/xml/parse.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as parseXml } from "../parse-
|
|
1
|
+
import { t as parseXml } from "../parse-DcVtB3jT.cjs";
|
|
2
2
|
export { parseXml };
|
package/dist/xml/parse.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as parseXml } from "../parse-
|
|
1
|
+
import { t as parseXml } from "../parse-BLukZ2z0.js";
|
|
2
2
|
export { parseXml };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ooxml.js",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.0",
|
|
4
4
|
"description": "Type-safe, lossless round-trip conversion between OOXML packages (docx, pptx, xlsx) and JSON, built on Zod 4 codecs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
"license": "MIT",
|
|
81
81
|
"packageManager": "pnpm@11.6.0",
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"archive-codec": "^1.
|
|
84
|
-
"document-schema.js": "^5.
|
|
83
|
+
"archive-codec": "^1.2.0",
|
|
84
|
+
"document-schema.js": "^5.2.0",
|
|
85
85
|
"fast-xml-parser": "^5.10.1",
|
|
86
86
|
"fflate": "^0.8.3",
|
|
87
87
|
"zod": "^4.4.3"
|
|
@@ -89,18 +89,10 @@
|
|
|
89
89
|
"devDependencies": {
|
|
90
90
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
91
91
|
"@cloudflare/vitest-pool-workers": "^0.21.2",
|
|
92
|
-
"@commitlint/cli": "^21.2.1",
|
|
93
|
-
"@commitlint/config-conventional": "^21.2.0",
|
|
94
|
-
"@eslint/js": "^10.0.1",
|
|
95
|
-
"@exadev/eslint-config": "^2.1.0",
|
|
96
|
-
"@semantic-release/changelog": "^7.0.0",
|
|
97
|
-
"@semantic-release/git": "^11.0.1",
|
|
98
92
|
"@types/node": "^26.1.1",
|
|
99
93
|
"@vitest/coverage-v8": "^4.1.10",
|
|
100
94
|
"eslint": "^10.8.0",
|
|
101
|
-
"globals": "^17.8.0",
|
|
102
95
|
"husky": "^9.1.7",
|
|
103
|
-
"lint-staged": "^17.2.0",
|
|
104
96
|
"publint": "^0.3.21",
|
|
105
97
|
"semantic-release": "^25.0.8",
|
|
106
98
|
"tsdown": "^0.22.13",
|