@sheetxl/io-xlsx 0.8.0-beta.1 → 0.8.0-beta.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.
- package/browser/cjs/BzOEBR0jaxXg9wvt.cjs +5 -0
- package/browser/cjs/C8oC1tPbhgR0Dqtx.cjs +2 -0
- package/browser/cjs/Ca-xJDjg5bOpUPXX.cjs +1 -0
- package/browser/cjs/{D5Y4KQhKdukOkjvA.cjs → D3EWCPfCu-qMOIGd.cjs} +1 -2
- package/browser/cjs/{BAtEL-5TLyoaPFDP.cjs → DULsYP_GcPGLVYSE.cjs} +10 -1
- package/browser/cjs/DtBN3UOzNJjYBwJ6.cjs +1 -0
- package/browser/cjs/index.cjs +1 -1
- package/browser/cjs/sNZR19Wk-XQ2xZ9E.cjs +1 -0
- package/browser/esm/B9q618XELV7uWJsA.mjs +67 -0
- package/browser/esm/{Dj7D2nVdAZ3TiUks.mjs → BwbMurFOptAFs7gC.mjs} +1595 -1124
- package/browser/esm/{CLWzJJyoSrykkVLX.mjs → CMHb6pUUmsCP9r_9.mjs} +2 -2
- package/browser/esm/{ijQzHH-bvDfUHIi1.mjs → CMzkLUwbgA73RvCb.mjs} +1 -1
- package/browser/esm/D75_rfogFUfXADKc.mjs +3324 -0
- package/browser/esm/{4BWLu134ABlCQEtM.mjs → DfuBawaydlvgZMR-.mjs} +1824 -1051
- package/browser/esm/{BkNXyG6NC-w5Xo92.mjs → DhqYgh9G2vLn7mIE.mjs} +28 -13
- package/browser/esm/DoMlKUCnMSlR2qX5.mjs +159 -0
- package/browser/esm/{Cok_fBIUCHDSrKw0.mjs → DtpWa7tZahylJ3HS.mjs} +446 -347
- package/browser/esm/{Ctqql4O-3xj2K8vv.mjs → IZf0hIeLYj3T0Xvu.mjs} +2 -2
- package/browser/esm/{Dz1Dp8DDJvhd09RR.mjs → _UDbQq5-pHbU1f82.mjs} +1 -1
- package/browser/esm/index.mjs +3 -3
- package/node/esm/{CF1R5ovFsRNu--Rw.mjs → BD03jrMQ_UKA196-.mjs} +1934 -1143
- package/node/esm/{fOnuUjpPCAzmuIXN.mjs → Bi_kZVtZams7taqa.mjs} +2 -2
- package/node/esm/{Ctcl4jN52INWpKWC.mjs → BxHvzSROx_N_7nJH.mjs} +607 -506
- package/node/esm/{CEAmv36xpTNgFwl_.mjs → CB1ijGbhl-e2l6Mm.mjs} +49 -35
- package/node/esm/CO1M1H1N6fB422K-.mjs +2959 -0
- package/node/esm/CWpezSa6TERGEv-B.mjs +3410 -0
- package/node/esm/{CEV7nKotMpeRRnQC.mjs → CY-pSutJLHskZfXZ.mjs} +1 -1
- package/node/esm/Dezt2uIDqlxjiuk5.mjs +170 -0
- package/node/esm/index.mjs +40 -25
- package/package.json +3 -3
- package/types/src/ConditionalFormatRules.d.ts +3 -3
- package/types/src/DataValidationRules.d.ts +18 -2
- package/types/src/ExcelCalcStamp.d.ts +39 -0
- package/types/src/ExcelCompat.d.ts +197 -42
- package/types/src/LegacyFormula.d.ts +28 -7
- package/types/src/Plugin.d.ts +16 -5
- package/types/src/ProtectionAttributes.d.ts +38 -0
- package/types/src/SourcePackage.d.ts +31 -12
- package/types/src/Types.d.ts +17 -0
- package/types/src/reader/HiddenFormulas.d.ts +16 -0
- package/types/src/reader/Warning.d.ts +29 -0
- package/types/src/reader/dom/DOMTransformer.d.ts +1 -1
- package/types/src/reader/dom/ExecutionContext.d.ts +16 -3
- package/types/src/reader/dom/Types.d.ts +19 -3
- package/types/src/reader/domVisitors/CommentVisitor.d.ts +18 -1
- package/types/src/reader/domVisitors/CommentsVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts +21 -3
- package/types/src/reader/domVisitors/SheetColorContainerVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +6 -1
- package/types/src/reader/domVisitors/ThreadedCommentVisitor.d.ts +9 -1
- package/types/src/reader/domVisitors/ThreadedCommentsVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/WorkbookVisitor.d.ts +11 -1
- package/types/src/reader/sax/LeanSaxParser.d.ts +58 -0
- package/types/src/reader/sax/SaxParser.d.ts +11 -1
- package/types/src/reader/sax/SaxVisitor.d.ts +3 -2
- package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts +9 -0
- package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +11 -4
- package/types/src/utils/VmlNoteShapes.d.ts +75 -0
- package/types/src/vba/VBAProject.d.ts +52 -4
- package/types/src/writer/builder/ContentTypes.d.ts +13 -0
- package/types/src/writer/builder/Emitter.d.ts +6 -6
- package/types/src/writer/builder/OpcXmlUtils.d.ts +2 -0
- package/types/src/writer/builder/PackageBuilder.d.ts +70 -22
- package/types/src/writer/builder/PartWriter.d.ts +5 -0
- package/types/src/writer/builder/RelationshipSet.d.ts +3 -0
- package/types/src/writer/builder/Types.d.ts +107 -38
- package/types/src/writer/builder/_Types.d.ts +17 -0
- package/types/src/writer/emitters/CommentsEmitter.d.ts +52 -0
- package/types/src/writer/emitters/EmbeddedPartEmitter.d.ts +60 -0
- package/types/src/writer/emitters/ExternalLinkEmitter.d.ts +19 -0
- package/types/src/writer/emitters/LegacyDrawingEmitter.d.ts +18 -0
- package/types/src/writer/emitters/PersonsEmitter.d.ts +17 -0
- package/types/src/writer/emitters/PivotTableEmitter.d.ts +45 -0
- package/types/src/writer/emitters/ThreadedCommentsEmitter.d.ts +21 -0
- package/types/src/writer/emitters/WorkbookEmitter.d.ts +16 -3
- package/types/src/writer/utils/DrawMLUtils.d.ts +16 -1
- package/types/src/writer/utils/HiddenFormulaXfs.d.ts +28 -0
- package/browser/cjs/Bg0e53JZa8vhmm5a.cjs +0 -1
- package/browser/cjs/CK5FFUvet6FnIYO_.cjs +0 -5
- package/browser/cjs/DV6LeTEiiFUrZoxj.cjs +0 -1
- package/browser/cjs/DWkuoJSgvcXJTdN1.cjs +0 -1
- package/browser/cjs/Db8YjGM6TG34c8aT.cjs +0 -1
- package/browser/esm/BzQ_lPzc8C4OTIGZ.mjs +0 -99
- package/browser/esm/CJknI8BYGSZr-4zS.mjs +0 -52
- package/browser/esm/D-m_kQLaewdwuXaF.mjs +0 -2685
- package/node/esm/CvnRSooxEQdlJgMn.mjs +0 -2766
- package/node/esm/DQd0vxzTaPt2qSL-.mjs +0 -108
- package/node/esm/ssSlRCbCqxvZ9IX8.mjs +0 -2481
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.2
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.2
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
|
+
*/
|
|
7
|
+
import { t } from "./CO1M1H1N6fB422K-.mjs";
|
|
8
|
+
import { CommonUtils as e } from "@sheetxl/utils";
|
|
9
|
+
import { AddressUtils as n, IColor as s, IStyle as r } from "@sheetxl/sdk";
|
|
10
|
+
var o = Object.defineProperty, a = (t, e) => {
|
|
11
|
+
let n = {};
|
|
12
|
+
for (var s in t) o(n, s, {
|
|
13
|
+
get: t[s],
|
|
14
|
+
enumerable: !0
|
|
15
|
+
});
|
|
16
|
+
return e || o(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
17
|
+
}, l = (t, e, n) => {
|
|
18
|
+
const s = `Unable to read '${t}': ${e?.message ?? e}`;
|
|
19
|
+
n?.onWarning ? n.onWarning(s, t) : console.warn(s);
|
|
20
|
+
}, c = (t, e, n, s = null) => {
|
|
21
|
+
if (!t) return null;
|
|
22
|
+
let r = t;
|
|
23
|
+
r.startsWith("/") && (r = r.substring(1));
|
|
24
|
+
let o = s?.parsedRefs?.get(t);
|
|
25
|
+
if (void 0 !== o) return o;
|
|
26
|
+
const a = e(r);
|
|
27
|
+
if (!a) return null;
|
|
28
|
+
let c = a.content;
|
|
29
|
+
try {
|
|
30
|
+
n && (c = n(c, t));
|
|
31
|
+
} catch (e) {
|
|
32
|
+
l(t, e, s);
|
|
33
|
+
}
|
|
34
|
+
return s?.parsedRefs?.set(t, c), c;
|
|
35
|
+
}, i = (t, n, s, r, o = null) => {
|
|
36
|
+
if (!t) return null;
|
|
37
|
+
let a = t;
|
|
38
|
+
a.startsWith("/") && (a = a.substring(1));
|
|
39
|
+
let c = o?.parsedRefs?.get(t);
|
|
40
|
+
if (void 0 !== c) return c;
|
|
41
|
+
const i = n(a);
|
|
42
|
+
if (!i) return null;
|
|
43
|
+
const u = i.content;
|
|
44
|
+
try {
|
|
45
|
+
const n = new TextDecoder().decode(u), a = s.parseFromString(n, "text/xml"), l = r.transform(a, t, o ?? e.EmptyObject);
|
|
46
|
+
return o?.parsedRefs?.set(t, l), l;
|
|
47
|
+
} catch (e) {
|
|
48
|
+
l(t, e, o);
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
}, u = (t, e, n, s, r = null) => {
|
|
52
|
+
if (!t) return null;
|
|
53
|
+
const o = i(t, e, n, s, r);
|
|
54
|
+
if (!o) return null;
|
|
55
|
+
const a = /* @__PURE__ */ new Map(), l = Object.keys(o), c = l.length;
|
|
56
|
+
for (let t = 0; t < c; t++) {
|
|
57
|
+
const e = l[t], n = o[e];
|
|
58
|
+
a.set(e, n);
|
|
59
|
+
}
|
|
60
|
+
return a;
|
|
61
|
+
}, f = (t, e, n, s, r, o = null) => {
|
|
62
|
+
const a = /* @__PURE__ */ new Map();
|
|
63
|
+
let l = e[t];
|
|
64
|
+
const c = l ? l.length : 0;
|
|
65
|
+
for (let t = 0; t < c; t++) {
|
|
66
|
+
const e = l[t];
|
|
67
|
+
if (!e) continue;
|
|
68
|
+
let c = e;
|
|
69
|
+
c.startsWith("/") && (c = c.substring(1));
|
|
70
|
+
const u = i(c, n, s, r, o);
|
|
71
|
+
a.set(c, u);
|
|
72
|
+
}
|
|
73
|
+
return a;
|
|
74
|
+
}, d = (t) => {
|
|
75
|
+
const e = t.split(/\/+/);
|
|
76
|
+
return e.reduce((t, e, n) => ("." === e ? t.splice(n, 1) : ".." === e && t.splice(n - 1, 2), t), e).join("/");
|
|
77
|
+
}, p = Object.freeze([
|
|
78
|
+
"lt1",
|
|
79
|
+
"dk1",
|
|
80
|
+
"lt2",
|
|
81
|
+
"dk2",
|
|
82
|
+
"accent1",
|
|
83
|
+
"accent2",
|
|
84
|
+
"accent3",
|
|
85
|
+
"accent4",
|
|
86
|
+
"accent5",
|
|
87
|
+
"accent6",
|
|
88
|
+
"hlink",
|
|
89
|
+
"folHlink"
|
|
90
|
+
]), m = (t, e = "auto") => {
|
|
91
|
+
let n;
|
|
92
|
+
const r = t("auto");
|
|
93
|
+
void 0 === r || "1" !== r && "true" !== r || (n = e);
|
|
94
|
+
const o = t("indexed");
|
|
95
|
+
o && (n = "64" === o ? "auto" : `index${o}`);
|
|
96
|
+
const a = t("rgb");
|
|
97
|
+
a && (n = a.toLowerCase(), 8 !== a.length || a.startsWith("FF") || (n = "FF" + a.substring(2, a.length)));
|
|
98
|
+
const l = t("theme");
|
|
99
|
+
l && (n = p[Number(l)]);
|
|
100
|
+
let c = t("tint");
|
|
101
|
+
if (c && (n += ` ${s.AdjustmentType.ETint} ${parseFloat(c)}`), n) return n;
|
|
102
|
+
}, h = (t) => t ? t.replace(/^\{([\s\S]+)\}$/, "$1") : t, g = a({
|
|
103
|
+
EMU_PER_PIXEL: () => b,
|
|
104
|
+
EMU_PER_POINT: () => y,
|
|
105
|
+
fixedPointToDouble: () => x,
|
|
106
|
+
parseAngle: () => A,
|
|
107
|
+
parseAsBoolean: () => P,
|
|
108
|
+
parsePercentage: () => F,
|
|
109
|
+
toPixels: () => v,
|
|
110
|
+
toPoints: () => w
|
|
111
|
+
}), y = 12700, b = 9525, w = (t) => t ? e.roundAccurately(parseFloat(t) / y, 4) : null, v = (t) => t ? e.roundAccurately(parseFloat(t) / b, 1) : null, x = (t) => (t >> 16) + (65535 & t) / 65536, F = (t) => parseFloat(t) / 1e3, A = (t) => parseFloat(t) / 6e4, P = (t) => "true" === t || "1" === t, S = "hiddenXfs", j = (t) => (Array.isArray(t) ? t[1] : t?.v)?.s, k = (e) => {
|
|
112
|
+
if (!e || 0 === e.length) return !1;
|
|
113
|
+
const s = n.refsToRuns(e, !0);
|
|
114
|
+
let r = 0;
|
|
115
|
+
for (const t of s) {
|
|
116
|
+
if (t.min > r || void 0 === t.value?.s) return !1;
|
|
117
|
+
r = Math.max(r, t.max + 1);
|
|
118
|
+
}
|
|
119
|
+
return r > t;
|
|
120
|
+
}, E = (t, e) => {
|
|
121
|
+
t.protection = {
|
|
122
|
+
...t.protection,
|
|
123
|
+
showFormulas: e
|
|
124
|
+
};
|
|
125
|
+
}, R = (t, e) => {
|
|
126
|
+
if (!e || 0 === e.size) return;
|
|
127
|
+
const n = t.styles;
|
|
128
|
+
if (!n) return;
|
|
129
|
+
const s = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
|
|
130
|
+
for (const n of t.sheets ?? []) {
|
|
131
|
+
const t = n?.sheet;
|
|
132
|
+
if (!t) continue;
|
|
133
|
+
const r = /* @__PURE__ */ new Set();
|
|
134
|
+
k(t.cols) || r.add(0);
|
|
135
|
+
for (const e of t.directStyles ?? []) r.add(Array.isArray(e) ? e[1] : e.v);
|
|
136
|
+
for (const e of t.rows ?? []) {
|
|
137
|
+
const t = j(e);
|
|
138
|
+
void 0 !== t && r.add(t);
|
|
139
|
+
}
|
|
140
|
+
for (const e of t.cols ?? []) {
|
|
141
|
+
const t = j(e);
|
|
142
|
+
void 0 !== t && r.add(t);
|
|
143
|
+
}
|
|
144
|
+
let a = !1;
|
|
145
|
+
for (const t of r) if (e.has(t)) {
|
|
146
|
+
a = !0;
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
149
|
+
if (a) {
|
|
150
|
+
t.protection = {
|
|
151
|
+
...t.protection ?? { sheet: !0 },
|
|
152
|
+
showFormulas: !1
|
|
153
|
+
};
|
|
154
|
+
for (const t of r) (e.has(t) ? o : s).add(t);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
if (0 === s.size) return;
|
|
158
|
+
const a = n.direct ?? (n.direct = []);
|
|
159
|
+
for (const t of s) 0 !== t && E(a[t] ?? (a[t] = {}), !0);
|
|
160
|
+
for (const t of o) 0 !== t && E(a[t] ?? (a[t] = {}), !1);
|
|
161
|
+
if (s.has(0)) {
|
|
162
|
+
const t = n.named ?? (n.named = []), e = r.BuiltInName.Normal.toLowerCase();
|
|
163
|
+
let s = t.find((t) => t.name?.toLowerCase() === e);
|
|
164
|
+
s || (s = {
|
|
165
|
+
name: r.BuiltInName.Normal,
|
|
166
|
+
style: {}
|
|
167
|
+
}, t.push(s)), E(s.style, !0);
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
export { P as a, w as c, i as d, f, a as g, d as h, A as i, u as l, h as m, R as n, F as o, m as p, g as r, v as s, S as t, c as u };
|
package/node/esm/index.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.2
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
import { defineLazyModule as e } from "@sheetxl/utils";
|
|
8
|
+
var t = [
|
|
8
9
|
208,
|
|
9
10
|
207,
|
|
10
11
|
17,
|
|
@@ -13,40 +14,54 @@ var e = [
|
|
|
13
14
|
177,
|
|
14
15
|
26,
|
|
15
16
|
225
|
|
16
|
-
],
|
|
17
|
+
], a = async () => (await import("./Bi_kZVtZams7taqa.mjs")).OffCryptoEncryption, r = {
|
|
17
18
|
key: "offcrypto",
|
|
18
19
|
description: "Office Document Encryption",
|
|
19
|
-
detect: async (
|
|
20
|
-
if (
|
|
21
|
-
const
|
|
22
|
-
for (let
|
|
20
|
+
detect: async (e) => !!((e) => {
|
|
21
|
+
if (e.byteLength < t.length) return !1;
|
|
22
|
+
const a = new Uint8Array(e, 0, t.length);
|
|
23
|
+
for (let e = 0; e < t.length; e++) if (a[e] !== t[e]) return !1;
|
|
23
24
|
return !0;
|
|
24
|
-
})(
|
|
25
|
-
decode: async (e,
|
|
26
|
-
encode: async (e,
|
|
27
|
-
},
|
|
28
|
-
key:
|
|
25
|
+
})(e) && (await a()).detect(e),
|
|
26
|
+
decode: async (e, t) => (await a()).decode(e, t),
|
|
27
|
+
encode: async (e, t) => (await a()).encode(e, t)
|
|
28
|
+
}, o = e("io-xlsx:reader", () => import("./CWpezSa6TERGEv-B.mjs"), { tier: "common" }), i = e("io-xlsx:writer", () => import("./BD03jrMQ_UKA196-.mjs"), { tier: "common" }), n = "Excel", s = "ExcelMacro", c = {
|
|
29
|
+
key: n,
|
|
29
30
|
description: "Excel Workbook",
|
|
30
31
|
mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
31
|
-
exts: [
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
exts: ["xlsx", "xls"],
|
|
33
|
+
handler: async (e, t) => (await o.load()).readXLSX(e, t)
|
|
34
|
+
}, l = {
|
|
35
|
+
key: s,
|
|
36
|
+
description: "Excel Macro-Enabled Workbook",
|
|
37
|
+
mimeType: "application/vnd.ms-excel.sheet.macroEnabled.12",
|
|
38
|
+
exts: ["xlsm"],
|
|
39
|
+
handler: async (e, t) => (await o.load()).readXLSX(e, t)
|
|
40
|
+
}, m = {
|
|
41
|
+
key: n,
|
|
39
42
|
mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
40
43
|
description: "Excel Workbook",
|
|
41
44
|
exts: ["xlsx"],
|
|
42
|
-
handler: async (e, t) => (await
|
|
43
|
-
|
|
45
|
+
handler: async (e, t) => (await i.load()).writeXLSX(e, {
|
|
46
|
+
...t,
|
|
47
|
+
macroEnabled: !1
|
|
48
|
+
})
|
|
49
|
+
}, d = {
|
|
50
|
+
key: s,
|
|
51
|
+
mimeType: "application/vnd.ms-excel.sheet.macroEnabled.12",
|
|
52
|
+
description: "Excel Macro-Enabled Workbook",
|
|
53
|
+
exts: ["xlsm"],
|
|
54
|
+
handler: async (e, t) => (await i.load()).writeXLSX(e, {
|
|
55
|
+
...t,
|
|
56
|
+
macroEnabled: !0
|
|
57
|
+
})
|
|
58
|
+
}, p = {
|
|
44
59
|
name: "@sheetxl/io-xlsx",
|
|
45
|
-
version: "0.8.0-beta.
|
|
60
|
+
version: "0.8.0-beta.2",
|
|
46
61
|
description: "XLSX I/O formats for SheetXL",
|
|
47
62
|
author: "SheetXL",
|
|
48
63
|
async register(e) {
|
|
49
|
-
await e.registerReadFormat(
|
|
64
|
+
await e.registerReadFormat(c), await e.registerReadFormat(l), await e.registerWriteFormat(m), await e.registerWriteFormat(d), await e.registerEncryption(r);
|
|
50
65
|
}
|
|
51
66
|
};
|
|
52
|
-
export {
|
|
67
|
+
export { p as IOPlugin, s as XLSM_FORMAT_KEY, n as XLSX_FORMAT_KEY };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheetxl/io-xlsx",
|
|
3
3
|
"description": "SheetXL - Import/Export from/to Excel",
|
|
4
|
-
"version": "0.8.0-beta.
|
|
4
|
+
"version": "0.8.0-beta.2",
|
|
5
5
|
"license": "SEE LICENSE IN <LICENSE>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"utilities"
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@sheetxl/sdk": "^0.8.0-beta.
|
|
49
|
-
"@sheetxl/utils": "^0.8.0-beta.
|
|
48
|
+
"@sheetxl/sdk": "^0.8.0-beta.2",
|
|
49
|
+
"@sheetxl/utils": "^0.8.0-beta.2",
|
|
50
50
|
"@xmldom/xmldom": "^0.9.10",
|
|
51
51
|
"@zip.js/zip.js": "^2.8.34",
|
|
52
52
|
"web-streams-polyfill": "^4.3.0",
|
|
@@ -69,18 +69,18 @@ export type CfType = typeof CfType[keyof typeof CfType];
|
|
|
69
69
|
* @returns The condition, or `null` for the three scale rules and for any type this does not know
|
|
70
70
|
* (the caller keeps the rule regardless — see design §2.1).
|
|
71
71
|
*/
|
|
72
|
-
export declare function toCondition(rule: OOXMLCfRule, warn?: (message: string) => void): ICondition.JSON | null;
|
|
72
|
+
export declare function toCondition(rule: OOXMLCfRule, warn?: (message: string, onceKey?: string) => void): ICondition.JSON | null;
|
|
73
73
|
/**
|
|
74
74
|
* The inverse of {@link toCondition}: a condition as OOXML's flat attributes plus the `<formula>`
|
|
75
75
|
* children Excel expects.
|
|
76
76
|
*
|
|
77
|
-
* @param origin The top-left cell of the rule's
|
|
77
|
+
* @param origin The top-left cell of the bounding box of the rule's ranges, in A1 form. Relative references in a
|
|
78
78
|
* generated formula are anchored to it (design §2.6).
|
|
79
79
|
*
|
|
80
80
|
* @returns `null` when the condition cannot be spelled in OOXML's CF schema; the caller warns and
|
|
81
81
|
* skips the rule.
|
|
82
82
|
*/
|
|
83
|
-
export declare function fromCondition(condition: ICondition.JSON | undefined, origin: string, warn?: (message: string) => void): OOXMLCfRule | null;
|
|
83
|
+
export declare function fromCondition(condition: ICondition.JSON | undefined, origin: string, warn?: (message: string, onceKey?: string) => void): OOXMLCfRule | null;
|
|
84
84
|
/** The `cfRule/@type` a scale carries. */
|
|
85
85
|
export declare function scaleToType(scale: IConditionalFormat.Scale): string;
|
|
86
86
|
//# sourceMappingURL=ConditionalFormatRules.d.ts.map
|
|
@@ -43,17 +43,33 @@ export type DvType = typeof DvType[keyof typeof DvType];
|
|
|
43
43
|
* `$A$1:$A$5` are formula text by type, carried verbatim with no marker.
|
|
44
44
|
*/
|
|
45
45
|
export declare function formulaToParam(text: string, type: string | undefined): Scalar;
|
|
46
|
+
/**
|
|
47
|
+
* The most characters Excel reads from a `dataValidation`'s `prompt`, `error`, `promptTitle` or
|
|
48
|
+
* `errorTitle`. One more and Excel refuses to open the workbook at all (probe P5). Excel's own
|
|
49
|
+
* authoring stops sooner (titles 32, prompt 254, error 225); the file is what matters here.
|
|
50
|
+
*/
|
|
51
|
+
export declare const MAX_MESSAGE_LENGTH = 255;
|
|
52
|
+
/**
|
|
53
|
+
* `text` cut to {@link MAX_MESSAGE_LENGTH}, never splitting a surrogate pair; `warn` names the
|
|
54
|
+
* attribute when anything is cut.
|
|
55
|
+
*/
|
|
56
|
+
export declare function clampMessage(text: string | undefined, attribute: string, warn?: (message: string, onceKey?: string) => void): string | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Whether formula `text` is a union reference (`($A$1,$A$8)`, `A1,A8`): a comma outside every
|
|
59
|
+
* function call, string, quoted sheet name and array constant.
|
|
60
|
+
*/
|
|
61
|
+
export declare function isUnionFormula(text: string): boolean;
|
|
46
62
|
/**
|
|
47
63
|
* Reads a `dataValidation`'s type/operator/formulas as a condition.
|
|
48
64
|
*
|
|
49
65
|
* @returns The condition, or `null` for a prompt-only validation (no `type`, Excel's "Any value").
|
|
50
66
|
*/
|
|
51
|
-
export declare function toCondition(rule: OOXMLDataValidation, warn?: (message: string) => void): ICondition.JSON | null;
|
|
67
|
+
export declare function toCondition(rule: OOXMLDataValidation, warn?: (message: string, onceKey?: string) => void): ICondition.JSON | null;
|
|
52
68
|
/**
|
|
53
69
|
* The inverse of {@link toCondition}.
|
|
54
70
|
*
|
|
55
71
|
* @returns `null` when the condition cannot be spelled in OOXML; the caller warns and writes the
|
|
56
72
|
* validation as prompt-only rather than dropping it.
|
|
57
73
|
*/
|
|
58
|
-
export declare function fromCondition(condition: ICondition.JSON | undefined, warn?: (message: string) => void): OOXMLDataValidation | null;
|
|
74
|
+
export declare function fromCondition(condition: ICondition.JSON | undefined, warn?: (message: string, onceKey?: string) => void): OOXMLDataValidation | null;
|
|
59
75
|
//# sourceMappingURL=DataValidationRules.d.ts.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Excel calculation-engine stamp this package is verified against.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* The writer stamps a workbook that has no source of its own with these, and the reader's
|
|
6
|
+
* calc-on-load policy compares a file's `calcId` against the same build. Raise the two together,
|
|
7
|
+
* and only alongside the oracle they name.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* The `calcPr@calcId` of the Excel build this engine's results are verified against.
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* `calcId` is the version of the Excel calculation engine that last calculated a file. On open,
|
|
14
|
+
* Excel trusts the stored values when the id is its own or newer and performs a FULL
|
|
15
|
+
* recalculation when it is older or absent — which turns every citation of a closed external
|
|
16
|
+
* book into `#REF!` (DESIGN-EXTERNAL-LINKS phase D). So a written workbook is stamped with the id
|
|
17
|
+
* of the build this engine's results are verified against — the COM oracle, Excel 16.0, which
|
|
18
|
+
* writes `191029` (`externalLinksNames.xlsx`, authored by it 2026-09-11) — and a source file's own
|
|
19
|
+
* id is carried through unchanged, so a resave keeps exactly the trust the original had. A later
|
|
20
|
+
* Excel, whose id is higher, recalculates on open as it does for its own older files.
|
|
21
|
+
*
|
|
22
|
+
* On read, a file whose id is absent or below this one is recalculated as Excel would.
|
|
23
|
+
*/
|
|
24
|
+
export declare const EXCEL_CALC_ID_VERIFIED = "191029";
|
|
25
|
+
/**
|
|
26
|
+
* The `xcalcf:calcFeatures` extension written for a workbook that has no source list of its own —
|
|
27
|
+
* the other half of the trust {@link EXCEL_CALC_ID_VERIFIED} buys.
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Since 2018 Excel also records which calculation FEATURES the engine that last calculated the
|
|
31
|
+
* file had (`microsoft.com:RD`, `Single`, `LET_WF`, …), and recalculates a file on open whose
|
|
32
|
+
* list lacks any of its own — measured 2026-09-11 through the COM oracle: Excel's own resave of
|
|
33
|
+
* `externalLinksNames.xlsx` opens with its stored values, and the same file with ONLY this
|
|
34
|
+
* extension removed opens recalculated (`#REF!`, `#NAME?`), while removing `calcChain.xml` or
|
|
35
|
+
* spelling a legacy cell `_xlfn.SINGLE(...)` changes nothing. The list is the one that Excel
|
|
36
|
+
* build writes; a source file's own is carried through unchanged.
|
|
37
|
+
*/
|
|
38
|
+
export declare const EXCEL_CALC_FEATURES_VERIFIED: string;
|
|
39
|
+
//# sourceMappingURL=ExcelCalcStamp.d.ts.map
|