@sheetxl/io-xlsx 0.7.28-beta.4 → 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.
Files changed (89) hide show
  1. package/browser/cjs/BzOEBR0jaxXg9wvt.cjs +5 -0
  2. package/browser/cjs/C8oC1tPbhgR0Dqtx.cjs +2 -0
  3. package/browser/cjs/Ca-xJDjg5bOpUPXX.cjs +1 -0
  4. package/browser/cjs/{D5Y4KQhKdukOkjvA.cjs → D3EWCPfCu-qMOIGd.cjs} +1 -2
  5. package/browser/cjs/{DK9GutW2zPbyNlfU.cjs → DULsYP_GcPGLVYSE.cjs} +10 -1
  6. package/browser/cjs/DtBN3UOzNJjYBwJ6.cjs +1 -0
  7. package/browser/cjs/index.cjs +1 -1
  8. package/browser/cjs/sNZR19Wk-XQ2xZ9E.cjs +1 -0
  9. package/browser/esm/B9q618XELV7uWJsA.mjs +67 -0
  10. package/browser/esm/{D8qZcXzj_fdusd0Y.mjs → BwbMurFOptAFs7gC.mjs} +1596 -1130
  11. package/browser/esm/{BhohPLTubb_9rfrh.mjs → CMHb6pUUmsCP9r_9.mjs} +2 -2
  12. package/browser/esm/{saBnxecsRUpY6fGv.mjs → CMzkLUwbgA73RvCb.mjs} +1 -1
  13. package/browser/esm/D75_rfogFUfXADKc.mjs +3324 -0
  14. package/browser/esm/{DlBlJGlFQJrKovwJ.mjs → DfuBawaydlvgZMR-.mjs} +1827 -1050
  15. package/browser/esm/{BknJ4AeVeFJploh9.mjs → DhqYgh9G2vLn7mIE.mjs} +28 -13
  16. package/browser/esm/DoMlKUCnMSlR2qX5.mjs +159 -0
  17. package/browser/esm/{CV_L3E5OoPstI9lx.mjs → DtpWa7tZahylJ3HS.mjs} +446 -347
  18. package/browser/esm/{BXCOn1XvLvYSfpzi.mjs → IZf0hIeLYj3T0Xvu.mjs} +2 -2
  19. package/browser/esm/{C3sYFBc7Tym8l12A.mjs → _UDbQq5-pHbU1f82.mjs} +1 -1
  20. package/browser/esm/index.mjs +3 -3
  21. package/node/esm/{DsZ19z4oXoL-d0Lk.mjs → BD03jrMQ_UKA196-.mjs} +1937 -1142
  22. package/node/esm/{B6lQXVQjFT_OE3IA.mjs → Bi_kZVtZams7taqa.mjs} +2 -2
  23. package/node/esm/{BYCpXFieBgL_cwTO.mjs → BxHvzSROx_N_7nJH.mjs} +607 -506
  24. package/node/esm/{CfIzBnObj09fDuUX.mjs → CB1ijGbhl-e2l6Mm.mjs} +49 -35
  25. package/node/esm/CO1M1H1N6fB422K-.mjs +2959 -0
  26. package/node/esm/CWpezSa6TERGEv-B.mjs +3410 -0
  27. package/node/esm/{B9CUp-rqol5K1r1c.mjs → CY-pSutJLHskZfXZ.mjs} +1 -1
  28. package/node/esm/Dezt2uIDqlxjiuk5.mjs +170 -0
  29. package/node/esm/index.mjs +40 -25
  30. package/package.json +3 -3
  31. package/types/src/ConditionalFormatRules.d.ts +3 -3
  32. package/types/src/DataValidationRules.d.ts +18 -2
  33. package/types/src/ExcelCalcStamp.d.ts +39 -0
  34. package/types/src/ExcelCompat.d.ts +197 -42
  35. package/types/src/LegacyFormula.d.ts +28 -7
  36. package/types/src/Plugin.d.ts +16 -5
  37. package/types/src/ProtectionAttributes.d.ts +38 -0
  38. package/types/src/SourcePackage.d.ts +31 -12
  39. package/types/src/Types.d.ts +17 -0
  40. package/types/src/reader/HiddenFormulas.d.ts +16 -0
  41. package/types/src/reader/Warning.d.ts +29 -0
  42. package/types/src/reader/dom/DOMTransformer.d.ts +1 -1
  43. package/types/src/reader/dom/ExecutionContext.d.ts +16 -3
  44. package/types/src/reader/dom/Types.d.ts +19 -3
  45. package/types/src/reader/domVisitors/CommentVisitor.d.ts +18 -1
  46. package/types/src/reader/domVisitors/CommentsVisitor.d.ts +2 -2
  47. package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts +21 -3
  48. package/types/src/reader/domVisitors/SheetColorContainerVisitor.d.ts +2 -2
  49. package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +6 -1
  50. package/types/src/reader/domVisitors/ThreadedCommentVisitor.d.ts +9 -1
  51. package/types/src/reader/domVisitors/ThreadedCommentsVisitor.d.ts +2 -2
  52. package/types/src/reader/domVisitors/WorkbookVisitor.d.ts +11 -1
  53. package/types/src/reader/sax/LeanSaxParser.d.ts +58 -0
  54. package/types/src/reader/sax/SaxParser.d.ts +11 -1
  55. package/types/src/reader/sax/SaxVisitor.d.ts +3 -2
  56. package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts +9 -0
  57. package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +11 -4
  58. package/types/src/utils/VmlNoteShapes.d.ts +75 -0
  59. package/types/src/vba/VBAProject.d.ts +52 -4
  60. package/types/src/writer/builder/ContentTypes.d.ts +13 -0
  61. package/types/src/writer/builder/Emitter.d.ts +6 -6
  62. package/types/src/writer/builder/EmitterRegistry.d.ts +7 -0
  63. package/types/src/writer/builder/OpcXmlUtils.d.ts +2 -0
  64. package/types/src/writer/builder/PackageBuilder.d.ts +70 -22
  65. package/types/src/writer/builder/PartWriter.d.ts +5 -0
  66. package/types/src/writer/builder/RelationshipSet.d.ts +3 -0
  67. package/types/src/writer/builder/Types.d.ts +107 -38
  68. package/types/src/writer/builder/_Types.d.ts +17 -0
  69. package/types/src/writer/emitters/CommentsEmitter.d.ts +52 -0
  70. package/types/src/writer/emitters/EmbeddedPartEmitter.d.ts +60 -0
  71. package/types/src/writer/emitters/ExternalLinkEmitter.d.ts +19 -0
  72. package/types/src/writer/emitters/LegacyDrawingEmitter.d.ts +18 -0
  73. package/types/src/writer/emitters/PersonsEmitter.d.ts +17 -0
  74. package/types/src/writer/emitters/PivotTableEmitter.d.ts +45 -0
  75. package/types/src/writer/emitters/ThreadedCommentsEmitter.d.ts +21 -0
  76. package/types/src/writer/emitters/WorkbookEmitter.d.ts +16 -3
  77. package/types/src/writer/utils/DrawMLUtils.d.ts +16 -1
  78. package/types/src/writer/utils/HiddenFormulaXfs.d.ts +28 -0
  79. package/browser/cjs/Bhq8KfEhCnRykWeS.cjs +0 -1
  80. package/browser/cjs/BmG0GOcbuYvt3-R2.cjs +0 -1
  81. package/browser/cjs/D3YH3tTndeltJsh5.cjs +0 -1
  82. package/browser/cjs/DWkuoJSgvcXJTdN1.cjs +0 -1
  83. package/browser/cjs/Dmi-Tsz618B6vKpZ.cjs +0 -5
  84. package/browser/esm/BcnofzmeeuCVzr_M.mjs +0 -52
  85. package/browser/esm/C7R1lFA0iv-1bZ9i.mjs +0 -99
  86. package/browser/esm/DLEtaZiz_1cZH0dA.mjs +0 -2685
  87. package/node/esm/BSrW-J3BEH4Tza_S.mjs +0 -2486
  88. package/node/esm/Bqi4c7-14v0oNgFN.mjs +0 -108
  89. package/node/esm/D0frS50CfyeuXcuz.mjs +0 -2766
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.7.28-beta.4
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 };
@@ -1,10 +1,11 @@
1
1
  /**
2
- * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.7.28-beta.4
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
- var e = [
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
- ], t = async () => (await import("./B6lQXVQjFT_OE3IA.mjs")).OffCryptoEncryption, r = {
17
+ ], a = async () => (await import("./Bi_kZVtZams7taqa.mjs")).OffCryptoEncryption, r = {
17
18
  key: "offcrypto",
18
19
  description: "Office Document Encryption",
19
- detect: async (r) => !!((t) => {
20
- if (t.byteLength < e.length) return !1;
21
- const r = new Uint8Array(t, 0, e.length);
22
- for (let t = 0; t < e.length; t++) if (r[t] !== e[t]) return !1;
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
- })(r) && (await t()).detect(r),
25
- decode: async (e, r) => (await t()).decode(e, r),
26
- encode: async (e, r) => (await t()).encode(e, r)
27
- }, a = "Excel", o = {
28
- key: a,
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
- "xlsx",
33
- "xls",
34
- "xlsm"
35
- ],
36
- handler: async (e, t) => (await import("./D0frS50CfyeuXcuz.mjs")).readXLSX(e, t)
37
- }, i = {
38
- key: a,
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 import("./DsZ19z4oXoL-d0Lk.mjs")).writeXLSX(e, t)
43
- }, n = {
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.7.28-beta.4",
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(o), await e.registerWriteFormat(i), await e.registerEncryption(r);
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 { n as IOPlugin, a as XLSX_FORMAT_KEY };
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.7.28-beta.4",
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.7.28-beta.4",
49
- "@sheetxl/utils": "^0.7.28-beta.4",
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 FIRST range, in A1 form. Relative references in a
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