@sheetxl/io-xlsx 0.8.0-beta.11 → 0.8.0-beta.13

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 (82) hide show
  1. package/browser/esm/{Bs0EzhdU8WgGfPzf.mjs → 20e8E-6B9lZDdDO3.mjs} +2 -2
  2. package/browser/esm/{DICL6ecj9BdJv8aX.mjs → B4_m1DDdERBw_oc_.mjs} +4 -4
  3. package/browser/esm/{CuAXx5i4uqTz-mMY.mjs → B8HGBRlYw3gtV6cS.mjs} +1 -1
  4. package/browser/esm/{CzFYJPxmLyKgEKF0.mjs → BUnVDknxJ3z7Byym.mjs} +2 -2
  5. package/browser/esm/{yveeVJ6hKDI5KDEz.mjs → BZULU4MreyJ0WsDY.mjs} +1243 -1083
  6. package/browser/esm/{Cv3R6fGatARKedSn.mjs → BduVw3dFdh9sSGv_.mjs} +2560 -2120
  7. package/browser/esm/CM4k1dv3DNPThvDz.mjs +24 -0
  8. package/browser/esm/{CZ9I80og75SDRjv0.mjs → CkEGcTzeyh7cqVVb.mjs} +2 -2
  9. package/browser/esm/{BiDqExNXiY7ykk8E.mjs → DmW0VCJFl3eX7pBV.mjs} +199 -198
  10. package/browser/esm/{DatIA9fZbEPjW4bh.mjs → eFR-PmxEV53J-933.mjs} +1782 -1266
  11. package/browser/esm/index.mjs +2 -2
  12. package/browser/esm/{CLWsOc6DO8l1G_LF.mjs → khCH6SyDFBiHzmSl.mjs} +816 -764
  13. package/node/esm/BqB-dnUZaszNS--K.mjs +6367 -0
  14. package/node/esm/{Bpqm_PpGLpdjL47-.mjs → ByC9KtkF09muIv1I.mjs} +257 -256
  15. package/node/esm/{CAJxmJdobUbzpUz5.mjs → CHElwgFJ32Hh_gHU.mjs} +2 -2
  16. package/node/esm/{fopiRR7OiVoEiF7B.mjs → CIpg0EBGoVM58ajd.mjs} +2 -2
  17. package/node/esm/{DScqM1V4wPntNP6-.mjs → CJt_Kh2EU8DlMcus.mjs} +2046 -1588
  18. package/node/esm/{B9Zn6H1RV07Ob377.mjs → COzTSkHGuyKdKaxO.mjs} +512 -460
  19. package/node/esm/{ipiyzn5Pfohw2afB.mjs → Cc4XXs0Y2lL-2Et9.mjs} +1350 -1184
  20. package/node/esm/{CxlSbH7mmnEEsqmX.mjs → DmvVllQAwUtHEJbX.mjs} +1 -1
  21. package/node/esm/index.mjs +4 -4
  22. package/package.json +3 -3
  23. package/types/src/AutoFilterRules.d.ts +0 -42
  24. package/types/src/DataTableFormula.d.ts +26 -0
  25. package/types/src/DataValidationRules.d.ts +0 -5
  26. package/types/src/ExcelCalcStamp.d.ts +0 -36
  27. package/types/src/ExcelCompat.d.ts +0 -140
  28. package/types/src/ExcelFunctionFacts.d.ts +0 -272
  29. package/types/src/ExcelReservedNames.d.ts +0 -64
  30. package/types/src/KnownFonts.d.ts +0 -13
  31. package/types/src/LegacyFormula.d.ts +0 -58
  32. package/types/src/Plugin.d.ts +3 -3
  33. package/types/src/SheetKinds.d.ts +0 -15
  34. package/types/src/SourcePackage.d.ts +0 -44
  35. package/types/src/Types.d.ts +2 -3
  36. package/types/src/chart/ChartSpaceXml.d.ts +2 -1
  37. package/types/src/chart/_chartCodecs.d.ts +2 -0
  38. package/types/src/chart/_chartExStyle.d.ts +0 -9
  39. package/types/src/reader/CellControls.d.ts +18 -0
  40. package/types/src/reader/DummyFunctionUnwrap.d.ts +43 -23
  41. package/types/src/reader/LibreOfficeDataTable.d.ts +3 -2
  42. package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +0 -8
  43. package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts +1 -11
  44. package/types/src/reader/domVisitors/FeaturePropertyBagVisitor.d.ts +18 -0
  45. package/types/src/reader/domVisitors/FmtSchemeVisitor.d.ts +0 -11
  46. package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +6 -0
  47. package/types/src/reader/domVisitors/WorkbookVisitor.d.ts +0 -9
  48. package/types/src/reader/domVisitors/index.d.ts +2 -4
  49. package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts +1 -0
  50. package/types/src/reader/saxVisitors/SharedStringsVisitor.d.ts +0 -15
  51. package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +16 -3
  52. package/types/src/richValue/ErrorRichValueHandler.d.ts +22 -0
  53. package/types/src/richValue/IRichValueHandler.d.ts +109 -0
  54. package/types/src/richValue/LocalImageRichValueHandler.d.ts +18 -0
  55. package/types/src/richValue/RichDataParts.d.ts +69 -0
  56. package/types/src/richValue/RichRecordWriter.d.ts +61 -0
  57. package/types/src/richValue/RichValueHandlers.d.ts +25 -0
  58. package/types/src/richValue/RichValueResolver.d.ts +54 -0
  59. package/types/src/richValue/WebImageRichValueHandler.d.ts +37 -0
  60. package/types/src/richValue/index.d.ts +7 -0
  61. package/types/src/utils/VmlNoteStyle.d.ts +0 -19
  62. package/types/src/vba/VBAProject.d.ts +0 -19
  63. package/types/src/writer/builder/OpcXmlUtils.d.ts +0 -8
  64. package/types/src/writer/builder/PackageBuilder.d.ts +0 -41
  65. package/types/src/writer/builder/Types.d.ts +0 -30
  66. package/types/src/writer/emitters/ExternalLinkEmitter.d.ts +0 -11
  67. package/types/src/writer/emitters/FeaturePropertyBagEmitter.d.ts +8 -0
  68. package/types/src/writer/emitters/RichValuePartsEmitters.d.ts +36 -0
  69. package/types/src/writer/emitters/RichValueRelEmitter.d.ts +12 -0
  70. package/types/src/writer/emitters/RichValueStructureEmitter.d.ts +4 -3
  71. package/types/src/writer/emitters/RichValueTypesEmitter.d.ts +3 -2
  72. package/types/src/writer/emitters/RichValueWebImageEmitter.d.ts +24 -0
  73. package/types/src/writer/emitters/SlicerEmitter.d.ts +5 -2
  74. package/types/src/writer/emitters/StylesEmitter.d.ts +2 -0
  75. package/types/src/writer/utils/CellControlComplements.d.ts +29 -0
  76. package/types/src/writer/utils/DefaultRows.d.ts +0 -16
  77. package/types/src/writer/utils/DummyFunction.d.ts +0 -23
  78. package/types/src/writer/utils/RichValueCollector.d.ts +81 -129
  79. package/types/src/writer/utils/SheetStyleLayout.d.ts +18 -5
  80. package/node/esm/DD-yXSBzvDYy0TX5.mjs +0 -5842
  81. package/types/src/reader/domVisitors/RichValueDataVisitor.d.ts +0 -7
  82. package/types/src/reader/domVisitors/RichValueStructureVisitor.d.ts +0 -6
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.11
2
+ * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.13
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.11
2
+ * @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v0.8.0-beta.13
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.
@@ -14,7 +14,7 @@ var a = [
14
14
  177,
15
15
  26,
16
16
  225
17
- ], t = async () => (await import("./CAJxmJdobUbzpUz5.mjs")).OffCryptoEncryption, r = {
17
+ ], t = async () => (await import("./CHElwgFJ32Hh_gHU.mjs")).OffCryptoEncryption, r = {
18
18
  key: "offcrypto",
19
19
  description: "Office Document Encryption",
20
20
  detect: async (e) => !!((e) => {
@@ -25,7 +25,7 @@ var a = [
25
25
  })(e) && (await t()).detect(e),
26
26
  decode: async (e, a) => (await t()).decode(e, a),
27
27
  encode: async (e, a) => (await t()).encode(e, a)
28
- }, i = e("io-xlsx:reader", () => import("./ipiyzn5Pfohw2afB.mjs").then((e) => e.t)), o = e("io-xlsx:writer", () => import("./DD-yXSBzvDYy0TX5.mjs")), l = "Excel", n = "ExcelMacro", c = "ExcelTemplate", m = "ExcelMacroTemplate", s = [
28
+ }, i = e("io-xlsx:reader", () => import("./Cc4XXs0Y2lL-2Et9.mjs").then((e) => e.t)), o = e("io-xlsx:writer", () => import("./BqB-dnUZaszNS--K.mjs")), l = "Excel", n = "ExcelMacro", c = "ExcelTemplate", m = "ExcelMacroTemplate", s = [
29
29
  l,
30
30
  n,
31
31
  c,
@@ -94,7 +94,7 @@ var a = [
94
94
  })
95
95
  }, X = {
96
96
  name: "@sheetxl/io-xlsx",
97
- version: "0.8.0-beta.11",
97
+ version: "0.8.0-beta.13",
98
98
  description: "XLSX I/O formats for SheetXL",
99
99
  author: "SheetXL",
100
100
  async register(e) {
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.11",
4
+ "version": "0.8.0-beta.13",
5
5
  "license": "SEE LICENSE IN <LICENSE>",
6
6
  "type": "module",
7
7
  "exports": {
@@ -44,8 +44,8 @@
44
44
  "utilities"
45
45
  ],
46
46
  "dependencies": {
47
- "@sheetxl/sdk": "^0.8.0-beta.11",
48
- "@sheetxl/utils": "^0.8.0-beta.11",
47
+ "@sheetxl/sdk": "^0.8.0-beta.13",
48
+ "@sheetxl/utils": "^0.8.0-beta.13",
49
49
  "@xmldom/xmldom": "^0.9.12",
50
50
  "@zip.js/zip.js": "^2.23.0",
51
51
  "web-streams-polyfill": "^4.3.0",
@@ -10,39 +10,6 @@ export declare const DYNAMIC_FILTER_PERIODS: ReadonlySet<string>;
10
10
  * cache of its last evaluation, never read.
11
11
  */
12
12
  export declare function dynamicFilterToJSON(type: string | null | undefined): ICondition.JSON;
13
- /**
14
- * The border between OOXML's `customFilter` and the SDK's condition.
15
- *
16
- * @remarks
17
- * `customFilter` is the third of OOXML's three condition systems, and the only one that had no
18
- * border of its own: the reader passed `@operator` straight through as an SDK operator name and
19
- * the writer switched SDK names against OOXML spellings. The two vocabularies overlap on exactly
20
- * `lessThan` and `greaterThan`, so those worked and the other four did not — `greaterThanOrEqual`
21
- * arrived as an operator no registry knew, and left again as `equal`.
22
- *
23
- * Both directions live in one file, as they do for data validations and conditional formats: they
24
- * are one table, and a mapping whose halves drift apart is the bug the round-trip corpus exists to
25
- * catch.
26
- *
27
- * Excel has no text operators here. Its text filters are `equal` / `notEqual` over a pattern packed
28
- * into `@val`: `abc*` begins with, `*abc` ends with, `*abc*` contains, and `~` before `*`, `?` or
29
- * `~` makes that character literal. The three shapes map onto the SDK's text operators; any other
30
- * pattern (`a*b`, `a?c`) has no operator and is carried under its OOXML spelling, inert, so a resave
31
- * writes it back as it arrived.
32
- *
33
- * A wildcard-free `equal` compares the text a cell shows (P1, P5, P10): it reads as `equalTo`
34
- * under the Display selector ("displays as") and `notEqual` as its negation; `equalTo` under no
35
- * selector is value equality and never comes from here (DESIGN-FILTER §3.2, MODEL-CONDITIONS §4).
36
- * Excel stores a plain `equal` as `<filters><filter val>` on save, and so does this writer, which
37
- * is why it reopens as a one-item `inSet` under Display; the two are the same predicate. Excel's
38
- * `<>` criterion is `notEqual` against one space (P7) and reads as `not(blank)` under Display,
39
- * since a string of spaces is blank to it (§3.3). The selector sits on the leaf that reads the
40
- * value: inside a `not`, on each child of a pair.
41
- *
42
- * Value equality has no `customFilter` spelling. A value `EqualTo` on a number goes out as Excel's
43
- * own value test, `<customFilters and="1">` of `greaterThanOrEqual` and `lessThanOrEqual` with
44
- * the same operand, which Excel evaluates live; {@link foldComparisonPair} reads it back.
45
- */
46
13
  /** A `customFilter` in OOXML's own shape. Reader input, writer output — never persisted. */
47
14
  export interface OOXMLCustomFilter {
48
15
  operator?: string | null;
@@ -81,15 +48,6 @@ export declare function escapeWildcards(text: string): string;
81
48
  * not read through here — they are a one-item values list, whose item is text.
82
49
  */
83
50
  export declare function valToParam(val: string | null | undefined): string | number | undefined;
84
- /**
85
- * A param or a values-list item as the text an attribute holds.
86
- *
87
- * @remarks
88
- * A typed value is written as `String(value)`, which is the text it shows only under `General`. A
89
- * value list (`inSet` under no selector) written this way reopens as a display list and keeps a
90
- * number under `0.00` only if it shows as `1.5`; the writer warns. (PLAN-FILTER Phase 4 spells a
91
- * value list as the texts the value shows in its column.)
92
- */
93
51
  export declare function paramToVal(param: unknown): string | undefined;
94
52
  /**
95
53
  * Reads a `customFilter` as a condition.
@@ -0,0 +1,26 @@
1
+ import { IRange } from '@sheetxl/sdk';
2
+ export interface DataTableDefinition {
3
+ /** The result cells. */
4
+ ref: IRange.Coords;
5
+ /** The row input's address; absent for a one-input table down a column. */
6
+ rowInput?: string;
7
+ /** The column input's address; absent for a one-input table along a row. */
8
+ columnInput?: string;
9
+ /** The row input was deleted: the argument is `#REF!`. `rowInput` is its last address, if known. */
10
+ rowInputDeleted?: boolean;
11
+ /** The column input was deleted. */
12
+ columnInputDeleted?: boolean;
13
+ }
14
+ /** The `TABLE(...)` formula a definition is in the model, without the `=`, placed at `ref`'s top-left. */
15
+ export declare const toDataTableFormula: (table: DataTableDefinition) => string;
16
+ /**
17
+ * The definition a formula is, when the whole formula is one `TABLE(...)` call a file can hold as
18
+ * Excel's tag: two inputs that are each empty, `#REF!` or an unqualified cell, and two literal
19
+ * counts. `null` otherwise (a `TABLE` inside an expression, a computed count).
20
+ *
21
+ * @param text The formula text at the anchor, with or without the `=`.
22
+ * @param anchor The cell the formula sits in: the results' top-left.
23
+ */
24
+ export declare const parseDataTableFormula: (text: string, anchor: IRange.CellCoords) => DataTableDefinition | null;
25
+ export declare const dataTableAttributes: (table: DataTableDefinition) => Record<string, string>;
26
+ //# sourceMappingURL=DataTableFormula.d.ts.map
@@ -43,11 +43,6 @@ 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
46
  export declare const MAX_MESSAGE_LENGTH = 255;
52
47
  /**
53
48
  * `text` cut to {@link MAX_MESSAGE_LENGTH}, never splitting a surrogate pair; `warn` names the
@@ -1,39 +1,3 @@
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
1
  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
2
  export declare const EXCEL_CALC_FEATURES_VERIFIED: string;
39
3
  //# sourceMappingURL=ExcelCalcStamp.d.ts.map
@@ -1,74 +1,8 @@
1
1
  import { IFunction, IRange, INamed, IWorksheet, ICalculation } from '@sheetxl/sdk';
2
- /**
3
- * The implicit-intersection translation between the modern (dynamic) formula model and what a
4
- * legacy xlsx `<f>` means — item 47's `ExcelCompat.ts`, born in io-xlsx
5
- * (DESIGN-FORMULA-DIALECT.md §3).
6
- *
7
- * Both directions live here, built on ONE site rule so they cannot drift (FORMULA-SEMANTICS §6.1
8
- * — after the read transform a divergence is a wrong VALUE, not non-canonical XML):
9
- *
10
- * - READ (rules 1/2): a plain `<f>` — no `t="array"`, no `cm` — has legacy semantics whatever its
11
- * age, and loading it means putting the `@` back where Excel would
12
- * (`=ABS(A1:A5)` → `=ABS(@A1:A5)`). The decision is per CELL, and the bit rides BESIDE the
13
- * formula exactly as it does on disk, never inside it: `cm=`/`t="array"` are cell attributes,
14
- * the reader records their extents in `sheet.formulaArray`, and the load asks per formula which
15
- * of {@link createCompatReadTransforms}' two transforms to run
16
- * (`ICalculation.FormulaTransformContext`).
17
- * - WRITE: the `cm="1"` + `t="array"` marker goes on every formula legacy intersection would
18
- * change — {@link hasIntersectionSite}, answered beside the formula by the dialect's `annotate`
19
- * ({@link registerXlsxFormulaDialect}) and read by `WorksheetEmitter`. On a formula written
20
- * PLAIN, an `@` the legacy read would put back is not spelled at all — Excel elides it and
21
- * spells `_xlfn.SINGLE` only where the read would not re-insert it
22
- * ({@link createCompatWriteTransform}).
23
- *
24
- * ### An unknown function is a range
25
- *
26
- * A call to a function Excel does not know (an add-in or user-defined function — `CASCADESPARKLINE`
27
- * from SpreadJS, `FOO`) has an unknown return, and Excel treats that as range-VALUED: the call
28
- * takes an `@` at the root and at every scalar site holding it, never on its own arguments, and
29
- * never inside a range-accepting slot. Measured `probe-unknown-function-intersect.ps1`
30
- * (2026-09-03): `=FOO(1)` opens as `=@FOO(1)`, `=ABS(FOO(1))` as `=ABS(@FOO(1))`,
31
- * `=IF(TRUE,FOO(1),2)` as `=@IF(TRUE,FOO(1),2)`, `=FOO(A1:A5)` as `=@FOO(A1:A5)`, while
32
- * `=SUM(FOO(1))`, `=SUMPRODUCT(FOO(A1:A5))` and `=N(FOO(1))` stay plain. The value is `#NAME?`
33
- * either way — what the rule decides is whether the file round-trips to the same TEXT, which
34
- * matters the day the function exists (the same file opened by the application that wrote it).
35
- *
36
- * ### Two kinds of arrayness, and only one of them is a site
37
- *
38
- * Being an array is not the same question as being intersected. Arrayness that comes from a
39
- * REFERENCE — a range, a spill anchor, a table reference, a defined name, an array-returning or
40
- * `valueReturn` call — is a site wherever a value-typed slot holds it, whatever encloses it.
41
- * Arrayness that comes from an inline array CONSTANT is not: legacy Excel LIFTS `{…}` and only
42
- * collapses it where one value is genuinely wanted, which is the cell root and whatever the root's
43
- * demand reaches through ({@link _childDemand}). That is the split `constants` carries through
44
- * {@link _isRangeValued}.
45
- *
46
- * Measured on plain-`<f>` opens, `probe-array-constant-intersection{,2}.ps1` (40 rows, 2026-08-17):
47
- * `={1,2,3}` opens as `=@{1,2,3}` and `=ABS({-1,-2,-3})` as `=ABS(@{-1,-2,-3})`, while
48
- * `=SUM(ABS({-1,-2,-3}))` opens UNTOUCHED at 6 — where the same shape over a range,
49
- * `=SUM(ABS(H1:H3))`, opens as `=SUM(ABS(@H1:H3))`. A name is reference-derived even when its body
50
- * is a constant, which is the pair that kills the simpler reading: `=SUM(ArrConst&0)` opens as
51
- * `=SUM(@ArrConst&0)` = 10 against `=SUM({1,2,3}&0)` = 0.
52
- *
53
- * ### Everything measured; facts OVERRIDE declarations
54
- *
55
- * Every per-function fact the rules below consult lives in the measured `ExcelFunctionFacts` map
56
- * (one row per name, probe provenance and slot addressing documented there). The registry's
57
- * declarations state what a BODY needs and serve as the DEFAULT; wherever Excel measurably
58
- * disagrees, the fact wins (CALC-ISSUES item 44: "use the measured list, not a derived
59
- * predicate"). Re-run the probes when adding a function — no test can detect a new function Excel
60
- * happens to disagree with.
61
- */
62
2
  /** Does any call in this tree name a function on Excel's volatile list
63
3
  * (`ExcelFunctionFact.volatile`)? (Defined-name bodies are not chased: Excel's `ca` reflects the
64
4
  * CELL's own formula text.) */
65
5
  export declare const hasVolatileCall: (root: ICalculation.FormulaNode | undefined) => boolean;
66
- /**
67
- * Does this tree call a function the registry does not know? An unknown call is what Excel's
68
- * `ca="1"` records on a cell that reached a user-defined function during its last calculation
69
- * (measured on every `FOO` cell of `probe-unknown-function-intersect.ps1`) — static here where
70
- * Excel's is a runtime fact, so a call on an untaken lazy branch is flagged too.
71
- */
72
6
  export declare const hasUnknownCall: (root: ICalculation.FormulaNode | undefined, ctx: CompatContext) => boolean;
73
7
  /** What the walks read of a function: its declared slots and return, and whether it is a built-in. */
74
8
  export interface CompatFunction {
@@ -110,31 +44,6 @@ export interface CompatContext {
110
44
  * every rule above traces to Excel's own insertion, not our reading of it.
111
45
  */
112
46
  export declare const insertImplicitIntersection: (root: ICalculation.FormulaNode, ctx: CompatContext) => ICalculation.FormulaNode;
113
- /**
114
- * The WRITE decision — whether legacy implicit intersection would change this formula's meaning,
115
- * which is the exact condition under which Excel writes `cm="1"` + `t="array"`.
116
- *
117
- * @remarks
118
- * A STATIC property of the formula, not the value: `=IF(FALSE,H1:H3,5)` computes `5` and is still
119
- * marked. The same rule as {@link insertImplicitIntersection} by construction: a formula is
120
- * marked exactly when the insertion would change it — plus one clause the insertion rule does not
121
- * share: a `call` node ANYWHERE marks, because immediate application does not exist in the legacy
122
- * dialect at all. Measured (`probe-lambda-call.xlsx`, every accepted case): Excel puts
123
- * `cm="1"` + `t="array"` on `SUM(LAMBDA(x,x+1)(3),1)` (call in an argument slot, scalar root),
124
- * `MyLam(3)`, `A1(3)`, `-LAMBDA(x,-x)(1)`, the curried and partial forms — all of them. Without
125
- * the marker Excel reads the cell back as a LEGACY formula and re-inserts `@` at the root and on
126
- * the lambda parameters (`=@LAMBDA(a,b,@a+@b)(1,2)`), which is exactly what the Excel-open gate
127
- * caught (verify-lambda-call-opens.ps1, 2026-08-13).
128
- *
129
- * "Marked exactly when the insertion would change it" is OUR rule, and Excel's marker is not
130
- * only that — measured `probe-sumproduct-monthyear.ps1` + `probe-slot-class-intersect2.ps1`
131
- * (2026-08-14): the same text entered through legacy `.Formula` saves PLAIN and through modern
132
- * `.Formula2` saves `cm="1" t="array"`, at identical values, on every array-scope shape here. So
133
- * Excel's marker also records the ENTRY CHANNEL, which we do not persist. We write the legacy
134
- * channel's answer, which is the self-consistent one: the file we emit reads back — by Excel and
135
- * by us — to the tree we emitted it from. Carrying a read-side "was marked" bit instead is the
136
- * open alternative.
137
- */
138
47
  export declare const hasIntersectionSite: (root: ICalculation.FormulaNode, ctx: CompatContext) => boolean;
139
48
  /** The reader's two READ transforms — see {@link createCompatReadTransforms}. */
140
49
  export interface CompatReadTransforms {
@@ -178,29 +87,6 @@ export interface XlsxFormulaAnnotation {
178
87
  }
179
88
  /** Where a save's emitters find the workbook's dialect (`EmitContext.getSharedStates`). */
180
89
  export declare const SHARED_STATE_XLSX_FORMULA_DIALECT = "xlsxFormulaDialect";
181
- /**
182
- * The xlsx formula dialect for one workbook: how this format spells formulas, applied to formula
183
- * TEXT, with no calculation involved (DESIGN-CALC-SERVICE §9).
184
- *
185
- * - READ: the on-disk legacy spellings (`_xlfn.`, `_xlws.`, `_xleta.`, `_xlpm.`, `SINGLE`,
186
- * `ANCHORARRAY`, `_TRO_*`, `_LONGTEXT`) unwrapped, and for a plain cell the implicit-intersection
187
- * `@` operators Excel would show, exactly where it would ({@link CompatReadTransforms.legacy});
188
- * an array anchor and a detached formula take the unwrap alone.
189
- * - WRITE: the legacy spellings on every formula, plus, for a plain cell, the elision of each `@`
190
- * the read would put back ({@link createCompatWriteTransform}).
191
- * - ANNOTATE: an {@link XlsxFormulaAnnotation}.
192
- *
193
- * Functions are answered from the built-in declarations, defined names from the workbook's names
194
- * as text; neither needs an engine.
195
- *
196
- * A DETACHED formula is one with no cell of its own: a defined name, a conditional format or data
197
- * validation operand, a cfvo value. Excel evaluates a condition body in CSE mode (nothing
198
- * intersects, measured `probe-cf-intersect.ps1`) and writes it plain with no `cm=`, so the
199
- * plain-cell `@` insertion and elision never apply to it — only the spelling does. That spelling
200
- * needs no names, so a dialect built with none ({@link createXlsxFormulaDialect}) answers
201
- * {@link readDetached} completely; it is what the reader hands the worksheet visitors before the
202
- * workbook's names have been read.
203
- */
204
90
  export interface XlsxFormulaDialect {
205
91
  /**
206
92
  * The tree of the model's canonical text written at `anchor`, in the shape the compiled tree
@@ -279,31 +165,5 @@ export declare function readSheetFormulas(sheet: IWorksheet.JSON, dialect: XlsxF
279
165
  * takes no insertion on read, so every `@` on it has to be explicit.
280
166
  */
281
167
  export declare const impliedIntersections: (root: ICalculation.FormulaNode, ctx: CompatContext) => Set<ICalculation.FormulaNode>;
282
- /**
283
- * The writer's complete WRITE transform for a CELL formula: the legacy spelling on every node
284
- * (`createLegacyWriteTransform`), plus — at the root of a formula that will be written plain —
285
- * the elision of every `@` the legacy read would put back.
286
- *
287
- * @remarks
288
- * Excel's own spelling of a modern `@`, measured `probe-at-elision.ps1` (2026-09-03): `=@A1:A5`
289
- * saves as `A1:A5`, `=ABS(@A1:A5)` as `ABS(A1:A5)`, `=@FOO(1)` as `FOO(1)`, `=@SEQUENCE(5)` as
290
- * `_xlfn.SEQUENCE(5)`; `_xlfn.SINGLE` appears only where the read would NOT re-insert —
291
- * `SUM(_xlfn.SINGLE(A1:A5))`, `SUMPRODUCT(ABS(_xlfn.SINGLE(A1:A5)))`, `_xlfn.SINGLE(SUM(1))`,
292
- * `_xlfn.SINGLE((A1:A5))`. A formula that still has a site after its `@`s are honored is a
293
- * MARKED cell (`cm="1"`) and keeps every `@` explicit (`=@ABS(A1:A5)` →
294
- * `_xlfn.SINGLE(ABS(A1:A5))` under `cm="1"`), because no insertion runs on it. The text is
295
- * therefore self-consistent in both readers: what comes back is the tree that went out.
296
- *
297
- * This is why the SpreadJS/add-in round trip closes: `=@CASCADESPARKLINE(...)` — the modern
298
- * form of the plain `<f>` the authoring application wrote — goes back out as that same plain
299
- * `<f>`, which is the only spelling the authoring application knows.
300
- *
301
- * Mechanics: the spelling runs in the SDK's own post-order walk (fresh nodes keep their trivia
302
- * that way), so by the root every `@` is already a `SINGLE` call. The root pass unwraps a VIEW of
303
- * the spelled tree to ask the modern-tree questions, maps each implied `@` of the view back to
304
- * the `SINGLE` node it came from, and drops those nodes copy-on-write — every untouched node
305
- * keeps its identity, and its whitespace. Defined names and array-anchored cells take the
306
- * spelling pass only (`WorkbookEmitter`'s write provider decides per block; names never run this).
307
- */
308
168
  export declare function createCompatWriteTransform(legacy: ICalculation.FormulaTransform, ctx: CompatContext): ICalculation.FormulaTransform;
309
169
  //# sourceMappingURL=ExcelCompat.d.ts.map