@sheetxl/io-xlsx 0.8.0-beta.1 → 0.8.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/browser/cjs/BGFXHa9DqD7qfj7K.cjs +5 -0
  2. package/browser/cjs/C8oC1tPbhgR0Dqtx.cjs +2 -0
  3. package/browser/cjs/CIQ0CyhkW02G7UhX.cjs +1 -0
  4. package/browser/cjs/{D5Y4KQhKdukOkjvA.cjs → D3EWCPfCu-qMOIGd.cjs} +1 -2
  5. package/browser/cjs/{BAtEL-5TLyoaPFDP.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/{BkNXyG6NC-w5Xo92.mjs → 9kAH9485xCkOzN_I.mjs} +28 -13
  10. package/browser/esm/{Cok_fBIUCHDSrKw0.mjs → B8BqrWUHPa06PzmO.mjs} +446 -347
  11. package/browser/esm/{Dj7D2nVdAZ3TiUks.mjs → BdmxnPd0ptyqOCaM.mjs} +1595 -1124
  12. package/browser/esm/BzlhIt5zSG0Ts4xd.mjs +3324 -0
  13. package/browser/esm/CED9M7CASY6R5LBH.mjs +159 -0
  14. package/browser/esm/{4BWLu134ABlCQEtM.mjs → DNwAYvPHH1G27K-w.mjs} +1824 -1051
  15. package/browser/esm/{ijQzHH-bvDfUHIi1.mjs → DbSKfjIyE4a1YHoX.mjs} +1 -1
  16. package/browser/esm/{Dz1Dp8DDJvhd09RR.mjs → DtypWHI_cwfAvvyR.mjs} +1 -1
  17. package/browser/esm/PpS5wqbPAZ9D3W7c.mjs +67 -0
  18. package/browser/esm/{Ctqql4O-3xj2K8vv.mjs → aL7oQqItresvrEf2.mjs} +2 -2
  19. package/browser/esm/{CLWzJJyoSrykkVLX.mjs → h9ucGRwzGRA2N44D.mjs} +2 -2
  20. package/browser/esm/index.mjs +3 -3
  21. package/node/esm/{fOnuUjpPCAzmuIXN.mjs → A5sK8gK9ymQOyChG.mjs} +2 -2
  22. package/node/esm/CCD1vEduHhKax_d_.mjs +170 -0
  23. package/node/esm/{CF1R5ovFsRNu--Rw.mjs → CJGTDWKH_yrWAW8o.mjs} +1934 -1143
  24. package/node/esm/{CEAmv36xpTNgFwl_.mjs → CsTuNxyS02vBz0Tk.mjs} +49 -35
  25. package/node/esm/{Ctcl4jN52INWpKWC.mjs → DOXXVsfrZi_6L0V7.mjs} +607 -506
  26. package/node/esm/OkoETXoPSSH3gQxa.mjs +2959 -0
  27. package/node/esm/TERvDGVSsvCefEiX.mjs +3410 -0
  28. package/node/esm/index.mjs +40 -25
  29. package/node/esm/{CEV7nKotMpeRRnQC.mjs → mlCt7xhd97xcwrEr.mjs} +1 -1
  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/OpcXmlUtils.d.ts +2 -0
  63. package/types/src/writer/builder/PackageBuilder.d.ts +70 -22
  64. package/types/src/writer/builder/PartWriter.d.ts +5 -0
  65. package/types/src/writer/builder/RelationshipSet.d.ts +3 -0
  66. package/types/src/writer/builder/Types.d.ts +107 -38
  67. package/types/src/writer/builder/_Types.d.ts +17 -0
  68. package/types/src/writer/emitters/CommentsEmitter.d.ts +52 -0
  69. package/types/src/writer/emitters/EmbeddedPartEmitter.d.ts +60 -0
  70. package/types/src/writer/emitters/ExternalLinkEmitter.d.ts +19 -0
  71. package/types/src/writer/emitters/LegacyDrawingEmitter.d.ts +18 -0
  72. package/types/src/writer/emitters/PersonsEmitter.d.ts +17 -0
  73. package/types/src/writer/emitters/PivotTableEmitter.d.ts +45 -0
  74. package/types/src/writer/emitters/ThreadedCommentsEmitter.d.ts +21 -0
  75. package/types/src/writer/emitters/WorkbookEmitter.d.ts +16 -3
  76. package/types/src/writer/utils/DrawMLUtils.d.ts +16 -1
  77. package/types/src/writer/utils/HiddenFormulaXfs.d.ts +28 -0
  78. package/browser/cjs/Bg0e53JZa8vhmm5a.cjs +0 -1
  79. package/browser/cjs/CK5FFUvet6FnIYO_.cjs +0 -5
  80. package/browser/cjs/DV6LeTEiiFUrZoxj.cjs +0 -1
  81. package/browser/cjs/DWkuoJSgvcXJTdN1.cjs +0 -1
  82. package/browser/cjs/Db8YjGM6TG34c8aT.cjs +0 -1
  83. package/browser/esm/BzQ_lPzc8C4OTIGZ.mjs +0 -99
  84. package/browser/esm/CJknI8BYGSZr-4zS.mjs +0 -52
  85. package/browser/esm/D-m_kQLaewdwuXaF.mjs +0 -2685
  86. package/node/esm/CvnRSooxEQdlJgMn.mjs +0 -2766
  87. package/node/esm/DQd0vxzTaPt2qSL-.mjs +0 -108
  88. 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.1
2
+ * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.3
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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.1
2
+ * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.3
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,67 @@
1
+ /**
2
+ * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.3
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 { defineLazyModule as e } from "@sheetxl/utils";
8
+ var t = [
9
+ 208,
10
+ 207,
11
+ 17,
12
+ 224,
13
+ 161,
14
+ 177,
15
+ 26,
16
+ 225
17
+ ], n = async () => (await import("./h9ucGRwzGRA2N44D.mjs")).OffCryptoEncryption, r = {
18
+ key: "offcrypto",
19
+ description: "Office Document Encryption",
20
+ detect: async (e) => !!((e) => {
21
+ if (e.byteLength < t.length) return !1;
22
+ let n = new Uint8Array(e, 0, t.length);
23
+ for (let e = 0; e < t.length; e++) if (n[e] !== t[e]) return !1;
24
+ return !0;
25
+ })(e) && (await n()).detect(e),
26
+ decode: async (e, t) => (await n()).decode(e, t),
27
+ encode: async (e, t) => (await n()).encode(e, t)
28
+ }, i = e("io-xlsx:reader", () => import("./BzlhIt5zSG0Ts4xd.mjs"), { tier: "common" }), a = e("io-xlsx:writer", () => import("./DNwAYvPHH1G27K-w.mjs"), { tier: "common" }), o = "Excel", s = "ExcelMacro", c = {
29
+ key: o,
30
+ description: "Excel Workbook",
31
+ mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
32
+ exts: ["xlsx", "xls"],
33
+ handler: async (e, t) => (await i.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 i.load()).readXLSX(e, t)
40
+ }, u = {
41
+ key: o,
42
+ mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
43
+ description: "Excel Workbook",
44
+ exts: ["xlsx"],
45
+ handler: async (e, t) => (await a.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 a.load()).writeXLSX(e, {
55
+ ...t,
56
+ macroEnabled: !0
57
+ })
58
+ }, f = {
59
+ name: "@sheetxl/io-xlsx",
60
+ version: "0.8.0-beta.3",
61
+ description: "XLSX I/O formats for SheetXL",
62
+ author: "SheetXL",
63
+ async register(e) {
64
+ await e.registerReadFormat(c), await e.registerReadFormat(l), await e.registerWriteFormat(u), await e.registerWriteFormat(d), await e.registerEncryption(r);
65
+ }
66
+ };
67
+ export { s as n, o as r, f as t };
@@ -1,10 +1,10 @@
1
1
  /**
2
- * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.1
2
+ * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.3
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
- import { t as e } from "./ijQzHH-bvDfUHIi1.mjs";
7
+ import { t as e } from "./DbSKfjIyE4a1YHoX.mjs";
8
8
  var t = e((e) => {
9
9
  function t(e, t) {
10
10
  return t === void 0 && (t = Object), t && typeof t.getOwnPropertyDescriptors == "function" && (e = t.create(null, t.getOwnPropertyDescriptors(e))), t && typeof t.freeze == "function" ? t.freeze(e) : e;
@@ -1,10 +1,10 @@
1
1
  /**
2
- * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.1
2
+ * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.3
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
- import { t as e } from "./Dz1Dp8DDJvhd09RR.mjs";
7
+ import { t as e } from "./DtypWHI_cwfAvvyR.mjs";
8
8
  import { InvalidPasswordError as t } from "@sheetxl/utils";
9
9
  var n, r, i = class e {
10
10
  static {
@@ -1,8 +1,8 @@
1
1
  /**
2
- * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.1
2
+ * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.3
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
- import { n as e, t } from "./CJknI8BYGSZr-4zS.mjs";
8
- export { t as IOPlugin, e as XLSX_FORMAT_KEY };
7
+ import { n as e, r as t, t as n } from "./PpS5wqbPAZ9D3W7c.mjs";
8
+ export { n as IOPlugin, e as XLSM_FORMAT_KEY, t as XLSX_FORMAT_KEY };
@@ -1,10 +1,10 @@
1
1
  /**
2
- * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.1
2
+ * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.3
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
- import { t as e } from "./CEV7nKotMpeRRnQC.mjs";
7
+ import { t as e } from "./mlCt7xhd97xcwrEr.mjs";
8
8
  import { InvalidPasswordError as t } from "@sheetxl/utils";
9
9
  var r, n, a = class e {
10
10
  static {
@@ -0,0 +1,170 @@
1
+ /**
2
+ * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.3
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 "./OkoETXoPSSH3gQxa.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 };