@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,10 +1,11 @@
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
- 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("./fOnuUjpPCAzmuIXN.mjs")).OffCryptoEncryption, r = {
17
+ ], a = async () => (await import("./A5sK8gK9ymQOyChG.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("./TERvDGVSsvCefEiX.mjs"), { tier: "common" }), i = e("io-xlsx:writer", () => import("./CJGTDWKH_yrWAW8o.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("./CvnRSooxEQdlJgMn.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("./CF1R5ovFsRNu--Rw.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.8.0-beta.1",
60
+ version: "0.8.0-beta.3",
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 };
@@ -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.
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.1",
4
+ "version": "0.8.0-beta.3",
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.1",
49
- "@sheetxl/utils": "^0.8.0-beta.1",
48
+ "@sheetxl/sdk": "^0.8.0-beta.3",
49
+ "@sheetxl/utils": "^0.8.0-beta.3",
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
@@ -1,4 +1,4 @@
1
- import { IFunction, ICalculation } from '@sheetxl/sdk';
1
+ import { IFunction, IRange, INamed, ISheet, ICalculation } from '@sheetxl/sdk';
2
2
  /**
3
3
  * The implicit-intersection translation between the modern (dynamic) formula model and what a
4
4
  * legacy xlsx `<f>` means — item 47's `ExcelCompat.ts`, born in io-xlsx
@@ -9,12 +9,29 @@ import { IFunction, ICalculation } from '@sheetxl/sdk';
9
9
  *
10
10
  * - READ (rules 1/2): a plain `<f>` — no `t="array"`, no `cm` — has legacy semantics whatever its
11
11
  * age, and loading it means putting the `@` back where Excel would
12
- * (`=ABS(A1:A5)` → `=ABS(@A1:A5)`). The reader wraps exactly those formulas in the
13
- * {@link INTERSECT_MARKER} pseudo-function, which is how the per-CELL decision reaches a
14
- * per-FORMULA transform; {@link createCompatReadTransform} strips the marker at the root and
15
- * injects.
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`).
16
17
  * - WRITE: the `cm="1"` + `t="array"` marker goes on every formula legacy intersection would
17
- * change — {@link hasIntersectionSite}, consumed by `WorksheetEmitter`.
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).
18
35
  *
19
36
  * ### Two kinds of arrayness, and only one of them is a site
20
37
  *
@@ -42,48 +59,40 @@ import { IFunction, ICalculation } from '@sheetxl/sdk';
42
59
  * predicate"). Re-run the probes when adding a function — no test can detect a new function Excel
43
60
  * happens to disagree with.
44
61
  */
45
- /**
46
- * The reader's per-cell legacy marker — a pseudo-function the reader wraps around every formula
47
- * persisted WITHOUT array semantics, so the (single, per-formula) parse transform can see the
48
- * per-cell dialect bit in the tree itself.
49
- *
50
- * @remarks
51
- * The same idiom as `__xludf.DUMMYFUNCTION`: formula text only this package writes and only this
52
- * package strips, alive purely between the reader's JSON assembly and the parse-time transform.
53
- * If the transform is ever missing the marker surfaces as a loud `#NAME?`, never as a silently
54
- * wrong value.
55
- */
56
- export declare const INTERSECT_MARKER = "__sxl.INTERSECT";
57
62
  /** Does any call in this tree name a function on Excel's volatile list
58
63
  * (`ExcelFunctionFact.volatile`)? (Defined-name bodies are not chased: Excel's `ca` reflects the
59
64
  * CELL's own formula text.) */
60
65
  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
+ export declare const hasUnknownCall: (root: ICalculation.FormulaNode | undefined, ctx: CompatContext) => boolean;
73
+ /** What the walks read of a function: its declared slots and return, and whether it is a built-in. */
74
+ export interface CompatFunction {
75
+ getDeclaration(): IFunction.IDeclaration;
76
+ isBuiltIn(): boolean;
77
+ }
61
78
  /**
62
79
  * The resolution context the walks need — everything else is the formula's own tree.
63
80
  */
64
81
  export interface CompatContext {
65
- /** Resolves a canonical function name against the live registry, or `null` when unknown. */
66
- getFunction(name: string): IFunction | null;
82
+ /** Resolves a canonical function name to its declaration, or `null` when unknown. */
83
+ getFunction(name: string): CompatFunction | null;
84
+ /**
85
+ * Is there a registry to ask at all? Separates "this name is not a function" from "nothing can
86
+ * be resolved yet" — the two read identically through {@link getFunction}, and only the first
87
+ * is evidence of an unknown function.
88
+ */
89
+ hasFunctions(): boolean;
67
90
  /**
68
91
  * The lite root of a defined name's body, or `null` when the name is unresolvable — an
69
92
  * unresolved name evaluates to `#NAME?`, which is never a range.
70
93
  */
71
94
  getNamedRoot(name: string, scope?: string | null): ICalculation.FormulaNode | null;
72
95
  }
73
- /**
74
- * Builds a {@link CompatContext} over a (lazily supplied) calculation.
75
- *
76
- * @param calculation Deferred on purpose: at READ time the transform is constructed before the
77
- * `Workbook` it serves — formulas compile in queued load drains after the constructor returns, so
78
- * the reference is live by the first call. Defined names hydrate ahead of cell formulas (the
79
- * calculation's priority drain), which is what makes a name's body answerable mid-load.
80
- *
81
- * @remarks
82
- * The name-body lookup reads the LIVE item through the public
83
- * `getExpression({ formulaTransform })` collector — the same live-model pattern the emitter uses — and
84
- * memoizes per name for the context's (load- or save-long) lifetime.
85
- */
86
- export declare function createCompatContext(calculation: () => ICalculation | null | undefined): CompatContext;
87
96
  /**
88
97
  * Rules 1/2 — rewrites a LEGACY formula into its modern equivalent by inserting `@` at every
89
98
  * implicit-intersection site, exactly as Excel does when it opens a pre-dynamic-array cell.
@@ -127,16 +136,162 @@ export declare const insertImplicitIntersection: (root: ICalculation.FormulaNode
127
136
  * open alternative.
128
137
  */
129
138
  export declare const hasIntersectionSite: (root: ICalculation.FormulaNode, ctx: CompatContext) => boolean;
139
+ /** The reader's two READ transforms — see {@link createCompatReadTransforms}. */
140
+ export interface CompatReadTransforms {
141
+ /**
142
+ * The legacy SPELLING unwrap alone (`createLegacyReadTransform`). What a cell the file marked
143
+ * modern (`cm=`/`t="array"`) takes, and what every defined name takes.
144
+ */
145
+ base: ICalculation.FormulaTransform;
146
+ /** {@link base} plus the rules-1/2 `@` insertion at the root. What a plain `<f>` takes. */
147
+ legacy: ICalculation.FormulaTransform;
148
+ }
149
+ /**
150
+ * The reader's READ transforms, one per dialect: the legacy spelling unwrap on every node, and —
151
+ * for a formula the file stored PLAIN — the rules-1/2 insertion at the root.
152
+ *
153
+ * @remarks
154
+ * Which one a formula takes is a per-CELL question, answered from the same `sheet.formulaArray`
155
+ * the file's `cm=`/`t="array"` attributes were read into: the load asks the dialect's `read`
156
+ * once per formula block and hands it `isArrayAnchor`. Defined names have no cell to have
157
+ * provenance from and take {@link base}.
158
+ *
159
+ * Both are no-op-safe on a partially parsed (errored) tree — the walks skip absent inputs and a
160
+ * tree with no site is returned unchanged.
161
+ */
162
+ export declare function createCompatReadTransforms(ctx: CompatContext): CompatReadTransforms;
163
+ /**
164
+ * What the xlsx dialect says about one formula, for the attributes that sit beside `<f>`. Absent
165
+ * altogether when neither holds.
166
+ */
167
+ export interface XlsxFormulaAnnotation {
168
+ /**
169
+ * The formula has to carry dynamic-array semantics (`cm=`): legacy implicit intersection would
170
+ * change what it means ({@link hasIntersectionSite}).
171
+ */
172
+ cm?: true;
173
+ /**
174
+ * Excel recalculates the cell on every pass (`ca="1"`): it calls a function on Excel's volatile
175
+ * list, or one Excel does not know ({@link hasVolatileCall}, {@link hasUnknownCall}).
176
+ */
177
+ ca?: true;
178
+ }
179
+ /** Where a save's emitters find the workbook's dialect (`EmitContext.getSharedStates`). */
180
+ export declare const SHARED_STATE_XLSX_FORMULA_DIALECT = "xlsxFormulaDialect";
130
181
  /**
131
- * The reader's complete READ transform: the legacy spelling unwrap on every node
132
- * ({@link createLegacyReadTransform}), plus — at the root of a formula the reader wrapped in
133
- * {@link INTERSECT_MARKER} — the marker strip and rules-1/2 insertion.
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
+ export interface XlsxFormulaDialect {
205
+ /**
206
+ * The tree of the model's canonical text written at `anchor`, in the shape the compiled tree
207
+ * has (`FormulaText.ParseOptions.normalize`), or `null` when it does not parse.
208
+ */
209
+ parse(text: string, anchor?: IRange.CellCoords): ICalculation.FormulaNode | null;
210
+ /**
211
+ * Canonical text for a file's cell formula. Text that does not parse comes back as it is.
212
+ * @param isArrayAnchor The cell is the top-left of a `t="array"` extent: no `@` insertion.
213
+ */
214
+ readText(text: string, anchor: IRange.CellCoords, isArrayAnchor: boolean): string;
215
+ /**
216
+ * Canonical text for a file's detached formula — a defined name, a condition operand, a cfvo
217
+ * value: the spelling unwrap alone, at no anchor. Text that does not parse comes back as it is.
218
+ */
219
+ readDetached(text: string): string;
220
+ /** The `cm=` and `ca=` facts about a formula, asked of its canonical tree. */
221
+ annotate(root: ICalculation.FormulaNode): XlsxFormulaAnnotation | undefined;
222
+ /**
223
+ * The tree spelled for the file. The same object when nothing legacy is in it.
224
+ * @param isArrayAnchor The block is an array anchor: its `@`s stay explicit.
225
+ * @param homeTable The table the formula's cell is in, if any. The model images a reference
226
+ * to the formula's own table without the name (`[@Qty]`, as Excel displays it); the file wants
227
+ * it qualified.
228
+ */
229
+ spell(root: ICalculation.FormulaNode, isArrayAnchor: boolean, homeTable?: string | null): ICalculation.FormulaNode;
230
+ /** A defined name's canonical text spelled for the file. */
231
+ writeName(text: string): string;
232
+ }
233
+ /**
234
+ * Builds the dialect for a workbook.
235
+ *
236
+ * @param names The workbook's defined names, as the file or the model has them. A name's body is
237
+ * parsed when a rule first asks whether the name is range-valued; a bare built-in is eta-prefixed
238
+ * on write only while no name claims the spelling.
239
+ * @param tables The workbook's table names. A bare table name (`=Sales`) parses as a name; the
240
+ * file spells it as the table's data body (`Sales[]`), so the writer has to know which names are
241
+ * tables.
242
+ */
243
+ export declare function createXlsxFormulaDialect(names?: readonly INamed.JSON[] | null, tables?: readonly string[] | null): XlsxFormulaDialect;
244
+ /**
245
+ * Rewrites a sheet's formulas, as the reader recorded them, into canonical text in place. Plain
246
+ * versus marked is a per-CELL fact on disk (`cm=` / `t="array"` are cell attributes), answered
247
+ * from the `formulaArray` extents the reader recorded.
248
+ */
249
+ export declare function readSheetFormulas(sheet: ISheet.JSON, dialect: XlsxFormulaDialect): void;
250
+ /**
251
+ * The `@` nodes of a modern tree that the legacy read would put back on its own — the ones a
252
+ * PLAIN `<f>` does not need to spell.
253
+ *
254
+ * @remarks
255
+ * The exact inverse of {@link insertImplicitIntersection}, asked per `@`: with the operator
256
+ * stripped, is its operand at a site of the enclosing node (rules 2/3, in the scope and demand
257
+ * the enclosing position pushes down) — or, at the root, range-valued (rule 1)? Every other `@`
258
+ * in the tree stays where it is while one is asked about, which is what the insertion's
259
+ * post-order sees too: by the time it examines a node its children already carry their `@`s.
260
+ * The per-slot rules read one slot at a time, so stripping every candidate of a node at once is
261
+ * the same question as stripping each alone.
262
+ *
263
+ * An `@` directly over a PAREN is never implied: the read inserts INSIDE parens
264
+ * ({@link _at}), so `@(A1:A5)` is not a spelling it produces — measured `_xlfn.SINGLE((A1:A5))`.
265
+ *
266
+ * Only meaningful on a tree WITHOUT sites ({@link hasIntersectionSite} false): a marked cell
267
+ * takes no insertion on read, so every `@` on it has to be explicit.
268
+ */
269
+ export declare const impliedIntersections: (root: ICalculation.FormulaNode, ctx: CompatContext) => Set<ICalculation.FormulaNode>;
270
+ /**
271
+ * The writer's complete WRITE transform for a CELL formula: the legacy spelling on every node
272
+ * (`createLegacyWriteTransform`), plus — at the root of a formula that will be written plain —
273
+ * the elision of every `@` the legacy read would put back.
134
274
  *
135
275
  * @remarks
136
- * Defined names and array-anchored cells arrive UNWRAPPED, so they take the spelling pass only —
137
- * no marker, no insertion; the per-cell dialect decision was the reader's and rode in on the
138
- * marker. No-op-safe on an errored tree: a root that is not the marker (the parse broke before
139
- * the wrapper closed) is left alone.
276
+ * Excel's own spelling of a modern `@`, measured `probe-at-elision.ps1` (2026-09-03): `=@A1:A5`
277
+ * saves as `A1:A5`, `=ABS(@A1:A5)` as `ABS(A1:A5)`, `=@FOO(1)` as `FOO(1)`, `=@SEQUENCE(5)` as
278
+ * `_xlfn.SEQUENCE(5)`; `_xlfn.SINGLE` appears only where the read would NOT re-insert —
279
+ * `SUM(_xlfn.SINGLE(A1:A5))`, `SUMPRODUCT(ABS(_xlfn.SINGLE(A1:A5)))`, `_xlfn.SINGLE(SUM(1))`,
280
+ * `_xlfn.SINGLE((A1:A5))`. A formula that still has a site after its `@`s are honored is a
281
+ * MARKED cell (`cm="1"`) and keeps every `@` explicit (`=@ABS(A1:A5)` →
282
+ * `_xlfn.SINGLE(ABS(A1:A5))` under `cm="1"`), because no insertion runs on it. The text is
283
+ * therefore self-consistent in both readers: what comes back is the tree that went out.
284
+ *
285
+ * This is why the SpreadJS/add-in round trip closes: `=@CASCADESPARKLINE(...)` — the modern
286
+ * form of the plain `<f>` the authoring application wrote — goes back out as that same plain
287
+ * `<f>`, which is the only spelling the authoring application knows.
288
+ *
289
+ * Mechanics: the spelling runs in the SDK's own post-order walk (fresh nodes keep their trivia
290
+ * that way), so by the root every `@` is already a `SINGLE` call. The root pass unwraps a VIEW of
291
+ * the spelled tree to ask the modern-tree questions, maps each implied `@` of the view back to
292
+ * the `SINGLE` node it came from, and drops those nodes copy-on-write — every untouched node
293
+ * keeps its identity, and its whitespace. Defined names and array-anchored cells take the
294
+ * spelling pass only (`WorkbookEmitter`'s write provider decides per block; names never run this).
140
295
  */
141
- export declare function createCompatReadTransform(calculation: () => ICalculation | null | undefined): ICalculation.FormulaTransform;
296
+ export declare function createCompatWriteTransform(legacy: ICalculation.FormulaTransform, ctx: CompatContext): ICalculation.FormulaTransform;
142
297
  //# sourceMappingURL=ExcelCompat.d.ts.map
@@ -17,10 +17,27 @@ export { XLFN, XLWS } from './ExcelFunctionFacts';
17
17
  * | trim-range | infix `.:.` / `.:` / `:.` | `_xlfn._TRO_ALL/_TRO_LEADING/_TRO_TRAILING(a:b)` |
18
18
  * | bare built-in | named `SUM` (unresolved) | `_xleta.SUM` — from the MEASURED `ExcelFunctionFacts` map |
19
19
  * | LET/LAMBDA parameter | named `x` | `_xlpm.x` — at the declaration AND at every use |
20
+ * | long string literal | `"…"` over 255 characters | `_xlfn._LONGTEXT("…255…","…255…",…)` |
20
21
  *
21
22
  * MS-XLSX Extensions to Office Open XML section 2.2.2 Formula:
22
23
  * https://learn.microsoft.com/en-us/openspecs/office_standards/ms-xlsx/3d025add-118d-4413-9856-ab65712ec1b0
23
24
  */
25
+ /**
26
+ * The wrapper Excel spells a string literal longer than {@link LONGTEXT_CHUNK} characters with:
27
+ * the literal cut into chunks of at most that many characters, each a string argument, in order.
28
+ * Excel's formula grammar caps a literal at 255 characters; the model has no such cap and holds
29
+ * the literal whole, so the wrapper exists only on disk.
30
+ *
31
+ * Measured (Excel 16.0, 2026-09-23, `probe-dv-launder.ps1`): a 996-character data-validation list
32
+ * literal saved as `_xlfn._LONGTEXT("…","…","…","…")` with chunks of 255, 255, 255 and 231
33
+ * characters (`__tests__/data/conditions/dv-limits.xlsx`). The chunk is counted on the literal's
34
+ * characters, not its imaged form — how a doubled quote (`""`) counts toward the 255 is not yet
35
+ * measured. Excel opens a bare over-long literal in a DV formula (same probe); whether it opens
36
+ * one in a cell `<f>` is unmeasured, so the wrapper is written wherever Excel would write it.
37
+ */
38
+ export declare const LONGTEXT = "_LONGTEXT";
39
+ /** The longest string literal Excel spells bare — see {@link LONGTEXT}. */
40
+ export declare const LONGTEXT_CHUNK = 255;
24
41
  /**
25
42
  * Eta-reduced-lambda prefix — a BUILT-IN function referenced WITHOUT parentheses
26
43
  * (`=BYROW(A1:B3,SUM)`, and equally `=SUM(ABS)` or `=1+ABS`: Excel prefixes it wherever it
@@ -44,10 +61,12 @@ export declare const XLPM = "_xlpm.";
44
61
  export declare const XLOP = "_xlop.";
45
62
  /**
46
63
  * The write direction: modern (dynamic) tree → on-disk xlsx spellings, as an
47
- * {@link ICalculation.FormulaTransform} handed to `toJSON({ formulaTransform })`.
64
+ * {@link ICalculation.FormulaTransform} — the `write` half of the xlsx dialect (`ExcelCompat`).
48
65
  *
49
- * @param definedNames Upper-cased spellings of the workbook's defined names. A bare name that
50
- * resolves to a REAL defined name is a name, not an eta-reduced built-in, and stays bare.
66
+ * @param definedNames Answers whether an upper-cased spelling is one of the workbook's defined
67
+ * names. A bare name that resolves to a REAL defined name is a name, not an eta-reduced built-in,
68
+ * and stays bare. Asked as each formula is written, so an answer that reads the live names is
69
+ * about the names that save writes; a `Set` is a fixed answer.
51
70
  *
52
71
  * @remarks
53
72
  * Pure syntax + the measured `ExcelFunctionFacts` rows — the transform never consults the calc
@@ -55,16 +74,18 @@ export declare const XLOP = "_xlop.";
55
74
  * runs once per formula block on the compiled AST; formulas with nothing legacy in them return
56
75
  * every node untouched, which skips recompilation entirely.
57
76
  */
58
- export declare function createLegacyWriteTransform(definedNames?: ReadonlySet<string>): ICalculation.FormulaTransform;
77
+ export declare function createLegacyWriteTransform(definedNames?: {
78
+ has(name: string): boolean;
79
+ }): ICalculation.FormulaTransform;
59
80
  /**
60
81
  * The read direction: on-disk xlsx spellings → the modern (dynamic) tree, applied by the reader
61
- * at parse time (`IWorkbook.ConstructorOptions.formulaTransform`).
82
+ * at parse time (`ICellContainerOptions.getFormulaTransform`).
62
83
  *
63
84
  * @remarks
64
85
  * The mirror of {@link createLegacyWriteTransform}: strip `_xlfn._xlws.` BEFORE `_xlfn.`;
65
86
  * unwrap `SINGLE`/`ANCHORARRAY`/`_TRO_*` to their operators (matched on the bare name whether
66
- * or not a prefix was present — parity with the tolerance the parser used to have); strip
67
- * `_xleta.`/`_xlpm.` from names. `[#This Row]` → `@` needs nothing here — that spelling is
87
+ * or not a prefix was present — parity with the tolerance the parser used to have); join a
88
+ * `_LONGTEXT` call's chunks back into the one literal; strip `_xleta.`/`_xlpm.` from names. `[#This Row]` → `@` needs nothing here — that spelling is
68
89
  * valid TYPED input and the SDK normalizes it for every dialect.
69
90
  *
70
91
  * Load-path only: typed text never gets this pass, so `=_xlfn.SUM(A1)` typed is an unknown
@@ -1,12 +1,23 @@
1
1
  import { IWorkbookIO } from '@sheetxl/sdk';
2
2
  /**
3
- * The registry key both formats below share. Also the "same package family" test at the writer's
4
- * source-package seam (`XLSXWriter.ts`) — an origin only ever gets a retained `SourcePackage` by
5
- * successfully zip-parsing under {@link ReadFormat}'s handler, so this key alone is enough to tell
6
- * a genuine xlsx/xlsm round trip from a `.sxl`/`.csv` origin, without needing path/extension info a
7
- * server-side buffer read may not have. See `DESIGN-PACKAGE-PASSTHROUGH.md` §6.
3
+ * The registry key for Excel.
8
4
  */
9
5
  export declare const XLSX_FORMAT_KEY = "Excel";
6
+ /**
7
+ * The registry key for macro-enabled Excel (`.xlsm`).
8
+ *
9
+ * @remarks
10
+ * A separate registered format, not a second extension on {@link XLSX_FORMAT_KEY}: `DESIGN-IO.md`
11
+ * rejects one format owning several extensions precisely because the handler is never told which
12
+ * one is being written, and macro-enabledness is exactly such a per-extension decision. Both keys
13
+ * share one reader and one writer; only the *write* side is opinionated (the same shape `.sxl` and
14
+ * `.json` use).
15
+ *
16
+ * Splitting the **read** side too is what makes a plain save round-trip: an origin remembers the
17
+ * key it was read under, so an `.xlsm` opened as `Excel` would be saved back as `.xlsx` content
18
+ * under an `.xlsm` name.
19
+ */
20
+ export declare const XLSM_FORMAT_KEY = "ExcelMacro";
10
21
  /**
11
22
  * Registers all built-in read and write formats with the provided WorkbookIO registry.
12
23
  *
@@ -0,0 +1,38 @@
1
+ import { ISheetProtection, IWorkbookProtection } from '@sheetxl/sdk';
2
+ /**
3
+ * One protection attribute at the xlsx boundary.
4
+ *
5
+ * The model names what is ALLOWED (`true` = allowed); OOXML names what is PROTECTED (`"1"` = not
6
+ * allowed), so every value inverts on the way through. An omitted attribute is its `ooxmlDefault`
7
+ * (ECMA-376, confirmed against Excel), which is not the model's default: a bare
8
+ * `<sheetProtection sheet="1"/>` leaves objects and scenarios editable, while `lock()` with no
9
+ * options does not — Excel's own Protect Sheet writes `objects="1" scenarios="1"`.
10
+ */
11
+ export interface ProtectionAttribute<K extends string> {
12
+ /** The model property. */
13
+ key: K;
14
+ /** The OOXML attribute. */
15
+ attribute: string;
16
+ /** Whether the model allows it when the property is unset. */
17
+ modelDefault: boolean;
18
+ /** Whether the OOXML attribute PROTECTS it when omitted. */
19
+ ooxmlDefault: boolean;
20
+ }
21
+ /** `CT_SheetProtection`, in schema order. `showFormulas` has no attribute (formats carry it). */
22
+ export declare const SheetProtectionAttributes: readonly ProtectionAttribute<keyof ISheetProtection.JSON>[];
23
+ /**
24
+ * `CT_WorkbookProtection`'s lock flags. `revision` belongs to shared workbooks: nothing sets it, so an
25
+ * unset one writes nothing rather than locking revisions on every protected workbook.
26
+ */
27
+ export declare const WorkbookProtectionAttributes: readonly ProtectionAttribute<keyof IWorkbookProtection.Properties>[];
28
+ /**
29
+ * The model value for an attribute as read. An omitted or unparseable attribute reads as its OOXML
30
+ * default.
31
+ */
32
+ export declare const readProtectionAttribute: (spec: ProtectionAttribute<string>, value: string | null | undefined) => boolean;
33
+ /**
34
+ * The attribute value to write for a model value, or `null` when it equals the OOXML default and is
35
+ * omitted, as Excel does.
36
+ */
37
+ export declare const writeProtectionAttribute: (spec: ProtectionAttribute<string>, allowed: boolean | null | undefined) => "1" | "0" | null;
38
+ //# sourceMappingURL=ProtectionAttributes.d.ts.map