@sheetxl/sdk 0.8.0-beta.5 → 0.8.0-beta.7

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 (109) hide show
  1. package/browser/cjs/{BV3LBQXG3kA013a2.cjs → CrcmEew-dr51xpf9.cjs} +1 -1
  2. package/browser/cjs/CwzIjMpnMKeypivl.cjs +1 -0
  3. package/browser/cjs/D3Vlh9UOBKtvlXBL.cjs +93 -0
  4. package/browser/cjs/{D_hl_D3IBlVqjbUu.cjs → E08wpSuqr-UadjSZ.cjs} +1 -1
  5. package/browser/cjs/{CvjJnxfMX3aal6Zj.cjs → O6F5xVsoF2hTiprv.cjs} +1 -1
  6. package/browser/cjs/index.cjs +2 -2
  7. package/browser/esm/{DWJJtu3q6iMfUbbN.mjs → B7v0PdbyuBlceMLG.mjs} +2 -2
  8. package/browser/esm/{BiUnakUlo61EtntE.mjs → BADV_AABAw-3U9iO.mjs} +1 -1
  9. package/browser/esm/{CoiupvxiR8tLrCa4.mjs → CFDfAmU2o5HFRTu4.mjs} +2 -2
  10. package/browser/esm/{CLfbadk6S57dy8sc.mjs → DRpWwH6CWI0QaNlp.mjs} +9549 -8412
  11. package/browser/esm/{ahTq_KBqu4jWkQ8A.mjs → DkHfJEJlvjDJnXEU.mjs} +2 -2
  12. package/browser/esm/{B45qhpdlbHHa6-gu.mjs → bSQdR4WlmM40WWFR.mjs} +2 -2
  13. package/browser/esm/index.mjs +9 -8
  14. package/browser/esm/{B6t-k7D3HcTIJ-Xl.mjs → tBEZ_r7Bkp7CrFLF.mjs} +2 -2
  15. package/node/esm/{BP9JmWMpUInDk4OG.mjs → BShIHUY7pxerJVT8.mjs} +1 -1
  16. package/node/esm/{CDh1Fw2maXvyOhIs.mjs → CWJELJxqO-1z0tJU.mjs} +1 -1
  17. package/node/esm/{B2dQyLw_fQU5VuXt.mjs → DbAKZ-Ythj1VwgyS.mjs} +1 -1
  18. package/node/esm/{K4Xw9Ur7uFf9M5Gh.mjs → HMR0po5avaUU1XUZ.mjs} +1 -1
  19. package/node/esm/index.mjs +11533 -10368
  20. package/package.json +6 -6
  21. package/resources/locales/de/model.msg.json +16 -0
  22. package/resources/locales/en/model.msg.json +16 -0
  23. package/types/scripting-api.json +6891 -6844
  24. package/types/scripting.d.ts +493 -137
  25. package/types/src/calculation/_TableRename.d.ts +13 -0
  26. package/types/src/calculation/grid/CalcGrid.d.ts +18 -3
  27. package/types/src/calculation/grid/CalcGridBackend.d.ts +49 -0
  28. package/types/src/calculation/grid/CalcGridProxy.d.ts +5 -0
  29. package/types/src/calculation/grid/ICalcGrid.d.ts +37 -0
  30. package/types/src/calculation/grid/_CalcRequest.d.ts +22 -0
  31. package/types/src/calculation/state/CalculationContext.d.ts +7 -1
  32. package/types/src/cell/ICell.d.ts +21 -1
  33. package/types/src/chart/Chart.d.ts +5 -18
  34. package/types/src/chart/ChartCollection.d.ts +1 -1
  35. package/types/src/chart/IChart.d.ts +11 -10
  36. package/types/src/chart/IChartCollection.d.ts +3 -3
  37. package/types/src/color/_BuiltInIndexDefs.d.ts +6 -0
  38. package/types/src/comment/Comment.d.ts +69 -7
  39. package/types/src/comment/IComment.d.ts +70 -51
  40. package/types/src/comment/NoteMovable.d.ts +26 -0
  41. package/types/src/comment/_CommentUtils.d.ts +23 -1
  42. package/types/src/comment/_NoteBox.d.ts +50 -0
  43. package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +27 -2
  44. package/types/src/condition/BuiltInOperators/AfterEqualToOperator.d.ts +2 -0
  45. package/types/src/condition/BuiltInOperators/AfterOperator.d.ts +2 -0
  46. package/types/src/condition/BuiltInOperators/AndOperator.d.ts +3 -1
  47. package/types/src/condition/BuiltInOperators/AverageOperator.d.ts +2 -0
  48. package/types/src/condition/BuiltInOperators/BeforeEqualToOperator.d.ts +2 -0
  49. package/types/src/condition/BuiltInOperators/BeforeOperator.d.ts +2 -0
  50. package/types/src/condition/BuiltInOperators/BetweenOperator.d.ts +2 -0
  51. package/types/src/condition/BuiltInOperators/ContainsOperator.d.ts +2 -0
  52. package/types/src/condition/BuiltInOperators/EndsWithOperator.d.ts +2 -0
  53. package/types/src/condition/BuiltInOperators/EqualToOperator.d.ts +2 -0
  54. package/types/src/condition/BuiltInOperators/ExpressionOperator.d.ts +2 -0
  55. package/types/src/condition/BuiltInOperators/GreaterThanEqualToOperator.d.ts +2 -0
  56. package/types/src/condition/BuiltInOperators/GreaterThanOperator.d.ts +2 -0
  57. package/types/src/condition/BuiltInOperators/InSetOperator.d.ts +2 -0
  58. package/types/src/condition/BuiltInOperators/LessThanEqualToOperator.d.ts +2 -0
  59. package/types/src/condition/BuiltInOperators/LessThanOperator.d.ts +2 -0
  60. package/types/src/condition/BuiltInOperators/NotOperator.d.ts +2 -0
  61. package/types/src/condition/BuiltInOperators/OrOperator.d.ts +3 -1
  62. package/types/src/condition/BuiltInOperators/StartsWithOperator.d.ts +2 -0
  63. package/types/src/condition/BuiltInOperators/TimePeriodOperator.d.ts +2 -0
  64. package/types/src/condition/BuiltInOperators/TopNOperator.d.ts +6 -0
  65. package/types/src/condition/Condition.d.ts +2 -0
  66. package/types/src/condition/ICondition.d.ts +59 -2
  67. package/types/src/condition/_ConditionUtils.d.ts +10 -0
  68. package/types/src/filter/IFilter.d.ts +76 -1
  69. package/types/src/movable/AbstractMovableContent.d.ts +54 -0
  70. package/types/src/movable/Control.d.ts +5 -7
  71. package/types/src/movable/CustomElement.d.ts +4 -5
  72. package/types/src/movable/IControl.d.ts +7 -5
  73. package/types/src/movable/ICustomElement.d.ts +7 -2
  74. package/types/src/movable/IMovable.d.ts +74 -42
  75. package/types/src/movable/IMovableCollection.d.ts +6 -0
  76. package/types/src/movable/Movable.d.ts +53 -32
  77. package/types/src/numFmt/_FormatCell.d.ts +9 -0
  78. package/types/src/person/index.d.ts +1 -0
  79. package/types/src/picture/IPicture.d.ts +7 -1
  80. package/types/src/picture/Picture.d.ts +5 -4
  81. package/types/src/primitives/Range.d.ts +31 -1
  82. package/types/src/primitives/RangeStats.d.ts +7 -2
  83. package/types/src/primitives/ReferenceRange.d.ts +2 -0
  84. package/types/src/primitives/stats/AggregateStats.d.ts +49 -15
  85. package/types/src/primitives/stats/FrequencyStats.d.ts +1 -1
  86. package/types/src/primitives/stats/Ranked.d.ts +1 -1
  87. package/types/src/primitives/stats/SortedNumbers.d.ts +2 -2
  88. package/types/src/shape/IShape.d.ts +6 -4
  89. package/types/src/shape/Shape.d.ts +5 -10
  90. package/types/src/sheet/ISheet.d.ts +3 -2
  91. package/types/src/sheet/Sheet.d.ts +73 -21
  92. package/types/src/sheet/SheetCell.d.ts +1 -1
  93. package/types/src/sheet/_SheetFilterUtils.d.ts +17 -0
  94. package/types/src/sheet/_SheetStateTypes.d.ts +18 -0
  95. package/types/src/sheet/_SheetUtils.d.ts +15 -0
  96. package/types/src/sheetHeader/ISheetHeader.d.ts +17 -0
  97. package/types/src/sheetHeader/SheetHeader.d.ts +11 -0
  98. package/types/src/slicer/ISlicer.d.ts +7 -2
  99. package/types/src/slicer/Slicer.d.ts +5 -9
  100. package/types/src/table/AnchoredTable.d.ts +46 -6
  101. package/types/src/table/ITable.d.ts +10 -1
  102. package/types/src/table/ITableCollection.d.ts +10 -0
  103. package/types/src/table/_FilterField.d.ts +9 -1
  104. package/types/src/text/richtext/IRichText.d.ts +36 -0
  105. package/types/src/text/richtext/index.d.ts +1 -0
  106. package/types/src/transaction/ITransaction.d.ts +11 -0
  107. package/types/src/transaction/Transaction.d.ts +2 -0
  108. package/browser/cjs/By2s44r4eRFvMq6H.cjs +0 -93
  109. package/browser/cjs/Nt1C8528otcBXJ2J.cjs +0 -1
@@ -1058,6 +1058,14 @@ declare global {
1058
1058
  * This is useful for validation
1059
1059
  */
1060
1060
  disableBundle?: boolean;
1061
+ /**
1062
+ * If true, the bundle is minified. For a module that is stored (a workbook's scripts, a `.sxlm`).
1063
+ *
1064
+ * @remarks
1065
+ * Off by default: code that is only run keeps its own names, so a runtime error reads as the
1066
+ * author wrote it (`wb.getSheet is not a function`, not `a.getSheet`).
1067
+ */
1068
+ minify?: boolean;
1061
1069
  /**
1062
1070
  * If true, this will not include the source map in the compiled module.
1063
1071
  */
@@ -1116,16 +1124,11 @@ declare global {
1116
1124
  * Check the source as code that runs once, not as code kept to be run again.
1117
1125
  *
1118
1126
  * @remarks
1119
- * For an agent's ad hoc run. Only a finding that would fail at run time stops the run; the rest
1120
- * are reported as warnings:
1121
- *
1122
- * - Annotations are not required: an untyped parameter is `any` (no `noImplicitAny`), and a
1123
- * missing type on an entry is not reported.
1124
- * - A member the receiver does not have, read where a missing member is expected - `r.getFormat?.()`,
1125
- * `r.getFormulas ? … : …`, `typeof r.x` - is a probe, and a warning: it reads `undefined`.
1126
- * - A condition on a function that is never called (TS2774) is a warning.
1127
+ * For an ad hoc run (`sheetxl -e`, the MCP `run` tool). Annotations are not required: a default
1128
+ * export's untyped first parameter is the script context, and a missing type is not reported.
1127
1129
  *
1128
- * Only meaningful with {@link ambientTypes}; without them there is no semantic check to relax.
1130
+ * A run is not type-checked before it executes - leave {@link ambientTypes} out. The types are
1131
+ * there to explain a run that went wrong, which is `diagnoseRun` in `@sheetxl/runner`.
1129
1132
  */
1130
1133
  lenient?: boolean;
1131
1134
  }
@@ -4818,10 +4821,13 @@ declare global {
4818
4821
  /**
4819
4822
  * Creates a temporary copy of the cell with the specified updates applied.
4820
4823
  *
4824
+ * @param modifiers The update.
4825
+ * @param options How the update is read. See {@link ICell.CreateCellOptions}.
4826
+ *
4821
4827
  * @remarks
4822
4828
  * The original cell remains unchanged, making this useful for temporary modifications.
4823
4829
  */
4824
- createCell(modifiers: ICell.Update): ICell;
4830
+ createCell(modifiers: ICell.Update, options?: ICell.CreateCellOptions): ICell;
4825
4831
  /**
4826
4832
  * Returns the `CellCoords`.
4827
4833
  */
@@ -4968,6 +4974,23 @@ declare global {
4968
4974
  */
4969
4975
  comments?: IComment.Update;
4970
4976
  }
4977
+ /**
4978
+ * Options for {@link ICell.createCell} and {@link ISheet.createCell}.
4979
+ */
4980
+ interface CreateCellOptions {
4981
+ /**
4982
+ * Whether a text value is read as a typed entry is — `9/23/95` a date, `12.3%` a number —
4983
+ * rather than taken as the text it is. `true` reads it with the defaults; an
4984
+ * {@link ICell.ModifiersFromStringOptions} customizes the reading.
4985
+ *
4986
+ * @defaultValue false
4987
+ *
4988
+ * @remarks
4989
+ * The same reading {@link ICellRange.setValues} gives text, where it is the default. Here it
4990
+ * is opt-in: a cell created from a value keeps that value.
4991
+ */
4992
+ textParser?: boolean | ICell.ModifiersFromStringOptions;
4993
+ }
4971
4994
  /**
4972
4995
  * Configuration options for customizing the parsing of a string into an `ICell.Update` object.
4973
4996
  * Commonly used for processing CSV imports and other string-based data sources.
@@ -9294,11 +9317,11 @@ declare global {
9294
9317
  * Interface for working with a chart.
9295
9318
  *
9296
9319
  * @remarks
9297
- * A chart is the content of a movable, which places and names it — see {@link IChart.getMovable}.
9320
+ * A chart is the content of a movable, which places it — see {@link IChart.getMovable}.
9298
9321
  * Until the chart is modeled it is carried as the markup it was read from and written back
9299
9322
  * unchanged; {@link IChart.getXML} is the read-only view of that markup.
9300
9323
  */
9301
- export interface IChart extends IModel {
9324
+ export interface IChart extends IModel, IMovable.IContent {
9302
9325
  /**
9303
9326
  * Returns the chart's title, or `null` if it has none.
9304
9327
  *
@@ -9340,17 +9363,17 @@ declare global {
9340
9363
  */
9341
9364
  getPivotSource(): string | null;
9342
9365
  /**
9343
- * Returns a description for assistive technologies.
9344
- */
9345
- getDescription(): string;
9346
- /**
9347
- * Returns the movable that places the chart on the sheet.
9366
+ * Returns the movable that places the chart on the sheet, or `null` if it is not placed by one.
9348
9367
  *
9349
9368
  * @remarks
9350
- * The movable holds the chart's position, size and name; the chart keeps no copy of any of
9351
- * them. Deleting the movable deletes the chart.
9369
+ * The movable holds the chart's position and size; the chart keeps no copy of either.
9370
+ * Deleting the chart removes its movable.
9352
9371
  */
9353
- getMovable(): IMovable;
9372
+ getMovable(): IMovable | null;
9373
+ /**
9374
+ * Deletes the chart, and with it the movable that places it.
9375
+ */
9376
+ delete(options?: ITransaction.OperationOptions): void;
9354
9377
  /**
9355
9378
  * Returns the chart's own markup, or `null` if none was captured.
9356
9379
  *
@@ -9485,8 +9508,8 @@ declare global {
9485
9508
  *
9486
9509
  * @remarks
9487
9510
  * A view over the sheet's movables: a chart is the content of a movable, and the movable is what
9488
- * places, names and deletes it — see {@link IChart.getMovable}. Read-only for now; a chart is
9489
- * added by adding a movable with chart content.
9511
+ * places it — see {@link IChart.getMovable}. Read-only for now; a chart is added by adding a
9512
+ * movable with chart content.
9490
9513
  */
9491
9514
  export interface IChartCollection extends ICollection<IChart> {
9492
9515
  /**
@@ -9494,7 +9517,7 @@ declare global {
9494
9517
  */
9495
9518
  getItems(options?: ICollection.GetItemsOptions): IChart[];
9496
9519
  /**
9497
- * Returns the chart whose movable has the given name, or `null` if there is none.
9520
+ * Returns the chart with the given name, or `null` if there is none.
9498
9521
  *
9499
9522
  * @param name The name of the chart. This is case insensitive.
9500
9523
  */
@@ -10850,12 +10873,47 @@ declare global {
10850
10873
  *
10851
10874
  * Anchored to its cell, so it follows a row or column insert or delete and is deleted when its
10852
10875
  * cell is.
10876
+ *
10877
+ * A note is also the content of a {@link getMovable | movable}: the box it is shown in.
10853
10878
  */
10854
- export interface IComment extends IAnchored {
10879
+ export interface IComment extends IAnchored, IMovable.IContent {
10855
10880
  /**
10856
10881
  * The comment's identifier, unique within the workbook.
10857
10882
  */
10858
10883
  getId(): string;
10884
+ /**
10885
+ * `'note'` for a note, `'comment'` for a threaded comment.
10886
+ */
10887
+ getType(): string;
10888
+ /**
10889
+ * The box a note is shown in, or `null` for a threaded comment, which has none.
10890
+ *
10891
+ * @remarks
10892
+ * The box is an ordinary movable: it is selected, moved and resized like a picture's, and is
10893
+ * among the sheet's `getMovables()`. Its content is this comment.
10894
+ *
10895
+ * * **Placement.** A box that has not been moved sits where Excel puts a new note, beside its
10896
+ * cell, and stores nothing. Moving or resizing it stores where it is, relative to its cell,
10897
+ * so a note copied to another cell keeps its box beside it.
10898
+ * * **Shown or on hover.** `isHidden()` is `true` for a box that appears only while its cell is
10899
+ * pointed at, which is how a note starts and which a view decides. `setHidden(false)` keeps
10900
+ * it on the sheet.
10901
+ *
10902
+ * A reply converts a note to a threaded comment, and its box goes with it.
10903
+ *
10904
+ * @example
10905
+ * ```ts
10906
+ * const note = sheet.getComments().add('B2', 'Check this', { asNote: true });
10907
+ * const box = note.getMovable();
10908
+ * box.setHidden(false); // always shown
10909
+ * box.setBounds({ width: 240 });
10910
+ * ```
10911
+ */
10912
+ getMovable(): IMovable | null;
10913
+ /**
10914
+ * Deletes the comment: its replies with it, or a note's box.
10915
+ */
10916
+ delete(options?: ITransaction.OperationOptions): void;
10859
10917
  /**
10860
10918
  * The sheet the comment is on.
10861
10919
  */
@@ -10878,12 +10936,15 @@ declare global {
10878
10936
  * Replaces the content.
10879
10937
  *
10880
10938
  * @param content Plain text, or formatting runs for a note.
10939
+ *
10940
+ * @remarks
10941
+ * Drops the comment's mentions: each names a span of the text it was made in.
10881
10942
  */
10882
10943
  setContent(content: IComment.Content, options?: ITransaction.OperationOptions): this;
10883
10944
  /**
10884
10945
  * The content with its formatting runs, or `null` when it is plain text.
10885
10946
  */
10886
- getRichContent(): IComment.RichContent | null;
10947
+ getRichContent(): IRichText.JSON | null;
10887
10948
  /**
10888
10949
  * The person who wrote the comment, or `null` if the workbook does not know them.
10889
10950
  */
@@ -10986,7 +11047,7 @@ declare global {
10986
11047
  */
10987
11048
  getContent(): string;
10988
11049
  /**
10989
- * Replaces the content.
11050
+ * Replaces the content, dropping the reply's mentions.
10990
11051
  */
10991
11052
  setContent(content: IComment.Content, options?: ITransaction.OperationOptions): this;
10992
11053
  /**
@@ -11019,42 +11080,12 @@ declare global {
11019
11080
  readonly isICommentReply: true;
11020
11081
  }
11021
11082
  /**
11022
- * One formatted span of a note's content.
11083
+ * What a comment says: plain text, or formatting runs for a note.
11023
11084
  *
11024
11085
  * @remarks
11025
- * A note keeps Excel's rich text; a threaded comment is plain text and never carries these.
11026
- * Every property but `text` is optional and inherits the note's default when absent.
11027
- */
11028
- interface Run {
11029
- /**
11030
- * The text of the span.
11031
- */
11032
- text: string;
11033
- /**
11034
- * The font name.
11035
- */
11036
- font?: string;
11037
- /**
11038
- * The font size in points.
11039
- */
11040
- size?: number;
11041
- bold?: boolean;
11042
- italic?: boolean;
11043
- /**
11044
- * The color as a hex string.
11045
- */
11046
- color?: string;
11047
- }
11048
- /**
11049
- * Content with formatting: a list of {@link Run | runs}.
11086
+ * A note keeps Excel's rich text; a threaded comment is plain text and never carries runs.
11050
11087
  */
11051
- interface RichContent {
11052
- runs: Run[];
11053
- }
11054
- /**
11055
- * What a comment says: plain text, or formatting runs for a note.
11056
- */
11057
- type Content = string | RichContent;
11088
+ type Content = string | IRichText.JSON;
11058
11089
  /**
11059
11090
  * The values that can be set on a comment.
11060
11091
  */
@@ -11153,23 +11184,22 @@ declare global {
11153
11184
  interface ReplyJSON extends EntryJSON {
11154
11185
  }
11155
11186
  /**
11156
- * The note's box: the shape Excel draws the note in, held as it was read.
11157
- *
11158
- * @remarks
11159
- * Only ever present on a comment read from a file. A comment authored here has none, and is
11160
- * written with Excel's default box (hidden until hovered, hung to the right of its cell); a
11161
- * comment that has one is written with that box, its cell rewritten from the comment's so it
11162
- * stays with the note, its size, fill and offsets replayed as they were.
11163
- *
11164
- * Opaque markup, as a half-house — the VML `<v:shape>`, not a {@link IShape.JSON}, whose own
11165
- * `xml` is DrawingML. What it holds is a movable's worth: the cells and offsets of its corners
11166
- * (an {@link IMovable.AnchorOffset}), whether it is hidden, and a shape's fill and size. That
11167
- * is where it graduates to — an anchor, a `hidden` flag and an {@link IShape.JSON} — once the
11168
- * VML can be read into them; the offsets are the authoring machine's pixels, which is what
11169
- * keeps them opaque today.
11187
+ * A note's box, where it differs from the default.
11170
11188
  */
11171
11189
  interface BoxJSON {
11172
- xml: string;
11190
+ /**
11191
+ * Where the box is: the cells and pixel offsets of its top-left and bottom-right corners,
11192
+ * the cells counted from the note's own (`r: -1` is the row above it).
11193
+ *
11194
+ * @remarks
11195
+ * Absent for a box that has not been moved or resized, which is placed beside its cell.
11196
+ */
11197
+ anchor?: IMovable.AnchorOffset;
11198
+ /**
11199
+ * How the box is drawn when that is not Excel's default, held as it was read: the VML
11200
+ * `<v:shape>` without its id, its position or its cell.
11201
+ */
11202
+ xml?: string;
11173
11203
  }
11174
11204
  /**
11175
11205
  * A comment, for persisting.
@@ -11187,6 +11217,16 @@ declare global {
11187
11217
  * The replies, oldest first.
11188
11218
  */
11189
11219
  replies?: ReplyJSON[];
11220
+ /**
11221
+ * Whether a note's box stays on the sheet rather than appearing on hover.
11222
+ *
11223
+ * @defaultValue false
11224
+ */
11225
+ shown?: boolean;
11226
+ /**
11227
+ * The alternative text of a note's box.
11228
+ */
11229
+ description?: string;
11190
11230
  /**
11191
11231
  * {@inheritDoc IComment.BoxJSON}
11192
11232
  */
@@ -11356,6 +11396,18 @@ declare global {
11356
11396
  * - Hide for ConditionalFormat/TableFilter (default behavior is usually correct)
11357
11397
  */
11358
11398
  isIncludeBlanks(): boolean;
11399
+ /**
11400
+ * Whether the condition can be authored as it is.
11401
+ *
11402
+ * @returns A message key naming the first problem — an operand not yet given, bounds the wrong
11403
+ * way around, a whole-number rule holding a fraction — or `null` when there is none.
11404
+ *
11405
+ * @remarks
11406
+ * Advisory, and what an editor asks before it saves: the rules are the ones Excel's dialogs
11407
+ * refuse on. A condition read from a file is kept and evaluated whatever this answers; a
11408
+ * comparison missing an operand evaluates as inert rather than as wrong.
11409
+ */
11410
+ validate(): string | null;
11359
11411
  /**
11360
11412
  * Returns a string representation of the selector, operator, and param.
11361
11413
  */
@@ -11607,16 +11659,22 @@ declare global {
11607
11659
  * @remarks
11608
11660
  * A formula is authored as a `=`-prefixed string or an {@link ICalculation.IFormula}; a resolved
11609
11661
  * condition holds it as an `IFormula`.
11662
+ *
11663
+ * `null` while not yet given. The comparison matches nothing, and excludes nothing, until both
11664
+ * bounds are.
11610
11665
  */
11611
- from: number | string | ICalculation.IFormula;
11666
+ from: number | string | ICalculation.IFormula | null;
11612
11667
  /**
11613
11668
  * The upper bound value — a number, or a formula whose result is compared per cell.
11614
11669
  *
11615
11670
  * @remarks
11616
11671
  * A formula is authored as a `=`-prefixed string or an {@link ICalculation.IFormula}; a resolved
11617
11672
  * condition holds it as an `IFormula`.
11673
+ *
11674
+ * `null` while not yet given. The comparison matches nothing, and excludes nothing, until both
11675
+ * bounds are.
11618
11676
  */
11619
- to: number | string | ICalculation.IFormula;
11677
+ to: number | string | ICalculation.IFormula | null;
11620
11678
  }
11621
11679
  interface ColorOption {
11622
11680
  /**
@@ -11835,6 +11893,18 @@ declare global {
11835
11893
  * Convert the value to the specified scalar type.
11836
11894
  */
11837
11895
  toType<T extends InteropScalar>(value: Scalar, type: InteropScalarType): T;
11896
+ /**
11897
+ * The text the current cell shows, when the evaluation matches by text; `null` otherwise.
11898
+ *
11899
+ * @remarks
11900
+ * A filter matches by shown text unless asked not to ({@link ICondition.RangeOptions.match}):
11901
+ * a cell holding `1.5` and showing `1.50` is the item `1.50`. Conditional formats and data
11902
+ * validations match by value, so this answers `null` for them. An operator that compares
11903
+ * text reads `ctx.getText() ?? value`.
11904
+ *
11905
+ * Formatted on demand, so an operator that never asks pays nothing.
11906
+ */
11907
+ getText(): string | null;
11838
11908
  /**
11839
11909
  * Resolves a condition input to a fully-built ICondition instance.
11840
11910
  *
@@ -12013,6 +12083,13 @@ declare global {
12013
12083
  * Creates the default param for this operator type.
12014
12084
  */
12015
12085
  createDefaultParam?(lhsSelector?: ICondition.ISelector): P | null | undefined;
12086
+ /**
12087
+ * Whether `param` is one this operator can be authored with under `lhsSelector`.
12088
+ *
12089
+ * @returns A message key naming the first problem, or `null` when there is none. Omitted, any
12090
+ * param is taken. See {@link ICondition.validate}.
12091
+ */
12092
+ validateParam?(param: P, lhsSelector?: ICondition.ISelector | null): string | null;
12016
12093
  /**
12017
12094
  * Returns a human-readable title of the operator.
12018
12095
  */
@@ -12254,6 +12331,26 @@ declare global {
12254
12331
  * with no explicit `hasHeader` evaluates the entire range, header row included.
12255
12332
  */
12256
12333
  hasHeader?: boolean;
12334
+ /**
12335
+ * What a filter's list items and `equalTo` text are compared with: the text a cell shows, or
12336
+ * the value it holds.
12337
+ *
12338
+ * @defaultValue `'text'`
12339
+ *
12340
+ * @remarks
12341
+ * `'text'` is a spreadsheet's AutoFilter: the item `1.50` keeps a cell holding `1.5` under the
12342
+ * format `0.00`, and the item `1.5` does not. A number passed as an item or operand still
12343
+ * matches the cells holding that number, however they are formatted.
12344
+ *
12345
+ * `'value'` compares typed values only, so the text `"1"` never matches the number `1`.
12346
+ *
12347
+ * Comparisons (`>`, `between`), Top N, averages, date periods and date groups read the value
12348
+ * either way, and the text operators (contains, starts with, ends with) only ever match a
12349
+ * cell that holds text.
12350
+ *
12351
+ * Read by filters. Conditional formats and data validations match by value.
12352
+ */
12353
+ match?: 'text' | 'value';
12257
12354
  }
12258
12355
  /**
12259
12356
  * JSON for serialization and round-tripping.
@@ -12852,11 +12949,7 @@ declare global {
12852
12949
  *
12853
12950
  * **PLACEHOLDER** - This is under development and not made public yet.
12854
12951
  */
12855
- export interface IControl extends IModel {
12856
- /**
12857
- * Returns a description for assistive technologies.
12858
- */
12859
- getDescription(): string;
12952
+ export interface IControl extends IModel, IMovable.IContent {
12860
12953
  /**
12861
12954
  * Returns the id of the shape that draws this control, or `null` if it has none.
12862
12955
  *
@@ -12876,6 +12969,10 @@ declare global {
12876
12969
  */
12877
12970
  getXML(): string | null;
12878
12971
  toJSON(toResourceId?: (resource: IResource) => number | null): IControl.JSON | null;
12972
+ /**
12973
+ * Deletes the control, and with it the movable that places it.
12974
+ */
12975
+ delete(options?: ITransaction.OperationOptions): void;
12879
12976
  /** For runtime type checking. */
12880
12977
  readonly isIControl: true;
12881
12978
  }
@@ -14840,6 +14937,36 @@ declare global {
14840
14937
  * This is relative to the table.
14841
14938
  */
14842
14939
  getIndex(): number;
14940
+ /**
14941
+ * The column's distinct values, as a filter menu lists them.
14942
+ *
14943
+ * @param options See {@link IFilter.GetItemsOptions}.
14944
+ *
14945
+ * @remarks
14946
+ * Which rows are read depends on the column:
14947
+ * - With no condition on it, the rows that are showing. A row hidden by another column's filter,
14948
+ * or by hand, is not listed.
14949
+ * - With a condition on it, the rows every *other* column's filter passes, so a value this
14950
+ * column's own condition hides is listed too, unchecked.
14951
+ *
14952
+ * An item is `checked` when at least one row holding it passes the filters, so a column filtered
14953
+ * by any condition (`> 5`, say) lists the passing values checked. A row hidden by hand does not
14954
+ * uncheck its value.
14955
+ *
14956
+ * Reads the stored values in one pass; the cost follows the column's content, not its extent.
14957
+ *
14958
+ * @example
14959
+ * ```ts
14960
+ * const filter = table.getColumnAt(1).getFilter();
14961
+ * const { items } = await filter.getItems();
14962
+ * // keep the first two values
14963
+ * await filter.setCondition({
14964
+ * operator: ICondition.BuiltInOperatorNames.InSet,
14965
+ * param: { items: items.slice(0, 2).map((item) => item.text) }
14966
+ * });
14967
+ * ```
14968
+ */
14969
+ getItems(options?: IFilter.GetItemsOptions): Promise<IFilter.Items>;
14843
14970
  /** For runtime type checking. */
14844
14971
  readonly isIFilter: true;
14845
14972
  }
@@ -14856,6 +14983,51 @@ declare global {
14856
14983
  conditions?: ICondition.JSON[];
14857
14984
  axis?: IRange.Axis;
14858
14985
  }
14986
+ /**
14987
+ * Options for {@link IFilter.getItems}.
14988
+ */
14989
+ interface GetItemsOptions {
14990
+ /**
14991
+ * The distinct values to stop at.
14992
+ *
14993
+ * @defaultValue `10000`
14994
+ */
14995
+ limit?: number;
14996
+ }
14997
+ /**
14998
+ * One distinct value of a filtered column.
14999
+ */
15000
+ interface Item {
15001
+ /**
15002
+ * The text the cells show. This is the item an `InSet` condition holds: a filter matches by
15003
+ * shown text ({@link ICondition.RangeOptions.match}).
15004
+ */
15005
+ text: string;
15006
+ /** The value of the first cell showing `text`; the item's place in the order. */
15007
+ value: Scalar;
15008
+ /** The rows holding the value. */
15009
+ count: number;
15010
+ /** Whether at least one row holding the value passes the filters. */
15011
+ checked: boolean;
15012
+ }
15013
+ /**
15014
+ * What {@link IFilter.getItems} answers.
15015
+ */
15016
+ interface Items {
15017
+ /**
15018
+ * The distinct texts, ascending by the workbook's comparison of their values. Values that
15019
+ * show alike are one item. Blanks are not an item.
15020
+ */
15021
+ items: readonly Item[];
15022
+ /** Whether a listed row is blank. */
15023
+ hasBlanks: boolean;
15024
+ /** Whether at least one blank row passes the filters. */
15025
+ blanksChecked: boolean;
15026
+ /** Whether the column has more distinct values than `limit`; the rest are not listed. */
15027
+ truncated: boolean;
15028
+ /** The rows read. */
15029
+ total: number;
15030
+ }
14859
15031
  /**
14860
15032
  * Interface indicating the ability to filter data.
14861
15033
  */
@@ -15438,16 +15610,30 @@ declare global {
15438
15610
  */
15439
15611
  getSheetIndex(sheet?: string | IReferenceRange): number;
15440
15612
  /**
15441
- * Returns a copy of a range with hidden rows or columns removed.
15613
+ * Returns a range as it reads without its hidden rows or columns.
15442
15614
  *
15443
15615
  * @param range The range to filter.
15444
- * @param axes Which axis to filter on. Default is `IRange.AxisSelection.Row`.
15445
- * @returns A new range without the hidden rows or columns.
15616
+ * @param options See {@link IFormulaContext.FilterHiddenOptions}.
15617
+ * @returns `range` itself when nothing in it is hidden; otherwise the same range reading with
15618
+ * the hidden rows or columns skipped ({@link IRange.IteratorOptions.processRowSkip}).
15446
15619
  *
15447
15620
  * @remarks
15448
15621
  * Use this for functions that ignore hidden data, such as `SUBTOTAL`.
15622
+ *
15623
+ * Nothing is copied. The shape of `range` is kept, and a reference stays a reference: a hidden
15624
+ * cell is not visited and reads as empty, so every position still means the cell it meant, and
15625
+ * an aggregate that ignores blanks ignores it. A computed array has no rows or columns to hide
15626
+ * and is returned as it is.
15627
+ *
15628
+ * A hidden row is a hidden row, whoever hid it: a filter and the user leave the same mark, and
15629
+ * nothing here tells them apart. What a filter adds is a state of the range's SHEET, which
15630
+ * {@link IFormulaContext.FilterHiddenOptions.onlyWhileFiltered} reads.
15631
+ *
15632
+ * A formula that calls `SUBTOTAL` or `AGGREGATE` is recalculated when a row or column is hidden
15633
+ * or shown, and when a filter is set or cleared. One that reaches this only through a custom
15634
+ * function is not: it reads the state when it is next calculated.
15449
15635
  */
15450
- filterHidden(range: IRange, axes?: IRange.AxisSelection): IRange;
15636
+ filterHidden(range: IRange, options?: IFormulaContext.FilterHiddenOptions): IRange;
15451
15637
  /**
15452
15638
  * Returns a copy of a range with any cell whose formula is a nested total removed.
15453
15639
  *
@@ -15786,6 +15972,28 @@ declare global {
15786
15972
  * {@link IFormulaContext}
15787
15973
  */
15788
15974
  export namespace IFormulaContext {
15975
+ /**
15976
+ * Options for {@link IFormulaContext.filterHidden}.
15977
+ */
15978
+ interface FilterHiddenOptions {
15979
+ /**
15980
+ * Which axis to filter on.
15981
+ * @defaultValue `IRange.AxisSelection.Row`
15982
+ */
15983
+ axes?: IRange.AxisSelection;
15984
+ /**
15985
+ * Skip the hidden rows or columns only while the range's sheet is filtered: while some
15986
+ * AutoFilter or table on that sheet holds a condition, whether or not it hides a row. Until
15987
+ * then `range` is returned as it is, hidden rows included.
15988
+ *
15989
+ * @remarks
15990
+ * This is `SUBTOTAL` 1-11 (Excel: they "include manually hidden rows", which is what an
15991
+ * unfiltered sheet reads as). `SUBTOTAL` 101-111 and `AGGREGATE` leave it off and skip
15992
+ * always.
15993
+ * @defaultValue false
15994
+ */
15995
+ onlyWhileFiltered?: boolean;
15996
+ }
15789
15997
  /**
15790
15998
  * Options for {@link IFormulaContext.parseAsNumber}.
15791
15999
  */
@@ -18162,7 +18370,10 @@ declare global {
18162
18370
  * | `'control'` | {@link IControl} — a form control |
18163
18371
  *
18164
18372
  * Anything else is content that is positioned and saved but not modeled; it answers
18165
- * `getType()` and nothing more.
18373
+ * {@link IMovable.IContent} and nothing more.
18374
+ *
18375
+ * The content owns what identifies it: its name, its description and its id. The movable owns
18376
+ * where it is drawn. To remove both, delete the content.
18166
18377
  *
18167
18378
  * @example
18168
18379
  * ```ts
@@ -18170,9 +18381,14 @@ declare global {
18170
18381
  * if (content.getType() === 'shape') {
18171
18382
  * const text = (content as IShape).getTextFrame()?.getText();
18172
18383
  * }
18384
+ * content.delete();
18173
18385
  * ```
18174
18386
  */
18175
- getContent<T extends IModel>(): T;
18387
+ getContent<T extends IMovable.IContent = IMovable.IContent>(): T;
18388
+ /**
18389
+ * Deletes the content, which removes this movable. The same as `getContent().delete()`.
18390
+ */
18391
+ delete(): void;
18176
18392
  /**
18177
18393
  * Selects the current movable.
18178
18394
  *
@@ -18209,30 +18425,6 @@ declare global {
18209
18425
  * Returns the absolute bounds of the movable object in pixels or `null` if not yet laid out.
18210
18426
  */
18211
18427
  getBounds(): Bounds | null;
18212
- /**
18213
- * Set the name for a movable object.
18214
- *
18215
- * @param name The name of the IMovable.
18216
- */
18217
- setName(name: string): IMovable;
18218
- /**
18219
- * @see
18220
- * {@link setName}
18221
- *
18222
- * @returns The name or `null` if the movable has been deleted.
18223
- */
18224
- getName(): string | null;
18225
- /**
18226
- * This is the alternative text use for assistive technologies.
18227
- */
18228
- setDescription(description: string | null): IMovable;
18229
- /**
18230
- * @see
18231
- * {@link setDescription}
18232
- *
18233
- * @returns The description or `null` if none has been set (or the movable has been deleted).
18234
- */
18235
- getDescription(): string | null;
18236
18428
  /**
18237
18429
  * If true then the movable object is hidden.
18238
18430
  */
@@ -18314,6 +18506,61 @@ declare global {
18314
18506
  * {@link IMovable}
18315
18507
  */
18316
18508
  export namespace IMovable {
18509
+ /**
18510
+ * What a movable draws: a chart, a picture, a shape, a slicer, a control.
18511
+ *
18512
+ * @remarks
18513
+ * Content owns what identifies it, and the movable owns where it is drawn. Content can exist
18514
+ * with no movable: a picture used as a sheet background is not placed by one.
18515
+ */
18516
+ interface IContent {
18517
+ /**
18518
+ * Returns an immutable type string.
18519
+ */
18520
+ getType(): string;
18521
+ /**
18522
+ * Returns the id of the content.
18523
+ */
18524
+ getId(): string;
18525
+ /**
18526
+ * Returns the name, or `null` if the content has none.
18527
+ *
18528
+ * @remarks
18529
+ * Not defined for content that is never named.
18530
+ */
18531
+ getName?(): string | null;
18532
+ /**
18533
+ * Set the name.
18534
+ *
18535
+ * @param name The name of the content.
18536
+ */
18537
+ setName?(name: string): this;
18538
+ /**
18539
+ * Returns the alternative text used by assistive technologies, or `null` if none has been set.
18540
+ */
18541
+ getDescription(): string | null;
18542
+ /**
18543
+ * Set the alternative text used by assistive technologies.
18544
+ */
18545
+ setDescription(description: string | null): this;
18546
+ /**
18547
+ * Returns a label for the kind of content, such as `Chart` or `Picture`.
18548
+ */
18549
+ getTypeDescription(): string;
18550
+ /**
18551
+ * Returns the movable that places the content on the sheet, or `null` if it is not placed by
18552
+ * one.
18553
+ */
18554
+ getMovable(): IMovable | null;
18555
+ /**
18556
+ * Deletes the content, and with it the movable that places it.
18557
+ */
18558
+ delete(options?: ITransaction.OperationOptions): void;
18559
+ /**
18560
+ * Returns `true` if the content has been deleted.
18561
+ */
18562
+ isDeleted(): boolean;
18563
+ }
18317
18564
  /**
18318
18565
  * Extends {@link ITypes.SelectOptions} to include options for `IMovable`.
18319
18566
  */
@@ -18336,11 +18583,7 @@ declare global {
18336
18583
  */
18337
18584
  onSelectionChange?(source: IMovable): void;
18338
18585
  /**
18339
- * Called when the name has changed.
18340
- */
18341
- onNameChange?(source: IMovable): void;
18342
- /**
18343
- * Called when selection changes.
18586
+ * Called when the bounds have changed.
18344
18587
  */
18345
18588
  onBoundsChange?(source: IMovable): void;
18346
18589
  /**
@@ -18416,6 +18659,14 @@ declare global {
18416
18659
  * This must align to a known movable object type. Defined in the IEmbeddedDrawing interface.
18417
18660
  */
18418
18661
  type: string;
18662
+ /**
18663
+ * The name of the content.
18664
+ */
18665
+ name?: string;
18666
+ /**
18667
+ * The alternative text used by assistive technologies.
18668
+ */
18669
+ description?: string;
18419
18670
  /**
18420
18671
  * Underlying json.
18421
18672
  */
@@ -18434,16 +18685,6 @@ declare global {
18434
18685
  * The behavior of how the movable resizes as the anchor/cells change.
18435
18686
  */
18436
18687
  anchorType?: IAnchored.Type;
18437
- /**
18438
- * The name of the movable object.
18439
- */
18440
- name?: string;
18441
- /**
18442
- * This is the alternative text use for assistive technologies.
18443
- *
18444
- * @defaultValue null
18445
- */
18446
- description?: string;
18447
18688
  /**
18448
18689
  * If true then the movable object is hidden.
18449
18690
  *
@@ -18561,6 +18802,12 @@ declare global {
18561
18802
  * Initial json value.
18562
18803
  */
18563
18804
  json?: J;
18805
+ /**
18806
+ * The name of the content.
18807
+ *
18808
+ * @defaultValue A name made from the type, such as `Chart 3`.
18809
+ */
18810
+ name?: string;
18564
18811
  /**
18565
18812
  * If a referenceId is provided then the movable will be linked to the resource.
18566
18813
  * @param resourceId
@@ -19638,8 +19885,12 @@ declare global {
19638
19885
  /**
19639
19886
  * Interface for working with Pictures (both Images and SVG).
19640
19887
  */
19641
- export interface IPicture extends IModel {
19888
+ export interface IPicture extends IModel, IMovable.IContent {
19642
19889
  toJSON(toResourceId?: (resource: IResource) => number | null): IPicture.JSON;
19890
+ /**
19891
+ * Deletes the picture, and with it the movable that places it.
19892
+ */
19893
+ delete(options?: ITransaction.OperationOptions): void;
19643
19894
  /**
19644
19895
  * Returns the resource associated with this picture.
19645
19896
  */
@@ -21398,6 +21649,24 @@ declare global {
21398
21649
  * If passing a large bound care must be taken.
21399
21650
  */
21400
21651
  includeEmpty?: boolean;
21652
+ /**
21653
+ * Skips rows of the range: given the next row that would be read, answers the row to read
21654
+ * instead - the same row when it is read, or the next one that is (the previous, when
21655
+ * `reverse`).
21656
+ *
21657
+ * @param index The 0-based row about to be read.
21658
+ * @param reverse Whether the read runs from the last row back.
21659
+ * @returns The row to read, at or past `index`.
21660
+ *
21661
+ * @remarks
21662
+ * A skipped cell is not visited, reads as empty and is left out of the statistics; the shape
21663
+ * of the range is unchanged. `SUBTOTAL` reads a range this way when it skips hidden rows.
21664
+ */
21665
+ processRowSkip?: (index: number, reverse?: boolean) => number;
21666
+ /**
21667
+ * Skips columns of the range, as {@link processRowSkip} skips rows.
21668
+ */
21669
+ processColumnSkip?: (index: number, reverse?: boolean) => number;
21401
21670
  /**
21402
21671
  * Useful for callback functions that want a this.
21403
21672
  */
@@ -22306,7 +22575,8 @@ declare global {
22306
22575
  *
22307
22576
  * - Every requested type (all types when omitted) is present with an explicit count —
22308
22577
  * a `0` is a fact about the range, a missing key would be ambiguous.
22309
- * - Blanks report under {@link ScalarType.Null}: total cells minus non-empty values.
22578
+ * - Blanks report under {@link ScalarType.Null}: total cells minus non-empty values. A cell the
22579
+ * range skips ({@link IRange.IteratorOptions.processRowSkip}) is not a blank; it is not counted.
22310
22580
  * - Never throws on error values — errors are population here, not faults — regardless of
22311
22581
  * the `onError` iterator policy the stats were created with.
22312
22582
  */
@@ -22948,6 +23218,41 @@ declare global {
22948
23218
  }
22949
23219
  }
22950
23220
 
23221
+ /**
23222
+ * Text with formatting: a list of {@link IRichText.Run | runs}, each a span of text with the font
23223
+ * properties it sets.
23224
+ *
23225
+ * @remarks
23226
+ * A run records only what it sets. Everything it leaves out is inherited from the font of whatever
23227
+ * holds the text (a note's default, a cell's style).
23228
+ */
23229
+ export namespace IRichText {
23230
+ /**
23231
+ * One formatted span.
23232
+ */
23233
+ interface Run {
23234
+ /**
23235
+ * The text of the span.
23236
+ */
23237
+ text: string;
23238
+ /**
23239
+ * The font properties this span sets, or nothing when it has none of its own.
23240
+ *
23241
+ * @remarks
23242
+ * The same properties a cell's font has, so a bold span is `{ weight: 700 }`, italic is
23243
+ * `{ style: 'italic' }`. The color is any string a font's color takes; one read from a file keeps
23244
+ * its theme or indexed color that way.
23245
+ */
23246
+ font?: IStyledFont.JSON;
23247
+ }
23248
+ /**
23249
+ * The serialized form: the runs, in order.
23250
+ */
23251
+ interface JSON {
23252
+ runs: Run[];
23253
+ }
23254
+ }
23255
+
22951
23256
  /**
22952
23257
  * Describes the host environment the calculation engine is running in.
22953
23258
  *
@@ -23346,16 +23651,16 @@ declare global {
23346
23651
  * Reading only: a shape's preset and its text. An imported shape is otherwise kept as the source
23347
23652
  * wrote it and saved back unchanged.
23348
23653
  */
23349
- export interface IShape extends IModel {
23654
+ export interface IShape extends IModel, IMovable.IContent {
23350
23655
  toJSON(toResourceId?: (resource: IResource) => number | null): IShape.JSON | null;
23351
23656
  /**
23352
23657
  * Returns the name of the shape.
23353
23658
  */
23354
- getName(): string;
23659
+ getName(): string | null;
23355
23660
  /**
23356
- * Returns the description of the shape.
23661
+ * Deletes the shape, and with it the movable that places it.
23357
23662
  */
23358
- getDescription(): string;
23663
+ delete(options?: ITransaction.OperationOptions): void;
23359
23664
  /**
23360
23665
  * Returns the kind of shape this is: its preset geometry.
23361
23666
  *
@@ -23983,14 +24288,15 @@ declare global {
23983
24288
  *
23984
24289
  * @param update Cell Update
23985
24290
  * @param coords Optional CellCoord
24291
+ * @param options How the update is read. See {@link ICell.CreateCellOptions}.
23986
24292
  * @returns A detached ICell
23987
24293
  *
23988
24294
  * @remarks
23989
- * * Useful for previewing values such as tooltip.
24295
+ * * Useful for previewing values such as tooltip, or what typed text would be entered as.
23990
24296
  * * Does not add to the sheet but provides a standalone ICell.
23991
24297
  * * If the coords are passed it will return disconnect cell update for that value.
23992
24298
  */
23993
- createCell(update: ICell.Update, coords?: IRange.FixableCellCoords): ICell;
24299
+ createCell(update: ICell.Update, coords?: IRange.FixableCellCoords, options?: ICell.CreateCellOptions): ICell;
23994
24300
  /**
23995
24301
  * Parses a formula expression and returns a *transient* formula object anchored to this sheet.
23996
24302
  *
@@ -25068,6 +25374,23 @@ declare global {
25068
25374
  * Returns true if any of the headers have the isHidden flag set to true or if any sizes are 0.
25069
25375
  */
25070
25376
  hasHidden(): boolean;
25377
+ /**
25378
+ * Returns the ranges of headers a filter holds a condition over: on the row axis, the data rows
25379
+ * of the AutoTable and of every table whose {@link ITable.getActiveFilters} is not empty; on
25380
+ * the column axis none, as nothing filters columns.
25381
+ *
25382
+ * @param coords Only the ranges that meet this run, when given (a viewport).
25383
+ *
25384
+ * @remarks
25385
+ * A sheet with any is "filtered", as Excel has it: `SUBTOTAL` 1-11 leave out every hidden row
25386
+ * of a filtered sheet, hand-hidden ones included, and count them all on an unfiltered one; the
25387
+ * visible headers of these ranges are the ones drawn as filtered. A condition counts whether
25388
+ * or not it hides a row.
25389
+ *
25390
+ * A row hidden by hand and a row hidden by a filter are the same hidden row; nothing records
25391
+ * which, and clearing a filter shows both ({@link ITable.deleteFilters}).
25392
+ */
25393
+ getFilteredRanges(coords?: Readonly<RunCoords>): readonly ICellHeaderRange[];
25071
25394
  /**
25072
25395
  * Returns true if header has a max selection at the given index.
25073
25396
  */
@@ -25832,9 +26155,12 @@ declare global {
25832
26155
  * @hidden
25833
26156
  * @internal
25834
26157
  */
25835
- export interface ISlicer extends IModel {
26158
+ export interface ISlicer extends IModel, IMovable.IContent {
25836
26159
  toJSON(toResourceId?: (resource: IResource) => number | null): ISlicer.JSON | null;
25837
- getDescription(): string;
26160
+ /**
26161
+ * Deletes the slicer, and with it the movable that places it.
26162
+ */
26163
+ delete(options?: ITransaction.OperationOptions): void;
25838
26164
  /** For runtime type checking. */
25839
26165
  readonly isISlicer: true;
25840
26166
  }
@@ -27970,11 +28296,20 @@ declare global {
27970
28296
  */
27971
28297
  interface SnapshotDestination {
27972
28298
  tables: ITableCollection;
28299
+ /** Where the table lands: its top-left is used, its size is the table's own. */
27973
28300
  range: IRange.Coords;
27974
28301
  }
27975
28302
  interface ISnapshot extends IHistory.ISnapshot<ITable.SnapshotDestination, ITable, IRange.Coords> {
27976
28303
  /**
27977
- * Called when the table is copied to a new collection.
28304
+ * Copies, or moves, the table to the destination.
28305
+ *
28306
+ * @remarks
28307
+ * The table's cells are expected at the destination already: the table takes its header,
28308
+ * body and totals rows from what is there.
28309
+ *
28310
+ * With `isCut` the source table is moved. Within its own sheet it is the same table at a new
28311
+ * place, so its name and the references to it stay as they are; anywhere else it is removed
28312
+ * and added again under its name.
27978
28313
  */
27979
28314
  copyTo(destination: ITable.SnapshotDestination, options?: ReferenceableClipboard.CopyOptions): Promise<IRange.Coords>;
27980
28315
  }
@@ -28579,8 +28914,18 @@ declare global {
28579
28914
  * A default value of false will create a new row.
28580
28915
  */
28581
28916
  hasHeader?: boolean;
28917
+ /**
28918
+ * Whether the range already ends with the totals row the `properties` ask for. The table then
28919
+ * takes those cells as its totals row rather than adding one below the range.
28920
+ *
28921
+ * @defaultValue false
28922
+ */
28923
+ hasTotals?: boolean;
28582
28924
  /**
28583
28925
  * Properties to set on the table when created.
28926
+ *
28927
+ * @remarks
28928
+ * With `headerRowCount: 0` the range has no header row: all of it is data.
28584
28929
  */
28585
28930
  properties?: ITable.Properties;
28586
28931
  /**
@@ -30403,6 +30748,17 @@ declare global {
30403
30748
  * needs to know that the change it is hearing about is a restore, not an operation.
30404
30749
  */
30405
30750
  isRestoring(): boolean;
30751
+ /**
30752
+ * Returns `true` while the open operation is an {@link amend} of a commit other than the one
30753
+ * the store is at.
30754
+ *
30755
+ * @remarks
30756
+ * Its writes land in that commit's snapshot alone, and the current state does not change. So
30757
+ * anything made inside it that is not versioned by this store - a resource held outside it,
30758
+ * once for every snapshot - would exist where the current snapshot has no record of it. Code
30759
+ * that makes such a thing asks this first.
30760
+ */
30761
+ isAmendingOtherCommit(): boolean;
30406
30762
  /**
30407
30763
  * The root transaction of the operation that is open.
30408
30764
  *