xls-codec 4.8.0 → 4.9.0

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 (66) hide show
  1. package/README.md +5 -4
  2. package/dist/biff/cursor.cjs +12 -1
  3. package/dist/biff/cursor.d.cts +1 -1
  4. package/dist/biff/cursor.d.ts +1 -1
  5. package/dist/biff/cursor.js +12 -1
  6. package/dist/biff/ptg.cjs +16 -2
  7. package/dist/biff/ptg.d.cts +2 -2
  8. package/dist/biff/ptg.d.ts +2 -2
  9. package/dist/biff/ptg.js +16 -3
  10. package/dist/biff/record-types.cjs +4 -1
  11. package/dist/biff/record-types.d.cts +4 -2
  12. package/dist/biff/record-types.d.ts +4 -2
  13. package/dist/biff/record-types.js +4 -2
  14. package/dist/biff/strings.d.cts +1 -1
  15. package/dist/biff/strings.d.ts +1 -1
  16. package/dist/biff/xf-colors.d.cts +1 -1
  17. package/dist/biff/xf-colors.d.ts +1 -1
  18. package/dist/biff/xf-writer.d.cts +1 -1
  19. package/dist/biff/xf-writer.d.ts +1 -1
  20. package/dist/{conditional-format-12-Xl52VBCj.d.ts → conditional-format-12-C3nwy1f8.d.ts} +9 -4
  21. package/dist/{conditional-format-12-CZ43-CR4.d.cts → conditional-format-12-D65-ruTq.d.cts} +9 -4
  22. package/dist/conditional-format-BRMUTRP1.d.ts +41 -0
  23. package/dist/conditional-format-Cth_afMy.d.cts +41 -0
  24. package/dist/content.cjs +10 -0
  25. package/dist/content.js +10 -0
  26. package/dist/{cursor-VMtw9uVP.d.cts → cursor-CnEuX5qE.d.cts} +3 -1
  27. package/dist/{cursor-VMtw9uVP.d.ts → cursor-CnEuX5qE.d.ts} +3 -1
  28. package/dist/{data-validation-lJWM9-AP.d.cts → data-validation-BgUt8CbE.d.cts} +1 -1
  29. package/dist/{data-validation-BeYpL3Nb.d.ts → data-validation-Cq6iD8lB.d.ts} +1 -1
  30. package/dist/index.cjs +1 -0
  31. package/dist/index.d.cts +3 -3
  32. package/dist/index.d.ts +3 -3
  33. package/dist/index.js +2 -2
  34. package/dist/{ptg-CCBbJLZJ.d.cts → ptg-75v7MhaA.d.cts} +7 -1
  35. package/dist/{ptg-CCBbJLZJ.d.ts → ptg-75v7MhaA.d.ts} +7 -1
  36. package/dist/workbook/chart.d.cts +1 -1
  37. package/dist/workbook/chart.d.ts +1 -1
  38. package/dist/workbook/conditional-format-12.cjs +32 -1
  39. package/dist/workbook/conditional-format-12.d.cts +2 -2
  40. package/dist/workbook/conditional-format-12.d.ts +2 -2
  41. package/dist/workbook/conditional-format-12.js +33 -3
  42. package/dist/workbook/conditional-format-ex.cjs +53 -0
  43. package/dist/workbook/conditional-format-ex.d.cts +13 -0
  44. package/dist/workbook/conditional-format-ex.d.ts +13 -0
  45. package/dist/workbook/conditional-format-ex.js +52 -0
  46. package/dist/workbook/conditional-format.cjs +46 -23
  47. package/dist/workbook/conditional-format.d.cts +2 -2
  48. package/dist/workbook/conditional-format.d.ts +2 -2
  49. package/dist/workbook/conditional-format.js +46 -23
  50. package/dist/workbook/data-validation.d.cts +1 -1
  51. package/dist/workbook/data-validation.d.ts +1 -1
  52. package/dist/workbook/drawing.d.cts +1 -1
  53. package/dist/workbook/drawing.d.ts +1 -1
  54. package/dist/workbook/globals-writer.d.cts +1 -1
  55. package/dist/workbook/globals-writer.d.ts +1 -1
  56. package/dist/workbook/globals.d.cts +2 -2
  57. package/dist/workbook/globals.d.ts +2 -2
  58. package/dist/workbook/sheet.cjs +11 -0
  59. package/dist/workbook/sheet.d.cts +4 -4
  60. package/dist/workbook/sheet.d.ts +4 -4
  61. package/dist/workbook/sheet.js +12 -1
  62. package/dist/{xf-colors-mqerVt2O.d.cts → xf-colors-aeH9Ax3Q.d.cts} +1 -1
  63. package/dist/{xf-colors-d3OvRw76.d.ts → xf-colors-kdNsiNYt.d.ts} +1 -1
  64. package/package.json +1 -1
  65. package/dist/conditional-format-Bt1vRWgc.d.cts +0 -29
  66. package/dist/conditional-format-Cqcjnm7O.d.ts +0 -29
@@ -60,27 +60,42 @@ function parseDxfStyle(dxfBytes) {
60
60
  return;
61
61
  }
62
62
  }
63
- function readCf(record, ranges, formulaSheets) {
63
+ /** The shared byte-layout parse both readCf and conditional-format.ts's own readCondFmtGroup need: ct/cp/cce1/cce2, the dxf trailer's own bytes (its length inferred from the record's total size the same way this file always has, since [MS-XLS] never states it directly), and the two formula operands. Returns undefined for a truncated/malformed record rather than throwing, so a caller can fold this into its own try/catch or call it standalone. */
64
+ function parseCfBytes(record) {
64
65
  try {
65
66
  const cursor = new BlockCursor(record.blocks);
66
67
  const ct = cursor.u8();
67
68
  const cp = cursor.u8();
68
69
  const cce1 = cursor.u16();
69
70
  const cce2 = cursor.u16();
70
- if (ct === 2) return;
71
- const operator = CP_TO_OPERATOR.get(cp);
72
- if (operator === void 0) return;
73
71
  const dxfLength = recordByteLength(record) - 6 - cce1 - cce2;
74
- const dxfBytes = cursor.take(dxfLength);
75
- const rgce1 = cursor.take(cce1);
76
- const rgce2 = cursor.take(cce2);
77
- if (cce1 === 0) return;
72
+ return {
73
+ ct,
74
+ cp,
75
+ dxfBytes: cursor.take(dxfLength),
76
+ rgce1: cursor.take(cce1),
77
+ rgce2: cursor.take(cce2)
78
+ };
79
+ } catch (err) {
80
+ if (!(err instanceof BiffFormatError)) throw err;
81
+ return;
82
+ }
83
+ }
84
+ function readCf(record, ranges, formulaSheets) {
85
+ const parsed = parseCfBytes(record);
86
+ if (parsed === void 0) return;
87
+ const { ct, cp, dxfBytes, rgce1, rgce2 } = parsed;
88
+ if (ct === 2) return;
89
+ const operator = CP_TO_OPERATOR.get(cp);
90
+ if (operator === void 0) return;
91
+ if (rgce1.length === 0) return;
92
+ try {
78
93
  const formula1 = parseFormulaText(rgce1, formulaSheets);
79
94
  if (formula1 === void 0) return;
80
95
  return {
81
96
  operator,
82
97
  formula1,
83
- formula2: cce2 > 0 ? parseFormulaText(rgce2, formulaSheets) : void 0,
98
+ formula2: rgce2.length > 0 ? parseFormulaText(rgce2, formulaSheets) : void 0,
84
99
  style: parseDxfStyle(dxfBytes),
85
100
  ranges
86
101
  };
@@ -89,16 +104,20 @@ function readCf(record, ranges, formulaSheets) {
89
104
  return;
90
105
  }
91
106
  }
107
+ const DEGRADED_CONDFMT_GROUP = {
108
+ formats: [],
109
+ recordsConsumed: 1,
110
+ nID: 0,
111
+ ranges: [],
112
+ rawCfs: []
113
+ };
92
114
  function readCondFmtGroup(records, startIndex, formulaSheets) {
93
115
  const condFmt = records[startIndex];
94
- if (condFmt === void 0) return {
95
- formats: [],
96
- recordsConsumed: 1
97
- };
116
+ if (condFmt === void 0) return DEGRADED_CONDFMT_GROUP;
98
117
  try {
99
118
  const cursor = new BlockCursor(condFmt.blocks);
100
119
  const ccf = cursor.u16();
101
- cursor.skip(2);
120
+ const nID = cursor.u16() >>> 1 & 32767;
102
121
  cursor.skip(8);
103
122
  const crefCount = cursor.u16();
104
123
  const ranges = [];
@@ -115,25 +134,29 @@ function readCondFmtGroup(records, startIndex, formulaSheets) {
115
134
  });
116
135
  }
117
136
  const formats = [];
137
+ const rawCfs = [];
118
138
  for (let offset = 1; offset <= ccf; offset += 1) {
119
139
  const cfRecord = records[startIndex + offset];
120
- if (cfRecord?.type !== 433) return {
121
- formats: [],
122
- recordsConsumed: 1
123
- };
140
+ if (cfRecord?.type !== 433) return DEGRADED_CONDFMT_GROUP;
124
141
  const format = readCf(cfRecord, ranges, formulaSheets);
125
142
  if (format !== void 0) formats.push(format);
143
+ const parsed = parseCfBytes(cfRecord);
144
+ rawCfs.push(parsed === void 0 ? void 0 : {
145
+ ct: parsed.ct,
146
+ cp: parsed.cp,
147
+ rgce1: parsed.rgce1
148
+ });
126
149
  }
127
150
  return {
128
151
  formats,
129
- recordsConsumed: 1 + ccf
152
+ recordsConsumed: 1 + ccf,
153
+ nID,
154
+ ranges,
155
+ rawCfs
130
156
  };
131
157
  } catch (err) {
132
158
  if (!(err instanceof BiffFormatError)) throw err;
133
- return {
134
- formats: [],
135
- recordsConsumed: 1
136
- };
159
+ return DEGRADED_CONDFMT_GROUP;
137
160
  }
138
161
  }
139
162
  //#endregion
@@ -1,2 +1,2 @@
1
- import { n as readDv, t as RawDataValidation } from "../data-validation-lJWM9-AP.cjs";
1
+ import { n as readDv, t as RawDataValidation } from "../data-validation-BgUt8CbE.cjs";
2
2
  export { RawDataValidation, readDv };
@@ -1,2 +1,2 @@
1
- import { n as readDv, t as RawDataValidation } from "../data-validation-BeYpL3Nb.js";
1
+ import { n as readDv, t as RawDataValidation } from "../data-validation-Cq6iD8lB.js";
2
2
  export { RawDataValidation, readDv };
@@ -1,4 +1,4 @@
1
- import { r as FormulaSheetContext } from "../ptg-CCBbJLZJ.cjs";
1
+ import { r as FormulaSheetContext } from "../ptg-75v7MhaA.cjs";
2
2
  import { n as Substream, t as RecordGroup } from "../substreams-XDNgDvRJ.cjs";
3
3
  import { BlipImage } from "../drawing/blips.cjs";
4
4
  import { RawColumn, RawRow } from "./sheet.cjs";
@@ -1,4 +1,4 @@
1
- import { r as FormulaSheetContext } from "../ptg-CCBbJLZJ.js";
1
+ import { r as FormulaSheetContext } from "../ptg-75v7MhaA.js";
2
2
  import { n as Substream, t as RecordGroup } from "../substreams-CgTHx5kX.js";
3
3
  import { BlipImage } from "../drawing/blips.js";
4
4
  import { RawColumn, RawRow } from "./sheet.js";
@@ -1,4 +1,4 @@
1
- import { E as XfDecorationFields } from "../xf-colors-mqerVt2O.cjs";
1
+ import { E as XfDecorationFields } from "../xf-colors-aeH9Ax3Q.cjs";
2
2
  import { t as PrintNamePlanEntry } from "../print-names-B2OR0fvs.cjs";
3
3
  import { Alignment, Color } from "document-schema.js";
4
4
  //#region src/workbook/globals-writer.d.ts
@@ -1,4 +1,4 @@
1
- import { E as XfDecorationFields } from "../xf-colors-d3OvRw76.js";
1
+ import { E as XfDecorationFields } from "../xf-colors-kdNsiNYt.js";
2
2
  import { t as PrintNamePlanEntry } from "../print-names-BXcmmwVi.js";
3
3
  import { Alignment, Color } from "document-schema.js";
4
4
  //#region src/workbook/globals-writer.d.ts
@@ -1,6 +1,6 @@
1
- import { a as SheetRange, t as ExternalSheetLabel } from "../ptg-CCBbJLZJ.cjs";
1
+ import { a as SheetRange, t as ExternalSheetLabel } from "../ptg-75v7MhaA.cjs";
2
2
  import { t as RecordGroup } from "../substreams-XDNgDvRJ.cjs";
3
- import { E as XfDecorationFields, w as XfAlignmentFields } from "../xf-colors-mqerVt2O.cjs";
3
+ import { E as XfDecorationFields, w as XfAlignmentFields } from "../xf-colors-aeH9Ax3Q.cjs";
4
4
  import { n as SheetPrintNames } from "../print-names-B2OR0fvs.cjs";
5
5
  import { Color } from "document-schema.js";
6
6
  //#region src/workbook/globals.d.ts
@@ -1,6 +1,6 @@
1
- import { a as SheetRange, t as ExternalSheetLabel } from "../ptg-CCBbJLZJ.js";
1
+ import { a as SheetRange, t as ExternalSheetLabel } from "../ptg-75v7MhaA.js";
2
2
  import { t as RecordGroup } from "../substreams-CgTHx5kX.js";
3
- import { E as XfDecorationFields, w as XfAlignmentFields } from "../xf-colors-d3OvRw76.js";
3
+ import { E as XfDecorationFields, w as XfAlignmentFields } from "../xf-colors-kdNsiNYt.js";
4
4
  import { n as SheetPrintNames } from "../print-names-BXcmmwVi.js";
5
5
  import { Color } from "document-schema.js";
6
6
  //#region src/workbook/globals.d.ts
@@ -11,6 +11,7 @@ const require_biff_ptg = require("../biff/ptg.cjs");
11
11
  const require_biff_rk = require("../biff/rk.cjs");
12
12
  const require_workbook_conditional_format = require("./conditional-format.cjs");
13
13
  const require_workbook_conditional_format_12 = require("./conditional-format-12.cjs");
14
+ const require_workbook_conditional_format_ex = require("./conditional-format-ex.cjs");
14
15
  const require_workbook_data_validation = require("./data-validation.cjs");
15
16
  //#region src/workbook/sheet.ts
16
17
  /** Row record flag bits, in the 32-bit field following unused1 ([MS-XLS] 2.4.221). */
@@ -116,6 +117,7 @@ function readSheetRecords(records, sharedStrings, formulaSheets = EMPTY_FORMULA_
116
117
  const dataValidations = [];
117
118
  const conditionalFormats = [];
118
119
  const conditionalFormats12 = [];
120
+ const legacyCondFmtsByNID = /* @__PURE__ */ new Map();
119
121
  let usedRange;
120
122
  const marginsPt = {};
121
123
  const rowBreaks = [];
@@ -148,6 +150,10 @@ function readSheetRecords(records, sharedStrings, formulaSheets = EMPTY_FORMULA_
148
150
  case 432: {
149
151
  const group = require_workbook_conditional_format.readCondFmtGroup(records, index, formulaSheets);
150
152
  conditionalFormats.push(...group.formats);
153
+ legacyCondFmtsByNID.set(group.nID, {
154
+ ranges: group.ranges,
155
+ cfs: group.rawCfs
156
+ });
151
157
  index += group.recordsConsumed - 1;
152
158
  break;
153
159
  }
@@ -157,6 +163,11 @@ function readSheetRecords(records, sharedStrings, formulaSheets = EMPTY_FORMULA_
157
163
  index += group.recordsConsumed - 1;
158
164
  break;
159
165
  }
166
+ case require_biff_record_types.RECORD_CFEX: {
167
+ const format = require_workbook_conditional_format_ex.readCfEx(record, legacyCondFmtsByNID, formulaSheets);
168
+ if (format !== void 0) conditionalFormats12.push(format);
169
+ break;
170
+ }
160
171
  case 513:
161
172
  cells.push(readBlank(record));
162
173
  break;
@@ -1,9 +1,9 @@
1
1
  import { n as SetupFields } from "../print-setup-B_ihDvm5.cjs";
2
- import { r as FormulaSheetContext } from "../ptg-CCBbJLZJ.cjs";
2
+ import { r as FormulaSheetContext } from "../ptg-75v7MhaA.cjs";
3
3
  import { t as RecordGroup } from "../substreams-XDNgDvRJ.cjs";
4
- import { n as RawConditionalFormat } from "../conditional-format-Bt1vRWgc.cjs";
5
- import { a as RawConditionalFormat12 } from "../conditional-format-12-CZ43-CR4.cjs";
6
- import { t as RawDataValidation } from "../data-validation-lJWM9-AP.cjs";
4
+ import { r as RawConditionalFormat } from "../conditional-format-Cth_afMy.cjs";
5
+ import { a as RawConditionalFormat12 } from "../conditional-format-12-D65-ruTq.cjs";
6
+ import { t as RawDataValidation } from "../data-validation-BgUt8CbE.cjs";
7
7
  //#region src/workbook/sheet.d.ts
8
8
  /** A cell's value as its own record carries it, before number-format classification decides whether a number is really a date, a percentage, or an amount of money. */
9
9
  type RawCellValue = {
@@ -1,9 +1,9 @@
1
1
  import { n as SetupFields } from "../print-setup-B_ihDvm5.js";
2
- import { r as FormulaSheetContext } from "../ptg-CCBbJLZJ.js";
2
+ import { r as FormulaSheetContext } from "../ptg-75v7MhaA.js";
3
3
  import { t as RecordGroup } from "../substreams-CgTHx5kX.js";
4
- import { n as RawConditionalFormat } from "../conditional-format-Cqcjnm7O.js";
5
- import { a as RawConditionalFormat12 } from "../conditional-format-12-Xl52VBCj.js";
6
- import { t as RawDataValidation } from "../data-validation-BeYpL3Nb.js";
4
+ import { r as RawConditionalFormat } from "../conditional-format-BRMUTRP1.js";
5
+ import { a as RawConditionalFormat12 } from "../conditional-format-12-C3nwy1f8.js";
6
+ import { t as RawDataValidation } from "../data-validation-Cq6iD8lB.js";
7
7
  //#region src/workbook/sheet.d.ts
8
8
  /** A cell's value as its own record carries it, before number-format classification decides whether a number is really a date, a percentage, or an amount of money. */
9
9
  type RawCellValue = {
@@ -1,4 +1,4 @@
1
- import { RECORD_CONDFMT12 } from "../biff/record-types.js";
1
+ import { RECORD_CFEX, RECORD_CONDFMT12 } from "../biff/record-types.js";
2
2
  import { BiffFormatError } from "../biff/records.js";
3
3
  import { columnWidthToPoints, inchesToPoints, twipsToPoints } from "../units.js";
4
4
  import { unpackSetupFlags } from "../biff/print-setup.js";
@@ -10,6 +10,7 @@ import { parseFormulaText, readPtgExpBase } from "../biff/ptg.js";
10
10
  import { decodeRkNumber } from "../biff/rk.js";
11
11
  import { readCondFmtGroup } from "./conditional-format.js";
12
12
  import { readCondFmt12Group } from "./conditional-format-12.js";
13
+ import { readCfEx } from "./conditional-format-ex.js";
13
14
  import { readDv } from "./data-validation.js";
14
15
  //#region src/workbook/sheet.ts
15
16
  /** Row record flag bits, in the 32-bit field following unused1 ([MS-XLS] 2.4.221). */
@@ -115,6 +116,7 @@ function readSheetRecords(records, sharedStrings, formulaSheets = EMPTY_FORMULA_
115
116
  const dataValidations = [];
116
117
  const conditionalFormats = [];
117
118
  const conditionalFormats12 = [];
119
+ const legacyCondFmtsByNID = /* @__PURE__ */ new Map();
118
120
  let usedRange;
119
121
  const marginsPt = {};
120
122
  const rowBreaks = [];
@@ -147,6 +149,10 @@ function readSheetRecords(records, sharedStrings, formulaSheets = EMPTY_FORMULA_
147
149
  case 432: {
148
150
  const group = readCondFmtGroup(records, index, formulaSheets);
149
151
  conditionalFormats.push(...group.formats);
152
+ legacyCondFmtsByNID.set(group.nID, {
153
+ ranges: group.ranges,
154
+ cfs: group.rawCfs
155
+ });
150
156
  index += group.recordsConsumed - 1;
151
157
  break;
152
158
  }
@@ -156,6 +162,11 @@ function readSheetRecords(records, sharedStrings, formulaSheets = EMPTY_FORMULA_
156
162
  index += group.recordsConsumed - 1;
157
163
  break;
158
164
  }
165
+ case RECORD_CFEX: {
166
+ const format = readCfEx(record, legacyCondFmtsByNID, formulaSheets);
167
+ if (format !== void 0) conditionalFormats12.push(format);
168
+ break;
169
+ }
159
170
  case 513:
160
171
  cells.push(readBlank(record));
161
172
  break;
@@ -1,4 +1,4 @@
1
- import { t as BlockCursor } from "./cursor-VMtw9uVP.cjs";
1
+ import { t as BlockCursor } from "./cursor-CnEuX5qE.cjs";
2
2
  import { Alignment, Color, ContentBorder, ContentCellFill, ContentCellPatternType } from "document-schema.js";
3
3
  //#region src/biff/xf-colors.d.ts
4
4
  /** FLSNULL: no fill pattern -- the cell's fill colour fields carry no meaning. */
@@ -1,4 +1,4 @@
1
- import { t as BlockCursor } from "./cursor-VMtw9uVP.js";
1
+ import { t as BlockCursor } from "./cursor-CnEuX5qE.js";
2
2
  import { Alignment, Color, ContentBorder, ContentCellFill, ContentCellPatternType } from "document-schema.js";
3
3
  //#region src/biff/xf-colors.d.ts
4
4
  /** FLSNULL: no fill pattern -- the cell's fill colour fields carry no meaning. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xls-codec",
3
- "version": "4.8.0",
3
+ "version": "4.9.0",
4
4
  "description": "Hand-written reader for the legacy Excel Binary File Format (.xls, BIFF8) as specified by [MS-XLS], mapping a workbook's record stream onto the shared document-schema.js spreadsheet model - the .xls codec for the documents.js family.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -1,29 +0,0 @@
1
- import { r as FormulaSheetContext } from "./ptg-CCBbJLZJ.cjs";
2
- import { t as RecordGroup } from "./substreams-XDNgDvRJ.cjs";
3
- import { ContentSheetRange, SheetRuleOperator } from "document-schema.js";
4
- //#region src/workbook/conditional-format.d.ts
5
- interface RawConditionalFormatFill {
6
- readonly fillPattern: number;
7
- readonly fillForegroundIcv: number;
8
- readonly fillBackgroundIcv: number;
9
- }
10
- interface RawConditionalFormatStyle {
11
- readonly fontColorIcv: number | undefined;
12
- readonly fill: RawConditionalFormatFill | undefined;
13
- }
14
- interface RawConditionalFormat {
15
- readonly operator: SheetRuleOperator;
16
- readonly formula1: string;
17
- readonly formula2: string | undefined;
18
- readonly style: RawConditionalFormatStyle | undefined;
19
- readonly ranges: ContentSheetRange[];
20
- }
21
- declare function parseDxfStyle(dxfBytes: Uint8Array<ArrayBuffer>): RawConditionalFormatStyle | undefined;
22
- interface CondFmtGroupResult {
23
- readonly formats: RawConditionalFormat[];
24
- /** How many records (the CondFmt itself plus every CF it claimed) the caller should advance past, regardless of how many rules actually promoted. */
25
- readonly recordsConsumed: number;
26
- }
27
- declare function readCondFmtGroup(records: readonly RecordGroup[], startIndex: number, formulaSheets: FormulaSheetContext): CondFmtGroupResult;
28
- //#endregion
29
- export { parseDxfStyle as a, RawConditionalFormatStyle as i, RawConditionalFormat as n, readCondFmtGroup as o, RawConditionalFormatFill as r, CondFmtGroupResult as t };
@@ -1,29 +0,0 @@
1
- import { r as FormulaSheetContext } from "./ptg-CCBbJLZJ.js";
2
- import { t as RecordGroup } from "./substreams-CgTHx5kX.js";
3
- import { ContentSheetRange, SheetRuleOperator } from "document-schema.js";
4
- //#region src/workbook/conditional-format.d.ts
5
- interface RawConditionalFormatFill {
6
- readonly fillPattern: number;
7
- readonly fillForegroundIcv: number;
8
- readonly fillBackgroundIcv: number;
9
- }
10
- interface RawConditionalFormatStyle {
11
- readonly fontColorIcv: number | undefined;
12
- readonly fill: RawConditionalFormatFill | undefined;
13
- }
14
- interface RawConditionalFormat {
15
- readonly operator: SheetRuleOperator;
16
- readonly formula1: string;
17
- readonly formula2: string | undefined;
18
- readonly style: RawConditionalFormatStyle | undefined;
19
- readonly ranges: ContentSheetRange[];
20
- }
21
- declare function parseDxfStyle(dxfBytes: Uint8Array<ArrayBuffer>): RawConditionalFormatStyle | undefined;
22
- interface CondFmtGroupResult {
23
- readonly formats: RawConditionalFormat[];
24
- /** How many records (the CondFmt itself plus every CF it claimed) the caller should advance past, regardless of how many rules actually promoted. */
25
- readonly recordsConsumed: number;
26
- }
27
- declare function readCondFmtGroup(records: readonly RecordGroup[], startIndex: number, formulaSheets: FormulaSheetContext): CondFmtGroupResult;
28
- //#endregion
29
- export { parseDxfStyle as a, RawConditionalFormatStyle as i, RawConditionalFormat as n, readCondFmtGroup as o, RawConditionalFormatFill as r, CondFmtGroupResult as t };