@sheetxl/sdk 0.8.0-beta.6 → 0.8.0-beta.9

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 (115) hide show
  1. package/browser/cjs/BAtZ8a7H7zsRvWqe.cjs +90 -0
  2. package/browser/cjs/CQPMWBxBUmkORmxV.cjs +1 -0
  3. package/browser/cjs/{CMrcyRRWS0gjwpr2.cjs → CvQ1tIq7wZ7HIGPq.cjs} +1 -1
  4. package/browser/cjs/CwvGOe42j8KpAF0v.cjs +1 -0
  5. package/browser/cjs/{KMBs7XyoINajcR-L.cjs → DCOqoH-T4Ux_1dQj.cjs} +1 -1
  6. package/browser/cjs/index.cjs +2 -2
  7. package/browser/esm/{7_M82_Otn5kHQ0qd.mjs → BdHD3v-u8irI1XhZ.mjs} +2 -2
  8. package/browser/esm/{DRsp6JAObqXYGvhz.mjs → C8btlUQcQwNyzHY3.mjs} +2 -2
  9. package/browser/esm/{CfoNUsKHL7SzfO8c.mjs → CF3VfWX7bJu8kO_Z.mjs} +2 -2
  10. package/browser/esm/{DBjWjEUK9qrHG5VD.mjs → D3ll0ybMQOP4uPyW.mjs} +1 -1
  11. package/browser/esm/{CEk-nufZXNFx5jDl.mjs → DXmFrSnh3xSBfoD7.mjs} +9233 -8740
  12. package/browser/esm/{iLZfKwfSx5bQgCOp.mjs → DzgIc4oyekwA-fkl.mjs} +96 -96
  13. package/browser/esm/{J1egfq2ajlXPw3Ki.mjs → Iw280tlGmTHKDqzd.mjs} +2 -2
  14. package/browser/esm/index.mjs +920 -593
  15. package/node/esm/{BMtLBfP7JzIsG9_G.mjs → B_FOXd5PSfVcg0ED.mjs} +1 -1
  16. package/node/esm/{CynxiHhVY9UGe_h6.mjs → BzgnLKSVfN-mrMSW.mjs} +1 -1
  17. package/node/esm/{DYRjFZ75QYgmgEWF.mjs → D4PsEIRHxAahp5kn.mjs} +1 -1
  18. package/node/esm/{DpyQm1VnGyCmRRKJ.mjs → dinqlP3jU8gDOjso.mjs} +1 -1
  19. package/node/esm/index.mjs +10520 -9698
  20. package/package.json +7 -6
  21. package/resources/locales/de/model.msg.json +19 -0
  22. package/resources/locales/en/model.msg.json +25 -0
  23. package/types/scripting-api.json +7337 -6890
  24. package/types/scripting-enums.json +101 -21
  25. package/types/scripting.d.ts +1961 -466
  26. package/types/src/calculation/Calculation.d.ts +37 -45
  27. package/types/src/calculation/grid/CalcGrid.d.ts +12 -4
  28. package/types/src/calculation/grid/CalcGridBackend.d.ts +0 -6
  29. package/types/src/calculation/grid/CalcGridProxy.d.ts +1 -6
  30. package/types/src/calculation/grid/ICalcGrid.d.ts +12 -4
  31. package/types/src/calculation/grid/_CalcRequest.d.ts +4 -9
  32. package/types/src/cell/ICell.d.ts +3 -3
  33. package/types/src/cell/ICellHeader.d.ts +24 -2
  34. package/types/src/cellRange/ICellRange.d.ts +67 -3
  35. package/types/src/cellRange/ICellRanges.d.ts +12 -12
  36. package/types/src/chart/Chart.d.ts +2 -13
  37. package/types/src/condition/AnchoredConditional.d.ts +2 -0
  38. package/types/src/condition/BuiltInOperators/ColorOperator.d.ts +4 -0
  39. package/types/src/condition/BuiltInOperators/IconOperator.d.ts +4 -0
  40. package/types/src/condition/ICondition.d.ts +36 -28
  41. package/types/src/condition/_ConditionUtils.d.ts +32 -8
  42. package/types/src/fill/IFill.d.ts +46 -11
  43. package/types/src/fill/IStroke.d.ts +34 -42
  44. package/types/src/filter/IFilter.d.ts +51 -6
  45. package/types/src/hyperlink/IHyperlink.d.ts +8 -0
  46. package/types/src/index.d.ts +1 -0
  47. package/types/src/movable/AbstractMovableContent.d.ts +6 -0
  48. package/types/src/movable/FormControl.d.ts +206 -0
  49. package/types/src/movable/IFormControl.d.ts +424 -0
  50. package/types/src/movable/IMovable.d.ts +37 -8
  51. package/types/src/movable/IMovableCollection.d.ts +19 -1
  52. package/types/src/movable/Movable.d.ts +20 -0
  53. package/types/src/movable/MovableContentRegistry.d.ts +64 -0
  54. package/types/src/movable/_BuiltInContents.d.ts +2 -0
  55. package/types/src/movable/_DrawnBounds.d.ts +33 -0
  56. package/types/src/movable/_RotatedFrame.d.ts +20 -0
  57. package/types/src/movable/index.d.ts +6 -4
  58. package/types/src/numFmt/BuiltInFormats.d.ts +5 -0
  59. package/types/src/numFmt/_NumFmtUtils.d.ts +0 -1
  60. package/types/src/numFmt/vendor/numfmt/_sheetxl.d.ts +6 -0
  61. package/types/src/outline/IOutline.d.ts +186 -0
  62. package/types/src/outline/Outline.d.ts +157 -0
  63. package/types/src/outline/index.d.ts +2 -0
  64. package/types/src/shape/GeometryPreset.d.ts +197 -0
  65. package/types/src/shape/IGeometry.d.ts +398 -0
  66. package/types/src/shape/IShape.d.ts +177 -204
  67. package/types/src/shape/Shape.d.ts +39 -13
  68. package/types/src/shape/ShapeStyleUtils.d.ts +48 -0
  69. package/types/src/shape/_Geometry.d.ts +14 -0
  70. package/types/src/shape/_GeometryLoader.d.ts +21 -0
  71. package/types/src/shape/_builtIn/_BuiltInChunks.d.ts +10 -0
  72. package/types/src/shape/_builtIn/_BuiltInDef.d.ts +9 -0
  73. package/types/src/shape/_builtIn/arrows.d.ts +6 -0
  74. package/types/src/shape/_builtIn/basic.d.ts +6 -0
  75. package/types/src/shape/_builtIn/callouts.d.ts +6 -0
  76. package/types/src/shape/_builtIn/flowchart.d.ts +6 -0
  77. package/types/src/shape/_builtIn/lines.d.ts +6 -0
  78. package/types/src/shape/_builtIn/math.d.ts +6 -0
  79. package/types/src/shape/_builtIn/other.d.ts +6 -0
  80. package/types/src/shape/_builtIn/rectangles.d.ts +6 -0
  81. package/types/src/shape/_builtIn/starsBanners.d.ts +6 -0
  82. package/types/src/shape/geometry/_strokeEnds.d.ts +7 -0
  83. package/types/src/shape/geometry/format.d.ts +3 -0
  84. package/types/src/shape/geometry/geometry.d.ts +84 -0
  85. package/types/src/shape/geometry/guides.d.ts +54 -0
  86. package/types/src/shape/geometry/handles.d.ts +14 -0
  87. package/types/src/shape/geometry/index.d.ts +7 -0
  88. package/types/src/shape/geometry/lineEnds.d.ts +53 -0
  89. package/types/src/shape/geometry/paths.d.ts +35 -0
  90. package/types/src/shape/geometry/segments.d.ts +114 -0
  91. package/types/src/shape/index.d.ts +2 -0
  92. package/types/src/sheet/ISheet.d.ts +10 -45
  93. package/types/src/sheet/Sheet.d.ts +19 -5
  94. package/types/src/sheet/SheetRange.d.ts +16 -1
  95. package/types/src/sheet/_SheetUtils.d.ts +10 -2
  96. package/types/src/sheetHeader/ISheetHeader.d.ts +4 -0
  97. package/types/src/sheetHeader/SheetCellHeader.d.ts +4 -0
  98. package/types/src/sheetHeader/SheetHeader.d.ts +10 -0
  99. package/types/src/sheetHeader/_HeaderUtils.d.ts +3 -1
  100. package/types/src/sheetView/ISheetView.d.ts +17 -0
  101. package/types/src/sheetView/SheetView.d.ts +4 -0
  102. package/types/src/table/AnchoredTable.d.ts +7 -2
  103. package/types/src/text/IText.d.ts +182 -0
  104. package/types/src/text/ITextFrame.d.ts +85 -0
  105. package/types/src/text/TextRotation.d.ts +3 -3
  106. package/types/src/text/TextStacked.d.ts +2 -2
  107. package/types/src/theme/ITheme.d.ts +24 -0
  108. package/types/src/workbook/Workbook.d.ts +16 -5
  109. package/browser/cjs/-wfVn4ubg563jjqj.cjs +0 -93
  110. package/browser/cjs/B2GVAGA-CBeu_7U4.cjs +0 -1
  111. package/browser/cjs/DFKGFVvoELb8_p_B.cjs +0 -1
  112. package/types/src/movable/Control.d.ts +0 -55
  113. package/types/src/movable/IControl.d.ts +0 -86
  114. package/types/src/movable/IGroup.d.ts +0 -30
  115. package/types/src/shape/_ShapeXml.d.ts +0 -28
@@ -90,12 +90,16 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
90
90
  /** The model-side grids, by grid id (DESIGN-CALC-SERVICE §13.23): what a copy lands on, what a start seeds from. */
91
91
  protected readonly _fronts: Map<string, CalcGrid>;
92
92
  /** What each model grid is, for the `create` a start sends for it (its size is read then). */
93
- protected readonly _gridSpecs: Map<string, Omit<CalcGridSpec, 'name' | 'entireCoords'>>;
93
+ protected readonly _gridSpecs: Map<string, CalcGridSpec>;
94
94
  /** The engine holds grids: from a start's boot until a stop. */
95
95
  protected _engineUp: boolean;
96
96
  protected _modelStoreRemoveListener: IListener.Remove | null;
97
97
  protected _mirrorRemoveListener: IListener.Remove | null;
98
98
  _modelMirrorId: string | null;
99
+ /** Where the owner's sheet list is held ({@link _setSheets}): the model's store, or a transient one with no model. */
100
+ protected _ownerStore: ITransaction.IStore;
101
+ /** The record holding the owner's sheet list, in {@link _ownerStore}. */
102
+ protected _sheetListId: string;
99
103
  protected _engineIds: Map<string, string>;
100
104
  protected _landingOf: Map<string, string>;
101
105
  protected _mirroredId: string | null;
@@ -564,7 +568,7 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
564
568
  * @internal
565
569
  */
566
570
  _createCalcGrid(options: Calculation.CalcGridOptions): CalcGrid;
567
- /** What a `create` for a model grid carries: its description, and its size as it is now. */
571
+ /** What a `create` for a model grid carries: its description. */
568
572
  protected _specOf(front: CalcGrid): CalcGridSpec;
569
573
  /**
570
574
  * The engine's grid for a model grid, as a `create` describes it. What it pushes reaches the
@@ -611,18 +615,25 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
611
615
  protected _createBackendGrid(options?: CalcGridBackend.ConstructorOptions): CalcGridBackend;
612
616
  protected _registerGrid(grid: CalcGridBackend): void;
613
617
  protected _unregisterGrid(gridId: string): void;
614
- /**
615
- * The sheet list as the model holds it now: what a `sheets` message carries, and what a start
616
- * seeds the replica from. Read only at those two moments.
617
- */
618
- protected _liveSheets(): [id: string, name: string | null][];
619
- /**
620
- * Tells the engine the sheet list as the model holds it now (DESIGN-CALC-SERVICE §8): one
621
- * message through the channel, applied at once on a `Running` engine, held in order while
622
- * `Starting`, dropped by an `Off` one (whose next start seeds the replica afresh, and which
623
- * reads the drop as a write made meanwhile, so that start's pass is full).
618
+ /** The owner's sheet list as it last said ({@link _setSheets}): what a start seeds the replica from. */
619
+ protected _heldSheets(): Calculation.SheetList['sheets'];
620
+ /** One sheet of {@link _heldSheets} by its grid id, or `undefined` for a grid that is no sheet. */
621
+ protected _heldSheetAt(id: string): Calculation.SheetList['sheets'][number] | undefined;
622
+ /**
623
+ * The owner's sheet list as it is now: every sheet's grid id and name, in tab order, hidden ones
624
+ * included (DESIGN-CALC-SERVICE §8). The owner calls this whenever its list changes - a sheet
625
+ * added, deleted, moved, copied or renamed - and before any grid that names a sheet in it
626
+ * seeds. Not on a restore: this record is restored with the owner's own, and the engine's
627
+ * replica with the engine's store.
628
+ *
629
+ * @remarks
630
+ * Held in the caller's operation (folded into the current commit when none is open) and sent
631
+ * to the engine as one `sheets` message: applied at once on a `Running` engine, held in order
632
+ * while `Starting`. An `Off` engine is told nothing; its next start seeds the replica from this
633
+ * record, and owes a full pass only when a sheet already listed was renamed, moved or removed.
634
+ * @internal
624
635
  */
625
- protected _sendSheets(): void;
636
+ _setSheets(sheets: readonly (readonly [id: string, name: string | null])[]): void;
626
637
  /**
627
638
  * Replaces the replica with the list a `sheets` message carries.
628
639
  *
@@ -634,6 +645,13 @@ export declare class Calculation extends AbstractModel<State, ICalculation.JSON,
634
645
  * appended moves nothing; one inserted or deleted ahead of a survivor moves it, and counts.
635
646
  */
636
647
  protected _applySheets(sheets: readonly (readonly [id: string, name: string | null])[]): void;
648
+ /**
649
+ * Before a start applies what it held: every sheet a held \`sheets\` message adds enters the
650
+ * replica at the end, under the name it was first listed by. A defined name's body is applied
651
+ * ahead of the seeds and may name a sheet listed while starting; the messages themselves still
652
+ * apply in send order, so a seed sent before a rename binds the name it was sent under.
653
+ */
654
+ protected _enterHeldSheets(held: readonly HeldRequest[]): void;
637
655
  /** The model's tables as the replica holds them: by id, each table's name and columns. */
638
656
  protected _liveTables(): Map<string, TableSymbols>;
639
657
  /** The defined names as the replica holds them: by id, each name's spelling and scope sheet. */
@@ -932,21 +950,22 @@ export declare namespace Calculation {
932
950
  /** Told after every pass that wrote the grid. */
933
951
  onCalculated?: (results: ICalcGrid.Results) => void;
934
952
  }
953
+ /** The owner's sheet list as {@link Calculation._setSheets} holds it. */
954
+ interface SheetList {
955
+ /** Every sheet's grid id and name, in tab order. */
956
+ readonly sheets: readonly (readonly [id: string, name: string | null])[];
957
+ }
935
958
  /** See {@link Calculation._createCalcGrid}. */
936
959
  interface CalcGridOptions extends CalcGrid.HostOptions, Pick<CalcGrid.ConstructorOptions, 'valuesAxis'> {
937
960
  /** The grid's id; a new one is made when absent. */
938
961
  uuid?: string;
939
- /** See {@link CalcGridSpec.name}: a sheet's grid. */
940
- name?: string | null;
941
962
  /** See {@link CalcGridSpec.shadowOf}. */
942
963
  shadowOf?: string;
943
964
  /** See {@link CalcGridSpec.unanchored}. */
944
965
  unanchored?: boolean;
945
966
  /** See {@link CalcGridSpec.arrayFirstCell}. */
946
967
  arrayFirstCell?: boolean;
947
- /** The grid's size, as the model knows it: a sheet's, read when asked. */
948
- getEntireCoords?: () => IRange.Coords;
949
- /** The grid's size, fixed. */
968
+ /** See {@link CalcGridSpec.entireCoords}. */
950
969
  entireCoords?: IRange.Coords;
951
970
  /** See {@link CalcGridSpec.sizeOf}. */
952
971
  sizeOf?: string;
@@ -978,22 +997,6 @@ export declare namespace Calculation {
978
997
  * workbook answers with its structure protection.
979
998
  */
980
999
  isNamesReadOnly?: () => boolean;
981
- /**
982
- * Returns a sheet handle given an id.
983
- */
984
- /**
985
- * `getRange`/`getRanges` are OPTIONAL and structural on purpose — this keeps `Calculation` decoupled
986
- * from `ISheet` while letting a real sheet hand over its own address resolvers. A temporary formula
987
- * anchored to that sheet uses them so an unscoped (same-sheet) reference resolves THERE rather than
988
- * against the workbook's active sheet. See `createFormula`.
989
- */
990
- getSheetById?: (sheetId: string) => {
991
- getId(): string;
992
- getName(): string;
993
- getEntireCoords: () => IRange.Coords | null;
994
- getRange?: (address: ICellRange.Address, options?: ICellRange.GetRangeOptions) => ICellRange;
995
- getRanges?: (address: ICellRanges.Address, options?: ICellRange.GetRangeOptions) => ICellRanges;
996
- } | null;
997
1000
  /**
998
1001
  * External books to hydrate at construction, in `IWorkbook.JSON.externalBooks` form — `[n]`
999
1002
  * order, `null` for a DDE/OLE gap.
@@ -1039,17 +1042,6 @@ export declare namespace Calculation {
1039
1042
  createGraphRanges?: (cells: readonly IRange.Coords[], names: readonly NamedNodeInfo[]) => ICellRanges | null;
1040
1043
  getSheetIndex?: (sheetName?: string) => number;
1041
1044
  getSheetCount?: () => number;
1042
- /**
1043
- * Every sheet's stable id in tab order, hidden and very hidden included — the order a 3-D
1044
- * reference's members are read from.
1045
- */
1046
- getSheetIds?: () => string[];
1047
- /**
1048
- * Subscribes to the sheet list changing by an operation - a sheet added, deleted, moved,
1049
- * copied or renamed. Not a restore: an undo or a redo reaches the engine through its own
1050
- * store, which is restored with the model's (DESIGN-CALC-SERVICE §7.5, §8).
1051
- */
1052
- addSheetsListener?: (callback: () => void, options?: IListener.Options) => IListener.Remove;
1053
1045
  strings?: IStringCollection;
1054
1046
  /**
1055
1047
  * Whether to perform iterative calculations when there are circular dependencies.
@@ -41,6 +41,8 @@ export declare class CalcGrid implements ICalcGrid {
41
41
  protected readonly _host: CalcGrid.HostOptions;
42
42
  protected readonly _valuesAxis: IRange.Axis;
43
43
  protected readonly _runtime: IRuntime;
44
+ /** See {@link CalcGrid.ConstructorOptions.sizeOf}. */
45
+ protected readonly _sizeOf: string | undefined;
44
46
  /** The aggregate cache over the values; bound to the map INSTANCE, so it follows every clone. */
45
47
  protected _rangeStats: RangeStats;
46
48
  /**
@@ -222,16 +224,16 @@ export declare class CalcGrid implements ICalcGrid {
222
224
  /** {@inheritDoc ICalcGrid.getEntireCoords} */
223
225
  getEntireCoords(): IRange.Coords;
224
226
  /** {@inheritDoc ICalcGrid.resize} */
225
- resize(options?: ICalcGrid.RequestOptions): void;
227
+ resize(entireCoords: IRange.Coords, options?: ICalcGrid.RequestOptions): void;
226
228
  /** {@inheritDoc ICalcGrid.setHidden} */
227
229
  setHidden(axis: IRange.Axis, runs: readonly RunCoords[], options?: ICalcGrid.RequestOptions): void;
228
230
  /** {@inheritDoc ICalcGrid.setFiltered} */
229
231
  setFiltered(filtered: boolean, options?: ICalcGrid.RequestOptions): void;
230
232
  /**
231
- * Holds what the owner says of itself - what it hides, whether it is filtered - in the caller's
232
- * operation: an undo restores it with whatever changed it.
233
+ * Holds what the owner says of itself - its size, what it hides, whether it is filtered - in the
234
+ * caller's operation: an undo restores it with whatever changed it.
233
235
  */
234
- protected _holdOwnerState(update: Pick<Partial<CalcGrid.State>, 'hiddenRows' | 'hiddenColumns' | 'filtered'>): void;
236
+ protected _holdOwnerState(update: Pick<Partial<CalcGrid.State>, 'hiddenRows' | 'hiddenColumns' | 'filtered' | 'entireCoords'>): void;
235
237
  /** {@inheritDoc ICalcGrid.getId} */
236
238
  getId(): string;
237
239
  /** {@inheritDoc ICalcGrid.toJSON} */
@@ -381,6 +383,8 @@ export declare namespace CalcGrid {
381
383
  hiddenColumns: readonly RunCoords[] | null;
382
384
  /** Whether the owner is filtered. See {@link ICalcGrid.setFiltered}. */
383
385
  filtered: boolean;
386
+ /** The grid's size; `null` for one that has the size of its {@link ConstructorOptions.sizeOf} grid. See {@link ICalcGrid.resize}. */
387
+ entireCoords: IRange.Coords | null;
384
388
  }
385
389
  /**
386
390
  * The maps a write may change. Each is cloned once, on first ask, under the caller's key; a map
@@ -434,6 +438,10 @@ export declare namespace CalcGrid {
434
438
  runtime: IRuntime;
435
439
  /** The orientation of the value tuples a write carries. */
436
440
  valuesAxis?: IRange.Axis;
441
+ /** The grid's size, until a seed or a {@link ICalcGrid.resize} says otherwise: a name's fixed one. */
442
+ entireCoords?: IRange.Coords;
443
+ /** The grid whose size this one has, whatever it is then: a body on a sheet. Ignored with {@link entireCoords}. */
444
+ sizeOf?: string;
437
445
  }
438
446
  }
439
447
  /** A snapshot a vend lands in: this grid's record there, and whether it is the operation in progress. */
@@ -436,12 +436,6 @@ export declare namespace CalcGridBackend {
436
436
  * A unique id that never changes for the grid.
437
437
  */
438
438
  uuid?: string;
439
- /**
440
- * The sheet's name, for a grid that is a sheet: its entry in the engine's replica of the
441
- * sheet list (DESIGN-CALC-SERVICE §8). `null` for a sheet that has no name yet, which a
442
- * formula names by its id. Absent for a compilation host, which no formula can name.
443
- */
444
- name?: string | null;
445
439
  /**
446
440
  * Returns the entire coordinate bounds for this grid.
447
441
  * If not provided, defaults to the maximum sheet dimensions.
@@ -21,7 +21,6 @@ export declare class CalcGridProxy implements ICalcGrid.Backend {
21
21
  protected readonly _gridId: string;
22
22
  protected readonly _sendRequest: CalcGridProxy.ConstructorOptions['send'];
23
23
  _calculation: ICalculation | null;
24
- protected readonly _getEntireCoordsOf: (() => IRange.Coords) | null;
25
24
  protected _emitter: ListenerEmitter<ICalcGrid, ICalcGrid.IListeners> | null;
26
25
  constructor(options: CalcGridProxy.ConstructorOptions);
27
26
  /**
@@ -37,10 +36,8 @@ export declare class CalcGridProxy implements ICalcGrid.Backend {
37
36
  protected _send(landingId: string | undefined, request: CalcRequest): Promise<ICalcGrid.Results>;
38
37
  /** @inheritdoc ICalcGrid.getId */
39
38
  getId(): string;
40
- /** {@inheritDoc ICalcGrid.getEntireCoords} */
41
- getEntireCoords(): IRange.Coords;
42
39
  /** {@inheritDoc ICalcGrid.resize} */
43
- resize(options?: ICalcGrid.RequestOptions): void;
40
+ resize(c: IRange.Coords, options?: ICalcGrid.RequestOptions): void;
44
41
  /** {@inheritDoc ICalcGrid.setHidden} */
45
42
  setHidden(axis: IRange.Axis, runs: readonly RunCoords[], options?: ICalcGrid.RequestOptions): void;
46
43
  /** {@inheritDoc ICalcGrid.setFiltered} */
@@ -131,8 +128,6 @@ export declare namespace CalcGridProxy {
131
128
  send: (gridId: string, landingId: string | undefined, request: CalcRequest) => Promise<ICalcGrid.Results>;
132
129
  /** For the engine's status, and `ready()` ahead of an evaluation. */
133
130
  calculation?: ICalculation | null;
134
- /** The grid's size, as the model knows it. */
135
- getEntireCoords?: () => IRange.Coords;
136
131
  }
137
132
  }
138
133
  //# sourceMappingURL=CalcGridProxy.d.ts.map
@@ -307,12 +307,15 @@ export interface ICalcGrid {
307
307
  */
308
308
  getEntireCoords(): IRange.Coords;
309
309
  /**
310
- * The grid's size changed: {@link getEntireCoords} answers the new one. The engine is told in
311
- * order with the grid's writes, under the snapshot named, so an undo restores the old size there.
310
+ * Sets the grid's size: what {@link getEntireCoords} answers from now on. Recorded with the
311
+ * grid's other content, in the caller's operation, and told to the engine in order with the
312
+ * grid's writes, so an undo restores the old size in both. The size a grid opens with is its
313
+ * seed's ({@link ICalcGrid.JSON.entireCoords}).
312
314
  *
315
+ * @param entireCoords The grid's new size.
313
316
  * @param options See {@link ICalcGrid.RequestOptions}.
314
317
  */
315
- resize(options?: ICalcGrid.RequestOptions): void;
318
+ resize(entireCoords: IRange.Coords, options?: ICalcGrid.RequestOptions): void;
316
319
  /**
317
320
  * Sets the rows or columns the grid's owner hides: the whole set on that axis, replacing the
318
321
  * one before. Recorded with the grid's other content, in the caller's operation, and told to the
@@ -396,7 +399,7 @@ export declare namespace ICalcGrid {
396
399
  * the engine answers, and nothing the model holds for itself. The in-process engine grid is
397
400
  * one; a message-passing proxy under a worker is another.
398
401
  */
399
- type Backend = Omit<ICalcGrid, 'getStateId' | 'getFormulaAt' | 'getFormulas' | 'getValues' | 'getContentful' | 'getSpills' | 'getPending' | 'getCalcErrors' | 'getCirculars' | 'getErrorValues' | 'getVolatileRegions' | 'getRangeStats'> & {
402
+ type Backend = Omit<ICalcGrid, 'getStateId' | 'getEntireCoords' | 'getFormulaAt' | 'getFormulas' | 'getValues' | 'getContentful' | 'getSpills' | 'getPending' | 'getCalcErrors' | 'getCirculars' | 'getErrorValues' | 'getVolatileRegions' | 'getRangeStats'> & {
400
403
  /** Write a body as authored; the engine anchors it (see {@link ICalcGrid.BodyOptions}). */
401
404
  setBody(options: ICalcGrid.BodyOptions): Promise<ICalcGrid.Results>;
402
405
  /** {@link ICalcGrid.evaluateAt} coerced to one scalar, as a defined name's `evaluate()` is. */
@@ -847,6 +850,11 @@ export declare namespace ICalcGrid {
847
850
  * Whether the grid's owner is filtered ({@link ICalcGrid.setFiltered}); absent for not.
848
851
  */
849
852
  filtered?: boolean;
853
+ /**
854
+ * The grid's size ({@link ICalcGrid.resize}), read by a seed; absent to keep the one it has. A
855
+ * save does not write it: the owner keeps its own.
856
+ */
857
+ entireCoords?: IRange.Coords;
850
858
  }
851
859
  /**
852
860
  * Options for {@link ICalcGrid.seed}.
@@ -180,10 +180,11 @@ export type CalcRequest =
180
180
  body: ICalcGrid.BodyOptions;
181
181
  }
182
182
  /**
183
- * The sheet list as the model holds it when the message is sent - every sheet's grid id and
183
+ * The sheet list as its owner holds it when the message is sent - every sheet's grid id and
184
184
  * name, in tab order - for the engine's replica (DESIGN-CALC-SERVICE §8). A message of the
185
185
  * service, not of a grid: the channel holds it in order with the grids' requests, which is what
186
- * lets a seed sent before a rename compile against the names it was sent under.
186
+ * lets a seed sent before a rename compile against the names it was sent under. The owner tells
187
+ * a sheet before any grid that names it seeds (`Calculation._setSheets`).
187
188
  */
188
189
  | {
189
190
  type: 'sheets';
@@ -229,19 +230,13 @@ export type CalcRequest =
229
230
  export interface CalcGridSpec {
230
231
  /** The grid's id: a sheet's stable id, or a host's. */
231
232
  id: string;
232
- /**
233
- * The sheet's name when the grid is a sheet's made after the list was sent: it enters the
234
- * engine's sheet replica at the end of the list. Absent for a grid made at a start, whose list
235
- * is sent whole.
236
- */
237
- name?: string | null;
238
233
  /** See `CalcGridBackend.ConstructorOptions.shadowOf`. */
239
234
  shadowOf?: string;
240
235
  /** See `CalcGridBackend.ConstructorOptions.unanchored`. */
241
236
  unanchored?: boolean;
242
237
  /** See `CalcGridBackend.ConstructorOptions.arrayFirstCell`. */
243
238
  arrayFirstCell?: boolean;
244
- /** The grid's size, until a `resize` says otherwise: a sheet's. */
239
+ /** The grid's size, fixed: a name's. A sheet's is its seed's. */
245
240
  entireCoords?: IRange.Coords;
246
241
  /** The grid whose size this one has, whatever it is then: a body on a sheet. */
247
242
  sizeOf?: string;
@@ -482,17 +482,17 @@ export declare namespace ICell {
482
482
  /**
483
483
  * Present when the cell's text is rotated (angle not a multiple of 180°): per-line rotated
484
484
  * strip geometry — each laid-out line is an independent strip drawn at
485
- * {@link TextRotation.Layout.angle}, wrapped against the content height and marching
485
+ * {@link TextRotation.RotatedLayout.angle}, wrapped against the content height and marching
486
486
  * horizontally. See {@link TextRotation.layoutLines} for the model.
487
487
  */
488
- rotation?: TextRotation.Layout;
488
+ rotation?: TextRotation.RotatedLayout;
489
489
  /**
490
490
  * Present when the cell's text is stacked ("vertical text"): per-column slot geometry — every
491
491
  * glyph upright in its own slot of the line pitch, columns from line breaks (and from wrapping
492
492
  * against the content height), each column aligned on its own. See
493
493
  * {@link TextStacked.layoutColumns} for the model. {@link bounds} is then the column group.
494
494
  */
495
- stacked?: TextStacked.Layout;
495
+ stacked?: TextStacked.StackedLayout;
496
496
  }
497
497
  /**
498
498
  * Expansive way to set cell updates options.
@@ -56,6 +56,12 @@ export interface ICellHeader {
56
56
  * {@link https://support.microsoft.com/en-us/office/change-the-column-width-and-row-height-72f5e3cc-994d-43e8-ae58-9774a0905f46}
57
57
  */
58
58
  getSizeRelative(): number;
59
+ /**
60
+ * The outline level, `0` to `7`. `0` is not grouped; `1` is the outermost group.
61
+ *
62
+ * @see `IOutline`
63
+ */
64
+ getOutlineLevel(): number;
59
65
  /**
60
66
  * For runtime introspection.
61
67
  */
@@ -104,6 +110,22 @@ export declare namespace ICellHeader {
104
110
  * {@link ICellHeader.getSizeRelative()}
105
111
  */
106
112
  relativeSize?: boolean;
113
+ /**
114
+ * The outline level, `0` to `7`, or a function of the current one.
115
+ *
116
+ * @remarks
117
+ * To group or ungroup, prefer `ICellRange.group` and `ICellRange.ungroup`.
118
+ *
119
+ * @see
120
+ * {@link ICellHeader.getOutlineLevel()}
121
+ */
122
+ outlineLevel?: number | ((level: number) => number);
123
+ /**
124
+ * Whether the group this header is the summary of is collapsed.
125
+ *
126
+ * @internal
127
+ */
128
+ collapsed?: boolean;
107
129
  }
108
130
  /**
109
131
  * Stores information about header runs.
@@ -122,11 +144,11 @@ export declare namespace ICellHeader {
122
144
  */
123
145
  h?: boolean;
124
146
  /**
125
- * Header level
147
+ * Outline level, `1` to `7`. Absent when not grouped.
126
148
  */
127
149
  l?: number;
128
150
  /**
129
- * Collapsed level
151
+ * Collapsed. Set on the summary header of a collapsed group.
130
152
  */
131
153
  cl?: boolean;
132
154
  /**
@@ -832,6 +832,64 @@ export interface ICellRange {
832
832
  * @returns The current `ICellRange`.
833
833
  */
834
834
  autoFit(options?: ICellRange.AutoFitOptions): this;
835
+ /**
836
+ * Groups the rows or columns of the range: each one moves one outline level deeper.
837
+ *
838
+ * @param axis Whether to group the rows or the columns. When omitted, entire rows group the rows,
839
+ * entire columns group the columns, and any other range groups both.
840
+ * @returns The current `ICellRange`.
841
+ * @throws `Error` If a row or column in the range is already at the deepest level, `7`. Nothing is
842
+ * grouped.
843
+ *
844
+ * @see {@link ISheet.getOutline}
845
+ */
846
+ group(axis?: IRange.Axis, options?: ITransaction.OperationOptions): this;
847
+ /**
848
+ * Ungroups the rows or columns of the range: each grouped one moves one outline level out.
849
+ * Rows or columns that are not grouped are left alone.
850
+ *
851
+ * @param axis Whether to ungroup the rows or the columns. When omitted, chosen as for
852
+ * {@link group}.
853
+ * @returns The current `ICellRange`.
854
+ */
855
+ ungroup(axis?: IRange.Axis, options?: ITransaction.OperationOptions): this;
856
+ /**
857
+ * Expands the groups the range selects: those whose summary row or column is in the range or,
858
+ * when there are none, the innermost groups the range meets.
859
+ *
860
+ * @param axis Whether to expand row groups or column groups. Inferred when the range is entire
861
+ * rows or entire columns; required otherwise.
862
+ * @returns The current `ICellRange`.
863
+ * @throws `Error` If the axis is not given and cannot be inferred.
864
+ *
865
+ * @remarks
866
+ * Groups nested inside that are collapsed stay collapsed.
867
+ */
868
+ showGroupDetails(axis?: IRange.Axis, options?: ITransaction.OperationOptions): this;
869
+ /**
870
+ * Collapses the groups the range selects, chosen as for {@link showGroupDetails}: their details are
871
+ * hidden.
872
+ *
873
+ * @param axis Whether to collapse row groups or column groups. Inferred as for
874
+ * {@link showGroupDetails}.
875
+ * @returns The current `ICellRange`.
876
+ * @throws `Error` If the axis is not given and cannot be inferred.
877
+ */
878
+ hideGroupDetails(axis?: IRange.Axis, options?: ITransaction.OperationOptions): this;
879
+ /**
880
+ * Removes the outline levels from the rows and columns of the range. Hidden rows and columns
881
+ * stay hidden.
882
+ *
883
+ * @param axes Which levels to remove. Default `IRange.AxisSelection.Both`.
884
+ * @returns The current `ICellRange`.
885
+ *
886
+ * @remarks
887
+ * The counterpart of Excel's `Range.ClearOutline`: both axes over the range's rows and columns,
888
+ * so entire rows also clear every column's levels unless `axes` names the rows, and a single
889
+ * cell clears the whole sheet. To outline a sheet from its formulas see
890
+ * {@link IOutline.autoOutline}.
891
+ */
892
+ clearGroups(axes?: IRange.AxisSelection, options?: ITransaction.OperationOptions): this;
835
893
  /**
836
894
  * Clear the range.
837
895
  *
@@ -1213,11 +1271,17 @@ export interface ICellRange {
1213
1271
  */
1214
1272
  isContentful(features?: ICellRange.Feature | readonly ICellRange.Feature[]): boolean;
1215
1273
  /**
1216
- * Returns `true` if the range represents the entire rows.
1274
+ * Returns `true` if the range is entire rows, such as `2:4`: it spans every column of the sheet.
1275
+ *
1276
+ * @remarks
1277
+ * The counterpart of Office Scripts' `isEntireRow`.
1217
1278
  */
1218
1279
  isEntireRows(): boolean;
1219
1280
  /**
1220
- * Returns `true` if the range represents the entire columns.
1281
+ * Returns `true` if the range is entire columns, such as `B:D`: it spans every row of the sheet.
1282
+ *
1283
+ * @remarks
1284
+ * The counterpart of Office Scripts' `isEntireColumn`.
1221
1285
  */
1222
1286
  isEntireColumns(): boolean;
1223
1287
  /**
@@ -2316,7 +2380,7 @@ export declare namespace ICellRange {
2316
2380
  * Represents an immutable reference to an `ICellRange`, capturing its content and metadata.
2317
2381
  * It may include complex objects such as tables, movables, images, listeners, or other items.
2318
2382
  *
2319
- * `ISnapshot` can be provided to `ICellRange.copyFrom``.
2383
+ * `ISnapshot` can be provided to `ICellRange.copyFrom`.
2320
2384
  */
2321
2385
  interface ISnapshot<T = any, J = any> {
2322
2386
  /**
@@ -218,35 +218,35 @@ export interface ICellRanges {
218
218
  */
219
219
  isOverlapping(): boolean;
220
220
  /**
221
- * Returns `true` if all of the the ranges have selected all of the rows.
221
+ * Returns `true` if every range is entire rows, such as `2:4`.
222
222
  *
223
223
  * @remarks
224
- * This is different from `isEntireRowsAny` in that it will return `true` if 'ALL' of the
225
- * ranges have isEntireRows `true`.
224
+ * {@link isEntireRowsAny} asks the same of any one range.
225
+ *
226
+ * @see {@link ICellRange.isEntireRows}
226
227
  */
227
228
  isEntireRows(): boolean;
228
229
  /**
229
- * Returns `true` if any of the ranges have selected all of the rows.
230
+ * Returns `true` if any range is entire rows, such as `2:4`.
230
231
  *
231
232
  * @remarks
232
- * This is different from `isEntireRows` in that it it will return true if 'ANY' of the
233
- * ranges have isEntireRows `true`.
233
+ * {@link isEntireRows} asks the same of every range.
234
234
  */
235
235
  isEntireRowsAny(): boolean;
236
236
  /**
237
- * Returns `true` if all of the the ranges have selected all of the columns.
237
+ * Returns `true` if every range is entire columns, such as `B:D`.
238
238
  *
239
239
  * @remarks
240
- * This is different from `isEntireColumnsAny` in that it will return `true` if 'ALL' of the
241
- * ranges have isEntireColumns `true`.
240
+ * {@link isEntireColumnsAny} asks the same of any one range.
241
+ *
242
+ * @see {@link ICellRange.isEntireColumns}
242
243
  */
243
244
  isEntireColumns(): boolean;
244
245
  /**
245
- * Returns `true` if any of the ranges have selected all of the columns.
246
+ * Returns `true` if any range is entire columns, such as `B:D`.
246
247
  *
247
248
  * @remarks
248
- * This is different from `isEntireColumns` in that it will return `true` if 'ANY' of the
249
- * ranges have isEntireColumns `true`.
249
+ * {@link isEntireColumns} asks the same of every range.
250
250
  */
251
251
  isEntireColumnsAny(): boolean;
252
252
  /**
@@ -1,3 +1,4 @@
1
+ import { IMovable } from '../movable/IMovable';
1
2
  import { IResource, IResourceCollection } from '../resource';
2
3
  import { AbstractMovableContent } from '../movable/AbstractMovableContent';
3
4
  import { ICellRange } from '../cellRange';
@@ -91,19 +92,7 @@ export declare namespace Chart {
91
92
  *
92
93
  * @param getExpressions Asked once, when the engine can compile.
93
94
  */
94
- holdFormulas?: (getExpressions: () => readonly string[]) => Chart.HeldFormulas;
95
- }
96
- /**
97
- * A chart's formulas as the calculation engine holds them.
98
- */
99
- interface HeldFormulas {
100
- /**
101
- * The formula at `index` as it reads now, or `null` while it reads as it was handed over:
102
- * the engine does not hold it, or nothing has moved what it names.
103
- */
104
- getText(index: number): string | null;
105
- /** Takes the formulas out of the engine, as part of the current operation. */
106
- release(): void;
95
+ holdFormulas?: (getExpressions: () => readonly string[]) => IMovable.HeldFormulas;
107
96
  }
108
97
  }
109
98
  export {};
@@ -271,6 +271,8 @@ export declare abstract class AnchoredConditional<STATE extends AnchoredConditio
271
271
  * resolver can tell which cells it answers for.
272
272
  */
273
273
  onBlank?: (resolve: _ConditionUtils.BlankResolver, area: IRange.Coords) => void;
274
+ /** {@inheritDoc DoRunConditionsOptions.spacesAreBlank} */
275
+ spacesAreBlank?: boolean;
274
276
  }): Promise<void>;
275
277
  get [Symbol.toStringTag](): string;
276
278
  toString(): string;
@@ -1,5 +1,9 @@
1
1
  import { ICondition } from '../ICondition';
2
2
  import { AbstractOperator } from './AbstractOperator';
3
+ /**
4
+ * Filter by cell or font color. Carried and written back; not evaluated until a condition can
5
+ * read a cell's style, so applying one throws.
6
+ */
3
7
  export declare class ColorOperator extends AbstractOperator<ICondition.ColorOption> implements ICondition.IOperator<ICondition.ColorOption> {
4
8
  constructor();
5
9
  /** {@inheritDoc ICondition.IOperator.createPredicate} */
@@ -1,5 +1,9 @@
1
1
  import { ICondition } from '../ICondition';
2
2
  import { AbstractOperator } from './AbstractOperator';
3
+ /**
4
+ * Filter by conditional-format icon. Carried and written back; not evaluated until a condition
5
+ * can read a cell's decorations, so applying one throws.
6
+ */
3
7
  export declare class IconOperator extends AbstractOperator<ICondition.IconOption> implements ICondition.IOperator<ICondition.IconOption> {
4
8
  constructor();
5
9
  /** {@inheritDoc ICondition.IOperator.createPredicate} */