@pixerate/editor 0.24.0 → 0.25.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 (133) hide show
  1. package/README.md +71 -1
  2. package/THIRD_PARTY_NOTICES.md +29 -0
  3. package/dist/agent/index.cjs +10 -9
  4. package/dist/agent/index.cjs.map +1 -1
  5. package/dist/agent/index.d.cts +1 -1
  6. package/dist/agent/index.d.ts +1 -1
  7. package/dist/agent/index.js +4 -3
  8. package/dist/agent/index.js.map +1 -1
  9. package/dist/canvas/index.cjs +3173 -340
  10. package/dist/canvas/index.cjs.map +1 -1
  11. package/dist/canvas/index.d.cts +617 -4
  12. package/dist/canvas/index.d.ts +617 -4
  13. package/dist/canvas/index.js +3105 -272
  14. package/dist/canvas/index.js.map +1 -1
  15. package/dist/chunk-4BVP64JJ.cjs +1406 -0
  16. package/dist/chunk-4BVP64JJ.cjs.map +1 -0
  17. package/dist/{chunk-XNORY7M6.cjs → chunk-7WISYZFO.cjs} +105 -50
  18. package/dist/chunk-7WISYZFO.cjs.map +1 -0
  19. package/dist/{chunk-OLZJXL4R.cjs → chunk-AL6JMGWW.cjs} +59 -25
  20. package/dist/chunk-AL6JMGWW.cjs.map +1 -0
  21. package/dist/chunk-BVP3TSLH.cjs +69 -0
  22. package/dist/chunk-BVP3TSLH.cjs.map +1 -0
  23. package/dist/{chunk-MCSJFWAO.cjs → chunk-C7P22VIP.cjs} +670 -96
  24. package/dist/chunk-C7P22VIP.cjs.map +1 -0
  25. package/dist/{chunk-PGNZKFQS.js → chunk-ECCCYKGL.js} +76 -21
  26. package/dist/chunk-ECCCYKGL.js.map +1 -0
  27. package/dist/{chunk-3CN2WD3X.js → chunk-FH6F67DN.js} +646 -72
  28. package/dist/chunk-FH6F67DN.js.map +1 -0
  29. package/dist/chunk-HRMEDT2L.js +1406 -0
  30. package/dist/chunk-HRMEDT2L.js.map +1 -0
  31. package/dist/{chunk-ITBSKI26.js → chunk-IXHSYOVY.js} +941 -9
  32. package/dist/chunk-IXHSYOVY.js.map +1 -0
  33. package/dist/{chunk-FODNLX5N.js → chunk-NAXVVS5I.js} +38 -4
  34. package/dist/chunk-NAXVVS5I.js.map +1 -0
  35. package/dist/chunk-O5RYH2PG.js +69 -0
  36. package/dist/chunk-O5RYH2PG.js.map +1 -0
  37. package/dist/{chunk-SBCZ6RN5.cjs → chunk-PO6A6QQH.cjs} +1039 -107
  38. package/dist/chunk-PO6A6QQH.cjs.map +1 -0
  39. package/dist/{chunk-3LV6RRPH.js → chunk-QGYDWPRM.js} +2 -2
  40. package/dist/{chunk-U5KWZU4X.js → chunk-RR7F5GUM.js} +2632 -129
  41. package/dist/chunk-RR7F5GUM.js.map +1 -0
  42. package/dist/{chunk-5S3Z4PPF.js → chunk-UAKDG62Z.js} +232 -25
  43. package/dist/chunk-UAKDG62Z.js.map +1 -0
  44. package/dist/{chunk-SML64VJG.cjs → chunk-V3CHHWOE.cjs} +4 -4
  45. package/dist/{chunk-SML64VJG.cjs.map → chunk-V3CHHWOE.cjs.map} +1 -1
  46. package/dist/chunk-WSQKHXW7.cjs +5726 -0
  47. package/dist/chunk-WSQKHXW7.cjs.map +1 -0
  48. package/dist/{chunk-D27YFC46.cjs → chunk-X4N4WUKB.cjs} +267 -60
  49. package/dist/chunk-X4N4WUKB.cjs.map +1 -0
  50. package/dist/commands/index.cjs +74 -1
  51. package/dist/commands/index.cjs.map +1 -1
  52. package/dist/commands/index.d.cts +34 -1
  53. package/dist/commands/index.d.ts +34 -1
  54. package/dist/commands/index.js +73 -0
  55. package/dist/commands/index.js.map +1 -1
  56. package/dist/compare/index.cjs +3 -3
  57. package/dist/compare/index.d.cts +1 -1
  58. package/dist/compare/index.d.ts +1 -1
  59. package/dist/compare/index.js +2 -2
  60. package/dist/controller-BIJiNoVs.d.cts +1842 -0
  61. package/dist/controller-BIJiNoVs.d.ts +1842 -0
  62. package/dist/{documents-BQjzJNe2.d.ts → documents-CHT1U5Vs.d.ts} +10 -0
  63. package/dist/{documents-KRTPhvst.d.cts → documents-Gp7wb0Me.d.cts} +10 -0
  64. package/dist/extensions/index.cjs +53 -6
  65. package/dist/extensions/index.cjs.map +1 -1
  66. package/dist/extensions/index.d.cts +12 -4
  67. package/dist/extensions/index.d.ts +12 -4
  68. package/dist/extensions/index.js +53 -6
  69. package/dist/generation/index.cjs +1013 -69
  70. package/dist/generation/index.cjs.map +1 -1
  71. package/dist/generation/index.d.cts +474 -13
  72. package/dist/generation/index.d.ts +474 -13
  73. package/dist/generation/index.js +976 -32
  74. package/dist/generation/index.js.map +1 -1
  75. package/dist/image-editor/index.cjs +3385 -1275
  76. package/dist/image-editor/index.cjs.map +1 -1
  77. package/dist/image-editor/index.d.cts +693 -128
  78. package/dist/image-editor/index.d.ts +693 -128
  79. package/dist/image-editor/index.js +3325 -1215
  80. package/dist/image-editor/index.js.map +1 -1
  81. package/dist/{index-fJrlkJCd.d.ts → index-7a6bHTLy.d.ts} +494 -5
  82. package/dist/{index-BhJBSm2d.d.cts → index-Csd5qI8u.d.cts} +494 -5
  83. package/dist/index.cjs +1491 -45
  84. package/dist/index.cjs.map +1 -1
  85. package/dist/index.d.cts +110 -19
  86. package/dist/index.d.ts +110 -19
  87. package/dist/index.js +1464 -18
  88. package/dist/index.js.map +1 -1
  89. package/dist/mention-text-CDnCFd3c.d.cts +53 -0
  90. package/dist/mention-text-CDnCFd3c.d.ts +53 -0
  91. package/dist/model-C1zApQM8.d.cts +219 -0
  92. package/dist/model-C1zApQM8.d.ts +219 -0
  93. package/dist/persistence/index.d.cts +3 -120
  94. package/dist/persistence/index.d.ts +3 -120
  95. package/dist/{registry-GJI4gToU.d.cts → registry-CEgwXED1.d.cts} +12 -1
  96. package/dist/{registry-GJI4gToU.d.ts → registry-CEgwXED1.d.ts} +12 -1
  97. package/dist/serializers/index.cjs +12 -4
  98. package/dist/serializers/index.cjs.map +1 -1
  99. package/dist/serializers/index.d.cts +39 -12
  100. package/dist/serializers/index.d.ts +39 -12
  101. package/dist/serializers/index.js +12 -4
  102. package/dist/spreadsheet/index.cjs +127 -3
  103. package/dist/spreadsheet/index.cjs.map +1 -1
  104. package/dist/spreadsheet/index.d.cts +431 -11
  105. package/dist/spreadsheet/index.d.ts +431 -11
  106. package/dist/spreadsheet/index.js +127 -3
  107. package/dist/storage-BpFfspHm.d.cts +120 -0
  108. package/dist/storage-BpFfspHm.d.ts +120 -0
  109. package/dist/tokens/index.cjs +115 -0
  110. package/dist/tokens/index.cjs.map +1 -0
  111. package/dist/tokens/index.d.cts +212 -0
  112. package/dist/tokens/index.d.ts +212 -0
  113. package/dist/tokens/index.js +115 -0
  114. package/dist/tokens/index.js.map +1 -0
  115. package/dist/{track-changes-BK5sVf4_.d.cts → track-changes-D_VAPELi.d.cts} +95 -11
  116. package/dist/{track-changes-CDjCrwKe.d.ts → track-changes-Db_fGEvx.d.ts} +95 -11
  117. package/package.json +6 -1
  118. package/dist/chunk-3CN2WD3X.js.map +0 -1
  119. package/dist/chunk-5S3Z4PPF.js.map +0 -1
  120. package/dist/chunk-D27YFC46.cjs.map +0 -1
  121. package/dist/chunk-FODNLX5N.js.map +0 -1
  122. package/dist/chunk-ITBSKI26.js.map +0 -1
  123. package/dist/chunk-MA2F5KHF.cjs +0 -3223
  124. package/dist/chunk-MA2F5KHF.cjs.map +0 -1
  125. package/dist/chunk-MCSJFWAO.cjs.map +0 -1
  126. package/dist/chunk-OLZJXL4R.cjs.map +0 -1
  127. package/dist/chunk-PGNZKFQS.js.map +0 -1
  128. package/dist/chunk-SBCZ6RN5.cjs.map +0 -1
  129. package/dist/chunk-U5KWZU4X.js.map +0 -1
  130. package/dist/chunk-XNORY7M6.cjs.map +0 -1
  131. package/dist/controller-BhLLAoi8.d.cts +0 -1000
  132. package/dist/controller-BhLLAoi8.d.ts +0 -1000
  133. /package/dist/{chunk-3LV6RRPH.js.map → chunk-QGYDWPRM.js.map} +0 -0
@@ -1,6 +1,64 @@
1
- import { A as ASTNode, r as FormulaErrorCode, v as FormulaRange, a as CellData, c as CellFormat, G as GroupAggregate, O as SortDirection, e as CellRange, d as CellPosition, p as FilterRule, S as SpreadsheetController } from '../controller-BhLLAoi8.js';
2
- export { B as BinaryOpNode, C as CellCoordinate, b as CellDep, f as CellRefNode, g as CellValueReader, h as ColumnBinding, i as ColumnType, j as CsvExportOptions, k as CsvImportOptions, D as DEFAULT_COLUMN_WIDTH, l as DEFAULT_ROW_HEIGHT, m as DataSourceBinder, n as DependencyGraph, E as EvaluationContext, F as FORMULA_ERRORS, o as FilterOperator, q as FormulaDiagnostic, s as FormulaEvaluationResult, t as FormulaEvaluator, u as FormulaParser, w as FormulaToken, x as FormulaTokenType, y as FunctionCallNode, z as GroupSummary, L as LiteralNode, M as MAX_FORMULA_ARRAY_SIZE, N as NameNode, H as NewFilterRule, P as ParsedSpreadsheetClipboard, I as PropertyRefNode, R as RangeNode, J as RowType, K as SPREADSHEET_CLIPBOARD_MIME, Q as SortKey, T as SpillRefNode, U as SpreadsheetCellSpan, V as SpreadsheetClipboardCell, W as SpreadsheetClipboardData, X as SpreadsheetClipboardPayload, Y as SpreadsheetClipboardSource, Z as SpreadsheetColumn, _ as SpreadsheetControllerOptions, $ as SpreadsheetDataSource, a0 as SpreadsheetDataSourceField, a1 as SpreadsheetDocument, a2 as SpreadsheetFilterState, a3 as SpreadsheetGrouping, a4 as SpreadsheetRow, a5 as SpreadsheetRowGroup, a6 as SpreadsheetRowSection, a7 as SpreadsheetSpill, a8 as SpreadsheetTableSettings, a9 as SpreadsheetViewColumn, aa as SpreadsheetViewModel, ab as SpreadsheetViewRow, ac as StructuralChange, ad as UnaryOpNode, ae as WHOLE_COLUMN_END_ROW, af as buildSpreadsheetView, ag as colNameToIndex, ah as columnDependencyKey, ai as compareNumbers, aj as compareValues, ak as computeRowGroups, al as createSpreadsheetClipboardData, am as describeFormulaError, an as extractCellDependencies, ao as getRowSection, ap as getTableSections, aq as indexToColName, ar as isFormulaError, as as mapFormulaReferences, at as numberToText, au as offsetFormulaReferences, av as parseCellReference, aw as parseFormula, ax as parseHtmlTable, ay as parseRange, az as readSpreadsheetClipboard, aA as rebaseClipboardRows, aB as remapFormulaReferences, aC as rowPassesFilters, aD as serializeHtmlTable, aE as shiftFormulaReferences, aF as sortCompareValues, aG as tokenizeFormula } from '../controller-BhLLAoi8.js';
3
- import { I as ImportAdapterRegistry, c as ImportAdapter, h as ImportInput, a as ImportOutcome } from '../registry-GJI4gToU.js';
1
+ import { A as ASTNode, O as FormulaErrorCode, U as FormulaRange, a as CellData, c as CellFormat, p as ConditionalFormatSheet, n as ConditionalFormatOverlay, o as ConditionalFormatRule, j as ConditionalCellFormat, t as ConditionalFormatValue, l as ConditionalFormatIconSet, F as DataValidationRule, q as ConditionalFormatStyle, r as ConditionalFormatTimePeriod, e as CellRange, y as DataValidationErrorStyle, z as DataValidationOperator, H as DataValidationType, a6 as NewConditionalFormatRule, G as DataValidationSheet, d as CellPosition, E as DataValidationResult, _ as GroupAggregate, af as SortDirection, M as FilterRule, S as SpreadsheetController, as as SpreadsheetDefinedName, aK as StructuralChange } from '../controller-BIJiNoVs.js';
2
+ export { B as BinaryOpNode, C as CellCoordinate, b as CellDep, f as CellRefNode, g as CellValueReader, h as ColumnBinding, i as ColumnType, k as ConditionalFormatCondition, m as ConditionalFormatOperator, s as ConditionalFormatType, u as CsvExportOptions, v as CsvImportOptions, D as DEFAULT_COLUMN_WIDTH, w as DEFAULT_ROW_HEIGHT, x as DataSourceBinder, I as DependencyGraph, J as EvaluationContext, K as FORMULA_ERRORS, L as FilterOperator, N as FormulaDiagnostic, P as FormulaEvaluationResult, Q as FormulaEvaluator, R as FormulaNameDefinition, T as FormulaParser, V as FormulaReferenceFilter, W as FormulaReferenceInfo, X as FormulaToken, Y as FormulaTokenType, Z as FunctionCallNode, $ as GroupSummary, a0 as InvokeNode, a1 as LiteralNode, a2 as MAX_FORMULA_ARRAY_SIZE, a3 as MissingNode, a4 as NameDep, a5 as NameNode, a7 as NewDataValidationRule, a8 as NewFilterRule, a9 as ParsedSpreadsheetClipboard, aa as PropertyRefNode, ab as RangeNode, ac as RowType, ad as SPREADSHEET_CLIPBOARD_MIME, ae as SheetQualifier, ag as SortKey, ah as SpillRefNode, ai as SpreadsheetCellSpan, aj as SpreadsheetClipboardCell, ak as SpreadsheetClipboardData, al as SpreadsheetClipboardPayload, am as SpreadsheetClipboardSource, an as SpreadsheetColumn, ao as SpreadsheetCommitResult, ap as SpreadsheetControllerOptions, aq as SpreadsheetDataSource, ar as SpreadsheetDataSourceField, at as SpreadsheetDocument, au as SpreadsheetFilterState, av as SpreadsheetGrouping, aw as SpreadsheetNameInfo, ax as SpreadsheetNameScope, ay as SpreadsheetRow, az as SpreadsheetRowGroup, aA as SpreadsheetRowSection, aB as SpreadsheetSheetInfo, aC as SpreadsheetSpill, aD as SpreadsheetTableSettings, aE as SpreadsheetValidationAction, aF as SpreadsheetValidationPrompt, aG as SpreadsheetViewColumn, aH as SpreadsheetViewModel, aI as SpreadsheetViewRow, aJ as SpreadsheetWorkbook, aL as UnaryOpNode, aM as WHOLE_COLUMN_END_ROW, aN as buildSpreadsheetView, aO as colNameToIndex, aP as columnDependencyKey, aQ as compareNumbers, aR as compareValues, aS as computeRowGroups, aT as createSpreadsheetClipboardData, aU as deleteSheetInFormula, aV as describeFormulaError, aW as extractCellDependencies, aX as extractNameDependencies, aY as formatSheetPrefix, aZ as formulaIdentifiers, a_ as getRowSection, a$ as getTableSections, b0 as indexToColName, b1 as isFormulaError, b2 as mapFormulaReferences, b3 as numberToText, b4 as offsetFormulaReferences, b5 as parseCellReference, b6 as parseFormula, b7 as parseHtmlTable, b8 as parseRange, b9 as quoteSheetName, ba as readSpreadsheetClipboard, bb as rebaseClipboardRows, bc as remapFormulaReferences, bd as renameNameInFormula, be as renameSheetInFormula, bf as rowPassesFilters, bg as serializeHtmlTable, bh as sheetNameNeedsQuotes, bi as shiftFormulaReferences, bj as sortCompareValues, bk as tokenizeFormula } from '../controller-BIJiNoVs.js';
3
+ import { I as ImportAdapterRegistry, b as ImportAdapter, h as ImportInput, a as ImportOutcome } from '../registry-CEgwXED1.js';
4
+
5
+ /**
6
+ * LAMBDA values and the lexical environments of LET and LAMBDA variables.
7
+ */
8
+
9
+ /**
10
+ * Variables of one LET or LAMBDA call. Environments form a chain: a lambda
11
+ * keeps the environment it was created in (a closure), so its body sees the
12
+ * LET variables around its definition, not those of its caller.
13
+ */
14
+ interface FormulaEnvironment {
15
+ /** Upper-case variable name → value. */
16
+ readonly vars: Map<string, any>;
17
+ /** LAMBDA parameters whose argument was left out (for ISOMITTED). */
18
+ readonly omitted?: Set<string>;
19
+ readonly parent: FormulaEnvironment | null;
20
+ }
21
+ /**
22
+ * A function value created by `LAMBDA(params…, body)`, or a built-in function
23
+ * passed by name (`BYROW(A1:C3, SUM)`). Lambdas can be stored in LET
24
+ * variables and defined names and passed to MAP, REDUCE, SCAN, BYROW, BYCOL
25
+ * and MAKEARRAY; a cell whose result is an uncalled lambda shows `#CALC!`.
26
+ */
27
+ declare class FormulaLambda {
28
+ /** Upper-case parameter names. */
29
+ readonly params: readonly string[];
30
+ /** The calculation; null for a native (built-in) function. */
31
+ readonly body: ASTNode | null;
32
+ /** The environment the lambda was created in. */
33
+ readonly env: FormulaEnvironment | null;
34
+ /** The sheet unqualified references in the body refer to (a sheet-scoped name's sheet). */
35
+ readonly sheet?: string | undefined;
36
+ /** Implementation of a built-in function passed by name. */
37
+ readonly native?: ((args: any[]) => any) | undefined;
38
+ /** Display name, e.g. `SUM` or `LAMBDA`. */
39
+ readonly label: string;
40
+ constructor(
41
+ /** Upper-case parameter names. */
42
+ params: readonly string[],
43
+ /** The calculation; null for a native (built-in) function. */
44
+ body: ASTNode | null,
45
+ /** The environment the lambda was created in. */
46
+ env: FormulaEnvironment | null,
47
+ /** The sheet unqualified references in the body refer to (a sheet-scoped name's sheet). */
48
+ sheet?: string | undefined,
49
+ /** Implementation of a built-in function passed by name. */
50
+ native?: ((args: any[]) => any) | undefined,
51
+ /** Display name, e.g. `SUM` or `LAMBDA`. */
52
+ label?: string);
53
+ toString(): string;
54
+ }
55
+ declare const isFormulaLambda: (value: unknown) => value is FormulaLambda;
56
+ /**
57
+ * Deepest nesting of LAMBDA calls (recursion through named lambdas). Deeper
58
+ * calls return `#NUM!`, as in Excel. The JavaScript stack may run out first
59
+ * on small stacks; that is reported as `#NUM!` too.
60
+ */
61
+ declare const MAX_LAMBDA_DEPTH = 1000;
4
62
 
5
63
  type FormulaFunctionCategory = 'math' | 'statistical' | 'logical' | 'text' | 'lookup' | 'date' | 'information';
6
64
  /** What an argument expects. Used for documentation, hints and messages. */
@@ -158,6 +216,20 @@ interface FormulaFunctionSuggestion {
158
216
  signature: string;
159
217
  description: string;
160
218
  category: FormulaFunctionDefinition['category'];
219
+ /**
220
+ * `name` for a defined name (accepting it inserts the name as defined,
221
+ * followed by `(` only for a LAMBDA name); unset for functions.
222
+ */
223
+ kind?: 'name';
224
+ /** For a defined name: it holds a LAMBDA, so it is called like a function. */
225
+ isLambda?: boolean;
226
+ }
227
+ /** A defined name offered by autocomplete (see `SpreadsheetController.getNameSuggestions`). */
228
+ interface FormulaNameSuggestionSource {
229
+ name: string;
230
+ description?: string;
231
+ /** A LAMBDA name is called like a function. */
232
+ isLambda?: boolean;
161
233
  }
162
234
  interface FormulaActiveCall {
163
235
  name: string;
@@ -180,12 +252,17 @@ interface FormulaHints {
180
252
  /** Everything formula autocomplete UIs need for `input` with the caret at `caret`. */
181
253
  declare function getFormulaHints(input: string, caret?: number, options?: {
182
254
  limit?: number;
255
+ names?: readonly FormulaNameSuggestionSource[];
183
256
  }): FormulaHints;
184
257
  /**
185
258
  * Replaces the name prefix at the caret with `NAME(`, returning the new input
186
- * and caret position (just inside the parenthesis).
259
+ * and caret position (just inside the parenthesis). Given a defined-name
260
+ * suggestion (`kind: 'name'`), the name keeps its case and gets a `(` only
261
+ * when it holds a LAMBDA; `call: false` inserts any name without `(`.
187
262
  */
188
- declare function applyFormulaSuggestion(input: string, caret: number, name: string): {
263
+ declare function applyFormulaSuggestion(input: string, caret: number, suggestion: string | Pick<FormulaFunctionSuggestion, 'name' | 'kind' | 'isLambda'>, options?: {
264
+ call?: boolean;
265
+ }): {
189
266
  value: string;
190
267
  caret: number;
191
268
  };
@@ -402,6 +479,214 @@ declare function parseCellInput(input: string): ParsedCellInput;
402
479
  */
403
480
  declare function parseNumberText(text: string): number | null;
404
481
 
482
+ /**
483
+ * The number a value counts as for scales, bars, icons, top/bottom and
484
+ * averages: numbers, and dates (ISO text) as their serial number. Text,
485
+ * booleans, blanks and errors are not numbers.
486
+ */
487
+ declare function conditionalFormatNumber(value: unknown): number | null;
488
+ /** Blends two colours: `t` 0 is `a`, 1 is `b`. */
489
+ declare function blendConditionalFormatColors(a: string, b: string, t: number): string;
490
+ /** Excel's default icon thresholds: percent 0, 33, 67 for three icons. */
491
+ declare function defaultIconThresholds(set: string): ConditionalFormatValue[];
492
+ /** An overlay with no formatted cells. */
493
+ declare const EMPTY_CONDITIONAL_FORMAT_OVERLAY: ConditionalFormatOverlay;
494
+ /**
495
+ * Evaluates conditional formats and keeps what it needs to re-evaluate only
496
+ * the affected cells after an edit (`update`). Rules are applied in order
497
+ * (the first has the highest priority): every matching rule adds the parts
498
+ * of its style that higher-priority rules left unset, and a matching rule
499
+ * with `stopIfTrue` hides lower-priority rules. Colour scales, data bars and
500
+ * icon sets apply to numbers only and never stop other rules.
501
+ */
502
+ declare class ConditionalFormatEngine {
503
+ private sheet;
504
+ private cells;
505
+ private stats;
506
+ private rulesKey;
507
+ private current;
508
+ constructor(sheet: ConditionalFormatSheet);
509
+ /** Replaces the sheet accessor (e.g. after rows or columns were added). */
510
+ setSheet(sheet: ConditionalFormatSheet): void;
511
+ /** The last evaluated overlay. */
512
+ get overlay(): ConditionalFormatOverlay;
513
+ /** Evaluates every rule over every cell it applies to. */
514
+ evaluate(rules: ConditionalFormatRule[]): ConditionalFormatOverlay;
515
+ /**
516
+ * Re-evaluates after the values of `changed` cells changed (the edited
517
+ * cells and the formulas that depend on them). Rules that look at the whole
518
+ * range (scales, bars, icons, top/bottom, average, duplicates) are
519
+ * re-evaluated over their range when a changed cell is inside it; formula
520
+ * rules always are, since their formulas may read any cell; other rules
521
+ * only at the changed cells. Falls back to `evaluate` when the rules
522
+ * changed.
523
+ */
524
+ update(rules: ConditionalFormatRule[], changed: Iterable<{
525
+ row: number;
526
+ col: number;
527
+ }>): ConditionalFormatOverlay;
528
+ private statsFor;
529
+ private evalFormula;
530
+ private threshold;
531
+ /** The operand of a `cellIs` rule: a formula result, or typed input. */
532
+ private operand;
533
+ /** Combines every rule that applies to (row, col). */
534
+ computeLook(rules: ConditionalFormatRule[], row: number, col: number): ConditionalCellFormat | undefined;
535
+ /**
536
+ * Checks one rule: returns its style when it matches, 'look' when it set a
537
+ * scale fill, bar or icon on `out`, or null.
538
+ */
539
+ private matchRule;
540
+ }
541
+ /** Whether serial day `d` falls in `period` relative to `today`. */
542
+ declare function matchesTimePeriod(period: string, d: number, today: Date): boolean;
543
+ /** Evaluates `rules` over a sheet: the conditional look of every formatted cell. */
544
+ declare function evaluateConditionalFormats(sheet: ConditionalFormatSheet, rules: ConditionalFormatRule[]): ConditionalFormatOverlay;
545
+
546
+ /**
547
+ * Glyphs for conditional-format icon sets, so React and Svelte draw the same
548
+ * icons without image assets. Index 0 is the lowest icon.
549
+ */
550
+
551
+ interface ConditionalFormatIconGlyph {
552
+ /** Text glyph to draw. */
553
+ glyph: string;
554
+ /** CSS colour of the glyph. */
555
+ color: string;
556
+ /** Accessible name, e.g. "Up arrow". */
557
+ label: string;
558
+ }
559
+ /** Names of the built-in icon sets. */
560
+ declare const CONDITIONAL_FORMAT_ICON_SETS: ConditionalFormatIconSet[];
561
+ /** Number of icons in a set (`3Arrows` → 3), always 3 to 5. */
562
+ declare function conditionalFormatIconCount(set: string): number;
563
+ /** The glyph of icon `index` of `set` (unknown sets use traffic lights). */
564
+ declare function getConditionalFormatIcon(set: string, index: number): ConditionalFormatIconGlyph;
565
+
566
+ /**
567
+ * One-line descriptions of rules for the conditional formatting and data
568
+ * validation managers, shared by React and Svelte.
569
+ */
570
+
571
+ /** E.g. `Cell value > 100`, `Color scale (min → P50 → max)`, `Formula: =$B2>10`. */
572
+ declare function describeConditionalFormat(rule: ConditionalFormatRule): string;
573
+ /** E.g. `Whole number between 1 and 10`, `List: Low,Medium,High`, `Custom: =A1>0`. */
574
+ declare function describeDataValidation(rule: DataValidationRule): string;
575
+
576
+ /**
577
+ * Ready-made rules for the conditional formatting and data validation
578
+ * managers and the context menu, so React and Svelte offer the same choices.
579
+ */
580
+
581
+ /** Excel's highlight styles. */
582
+ declare const CONDITIONAL_FORMAT_STYLE_PRESETS: Array<{
583
+ id: string;
584
+ label: string;
585
+ style: ConditionalFormatStyle;
586
+ }>;
587
+ declare const DEFAULT_CONDITIONAL_FORMAT_STYLE: ConditionalFormatStyle;
588
+ type ConditionalFormatPresetKind = 'greaterThan' | 'lessThan' | 'between' | 'equal' | 'textContains' | 'dateOccurring' | 'duplicate' | 'unique' | 'top10' | 'bottom10' | 'aboveAverage' | 'belowAverage' | 'blanks' | 'errors' | 'formula' | 'colorScale2' | 'colorScale3' | 'dataBar' | 'iconSet';
589
+ /** Inputs a preset needs, besides the ranges. */
590
+ type ConditionalFormatPresetField = 'value' | 'value2' | 'text' | 'formula' | 'rank' | 'period' | 'iconSet' | 'color';
591
+ interface ConditionalFormatPresetInfo {
592
+ kind: ConditionalFormatPresetKind;
593
+ label: string;
594
+ fields: ConditionalFormatPresetField[];
595
+ /** Whether the rule takes a highlight style (scales, bars and icons don't). */
596
+ usesStyle: boolean;
597
+ }
598
+ declare const CONDITIONAL_FORMAT_PRESETS: ConditionalFormatPresetInfo[];
599
+ declare const CONDITIONAL_FORMAT_TIME_PERIODS: Array<{
600
+ period: ConditionalFormatTimePeriod;
601
+ label: string;
602
+ }>;
603
+ interface ConditionalFormatPresetInput {
604
+ kind: ConditionalFormatPresetKind;
605
+ ranges: CellRange[];
606
+ value?: string;
607
+ value2?: string;
608
+ text?: string;
609
+ formula?: string;
610
+ rank?: number;
611
+ period?: ConditionalFormatTimePeriod;
612
+ iconSet?: ConditionalFormatIconSet;
613
+ /** Data bar colour. */
614
+ color?: string;
615
+ /** Highlight style (default light red fill, dark red text). */
616
+ style?: ConditionalFormatStyle;
617
+ stopIfTrue?: boolean;
618
+ }
619
+ /** Builds a rule from a preset and its inputs. */
620
+ declare function createConditionalFormatRule(input: ConditionalFormatPresetInput): NewConditionalFormatRule;
621
+ declare const DATA_VALIDATION_TYPE_OPTIONS: Array<{
622
+ type: DataValidationType;
623
+ label: string;
624
+ }>;
625
+ declare const DATA_VALIDATION_OPERATOR_OPTIONS: Array<{
626
+ operator: DataValidationOperator;
627
+ label: string;
628
+ }>;
629
+ declare const DATA_VALIDATION_ERROR_STYLE_OPTIONS: Array<{
630
+ style: DataValidationErrorStyle;
631
+ label: string;
632
+ }>;
633
+
634
+ /**
635
+ * CSS for the conditional look of a cell, shared by the React and Svelte
636
+ * grids (React uses the objects, Svelte the `style` strings).
637
+ */
638
+
639
+ interface ConditionalFormatCss {
640
+ background?: string;
641
+ color?: string;
642
+ fontWeight?: string;
643
+ fontStyle?: string;
644
+ textDecoration?: string;
645
+ }
646
+ /**
647
+ * Black or white, whichever reads better on `fill` (`#rgb` / `#rrggbb`), or
648
+ * undefined for other colour syntaxes.
649
+ */
650
+ declare function conditionalFormatContrastColor(fill: string): string | undefined;
651
+ /**
652
+ * Fill, font colour and emphasis of a cell (no data bar or icon). A fill
653
+ * without a font colour of its own gets black or white text, so the value
654
+ * stays readable whatever the theme's text colour (Excel's fills assume
655
+ * dark text).
656
+ */
657
+ declare function getConditionalFormatCss(format: ConditionalCellFormat | undefined): ConditionalFormatCss;
658
+ /** The bar element of a data bar: absolutely placed from the cell's left edge. */
659
+ declare function getDataBarCss(bar: NonNullable<ConditionalCellFormat['dataBar']>): Record<string, string>;
660
+ /** `{ fontWeight: '700' }` → `font-weight: 700;` for `style` attributes. */
661
+ declare function conditionalFormatStyleString(css: Record<string, string | undefined> | ConditionalFormatCss): string;
662
+
663
+ /** Excel's message when a rule has no error message of its own. */
664
+ declare const DEFAULT_DATA_VALIDATION_MESSAGE = "This value doesn't match the data validation restrictions defined for this cell.";
665
+ declare const DEFAULT_DATA_VALIDATION_TITLE = "Invalid value";
666
+ /** The rule that applies to (row, col): the first one containing it. */
667
+ declare function findDataValidation(rules: DataValidationRule[] | undefined, row: number, col: number): DataValidationRule | undefined;
668
+ /**
669
+ * The items of a list rule: literal (`Low, Medium, High`, optionally in
670
+ * quotes) or read from a range or formula (`=$H$1:$H$5`), blanks skipped.
671
+ * Formulas are evaluated at the range's top-left cell.
672
+ */
673
+ declare function getValidationListValues(sheet: DataValidationSheet, rule: DataValidationRule): string[];
674
+ /**
675
+ * Checks `input` typed into (row, col) against the cell's rule. Typed input
676
+ * is parsed like a cell commit (`10%` is 0.1, `3/4/2026` a date); a formula
677
+ * is checked through its result. Custom and bound formulas are relative to
678
+ * the range's top-left cell and see the value being entered. Blank input is
679
+ * valid unless `ignoreBlank` is false; rules with `showErrorAlert: false`
680
+ * accept anything.
681
+ */
682
+ declare function validateCellInput(sheet: DataValidationSheet, rules: DataValidationRule[] | undefined, row: number, col: number, input: string): DataValidationResult;
683
+ /**
684
+ * Cells whose current value breaks their rule ("circle invalid data").
685
+ * Blank cells are skipped, as are `any` rules. Alerts being off does not
686
+ * matter here. Each cell is listed once, rule by rule, in row-major order.
687
+ */
688
+ declare function findInvalidCells(sheet: DataValidationSheet, rules: DataValidationRule[] | undefined): CellPosition[];
689
+
405
690
  /**
406
691
  * Common number formats offered by the "Format cells" menu, and the mapping
407
692
  * between format codes and the coarser `CellFormat` kinds.
@@ -566,14 +851,24 @@ interface SpreadsheetMenuItem {
566
851
  label: string;
567
852
  defaultValue?: string;
568
853
  };
854
+ /** Ask the user to confirm before running (e.g. deleting a sheet); the message to show. */
855
+ confirm?: string;
856
+ /**
857
+ * Opens one of the editor's panels instead of running an action: the
858
+ * editors open it (`run` does nothing).
859
+ */
860
+ panel?: SpreadsheetPanelId;
569
861
  run: (input?: string) => void;
570
862
  }
863
+ /** Panels the spreadsheet editors can open from the context menu. */
864
+ type SpreadsheetPanelId = 'conditionalFormatting' | 'dataValidation';
571
865
  /**
572
- * Runs a menu item the way the editors do: an item with `input` first asks
573
- * for text with `ask` (default `window.prompt`) and is skipped when that is
574
- * cancelled. Returns whether `run` was called.
866
+ * Runs a menu item the way the editors do: an item with `confirm` first asks
867
+ * for confirmation with `confirm` (default `window.confirm`), an item with
868
+ * `input` asks for text with `ask` (default `window.prompt`); either is
869
+ * skipped when cancelled. Returns whether `run` was called.
575
870
  */
576
- declare function runSpreadsheetMenuItem(item: SpreadsheetMenuItem, ask?: (label: string, defaultValue: string) => string | null | undefined): boolean;
871
+ declare function runSpreadsheetMenuItem(item: SpreadsheetMenuItem, ask?: (label: string, defaultValue: string) => string | null | undefined, confirm?: (message: string) => boolean): boolean;
577
872
  /**
578
873
  * Where to place a `position: fixed` menu opened at `point` so it stays inside
579
874
  * the viewport: it flips to the left of / above the pointer when it would
@@ -608,7 +903,7 @@ declare function getSpreadsheetMenuItems(controller: SpreadsheetController, cell
608
903
  * state syncing: the controller reports changes through `onDocumentChange`
609
904
  * and `onSelectionChange`.
610
905
  */
611
- declare const SPREADSHEET_TABLE_ACTIONS: readonly ["sortRows", "getFilterState", "setFilterRules", "addFilterRule", "updateFilterRule", "removeFilterRule", "clearFilters", "setFiltersEnabled", "toggleFilters", "setHeaderRowCount", "setFooterRowCount", "setHeaderColumnCount", "setFrozenRowCount", "setFrozenColumnCount", "hideRows", "unhideRows", "hideColumns", "unhideColumns", "unhideAll", "getMerges", "getMergeAt", "mergeCells", "unmergeCells", "autofill", "groupRowsBy", "ungroupRows", "setGroupSummary", "setGroupCollapsed", "toggleGroupCollapsed", "getGroups", "transposeRange", "setCellNumberFormat", "setColumnNumberFormat", "exportToCsv", "importFromCsv", "copyToClipboardData", "pasteClipboardData"];
906
+ declare const SPREADSHEET_TABLE_ACTIONS: readonly ["sortRows", "getFilterState", "setFilterRules", "addFilterRule", "updateFilterRule", "removeFilterRule", "clearFilters", "setFiltersEnabled", "toggleFilters", "setHeaderRowCount", "setFooterRowCount", "setHeaderColumnCount", "setFrozenRowCount", "setFrozenColumnCount", "hideRows", "unhideRows", "hideColumns", "unhideColumns", "unhideAll", "getMerges", "getMergeAt", "mergeCells", "unmergeCells", "autofill", "groupRowsBy", "ungroupRows", "setGroupSummary", "setGroupCollapsed", "toggleGroupCollapsed", "getGroups", "transposeRange", "setCellNumberFormat", "setColumnNumberFormat", "exportToCsv", "importFromCsv", "copyToClipboardData", "pasteClipboardData", "getConditionalFormats", "addConditionalFormat", "updateConditionalFormat", "deleteConditionalFormat", "moveConditionalFormat", "clearConditionalFormats", "getConditionalFormatOverlay", "getConditionalFormat", "getDataValidations", "getDataValidationAt", "addDataValidation", "updateDataValidation", "deleteDataValidation", "clearDataValidation", "validateCellInput", "getValidationListValues", "findInvalidCells", "setInvalidDataCircles", "getInvalidDataCircles", "isInvalidDataCircled"];
612
907
  type SpreadsheetTableActionName = (typeof SPREADSHEET_TABLE_ACTIONS)[number];
613
908
  type SpreadsheetTableActions = Pick<SpreadsheetController, SpreadsheetTableActionName>;
614
909
  /** The table operations of `controller`, bound so they can be passed around. */
@@ -649,6 +944,8 @@ interface ImportFileIntoSpreadsheetOptions {
649
944
  /** Top-left cell to write to (0-based). Default A1. */
650
945
  startRow?: number;
651
946
  startCol?: number;
947
+ /** Sheet (id or name) to import into; default the active sheet. */
948
+ sheet?: string;
652
949
  }
653
950
  /**
654
951
  * Imports a CSV/TSV file (or any registered `spreadsheet` adapter that
@@ -656,4 +953,127 @@ interface ImportFileIntoSpreadsheetOptions {
656
953
  */
657
954
  declare function importFileIntoSpreadsheet(controller: SpreadsheetController, input: ImportInput, options: ImportFileIntoSpreadsheetOptions): Promise<ImportOutcome<SpreadsheetImport>>;
658
955
 
659
- export { ASTNode, CellData, CellFormat, type CellInputFormatKind, CellPosition, CellRange, type CsvParseOptions, type CsvSerializeOptions, type FillDirection, FilterRule, type FormattedNumberValue, type FormulaActiveCall, type FormulaArgument, type FormulaArgumentSpec, type FormulaArgumentType, type FormulaCaretContext, type FormulaCriteriaPredicate, FormulaErrorCode, type FormulaFunctionCategory, type FormulaFunctionContext, type FormulaFunctionDefinition, type FormulaFunctionSuggestion, type FormulaHints, FormulaRange, type FormulaSignaturePart, GroupAggregate, type ImportFileIntoSpreadsheetOptions, MAX_NUMBER_FORMAT_CODE_CHARS, NUMBER_FORMAT_PRESETS, NumberFormat, type NumberFormatColor, type NumberFormatKind, type NumberFormatPreset, type ParsedCellInput, SPREADSHEET_IMPORT_ADAPTERS, SPREADSHEET_TABLE_ACTIONS, SortDirection, SpreadsheetController, type SpreadsheetImport, type SpreadsheetImportAdapter, type SpreadsheetMenuItem, type SpreadsheetTableActionName, type SpreadsheetTableActions, aggregateValues, applyFormulaSuggestion, bindSpreadsheetTableActions, builtinNumberFormat, builtinNumberFormatId, cellFormatForNumberFormat, checkFormulaArgumentCount, clampMenuPosition, clearNumberFormatCache, compareCellValues, computeFillTarget, csvImportAdapter, dateValueToSerial, escapeCsvField, fillSeries, formatCellDisplay, formatCellForDisplay, formatGeneralFit, formatNumberFormatValue, formatTextFunction, formatValueWithCode, getFillDirection, getFormulaArgumentSpecIndex, getFormulaCaretContext, getFormulaFunction, getFormulaHints, getFormulaSignature, getFormulaSignatureParts, getSpreadsheetMenuItems, importFileIntoSpreadsheet, isBlankValue, isGeneralNumberFormat, isSingleCellRange, listFormulaFunctions, matchesFilterRule, normalizeRange, numberFormatColorToCss, numberFormatForCellFormat, parseCellInput, parseCriteria, parseCsv, parseNumberText, parseTsv, rangeContains, rangeContainsRange, rangesIntersect, registerFormulaFunction, registerSpreadsheetImportAdapters, roundFloat, runSpreadsheetMenuItem, searchFormulaFunctions, serialFromYmd, serializeCsv, serializeTsv, toNumber, tsvImportAdapter, unregisterFormulaFunction, wildcardToRegExp };
956
+ /**
957
+ * Workbook rules shared by the controller and the framework bindings: sheet
958
+ * and defined-name validation, and default sheet names.
959
+ */
960
+
961
+ /** Longest sheet name Excel accepts. */
962
+ declare const MAX_SHEET_NAME_LENGTH = 31;
963
+ /** Longest defined name Excel accepts. */
964
+ declare const MAX_DEFINED_NAME_LENGTH = 255;
965
+ /**
966
+ * Checks a sheet name like Excel: 1–31 characters, none of `: \ / ? * [ ]`,
967
+ * not starting or ending with `'`, not the reserved `History`, and not used
968
+ * by another sheet (case-insensitively). Returns why it is invalid, or null.
969
+ */
970
+ declare function validateSheetName(name: string, existingNames?: readonly string[]): string | null;
971
+ /** The first `Sheet N` not used by `existingNames`. */
972
+ declare function nextSheetName(existingNames: readonly string[], base?: string): string;
973
+ /**
974
+ * A name for a copy of the sheet `name`: `Name (2)`, `Name (3)`, …, shortened
975
+ * so the suffix fits in 31 characters.
976
+ */
977
+ declare function copySheetName(name: string, existingNames: readonly string[]): string;
978
+ /**
979
+ * Checks a defined name like Excel: starts with a letter, `_` or `\`;
980
+ * continues with letters, digits, `_`, `.`, `\` or `?`; at most 255
981
+ * characters; and must not look like a cell reference (`A1`, `TAX2024`), an
982
+ * R1C1 reference (`R1C1`, `R`, `C3`) or a boolean. Returns why it is invalid,
983
+ * or null.
984
+ */
985
+ declare function validateDefinedName(name: string): string | null;
986
+ /** Whether a defined name holds a LAMBDA (and so is called like a function). */
987
+ declare function isLambdaDefinition(definition: Pick<SpreadsheetDefinedName, 'refersTo'>): boolean;
988
+
989
+ /**
990
+ * Sheet-tab and Name Manager behaviour shared by the React and Svelte
991
+ * bindings: the tab context menu, drag-to-reorder targets and the rows a
992
+ * Name Manager panel lists.
993
+ */
994
+
995
+ /**
996
+ * Context-menu items for a sheet tab: insert, rename (asks for the name),
997
+ * duplicate, move left/right and delete (asks to confirm; disabled for the
998
+ * last sheet). Run them with `runSpreadsheetMenuItem`. A rename to an
999
+ * invalid name throws; pass `onError` to report it instead.
1000
+ */
1001
+ declare function getSheetTabMenuItems(controller: SpreadsheetController, sheetId: string, options?: {
1002
+ onError?: (message: string) => void;
1003
+ }): SpreadsheetMenuItem[];
1004
+ /**
1005
+ * The tab index a dragged tab should move to when dropped on the tab at
1006
+ * `targetIndex`: dropping on the left half of a tab places it before that
1007
+ * tab, on the right half after it.
1008
+ */
1009
+ declare function sheetDropIndex(fromIndex: number, targetIndex: number, dropAfter: boolean): number;
1010
+ /** A row of a Name Manager panel. */
1011
+ interface SpreadsheetNameRow {
1012
+ name: string;
1013
+ refersTo: string;
1014
+ /** `Workbook` or the sheet's name. */
1015
+ scopeLabel: string;
1016
+ /** Sheet id for a sheet-scoped name. */
1017
+ sheetId?: string;
1018
+ /** The name's current value, as displayed (`#REF!`, `[LAMBDA]`, `{3×1 array}`). */
1019
+ value: string;
1020
+ comment?: string;
1021
+ isLambda: boolean;
1022
+ }
1023
+ /** Every defined name with its scope and current value, sorted by name then scope. */
1024
+ declare function getNameManagerRows(controller: SpreadsheetController): SpreadsheetNameRow[];
1025
+
1026
+ /**
1027
+ * Range helpers shared by conditional formatting and data validation: rules
1028
+ * apply to a list of rectangular ranges ("applies to") that follow row and
1029
+ * column insertions/deletions, and can be cut out of a selection.
1030
+ *
1031
+ * Portions ported from gridcraft/crates/engine/src/cmd/sheet.rs and
1032
+ * gridcraft/crates/engine/src/cmd/data.rs (MIT OR Apache-2.0, © ArtCraft Team
1033
+ * and contributors). See THIRD_PARTY_NOTICES.md.
1034
+ */
1035
+
1036
+ /**
1037
+ * Adjusts one range for an inserted or deleted row/column, the way merges
1038
+ * and formula ranges move: ranges after the change shift, ranges across it
1039
+ * grow or shrink, and a range whose rows (or columns) are all deleted is
1040
+ * gone (null).
1041
+ */
1042
+ declare function adjustRangeForStructuralChange(range: CellRange, change: StructuralChange): CellRange | null;
1043
+ /** `adjustRangeForStructuralChange` over a list, dropping ranges that are gone. */
1044
+ declare function adjustRangesForStructuralChange(ranges: CellRange[], change: StructuralChange): CellRange[];
1045
+ /** The parts of `range` outside `cut` (up to four rectangles). */
1046
+ declare function subtractRange(range: CellRange, cut: CellRange): CellRange[];
1047
+ /** Removes the cells of `cut` from every range of the list. */
1048
+ declare function subtractRangeFromRanges(ranges: CellRange[], cut: CellRange): CellRange[];
1049
+ /** Whether any range of the list contains (row, col). */
1050
+ declare function rangesContain(ranges: CellRange[], row: number, col: number): boolean;
1051
+ /** The top-left cell of the first range: rule formulas are written for it. */
1052
+ declare function ruleAnchor(ranges: CellRange[]): {
1053
+ row: number;
1054
+ col: number;
1055
+ };
1056
+ /**
1057
+ * A rule formula written for `anchor`, as seen from (row, col): relative
1058
+ * references shift by the distance, `$` parts stay (Excel's conditional
1059
+ * formatting and validation formulas work this way). Returned with a
1060
+ * leading `=`.
1061
+ */
1062
+ declare function ruleFormulaAt(formula: string, anchor: {
1063
+ row: number;
1064
+ col: number;
1065
+ }, row: number, col: number): string;
1066
+ /**
1067
+ * Rewrites a rule formula after a row/column insertion or deletion so it
1068
+ * keeps pointing at the same cells. Keeps the caller's leading `=` (or its
1069
+ * absence).
1070
+ */
1071
+ declare function shiftRuleFormula(formula: string, change: StructuralChange): string;
1072
+ /** Every cell of a list of ranges, clamped to the sheet, each once, in row-major order per range. */
1073
+ declare function forEachRangeCell(ranges: CellRange[], rowCount: number, colCount: number, fn: (row: number, col: number) => void): void;
1074
+ /** A1 text of a list of ranges: `A1:B5, D2`. */
1075
+ declare function formatRuleRanges(ranges: CellRange[]): string;
1076
+ /** Parses `A1:B5, D2` (commas, semicolons or spaces between ranges; `$` ignored). Null when any part is not a cell or range. */
1077
+ declare function parseRuleRanges(text: string): CellRange[] | null;
1078
+
1079
+ export { ASTNode, CONDITIONAL_FORMAT_ICON_SETS, CONDITIONAL_FORMAT_PRESETS, CONDITIONAL_FORMAT_STYLE_PRESETS, CONDITIONAL_FORMAT_TIME_PERIODS, CellData, CellFormat, type CellInputFormatKind, CellPosition, CellRange, ConditionalCellFormat, type ConditionalFormatCss, ConditionalFormatEngine, type ConditionalFormatIconGlyph, ConditionalFormatIconSet, ConditionalFormatOverlay, type ConditionalFormatPresetField, type ConditionalFormatPresetInfo, type ConditionalFormatPresetInput, type ConditionalFormatPresetKind, ConditionalFormatRule, ConditionalFormatSheet, ConditionalFormatStyle, ConditionalFormatTimePeriod, ConditionalFormatValue, type CsvParseOptions, type CsvSerializeOptions, DATA_VALIDATION_ERROR_STYLE_OPTIONS, DATA_VALIDATION_OPERATOR_OPTIONS, DATA_VALIDATION_TYPE_OPTIONS, DEFAULT_CONDITIONAL_FORMAT_STYLE, DEFAULT_DATA_VALIDATION_MESSAGE, DEFAULT_DATA_VALIDATION_TITLE, DataValidationErrorStyle, DataValidationOperator, DataValidationResult, DataValidationRule, DataValidationSheet, DataValidationType, EMPTY_CONDITIONAL_FORMAT_OVERLAY, type FillDirection, FilterRule, type FormattedNumberValue, type FormulaActiveCall, type FormulaArgument, type FormulaArgumentSpec, type FormulaArgumentType, type FormulaCaretContext, type FormulaCriteriaPredicate, type FormulaEnvironment, FormulaErrorCode, type FormulaFunctionCategory, type FormulaFunctionContext, type FormulaFunctionDefinition, type FormulaFunctionSuggestion, type FormulaHints, FormulaLambda, type FormulaNameSuggestionSource, FormulaRange, type FormulaSignaturePart, GroupAggregate, type ImportFileIntoSpreadsheetOptions, MAX_DEFINED_NAME_LENGTH, MAX_LAMBDA_DEPTH, MAX_NUMBER_FORMAT_CODE_CHARS, MAX_SHEET_NAME_LENGTH, NUMBER_FORMAT_PRESETS, NewConditionalFormatRule, NumberFormat, type NumberFormatColor, type NumberFormatKind, type NumberFormatPreset, type ParsedCellInput, SPREADSHEET_IMPORT_ADAPTERS, SPREADSHEET_TABLE_ACTIONS, SortDirection, SpreadsheetController, SpreadsheetDefinedName, type SpreadsheetImport, type SpreadsheetImportAdapter, type SpreadsheetMenuItem, type SpreadsheetNameRow, type SpreadsheetPanelId, type SpreadsheetTableActionName, type SpreadsheetTableActions, StructuralChange, adjustRangeForStructuralChange, adjustRangesForStructuralChange, aggregateValues, applyFormulaSuggestion, bindSpreadsheetTableActions, blendConditionalFormatColors, builtinNumberFormat, builtinNumberFormatId, cellFormatForNumberFormat, checkFormulaArgumentCount, clampMenuPosition, clearNumberFormatCache, compareCellValues, computeFillTarget, conditionalFormatContrastColor, conditionalFormatIconCount, conditionalFormatNumber, conditionalFormatStyleString, copySheetName, createConditionalFormatRule, csvImportAdapter, dateValueToSerial, defaultIconThresholds, describeConditionalFormat, describeDataValidation, escapeCsvField, evaluateConditionalFormats, fillSeries, findDataValidation, findInvalidCells, forEachRangeCell, formatCellDisplay, formatCellForDisplay, formatGeneralFit, formatNumberFormatValue, formatRuleRanges, formatTextFunction, formatValueWithCode, getConditionalFormatCss, getConditionalFormatIcon, getDataBarCss, getFillDirection, getFormulaArgumentSpecIndex, getFormulaCaretContext, getFormulaFunction, getFormulaHints, getFormulaSignature, getFormulaSignatureParts, getNameManagerRows, getSheetTabMenuItems, getSpreadsheetMenuItems, getValidationListValues, importFileIntoSpreadsheet, isBlankValue, isFormulaLambda, isGeneralNumberFormat, isLambdaDefinition, isSingleCellRange, listFormulaFunctions, matchesFilterRule, matchesTimePeriod, nextSheetName, normalizeRange, numberFormatColorToCss, numberFormatForCellFormat, parseCellInput, parseCriteria, parseCsv, parseNumberText, parseRuleRanges, parseTsv, rangeContains, rangeContainsRange, rangesContain, rangesIntersect, registerFormulaFunction, registerSpreadsheetImportAdapters, roundFloat, ruleAnchor, ruleFormulaAt, runSpreadsheetMenuItem, searchFormulaFunctions, serialFromYmd, serializeCsv, serializeTsv, sheetDropIndex, shiftRuleFormula, subtractRange, subtractRangeFromRanges, toNumber, tsvImportAdapter, unregisterFormulaFunction, validateCellInput, validateDefinedName, validateSheetName, wildcardToRegExp };