@sheetxl/sdk 0.8.0-beta.7 → 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/{E08wpSuqr-UadjSZ.cjs → CvQ1tIq7wZ7HIGPq.cjs} +1 -1
  4. package/browser/cjs/CwvGOe42j8KpAF0v.cjs +1 -0
  5. package/browser/cjs/{O6F5xVsoF2hTiprv.cjs → DCOqoH-T4Ux_1dQj.cjs} +1 -1
  6. package/browser/cjs/index.cjs +2 -2
  7. package/browser/esm/{tBEZ_r7Bkp7CrFLF.mjs → BdHD3v-u8irI1XhZ.mjs} +2 -2
  8. package/browser/esm/{bSQdR4WlmM40WWFR.mjs → C8btlUQcQwNyzHY3.mjs} +2 -2
  9. package/browser/esm/{B7v0PdbyuBlceMLG.mjs → CF3VfWX7bJu8kO_Z.mjs} +2 -2
  10. package/browser/esm/{BADV_AABAw-3U9iO.mjs → D3ll0ybMQOP4uPyW.mjs} +1 -1
  11. package/browser/esm/{DRpWwH6CWI0QaNlp.mjs → DXmFrSnh3xSBfoD7.mjs} +8146 -7694
  12. package/browser/esm/{CFDfAmU2o5HFRTu4.mjs → DzgIc4oyekwA-fkl.mjs} +96 -96
  13. package/browser/esm/{DkHfJEJlvjDJnXEU.mjs → Iw280tlGmTHKDqzd.mjs} +2 -2
  14. package/browser/esm/index.mjs +919 -593
  15. package/node/esm/{CWJELJxqO-1z0tJU.mjs → B_FOXd5PSfVcg0ED.mjs} +1 -1
  16. package/node/esm/{HMR0po5avaUU1XUZ.mjs → BzgnLKSVfN-mrMSW.mjs} +1 -1
  17. package/node/esm/{BShIHUY7pxerJVT8.mjs → D4PsEIRHxAahp5kn.mjs} +1 -1
  18. package/node/esm/{DbAKZ-Ythj1VwgyS.mjs → dinqlP3jU8gDOjso.mjs} +1 -1
  19. package/node/esm/index.mjs +11373 -10575
  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 +6847 -6401
  24. package/types/scripting-enums.json +101 -21
  25. package/types/scripting.d.ts +1949 -457
  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/CrcmEew-dr51xpf9.cjs +0 -1
  110. package/browser/cjs/CwzIjMpnMKeypivl.cjs +0 -1
  111. package/browser/cjs/D3Vlh9UOBKtvlXBL.cjs +0 -93
  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
@@ -1,5 +1,5 @@
1
1
  import { IRange, Scalar, IRangeStats, InteropScalar } from '@sheetxl/primitives';
2
- import { Size } from '@sheetxl/utils';
2
+ import { Size, RunCoords } from '@sheetxl/utils';
3
3
  import { ITransaction } from '../transaction';
4
4
  import { IListener } from '../listener';
5
5
  import { ICell } from '../cell';
@@ -20,6 +20,7 @@ import { IConditionalFormatCollection } from '../conditionalFormat/IConditionalF
20
20
  import { IProtectedRange, IProtectedRangeCollection } from '../protectedRange';
21
21
  import { ISheet } from './ISheet';
22
22
  import { ISheetInternal } from './Sheet';
23
+ import { Outline } from '../outline/Outline';
23
24
  import { AutoFillProjection } from './_SheetAutoFillUtils';
24
25
  /**
25
26
  * The empty feature selection — the raw-value fast path.
@@ -332,6 +333,20 @@ export declare class SheetRange implements ICellRange {
332
333
  autoFill(destination: ICellRange.Address, options?: ICellRange.AutoFillOptions): this;
333
334
  /** {@inheritDoc ICellRange.autoFit} */
334
335
  autoFit(options?: ICellRange.AutoFitOptions): this;
336
+ /** {@inheritDoc ICellRange.group} */
337
+ group(axis?: IRange.Axis, options?: ITransaction.OperationOptions): this;
338
+ /** {@inheritDoc ICellRange.ungroup} */
339
+ ungroup(axis?: IRange.Axis, options?: ITransaction.OperationOptions): this;
340
+ protected _changeOutlineLevels(axis: IRange.Axis | undefined, delta: 1 | -1, options?: ITransaction.OperationOptions): void;
341
+ /** {@inheritDoc ICellRange.showGroupDetails} */
342
+ showGroupDetails(axis?: IRange.Axis, options?: ITransaction.OperationOptions): this;
343
+ /** {@inheritDoc ICellRange.hideGroupDetails} */
344
+ hideGroupDetails(axis?: IRange.Axis, options?: ITransaction.OperationOptions): this;
345
+ /** {@inheritDoc ICellRange.clearGroups} */
346
+ clearGroups(axes?: IRange.AxisSelection, options?: ITransaction.OperationOptions): this;
347
+ protected _getOutline(): Outline;
348
+ protected _getRun(axis: IRange.Axis): RunCoords;
349
+ protected _resolveOutlineAxis(axis: IRange.Axis | undefined): IRange.Axis;
335
350
  /** {@inheritDoc ICellRange.clear} */
336
351
  clear(applyTo?: ICell.Content, options?: ITransaction.OperationOptions): this;
337
352
  /** {@inheritDoc ICellRange.setHyperlink} */
@@ -18,8 +18,16 @@ import { SheetCellOptions } from './SheetCell';
18
18
  * Selects max coords in an axis.
19
19
  */
20
20
  export declare function expandRanges<CT extends IRange.Coords = IRange.Coords>(ranges: readonly CT[], maxRange: IRange.Coords, axis: IRange.Axis, after?: boolean): CT[];
21
- export declare function isEntireRows(coords: readonly IRange.Coords[], maxCoords: IRange.Coords, all: boolean): boolean;
22
- export declare function isEntireCols(coords: readonly IRange.Coords[], maxCoords: IRange.Coords, all: boolean): boolean;
21
+ /**
22
+ * Whether the ranges span every row (whole columns, such as `B:D`): all of them, or any when `all`
23
+ * is `false`.
24
+ */
25
+ export declare function spansAllRows(coords: readonly IRange.Coords[], maxCoords: IRange.Coords, all: boolean): boolean;
26
+ /**
27
+ * Whether the ranges span every column (whole rows, such as `2:4`): all of them, or any when `all`
28
+ * is `false`.
29
+ */
30
+ export declare function spansAllColumns(coords: readonly IRange.Coords[], maxCoords: IRange.Coords, all: boolean): boolean;
23
31
  export declare function countSpans(coords: readonly IRange.Coords[], axis?: IRange.Axis): number;
24
32
  /**
25
33
  * Defaults to IRange.Axis.Row if the bounds are the same size.
@@ -229,6 +229,10 @@ export declare namespace ISheetHeader {
229
229
  * Called when headers visibility (hidden) has changed.
230
230
  */
231
231
  onHiddenChange?(source: ISheetHeader): void;
232
+ /**
233
+ * Called when header outline levels, or which groups are collapsed, have changed.
234
+ */
235
+ onOutlineChange?(source: ISheetHeader): void;
232
236
  }
233
237
  interface IListeners extends IListener.Callbacks<ISheetHeader, ISheetHeader.Events> {
234
238
  }
@@ -4,6 +4,8 @@ import { ITable } from '../table';
4
4
  import { ICell, ICellHeader } from '../cell';
5
5
  import { ISheetHeader } from './ISheetHeader';
6
6
  import type * as _Utils from './_HeaderUtils';
7
+ /** The deepest outline level a header can hold. */
8
+ export declare const MaxOutlineLevel = 7;
7
9
  export declare class SheetCellHeader implements ICellHeader {
8
10
  protected _sheetHeader: ISheetHeader;
9
11
  protected _index: number;
@@ -30,6 +32,8 @@ export declare class SheetCellHeader implements ICellHeader {
30
32
  asCell(): ICell;
31
33
  /** {@inheritDoc ICellHeader.getSizeRelative} */
32
34
  getSizeRelative(): number;
35
+ /** {@inheritDoc ICellHeader.getOutlineLevel} */
36
+ getOutlineLevel(): number;
33
37
  /** {@inheritDoc ICellHeader.createCellHeader} */
34
38
  createCellHeader(update: ICellHeader.Modifiers): ICellHeader;
35
39
  /** {@inheritDoc ICellHeader.isEqual} */
@@ -35,6 +35,7 @@ export declare class SheetHeader implements ISheetHeader {
35
35
  protected _headerRunCoords: RunCoords | null;
36
36
  protected _hasHidden: boolean;
37
37
  protected _hiddenSignature: number;
38
+ protected _outlineSignature: number;
38
39
  protected _lastHeaderRead: {
39
40
  offset: number;
40
41
  header: ICellHeader;
@@ -116,6 +117,15 @@ export declare class SheetHeader implements ISheetHeader {
116
117
  getScaleFactor(): number;
117
118
  protected get _headers(): ITypes.RunCoordValue<_Utils.CellHeaderState>[];
118
119
  protected _updatePairsInternal(setters: ICellHeaderRange.AddressUpdatePair[], options?: ICellHeaderRange.UpdateHeadersOptions): RunCoords[] | null;
120
+ /**
121
+ * The header runs as stored: ordered, non-overlapping, gaps are default headers.
122
+ *
123
+ * @remarks
124
+ * The array is replaced, never mutated, when the headers change, so its identity can key a cache.
125
+ *
126
+ * @internal
127
+ */
128
+ _getHeaderRuns(): readonly ITypes.RunCoordValue<_Utils.CellHeaderState>[];
119
129
  /** {@inheritDoc ISheetHeader.hasHidden} */
120
130
  hasHidden(): boolean;
121
131
  /** {@inheritDoc ISheetHeader.getDefaultSize} */
@@ -16,8 +16,10 @@ export interface CellHeaderState {
16
16
  h?: boolean;
17
17
  s?: IStyle;
18
18
  cs?: boolean;
19
- /** outline level */
19
+ /** outline level, 1-7; absent when not grouped */
20
20
  l?: number;
21
+ /** collapsed; set on a group's summary header */
22
+ cl?: boolean;
21
23
  }
22
24
  /**
23
25
  * Use for tracking the accumulated sizes from the beginning of the headers.
@@ -221,6 +221,21 @@ export interface ISheetView extends IMovableSelection, IListener.ISource<IMovabl
221
221
  * @see {@link setShowZeros}
222
222
  */
223
223
  isShowZeros(): boolean;
224
+ /**
225
+ * Indicate whether the outline symbols (the brackets, the collapse and expand buttons and the
226
+ * level buttons of the row and column groups) are shown.
227
+ *
228
+ * @defaultValue `true`
229
+ *
230
+ * @remarks
231
+ * A view setting, as in Excel (`Window.DisplayOutline`, Ctrl+8): the groups stay on the sheet,
232
+ * only their symbols are hidden. Round-trips through xlsx `sheetView@showOutlineSymbols`.
233
+ */
234
+ setShowOutlineSymbols(showOutlineSymbols: boolean): this;
235
+ /**
236
+ * @see {@link setShowOutlineSymbols}
237
+ */
238
+ isShowOutlineSymbols(): boolean;
224
239
  /**
225
240
  * The color of the gridline on the sheet.
226
241
  *
@@ -375,6 +390,8 @@ export declare namespace ISheetView {
375
390
  showInvalid: boolean;
376
391
  /** {@inheritDoc ISheetView.setShowZeros} */
377
392
  showZeros: boolean;
393
+ /** {@inheritDoc ISheetView.setShowOutlineSymbols} */
394
+ showOutlineSymbols: boolean;
378
395
  /** {@inheritDoc ISheetView.setRightToLeft} */
379
396
  rightToLeft: boolean;
380
397
  /** {@inheritDoc ISheetView.setGridLineColor} */
@@ -93,6 +93,10 @@ export declare class SheetView implements ISheetView, IMovableSelection {
93
93
  isShowZeros(): boolean;
94
94
  /** {@inheritDoc ISheetView.setShowZeros} */
95
95
  setShowZeros(newValue: boolean): this;
96
+ /** {@inheritDoc ISheetView.isShowOutlineSymbols} */
97
+ isShowOutlineSymbols(): boolean;
98
+ /** {@inheritDoc ISheetView.setShowOutlineSymbols} */
99
+ setShowOutlineSymbols(newValue: boolean): this;
96
100
  /** {@inheritDoc ISheetView.getGridLineColor} */
97
101
  getGridLineColor(): any;
98
102
  /** {@inheritDoc ISheetView.setGridLineColor} */
@@ -601,8 +601,13 @@ export declare class AnchoredTable extends AbstractAnchored<State, ITable.Events
601
601
  * props an undo restores, and writing through one would rewrite history in place.
602
602
  */
603
603
  protected _updateSorts(sorts: ISort.Options[] | undefined, orderedColumnsProps: ColumnPropertiesState[]): void;
604
- /** {@link _updateSorts} for the filters. */
605
- protected _updateFilters(conditions: ICondition.Input[] | undefined, orderedColumnsProps: ColumnPropertiesState[]): void;
604
+ /**
605
+ * {@link _updateSorts} for the filters.
606
+ *
607
+ * @param persisted The conditions are a load's. One that names an operator this build does not
608
+ * know is kept as it is and filters nothing, where an authored one throws.
609
+ */
610
+ protected _updateFilters(conditions: ICondition.Input[] | undefined, orderedColumnsProps: ColumnPropertiesState[], persisted?: boolean): void;
606
611
  /** {@inheritDoc ITable.filter} */
607
612
  filter(conditions?: ICondition.Input | ICondition.RangeOptions, options?: ITransaction.OperationOptions): Promise<this>;
608
613
  /** {@inheritDoc ITable.sort} */
@@ -1,3 +1,7 @@
1
+ import { IFont } from '../font';
2
+ import { IFill, IStroke, IEffect } from '../fill';
3
+ import { IHyperlink } from '../hyperlink';
4
+ import { ITextFrame } from './ITextFrame';
1
5
  import { ITextLine as _ITextLine } from './TextLine';
2
6
  import { ITextParagraph as _ITextParagraph } from './TextParagraph';
3
7
  import { ITextRun as _ITextRun } from './TextRun';
@@ -49,5 +53,183 @@ export declare namespace IText {
49
53
  readonly Double: "double";
50
54
  };
51
55
  type StrikeStyle = typeof StrikeStyle[keyof typeof StrikeStyle];
56
+ /**
57
+ * How a paragraph's text is aligned between its margins.
58
+ */
59
+ const ParagraphAlignment: {
60
+ readonly Left: "left";
61
+ readonly Center: "center";
62
+ readonly Right: "right";
63
+ /** Spread to both margins, the last line excepted. */
64
+ readonly Justify: "justify";
65
+ /** Justified with a low kashida, for Arabic text. */
66
+ readonly JustifyLow: "justifyLow";
67
+ /** Every line, the last included, is spread to both margins. */
68
+ readonly Distributed: "distributed";
69
+ /** Distributed the way Thai text is. */
70
+ readonly ThaiDistributed: "thaiDistributed";
71
+ };
72
+ type ParagraphAlignment = typeof ParagraphAlignment[keyof typeof ParagraphAlignment];
73
+ /**
74
+ * Where runs of different sizes sit on a line.
75
+ */
76
+ const FontAlignment: {
77
+ readonly Auto: "auto";
78
+ readonly Top: "top";
79
+ readonly Center: "center";
80
+ readonly Baseline: "baseline";
81
+ readonly Bottom: "bottom";
82
+ };
83
+ type FontAlignment = typeof FontAlignment[keyof typeof FontAlignment];
84
+ /**
85
+ * How a run of drawing text is underlined.
86
+ *
87
+ * @remarks
88
+ * Drawing text has more underlines than a cell's font ({@link IFont.UnderlineStyle}); the two
89
+ * agree on `none`, `single` and `double`.
90
+ */
91
+ const UnderlineStyle: {
92
+ readonly None: "none";
93
+ /** Each word underlined, the spaces between them not. */
94
+ readonly Words: "words";
95
+ readonly Single: "single";
96
+ readonly Double: "double";
97
+ readonly Heavy: "heavy";
98
+ readonly Dotted: "dotted";
99
+ readonly DottedHeavy: "dottedHeavy";
100
+ readonly Dash: "dash";
101
+ readonly DashHeavy: "dashHeavy";
102
+ readonly DashLong: "dashLong";
103
+ readonly DashLongHeavy: "dashLongHeavy";
104
+ readonly DotDash: "dotDash";
105
+ readonly DotDashHeavy: "dotDashHeavy";
106
+ readonly DotDotDash: "dotDotDash";
107
+ readonly DotDotDashHeavy: "dotDotDashHeavy";
108
+ readonly Wavy: "wavy";
109
+ readonly WavyHeavy: "wavyHeavy";
110
+ readonly WavyDouble: "wavyDouble";
111
+ };
112
+ type UnderlineStyle = typeof UnderlineStyle[keyof typeof UnderlineStyle];
113
+ /**
114
+ * A font named by a run: a family, or one of the theme's two fonts.
115
+ */
116
+ interface FontJSON {
117
+ family?: string;
118
+ /** The theme's heading (`major`) or body (`minor`) font, in place of a family. */
119
+ scheme?: IFont.Scheme;
120
+ /** PANOSE classification as the file states it (ten hex bytes). */
121
+ panose?: string;
122
+ /** A family to fall back to, derived from `panose` when read. */
123
+ fallbacks?: string[];
124
+ pitch?: string;
125
+ charset?: IFont.Charset;
126
+ }
127
+ /**
128
+ * How a run is formatted. Sizes are in points, `baseline` is a percentage of the size (`30`
129
+ * raises the run as a superscript), colors are fills or serialized colors.
130
+ *
131
+ * @remarks
132
+ * Where a cell's font has the same property ({@link IStyledFont.Properties}) the name and
133
+ * values are the same: `weight`, `style`, `letterSpacing`, `family`.
134
+ */
135
+ interface RunPropertiesJSON {
136
+ /** Font size in points. */
137
+ size?: number;
138
+ /** `700` for bold, `400` for regular. */
139
+ weight?: number;
140
+ style?: IFont.Style;
141
+ underline?: UnderlineStyle;
142
+ strike?: StrikeStyle;
143
+ /** The text color: a fill (solid, gradient, pattern) or a serialized color. */
144
+ color?: IFill.JSON | string;
145
+ /** The Latin font. */
146
+ font?: FontJSON;
147
+ eastAsianFont?: FontJSON;
148
+ complexScriptFont?: FontJSON;
149
+ symbolFont?: FontJSON;
150
+ /** Language tag (`en-US`). */
151
+ language?: string;
152
+ alternateLanguage?: string;
153
+ /** Kerning threshold in points. */
154
+ kerning?: number;
155
+ /** Character spacing in points. */
156
+ letterSpacing?: number;
157
+ /** Baseline shift as a percentage of the font size; positive raises. */
158
+ baseline?: number;
159
+ capitals?: SmallCaps;
160
+ normalizeHeight?: boolean;
161
+ /** Highlight color, serialized. */
162
+ highlight?: string;
163
+ hyperlink?: IHyperlink.JSON;
164
+ /** The text outline. */
165
+ outline?: IStroke.JSON;
166
+ effects?: IEffect.JSON[];
167
+ }
168
+ /** A run of text. */
169
+ interface RunJSON extends RunPropertiesJSON {
170
+ /** The run's text; `'\n'` alone is a line break inside the paragraph. */
171
+ text: string;
172
+ /** Set when the run is a field (`fld`): its id and kind (`TxLink`, `slidenum`…). */
173
+ field?: {
174
+ id: string;
175
+ type?: string;
176
+ };
177
+ }
178
+ /** A spacing: in points, or as a percentage of a line (`100` is single spacing). */
179
+ type SpacingJSON = {
180
+ points: number;
181
+ } | {
182
+ percent: number;
183
+ };
184
+ /** A paragraph's bullet. Without a `type` the entry only restyles the inherited bullet. */
185
+ interface BulletJSON {
186
+ type?: 'none' | 'char' | 'auto' | 'image';
187
+ /** The character of a `char` bullet. */
188
+ char?: string;
189
+ /** The numbering scheme of an `auto` bullet (`arabicPeriod`, `romanLcParenR`…). */
190
+ autoType?: string;
191
+ startAt?: number;
192
+ font?: FontJSON;
193
+ fontFollowsText?: boolean;
194
+ /** Serialized color. */
195
+ color?: string;
196
+ colorFollowsText?: boolean;
197
+ size?: SpacingJSON;
198
+ sizeFollowsText?: boolean;
199
+ }
200
+ interface TabJSON {
201
+ /** Position in pixels. */
202
+ position: number;
203
+ align?: ITextFrame.TabStopAlignment;
204
+ }
205
+ /** How a paragraph is laid out. Lengths are in pixels. */
206
+ interface ParagraphPropertiesJSON {
207
+ align?: ParagraphAlignment;
208
+ /** Outline level, `0` to `8`. */
209
+ level?: number;
210
+ marginLeft?: number;
211
+ marginRight?: number;
212
+ /** First-line indent; negative for a hanging indent. */
213
+ indent?: number;
214
+ defaultTabSize?: number;
215
+ rightToLeft?: boolean;
216
+ eastAsianLineBreak?: boolean;
217
+ latinLineBreak?: boolean;
218
+ hangingPunctuation?: boolean;
219
+ fontAlign?: FontAlignment;
220
+ lineSpacing?: SpacingJSON;
221
+ spaceBefore?: SpacingJSON;
222
+ spaceAfter?: SpacingJSON;
223
+ bullet?: BulletJSON;
224
+ tabs?: TabJSON[];
225
+ /** The run formatting the paragraph's runs inherit. */
226
+ defaultRun?: RunPropertiesJSON;
227
+ }
228
+ /** A paragraph: runs in order, and how it is laid out. */
229
+ interface ParagraphJSON extends ParagraphPropertiesJSON {
230
+ runs: RunJSON[];
231
+ /** The formatting of the paragraph mark (what a new run at its end takes). */
232
+ endRun?: RunPropertiesJSON;
233
+ }
52
234
  }
53
235
  //# sourceMappingURL=IText.d.ts.map
@@ -4,6 +4,7 @@ import { TextVisitor } from './TextVisitor';
4
4
  import { ITextLine } from './TextLine';
5
5
  import { ITextParagraph } from './TextParagraph';
6
6
  import { ITextBoxAlignment as _IAlignment } from './TextBoxAlignment';
7
+ import { IText } from './IText';
7
8
  /**
8
9
  * Represents a rectangular container for text and its formatting within a document.
9
10
  *
@@ -323,8 +324,92 @@ export declare namespace ITextFrame {
323
324
  * Centers text at the tab stop.
324
325
  */
325
326
  readonly Center: "center";
327
+ /**
328
+ * Aligns numbers at the tab stop on their decimal point.
329
+ */
330
+ readonly Decimal: "decimal";
326
331
  };
327
332
  type TabStopAlignment = typeof TabStopAlignment[keyof typeof TabStopAlignment];
333
+ /**
334
+ * The direction drawing text runs in its body.
335
+ */
336
+ const WritingMode: {
337
+ readonly Horizontal: "horizontal";
338
+ /** Each line turned 90° clockwise, read top to bottom; lines advance leftwards. */
339
+ readonly Vertical: "vertical";
340
+ /** Each line turned 270° clockwise, read bottom to top; lines advance rightwards. */
341
+ readonly Vertical270: "vertical270";
342
+ /** WordArt vertical: upright letters stacked top to bottom. */
343
+ readonly WordArtVertical: "wordArtVertical";
344
+ /** East Asian vertical: upright ideographs, Latin text turned. */
345
+ readonly EastAsianVertical: "eastAsianVertical";
346
+ /** Mongolian vertical: top to bottom, lines advancing rightwards. */
347
+ readonly MongolianVertical: "mongolianVertical";
348
+ /** WordArt vertical read right to left. */
349
+ readonly WordArtVerticalRtl: "wordArtVerticalRtl";
350
+ };
351
+ type WritingMode = typeof WritingMode[keyof typeof WritingMode];
352
+ /** Text insets from the text rectangle, in pixels. */
353
+ interface InsetsJSON {
354
+ left?: number;
355
+ top?: number;
356
+ right?: number;
357
+ bottom?: number;
358
+ }
359
+ /** How a text body sits in the frame that holds it. */
360
+ interface BodyJSON {
361
+ /** Vertical anchor of the text in the frame. */
362
+ anchor?: VerticalAlignment;
363
+ /** Center the text box horizontally within the frame. */
364
+ anchorCenter?: boolean;
365
+ wrap?: 'none' | 'square';
366
+ insets?: InsetsJSON;
367
+ /** `shape` grows the frame to fit the text; `normal` shrinks the text to fit the frame. */
368
+ autoFit?: Autofit;
369
+ /** With `normal` autofit: the font scale applied, as a percentage. */
370
+ fontScale?: number;
371
+ /** With `normal` autofit: the line spacing reduction applied, as a percentage. */
372
+ lineSpacingReduction?: number;
373
+ vertical?: WritingMode;
374
+ /** What happens to text past the bottom: `visible`, `ellipsis` or `clip`. */
375
+ verticalOverflow?: Overflow;
376
+ /** What happens to text past the sides: `visible` or `clip`. */
377
+ horizontalOverflow?: Overflow;
378
+ upright?: boolean;
379
+ rightToLeftColumns?: boolean;
380
+ columns?: number;
381
+ /** Space between columns, in pixels. */
382
+ columnSpacing?: number;
383
+ fromWordArt?: boolean;
384
+ forceAntiAlias?: boolean;
385
+ compatibleLineSpacing?: boolean;
386
+ spaceFirstLastParagraph?: boolean;
387
+ /** A preset text warp (`prstTxWarp`) and its adjust values, in the preset grammar's units. */
388
+ warp?: {
389
+ preset: string;
390
+ adjustments?: Record<string, number>;
391
+ };
392
+ /** `bodyPr/extLst` as the file states it: an opaque DrawingML fragment, written back as it was. */
393
+ extLst?: string;
394
+ }
395
+ /** The paragraph formatting a text body's levels inherit (`lstStyle`). */
396
+ interface ListStyleJSON {
397
+ default?: IText.ParagraphPropertiesJSON;
398
+ /** Levels 1 to 9, by index; a level the file does not state is absent. */
399
+ levels?: (IText.ParagraphPropertiesJSON | undefined)[];
400
+ }
401
+ /**
402
+ * The text written in a frame — a shape's text body — as JSON: its paragraphs, how the body
403
+ * sits in the frame, and the list style the paragraphs inherit from.
404
+ */
405
+ interface JSON {
406
+ paragraphs: IText.ParagraphJSON[];
407
+ /** Text rotation in degrees, when the body states one. */
408
+ rotation?: number;
409
+ /** How the body sits in the frame; absent for the defaults. */
410
+ body?: BodyJSON;
411
+ listStyle?: ListStyleJSON;
412
+ }
328
413
  interface CloneableTextFrame extends ITextFrame {
329
414
  clone(visitor?: TextVisitor): ITextFrame;
330
415
  equals(other: ITextFrame): boolean;
@@ -26,7 +26,7 @@ import { ITextFrame } from './ITextFrame';
26
26
  export interface Line {
27
27
  /**
28
28
  * Where the strip's un-rotated top-left sits (content-box coordinate space). The strip is the
29
- * line's box (`size`) rotated by the layout {@link Layout.angle angle} **about this point**.
29
+ * line's box (`size`) rotated by the layout {@link RotatedLayout.angle angle} **about this point**.
30
30
  */
31
31
  origin: Point;
32
32
  /** The un-rotated strip box: the line's text width × line height. */
@@ -37,7 +37,7 @@ export interface Line {
37
37
  /**
38
38
  * The placed geometry for all lines — see {@link layoutLines}.
39
39
  */
40
- export interface Layout {
40
+ export interface RotatedLayout {
41
41
  /** The rotation, CSS degrees clockwise, normalized to [0, 360). Never 0 or 180 (callers skip). */
42
42
  angle: number;
43
43
  /**
@@ -102,5 +102,5 @@ export declare function getAdvance(lineHeight: number, deg: number): number;
102
102
  * The footprint may exceed the content box in either axis — rotated text overflows; clipping is a
103
103
  * consumer decision.
104
104
  */
105
- export declare function layoutLines(lineSizes: readonly Size[], deg: number, content: Bounds, horizontal: ITextFrame.HorizontalAlignment, vertical: ITextFrame.VerticalAlignment): Layout;
105
+ export declare function layoutLines(lineSizes: readonly Size[], deg: number, content: Bounds, horizontal: ITextFrame.HorizontalAlignment, vertical: ITextFrame.VerticalAlignment): RotatedLayout;
106
106
  //# sourceMappingURL=TextRotation.d.ts.map
@@ -36,7 +36,7 @@ export interface Column {
36
36
  /**
37
37
  * The placed geometry for all columns — see {@link layoutColumns}.
38
38
  */
39
- export interface Layout {
39
+ export interface StackedLayout {
40
40
  /** The slot pitch: the font's line height. Also the column width. */
41
41
  pitch: number;
42
42
  /** One entry per column, in reading order (left → right). */
@@ -79,5 +79,5 @@ export declare function slotCount(columns: readonly (readonly string[])[]): numb
79
79
  * @param vertical The vertical alignment, applied to EACH column: Top/Justify hug the top edge,
80
80
  * Center/Distributed center, Bottom (the default) hugs the bottom.
81
81
  */
82
- export declare function layoutColumns(columns: readonly (readonly string[])[], pitch: number, content: Bounds, horizontal: ITextFrame.HorizontalAlignment, vertical: ITextFrame.VerticalAlignment): Layout;
82
+ export declare function layoutColumns(columns: readonly (readonly string[])[], pitch: number, content: Bounds, horizontal: ITextFrame.HorizontalAlignment, vertical: ITextFrame.VerticalAlignment): StackedLayout;
83
83
  //# sourceMappingURL=TextStacked.d.ts.map
@@ -1,4 +1,5 @@
1
1
  import { IColor } from '../color';
2
+ import { IFont } from '../font';
2
3
  import { IFill, IStroke, IEffect } from '../fill';
3
4
  import { buildPalette as _buildPalette } from './_ThemeUtils';
4
5
  /**
@@ -210,6 +211,29 @@ export declare namespace ITheme {
210
211
  }
211
212
  interface FontSchemeJSON extends Partial<FontSchemeProperties> {
212
213
  }
214
+ /**
215
+ * One reference into a theme style list (`fillRef`, `lnRef`, `effectRef`): the one-based position
216
+ * in the list, `0` for none, and the color the list entry's placeholder (`phClr`) takes.
217
+ */
218
+ interface StyleRefJSON {
219
+ index: number;
220
+ color?: string;
221
+ }
222
+ /** The font a theme style refers to: the theme's `major` or `minor` font, or `none`, and the text color. */
223
+ interface FontRefJSON {
224
+ index: IFont.Scheme;
225
+ color?: string;
226
+ }
227
+ /**
228
+ * References into the theme's format scheme — what a shape or chart draws with wherever it
229
+ * states nothing of its own: DrawingML's `style` element.
230
+ */
231
+ interface StyleRefsJSON {
232
+ fill?: StyleRefJSON;
233
+ stroke?: StyleRefJSON;
234
+ effect?: StyleRefJSON;
235
+ font?: FontRefJSON;
236
+ }
213
237
  interface JSON {
214
238
  name: string;
215
239
  fonts?: ITheme.FontSchemeJSON;
@@ -99,8 +99,6 @@ export declare class Workbook implements IWorkbook {
99
99
  protected _activeSheetOffset: number;
100
100
  protected _sheets: ISheetCollection;
101
101
  protected _sheetOnNameChange: Map<number, () => void>;
102
- /** `true` while a revert or a restore announces the sheet list it landed on. */
103
- protected _restoringSheets: boolean;
104
102
  protected _sheetOnVisibilityChange: Map<number, () => void>;
105
103
  protected _sheetOnIndexChange: Map<number, () => void>;
106
104
  protected _protection: WorkbookProtection;
@@ -214,9 +212,18 @@ export declare class Workbook implements IWorkbook {
214
212
  /** @internal */
215
213
  protected _nextSheetName(sheetName?: string | null | undefined): string;
216
214
  /** @internal */
217
- protected _addSheet(notify: boolean, sheetName?: string | null, index?: number | null): ISheet;
215
+ protected _addSheet(notify: boolean, sheetName?: string | null, index?: number | null, uid?: string): ISheet;
218
216
  /** @internal */
219
217
  protected _updateSheetRefStates(sheetRefs: SheetRef[]): void;
218
+ /**
219
+ * Tells the calculation the sheet list as it is: every sheet, hidden ones included, in tab
220
+ * order. Called where an operation on the list completes - beside its `onSheetsChange`, or in
221
+ * `_updateSheetRef` for a ref replaced - and, for a sheet being added, once its ref is in, before
222
+ * its grid seeds. Never on a restore: the calculation's copy is restored with this one. A load
223
+ * tells the whole list before its first sheet, so a part of it is not told while the load builds
224
+ * them.
225
+ */
226
+ protected _tellSheets(): void;
220
227
  /** @internal */
221
228
  protected _addSheetRef(sheetRefAdd: SheetRef, index?: number | null): SheetRef;
222
229
  /**
@@ -334,7 +341,7 @@ export declare class Workbook implements IWorkbook {
334
341
  /** @internal */
335
342
  protected _sheetToWBEvent(listenerWB: ICellRange.Listener): ICellRange.Listener;
336
343
  /** @internal */
337
- protected _fromJSON(json: IWorkbook.JSON): void;
344
+ protected _fromJSON(json: IWorkbook.JSON, uids?: readonly string[]): void;
338
345
  /** @internal */
339
346
  protected _createScripts(json?: Record<string, IModule.JSON>): IScript;
340
347
  /** {@inheritDoc IWorkbook.toJSON} */
@@ -432,7 +439,11 @@ interface InternalCreateSheet {
432
439
  /**
433
440
  * The JSON representation of the sheet.
434
441
  */
435
- json: ISheet.JSON | null | undefined): ISheet;
442
+ json: ISheet.JSON | null | undefined,
443
+ /**
444
+ * The sheet's id ({@link ISheet.getId}), when the workbook named it before building it.
445
+ */
446
+ uid?: string): ISheet;
436
447
  }
437
448
  export {};
438
449
  //# sourceMappingURL=Workbook.d.ts.map
@@ -1 +0,0 @@
1
- const e=require("./D3Vlh9UOBKtvlXBL.cjs");let t=require("@sheetxl/primitives"),n=require("@sheetxl/utils");function r(t,n,r,i){if(!t||!n)return;let a=t.bind(e.ct.Table,``,{at:{scope:n,rowIndex:r,colIndex:i}});return a?t.resolve(e.ct.Table,a)?.toString():void 0}var i=/[A-Za-z_\\\u007F-\uFFFF][A-Za-z0-9_.\u007F-\uFFFF]*$/,a=/[A-Za-z0-9_.)\]}"'!#\u007F-\uFFFF]/;function o(e,t){for(let n=t+1;n<e.length;n++){let t=e[n];if(t!==`'`){if(t===`]`)return n+1;if(t===`[`)return null}else n++}return-1}function s(t,n,r,s){let c=0,l=-1;for(let e=0;e<n.length;e++){let t=n[e];c>0&&t===`'`?e++:t===`[`?(c===0&&(l=e),c++):t===`]`&&c>0&&c--}if(c===0)return!1;let u=n.slice(0,l);if((u.split(`"`).length-1)%2==1)return!1;let d=t.length>0?t[t.length-1]:void 0,f=``,p=!1,m=i.exec(u);if(m){let e=m.index>0?u[m.index-1]:d?.text?.at(-1)??``;if(/[A-Za-z0-9_.]/.test(e))return!1;f=m[0],u=u.slice(0,m.index)}else u.length===0&&d?.text&&i.exec(d.text)?.index===0&&(d.type===e._t.Named&&!d.value?.scope||d.type===e._t.TableReference)&&(f=d.text,p=!0);if(!p){let e=u.length>0?u[u.length-1]:d?.text?.at(-1)??``;if(e&&a.test(e))return!1}let h=f||(s?.()??``),g=[],_=(e,t,n)=>{g.push({type:e,value:t,text:t,context:{name:h,argIndex:n,type:`table`}})},v=(t,n,r,i)=>{let a=t.startsWith(`#`),o=r?i?`column`:a?`specifier`:t?`column`:`any`:void 0,s=o?{table:h,name:t,partial:o}:{table:h,name:t};g.push({type:a?e._t.TableSpecifier:e._t.TableColumn,value:s,text:t,context:{name:h,argIndex:n,type:`table`}})},y=(t,n,r,i)=>{_(e._t.Paren,`[`,r),v(t.slice(1,n?-1:void 0),r,!n,i),n&&_(e._t.Paren,`]`,r)};_(e._t.Paren,`[`,-1);let b=n.slice(l+1);if(b.startsWith(`[`)){let t=0,n=!1,r=0;for(;r<b.length;){let i=b[r];if(i===`[`){let e=o(b,r);if(e===null)return!1;let i=e!==-1;if(y(b.slice(r,i?e:b.length),i,t,n),n=!1,!i)break;r=e}else if(i===`,`)_(e._t.Separator,`,`,t++),r++;else if(i===`:`)_(e._t.Infix,`:`,t),r++;else if(i===`@`)_(e._t.Prefix,`@`,t),n=!0,r++;else{if(i!==` `)return!1;{let n=r;for(;b[n]===` `;)n++;_(e._t.Whitespace,b.slice(r,n),t),r=n}}}}else{let t=b,n=t.startsWith(`@`);if(n&&(_(e._t.Prefix,`@`,0),t=t.slice(1)),t.startsWith(`[`)){if(o(t,0)!==-1)return!1;y(t,!1,0,n)}else{if(/(^|[^'])[[\]]/.test(t)||t.startsWith(`#`)&&t.includes(`,`))return!1;v(t,0,!0,n)}}if(u){let n={type:e._t.Unparsed,value:u,text:u};r&&(n.context=r),t.push(n)}if(p){let n={...d,type:e._t.TableReference,value:f,text:f};delete n.referenceIndex,t[t.length-1]=n}else if(f){let n={type:e._t.TableReference,value:f,text:f};r&&(n.context=r),t.push(n)}for(let e of g)t.push(e);return!0}exports.FormulaCompiler=class{constructor(t){t={...t},this._editing=t.profile===`editing`,this._parser=new e.dt(t)}compile(n,i,a,o,s,c,l,u,d){if(o.length===0){let r=new t.FormulaError.Parse(e.lt);return this._compileUnparsed(n,s,o,{input:o,cause:r,causes:[r]})}if(o.length>e.vt.MAX_EXPRESSION_LENGTH){let r=new t.FormulaError.Parse(e.ut(o.length,e.vt.MAX_EXPRESSION_LENGTH));return this._compileUnparsed(n,s,o,{input:o,cause:r,causes:[r]})}let f,p,m=[];try{let e=this._parser.parse(i,a,o);f=e.root,m=e.errors,u&&f&&m.length===0&&(f.legacyIntersect=!0)}catch(e){p=t.FormulaError.isError(e,t.FormulaError.Code.Parse)?e:new t.FormulaError.Parse(e.message,e)}let h=[];for(let t of m)h.push(e.X(t));if(f){let n=e.Q(f,c??null);typeof n==`string`?h.push(new t.FormulaError.Parse(n)):f=n,e.q(f,c??null)&&h.push(new t.FormulaError.Parse(`The implicit intersection operator ' ' requires a cell or range on both sides`)),e.K(f,c??null)&&h.push(new t.FormulaError.Parse(`The spill anchor operator '#' requires a cell or range`)),e.Y(f,c??null)&&h.push(new t.FormulaError.Parse(`Expected a reference; a value cannot be converted to one.`));let r=e.H(f,c??null);r&&h.push(new t.FormulaError.Parse(r));let i=e.U(f,c??null);i&&h.push(new t.FormulaError.Parse(i));let a=e.W(f,c??null);a&&h.push(new t.FormulaError.Parse(a));let o=e.G(f);o&&h.push(new t.FormulaError.Parse(o))}h.length>0&&!p&&(p=h[0]);let g=null;if(p&&(g={input:o,cause:p,causes:h.length>0?h:[p]}),!f){if(this._editing){let e=this._recoverCompiled(n,i,a,o,s,g,l);if(e)return e}return this._compileUnparsed(n,s,o,g,this._editing,()=>r(s,l,i,a))}if(f=e.$(f,c??null),f=e.B(f,c??null),s){let n=this._editing?d:{mint:!d?.book,...d};f=e.Z(f,s,l,n,{rowIndex:i,colIndex:a});let r=e.J(f,s);if(r){let e=new t.FormulaError.Parse(r);h.push(e),g={input:o,cause:g?.cause??e,causes:g?[...g.causes,e]:[e]}}}let _=e.V(n,s,f,this._editing,g,c??null);return this._editing&&g&&e.et(_.getTokens(),s)!==o?this._recoverCompiled(n,i,a,o,s,g,l)||this._compileUnparsed(n,s,o,g,!0):_}autoCorrect(e){let t=function(e){let t=0,n=null;for(let r=0;r<e.length;r++){let i=e[r];n?i===n&&(n=null):t>0?i===`'`?r++:i===`[`?t++:i===`]`&&t--:i===`"`||i===`'`?n=i:i===`[`&&t++}return n?0:t}(e),n=e+`]`.repeat(t),r;try{let e=this._parser.getLexer().tokenize(n,!1);if(e.errors.length>0)return null;r=e.tokens}catch{return null}let i=[];for(let e of r){let t=e.tokenType?.name;if(t===`OpenParen`)i.push(`)`);else if(t===`OpenCurlyParen`)i.push(`}`);else if((t===`CloseParen`||t===`CloseCurlyParen`)&&i.pop()!==(t===`CloseParen`?`)`:`}`))return null}return i.length===0&&t===0?null:n+i.reverse().join(``)}_compileUnparsed(t,r,i,a,o=!1,c){let l={runtime:t,symbols:r,getFunction:null,ast:null,evaluations:n.CommonUtils.EmptyArray,executions:n.CommonUtils.EmptyArray,bindings:n.CommonUtils.EmptyArray,referencesAbsolute:n.CommonUtils.EmptyArray,referencesExecute:n.CommonUtils.EmptyArray,referencesRelative:n.CommonUtils.EmptyArray,referencesRoot:n.CommonUtils.EmptyArray,referenceIndices:n.CommonUtils.EmptyArray,formatReferenceIndices:n.CommonUtils.EmptyArray,getTokens:()=>{let t=[];return o&&s(t,i,void 0,c)?t:[{type:e._t.Unparsed,value:i,text:i}]},namedIds:n.CommonUtils.EmptyArray,symbolIds:n.CommonUtils.EmptyArray,hasTotals:!1,hasVolatile:!1,isBlankCacheable:!1,isBlankCacheableArray:!1,isReferenceOnly:!1,error:a,transform:()=>l};return l}_recoverCompiled(t,n,i,a,o,s,c){let l,u=a.length;try{let e=this._parser.getLexer().tokenize(a,!1);l=e.tokens,e.errors.length>0&&(u=Math.min(u,e.errors[0].offset))}catch{return null}let d=[];for(let e=l.length-1;e>=0&&d.length<24;e--){let t=(l[e].endOffset??-1)+1;t>0&&t<a.length&&t<=u&&d.push(t)}for(let l of d){let u=a.slice(0,l),d,f;try{d=this._parser.parse(n,i,u).root}catch{continue}if(!d||d.type===e._t.Unparsed)continue;try{let r=e.B(d,null),a=o?e.Z(r,o,c,void 0,{rowIndex:n,colIndex:i}):r;f=e.V(t,o,a,!0,s)}catch{continue}if(e.et(f.getTokens(),o)!==u)continue;let p=a.slice(l);if(p.length===0)return f;let m,h={...f,getTokens:()=>(m||(m=[...f.getTokens()],this._appendUnparsedTail(m,p,()=>r(o,c,n,i))),m),transform:()=>h};return h}return null}_appendUnparsedTail(t,n,r){let i=[];for(let n of t){if(n.type===e._t.Whitespace)continue;let t=n.type===e._t.Paren||n.type===e._t.Type?n.text:void 0,r=i.length>0?i[i.length-1]:void 0;if(n.type===e._t.Separator&&r){let e=r.declared[r.declared.length-1];r.ctx?.type===`let`&&r.ctx.argIndex===-1&&r.lambda?.argTokens===r.argTokens&&e?.argIndex===r.argIndex-1&&(e.params=r.lambda.params),r.argIndex++,r.argTokens=0,r.lambda=void 0;continue}if(r&&r.argTokens++,t===`(`||t===`[`||t===`{`)i.push({ctx:n.context,argIndex:0,declared:[],argTokens:0,leadsArg:r?.argTokens===2});else if(t===`)`||t===`]`||t===`}`){let e=i.pop(),t=i.length>0?i[i.length-1]:void 0;t&&e?.leadsArg&&e.ctx?.type===`lambda`&&e.ctx.argIndex===-1&&(t.lambda={params:e.declared.map(({name:e,optional:t})=>t?{name:e,optional:t}:{name:e}),argTokens:t.argTokens})}else if(n.type===e._t.Parameter&&r&&n.value?.declaration){let e=n.value;r.declared.push(e.optional?{name:e.name,argIndex:r.argIndex,optional:!0}:{name:e.name,argIndex:r.argIndex})}}let a=i.length>0?i[i.length-1]:void 0,o=a?.ctx?{...a.ctx,argIndex:a.ctx.argIndex===-1?a.argIndex:a.ctx.argIndex}:void 0;if(o&&a.ctx.argIndex===-1&&(o.type===`let`||o.type===`lambda`)){let t=o.type===`let`?2:1,n=o.bound;for(let r of a.declared){if(o.argIndex<r.argIndex+t)continue;let{name:i,params:a}=r;n=e.z(n,a?{name:i,params:a}:{name:i})}n&&(o.bound=n)}let c=(n,r)=>{let i=r?{type:e._t.Named,value:{name:n},text:n}:{type:e._t.Unparsed,value:n,text:n};o&&(i.context=o),t.push(i)};if(s(t,n,o,r))return;let l=/[A-Za-z_][A-Za-z0-9_]*$/.exec(n),u=l?l.index:-1,d=u>0?n[u-1]:``;for(let e=t.length-1;u===0&&e>=0&&!d;e--)d=t[e].text?.at(-1)??``;u>=0&&!/[A-Za-z0-9_.]/.test(d)?(u>0&&c(n.slice(0,u)),c(n.slice(u),!0)):c(n)}},exports.appendPartialStructuredReference=s;
@@ -1 +0,0 @@
1
- const e=require("./D3Vlh9UOBKtvlXBL.cjs");exports.initializeFunctions=e.R;