@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
@@ -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
  }
@@ -3034,6 +3037,17 @@ declare global {
3034
3037
  readonly isIBullet: true;
3035
3038
  }
3036
3039
 
3040
+ /**
3041
+ * A button: runs its macro when clicked. Content type `'button'`.
3042
+ */
3043
+ export interface IButton extends IFormControl, ICaptioned {
3044
+ }
3045
+
3046
+ export namespace IButton {
3047
+ interface JSON extends IFormControl.JSON, ICaptioned.JSON {
3048
+ }
3049
+ }
3050
+
3037
3051
  /**
3038
3052
  * Calculation is the process of computing formulas and then displaying the results
3039
3053
  * as values in the cells that contain the formulas.
@@ -4462,6 +4476,51 @@ declare global {
4462
4476
  }
4463
4477
  }
4464
4478
 
4479
+ /**
4480
+ * A control that shows text: a button's label, the text beside a check box, a group box's title.
4481
+ */
4482
+ export interface ICaptioned {
4483
+ /**
4484
+ * Returns the text written on the control, or `null` if it has none.
4485
+ */
4486
+ getCaption(): string | null;
4487
+ /**
4488
+ * Sets the text written on the control.
4489
+ *
4490
+ * @param caption The text, or `null` for none.
4491
+ */
4492
+ setCaption(caption: string | null, options?: ITransaction.OperationOptions): this;
4493
+ /**
4494
+ * Returns the font the caption is drawn in, or `null` when the control has not said.
4495
+ */
4496
+ getFont(): ICaptioned.Font | null;
4497
+ }
4498
+
4499
+ export namespace ICaptioned {
4500
+ /**
4501
+ * The font a caption is drawn in. Every field is optional; one the control has not said is the
4502
+ * host's default.
4503
+ */
4504
+ interface Font {
4505
+ /** The family name. */
4506
+ name?: string;
4507
+ /** The size in points. */
4508
+ size?: number;
4509
+ /** @defaultValue false */
4510
+ bold?: boolean;
4511
+ /** @defaultValue false */
4512
+ italic?: boolean;
4513
+ /** A hex color (`#RRGGBB`). */
4514
+ color?: string;
4515
+ }
4516
+ interface JSON {
4517
+ /** The text written on the control. */
4518
+ caption?: string;
4519
+ /** The font the caption is drawn in. */
4520
+ font?: Font;
4521
+ }
4522
+ }
4523
+
4465
4524
  /**
4466
4525
  * A single unit of data and meta data within an `ICellRange`, located at a specific row and column.
4467
4526
  */
@@ -4932,17 +4991,17 @@ declare global {
4932
4991
  /**
4933
4992
  * Present when the cell's text is rotated (angle not a multiple of 180°): per-line rotated
4934
4993
  * strip geometry — each laid-out line is an independent strip drawn at
4935
- * {@link TextRotation.Layout.angle}, wrapped against the content height and marching
4994
+ * {@link TextRotation.RotatedLayout.angle}, wrapped against the content height and marching
4936
4995
  * horizontally. See {@link TextRotation.layoutLines} for the model.
4937
4996
  */
4938
- rotation?: TextRotation.Layout;
4997
+ rotation?: TextRotation.RotatedLayout;
4939
4998
  /**
4940
4999
  * Present when the cell's text is stacked ("vertical text"): per-column slot geometry — every
4941
5000
  * glyph upright in its own slot of the line pitch, columns from line breaks (and from wrapping
4942
5001
  * against the content height), each column aligned on its own. See
4943
5002
  * {@link TextStacked.layoutColumns} for the model. {@link bounds} is then the column group.
4944
5003
  */
4945
- stacked?: TextStacked.Layout;
5004
+ stacked?: TextStacked.StackedLayout;
4946
5005
  }
4947
5006
  /**
4948
5007
  * Expansive way to set cell updates options.
@@ -5403,6 +5462,12 @@ declare global {
5403
5462
  * {@link https://support.microsoft.com/en-us/office/change-the-column-width-and-row-height-72f5e3cc-994d-43e8-ae58-9774a0905f46}
5404
5463
  */
5405
5464
  getSizeRelative(): number;
5465
+ /**
5466
+ * The outline level, `0` to `7`. `0` is not grouped; `1` is the outermost group.
5467
+ *
5468
+ * @see `IOutline`
5469
+ */
5470
+ getOutlineLevel(): number;
5406
5471
  /**
5407
5472
  * For runtime introspection.
5408
5473
  */
@@ -5452,6 +5517,22 @@ declare global {
5452
5517
  * {@link ICellHeader.getSizeRelative()}
5453
5518
  */
5454
5519
  relativeSize?: boolean;
5520
+ /**
5521
+ * The outline level, `0` to `7`, or a function of the current one.
5522
+ *
5523
+ * @remarks
5524
+ * To group or ungroup, prefer `ICellRange.group` and `ICellRange.ungroup`.
5525
+ *
5526
+ * @see
5527
+ * {@link ICellHeader.getOutlineLevel()}
5528
+ */
5529
+ outlineLevel?: number | ((level: number) => number);
5530
+ /**
5531
+ * Whether the group this header is the summary of is collapsed.
5532
+ *
5533
+ * @internal
5534
+ */
5535
+ collapsed?: boolean;
5455
5536
  }
5456
5537
  /**
5457
5538
  * Stores information about header runs.
@@ -5470,11 +5551,11 @@ declare global {
5470
5551
  */
5471
5552
  h?: boolean;
5472
5553
  /**
5473
- * Header level
5554
+ * Outline level, `1` to `7`. Absent when not grouped.
5474
5555
  */
5475
5556
  l?: number;
5476
5557
  /**
5477
- * Collapsed level
5558
+ * Collapsed. Set on the summary header of a collapsed group.
5478
5559
  */
5479
5560
  cl?: boolean;
5480
5561
  /**
@@ -6785,6 +6866,64 @@ declare global {
6785
6866
  * @returns The current `ICellRange`.
6786
6867
  */
6787
6868
  autoFit(options?: ICellRange.AutoFitOptions): this;
6869
+ /**
6870
+ * Groups the rows or columns of the range: each one moves one outline level deeper.
6871
+ *
6872
+ * @param axis Whether to group the rows or the columns. When omitted, entire rows group the rows,
6873
+ * entire columns group the columns, and any other range groups both.
6874
+ * @returns The current `ICellRange`.
6875
+ * @throws `Error` If a row or column in the range is already at the deepest level, `7`. Nothing is
6876
+ * grouped.
6877
+ *
6878
+ * @see {@link ISheet.getOutline}
6879
+ */
6880
+ group(axis?: IRange.Axis, options?: ITransaction.OperationOptions): this;
6881
+ /**
6882
+ * Ungroups the rows or columns of the range: each grouped one moves one outline level out.
6883
+ * Rows or columns that are not grouped are left alone.
6884
+ *
6885
+ * @param axis Whether to ungroup the rows or the columns. When omitted, chosen as for
6886
+ * {@link group}.
6887
+ * @returns The current `ICellRange`.
6888
+ */
6889
+ ungroup(axis?: IRange.Axis, options?: ITransaction.OperationOptions): this;
6890
+ /**
6891
+ * Expands the groups the range selects: those whose summary row or column is in the range or,
6892
+ * when there are none, the innermost groups the range meets.
6893
+ *
6894
+ * @param axis Whether to expand row groups or column groups. Inferred when the range is entire
6895
+ * rows or entire columns; required otherwise.
6896
+ * @returns The current `ICellRange`.
6897
+ * @throws `Error` If the axis is not given and cannot be inferred.
6898
+ *
6899
+ * @remarks
6900
+ * Groups nested inside that are collapsed stay collapsed.
6901
+ */
6902
+ showGroupDetails(axis?: IRange.Axis, options?: ITransaction.OperationOptions): this;
6903
+ /**
6904
+ * Collapses the groups the range selects, chosen as for {@link showGroupDetails}: their details are
6905
+ * hidden.
6906
+ *
6907
+ * @param axis Whether to collapse row groups or column groups. Inferred as for
6908
+ * {@link showGroupDetails}.
6909
+ * @returns The current `ICellRange`.
6910
+ * @throws `Error` If the axis is not given and cannot be inferred.
6911
+ */
6912
+ hideGroupDetails(axis?: IRange.Axis, options?: ITransaction.OperationOptions): this;
6913
+ /**
6914
+ * Removes the outline levels from the rows and columns of the range. Hidden rows and columns
6915
+ * stay hidden.
6916
+ *
6917
+ * @param axes Which levels to remove. Default `IRange.AxisSelection.Both`.
6918
+ * @returns The current `ICellRange`.
6919
+ *
6920
+ * @remarks
6921
+ * The counterpart of Excel's `Range.ClearOutline`: both axes over the range's rows and columns,
6922
+ * so entire rows also clear every column's levels unless `axes` names the rows, and a single
6923
+ * cell clears the whole sheet. To outline a sheet from its formulas see
6924
+ * {@link IOutline.autoOutline}.
6925
+ */
6926
+ clearGroups(axes?: IRange.AxisSelection, options?: ITransaction.OperationOptions): this;
6788
6927
  /**
6789
6928
  * Clear the range.
6790
6929
  *
@@ -7166,11 +7305,17 @@ declare global {
7166
7305
  */
7167
7306
  isContentful(features?: ICellRange.Feature | readonly ICellRange.Feature[]): boolean;
7168
7307
  /**
7169
- * Returns `true` if the range represents the entire rows.
7308
+ * Returns `true` if the range is entire rows, such as `2:4`: it spans every column of the sheet.
7309
+ *
7310
+ * @remarks
7311
+ * The counterpart of Office Scripts' `isEntireRow`.
7170
7312
  */
7171
7313
  isEntireRows(): boolean;
7172
7314
  /**
7173
- * Returns `true` if the range represents the entire columns.
7315
+ * Returns `true` if the range is entire columns, such as `B:D`: it spans every row of the sheet.
7316
+ *
7317
+ * @remarks
7318
+ * The counterpart of Office Scripts' `isEntireColumn`.
7174
7319
  */
7175
7320
  isEntireColumns(): boolean;
7176
7321
  /**
@@ -8244,7 +8389,7 @@ declare global {
8244
8389
  * Represents an immutable reference to an `ICellRange`, capturing its content and metadata.
8245
8390
  * It may include complex objects such as tables, movables, images, listeners, or other items.
8246
8391
  *
8247
- * `ISnapshot` can be provided to `ICellRange.copyFrom``.
8392
+ * `ISnapshot` can be provided to `ICellRange.copyFrom`.
8248
8393
  */
8249
8394
  interface ISnapshot<T = any, J = any> {
8250
8395
  /**
@@ -8989,35 +9134,35 @@ declare global {
8989
9134
  */
8990
9135
  isOverlapping(): boolean;
8991
9136
  /**
8992
- * Returns `true` if all of the the ranges have selected all of the rows.
9137
+ * Returns `true` if every range is entire rows, such as `2:4`.
8993
9138
  *
8994
9139
  * @remarks
8995
- * This is different from `isEntireRowsAny` in that it will return `true` if 'ALL' of the
8996
- * ranges have isEntireRows `true`.
9140
+ * {@link isEntireRowsAny} asks the same of any one range.
9141
+ *
9142
+ * @see {@link ICellRange.isEntireRows}
8997
9143
  */
8998
9144
  isEntireRows(): boolean;
8999
9145
  /**
9000
- * Returns `true` if any of the ranges have selected all of the rows.
9146
+ * Returns `true` if any range is entire rows, such as `2:4`.
9001
9147
  *
9002
9148
  * @remarks
9003
- * This is different from `isEntireRows` in that it it will return true if 'ANY' of the
9004
- * ranges have isEntireRows `true`.
9149
+ * {@link isEntireRows} asks the same of every range.
9005
9150
  */
9006
9151
  isEntireRowsAny(): boolean;
9007
9152
  /**
9008
- * Returns `true` if all of the the ranges have selected all of the columns.
9153
+ * Returns `true` if every range is entire columns, such as `B:D`.
9009
9154
  *
9010
9155
  * @remarks
9011
- * This is different from `isEntireColumnsAny` in that it will return `true` if 'ALL' of the
9012
- * ranges have isEntireColumns `true`.
9156
+ * {@link isEntireColumnsAny} asks the same of any one range.
9157
+ *
9158
+ * @see {@link ICellRange.isEntireColumns}
9013
9159
  */
9014
9160
  isEntireColumns(): boolean;
9015
9161
  /**
9016
- * Returns `true` if any of the ranges have selected all of the columns.
9162
+ * Returns `true` if any range is entire columns, such as `B:D`.
9017
9163
  *
9018
9164
  * @remarks
9019
- * This is different from `isEntireColumns` in that it will return `true` if 'ANY' of the
9020
- * ranges have isEntireColumns `true`.
9165
+ * {@link isEntireColumns} asks the same of every range.
9021
9166
  */
9022
9167
  isEntireColumnsAny(): boolean;
9023
9168
  /**
@@ -9523,6 +9668,43 @@ declare global {
9523
9668
  readonly isIChartCollection: true;
9524
9669
  }
9525
9670
 
9671
+ /**
9672
+ * A check box: on, off or mixed. Content type `'checkBox'`.
9673
+ */
9674
+ export interface ICheckBox extends IFormControl, ICaptioned, ILinked {
9675
+ /**
9676
+ * Returns `true` if the box is checked.
9677
+ */
9678
+ isChecked(): boolean;
9679
+ /**
9680
+ * Sets whether the box is checked. Clears {@link isMixed}.
9681
+ */
9682
+ setChecked(checked: boolean, options?: ITransaction.OperationOptions): this;
9683
+ /**
9684
+ * Returns `true` if the box shows the mixed (neither) state.
9685
+ */
9686
+ isMixed(): boolean;
9687
+ /**
9688
+ * Sets whether the box shows the mixed state.
9689
+ */
9690
+ setMixed(mixed: boolean, options?: ITransaction.OperationOptions): this;
9691
+ }
9692
+
9693
+ export namespace ICheckBox {
9694
+ interface JSON extends IFormControl.JSON, ICaptioned.JSON, ILinked.JSON {
9695
+ /**
9696
+ * `true` if the box is checked.
9697
+ * @defaultValue false
9698
+ */
9699
+ checked?: boolean;
9700
+ /**
9701
+ * `true` if the box shows the mixed state. Wins over `checked`.
9702
+ * @defaultValue false
9703
+ */
9704
+ mixed?: boolean;
9705
+ }
9706
+ }
9707
+
9526
9708
  /**
9527
9709
  * Interface used for all ICollections.
9528
9710
  *
@@ -11391,6 +11573,11 @@ declare global {
11391
11573
  * **UI Guidance:**
11392
11574
  * - Show "Ignore Blanks" checkbox for DataValidation (common use case)
11393
11575
  * - Hide for ConditionalFormat/TableFilter (default behavior is usually correct)
11576
+ *
11577
+ * **What is blank:**
11578
+ * - Filters and ConditionalFormat: an empty cell, a `""` result, or a string of only spaces
11579
+ * (Excel's `LEN(TRIM(x))=0`). A tab, a non-breaking space, `0` and an error are values.
11580
+ * - DataValidation: an empty cell only. A `""` result is a value and is judged.
11394
11581
  */
11395
11582
  isIncludeBlanks(): boolean;
11396
11583
  /**
@@ -11716,6 +11903,7 @@ declare global {
11716
11903
  readonly NextMonth: "nextMonth";
11717
11904
  readonly NextQuarter: "nextQuarter";
11718
11905
  readonly NextWeek: "nextWeek";
11906
+ readonly NextYear: "nextYear";
11719
11907
  readonly Null: "null";
11720
11908
  readonly Q1: "Q1";
11721
11909
  readonly Q2: "Q2";
@@ -11724,6 +11912,7 @@ declare global {
11724
11912
  readonly ThisMonth: "thisMonth";
11725
11913
  readonly ThisQuarter: "thisQuarter";
11726
11914
  readonly ThisWeek: "thisWeek";
11915
+ readonly ThisYear: "thisYear";
11727
11916
  readonly Today: "today";
11728
11917
  readonly Tomorrow: "tomorrow";
11729
11918
  readonly YearToDate: "yearToDate";
@@ -11796,9 +11985,30 @@ declare global {
11796
11985
  }
11797
11986
  interface InSetOption {
11798
11987
  /**
11799
- * If true this filter by blank.
11988
+ * OOXML's `filters/@blank`, carried for the file. The condition's `includeBlanks` is what
11989
+ * keeps a blank row: a reader sets both, the engine reads `includeBlanks`.
11800
11990
  */
11801
11991
  blank?: boolean;
11992
+ /**
11993
+ * Match string items against the text a cell SHOWS rather than the value it holds.
11994
+ *
11995
+ * @defaultValue `false`
11996
+ *
11997
+ * @remarks
11998
+ * The identity is the value: `items: [1]` keeps every cell holding 1 however it is
11999
+ * formatted, and `items: ['1']` keeps the cells holding the text `1`. Under `byDisplay` a
12000
+ * string item is instead the displayed text, which is what a spreadsheet's filter list
12001
+ * holds: `'1.50'` keeps a cell holding 1.5 under `0.00`, and `'$1'` one under `$0`. A typed
12002
+ * item is matched by value in both modes.
12003
+ *
12004
+ * `byDisplay` is a filter's option, the one the column dropdown sets. A conditional format
12005
+ * or a data validation has no displayed text to read, so the flag is inert there. Under a
12006
+ * filter it also widens what is blank: a string of only spaces shows as nothing and is
12007
+ * settled as a blank cell, and a whitespace-only item means `includeBlanks`. A port of
12008
+ * Office Scripts' `applyValuesFilter` or Apps Script's `setVisibleValues` passes strings
12009
+ * and sets it.
12010
+ */
12011
+ byDisplay?: boolean;
11802
12012
  /**
11803
12013
  * The values that match: an array, or a list validation's source as formula text.
11804
12014
  *
@@ -11814,7 +12024,7 @@ declare global {
11814
12024
  * evaluated for each cell, so a relative reference gives each cell its own list, and the
11815
12025
  * source follows inserts and deletes as any formula does.
11816
12026
  *
11817
- * An array matches as a filter's list of values does.
12027
+ * An array's items match by value, or by displayed text under {@link byDisplay}.
11818
12028
  */
11819
12029
  items?: Scalar[] | string;
11820
12030
  /**
@@ -11891,17 +12101,17 @@ declare global {
11891
12101
  */
11892
12102
  toType<T extends InteropScalar>(value: Scalar, type: InteropScalarType): T;
11893
12103
  /**
11894
- * The text the current cell shows, when the evaluation matches by text; `null` otherwise.
12104
+ * The text the current cell shows, under a filter; `null` elsewhere.
11895
12105
  *
11896
12106
  * @remarks
11897
- * A filter matches by shown text unless asked not to ({@link ICondition.RangeOptions.match}):
11898
- * a cell holding `1.5` and showing `1.50` is the item `1.50`. Conditional formats and data
11899
- * validations match by value, so this answers `null` for them. An operator that compares
11900
- * text reads `ctx.getText() ?? value`.
12107
+ * Read by an operator asked to match displayed text ({@link InSetOption.byDisplay}): a cell
12108
+ * holding `1.5` and showing `1.50` is the item `1.50`. A conditional format or a data
12109
+ * validation has no displayed text, so this answers `null` there and the operator compares
12110
+ * the value.
11901
12111
  *
11902
12112
  * Formatted on demand, so an operator that never asks pays nothing.
11903
12113
  */
11904
- getText(): string | null;
12114
+ getDisplayText(): string | null;
11905
12115
  /**
11906
12116
  * Resolves a condition input to a fully-built ICondition instance.
11907
12117
  *
@@ -12328,26 +12538,6 @@ declare global {
12328
12538
  * with no explicit `hasHeader` evaluates the entire range, header row included.
12329
12539
  */
12330
12540
  hasHeader?: boolean;
12331
- /**
12332
- * What a filter's list items and `equalTo` text are compared with: the text a cell shows, or
12333
- * the value it holds.
12334
- *
12335
- * @defaultValue `'text'`
12336
- *
12337
- * @remarks
12338
- * `'text'` is a spreadsheet's AutoFilter: the item `1.50` keeps a cell holding `1.5` under the
12339
- * format `0.00`, and the item `1.5` does not. A number passed as an item or operand still
12340
- * matches the cells holding that number, however they are formatted.
12341
- *
12342
- * `'value'` compares typed values only, so the text `"1"` never matches the number `1`.
12343
- *
12344
- * Comparisons (`>`, `between`), Top N, averages, date periods and date groups read the value
12345
- * either way, and the text operators (contains, starts with, ends with) only ever match a
12346
- * cell that holds text.
12347
- *
12348
- * Read by filters. Conditional formats and data validations match by value.
12349
- */
12350
- match?: 'text' | 'value';
12351
12541
  }
12352
12542
  /**
12353
12543
  * JSON for serialization and round-tripping.
@@ -12941,87 +13131,6 @@ declare global {
12941
13131
  }
12942
13132
  }
12943
13133
 
12944
- /**
12945
- * Interface for working with form controls — a button, a checkbox, a scrollbar placed on a sheet.
12946
- *
12947
- * **PLACEHOLDER** - This is under development and not made public yet.
12948
- */
12949
- export interface IControl extends IModel, IMovable.IContent {
12950
- /**
12951
- * Returns the id of the shape that draws this control, or `null` if it has none.
12952
- *
12953
- * @remarks
12954
- * The shape lives in the sheet's legacy drawing, which is still opaque markup — this is the only
12955
- * link between the two, and it is what lets the shape be kept over the same cells as the control
12956
- * when rows and columns move.
12957
- */
12958
- getShapeId(): number | null;
12959
- /**
12960
- * Returns the markup of the part describing the control, or `null` if none was captured.
12961
- *
12962
- * @remarks
12963
- * Read-only, and the one escape hatch for what the control does not model yet: it is the
12964
- * `<formControlPr>` the control was read from — its kind, its linked cell, its macro. It will be
12965
- * removed when the control is modeled.
12966
- */
12967
- getXML(): string | null;
12968
- toJSON(toResourceId?: (resource: IResource) => number | null): IControl.JSON | null;
12969
- /**
12970
- * Deletes the control, and with it the movable that places it.
12971
- */
12972
- delete(options?: ITransaction.OperationOptions): void;
12973
- /** For runtime type checking. */
12974
- readonly isIControl: true;
12975
- }
12976
-
12977
- /**
12978
- * {@inheritDoc IControl}
12979
- * @see
12980
- * ### **Interface**
12981
- *
12982
- * {@link IControl}
12983
- */
12984
- export namespace IControl {
12985
- interface JSON {
12986
- /**
12987
- * The id of the shape that draws this control.
12988
- *
12989
- * @see {@link IControl.getShapeId}
12990
- */
12991
- shapeId?: number;
12992
- /**
12993
- * The control's own properties, as they were read.
12994
- *
12995
- * @remarks
12996
- * Opaque. What they describe — a button's macro, a checkbox's linked cell — has no model yet,
12997
- * so they are held as they were read and written back unchanged. The position is *not* among
12998
- * them: it is the movable's own anchor, and is written from that.
12999
- */
13000
- props?: Record<string, string>;
13001
- /**
13002
- * Anything else the properties contained, as markup.
13003
- *
13004
- * @remarks
13005
- * Empty for every control this version has seen — a control's properties are attributes and an
13006
- * anchor, and the anchor is the movable's. Kept so a producer that writes more than that does
13007
- * not lose it.
13008
- */
13009
- xml?: string;
13010
- /**
13011
- * The part describing what kind of control this is and how it behaves.
13012
- *
13013
- * @remarks
13014
- * A control is drawn by a shape in the sheet's legacy drawing ({@link ISheet.LegacyDrawingJSON})
13015
- * and described by a part of its own; this is that part.
13016
- */
13017
- part?: IEmbeddedPart.JSON;
13018
- }
13019
- interface Events extends IModel.Events {
13020
- }
13021
- interface IListeners extends IListener.Callbacks<IControl, IControl.Events> {
13022
- }
13023
- }
13024
-
13025
13134
  /**
13026
13135
  * A data validation: a rule that a cell's value must satisfy, over one or more ranges of a sheet,
13027
13136
  * with the prompt shown when the cell is selected and the alert for a value that fails.
@@ -13501,6 +13610,42 @@ declare global {
13501
13610
  }
13502
13611
  }
13503
13612
 
13613
+ /**
13614
+ * A drop-down. Content type `'dropDown'`.
13615
+ */
13616
+ export interface IDropDown extends IListControl {
13617
+ /**
13618
+ * Returns how the drop-down behaves: a list to pick from, a list that can also be typed into, or
13619
+ * a plain list box. `null` if the control has not said.
13620
+ */
13621
+ getDropStyle(): IDropDown.DropStyle | null;
13622
+ /**
13623
+ * Returns how many items the drop-down shows at once, or `null` if the control has not said.
13624
+ */
13625
+ getDropLines(): number | null;
13626
+ }
13627
+
13628
+ export namespace IDropDown {
13629
+ /**
13630
+ * How a drop-down behaves.
13631
+ */
13632
+ const DropStyle: {
13633
+ /** A list to pick from. */
13634
+ readonly Combo: "combo";
13635
+ /** A list that can also be typed into. */
13636
+ readonly ComboEdit: "comboEdit";
13637
+ /** A list box that does not drop. */
13638
+ readonly Simple: "simple";
13639
+ };
13640
+ type DropStyle = typeof DropStyle[keyof typeof DropStyle];
13641
+ interface JSON extends IListControl.JSON {
13642
+ /** How the drop-down behaves. */
13643
+ dropStyle?: DropStyle;
13644
+ /** How many items the drop-down shows at once. */
13645
+ dropLines?: number;
13646
+ }
13647
+ }
13648
+
13504
13649
  /**
13505
13650
  * *** **PLACEHOLDER** - Not yet implemented.
13506
13651
  *
@@ -14382,7 +14527,7 @@ declare global {
14382
14527
  * @remarks
14383
14528
  * * Not support in cells. This is currently only support in drawML (charts, shapes, powerpoint).
14384
14529
  */
14385
- readonly Image: "pattern";
14530
+ readonly Image: "image";
14386
14531
  /**
14387
14532
  * An Image.
14388
14533
  * @remarks
@@ -14869,22 +15014,57 @@ declare global {
14869
15014
  }
14870
15015
  interface PatternJSON extends PatternProperties<string> {
14871
15016
  }
15017
+ /**
15018
+ * Insets of a rectangle from the edges of another, as percentages of its width and height
15019
+ * (an inset of `-10` on the right extends past the edge by a tenth of the width).
15020
+ */
15021
+ interface RectInsets {
15022
+ left?: number;
15023
+ top?: number;
15024
+ right?: number;
15025
+ bottom?: number;
15026
+ }
15027
+ /** How a tiled image fill repeats (DrawingML `tile`). */
15028
+ interface ImageTileProperties {
15029
+ /** Offset of the first tile from the fill rectangle's origin, in pixels. */
15030
+ offsetX?: number;
15031
+ offsetY?: number;
15032
+ /** Scale of each tile as a percentage (100 = natural size). */
15033
+ scaleX?: number;
15034
+ scaleY?: number;
15035
+ /** Which tiles are mirrored: `none`, `x`, `y` or `xy`. */
15036
+ flip?: string;
15037
+ /** Where the tiles align in the shape: `tl`, `t`, `tr`, `l`, `ctr`, `r`, `bl`, `b`, `br`. */
15038
+ alignment?: string;
15039
+ }
15040
+ /**
15041
+ * An image fill: a workbook resource stretched over the shape or tiled across it.
15042
+ *
15043
+ * @remarks
15044
+ * `resId` names the resource the way `IPicture.JSON.resId` names a placed picture's image and,
15045
+ * like it, is meaningful only inside the persist scope the JSON was made in. A shape resolves it
15046
+ * to the resource when it is created and names the resource again when it is serialized.
15047
+ */
14872
15048
  interface ImageProperties extends IFill.Properties {
15049
+ /** The resource id of the image. */
15050
+ resId?: number;
15051
+ /** The part of the image used (`srcRect`), as insets from its edges. Absent for the whole image. */
15052
+ sourceRect?: RectInsets;
14873
15053
  /**
14874
- * A reference to the image resource.
14875
- *
14876
- * @remarks
14877
- * This is a placeholder
14878
- */
14879
- ref?: any;
14880
- /**
14881
- * Indicates whether the image fill should be tiled.
15054
+ * The image is stretched to a rectangle inset from the shape's bounds (`stretch/fillRect`);
15055
+ * `{}` for the whole shape. Absent when the image is tiled.
14882
15056
  */
14883
- tile?: boolean;
15057
+ stretch?: RectInsets;
15058
+ /** The image is tiled (`tile`). Absent when it is stretched. */
15059
+ tile?: ImageTileProperties;
14884
15060
  /**
14885
- * The resolution of the image in dots per inch (DPI).
15061
+ * The resolution the image is rendered at, in dots per inch (`dpi`); `0` for the image's own.
14886
15062
  */
14887
15063
  dpi?: number;
15064
+ /** The compression the image was stored for (`blip/@cstate`): `email`, `screen`, `print`, `hqprint`, `none`. */
15065
+ compressionState?: string;
15066
+ /** `blip/extLst` as the file states it: an opaque DrawingML fragment, written back as it was. */
15067
+ extLst?: string;
14888
15068
  }
14889
15069
  interface ImageJSON extends ImageProperties {
14890
15070
  }
@@ -14990,33 +15170,71 @@ declare global {
14990
15170
  * @defaultValue `10000`
14991
15171
  */
14992
15172
  limit?: number;
15173
+ /**
15174
+ * Group the column by the text its cells SHOW rather than by value, as a spreadsheet's filter
15175
+ * list does: `1` under `$0` and under `0%` are two items, and a string of only spaces is a
15176
+ * blank. The items are then the texts an `InSet { byDisplay: true }` condition holds.
15177
+ *
15178
+ * @defaultValue `false` — by value, the identity {@link ICondition.InSetOption.items} has.
15179
+ */
15180
+ byDisplay?: boolean;
14993
15181
  }
14994
15182
  /**
14995
15183
  * One distinct value of a filtered column.
14996
15184
  */
14997
15185
  interface Item {
14998
15186
  /**
14999
- * The text the cells show. This is the item an `InSet` condition holds: a filter matches by
15000
- * shown text ({@link ICondition.RangeOptions.match}).
15187
+ * The item's label: by value, the value as `General` shows it (a date as its date format
15188
+ * does); by display, the text the cells show, which is then the item an
15189
+ * `InSet { byDisplay: true }` condition holds.
15001
15190
  */
15002
15191
  text: string;
15003
- /** The value of the first cell showing `text`; the item's place in the order. */
15192
+ /** The value, or by display the value of the first cell showing `text`; the item's place in the order. */
15004
15193
  value: Scalar;
15005
15194
  /** The rows holding the value. */
15006
15195
  count: number;
15007
15196
  /** Whether at least one row holding the value passes the filters. */
15008
15197
  checked: boolean;
15009
15198
  }
15199
+ /**
15200
+ * One level of the date tree {@link Items.dates}: the nodes, each the run of items it spans,
15201
+ * in the order the items are listed.
15202
+ */
15203
+ interface DateLevel {
15204
+ /** The part this level groups by. */
15205
+ group: ICondition.DateItemGroupingType;
15206
+ /**
15207
+ * The nodes. A run's `value` is the group item selecting exactly its items: the parts down
15208
+ * to this level (`{ group: 'month', year: 1995, month: 10 }`).
15209
+ */
15210
+ runs: readonly RunCoordValue<ICondition.DateGroupItem>[];
15211
+ }
15010
15212
  /**
15011
15213
  * What {@link IFilter.getItems} answers.
15012
15214
  */
15013
15215
  interface Items {
15014
15216
  /**
15015
- * The distinct texts, ascending by the workbook's comparison of their values. Values that
15016
- * show alike are one item. Blanks are not an item.
15217
+ * The distinct values, or the distinct texts under `byDisplay`. The dates come first (the tree in {@link dates}), newest year first
15218
+ * and ascending within a year, as Excel's date tree lists them; the rest follow, ascending
15219
+ * by the workbook's comparison of their values. Values that show alike are one item. Blanks
15220
+ * are not an item.
15017
15221
  */
15018
15222
  items: readonly Item[];
15019
- /** Whether a listed row is blank. */
15223
+ /**
15224
+ * The date tree over the leading items, one level per entry: year, month and day, then hour,
15225
+ * minute and second when a date carries a time. Absent when the column shows no date.
15226
+ *
15227
+ * @remarks
15228
+ * A date is a number shown under a date format; a time-only format is a number. Every level
15229
+ * covers the same items, `0` to the last date, and a finer level's runs nest inside the
15230
+ * coarser's. A node's checkbox is the state of its items; a checked node is written as its
15231
+ * run's value, in {@link ICondition.InSetOption.dateGroups}.
15232
+ */
15233
+ dates?: readonly DateLevel[];
15234
+ /**
15235
+ * Whether a listed row is blank: empty, or showing nothing (a `""` result, a string of only
15236
+ * spaces). The same rows `includeBlanks` keeps.
15237
+ */
15020
15238
  hasBlanks: boolean;
15021
15239
  /** Whether at least one blank row passes the filters. */
15022
15240
  blanksChecked: boolean;
@@ -15024,6 +15242,12 @@ declare global {
15024
15242
  truncated: boolean;
15025
15243
  /** The rows read. */
15026
15244
  total: number;
15245
+ /**
15246
+ * The mode the list was read in, so a caller writes the items back under the same one:
15247
+ * `{ operator: 'inSet', param: { items, byDisplay } }`. A list read by value fed back as
15248
+ * texts under `byDisplay` would match nothing for a number.
15249
+ */
15250
+ byDisplay: boolean;
15027
15251
  }
15028
15252
  /**
15029
15253
  * Interface indicating the ability to filter data.
@@ -15393,6 +15617,135 @@ declare global {
15393
15617
  readonly isIFormatEngine: true;
15394
15618
  }
15395
15619
 
15620
+ /**
15621
+ * What every form control shares — a button, a check box, a scroll bar placed on a sheet.
15622
+ *
15623
+ * @remarks
15624
+ * A form control is a movable whose content is one of Excel's legacy controls: the movable places
15625
+ * it and the content models what it is. Each kind is its own content type
15626
+ * ({@link IFormControl.Type}) and its own interface, composed from this and two facets: the kinds
15627
+ * that show text ({@link ICaptioned}) and the kinds that hold a value a cell can mirror
15628
+ * ({@link ILinked}). A control owns its state — a check box with no linked cell is still checked
15629
+ * or not.
15630
+ *
15631
+ * **PLACEHOLDER** - This is under development and not made public yet.
15632
+ */
15633
+ export interface IFormControl extends IModel, IMovable.IContent {
15634
+ /**
15635
+ * Returns the id of the shape that draws this control, or `null` if it has none.
15636
+ *
15637
+ * @remarks
15638
+ * The link to the shape in the sheet's legacy drawing, which is what keeps the two over the same
15639
+ * cells when rows and columns move.
15640
+ */
15641
+ getShapeId(): number | null;
15642
+ /**
15643
+ * Returns the name of the macro the control runs when used, or `null` if it has none.
15644
+ *
15645
+ * @remarks
15646
+ * Any kind may run one: a button when clicked, a check box when toggled, a scroll bar when moved.
15647
+ */
15648
+ getMacro(): string | null;
15649
+ /**
15650
+ * Sets the name of the macro the control runs when used.
15651
+ *
15652
+ * @param macro The name, or `null` for none.
15653
+ */
15654
+ setMacro(macro: string | null, options?: ITransaction.OperationOptions): this;
15655
+ toJSON(toResourceId?: (resource: IResource) => number | null): IFormControl.JSON | null;
15656
+ /**
15657
+ * Deletes the control, and with it the movable that places it.
15658
+ */
15659
+ delete(options?: ITransaction.OperationOptions): void;
15660
+ /** For runtime type checking. */
15661
+ readonly isIFormControl: true;
15662
+ }
15663
+
15664
+ /**
15665
+ * {@inheritDoc IFormControl}
15666
+ * @see
15667
+ * ### **Interface**
15668
+ *
15669
+ * {@link IFormControl}
15670
+ */
15671
+ export namespace IFormControl {
15672
+ /**
15673
+ * The kinds of form control, which are the content types a movable reports for them.
15674
+ */
15675
+ const Type: {
15676
+ /** {@link IButton}: runs its macro when clicked. */
15677
+ readonly Button: "button";
15678
+ /** {@link ICheckBox}: on, off or mixed; writes a boolean to its linked cell. */
15679
+ readonly CheckBox: "checkBox";
15680
+ /** {@link IOptionButton}: one of a group; the group's linked cell holds the chosen index. */
15681
+ readonly OptionButton: "optionButton";
15682
+ /** {@link IListBox}: a list of items; writes the index of the chosen one. */
15683
+ readonly ListBox: "listBox";
15684
+ /** {@link IDropDown}: a list that drops down; writes the index of the chosen one. */
15685
+ readonly DropDown: "dropDown";
15686
+ /** {@link IScrollBar}: a thumb in a trough; writes a number. */
15687
+ readonly ScrollBar: "scrollBar";
15688
+ /** {@link ISpinner}: two arrows; writes a number. */
15689
+ readonly Spinner: "spinner";
15690
+ /** {@link IGroupBox}: a frame around other controls. */
15691
+ readonly GroupBox: "groupBox";
15692
+ /** {@link ILabel}: text, nothing more. */
15693
+ readonly Label: "label";
15694
+ /** A text field. Dialog sheets only. {@link IFormControl} only. */
15695
+ readonly EditBox: "editBox";
15696
+ /** A dialog frame. Dialog sheets only. {@link IFormControl} only. */
15697
+ readonly Dialog: "dialog";
15698
+ /** A kind this version does not know. {@link IFormControl} only. */
15699
+ readonly Unknown: "formControl";
15700
+ };
15701
+ type Type = typeof Type[keyof typeof Type];
15702
+ /**
15703
+ * What every kind saves. Each facet and each kind adds its own fields.
15704
+ */
15705
+ interface JSON {
15706
+ /**
15707
+ * The id of the shape that draws this control.
15708
+ *
15709
+ * @see {@link IFormControl.getShapeId}
15710
+ */
15711
+ shapeId?: number;
15712
+ /**
15713
+ * The name of the macro the control runs when used.
15714
+ */
15715
+ macro?: string;
15716
+ /**
15717
+ * The control's placement properties as the file spelled them, less the ones modeled and the
15718
+ * anchor, which is the movable's own.
15719
+ *
15720
+ * @remarks
15721
+ * Whether it prints, whether it is locked, how it sizes with its cell. Carried so a file keeps
15722
+ * what it said until each has a model.
15723
+ */
15724
+ props?: Record<string, string>;
15725
+ /**
15726
+ * The control's own properties as the file spelled them, less the ones modeled.
15727
+ *
15728
+ * @remarks
15729
+ * The 3-D look, text locking, the width of a drop-down's arrow. Carried so a file keeps what
15730
+ * it said until each has a model.
15731
+ */
15732
+ formProps?: Record<string, string>;
15733
+ /**
15734
+ * Anything a producer wrote inside the placement properties besides the anchor, as markup.
15735
+ * Empty for every file seen so far.
15736
+ */
15737
+ xml?: string;
15738
+ /**
15739
+ * Extensions a producer wrote on the control's own properties, as markup.
15740
+ */
15741
+ extLst?: string;
15742
+ }
15743
+ interface Events extends IModel.Events {
15744
+ }
15745
+ interface IListeners extends IListener.Callbacks<IFormControl, IFormControl.Events> {
15746
+ }
15747
+ }
15748
+
15396
15749
  /**
15397
15750
  * Everything a formula function is allowed to know about the world outside its arguments.
15398
15751
  *
@@ -17409,6 +17762,404 @@ declare global {
17409
17762
  }
17410
17763
  }
17411
17764
 
17765
+ /**
17766
+ * A shape's geometry evaluated at one size: its paths, text rectangle, adjust handles and
17767
+ * connection sites, in pixels in the shape's own frame (its top-left is 0,0).
17768
+ *
17769
+ * @remarks
17770
+ * Returned by {@link IShape.getGeometry}, which loads whatever the shape needs to evaluate.
17771
+ * Once it has resolved, everything here is synchronous: a renderer re-evaluates at a new size
17772
+ * ({@link resize}) or with new adjust values ({@link withAdjustments}) on every frame of a drag.
17773
+ *
17774
+ * A group's geometry is its members' paths, each placed in the group's frame; a group has no
17775
+ * handles or connection sites of its own.
17776
+ *
17777
+ * @example
17778
+ * ```ts
17779
+ * const geometry = await shape.getGeometry(200, 100);
17780
+ * const parts: string[] = [];
17781
+ * geometry?.forEachPath((path) => {
17782
+ * if (path.layer === IGeometry.PathLayer.Stroke) parts.push(`<path d="${path.d}" fill="none" stroke="black"/>`);
17783
+ * });
17784
+ * ```
17785
+ */
17786
+ export interface IGeometry {
17787
+ /** The width the geometry was evaluated at, in pixels. */
17788
+ getWidth(): number;
17789
+ /** The height the geometry was evaluated at, in pixels. */
17790
+ getHeight(): number;
17791
+ /** Where text is laid out: the definition's text rectangle, or the whole frame when it declares none. */
17792
+ getTextRect(): IGeometry.Rect;
17793
+ /**
17794
+ * The box that holds every path, line ends included, in the shape's frame.
17795
+ *
17796
+ * @remarks
17797
+ * It can reach outside the frame, as a callout's tail does, so its edges may be negative or past
17798
+ * {@link getWidth} and {@link getHeight}. The line's own width is not included. A geometry
17799
+ * that draws nothing answers its whole frame.
17800
+ */
17801
+ getPathBounds(): IGeometry.Rect;
17802
+ /**
17803
+ * Visits every path in paint order: a shape's fills, then its strokes, then its markers; a
17804
+ * group's members in z-order, each in that order. A picture member is a rectangle whose fill
17805
+ * is its image.
17806
+ */
17807
+ forEachPath(visit: (path: IGeometry.IPath) => void): void;
17808
+ /** Visits the adjust handles, in the order {@link adjustmentsFromHandle} indexes them. */
17809
+ forEachHandle(visit: (handle: IGeometry.IHandle) => void): void;
17810
+ /** Visits the connection sites, in the order a connector's ends index them. */
17811
+ forEachConnection(visit: (connection: IGeometry.IConnection) => void): void;
17812
+ /** The same shape evaluated at another size. */
17813
+ resize(width: number, height: number): IGeometry;
17814
+ /**
17815
+ * The same shape evaluated with other adjust values.
17816
+ *
17817
+ * @param adjustments Values by name, as {@link IShape.setAdjustments} takes them (what a
17818
+ * handle drag produced); `null` for the preset's defaults.
17819
+ */
17820
+ withAdjustments(adjustments: Readonly<Record<string, number>> | null): IGeometry;
17821
+ /**
17822
+ * The adjust values that put a handle as near as it can go to a point: what dragging it there
17823
+ * sets. Values the handle does not move are kept as they are.
17824
+ *
17825
+ * @param index The handle's {@link IGeometry.IHandle.index}.
17826
+ * @param x In pixels, in the shape's frame.
17827
+ * @param y In pixels, in the shape's frame.
17828
+ * @returns Values to pass to {@link IShape.setAdjustments} or {@link withAdjustments}.
17829
+ */
17830
+ adjustmentsFromHandle(index: number, x: number, y: number): Record<string, number>;
17831
+ }
17832
+
17833
+ /**
17834
+ * {@inheritDoc IGeometry}
17835
+ * @see
17836
+ * ### **Interface**
17837
+ *
17838
+ * {@link IGeometry}
17839
+ */
17840
+ export namespace IGeometry {
17841
+ /**
17842
+ * Every preset geometry, by the DrawingML name (`prstGeom/@prst`) a shape's
17843
+ * {@link IShape.Properties.geometry} takes and {@link IShape.getShapeType} returns.
17844
+ *
17845
+ * @example
17846
+ * ```ts
17847
+ * await sheet.getMovables().add({ type: 'shape', json: { geometry: IGeometry.Preset.RoundRect }, bounds });
17848
+ * ```
17849
+ */
17850
+ const Preset: Readonly<{
17851
+ readonly AccentBorderCallout1: "accentBorderCallout1";
17852
+ readonly AccentBorderCallout2: "accentBorderCallout2";
17853
+ readonly AccentBorderCallout3: "accentBorderCallout3";
17854
+ readonly AccentCallout1: "accentCallout1";
17855
+ readonly AccentCallout2: "accentCallout2";
17856
+ readonly AccentCallout3: "accentCallout3";
17857
+ readonly ActionButtonBackPrevious: "actionButtonBackPrevious";
17858
+ readonly ActionButtonBeginning: "actionButtonBeginning";
17859
+ readonly ActionButtonBlank: "actionButtonBlank";
17860
+ readonly ActionButtonDocument: "actionButtonDocument";
17861
+ readonly ActionButtonEnd: "actionButtonEnd";
17862
+ readonly ActionButtonForwardNext: "actionButtonForwardNext";
17863
+ readonly ActionButtonHelp: "actionButtonHelp";
17864
+ readonly ActionButtonHome: "actionButtonHome";
17865
+ readonly ActionButtonInformation: "actionButtonInformation";
17866
+ readonly ActionButtonMovie: "actionButtonMovie";
17867
+ readonly ActionButtonReturn: "actionButtonReturn";
17868
+ readonly ActionButtonSound: "actionButtonSound";
17869
+ readonly Arc: "arc";
17870
+ readonly BentArrow: "bentArrow";
17871
+ readonly BentConnector2: "bentConnector2";
17872
+ readonly BentConnector3: "bentConnector3";
17873
+ readonly BentConnector4: "bentConnector4";
17874
+ readonly BentConnector5: "bentConnector5";
17875
+ readonly BentUpArrow: "bentUpArrow";
17876
+ readonly Bevel: "bevel";
17877
+ readonly BlockArc: "blockArc";
17878
+ readonly BorderCallout1: "borderCallout1";
17879
+ readonly BorderCallout2: "borderCallout2";
17880
+ readonly BorderCallout3: "borderCallout3";
17881
+ readonly BracePair: "bracePair";
17882
+ readonly BracketPair: "bracketPair";
17883
+ readonly Callout1: "callout1";
17884
+ readonly Callout2: "callout2";
17885
+ readonly Callout3: "callout3";
17886
+ readonly Can: "can";
17887
+ readonly ChartPlus: "chartPlus";
17888
+ readonly ChartStar: "chartStar";
17889
+ readonly ChartX: "chartX";
17890
+ readonly Chevron: "chevron";
17891
+ readonly Chord: "chord";
17892
+ readonly CircularArrow: "circularArrow";
17893
+ readonly Cloud: "cloud";
17894
+ readonly CloudCallout: "cloudCallout";
17895
+ readonly Corner: "corner";
17896
+ readonly CornerTabs: "cornerTabs";
17897
+ readonly Cube: "cube";
17898
+ readonly CurvedConnector2: "curvedConnector2";
17899
+ readonly CurvedConnector3: "curvedConnector3";
17900
+ readonly CurvedConnector4: "curvedConnector4";
17901
+ readonly CurvedConnector5: "curvedConnector5";
17902
+ readonly CurvedDownArrow: "curvedDownArrow";
17903
+ readonly CurvedLeftArrow: "curvedLeftArrow";
17904
+ readonly CurvedRightArrow: "curvedRightArrow";
17905
+ readonly CurvedUpArrow: "curvedUpArrow";
17906
+ readonly Decagon: "decagon";
17907
+ readonly DiagStripe: "diagStripe";
17908
+ readonly Diamond: "diamond";
17909
+ readonly Dodecagon: "dodecagon";
17910
+ readonly Donut: "donut";
17911
+ readonly DoubleWave: "doubleWave";
17912
+ readonly DownArrow: "downArrow";
17913
+ readonly DownArrowCallout: "downArrowCallout";
17914
+ readonly Ellipse: "ellipse";
17915
+ readonly EllipseRibbon: "ellipseRibbon";
17916
+ readonly EllipseRibbon2: "ellipseRibbon2";
17917
+ readonly FlowChartAlternateProcess: "flowChartAlternateProcess";
17918
+ readonly FlowChartCollate: "flowChartCollate";
17919
+ readonly FlowChartConnector: "flowChartConnector";
17920
+ readonly FlowChartDecision: "flowChartDecision";
17921
+ readonly FlowChartDelay: "flowChartDelay";
17922
+ readonly FlowChartDisplay: "flowChartDisplay";
17923
+ readonly FlowChartDocument: "flowChartDocument";
17924
+ readonly FlowChartExtract: "flowChartExtract";
17925
+ readonly FlowChartInputOutput: "flowChartInputOutput";
17926
+ readonly FlowChartInternalStorage: "flowChartInternalStorage";
17927
+ readonly FlowChartMagneticDisk: "flowChartMagneticDisk";
17928
+ readonly FlowChartMagneticDrum: "flowChartMagneticDrum";
17929
+ readonly FlowChartMagneticTape: "flowChartMagneticTape";
17930
+ readonly FlowChartManualInput: "flowChartManualInput";
17931
+ readonly FlowChartManualOperation: "flowChartManualOperation";
17932
+ readonly FlowChartMerge: "flowChartMerge";
17933
+ readonly FlowChartMultidocument: "flowChartMultidocument";
17934
+ readonly FlowChartOfflineStorage: "flowChartOfflineStorage";
17935
+ readonly FlowChartOffpageConnector: "flowChartOffpageConnector";
17936
+ readonly FlowChartOnlineStorage: "flowChartOnlineStorage";
17937
+ readonly FlowChartOr: "flowChartOr";
17938
+ readonly FlowChartPredefinedProcess: "flowChartPredefinedProcess";
17939
+ readonly FlowChartPreparation: "flowChartPreparation";
17940
+ readonly FlowChartProcess: "flowChartProcess";
17941
+ readonly FlowChartPunchedCard: "flowChartPunchedCard";
17942
+ readonly FlowChartPunchedTape: "flowChartPunchedTape";
17943
+ readonly FlowChartSort: "flowChartSort";
17944
+ readonly FlowChartSummingJunction: "flowChartSummingJunction";
17945
+ readonly FlowChartTerminator: "flowChartTerminator";
17946
+ readonly FoldedCorner: "foldedCorner";
17947
+ readonly Frame: "frame";
17948
+ readonly Funnel: "funnel";
17949
+ readonly Gear6: "gear6";
17950
+ readonly Gear9: "gear9";
17951
+ readonly HalfFrame: "halfFrame";
17952
+ readonly Heart: "heart";
17953
+ readonly Heptagon: "heptagon";
17954
+ readonly Hexagon: "hexagon";
17955
+ readonly HomePlate: "homePlate";
17956
+ readonly HorizontalScroll: "horizontalScroll";
17957
+ readonly IrregularSeal1: "irregularSeal1";
17958
+ readonly IrregularSeal2: "irregularSeal2";
17959
+ readonly LeftArrow: "leftArrow";
17960
+ readonly LeftArrowCallout: "leftArrowCallout";
17961
+ readonly LeftBrace: "leftBrace";
17962
+ readonly LeftBracket: "leftBracket";
17963
+ readonly LeftCircularArrow: "leftCircularArrow";
17964
+ readonly LeftRightArrow: "leftRightArrow";
17965
+ readonly LeftRightArrowCallout: "leftRightArrowCallout";
17966
+ readonly LeftRightCircularArrow: "leftRightCircularArrow";
17967
+ readonly LeftRightRibbon: "leftRightRibbon";
17968
+ readonly LeftRightUpArrow: "leftRightUpArrow";
17969
+ readonly LeftUpArrow: "leftUpArrow";
17970
+ readonly LightningBolt: "lightningBolt";
17971
+ readonly Line: "line";
17972
+ readonly LineInv: "lineInv";
17973
+ readonly MathDivide: "mathDivide";
17974
+ readonly MathEqual: "mathEqual";
17975
+ readonly MathMinus: "mathMinus";
17976
+ readonly MathMultiply: "mathMultiply";
17977
+ readonly MathNotEqual: "mathNotEqual";
17978
+ readonly MathPlus: "mathPlus";
17979
+ readonly Moon: "moon";
17980
+ readonly NoSmoking: "noSmoking";
17981
+ readonly NonIsoscelesTrapezoid: "nonIsoscelesTrapezoid";
17982
+ readonly NotchedRightArrow: "notchedRightArrow";
17983
+ readonly Octagon: "octagon";
17984
+ readonly Parallelogram: "parallelogram";
17985
+ readonly Pentagon: "pentagon";
17986
+ readonly Pie: "pie";
17987
+ readonly PieWedge: "pieWedge";
17988
+ readonly Plaque: "plaque";
17989
+ readonly PlaqueTabs: "plaqueTabs";
17990
+ readonly Plus: "plus";
17991
+ readonly QuadArrow: "quadArrow";
17992
+ readonly QuadArrowCallout: "quadArrowCallout";
17993
+ readonly Rect: "rect";
17994
+ readonly Ribbon: "ribbon";
17995
+ readonly Ribbon2: "ribbon2";
17996
+ readonly RightArrow: "rightArrow";
17997
+ readonly RightArrowCallout: "rightArrowCallout";
17998
+ readonly RightBrace: "rightBrace";
17999
+ readonly RightBracket: "rightBracket";
18000
+ readonly Round1Rect: "round1Rect";
18001
+ readonly Round2DiagRect: "round2DiagRect";
18002
+ readonly Round2SameRect: "round2SameRect";
18003
+ readonly RoundRect: "roundRect";
18004
+ readonly RtTriangle: "rtTriangle";
18005
+ readonly SmileyFace: "smileyFace";
18006
+ readonly Snip1Rect: "snip1Rect";
18007
+ readonly Snip2DiagRect: "snip2DiagRect";
18008
+ readonly Snip2SameRect: "snip2SameRect";
18009
+ readonly SnipRoundRect: "snipRoundRect";
18010
+ readonly SquareTabs: "squareTabs";
18011
+ readonly Star10: "star10";
18012
+ readonly Star12: "star12";
18013
+ readonly Star16: "star16";
18014
+ readonly Star24: "star24";
18015
+ readonly Star32: "star32";
18016
+ readonly Star4: "star4";
18017
+ readonly Star5: "star5";
18018
+ readonly Star6: "star6";
18019
+ readonly Star7: "star7";
18020
+ readonly Star8: "star8";
18021
+ readonly StraightConnector1: "straightConnector1";
18022
+ readonly StripedRightArrow: "stripedRightArrow";
18023
+ readonly Sun: "sun";
18024
+ readonly SwooshArrow: "swooshArrow";
18025
+ readonly Teardrop: "teardrop";
18026
+ readonly Trapezoid: "trapezoid";
18027
+ readonly Triangle: "triangle";
18028
+ readonly UpArrow: "upArrow";
18029
+ readonly UpArrowCallout: "upArrowCallout";
18030
+ readonly UpDownArrow: "upDownArrow";
18031
+ readonly UpDownArrowCallout: "upDownArrowCallout";
18032
+ readonly UturnArrow: "uturnArrow";
18033
+ readonly VerticalScroll: "verticalScroll";
18034
+ readonly Wave: "wave";
18035
+ readonly WedgeEllipseCallout: "wedgeEllipseCallout";
18036
+ readonly WedgeRectCallout: "wedgeRectCallout";
18037
+ readonly WedgeRoundRectCallout: "wedgeRoundRectCallout";
18038
+ }>;
18039
+ type Preset = typeof Preset[keyof typeof Preset];
18040
+ /**
18041
+ * A geometry definition, as DrawingML states one: adjust values, guides, handles, connection
18042
+ * sites, text rectangle and paths. A shape drawn from its own geometry (a file's `custGeom`)
18043
+ * gives one as its {@link IShape.Properties.geometry}; every {@link Preset} is one too.
18044
+ *
18045
+ * @remarks
18046
+ * The definition is DrawingML's own formula language, kept verbatim (`'x1 +- hc dx1 0'`) so it
18047
+ * reads like the markup it came from, and the way a file states a custom shape round-trips
18048
+ * unchanged. SheetXL evaluates it rather than models it: lengths come out in the unit the shape
18049
+ * is evaluated in (pixels), and angles in degrees. Inside the language, angles are 60,000ths of
18050
+ * a degree and ratios are 100,000ths, which is what an adjust value is.
18051
+ */
18052
+ interface Def {
18053
+ /** Adjust values, document order: `'name val N'`. */
18054
+ av?: readonly string[];
18055
+ /** Calculated guides, document order: `'name op a b c'`. A name may be rebound. */
18056
+ gd?: readonly string[];
18057
+ /**
18058
+ * Adjust handles, document order.
18059
+ *
18060
+ * `'xy gdRefX gdRefY posX posY [minX maxX minY maxY]'` or
18061
+ * `'polar gdRefR gdRefAng posX posY [minR maxR minAng maxAng]'`. An absent reference or bound
18062
+ * is `_`; the bounds group is omitted when all four are absent.
18063
+ */
18064
+ ah?: readonly string[];
18065
+ /** Connection sites, `'ang x y'` each. */
18066
+ cxn?: readonly string[];
18067
+ /** Text rectangle `'l t r b'`; absent is the whole frame. */
18068
+ rect?: string;
18069
+ paths: readonly DefPath[];
18070
+ }
18071
+ /** One path of a {@link Def}. */
18072
+ interface DefPath {
18073
+ /** `none` when the path is not filled, else its {@link PathFill | shading}; absent is `norm`. */
18074
+ f?: 'none' | Exclude<PathFill, 'norm'>;
18075
+ /** `0` when the path is not stroked. */
18076
+ s?: 0;
18077
+ /** Path coordinate space width; absent means the shape width. */
18078
+ w?: number;
18079
+ /** Path coordinate space height; absent means the shape height. */
18080
+ h?: number;
18081
+ /**
18082
+ * Mini-path: `M x y | L x y | Q x1 y1 x2 y2 | C x1 y1 x2 y2 x3 y3 | A wR hR stAng swAng | Z`,
18083
+ * space separated; coordinate tokens are guide names or integer literals.
18084
+ */
18085
+ d: string;
18086
+ }
18087
+ /** Edges of a rectangle in the shape's frame, in pixels. */
18088
+ interface Rect {
18089
+ l: number;
18090
+ t: number;
18091
+ r: number;
18092
+ b: number;
18093
+ }
18094
+ /** Which paint a visited path takes. */
18095
+ const PathLayer: {
18096
+ /** The shape's fill, shaded as {@link IPath.fill} says. */
18097
+ readonly Fill: "fill";
18098
+ /** The shape's line. */
18099
+ readonly Stroke: "stroke";
18100
+ /** A marker at either end of the line (an arrowhead): a filled path painted with the line's paint. */
18101
+ readonly Marker: "marker";
18102
+ };
18103
+ type PathLayer = typeof PathLayer[keyof typeof PathLayer];
18104
+ /**
18105
+ * How a fill is shaded: `norm` is the fill as it is; the others are the shaded faces of a cube,
18106
+ * a can or a fold, each the fill through {@link FillTransfer}.
18107
+ */
18108
+ type PathFill = 'norm' | 'darken' | 'darkenLess' | 'lighten' | 'lightenLess';
18109
+ /**
18110
+ * Each shading's transfer, per color channel in sRGB: `c' = slope · c + intercept`, with `c` in
18111
+ * `0..1`. As an SVG filter, `feFuncR`/`G`/`B` of `type="linear"`.
18112
+ */
18113
+ const FillTransfer: Readonly<Record<PathFill, readonly [slope: number, intercept: number]>>;
18114
+ /** One path, as {@link IGeometry.forEachPath} visits it. */
18115
+ interface IPath {
18116
+ /** The visit's position in paint order: unique within one {@link IGeometry.forEachPath}. */
18117
+ readonly index: number;
18118
+ /** SVG path data, in pixels, in the frame of the shape, or of {@link member} when there is one. */
18119
+ readonly d: string;
18120
+ readonly layer: PathLayer;
18121
+ /** The shading of a {@link PathLayer.Fill} path; `norm` on every other layer. */
18122
+ readonly fill: PathFill;
18123
+ /** The group member the path belongs to; absent for a shape that is not a group. */
18124
+ readonly member?: IMember;
18125
+ }
18126
+ /** A group member a path belongs to: what it is, and where the group places it. */
18127
+ interface IMember {
18128
+ /** The member's JSON, for its fill and line (a picture member's fill is its image). */
18129
+ readonly json: IShape.JSON;
18130
+ /** The SVG `transform` that places the member's frame in the group's, rotation and flips included. */
18131
+ readonly transform: string;
18132
+ /** The member's frame, in pixels: what its paths were evaluated at, and what a picture fills. */
18133
+ readonly width: number;
18134
+ readonly height: number;
18135
+ }
18136
+ /** How an adjust handle moves: along x and/or y, or by radius and/or angle about the shape's center. */
18137
+ const HandleType: {
18138
+ readonly XY: "xy";
18139
+ readonly Polar: "polar";
18140
+ };
18141
+ type HandleType = typeof HandleType[keyof typeof HandleType];
18142
+ /**
18143
+ * An adjust handle, as {@link IGeometry.forEachHandle} visits it: where it is, in pixels in the
18144
+ * shape's frame. What it moves and how far is the definition's business;
18145
+ * {@link IGeometry.adjustmentsFromHandle} answers a drag.
18146
+ */
18147
+ interface IHandle {
18148
+ readonly type: HandleType;
18149
+ readonly index: number;
18150
+ readonly x: number;
18151
+ readonly y: number;
18152
+ }
18153
+ /** A point a connector may attach to, as {@link IGeometry.forEachConnection} visits it. */
18154
+ interface IConnection {
18155
+ readonly index: number;
18156
+ readonly x: number;
18157
+ readonly y: number;
18158
+ /** The direction a connector leaves the site, in degrees clockwise from +x. */
18159
+ readonly ang: number;
18160
+ }
18161
+ }
18162
+
17412
18163
  /**
17413
18164
  * Primary interface for retrieving and setting values in a 2D space.
17414
18165
  *
@@ -17686,6 +18437,17 @@ declare global {
17686
18437
  type KeyIterator = IterableIterator<CellCoords, CellCoords, CellCoords>;
17687
18438
  }
17688
18439
 
18440
+ /**
18441
+ * A group box: a frame around other controls. Content type `'groupBox'`.
18442
+ */
18443
+ export interface IGroupBox extends IFormControl, ICaptioned {
18444
+ }
18445
+
18446
+ export namespace IGroupBox {
18447
+ interface JSON extends IFormControl.JSON, ICaptioned.JSON {
18448
+ }
18449
+ }
18450
+
17689
18451
  /**
17690
18452
  * Encapsulates functionalities crucial for maintaining a comprehensive version history
17691
18453
  * and audit trail within the spreadsheet application. It provides mechanisms to capture, store,
@@ -17888,6 +18650,14 @@ declare global {
17888
18650
  screenTip?: string;
17889
18651
  /** {@inheritDoc IHyperlink.getTarget} */
17890
18652
  target?: string;
18653
+ /**
18654
+ * An action the link performs instead of, or beside, following its address, as a file states
18655
+ * it (`hlinkClick/@action`). Office's own (`ppaction://…`) mean nothing in a workbook; kept so
18656
+ * the file reads back as written.
18657
+ */
18658
+ action?: string;
18659
+ /** Whether following the link adds it to the browsing history (`hlinkClick/@history`). */
18660
+ history?: boolean;
17891
18661
  }
17892
18662
  /**
17893
18663
  * A JSON representation useful for persistence.
@@ -17895,6 +18665,17 @@ declare global {
17895
18665
  type JSON = Partial<Omit<IHyperlink.Properties, 'textToDisplay'>> | string;
17896
18666
  }
17897
18667
 
18668
+ /**
18669
+ * A label: text, nothing more. Content type `'label'`.
18670
+ */
18671
+ export interface ILabel extends IFormControl, ICaptioned {
18672
+ }
18673
+
18674
+ export namespace ILabel {
18675
+ interface JSON extends IFormControl.JSON, ICaptioned.JSON {
18676
+ }
18677
+ }
18678
+
17898
18679
  /**
17899
18680
  * The handle a {@link Lazy} parameter receives: an argument's subtree, anchored at the calling
17900
18681
  * cell, that has either not been evaluated yet or has been evaluated already.
@@ -17917,6 +18698,78 @@ declare global {
17917
18698
  getValue(): T;
17918
18699
  }
17919
18700
 
18701
+ /**
18702
+ * A control whose state a cell mirrors: the control writes to the cell when used, and reads it
18703
+ * back when the cell changes.
18704
+ */
18705
+ export interface ILinked {
18706
+ /**
18707
+ * Returns the address of the cell the control writes its state to, or `null` if it has none.
18708
+ *
18709
+ * @remarks
18710
+ * As the file spelled it, which may name a sheet (`Sheet1!$A$1`).
18711
+ */
18712
+ getLinkedCell(): string | null;
18713
+ /**
18714
+ * Sets the cell the control writes its state to.
18715
+ *
18716
+ * @param address The address, or `null` for none.
18717
+ */
18718
+ setLinkedCell(address: string | null, options?: ITransaction.OperationOptions): this;
18719
+ }
18720
+
18721
+ export namespace ILinked {
18722
+ interface JSON {
18723
+ /** The address of the cell the control writes its state to. */
18724
+ linkedCell?: string;
18725
+ }
18726
+ }
18727
+
18728
+ /**
18729
+ * A list box. Content type `'listBox'`.
18730
+ */
18731
+ export interface IListBox extends IListControl {
18732
+ }
18733
+
18734
+ export namespace IListBox {
18735
+ interface JSON extends IListControl.JSON {
18736
+ }
18737
+ }
18738
+
18739
+ /**
18740
+ * What a list box and a drop-down share: items, one of which may be chosen.
18741
+ */
18742
+ export interface IListControl extends IFormControl, ILinked {
18743
+ /**
18744
+ * Returns the items.
18745
+ *
18746
+ * @remarks
18747
+ * Empty when the items come from {@link getListFillRange} rather than being held by the control.
18748
+ */
18749
+ getItems(): readonly string[];
18750
+ /** Sets the items. */
18751
+ setItems(items: readonly string[], options?: ITransaction.OperationOptions): this;
18752
+ /** Returns the address of the range the items come from, or `null` if the control holds them. */
18753
+ getListFillRange(): string | null;
18754
+ /** Sets the range the items come from. */
18755
+ setListFillRange(address: string | null, options?: ITransaction.OperationOptions): this;
18756
+ /** Returns the index of the chosen item, or `null` if none is. */
18757
+ getSelectedIndex(): number | null;
18758
+ /** Sets the chosen item. */
18759
+ setSelectedIndex(index: number | null, options?: ITransaction.OperationOptions): this;
18760
+ }
18761
+
18762
+ export namespace IListControl {
18763
+ interface JSON extends IFormControl.JSON, ILinked.JSON {
18764
+ /** The items held by the control itself. */
18765
+ items?: string[];
18766
+ /** The address of the range the items come from. */
18767
+ listFillRange?: string;
18768
+ /** The index of the chosen item. Absent when none is. */
18769
+ selectedIndex?: number;
18770
+ }
18771
+ }
18772
+
17920
18773
  /**
17921
18774
  * Namespace used for listeners to events.
17922
18775
  */
@@ -18364,10 +19217,11 @@ declare global {
18364
19217
  * | `'chart'` | {@link IChart} |
18365
19218
  * | `'shape'` | {@link IShape} — text boxes, callouts, connectors and groups |
18366
19219
  * | `'slicer'` | {@link ISlicer} |
18367
- * | `'control'` | {@link IControl} — a form control |
19220
+ * | `'checkBox'`, `'button'`, `'scrollBar'`, … | {@link IFormControl} — a form control, one type per kind ({@link IFormControl.Type}) |
18368
19221
  *
18369
- * Anything else is content that is positioned and saved but not modeled; it answers
18370
- * {@link IMovable.IContent} and nothing more.
19222
+ * A host adds kinds of its own through {@link MovableContentRegistry}. Anything else is content
19223
+ * that is positioned and saved but not modeled; it answers {@link IMovable.IContent} and nothing
19224
+ * more.
18371
19225
  *
18372
19226
  * The content owns what identifies it: its name, its description and its id. The movable owns
18373
19227
  * where it is drawn. To remove both, delete the content.
@@ -18402,11 +19256,12 @@ declare global {
18402
19256
  */
18403
19257
  isSelected: () => boolean;
18404
19258
  /**
18405
- * Set the absolution position of a movable in pixels.
19259
+ * Set the position and size of the movable's unrotated frame, in pixels.
18406
19260
  * @param bounds The new bounds.
18407
19261
  *
18408
19262
  * @remarks
18409
- * If only some of the points are provided then only those will be moved.
19263
+ * If only some of the points are provided then only those will be moved. The frame is what
19264
+ * {@link getBounds} returns; the cells the movable is anchored to follow from it and the rotation.
18410
19265
  */
18411
19266
  setBounds(bounds: Partial<Bounds>, options?: ITransaction.OperationOptions): IMovable;
18412
19267
  /**
@@ -18419,7 +19274,13 @@ declare global {
18419
19274
  */
18420
19275
  scrollIntoView: (options?: globalThis.ScrollIntoViewOptions | boolean) => Promise<boolean>;
18421
19276
  /**
18422
- * Returns the absolute bounds of the movable object in pixels or `null` if not yet laid out.
19277
+ * Returns the movable's unrotated frame in pixels, or `null` if not yet laid out.
19278
+ *
19279
+ * @remarks
19280
+ * The frame is the box the movable is drawn in before it is turned by {@link getRotation}, about
19281
+ * its center. A rotated movable is anchored to the cells of the box it occupies as rotated,
19282
+ * which Excel takes to be the frame with its width and height swapped when the rotation is within
19283
+ * 45° of 90° or 270°, and the frame itself otherwise.
18423
19284
  */
18424
19285
  getBounds(): Bounds | null;
18425
19286
  /**
@@ -18432,12 +19293,16 @@ declare global {
18432
19293
  */
18433
19294
  isHidden(): boolean;
18434
19295
  /**
18435
- * Set the rotation in degrees.
19296
+ * Set the rotation in degrees, clockwise about the frame's center.
19297
+ *
19298
+ * @remarks
19299
+ * The frame keeps its position and size; the cells the movable is anchored to are those of the
19300
+ * box it then occupies (see {@link getBounds}).
18436
19301
  */
18437
19302
  setRotation(rotation: number): IMovable;
18438
19303
  /**
18439
19304
  * @see
18440
- * {@link setHidden}
19305
+ * {@link setRotation}
18441
19306
  */
18442
19307
  getRotation(): number;
18443
19308
  /**
@@ -18503,6 +19368,23 @@ declare global {
18503
19368
  * {@link IMovable}
18504
19369
  */
18505
19370
  export namespace IMovable {
19371
+ /**
19372
+ * A content's formulas as the calculation engine holds them: references that follow the cells
19373
+ * they name through inserts, deletes, moves and sheet renames.
19374
+ *
19375
+ * @remarks
19376
+ * Handed out by the sheet when content is created
19377
+ * ({@link MovableContentRegistry.CreateOptions.holdFormulas}); a chart holds its series this way.
19378
+ */
19379
+ interface HeldFormulas {
19380
+ /**
19381
+ * The formula at `index` as it reads now, or `null` while it reads as it was handed over:
19382
+ * the engine does not hold it, or nothing has moved what it names.
19383
+ */
19384
+ getText(index: number): string | null;
19385
+ /** Takes the formulas out of the engine, as part of the current operation. */
19386
+ release(): void;
19387
+ }
18506
19388
  /**
18507
19389
  * What a movable draws: a chart, a picture, a shape, a slicer, a control.
18508
19390
  *
@@ -18786,6 +19668,18 @@ declare global {
18786
19668
  * @defaultValue false
18787
19669
  */
18788
19670
  fullyContained?: boolean;
19671
+ /**
19672
+ * Match {@link address} against what each movable paints rather than the cells it is anchored
19673
+ * to: its rotation, a drawing that reaches outside its frame (a callout's tail) and its line.
19674
+ * Use it to find the movables visible in a range.
19675
+ *
19676
+ * @remarks
19677
+ * A shape's drawing is known once its geometry has been evaluated, which the search starts;
19678
+ * until then it is matched by its frame, and the collection notifies a change when the answer
19679
+ * is ready. Ignored with {@link fullyContained}.
19680
+ * @defaultValue false
19681
+ */
19682
+ drawn?: boolean;
18789
19683
  }
18790
19684
  /**
18791
19685
  * Options for adding a movable to the collection.
@@ -18812,9 +19706,15 @@ declare global {
18812
19706
  */
18813
19707
  fromResourceId?: (resourceId: number) => IResource;
18814
19708
  /**
18815
- * The boundary for the movable object in pixels.
19709
+ * The movable's unrotated frame in pixels (see {@link IMovable.getBounds}).
18816
19710
  */
18817
19711
  bounds?: Partial<Bounds>;
19712
+ /**
19713
+ * The rotation in degrees, clockwise about the frame's center.
19714
+ *
19715
+ * @defaultValue 0
19716
+ */
19717
+ rotation?: number;
18818
19718
  /**
18819
19719
  * Placement hint used only when {@link bounds} is omitted. `'viewport'` centers the (default-sized)
18820
19720
  * movable in the visible viewport via {@link ISheet.IListeners.onRequestViewport}, falling back to the
@@ -19730,6 +20630,214 @@ declare global {
19730
20630
  constructor(message?: string, options?: ErrorOptions);
19731
20631
  }
19732
20632
 
20633
+ /**
20634
+ * An option button: one of a group, of which one is chosen. Content type `'optionButton'`.
20635
+ */
20636
+ export interface IOptionButton extends IFormControl, ICaptioned, ILinked {
20637
+ /**
20638
+ * Returns `true` if this is the chosen button of its group.
20639
+ */
20640
+ isChecked(): boolean;
20641
+ /**
20642
+ * Sets whether this is the chosen button of its group.
20643
+ */
20644
+ setChecked(checked: boolean, options?: ITransaction.OperationOptions): this;
20645
+ }
20646
+
20647
+ export namespace IOptionButton {
20648
+ interface JSON extends IFormControl.JSON, ICaptioned.JSON, ILinked.JSON {
20649
+ /**
20650
+ * `true` if this is the chosen button of its group.
20651
+ * @defaultValue false
20652
+ */
20653
+ checked?: boolean;
20654
+ }
20655
+ }
20656
+
20657
+ /**
20658
+ * The row and column groups on a sheet, and how they are laid out.
20659
+ *
20660
+ * @remarks
20661
+ * There is no group object to create or delete. Every row and column carries an outline level,
20662
+ * `0` to `7` ({@link ICellHeader.getOutlineLevel}), and a group at level *n* is a run of
20663
+ * consecutive rows (or columns) whose level is *n* or more. Its summary row is the one just past
20664
+ * the run, on the side {@link getSummaryDirection} names. Collapsing a group hides its detail rows.
20665
+ *
20666
+ * Groups are made and removed with {@link ICellRange.group} and {@link ICellRange.ungroup}, or
20667
+ * from the sheet's formulas with {@link autoOutline}, and collapsed and expanded with
20668
+ * {@link ICellRange.hideGroupDetails} and {@link ICellRange.showGroupDetails}. Whether the symbols are drawn
20669
+ * is the view's: {@link ISheetView.setShowOutlineSymbols}.
20670
+ *
20671
+ * The counterpart of Excel's `Worksheet.Outline`.
20672
+ */
20673
+ export interface IOutline extends IListener.ISource<IOutline, IOutline.Events> {
20674
+ /**
20675
+ * Where a group's summary sits: `down` or `up` for rows, `right` or `left` for columns.
20676
+ *
20677
+ * @defaultValue `down` for rows, `right` for columns.
20678
+ */
20679
+ getSummaryDirection(axis: IRange.Axis): IRange.Direction;
20680
+ /**
20681
+ * Sets where a group's summary sits.
20682
+ *
20683
+ * @throws `Error` If the direction does not belong to the axis (`left` for rows).
20684
+ */
20685
+ setSummaryDirection(axis: IRange.Axis, direction: IRange.Direction, options?: ITransaction.OperationOptions): this;
20686
+ /**
20687
+ * Whether the automatic outline styles are applied to summary rows and columns.
20688
+ *
20689
+ * @defaultValue false
20690
+ */
20691
+ isAutomaticStyles(): boolean;
20692
+ /**
20693
+ * Sets whether the automatic outline styles are applied.
20694
+ */
20695
+ setAutomaticStyles(automatic: boolean, options?: ITransaction.OperationOptions): this;
20696
+ /**
20697
+ * The deepest outline level in use on the axis; `0` when nothing is grouped.
20698
+ */
20699
+ getLevelCount(axis: IRange.Axis): number;
20700
+ /**
20701
+ * The groups on an axis, outermost level first and in order within a level.
20702
+ *
20703
+ * @param axis The axis.
20704
+ * @param options Limits the groups returned.
20705
+ */
20706
+ getGroups(axis: IRange.Axis, options?: IOutline.GetGroupsOptions): readonly IOutline.Group[];
20707
+ /**
20708
+ * Expands the groups up to a level and collapses everything deeper, as the level buttons do.
20709
+ *
20710
+ * @param axis The axis.
20711
+ * @param levels How many levels stay visible, from `1` (only the outermost summaries); more levels
20712
+ * than exist shows every row or column.
20713
+ *
20714
+ * @remarks
20715
+ * The counterpart of Excel's `Outline.ShowLevels` and Office Scripts' `showOutlineLevels`, one
20716
+ * axis at a time.
20717
+ */
20718
+ setVisibleLevels(axis: IRange.Axis, levels: number, options?: ITransaction.OperationOptions): this;
20719
+ /**
20720
+ * Removes every outline level from the sheet. Hidden rows and columns stay hidden.
20721
+ *
20722
+ * @param axes Which levels to remove. Default `IRange.AxisSelection.Both`.
20723
+ * @returns The current `IOutline`.
20724
+ * @throws `Error` If the sheet is protected.
20725
+ *
20726
+ * @remarks
20727
+ * The whole-sheet form of {@link ICellRange.clearGroups}, which is what Excel's Clear Outline
20728
+ * does with one cell selected.
20729
+ */
20730
+ clear(axes?: IRange.AxisSelection, options?: ITransaction.OperationOptions): this;
20731
+ /**
20732
+ * Outlines the sheet from its formulas: a cell whose formula totals the cells on one side of it
20733
+ * in its own column makes its row a summary row and those rows a group, and the same for
20734
+ * columns.
20735
+ *
20736
+ * @returns The current `IOutline`.
20737
+ * @throws `Error` If no summary rows or columns are found, or the sheet is protected.
20738
+ *
20739
+ * @remarks
20740
+ * The counterpart of Excel's `Range.AutoOutline`, which outlines the whole sheet whatever the
20741
+ * range. Any outline the sheet already has is removed first, and the summary direction of each
20742
+ * axis is set to where its first summary sits: below and right, or above and left.
20743
+ */
20744
+ autoOutline(options?: ITransaction.OperationOptions): this;
20745
+ /**
20746
+ * The settings that differ from their defaults, or `null` when none do.
20747
+ *
20748
+ * @remarks
20749
+ * The levels themselves are saved with the rows and columns, not here.
20750
+ */
20751
+ toJSON(): IOutline.JSON | null;
20752
+ /**
20753
+ * For runtime type checking.
20754
+ */
20755
+ readonly isIOutline: true;
20756
+ }
20757
+
20758
+ /**
20759
+ * {@inheritDoc IOutline}
20760
+ * @see
20761
+ * ### **Interface**
20762
+ *
20763
+ * {@link IOutline}
20764
+ */
20765
+ export namespace IOutline {
20766
+ /**
20767
+ * A group of rows or columns.
20768
+ */
20769
+ interface Group {
20770
+ /**
20771
+ * The level, from `1`; level 1 is the outermost.
20772
+ */
20773
+ level: number;
20774
+ /**
20775
+ * The first detail row or column.
20776
+ */
20777
+ start: number;
20778
+ /**
20779
+ * The last detail row or column, inclusive.
20780
+ */
20781
+ end: number;
20782
+ /**
20783
+ * The summary row or column, or `null` when the group runs to the edge of the sheet on the
20784
+ * summary side.
20785
+ */
20786
+ summary: number | null;
20787
+ /**
20788
+ * Whether the details are collapsed: every one of them is hidden, whoever hid them.
20789
+ *
20790
+ * @remarks
20791
+ * Read from the hidden details, as Excel reads it. A group whose summary is itself hidden,
20792
+ * inside a collapsed outer group, reads collapsed only when it was collapsed before the outer
20793
+ * one; expanding the outer group leaves such a group collapsed and opens the rest.
20794
+ */
20795
+ collapsed: boolean;
20796
+ }
20797
+ /**
20798
+ * Options for {@link IOutline.getGroups}.
20799
+ */
20800
+ interface GetGroupsOptions {
20801
+ /**
20802
+ * Only this level. Omitted returns every level.
20803
+ */
20804
+ level?: number;
20805
+ /**
20806
+ * Only groups that meet the span from here (a viewport). Includes the summary.
20807
+ */
20808
+ from?: number;
20809
+ /**
20810
+ * Only groups that meet the span to here, inclusive.
20811
+ */
20812
+ to?: number;
20813
+ }
20814
+ /**
20815
+ * The outline settings that differ from their defaults.
20816
+ */
20817
+ interface JSON {
20818
+ /**
20819
+ * Present, as `up`, when a group's summary row sits above its details.
20820
+ */
20821
+ summaryRow?: 'up';
20822
+ /**
20823
+ * Present, as `left`, when a group's summary column sits left of its details.
20824
+ */
20825
+ summaryColumn?: 'left';
20826
+ /**
20827
+ * Present, as `true`, when the automatic outline styles are applied.
20828
+ */
20829
+ automaticStyles?: true;
20830
+ }
20831
+ interface Events {
20832
+ /**
20833
+ * Called when the outline changes: its settings, a level, or which details are shown.
20834
+ */
20835
+ onOutlineChange?(source: IOutline): void;
20836
+ }
20837
+ interface IListeners extends IListener.Callbacks<IOutline, IOutline.Events> {
20838
+ }
20839
+ }
20840
+
19733
20841
  /**
19734
20842
  * A person known to the workbook: the author of a comment, or someone mentioned in one.
19735
20843
  *
@@ -22107,6 +23215,41 @@ declare global {
22107
23215
  type JSONReference<J = any> = JSONReferenceEntry<J> | JSONReferenceTuple<J>;
22108
23216
  }
22109
23217
 
23218
+ /**
23219
+ * What a scroll bar and a spinner share: a number between two bounds.
23220
+ */
23221
+ export interface IRangedControl extends IFormControl, ILinked {
23222
+ /** Returns the current value, or `null` if the control has not said. */
23223
+ getValue(): number | null;
23224
+ /** Sets the current value. */
23225
+ setValue(value: number | null, options?: ITransaction.OperationOptions): this;
23226
+ /** Returns the smallest value, or `null` if the control has not said. */
23227
+ getMin(): number | null;
23228
+ /** Sets the smallest value. */
23229
+ setMin(min: number | null, options?: ITransaction.OperationOptions): this;
23230
+ /** Returns the largest value, or `null` if the control has not said. */
23231
+ getMax(): number | null;
23232
+ /** Sets the largest value. */
23233
+ setMax(max: number | null, options?: ITransaction.OperationOptions): this;
23234
+ /** Returns how far one arrow click moves the value, or `null` if the control has not said. */
23235
+ getIncrement(): number | null;
23236
+ /** Sets how far one arrow click moves the value. */
23237
+ setIncrement(increment: number | null, options?: ITransaction.OperationOptions): this;
23238
+ }
23239
+
23240
+ export namespace IRangedControl {
23241
+ interface JSON extends IFormControl.JSON, ILinked.JSON {
23242
+ /** The current value. */
23243
+ value?: number;
23244
+ /** The smallest value. */
23245
+ min?: number;
23246
+ /** The largest value. */
23247
+ max?: number;
23248
+ /** How far one arrow click moves the value. */
23249
+ increment?: number;
23250
+ }
23251
+ }
23252
+
22110
23253
  /**
22111
23254
  * Interface representing a range selection within a sheet.
22112
23255
  */
@@ -23637,6 +24780,30 @@ declare global {
23637
24780
  }
23638
24781
  }
23639
24782
 
24783
+ /**
24784
+ * A scroll bar: a thumb in a trough. Content type `'scrollBar'`.
24785
+ */
24786
+ export interface IScrollBar extends IRangedControl {
24787
+ /** Returns how far a click in the trough moves the value, or `null` if the control has not said. */
24788
+ getPageIncrement(): number | null;
24789
+ /** Sets how far a click in the trough moves the value. */
24790
+ setPageIncrement(increment: number | null, options?: ITransaction.OperationOptions): this;
24791
+ /** Returns `true` if the bar lies on its side. */
24792
+ isHorizontal(): boolean;
24793
+ }
24794
+
24795
+ export namespace IScrollBar {
24796
+ interface JSON extends IRangedControl.JSON {
24797
+ /** How far a click in the trough moves the value. */
24798
+ pageIncrement?: number;
24799
+ /**
24800
+ * `true` if the bar lies on its side.
24801
+ * @defaultValue false
24802
+ */
24803
+ horizontal?: boolean;
24804
+ }
24805
+ }
24806
+
23640
24807
  /**
23641
24808
  * A drawn shape: a text box, a callout, a rectangle, a connector, or a group of them.
23642
24809
  *
@@ -23645,8 +24812,8 @@ declare global {
23645
24812
  * whose content type is `'shape'`. The movable carries the position; the shape carries what is
23646
24813
  * drawn there and what is written on it.
23647
24814
  *
23648
- * Reading only: a shape's preset and its text. An imported shape is otherwise kept as the source
23649
- * wrote it and saved back unchanged.
24815
+ * Reading, and adjust values: a shape is JSON ({@link IShape.JSON}) that a file reads into and
24816
+ * writes from; the editing API beyond `setAdjustments` is still to come.
23650
24817
  */
23651
24818
  export interface IShape extends IModel, IMovable.IContent {
23652
24819
  toJSON(toResourceId?: (resource: IResource) => number | null): IShape.JSON | null;
@@ -23654,6 +24821,12 @@ declare global {
23654
24821
  * Returns the name of the shape.
23655
24822
  */
23656
24823
  getName(): string | null;
24824
+ /**
24825
+ * The image a resource id in this shape's JSON names: an image fill's `resId`, a picture
24826
+ * member's among them, as {@link toJSON} with no scope names them. `null` when the shape holds
24827
+ * no such resource.
24828
+ */
24829
+ getResource(resourceId: number): IResource | null;
23657
24830
  /**
23658
24831
  * Deletes the shape, and with it the movable that places it.
23659
24832
  */
@@ -23662,8 +24835,9 @@ declare global {
23662
24835
  * Returns the kind of shape this is: its preset geometry.
23663
24836
  *
23664
24837
  * @remarks
23665
- * A DrawingML preset id — `rect`, `borderCallout2`, `curvedConnector3` — or `'custom'` for a
23666
- * shape drawn from its own path, or `'group'` for a group of shapes.
24838
+ * A DrawingML preset id ({@link IGeometry.Preset}) — `rect`, `borderCallout2`, `curvedConnector3` —
24839
+ * or `'custom'` for a shape drawn from its own path, or `'group'` for a group of shapes. A file
24840
+ * may name a preset this SDK does not know; it is returned as the file states it.
23667
24841
  *
23668
24842
  * The preset says what a shape is for where its name does not: a callout annotates something,
23669
24843
  * a connector links two shapes, and a rectangle with no text is usually a box drawn around the
@@ -23689,6 +24863,48 @@ declare global {
23689
24863
  * ```
23690
24864
  */
23691
24865
  getTextFrame(): ITextFrame.IText | null;
24866
+ /**
24867
+ * Returns the adjust values set on this shape, by name.
24868
+ *
24869
+ * @remarks
24870
+ * A preset's handles move its adjust values — how rounded a `roundRect` is, where a callout
24871
+ * points. Only values that differ from the preset's defaults are stored.
24872
+ *
24873
+ * The values are the geometry definition's own numbers (a ratio in 100,000ths, an angle in
24874
+ * 60,000ths of a degree), opaque to a caller: a handle drag produces them through
24875
+ * {@link IGeometry.adjustmentsFromHandle}, and a file reads and writes them as they are.
24876
+ */
24877
+ getAdjustments(): Readonly<Record<string, number>>;
24878
+ /**
24879
+ * Sets the adjust values, replacing any already set.
24880
+ *
24881
+ * @param adjustments Values by name, as {@link IGeometry.adjustmentsFromHandle} returns them;
24882
+ * `null` restores the preset's defaults. Names the preset does not declare are kept but have no
24883
+ * effect.
24884
+ */
24885
+ setAdjustments(adjustments: Record<string, number> | null, options?: ITransaction.OperationOptions): this;
24886
+ /**
24887
+ * Evaluates the shape's geometry at a size.
24888
+ *
24889
+ * @remarks
24890
+ * What evaluates a shape loads on first use, and only what that shape needs, so this is
24891
+ * asynchronous; a workbook with no shapes loads none of it. Everything on the geometry it
24892
+ * returns is synchronous, including evaluating it again at another size or with other adjust
24893
+ * values. Paths, handles and sites are in sheet pixels, in the shape's own frame (its top-left
24894
+ * is 0,0), which is how the movable layer draws them.
24895
+ *
24896
+ * An open path takes the line ends the shape's line declares (its own over its theme style's):
24897
+ * its stroke is trimmed under them, and they are visited as {@link IGeometry.PathLayer.Marker}
24898
+ * paths. A group's geometry is its members', each placed in the group's frame.
24899
+ *
24900
+ * @param width Width in pixels. @defaultValue the movable's bounds.
24901
+ * @param height Height in pixels. @defaultValue the movable's bounds.
24902
+ * @returns `null` for a shape whose preset is unknown, or a shape with no size. A custom
24903
+ * geometry evaluates like a preset, from its own definition.
24904
+ */
24905
+ getGeometry(width?: number, height?: number): Promise<IGeometry | null>;
24906
+ /** For runtime type checking. */
24907
+ readonly isIShape: true;
23692
24908
  }
23693
24909
 
23694
24910
  /**
@@ -23699,6 +24915,25 @@ declare global {
23699
24915
  * {@link IShape}
23700
24916
  */
23701
24917
  export namespace IShape {
24918
+ /**
24919
+ * What kind of drawing a shape's JSON describes.
24920
+ *
24921
+ * @remarks
24922
+ * Every kind is an `IShape` whose {@link IMovable.IContent.getType | content type} is `'shape'`;
24923
+ * this is the one place the distinction survives a round trip. A JSON that states none is a
24924
+ * {@link IShape.Type.Shape | shape}.
24925
+ */
24926
+ const Type: {
24927
+ /** A shape drawn from a preset or custom geometry, with or without text. */
24928
+ readonly Shape: "shape";
24929
+ /** A connector: a line that may be glued to other shapes' connection sites. */
24930
+ readonly Connector: "connector";
24931
+ /** A group of shapes, placed together; its members are its {@link JSON.children}. */
24932
+ readonly Group: "group";
24933
+ /** A picture inside a group; see {@link PictureMemberJSON}. */
24934
+ readonly Picture: "picture";
24935
+ };
24936
+ type Type = typeof Type[keyof typeof Type];
23702
24937
  /**
23703
24938
  * A set of values that can be set on a IShape.
23704
24939
  *
@@ -23707,15 +24942,20 @@ declare global {
23707
24942
  */
23708
24943
  interface Properties {
23709
24944
  /**
23710
- * The unique name of the table
24945
+ * The name of the shape.
23711
24946
  */
23712
24947
  name?: string;
23713
24948
  /**
23714
- * The preset Geometry for the shape. This could also be custom.
24949
+ * The geometry: a DrawingML preset name (`'rect'`, `'roundRect'`, `'wedgeEllipseCallout'`…)
24950
+ * or a custom definition in the same form as a preset.
23715
24951
  *
23716
24952
  * @defaultValue 'rect'
23717
24953
  */
23718
- geometry?: PresetGeometry | GeometryProperties;
24954
+ geometry?: string | IGeometry.Def;
24955
+ /**
24956
+ * Adjust values that differ from the preset's defaults, by name (`adj`, `adj1`…).
24957
+ */
24958
+ adjustments?: Record<string, number>;
23719
24959
  /**
23720
24960
  * The fill.
23721
24961
  */
@@ -23727,224 +24967,124 @@ declare global {
23727
24967
  /**
23728
24968
  * A hyperlink for the entire shape.
23729
24969
  */
23730
- hyperlink?: string | IHyperlink.JSON;
24970
+ hyperlink?: IHyperlink.JSON;
23731
24971
  }
23732
24972
  /**
23733
24973
  * A JSON representation useful for persistence.
23734
24974
  */
23735
- interface JSON extends Omit<Properties, 'fill' | 'stroke' | 'geometry'> {
23736
- fill?: IFill.SolidJSON | IFill.GradientJSON | IFill.PatternJSON | IFill.NoneJSON;
23737
- stroke?: IStroke.JSON;
23738
- geometry?: string | GeometryJSON;
23739
- /** Which drawing element this was read from ("sp" | "cxnSp" | "grpSp") — `getType()` always
23740
- * reports "shape" regardless, so this is the only place the distinction survives a round trip. */
23741
- type?: string;
23742
- /** Opaque source XML fragment, captured verbatim from the source file and replayed as-is on
23743
- * save, for whatever this shape doesn't (yet) model structurally. */
23744
- xml?: string;
23745
- /** The `mc:Fallback` rendition of `xml`, captured verbatim, when the source offered the shape as an
23746
- * `mc:AlternateContent`. An equation's fallback is where its linear text form is. */
23747
- fallbackXml?: string;
23748
- /** Original `cNvPr` id from the captured source fragment, if any; used to avoid id collisions
23749
- * with freshly-generated ids on write. */
23750
- sourceId?: number;
23751
- }
23752
- interface GeometryProperties {
23753
- geometry?: PresetGeometry;
23754
- ah: (PolarAdjustmentHandle | XYAdjustmentHandle)[];
23755
- av?: IShape.AdjustmentGuide[];
23756
- connections?: IShape.ConnectionSite[];
23757
- guides?: IShape.AdjustmentGuide[];
23758
- paths?: IShape.Path[] | string[] | string;
24975
+ interface JSON extends Omit<Properties, 'fill' | 'stroke' | 'geometry' | 'hyperlink'> {
23759
24976
  /**
23760
- * Specifies the rectangular bounding box for text within the shape.
23761
- * @defaultValue `null` - The bounds of the shape,
23762
- */
23763
- textBounds?: Rectangle;
23764
- }
23765
- interface Path {
23766
- paths: string[];
23767
- /**
23768
- * Specifies that the use of 3D extrusions are possible on this path. This allows the generating application to know whether
23769
- * 3D extrusion can be applied in any form.
23770
- *
23771
- * @defaultValue `false`
24977
+ * What kind of drawing this is. Absent for a {@link Type.Shape | shape}; a connector, a group
24978
+ * and a group's picture member state theirs.
23772
24979
  */
23773
- extrusionOk?: boolean;
24980
+ type?: Type;
24981
+ fill?: IFill.SolidJSON | IFill.GradientJSON | IFill.PatternJSON | IFill.ImageJSON | IFill.NoneJSON;
24982
+ stroke?: IStroke.JSON;
23774
24983
  /**
23775
- * Specifies how the corresponding path should be filled.
23776
- *
23777
- * @defaultValue `PathFill.Normal`
23778
- */
23779
- pathFill?: PathFill;
24984
+ * The shape's effects (`spPr/effectLst`). An empty list is an explicit none: the element
24985
+ * present and empty, which turns off the effects the shape's theme style would give it.
24986
+ */
24987
+ effects?: IEffect.JSON[];
24988
+ /** The 3-D scene (`spPr/scene3d`) as the file states it: an opaque DrawingML fragment. */
24989
+ scene3d?: string;
24990
+ /** The 3-D shape properties (`spPr/sp3d`) as the file states it: an opaque DrawingML fragment. */
24991
+ shape3d?: string;
24992
+ /** Extension lists kept as the file states them, by the element each extends. */
24993
+ extLst?: ExtLstJSON;
24994
+ geometry?: string | IGeometry.Def;
24995
+ /** The hyperlink on the whole shape (`cNvPr/hlinkClick`). */
24996
+ hyperlink?: IHyperlink.JSON;
24997
+ /** The hyperlink followed on hover (`cNvPr/hlinkHover`). */
24998
+ hoverHyperlink?: IHyperlink.JSON;
24999
+ /** The title (`cNvPr/@title`), beside the description. */
25000
+ title?: string;
25001
+ /** The macro bound to the shape (`sp/@macro`), as the file states it. */
25002
+ macro?: string;
25003
+ /** The cell a text box's text is linked to (`sp/@textlink`), as the file states it. */
25004
+ textLink?: string;
25005
+ /** The text cannot be edited while the sheet is protected (`sp/@fLocksText`). */
25006
+ locksText?: boolean;
25007
+ /** `sp/@fPublished`. */
25008
+ published?: boolean;
25009
+ /** The shape was inserted as a text box (`cNvSpPr/@txBox`). */
25010
+ textBox?: boolean;
25011
+ /**
25012
+ * Edit locks (`spLocks`/`cxnSpLocks`) by the file's own names: `noGrp`, `noSelect`, `noRot`,
25013
+ * `noChangeAspect`, `noMove`, `noResize`, `noEditPoints`, `noAdjustHandles`,
25014
+ * `noChangeArrowheads`, `noChangeShapeType`, `noTextEdit`.
25015
+ */
25016
+ locks?: Record<string, boolean>;
25017
+ /** A connector's glued ends. */
25018
+ connectorEnds?: {
25019
+ start?: ConnectorEndJSON;
25020
+ end?: ConnectorEndJSON;
25021
+ };
25022
+ /** The text written on the shape, by paragraph. Absent for a shape with no text body. */
25023
+ text?: ITextFrame.JSON;
23780
25024
  /**
23781
- * Specifies the height, or maximum y coordinate that should be used for within the path coordinate system. This value determines
23782
- * the vertical placement of all points within the corresponding path as they will all be calculated using this height attribute
23783
- * as the max y coordinate.
23784
- *
23785
- * @defaultValue `null`
25025
+ * A group's members in z-order. A member is read like any shape but is not captured on its
25026
+ * own: the group's markup holds it. A member's `bounds` are in the group's child space. A
25027
+ * picture among them is a {@link PictureMemberJSON}.
23786
25028
  */
23787
- h?: number;
25029
+ children?: (JSON | PictureMemberJSON)[];
25030
+ /** Where the shape sits as the file states it (`xfrm`), in pixels. For a group member, in the group's child space. */
25031
+ bounds?: Bounds;
25032
+ /** A group's child space (`chOff`/`chExt`), in pixels: what its members' `bounds` are stated in. */
25033
+ childBounds?: Bounds;
25034
+ /** Rotation in degrees as the file states it on the shape's own `xfrm`. */
25035
+ rotation?: number;
25036
+ /** Mirrored left to right (`xfrm/@flipH`), as the file states it. */
25037
+ flipH?: boolean;
25038
+ /** Mirrored top to bottom (`xfrm/@flipV`), as the file states it. */
25039
+ flipV?: boolean;
23788
25040
  /**
23789
- * Specifies if the corresponding path should have a path stroke shown. This is a boolean value that will effect on the outline of the path.
23790
- *
23791
- * @defaultValue `true`
25041
+ * The theme style the shape draws with wherever it states no fill, stroke or text color of its
25042
+ * own: the file's `style` element, which refers into the theme's format scheme by position.
25043
+ * A reference not stated is Excel's for a new shape (a connector's differ: the first line, no
25044
+ * fill); `null`, the shape has no style and draws only what it states itself.
23792
25045
  */
23793
- stroke?: boolean;
25046
+ style?: ITheme.StyleRefsJSON | null;
23794
25047
  /**
23795
- * Specifies the width, or maximum x coordinate that should be used for within the path coordinate system. This value determines
23796
- * the horizontal placement of all points within the corresponding path as they will all be calculated using this width attribute
23797
- * as the max x coordinate.
23798
- *
23799
- * @defaultValue `null`
25048
+ * The id the file gave the shape (`cNvPr/@id`), which is what a connector's
25049
+ * {@link connectorEnds} name their targets by. A file writes the shape with this id again
25050
+ * (made unique when two shapes share one, as a copy does); a shape without one takes the next.
23800
25051
  */
23801
- w?: number;
25052
+ sourceId?: number;
23802
25053
  }
23803
25054
  /**
23804
- * Specifies the manner in which a path should be filled. The lightening and darkening of a path allow for certain parts of the shape
23805
- * to be colored lighter of darker depending on user preference.
23806
- */
23807
- const PathFill: {
23808
- readonly Darken: "darken";
23809
- readonly DarkenLess: "darkenLess";
23810
- readonly Lighten: "lighten";
23811
- readonly LightenLess: "lightenLess";
23812
- readonly None: "none";
23813
- readonly Normal: "normal";
23814
- };
23815
- type PathFill = typeof PathFill[keyof typeof PathFill];
23816
- /**
23817
- * Specifies the presence of a shape guide that will be used to govern the geometry of the specified shape.
25055
+ * The `extLst` fragments of a shape's elements: opaque DrawingML kept as the file states it and
25056
+ * written back as it was, the one markup that stays once the shape is otherwise JSON. A line's
25057
+ * is on its stroke, a text body's on its body.
23818
25058
  */
23819
- interface AdjustmentGuide {
23820
- /**
23821
- * Specifies the name that will be used to reference to this guide. This name may be used just as a variable
23822
- * would within an equation. That is this name may be substituted for literal values within other guides or
23823
- * the specification of the shape path.
23824
- */
23825
- name: string;
23826
- /**
23827
- * Specifies the formula that will be used to calculate the value for a guide. Each formula has a certain
23828
- * number of arguments and a specific set of operations to perform on these arguments in order to generate a
23829
- * value for a guide. There are a total of 17 different formulas available. These are shown below with the usage
23830
- * for each defined
23831
- */
23832
- fmla: string;
25059
+ interface ExtLstJSON {
25060
+ /** `cNvPr/extLst`: the creation id and whatever else extends the non-visual properties. */
25061
+ nonVisual?: string;
25062
+ /** `spPr/extLst`. */
25063
+ properties?: string;
23833
25064
  }
23834
25065
  /**
23835
- * These adjust handles will specify points within the geometric shape that can be used to perform certain
23836
- * transform operations on the shape.
25066
+ * A picture inside a group (`pic`): a member like any other, placed by its `bounds` in the
25067
+ * group's child space. Its geometry is a rectangle and its image is its fill.
25068
+ *
25069
+ * @remarks
25070
+ * The fill's `resId` names the image the way {@link IPicture.JSON.resId} names a placed
25071
+ * picture's, and like it is meaningful only inside the persist scope the JSON was made in: a
25072
+ * shape resolves it to the resource when it is created and names the resource again when it
25073
+ * is serialized.
23837
25074
  */
23838
- interface AdjustmentHandle {
23839
- /**
23840
- * The point of the adjustment
23841
- */
23842
- pos: Point;
23843
- }
23844
- interface PolarAdjustmentHandle extends AdjustmentHandle {
23845
- type: 'polar';
23846
- /**
23847
- * Specifies the name of the guide that will be updated with the adjustment angle from this adjust handle.
23848
- */
23849
- gdRefAng: string;
23850
- /**
23851
- * Specifies the name of the guide that will be updated with the adjustment radius from this adjust handle.
23852
- */
23853
- gdRefR: string;
23854
- /**
23855
- * Specifies the maximum angle position that is allowed for this adjustment handle. If this attribute is omitted,
23856
- * then it will be assumed that this adjust handle cannot move angularly.
23857
- */
23858
- maxAng: number;
23859
- /**
23860
- * Specifies the maximum radial position that is allowed for this adjustment handle. If this attribute is omitted,
23861
- * then it will be assumed that this adjust handle cannot move radially.
23862
- */
23863
- maxR: number;
23864
- /**
23865
- * Specifies the minimum angle position that is allowed for this adjustment handle. If this attribute is omitted,
23866
- * then it will be assumed that this adjust handle cannot move angularly.
23867
- */
23868
- minAng: number;
23869
- /**
23870
- * Specifies the minimum radial position that is allowed for this adjustment handle. If this attribute is omitted,
23871
- * then it will be assumed that this adjust handle cannot move radially.
23872
- */
23873
- minR: number;
23874
- }
23875
- interface XYAdjustmentHandle extends AdjustmentHandle {
23876
- type: 'xy';
23877
- /**
23878
- * Specifies the name of the guide that will be updated with the adjustment x position from this adjust handle.
23879
- */
23880
- gdRefX: string;
23881
- /**
23882
- * Specifies the name of the guide that will be updated with the adjustment y position from this adjust handle.
23883
- */
23884
- gdRefY: string;
23885
- /**
23886
- * Specifies the maximum horizontal position that is allowed for this adjustment handle. If this attribute is omitted,
23887
- * then it will be assumed that this adjust handle cannot move in the x direction.
23888
- */
23889
- maxX: number;
23890
- /**
23891
- * Specifies the maximum vertical position that is allowed for this adjustment handle. If this attribute is omitted,
23892
- * then it will be assumed that this adjust handle cannot move in the y direction.
23893
- */
23894
- maxY: number;
23895
- /**
23896
- * Specifies the minimum horizontal position that is allowed for this adjustment handle. If this attribute is omitted,
23897
- * then it will be assumed that this adjust handle cannot move in the x direction.
23898
- */
23899
- minX: number;
23900
- /**
23901
- * Specifies the minimum vertical position that is allowed for this adjustment handle. If this attribute is omitted,
23902
- * then it will be assumed that this adjust handle cannot move in the y direction.
23903
- */
23904
- minY: number;
25075
+ interface PictureMemberJSON extends JSON {
25076
+ type: typeof Type.Picture;
25077
+ /** The image, as an image fill. */
25078
+ fill?: IFill.ImageJSON;
23905
25079
  }
23906
25080
  /**
23907
- * A connection site allows a `ConnectionShape` to be attached to this shape. This connection will be maintained
23908
- * when the shape is repositioned. It should be noted that this connection is placed within the shape
23909
- * bounding box using the transform coordinate system which is also called the shape coordinate system,
23910
- * as it encompasses the entire shape.
25081
+ * One glued end of a connector: the shape it is attached to, by the id the file gives that
25082
+ * shape (its `sourceId` here), and which of that shape's connection sites.
23911
25083
  */
23912
- interface ConnectionSite {
23913
- /**
23914
- * Specifies the incoming connector angle. This angle is the angle around the connection site that an
23915
- * incoming connector will try to be routed to. This allows connectors to know where the shape is in
23916
- * relation to the connection site and route connectors so as to avoid any overlap with the shape.
23917
- */
23918
- angle: string;
23919
- /**
23920
- * Specifies a position coordinate within the shape bounding box. It should be noted that this coordinate
23921
- * is placed within the shape bounding box using the transform coordinate system which is also called the
23922
- * shape coordinate system, as it encompasses the entire shape.
23923
- */
23924
- pos: Point;
23925
- }
23926
- interface GeometryJSON extends GeometryProperties {
23927
- }
23928
- interface Events extends IModel.Events {
23929
- }
23930
- interface IListeners extends IListener.Callbacks<IShape, IShape.Events> {
23931
- }
23932
- interface IConnection {
23933
- }
23934
- interface Connection extends IShape.JSON {
23935
- cxnSp?: any;
25084
+ interface ConnectorEndJSON {
25085
+ id: number;
25086
+ index: number;
23936
25087
  }
23937
- /**
23938
- * @see {@link https://c-rex.net/samples/ooxml/e1/Part4/OOXML_P4_DOCX_ST_ShapeType_topic_ID0EBTFOB.html#topic_ID0EBTFOB}
23939
- */
23940
- const PresetGeometry: {
23941
- readonly Line: "line";
23942
- readonly LineInv: "lineInv";
23943
- readonly triangle: "triangle";
23944
- readonly rtTriangle: "rtTriangle";
23945
- readonly Rect: "rect";
23946
- };
23947
- type PresetGeometry = typeof PresetGeometry[keyof typeof PresetGeometry];
23948
25088
  }
23949
25089
 
23950
25090
  /**
@@ -24180,12 +25320,9 @@ declare global {
24180
25320
  */
24181
25321
  getCodeName(): string | null;
24182
25322
  /**
24183
- * How row and column groups are laid out on this sheet.
24184
- *
24185
- * @remarks
24186
- * Always fully populated: a sheet that declares nothing reports the defaults.
25323
+ * The row and column groups on this sheet, and how they are laid out.
24187
25324
  */
24188
- getOutlineSettings(): Readonly<ISheet.OutlineSettings>;
25325
+ getOutline(): IOutline;
24189
25326
  /**
24190
25327
  * Whether conditional formats on this sheet are recalculated as the sheet changes.
24191
25328
  *
@@ -24890,12 +26027,13 @@ declare global {
24890
26027
  */
24891
26028
  container?: ISheet.ContainerOptions;
24892
26029
  /**
24893
- * A unique identifier used for identifying this sheet during operations (i.e. copy/paste).
24894
- * This must be unique for all in-memory instances of a sheet.
26030
+ * The sheet's id ({@link ISheet.getId}): what formulas and operations (copy/paste) identify it
26031
+ * by. Must be unique among all in-memory sheets.
24895
26032
  *
24896
- * @returns A unique identifier for in memory operations. If not provided a default one will be used.
26033
+ * @returns The id. If not provided a new one is made.
24897
26034
  * @remarks
24898
- * This is not saved as part of the {@link ISheet.JSON} persisted model.
26035
+ * Not saved as part of the {@link ISheet.JSON} persisted model. A container that names its
26036
+ * sheets before it builds them (a workbook loading its sheets) supplies it.
24899
26037
  */
24900
26038
  uid?: () => string;
24901
26039
  /**
@@ -24991,38 +26129,6 @@ declare global {
24991
26129
  type: string;
24992
26130
  };
24993
26131
  }
24994
- /**
24995
- * How row and column groups are laid out.
24996
- *
24997
- * @see {@link ISheet.getOutlineSettings}
24998
- */
24999
- interface OutlineSettings {
25000
- /**
25001
- * Whether a group's summary row sits below its detail rows. When `false` it sits above them.
25002
- *
25003
- * @defaultValue true
25004
- */
25005
- summaryBelow: boolean;
25006
- /**
25007
- * Whether a group's summary column sits to the right of its detail columns. When `false` it
25008
- * sits to the left.
25009
- *
25010
- * @defaultValue true
25011
- */
25012
- summaryRight: boolean;
25013
- /**
25014
- * Whether the expand and collapse buttons for groups are shown.
25015
- *
25016
- * @defaultValue true
25017
- */
25018
- showOutlineSymbols: boolean;
25019
- /**
25020
- * Whether the automatic outline styles are applied to summary rows and columns.
25021
- *
25022
- * @defaultValue false
25023
- */
25024
- applyStyles: boolean;
25025
- }
25026
26132
  /**
25027
26133
  * A drawing whose shapes are described in the origin format's own legacy vector markup rather
25028
26134
  * than through {@link IMovable | movables}.
@@ -25070,7 +26176,6 @@ declare global {
25070
26176
  */
25071
26177
  cols?: IRange.JSONReference<ICellHeader.JSON>[];
25072
26178
  defaultColSize?: number;
25073
- outlineLevelCol?: number;
25074
26179
  /**
25075
26180
  * Row headers, each addressed as an entire-row run (`'5:5'`, `'5:12'`).
25076
26181
  *
@@ -25079,7 +26184,6 @@ declare global {
25079
26184
  */
25080
26185
  rows?: IRange.JSONReference<ICellHeader.JSON>[];
25081
26186
  defaultRowSize?: number;
25082
- outlineLevelRow?: number;
25083
26187
  styles?: IStyleCollection.JSON;
25084
26188
  resources?: IResource.JSON[];
25085
26189
  strings?: string[];
@@ -25132,9 +26236,9 @@ declare global {
25132
26236
  /**
25133
26237
  * The outline settings that differ from their defaults.
25134
26238
  *
25135
- * @see {@link ISheet.getOutlineSettings}
26239
+ * @see {@link ISheet.getOutline}
25136
26240
  */
25137
- outline?: Partial<OutlineSettings>;
26241
+ outline?: IOutline.JSON;
25138
26242
  /**
25139
26243
  * Present, as `false`, only when conditional format calculation is turned off.
25140
26244
  *
@@ -25462,6 +26566,10 @@ declare global {
25462
26566
  * Called when headers visibility (hidden) has changed.
25463
26567
  */
25464
26568
  onHiddenChange?(source: ISheetHeader): void;
26569
+ /**
26570
+ * Called when header outline levels, or which groups are collapsed, have changed.
26571
+ */
26572
+ onOutlineChange?(source: ISheetHeader): void;
25465
26573
  }
25466
26574
  interface IListeners extends IListener.Callbacks<ISheetHeader, ISheetHeader.Events> {
25467
26575
  }
@@ -25879,6 +26987,21 @@ declare global {
25879
26987
  * @see {@link setShowZeros}
25880
26988
  */
25881
26989
  isShowZeros(): boolean;
26990
+ /**
26991
+ * Indicate whether the outline symbols (the brackets, the collapse and expand buttons and the
26992
+ * level buttons of the row and column groups) are shown.
26993
+ *
26994
+ * @defaultValue `true`
26995
+ *
26996
+ * @remarks
26997
+ * A view setting, as in Excel (`Window.DisplayOutline`, Ctrl+8): the groups stay on the sheet,
26998
+ * only their symbols are hidden. Round-trips through xlsx `sheetView@showOutlineSymbols`.
26999
+ */
27000
+ setShowOutlineSymbols(showOutlineSymbols: boolean): this;
27001
+ /**
27002
+ * @see {@link setShowOutlineSymbols}
27003
+ */
27004
+ isShowOutlineSymbols(): boolean;
25882
27005
  /**
25883
27006
  * The color of the gridline on the sheet.
25884
27007
  *
@@ -26034,6 +27157,8 @@ declare global {
26034
27157
  showInvalid: boolean;
26035
27158
  /** {@inheritDoc ISheetView.setShowZeros} */
26036
27159
  showZeros: boolean;
27160
+ /** {@inheritDoc ISheetView.setShowOutlineSymbols} */
27161
+ showOutlineSymbols: boolean;
26037
27162
  /** {@inheritDoc ISheetView.setRightToLeft} */
26038
27163
  rightToLeft: boolean;
26039
27164
  /** {@inheritDoc ISheetView.setGridLineColor} */
@@ -26503,6 +27628,17 @@ declare global {
26503
27628
  };
26504
27629
  }
26505
27630
 
27631
+ /**
27632
+ * A spinner: two arrows. Content type `'spinner'`.
27633
+ */
27634
+ export interface ISpinner extends IRangedControl {
27635
+ }
27636
+
27637
+ export namespace ISpinner {
27638
+ interface JSON extends IRangedControl.JSON {
27639
+ }
27640
+ }
27641
+
26506
27642
  /**
26507
27643
  * Contains a collection of interned strings.
26508
27644
  *
@@ -26624,32 +27760,25 @@ declare global {
26624
27760
  */
26625
27761
  miterLimit: number;
26626
27762
  /**
26627
- * Defines the arrowhead or shape that will be drawn at the first vertex of the given shape.
26628
- *
26629
- * @defaultValue `null`.
26630
- *
26631
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/marker-start}
27763
+ * The line end drawn at the start of an open path (DrawingML `headEnd`).
26632
27764
  *
27765
+ * @defaultValue `'none'`
26633
27766
  */
26634
- markerStart: IStroke.IMarker;
27767
+ headType: IStroke.LineEndType;
27768
+ /** The head's width, relative to the line width. @defaultValue `'med'` */
27769
+ headWidth: IStroke.LineEndSize;
27770
+ /** The head's length, relative to the line width. @defaultValue `'med'` */
27771
+ headLength: IStroke.LineEndSize;
26635
27772
  /**
26636
- * Defines the arrowhead or shape that will be drawn at all interior vertices of the given shape.
26637
- *
26638
- * @defaultValue `null`.
26639
- *
26640
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/marker-mid}
26641
- *
26642
- */
26643
- markerMid: IStroke.IMarker;
26644
- /**
26645
- * Defines the arrowhead or shape that will be drawn at final vertex for the given shape.
26646
- *
26647
- * @defaultValue `null`.
26648
- *
26649
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/marker-end}
27773
+ * The line end drawn at the end of an open path (DrawingML `tailEnd`).
26650
27774
  *
27775
+ * @defaultValue `'none'`
26651
27776
  */
26652
- markerEnd: IStroke.IMarker;
27777
+ tailType: IStroke.LineEndType;
27778
+ /** The tail's width, relative to the line width. @defaultValue `'med'` */
27779
+ tailWidth: IStroke.LineEndSize;
27780
+ /** The tail's length, relative to the line width. @defaultValue `'med'` */
27781
+ tailLength: IStroke.LineEndSize;
26653
27782
  /**
26654
27783
  * Custom or preset for the stroke.
26655
27784
  */
@@ -26674,20 +27803,24 @@ declare global {
26674
27803
  */
26675
27804
  align: IStroke.Align;
26676
27805
  }
26677
- /**
26678
- * A Marker is a custom placeholder for shapes along a stroke.
26679
- *
26680
- * @remarks
26681
- * The Marker contains the positioning and shape of the marker.
26682
- *
26683
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Element/marker}
26684
- */
26685
- interface IMarker {
26686
- width: number;
26687
- height: number;
26688
- axis: number;
26689
- shape: IStroke.PresetMarkerShape;
26690
- }
27806
+ /** The shape drawn at an open path's end (DrawingML `ST_LineEndType`). */
27807
+ const LineEndType: {
27808
+ readonly None: "none";
27809
+ readonly Triangle: "triangle";
27810
+ readonly Stealth: "stealth";
27811
+ readonly Diamond: "diamond";
27812
+ readonly Oval: "oval";
27813
+ /** An open arrowhead: two strokes of the line's width. */
27814
+ readonly Arrow: "arrow";
27815
+ };
27816
+ type LineEndType = typeof LineEndType[keyof typeof LineEndType];
27817
+ /** A line end's width or length, relative to the line width (DrawingML `ST_LineEndWidth` / `ST_LineEndLength`). */
27818
+ const LineEndSize: {
27819
+ readonly Small: "sm";
27820
+ readonly Medium: "med";
27821
+ readonly Large: "lg";
27822
+ };
27823
+ type LineEndSize = typeof LineEndSize[keyof typeof LineEndSize];
26691
27824
  /**
26692
27825
  * Support stroke with multiple strokes.
26693
27826
  * ** PLACEHOLDER **
@@ -26791,13 +27924,6 @@ declare global {
26791
27924
  readonly Round: "round";
26792
27925
  };
26793
27926
  type LineJoin = typeof LineJoin[keyof typeof LineJoin];
26794
- const PresetMarkerShape: {
26795
- readonly Single: "none";
26796
- readonly Double: "double";
26797
- readonly ThickThin: "thickThin";
26798
- readonly ThinThick: "thinThick";
26799
- };
26800
- type PresetMarkerShape = typeof PresetMarkerShape[keyof typeof PresetMarkerShape];
26801
27927
  const StrokeStyle: {
26802
27928
  readonly None: "none";
26803
27929
  readonly Dashed: "dashed";
@@ -26817,6 +27943,8 @@ declare global {
26817
27943
  */
26818
27944
  interface JSON extends Properties {
26819
27945
  fill: IFill.JSON;
27946
+ /** The line's `extLst` as a file states it (DrawingML `ln/extLst`): an opaque fragment, written back as it was. */
27947
+ extLst?: string;
26820
27948
  }
26821
27949
  }
26822
27950
 
@@ -29460,6 +30588,184 @@ declare global {
29460
30588
  readonly Double: "double";
29461
30589
  };
29462
30590
  type StrikeStyle = typeof StrikeStyle[keyof typeof StrikeStyle];
30591
+ /**
30592
+ * How a paragraph's text is aligned between its margins.
30593
+ */
30594
+ const ParagraphAlignment: {
30595
+ readonly Left: "left";
30596
+ readonly Center: "center";
30597
+ readonly Right: "right";
30598
+ /** Spread to both margins, the last line excepted. */
30599
+ readonly Justify: "justify";
30600
+ /** Justified with a low kashida, for Arabic text. */
30601
+ readonly JustifyLow: "justifyLow";
30602
+ /** Every line, the last included, is spread to both margins. */
30603
+ readonly Distributed: "distributed";
30604
+ /** Distributed the way Thai text is. */
30605
+ readonly ThaiDistributed: "thaiDistributed";
30606
+ };
30607
+ type ParagraphAlignment = typeof ParagraphAlignment[keyof typeof ParagraphAlignment];
30608
+ /**
30609
+ * Where runs of different sizes sit on a line.
30610
+ */
30611
+ const FontAlignment: {
30612
+ readonly Auto: "auto";
30613
+ readonly Top: "top";
30614
+ readonly Center: "center";
30615
+ readonly Baseline: "baseline";
30616
+ readonly Bottom: "bottom";
30617
+ };
30618
+ type FontAlignment = typeof FontAlignment[keyof typeof FontAlignment];
30619
+ /**
30620
+ * How a run of drawing text is underlined.
30621
+ *
30622
+ * @remarks
30623
+ * Drawing text has more underlines than a cell's font ({@link IFont.UnderlineStyle}); the two
30624
+ * agree on `none`, `single` and `double`.
30625
+ */
30626
+ const UnderlineStyle: {
30627
+ readonly None: "none";
30628
+ /** Each word underlined, the spaces between them not. */
30629
+ readonly Words: "words";
30630
+ readonly Single: "single";
30631
+ readonly Double: "double";
30632
+ readonly Heavy: "heavy";
30633
+ readonly Dotted: "dotted";
30634
+ readonly DottedHeavy: "dottedHeavy";
30635
+ readonly Dash: "dash";
30636
+ readonly DashHeavy: "dashHeavy";
30637
+ readonly DashLong: "dashLong";
30638
+ readonly DashLongHeavy: "dashLongHeavy";
30639
+ readonly DotDash: "dotDash";
30640
+ readonly DotDashHeavy: "dotDashHeavy";
30641
+ readonly DotDotDash: "dotDotDash";
30642
+ readonly DotDotDashHeavy: "dotDotDashHeavy";
30643
+ readonly Wavy: "wavy";
30644
+ readonly WavyHeavy: "wavyHeavy";
30645
+ readonly WavyDouble: "wavyDouble";
30646
+ };
30647
+ type UnderlineStyle = typeof UnderlineStyle[keyof typeof UnderlineStyle];
30648
+ /**
30649
+ * A font named by a run: a family, or one of the theme's two fonts.
30650
+ */
30651
+ interface FontJSON {
30652
+ family?: string;
30653
+ /** The theme's heading (`major`) or body (`minor`) font, in place of a family. */
30654
+ scheme?: IFont.Scheme;
30655
+ /** PANOSE classification as the file states it (ten hex bytes). */
30656
+ panose?: string;
30657
+ /** A family to fall back to, derived from `panose` when read. */
30658
+ fallbacks?: string[];
30659
+ pitch?: string;
30660
+ charset?: IFont.Charset;
30661
+ }
30662
+ /**
30663
+ * How a run is formatted. Sizes are in points, `baseline` is a percentage of the size (`30`
30664
+ * raises the run as a superscript), colors are fills or serialized colors.
30665
+ *
30666
+ * @remarks
30667
+ * Where a cell's font has the same property ({@link IStyledFont.Properties}) the name and
30668
+ * values are the same: `weight`, `style`, `letterSpacing`, `family`.
30669
+ */
30670
+ interface RunPropertiesJSON {
30671
+ /** Font size in points. */
30672
+ size?: number;
30673
+ /** `700` for bold, `400` for regular. */
30674
+ weight?: number;
30675
+ style?: IFont.Style;
30676
+ underline?: UnderlineStyle;
30677
+ strike?: StrikeStyle;
30678
+ /** The text color: a fill (solid, gradient, pattern) or a serialized color. */
30679
+ color?: IFill.JSON | string;
30680
+ /** The Latin font. */
30681
+ font?: FontJSON;
30682
+ eastAsianFont?: FontJSON;
30683
+ complexScriptFont?: FontJSON;
30684
+ symbolFont?: FontJSON;
30685
+ /** Language tag (`en-US`). */
30686
+ language?: string;
30687
+ alternateLanguage?: string;
30688
+ /** Kerning threshold in points. */
30689
+ kerning?: number;
30690
+ /** Character spacing in points. */
30691
+ letterSpacing?: number;
30692
+ /** Baseline shift as a percentage of the font size; positive raises. */
30693
+ baseline?: number;
30694
+ capitals?: SmallCaps;
30695
+ normalizeHeight?: boolean;
30696
+ /** Highlight color, serialized. */
30697
+ highlight?: string;
30698
+ hyperlink?: IHyperlink.JSON;
30699
+ /** The text outline. */
30700
+ outline?: IStroke.JSON;
30701
+ effects?: IEffect.JSON[];
30702
+ }
30703
+ /** A run of text. */
30704
+ interface RunJSON extends RunPropertiesJSON {
30705
+ /** The run's text; `'\n'` alone is a line break inside the paragraph. */
30706
+ text: string;
30707
+ /** Set when the run is a field (`fld`): its id and kind (`TxLink`, `slidenum`…). */
30708
+ field?: {
30709
+ id: string;
30710
+ type?: string;
30711
+ };
30712
+ }
30713
+ /** A spacing: in points, or as a percentage of a line (`100` is single spacing). */
30714
+ type SpacingJSON = {
30715
+ points: number;
30716
+ } | {
30717
+ percent: number;
30718
+ };
30719
+ /** A paragraph's bullet. Without a `type` the entry only restyles the inherited bullet. */
30720
+ interface BulletJSON {
30721
+ type?: 'none' | 'char' | 'auto' | 'image';
30722
+ /** The character of a `char` bullet. */
30723
+ char?: string;
30724
+ /** The numbering scheme of an `auto` bullet (`arabicPeriod`, `romanLcParenR`…). */
30725
+ autoType?: string;
30726
+ startAt?: number;
30727
+ font?: FontJSON;
30728
+ fontFollowsText?: boolean;
30729
+ /** Serialized color. */
30730
+ color?: string;
30731
+ colorFollowsText?: boolean;
30732
+ size?: SpacingJSON;
30733
+ sizeFollowsText?: boolean;
30734
+ }
30735
+ interface TabJSON {
30736
+ /** Position in pixels. */
30737
+ position: number;
30738
+ align?: ITextFrame.TabStopAlignment;
30739
+ }
30740
+ /** How a paragraph is laid out. Lengths are in pixels. */
30741
+ interface ParagraphPropertiesJSON {
30742
+ align?: ParagraphAlignment;
30743
+ /** Outline level, `0` to `8`. */
30744
+ level?: number;
30745
+ marginLeft?: number;
30746
+ marginRight?: number;
30747
+ /** First-line indent; negative for a hanging indent. */
30748
+ indent?: number;
30749
+ defaultTabSize?: number;
30750
+ rightToLeft?: boolean;
30751
+ eastAsianLineBreak?: boolean;
30752
+ latinLineBreak?: boolean;
30753
+ hangingPunctuation?: boolean;
30754
+ fontAlign?: FontAlignment;
30755
+ lineSpacing?: SpacingJSON;
30756
+ spaceBefore?: SpacingJSON;
30757
+ spaceAfter?: SpacingJSON;
30758
+ bullet?: BulletJSON;
30759
+ tabs?: TabJSON[];
30760
+ /** The run formatting the paragraph's runs inherit. */
30761
+ defaultRun?: RunPropertiesJSON;
30762
+ }
30763
+ /** A paragraph: runs in order, and how it is laid out. */
30764
+ interface ParagraphJSON extends ParagraphPropertiesJSON {
30765
+ runs: RunJSON[];
30766
+ /** The formatting of the paragraph mark (what a new run at its end takes). */
30767
+ endRun?: RunPropertiesJSON;
30768
+ }
29463
30769
  }
29464
30770
 
29465
30771
  /**
@@ -29931,8 +31237,92 @@ declare global {
29931
31237
  * Centers text at the tab stop.
29932
31238
  */
29933
31239
  readonly Center: "center";
31240
+ /**
31241
+ * Aligns numbers at the tab stop on their decimal point.
31242
+ */
31243
+ readonly Decimal: "decimal";
29934
31244
  };
29935
31245
  type TabStopAlignment = typeof TabStopAlignment[keyof typeof TabStopAlignment];
31246
+ /**
31247
+ * The direction drawing text runs in its body.
31248
+ */
31249
+ const WritingMode: {
31250
+ readonly Horizontal: "horizontal";
31251
+ /** Each line turned 90° clockwise, read top to bottom; lines advance leftwards. */
31252
+ readonly Vertical: "vertical";
31253
+ /** Each line turned 270° clockwise, read bottom to top; lines advance rightwards. */
31254
+ readonly Vertical270: "vertical270";
31255
+ /** WordArt vertical: upright letters stacked top to bottom. */
31256
+ readonly WordArtVertical: "wordArtVertical";
31257
+ /** East Asian vertical: upright ideographs, Latin text turned. */
31258
+ readonly EastAsianVertical: "eastAsianVertical";
31259
+ /** Mongolian vertical: top to bottom, lines advancing rightwards. */
31260
+ readonly MongolianVertical: "mongolianVertical";
31261
+ /** WordArt vertical read right to left. */
31262
+ readonly WordArtVerticalRtl: "wordArtVerticalRtl";
31263
+ };
31264
+ type WritingMode = typeof WritingMode[keyof typeof WritingMode];
31265
+ /** Text insets from the text rectangle, in pixels. */
31266
+ interface InsetsJSON {
31267
+ left?: number;
31268
+ top?: number;
31269
+ right?: number;
31270
+ bottom?: number;
31271
+ }
31272
+ /** How a text body sits in the frame that holds it. */
31273
+ interface BodyJSON {
31274
+ /** Vertical anchor of the text in the frame. */
31275
+ anchor?: VerticalAlignment;
31276
+ /** Center the text box horizontally within the frame. */
31277
+ anchorCenter?: boolean;
31278
+ wrap?: 'none' | 'square';
31279
+ insets?: InsetsJSON;
31280
+ /** `shape` grows the frame to fit the text; `normal` shrinks the text to fit the frame. */
31281
+ autoFit?: Autofit;
31282
+ /** With `normal` autofit: the font scale applied, as a percentage. */
31283
+ fontScale?: number;
31284
+ /** With `normal` autofit: the line spacing reduction applied, as a percentage. */
31285
+ lineSpacingReduction?: number;
31286
+ vertical?: WritingMode;
31287
+ /** What happens to text past the bottom: `visible`, `ellipsis` or `clip`. */
31288
+ verticalOverflow?: Overflow;
31289
+ /** What happens to text past the sides: `visible` or `clip`. */
31290
+ horizontalOverflow?: Overflow;
31291
+ upright?: boolean;
31292
+ rightToLeftColumns?: boolean;
31293
+ columns?: number;
31294
+ /** Space between columns, in pixels. */
31295
+ columnSpacing?: number;
31296
+ fromWordArt?: boolean;
31297
+ forceAntiAlias?: boolean;
31298
+ compatibleLineSpacing?: boolean;
31299
+ spaceFirstLastParagraph?: boolean;
31300
+ /** A preset text warp (`prstTxWarp`) and its adjust values, in the preset grammar's units. */
31301
+ warp?: {
31302
+ preset: string;
31303
+ adjustments?: Record<string, number>;
31304
+ };
31305
+ /** `bodyPr/extLst` as the file states it: an opaque DrawingML fragment, written back as it was. */
31306
+ extLst?: string;
31307
+ }
31308
+ /** The paragraph formatting a text body's levels inherit (`lstStyle`). */
31309
+ interface ListStyleJSON {
31310
+ default?: IText.ParagraphPropertiesJSON;
31311
+ /** Levels 1 to 9, by index; a level the file does not state is absent. */
31312
+ levels?: (IText.ParagraphPropertiesJSON | undefined)[];
31313
+ }
31314
+ /**
31315
+ * The text written in a frame — a shape's text body — as JSON: its paragraphs, how the body
31316
+ * sits in the frame, and the list style the paragraphs inherit from.
31317
+ */
31318
+ interface JSON {
31319
+ paragraphs: IText.ParagraphJSON[];
31320
+ /** Text rotation in degrees, when the body states one. */
31321
+ rotation?: number;
31322
+ /** How the body sits in the frame; absent for the defaults. */
31323
+ body?: BodyJSON;
31324
+ listStyle?: ListStyleJSON;
31325
+ }
29936
31326
  interface CloneableTextFrame extends ITextFrame {
29937
31327
  clone(visitor?: TextVisitor): ITextFrame;
29938
31328
  equals(other: ITextFrame): boolean;
@@ -30250,6 +31640,29 @@ declare global {
30250
31640
  }
30251
31641
  interface FontSchemeJSON extends Partial<FontSchemeProperties> {
30252
31642
  }
31643
+ /**
31644
+ * One reference into a theme style list (`fillRef`, `lnRef`, `effectRef`): the one-based position
31645
+ * in the list, `0` for none, and the color the list entry's placeholder (`phClr`) takes.
31646
+ */
31647
+ interface StyleRefJSON {
31648
+ index: number;
31649
+ color?: string;
31650
+ }
31651
+ /** The font a theme style refers to: the theme's `major` or `minor` font, or `none`, and the text color. */
31652
+ interface FontRefJSON {
31653
+ index: IFont.Scheme;
31654
+ color?: string;
31655
+ }
31656
+ /**
31657
+ * References into the theme's format scheme — what a shape or chart draws with wherever it
31658
+ * states nothing of its own: DrawingML's `style` element.
31659
+ */
31660
+ interface StyleRefsJSON {
31661
+ fill?: StyleRefJSON;
31662
+ stroke?: StyleRefJSON;
31663
+ effect?: StyleRefJSON;
31664
+ font?: FontRefJSON;
31665
+ }
30253
31666
  interface JSON {
30254
31667
  name: string;
30255
31668
  fonts?: ITheme.FontSchemeJSON;
@@ -34014,18 +35427,6 @@ declare global {
34014
35427
  */
34015
35428
  export type LanguageTag = string;
34016
35429
 
34017
- /**
34018
- * The placed geometry for all columns — see {@link layoutColumns}.
34019
- */
34020
- export interface Layout {
34021
- /** The slot pitch: the font's line height. Also the column width. */
34022
- pitch: number;
34023
- /** One entry per column, in reading order (left → right). */
34024
- columns: readonly Column[];
34025
- /** The axis-aligned union of all columns. */
34026
- bounds: Bounds;
34027
- }
34028
-
34029
35430
  /**
34030
35431
  * Declares a parameter the engine may hand over UNEVALUATED — the argument's subtree is not run
34031
35432
  * before the call, and it runs only if this call's answer needs it.
@@ -34254,7 +35655,7 @@ declare global {
34254
35655
  export interface Line {
34255
35656
  /**
34256
35657
  * Where the strip's un-rotated top-left sits (content-box coordinate space). The strip is the
34257
- * line's box (`size`) rotated by the layout {@link Layout.angle angle} **about this point**.
35658
+ * line's box (`size`) rotated by the layout {@link RotatedLayout.angle angle} **about this point**.
34258
35659
  */
34259
35660
  origin: Point;
34260
35661
  /** The un-rotated strip box: the line's text width × line height. */
@@ -34728,6 +36129,66 @@ declare global {
34728
36129
  vol?: 1;
34729
36130
  }
34730
36131
 
36132
+ /**
36133
+ * The kinds of content a movable can place, by type, and how each is created.
36134
+ *
36135
+ * @remarks
36136
+ * A sheet creates a movable's content from its JSON by looking the content's `type` up here. The
36137
+ * built-in kinds (picture, chart, shape, slicer, the form controls) are registered when the SDK
36138
+ * loads; a host registers its own the same way, and from then on a workbook that carries that
36139
+ * type creates the host's content, saves it through its `toJSON`, and offers it to the UI under
36140
+ * the same type (`registerMovableRenderer` in `@sheetxl/react`).
36141
+ *
36142
+ * A type nobody has registered still loads and saves: it becomes an unmodeled content that
36143
+ * carries its JSON as it was.
36144
+ */
36145
+ export namespace MovableContentRegistry {
36146
+ /**
36147
+ * What a movable's content is given when created.
36148
+ */
36149
+ interface CreateOptions extends AbstractMovableContent.ConstructorOptions<any> {
36150
+ /** The content's type, as registered. */
36151
+ type: string;
36152
+ /** The content's JSON, as saved. */
36153
+ json?: any;
36154
+ /** Returns an IResource from the resourceId or null if not found. */
36155
+ fromResourceId?: (resourceId: number) => IResource;
36156
+ /** Useful for load/save/copying. */
36157
+ beginPersistResource: () => IResourceCollection.IPersistScope<IResource.JSON>;
36158
+ /** Allow for the default lock aspect ratio to be overwritten. */
36159
+ defaultLockAspectRatio?: boolean;
36160
+ /** Resolves an address against the workbook the content lives in. */
36161
+ getRange: (address: string) => ICellRange | null;
36162
+ /** Hands formulas to the calculation engine so they follow structural edits. */
36163
+ holdFormulas: (getExpressions: () => readonly string[]) => IMovable.HeldFormulas;
36164
+ }
36165
+ /**
36166
+ * What a movable needs of its content: {@link IMovable.IContent}, and that it can be saved.
36167
+ */
36168
+ interface Content extends IMovable.IContent {
36169
+ toJSON(toResourceId?: (resource: IResource) => number | null): any;
36170
+ }
36171
+ /**
36172
+ * Creates the content of one kind.
36173
+ */
36174
+ type Factory = (options: CreateOptions) => Content;
36175
+ /**
36176
+ * Registers how a kind of content is created, replacing any earlier registration.
36177
+ *
36178
+ * @param type The content type (`IMovable.IContent.getType()`).
36179
+ * @returns A function that removes the registration.
36180
+ */
36181
+ function register(type: string, factory: Factory): () => void;
36182
+ /**
36183
+ * The factory for a kind of content, or `undefined` if none is registered.
36184
+ */
36185
+ function get(type: string): Factory | undefined;
36186
+ /**
36187
+ * The registered types.
36188
+ */
36189
+ function getTypes(): string[];
36190
+ }
36191
+
34731
36192
  /**
34732
36193
  * Declares that the members reaching a REPEATING scalar parameter are COERCED rather than
34733
36194
  * filtered — one that cannot be coerced is `#VALUE!` for the whole call.
@@ -35935,6 +37396,28 @@ declare global {
35935
37396
  folders: string[];
35936
37397
  }
35937
37398
 
37399
+ /**
37400
+ * The placed geometry for all lines — see {@link layoutLines}.
37401
+ */
37402
+ export interface RotatedLayout {
37403
+ /** The rotation, CSS degrees clockwise, normalized to [0, 360). Never 0 or 180 (callers skip). */
37404
+ angle: number;
37405
+ /**
37406
+ * The available text length along a rotated line before it exhausts the content height. Wrapped
37407
+ * text breaks at this length; fit tests (`####`, repeat fills) measure against it.
37408
+ */
37409
+ lineLength: number;
37410
+ /**
37411
+ * The signed horizontal advance between consecutive line origins (`-lineHeight / sin θ`).
37412
+ * Positive marches right (up-slanted text), negative marches left (down-slanted).
37413
+ */
37414
+ advance: number;
37415
+ /** One entry per laid-out text line, in reading order. */
37416
+ lines: readonly Line[];
37417
+ /** The axis-aligned union of all strips — the painted footprint (may exceed the content box). */
37418
+ bounds: Bounds;
37419
+ }
37420
+
35938
37421
  /**
35939
37422
  * A RunCoords represents a discrete set of values in a single dimension.
35940
37423
  *
@@ -36282,6 +37765,18 @@ declare global {
36282
37765
  thisRow: string;
36283
37766
  }
36284
37767
 
37768
+ /**
37769
+ * The placed geometry for all columns — see {@link layoutColumns}.
37770
+ */
37771
+ export interface StackedLayout {
37772
+ /** The slot pitch: the font's line height. Also the column width. */
37773
+ pitch: number;
37774
+ /** One entry per column, in reading order (left → right). */
37775
+ columns: readonly Column[];
37776
+ /** The axis-aligned union of all columns. */
37777
+ bounds: Bounds;
37778
+ }
37779
+
36285
37780
  /**
36286
37781
  * Returns meta data about the number format.
36287
37782
  */