@grid-is/agent-tools 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -0
- package/dist/dist-B8AoRnKf.js +165 -0
- package/dist/index-DlMJis5l.d.ts +1899 -0
- package/dist/index.d.ts +2 -1546
- package/dist/index.js +3 -167
- package/dist/tools.d.ts +2 -0
- package/dist/tools.js +1 -0
- package/package.json +11 -4
|
@@ -0,0 +1,1899 @@
|
|
|
1
|
+
import { Cell, CellValue, FormulaError, Model, WorkbookDescription } from "@grid-is/apiary";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region node_modules/@jsfkit/types/dist/index.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* A whole number without a fractional value.
|
|
6
|
+
*
|
|
7
|
+
* @group Workbooks
|
|
8
|
+
*/
|
|
9
|
+
type integer = number;
|
|
10
|
+
/**
|
|
11
|
+
* A numeric value measured in pixels.
|
|
12
|
+
*
|
|
13
|
+
* @min 0
|
|
14
|
+
* @group Workbooks
|
|
15
|
+
*/
|
|
16
|
+
type PixelValue = number;
|
|
17
|
+
/**
|
|
18
|
+
* Automatic colour choice. The application decides on what exact colour to use. Typically this
|
|
19
|
+
* means black for text, white for background.
|
|
20
|
+
*
|
|
21
|
+
* @group Colors
|
|
22
|
+
*/
|
|
23
|
+
type AutoColor = {
|
|
24
|
+
type: 'auto';
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Represents a single transformation that can be applied to a colour.
|
|
28
|
+
*
|
|
29
|
+
* Most transforms have a `type` that specifies the kind of transformation, and a `value` that
|
|
30
|
+
* provides the necessary parameter for that transformation. The exact meaning and valid range of
|
|
31
|
+
* `value` depends on the `type` of transform. The exception are a handful of whole-colour
|
|
32
|
+
* transformations that affect the entire colour; they have `type` but no `value.`
|
|
33
|
+
*
|
|
34
|
+
* The supported transform types include:
|
|
35
|
+
*
|
|
36
|
+
* - Tint and shade: blend the colour towards white (tint) or black (shade) by a specified
|
|
37
|
+
* percentage.
|
|
38
|
+
* - Alpha: adjust the opacity of the colour using various methods (absolute value, multiplicative,
|
|
39
|
+
* or additive).
|
|
40
|
+
* - Hue, saturation, and luminance: rotate a colour attribute of the colour by a specified amount
|
|
41
|
+
* (absolute, multiplicative, or additive).
|
|
42
|
+
* - Per-channel RGB adjustments: modify individual red, green, or blue channels (absolute,
|
|
43
|
+
* multiplicative, or additive).
|
|
44
|
+
* - Whole-colour operations: apply transformations that affect the entire colour (complement,
|
|
45
|
+
* invert, grayscale, gamma adjustments).
|
|
46
|
+
*
|
|
47
|
+
* @group Colors
|
|
48
|
+
*/
|
|
49
|
+
type ColorTransform = {
|
|
50
|
+
/**
|
|
51
|
+
* Produces a lighter version of the input colour. A 10% tint is 10% of the input colour
|
|
52
|
+
* combined with 90% white. */
|
|
53
|
+
type: 'tint';
|
|
54
|
+
/**
|
|
55
|
+
* Percentage (clamped to 0-100).
|
|
56
|
+
* @min 0
|
|
57
|
+
* @max 100
|
|
58
|
+
*/
|
|
59
|
+
value: number;
|
|
60
|
+
} | {
|
|
61
|
+
/**
|
|
62
|
+
* Produces a darker version of the input colour. A 10% shade is 10% of the input colour
|
|
63
|
+
* combined with 90% black.
|
|
64
|
+
*/
|
|
65
|
+
type: 'shade';
|
|
66
|
+
/**
|
|
67
|
+
* Percentage (clamped to 0-100).
|
|
68
|
+
* @min 0
|
|
69
|
+
* @max 100
|
|
70
|
+
*/
|
|
71
|
+
value: number;
|
|
72
|
+
} | {
|
|
73
|
+
/** Alters the input colour to have the specified opacity, but with its colour unchanged. */
|
|
74
|
+
type: 'alpha';
|
|
75
|
+
/**
|
|
76
|
+
* Percentage (clamped to 0-100).
|
|
77
|
+
* @min 0
|
|
78
|
+
* @max 100
|
|
79
|
+
*/
|
|
80
|
+
value: number;
|
|
81
|
+
} | {
|
|
82
|
+
/**
|
|
83
|
+
* Produces a more or less opaque version of the input colour. An alpha modulate never increases
|
|
84
|
+
* the alpha beyond 100%. A 200% alpha modulate makes an input colour twice as opaque as before.
|
|
85
|
+
* A 50% alpha modulate makes an input colour half as opaque as before.
|
|
86
|
+
*/
|
|
87
|
+
type: 'alphaMod';
|
|
88
|
+
/**
|
|
89
|
+
* Positive percentage.
|
|
90
|
+
* @min 0
|
|
91
|
+
*/
|
|
92
|
+
value: number;
|
|
93
|
+
} | {
|
|
94
|
+
/**
|
|
95
|
+
* Produces a more or less opaque version of the input colour.
|
|
96
|
+
*
|
|
97
|
+
* Increases or decreases the input alpha percentage by the specified percentage offset. A 10%
|
|
98
|
+
* alpha offset increases a 50% opacity to 60%. A -10% alpha offset decreases a 50% opacity to
|
|
99
|
+
* 40%. The transformed alpha values are limited to a range of 0 to 100%. A 10% alpha offset
|
|
100
|
+
* increase to a 100% opaque object still results in 100% opacity.
|
|
101
|
+
*/
|
|
102
|
+
type: 'alphaOff';
|
|
103
|
+
/**
|
|
104
|
+
* Percentage (clamped to -100 to 100).
|
|
105
|
+
* @min -100
|
|
106
|
+
* @max 100
|
|
107
|
+
*/
|
|
108
|
+
value: number;
|
|
109
|
+
} | {
|
|
110
|
+
/**
|
|
111
|
+
* Alters the input colour so it has the specified hue, but with its saturation and luminance
|
|
112
|
+
* unchanged.
|
|
113
|
+
*/
|
|
114
|
+
type: 'hue';
|
|
115
|
+
/**
|
|
116
|
+
* Degrees (clamped to 0-360).
|
|
117
|
+
* @min 0
|
|
118
|
+
* @max 360
|
|
119
|
+
*/
|
|
120
|
+
value: number;
|
|
121
|
+
} | {
|
|
122
|
+
/**
|
|
123
|
+
* Modulates the input colour's hue by the given percentage. A 50% hue modulate decreases the
|
|
124
|
+
* angular hue value by half. A 200% hue modulate doubles the angular hue value.
|
|
125
|
+
*/
|
|
126
|
+
type: 'hueMod';
|
|
127
|
+
/**
|
|
128
|
+
* Positive percentage.
|
|
129
|
+
* @min 0
|
|
130
|
+
*/
|
|
131
|
+
value: number;
|
|
132
|
+
} | {
|
|
133
|
+
/**
|
|
134
|
+
* Produces the input colour with its hue shifted, but with its saturation and luminance
|
|
135
|
+
* unchanged.
|
|
136
|
+
*/
|
|
137
|
+
type: 'hueOff';
|
|
138
|
+
/** Degrees. */
|
|
139
|
+
value: number;
|
|
140
|
+
} | {
|
|
141
|
+
/**
|
|
142
|
+
* Alters the input colour so it has the specified saturation, but with its hue and luminance
|
|
143
|
+
* unchanged.
|
|
144
|
+
*/
|
|
145
|
+
type: 'sat';
|
|
146
|
+
/** Unbounded percentage. */
|
|
147
|
+
value: number;
|
|
148
|
+
} | {
|
|
149
|
+
/**
|
|
150
|
+
* Modulates the input colour's saturation by the given percentage.
|
|
151
|
+
*
|
|
152
|
+
* A 50% saturation modulate reduces the saturation by half. A 200% saturation modulate doubles
|
|
153
|
+
* the saturation.
|
|
154
|
+
*/
|
|
155
|
+
type: 'satMod';
|
|
156
|
+
/** Unbounded percentage. */
|
|
157
|
+
value: number;
|
|
158
|
+
} | {
|
|
159
|
+
/**
|
|
160
|
+
* Produces the input colour with its saturation shifted, but with its hue and luminance
|
|
161
|
+
* unchanged. A 10% offset to 20% saturation yields 30% saturation.
|
|
162
|
+
*/
|
|
163
|
+
type: 'satOff';
|
|
164
|
+
/** Unbounded percentage. */
|
|
165
|
+
value: number;
|
|
166
|
+
} | {
|
|
167
|
+
/**
|
|
168
|
+
* Alters the input colour so it has the specified luminance, but with its hue and saturation
|
|
169
|
+
* unchanged.
|
|
170
|
+
*/
|
|
171
|
+
type: 'lum';
|
|
172
|
+
/** Unbounded percentage. */
|
|
173
|
+
value: number;
|
|
174
|
+
} | {
|
|
175
|
+
/**
|
|
176
|
+
* Alters the input colour's luminance modulated by the given percentage.
|
|
177
|
+
*
|
|
178
|
+
* A 50% luminance modulate reduces the luminance by half. A 200% luminance modulate doubles the
|
|
179
|
+
* luminance.
|
|
180
|
+
*/
|
|
181
|
+
type: 'lumMod';
|
|
182
|
+
/** Unbounded percentage. */
|
|
183
|
+
value: number;
|
|
184
|
+
} | {
|
|
185
|
+
/**
|
|
186
|
+
* Produces the input colour with its luminance shifted, but with its hue and saturation
|
|
187
|
+
* unchanged.
|
|
188
|
+
*/
|
|
189
|
+
type: 'lumOff';
|
|
190
|
+
/** Unbounded percentage. */
|
|
191
|
+
value: number;
|
|
192
|
+
} | {
|
|
193
|
+
/**
|
|
194
|
+
* Produces the input colour with the specified red component. The green and blue colour
|
|
195
|
+
* components unchanged.
|
|
196
|
+
*/
|
|
197
|
+
type: 'red';
|
|
198
|
+
/** Unbounded percentage. */
|
|
199
|
+
value: number;
|
|
200
|
+
} | {
|
|
201
|
+
/**
|
|
202
|
+
* Alters the input colour so its red component is modulated by the given percentage. A 50% red
|
|
203
|
+
* modulate reduces the red component by half. A 200% red modulate doubles the red component.
|
|
204
|
+
*/
|
|
205
|
+
type: 'redMod';
|
|
206
|
+
/** Unbounded percentage. */
|
|
207
|
+
value: number;
|
|
208
|
+
} | {
|
|
209
|
+
/**
|
|
210
|
+
* Alters the input colour so its red component is shifted. Its green and blue colour components
|
|
211
|
+
* unchanged.
|
|
212
|
+
*/
|
|
213
|
+
type: 'redOff';
|
|
214
|
+
/** Unbounded percentage. */
|
|
215
|
+
value: number;
|
|
216
|
+
} | {
|
|
217
|
+
/**
|
|
218
|
+
* Provides the input colour with the specified green component. Its red and blue colour
|
|
219
|
+
* components unchanged.
|
|
220
|
+
*/
|
|
221
|
+
type: 'green';
|
|
222
|
+
/** Unbounded percentage. */
|
|
223
|
+
value: number;
|
|
224
|
+
} | {
|
|
225
|
+
/**
|
|
226
|
+
* Modulates the input colour's green component by the given percentage.
|
|
227
|
+
*
|
|
228
|
+
* A 50% green modulate reduces the green component by half. A 200% green modulate doubles the
|
|
229
|
+
* green component.
|
|
230
|
+
*/
|
|
231
|
+
type: 'greenMod';
|
|
232
|
+
/** Unbounded percentage. */
|
|
233
|
+
value: number;
|
|
234
|
+
} | {
|
|
235
|
+
/**
|
|
236
|
+
* Alters the input colour so its green component is shifted. Its red and blue colour components
|
|
237
|
+
* unchanged.
|
|
238
|
+
*/
|
|
239
|
+
type: 'greenOff';
|
|
240
|
+
/** Unbounded percentage. */
|
|
241
|
+
value: number;
|
|
242
|
+
} | {
|
|
243
|
+
/**
|
|
244
|
+
* Provides the input colour with the specified blue component. Its red and green colour
|
|
245
|
+
* components unchanged.
|
|
246
|
+
*/
|
|
247
|
+
type: 'blue';
|
|
248
|
+
/** Unbounded percentage. */
|
|
249
|
+
value: number;
|
|
250
|
+
} | {
|
|
251
|
+
/**
|
|
252
|
+
* Modulates the input colour's blue component by the given percentage.
|
|
253
|
+
*
|
|
254
|
+
* A 50% blue modulate reduces the blue component by half. A 200% blue modulate doubles the blue
|
|
255
|
+
* component.
|
|
256
|
+
*/
|
|
257
|
+
type: 'blueMod';
|
|
258
|
+
/** Unbounded percentage. */
|
|
259
|
+
value: number;
|
|
260
|
+
} | {
|
|
261
|
+
/**
|
|
262
|
+
* Alters the input colour so its blue component is shifted, but with its red and green colour
|
|
263
|
+
* components unchanged.
|
|
264
|
+
*/
|
|
265
|
+
type: 'blueOff';
|
|
266
|
+
/** Unbounded percentage. */
|
|
267
|
+
value: number;
|
|
268
|
+
} | {
|
|
269
|
+
/**
|
|
270
|
+
* Specifies that the colour rendered should be the complement of the input colour with the
|
|
271
|
+
* complement being defined as such.
|
|
272
|
+
*/
|
|
273
|
+
type: 'comp';
|
|
274
|
+
} | {
|
|
275
|
+
/**
|
|
276
|
+
* Specifies the inverse of the input colour. For example, the inverse of red (1, 0, 0) is cyan
|
|
277
|
+
* (0, 1, 1 ).
|
|
278
|
+
*/
|
|
279
|
+
type: 'inv';
|
|
280
|
+
} | {
|
|
281
|
+
/**
|
|
282
|
+
* Specifies a grey scale of the input colour, taking into relative intensities of the red,
|
|
283
|
+
* green, and blue primaries.
|
|
284
|
+
*/
|
|
285
|
+
type: 'gray';
|
|
286
|
+
} | {
|
|
287
|
+
/**
|
|
288
|
+
* Specifies that the output colour rendered by the generating application should be the sRGB
|
|
289
|
+
* gamma shift of the input colour.
|
|
290
|
+
*/
|
|
291
|
+
type: 'gamma';
|
|
292
|
+
} | {
|
|
293
|
+
/**
|
|
294
|
+
* Specifies that the output colour rendered by the generating application should be the inverse
|
|
295
|
+
* sRGB gamma shift of the input colour.
|
|
296
|
+
*/
|
|
297
|
+
type: 'invGamma';
|
|
298
|
+
};
|
|
299
|
+
/**
|
|
300
|
+
* Hue / saturation / lightness.
|
|
301
|
+
*
|
|
302
|
+
* Hue, saturation and lightness follow CSS Color Level 4 conventions, but using the range (0-100)
|
|
303
|
+
* rather than (0-1).
|
|
304
|
+
*
|
|
305
|
+
* @group Colors
|
|
306
|
+
*/
|
|
307
|
+
type HslColor = {
|
|
308
|
+
type: 'hsl';
|
|
309
|
+
/**
|
|
310
|
+
* Degrees (0-360). Must be positive.
|
|
311
|
+
* @min 0
|
|
312
|
+
* @max 360
|
|
313
|
+
*/
|
|
314
|
+
hue: number;
|
|
315
|
+
/** Percentage. */
|
|
316
|
+
saturation: number;
|
|
317
|
+
/** Percentage. */
|
|
318
|
+
lightness: number;
|
|
319
|
+
};
|
|
320
|
+
/**
|
|
321
|
+
* A legacy colour indexing scheme, still occasionally required for backwards compatibility.
|
|
322
|
+
*
|
|
323
|
+
* An enumerated set of RGB colours values that correspond to a zero-based index.
|
|
324
|
+
*
|
|
325
|
+
* The table below lists the mapping from indexed colour value to RGB value. Note that indexes 8-15
|
|
326
|
+
* are copies of indexes 0-7. All colours are fully opaque.
|
|
327
|
+
*
|
|
328
|
+
* | Index | RGB hex colour |
|
|
329
|
+
* |------:|------------------:|
|
|
330
|
+
* | 0 | #000000 |
|
|
331
|
+
* | 1 | #FFFFFF |
|
|
332
|
+
* | 2 | #FF0000 |
|
|
333
|
+
* | 3 | #00FF00 |
|
|
334
|
+
* | 4 | #0000FF |
|
|
335
|
+
* | 5 | #FFFF00 |
|
|
336
|
+
* | 6 | #FF00FF |
|
|
337
|
+
* | 7 | #00FFFF |
|
|
338
|
+
* | 8 | #000000 |
|
|
339
|
+
* | 9 | #FFFFFF |
|
|
340
|
+
* | 10 | #FF0000 |
|
|
341
|
+
* | 11 | #00FF00 |
|
|
342
|
+
* | 12 | #0000FF |
|
|
343
|
+
* | 13 | #FFFF00 |
|
|
344
|
+
* | 14 | #FF00FF |
|
|
345
|
+
* | 15 | #00FFFF |
|
|
346
|
+
* | 16 | #800000 |
|
|
347
|
+
* | 17 | #008000 |
|
|
348
|
+
* | 18 | #000080 |
|
|
349
|
+
* | 19 | #808000 |
|
|
350
|
+
* | 20 | #800080 |
|
|
351
|
+
* | 21 | #008080 |
|
|
352
|
+
* | 22 | #C0C0C0 |
|
|
353
|
+
* | 23 | #808080 |
|
|
354
|
+
* | 24 | #9999FF |
|
|
355
|
+
* | 25 | #993366 |
|
|
356
|
+
* | 26 | #FFFFCC |
|
|
357
|
+
* | 27 | #CCFFFF |
|
|
358
|
+
* | 28 | #660066 |
|
|
359
|
+
* | 29 | #FF8080 |
|
|
360
|
+
* | 30 | #0066CC |
|
|
361
|
+
* | 31 | #CCCCFF |
|
|
362
|
+
* | 32 | #000080 |
|
|
363
|
+
* | 33 | #FF00FF |
|
|
364
|
+
* | 34 | #FFFF00 |
|
|
365
|
+
* | 35 | #00FFFF |
|
|
366
|
+
* | 36 | #800080 |
|
|
367
|
+
* | 37 | #800000 |
|
|
368
|
+
* | 38 | #008080 |
|
|
369
|
+
* | 39 | #0000FF |
|
|
370
|
+
* | 40 | #00CCFF |
|
|
371
|
+
* | 41 | #CCFFFF |
|
|
372
|
+
* | 42 | #CCFFCC |
|
|
373
|
+
* | 43 | #FFFF99 |
|
|
374
|
+
* | 44 | #99CCFF |
|
|
375
|
+
* | 45 | #FF99CC |
|
|
376
|
+
* | 46 | #CC99FF |
|
|
377
|
+
* | 47 | #FFCC99 |
|
|
378
|
+
* | 48 | #3366FF |
|
|
379
|
+
* | 49 | #33CCCC |
|
|
380
|
+
* | 50 | #99CC00 |
|
|
381
|
+
* | 51 | #FFCC00 |
|
|
382
|
+
* | 52 | #FF9900 |
|
|
383
|
+
* | 53 | #FF6600 |
|
|
384
|
+
* | 54 | #666699 |
|
|
385
|
+
* | 55 | #969696 |
|
|
386
|
+
* | 56 | #003366 |
|
|
387
|
+
* | 57 | #339966 |
|
|
388
|
+
* | 58 | #003300 |
|
|
389
|
+
* | 59 | #333300 |
|
|
390
|
+
* | 60 | #993300 |
|
|
391
|
+
* | 61 | #993366 |
|
|
392
|
+
* | 62 | #333399 |
|
|
393
|
+
* | 63 | #333333 |
|
|
394
|
+
* | 64 | System foreground |
|
|
395
|
+
* | 65 | System background |
|
|
396
|
+
*
|
|
397
|
+
* @group Colors
|
|
398
|
+
*/
|
|
399
|
+
type IndexedColor = {
|
|
400
|
+
type: 'indexed';
|
|
401
|
+
value: number;
|
|
402
|
+
};
|
|
403
|
+
/**
|
|
404
|
+
* A named colour from a predefined collection of colours.
|
|
405
|
+
*
|
|
406
|
+
* The preset colours are analogous to the extended colour keywords from CSS Colors Level 3,
|
|
407
|
+
* but using camel casing and abbreviated forms (e.g. `dkMagenta` vs `darkmagenta`).
|
|
408
|
+
*
|
|
409
|
+
* @group Colors
|
|
410
|
+
*/
|
|
411
|
+
type PresetColor = {
|
|
412
|
+
type: 'preset';
|
|
413
|
+
/** Preset name, e.g. "aliceBlue", "coral". */
|
|
414
|
+
value: 'aliceBlue' | 'antiqueWhite' | 'aqua' | 'aquamarine' | 'azure' | 'beige' | 'bisque' | 'black' | 'blanchedAlmond' | 'blue' | 'blueViolet' | 'brown' | 'burlyWood' | 'cadetBlue' | 'chartreuse' | 'chocolate' | 'coral' | 'cornflowerBlue' | 'cornsilk' | 'crimson' | 'cyan' | 'dkBlue' | 'dkCyan' | 'dkGoldenrod' | 'dkGray' | 'dkGreen' | 'dkKhaki' | 'dkMagenta' | 'dkOliveGreen' | 'dkOrange' | 'dkOrchid' | 'dkRed' | 'dkSalmon' | 'dkSeaGreen' | 'dkSlateBlue' | 'dkSlateGray' | 'dkTurquoise' | 'dkViolet' | 'deepPink' | 'deepSkyBlue' | 'dimGray' | 'dodgerBlue' | 'firebrick' | 'floralWhite' | 'forestGreen' | 'fuchsia' | 'gainsboro' | 'ghostWhite' | 'gold' | 'goldenrod' | 'gray' | 'green' | 'greenYellow' | 'honeydew' | 'hotPink' | 'indianRed' | 'indigo' | 'ivory' | 'khaki' | 'lavender' | 'lavenderBlush' | 'lawnGreen' | 'lemonChiffon' | 'ltBlue' | 'ltCoral' | 'ltCyan' | 'ltGoldenrodYellow' | 'ltGray' | 'ltGreen' | 'ltPink' | 'ltSalmon' | 'ltSeaGreen' | 'ltSkyBlue' | 'ltSlateGray' | 'ltSteelBlue' | 'ltYellow' | 'lime' | 'limeGreen' | 'linen' | 'magenta' | 'maroon' | 'medAquamarine' | 'medBlue' | 'medOrchid' | 'medPurple' | 'medSeaGreen' | 'medSlateBlue' | 'medSpringGreen' | 'medTurquoise' | 'medVioletRed' | 'midnightBlue' | 'mintCream' | 'mistyRose' | 'moccasin' | 'navajoWhite' | 'navy' | 'oldLace' | 'olive' | 'oliveDrab' | 'orange' | 'orangeRed' | 'orchid' | 'paleGoldenrod' | 'paleGreen' | 'paleTurquoise' | 'paleVioletRed' | 'papayaWhip' | 'peachPuff' | 'peru' | 'pink' | 'plum' | 'powderBlue' | 'purple' | 'red' | 'rosyBrown' | 'royalBlue' | 'saddleBrown' | 'salmon' | 'sandyBrown' | 'seaGreen' | 'seaShell' | 'sienna' | 'silver' | 'skyBlue' | 'slateBlue' | 'slateGray' | 'snow' | 'springGreen' | 'steelBlue' | 'tan' | 'teal' | 'thistle' | 'tomato' | 'turquoise' | 'violet' | 'wheat' | 'white' | 'whiteSmoke' | 'yellow' | 'yellowGreen';
|
|
415
|
+
};
|
|
416
|
+
/**
|
|
417
|
+
* A colour in Microsoft's scRGB colour space.
|
|
418
|
+
*
|
|
419
|
+
* Equivalent to CSS `srgb-linear` colour space.
|
|
420
|
+
*
|
|
421
|
+
* @group Colors
|
|
422
|
+
*/
|
|
423
|
+
type ScRgbColor = {
|
|
424
|
+
type: 'scrgb';
|
|
425
|
+
/** Red value as a percentage. Can be outside the range 0-100. */
|
|
426
|
+
red: number;
|
|
427
|
+
/** Green value as a percentage. Can be outside the range 0-100. */
|
|
428
|
+
green: number;
|
|
429
|
+
/** Blue value as a percentage. Can be outside the range 0-100. */
|
|
430
|
+
blue: number;
|
|
431
|
+
};
|
|
432
|
+
/**
|
|
433
|
+
* Standard sRGB colour space.
|
|
434
|
+
*
|
|
435
|
+
* @group Colors
|
|
436
|
+
*/
|
|
437
|
+
type SrgbColor = {
|
|
438
|
+
type: 'srgb';
|
|
439
|
+
/**
|
|
440
|
+
* CSS-style hex, e.g. `FF0000`. Always six digits, always uppercase. No alpha channel.
|
|
441
|
+
* @pattern ^[A-F0-9]{6}$
|
|
442
|
+
*/
|
|
443
|
+
value: string;
|
|
444
|
+
};
|
|
445
|
+
/**
|
|
446
|
+
* OS-defined system colour (e.g. window text, highlight).
|
|
447
|
+
*
|
|
448
|
+
* The value must be one of the pre-defined values. The colour matching each of these values should
|
|
449
|
+
* match the closest analogous colour in the OS in use.
|
|
450
|
+
*
|
|
451
|
+
* @group Colors
|
|
452
|
+
*/
|
|
453
|
+
type SystemColor = {
|
|
454
|
+
type: 'system';
|
|
455
|
+
/** System colour name. */
|
|
456
|
+
value: 'scrollBar' | 'background' | 'activeCaption' | 'inactiveCaption' | 'menu' | 'window' | 'windowFrame' | 'menuText' | 'windowText' | 'captionText' | 'activeBorder' | 'inactiveBorder' | 'appWorkspace' | 'highlight' | 'highlightText' | 'btnFace' | 'btnShadow' | 'grayText' | 'btnText' | 'inactiveCaptionText' | 'btnHighlight' | '3dDkShadow' | '3dLight' | 'infoText' | 'infoBk' | 'hotLight' | 'gradientActiveCaption' | 'gradientInactiveCaption' | 'menuHighlight' | 'menuBar';
|
|
457
|
+
};
|
|
458
|
+
/** Reference to a theme colour. */
|
|
459
|
+
/**
|
|
460
|
+
* Reference to a theme colour.
|
|
461
|
+
*
|
|
462
|
+
* A theme colour is defined in the workbook's theme. Theme colours are used to ensure a consistent
|
|
463
|
+
* palette across a workbook.
|
|
464
|
+
*
|
|
465
|
+
* @group Colors
|
|
466
|
+
*/
|
|
467
|
+
type SchemeColor = {
|
|
468
|
+
type: 'theme';
|
|
469
|
+
/**
|
|
470
|
+
* Theme colour name.
|
|
471
|
+
*
|
|
472
|
+
* Must be one of a limited set of values. The actual colour that matches the name is defined
|
|
473
|
+
* elsewhere in the theme.
|
|
474
|
+
*/
|
|
475
|
+
value: 'bg1' | 'tx1' | 'bg2' | 'tx2' | 'accent1' | 'accent2' | 'accent3' | 'accent4' | 'accent5' | 'accent6' | 'hlink' | 'folHlink' | 'phClr' | 'dk1' | 'lt1' | 'dk2' | 'lt2';
|
|
476
|
+
};
|
|
477
|
+
/**
|
|
478
|
+
* A colour, which can be used is various parts of a workbook. The base colour can be transformed
|
|
479
|
+
* using a list of colour transformations.
|
|
480
|
+
*
|
|
481
|
+
* The base colour must be defined using one of the following colour models:
|
|
482
|
+
*
|
|
483
|
+
* - {@link SrgbColor}: Standard sRGB colour space, defined by a CSS-style hex string (e.g.
|
|
484
|
+
* `FF0000`).
|
|
485
|
+
* - {@link ScRgbColor}: A colour in Microsoft's scRGB colour space, defined by red, green, and blue
|
|
486
|
+
* values as percentages.
|
|
487
|
+
* - {@link HslColor}: A colour in HSL colour space, defined by hue, saturation, and lightness
|
|
488
|
+
* values.
|
|
489
|
+
* - {@link SystemColor}: An OS-defined system colour (e.g. window text, highlight), defined using
|
|
490
|
+
* one of an enumerated set of values.
|
|
491
|
+
* - {@link SchemeColor}: A reference to a theme colour.
|
|
492
|
+
* - {@link PresetColor}: A preset colour, similar to CSS's defined colours.
|
|
493
|
+
* - {@link AutoColor}: Colour choice left to the application.
|
|
494
|
+
* - {@link IndexedColor}: A legacy colour indexing scheme.
|
|
495
|
+
*
|
|
496
|
+
* @group Colors
|
|
497
|
+
*/
|
|
498
|
+
type Color = (SrgbColor | ScRgbColor | HslColor | SystemColor | SchemeColor | PresetColor | AutoColor | IndexedColor) & {
|
|
499
|
+
/**
|
|
500
|
+
* Optional list of colour transformations to apply to the base colour.
|
|
501
|
+
*
|
|
502
|
+
* The transformations must be applied in order, and each transformation must be applied to the
|
|
503
|
+
* result of the previous one. There can be multiple transformations of the same type.
|
|
504
|
+
*
|
|
505
|
+
* The transformations are defined by {@link ColorTransform}, which includes operations such as
|
|
506
|
+
* tinting, shading, and saturation adjustments.
|
|
507
|
+
*/
|
|
508
|
+
transforms?: ColorTransform[];
|
|
509
|
+
};
|
|
510
|
+
/**
|
|
511
|
+
* The style to use when drawing a cell border. If the worksheet's zoom factor is changed the width
|
|
512
|
+
* of the border is expected to stay the same.
|
|
513
|
+
*
|
|
514
|
+
* @group Workbooks
|
|
515
|
+
*/
|
|
516
|
+
type BorderStyle =
|
|
517
|
+
/** No border is drawn.*/
|
|
518
|
+
'none' |
|
|
519
|
+
/** Equivalent to SVG `stroke-dasharray="4 1 2 1"`, at a 1px width.*/
|
|
520
|
+
'dashDot' |
|
|
521
|
+
/** Equivalent to SVG `stroke-dasharray="4 1 2 1 2 1"`, at a 1px width.*/
|
|
522
|
+
'dashDotDot' |
|
|
523
|
+
/** Equivalent to SVG `stroke-dasharray=""3 1`, at a 1px width.*/
|
|
524
|
+
'dashed' |
|
|
525
|
+
/** Equivalent to SVG `stroke-dasharray="1"`, at a 1px width.*/
|
|
526
|
+
'dotted' |
|
|
527
|
+
/** Draw two 1px wide continuous parallel lines with a 1px gap between them.*/
|
|
528
|
+
'double' |
|
|
529
|
+
/** Draw a 1px wide pixel continuous hairline.*/
|
|
530
|
+
'hair' |
|
|
531
|
+
/** Draw a 2px wide pixel continuous line.*/
|
|
532
|
+
'medium' |
|
|
533
|
+
/** Equivalent to SVG `stroke-dasharray="4 1 2 1"`, at a 2px width.*/
|
|
534
|
+
'mediumDashDot' |
|
|
535
|
+
/** Equivalent to SVG `stroke-dasharray="4 1 2 1 2 1"`, at a 2px width.*/
|
|
536
|
+
'mediumDashDotDot' |
|
|
537
|
+
/** Equivalent to SVG `stroke-dasharray=""3 1`, at a 2px width.*/
|
|
538
|
+
'mediumDashed' |
|
|
539
|
+
/**
|
|
540
|
+
* Draw two 1px parallel dashed lines where the lower/left line 1px "behind" the other, creating
|
|
541
|
+
* a slant.
|
|
542
|
+
*/
|
|
543
|
+
'slantDashDot' |
|
|
544
|
+
/** Draw a 3px wide pixel continuous line.*/
|
|
545
|
+
'thick' |
|
|
546
|
+
/** Draw a 1px wide pixel continuous line.*/
|
|
547
|
+
'thin';
|
|
548
|
+
/**
|
|
549
|
+
* Specifies the horizontal alignment of content (text) within a container (cell).
|
|
550
|
+
*
|
|
551
|
+
* @group Workbooks
|
|
552
|
+
*/
|
|
553
|
+
type HAlign =
|
|
554
|
+
/**
|
|
555
|
+
* The horizontal alignment is general-aligned. Text data is left-aligned. Numbers, dates, and
|
|
556
|
+
* times are right- aligned. Boolean types are centered.
|
|
557
|
+
*/
|
|
558
|
+
'general' |
|
|
559
|
+
/** Aligns content at the left edge of the cell (even in RTL mode). */
|
|
560
|
+
'left' |
|
|
561
|
+
/** The horizontal alignment is centered, meaning the text is centered across the cell. */
|
|
562
|
+
'center' |
|
|
563
|
+
/** Aligns content at the right edge of the cell (even in RTL mode). */
|
|
564
|
+
'right' |
|
|
565
|
+
/**
|
|
566
|
+
* Indicates that the value of the cell should be filled across the entire width of the cell. If
|
|
567
|
+
* blank cells to the right also have the fill alignment, they are also filled with the value,
|
|
568
|
+
* using a convention similar to `centerContinuous`.
|
|
569
|
+
*/
|
|
570
|
+
'fill' |
|
|
571
|
+
/**
|
|
572
|
+
* For each line of text, aligns each line of the wrapped text in a cell to the right and left
|
|
573
|
+
* (except the last line).
|
|
574
|
+
*/
|
|
575
|
+
'justify' |
|
|
576
|
+
/** The horizontal alignment is centered across multiple cells. */
|
|
577
|
+
'centerContinuous' |
|
|
578
|
+
/**
|
|
579
|
+
* Indicates that each 'word' in each line of text inside the cell is evenly distributed across
|
|
580
|
+
* the width of the cell, with flush right and left margins.
|
|
581
|
+
*/
|
|
582
|
+
'distributed';
|
|
583
|
+
/**
|
|
584
|
+
* The style of fill pattern used for a cell background. If the worksheets zoom factor is changed
|
|
585
|
+
* the pixel scale of the pattern is still expected to stay the same.
|
|
586
|
+
*
|
|
587
|
+
* @group Workbooks
|
|
588
|
+
*/
|
|
589
|
+
type PatternStyle = 'none' | 'solid' | 'mediumGray' | 'darkGray' | 'lightGray' | 'darkHorizontal' | 'darkVertical' | 'darkDown' | 'darkUp' | 'darkGrid' | 'darkTrellis' | 'lightHorizontal' | 'lightVertical' | 'lightDown' | 'lightUp' | 'lightGrid' | 'lightTrellis' | 'gray125' | 'gray0625';
|
|
590
|
+
/**
|
|
591
|
+
* Which type of underline to use when rendering text.
|
|
592
|
+
*
|
|
593
|
+
* @group Workbooks
|
|
594
|
+
*/
|
|
595
|
+
type Underline = 'none' | 'single' | 'singleAccounting' | 'double' | 'doubleAccounting';
|
|
596
|
+
/**
|
|
597
|
+
* Vertical alignment of a cell content.
|
|
598
|
+
*
|
|
599
|
+
* @group Workbooks
|
|
600
|
+
*/
|
|
601
|
+
type VAlign = 'bottom' | 'top' | 'center' | 'justify' | 'distributed';
|
|
602
|
+
/**
|
|
603
|
+
* Style rules that specify the visual presentation of a cell.
|
|
604
|
+
*
|
|
605
|
+
* @group Workbooks
|
|
606
|
+
*/
|
|
607
|
+
type Style = {
|
|
608
|
+
/**
|
|
609
|
+
* The name of the font family used to render text, e.g. `"Arial"`.
|
|
610
|
+
*
|
|
611
|
+
* @default "Calibri"
|
|
612
|
+
*/
|
|
613
|
+
fontFamily?: string;
|
|
614
|
+
/**
|
|
615
|
+
* Identifies the font scheme, if any, to which this style's font belongs.
|
|
616
|
+
*
|
|
617
|
+
* When set, the {@link Style.fontFamily} property is ignored and the font is instead resolved by
|
|
618
|
+
* the workbook theme. `"major"` maps to the theme's heading font and `"minor"` to the body font.
|
|
619
|
+
* The actual typeface is determined by the theme's {@link ThemeFontCollection} at render time.
|
|
620
|
+
*
|
|
621
|
+
* When the theme changes, an application is expected to update the fonts associated with a scheme
|
|
622
|
+
* automatically.
|
|
623
|
+
*
|
|
624
|
+
* It is an error to set this when a workbook has no theme.
|
|
625
|
+
*
|
|
626
|
+
* @see {@link Workbook.theme}
|
|
627
|
+
* @see {@link Theme.fontScheme}
|
|
628
|
+
* @see {@link ThemeFontScheme}
|
|
629
|
+
* @see {@link ThemeFontCollection}
|
|
630
|
+
*/
|
|
631
|
+
fontScheme?: 'major' | 'minor';
|
|
632
|
+
/**
|
|
633
|
+
* The font size in pixels.
|
|
634
|
+
*
|
|
635
|
+
* @default 11
|
|
636
|
+
*/
|
|
637
|
+
fontSize?: PixelValue;
|
|
638
|
+
/**
|
|
639
|
+
* The color used to render text.
|
|
640
|
+
*
|
|
641
|
+
* @default "#000"
|
|
642
|
+
*/
|
|
643
|
+
color?: Color;
|
|
644
|
+
/**
|
|
645
|
+
* Indicates whether the text is bold.
|
|
646
|
+
*
|
|
647
|
+
* @default false
|
|
648
|
+
*/
|
|
649
|
+
bold?: boolean;
|
|
650
|
+
/**
|
|
651
|
+
* Indicates whether the text is italic.
|
|
652
|
+
*
|
|
653
|
+
* @default false
|
|
654
|
+
*/
|
|
655
|
+
italic?: boolean;
|
|
656
|
+
/**
|
|
657
|
+
* Text underline decoration type.
|
|
658
|
+
*
|
|
659
|
+
* @default "none"
|
|
660
|
+
*/
|
|
661
|
+
underline?: Underline;
|
|
662
|
+
/**
|
|
663
|
+
* The cell's background color.
|
|
664
|
+
*
|
|
665
|
+
* @default "#FFFFFF"
|
|
666
|
+
*/
|
|
667
|
+
fillColor?: Color;
|
|
668
|
+
/**
|
|
669
|
+
* The color of a cell's background fill.
|
|
670
|
+
*
|
|
671
|
+
* @default "#000000"
|
|
672
|
+
*/
|
|
673
|
+
patternColor?: Color;
|
|
674
|
+
/**
|
|
675
|
+
* The style of a cell's background fill.
|
|
676
|
+
*
|
|
677
|
+
* @default "none"
|
|
678
|
+
*/
|
|
679
|
+
patternStyle?: PatternStyle;
|
|
680
|
+
/**
|
|
681
|
+
* Top border style.
|
|
682
|
+
*
|
|
683
|
+
* @default "none"
|
|
684
|
+
*/
|
|
685
|
+
borderTopStyle?: BorderStyle;
|
|
686
|
+
/**
|
|
687
|
+
* Top border color.
|
|
688
|
+
*/
|
|
689
|
+
borderTopColor?: Color;
|
|
690
|
+
/**
|
|
691
|
+
* Left border style.
|
|
692
|
+
*
|
|
693
|
+
* @default "none"
|
|
694
|
+
*/
|
|
695
|
+
borderLeftStyle?: BorderStyle;
|
|
696
|
+
/**
|
|
697
|
+
* Left border color.
|
|
698
|
+
*/
|
|
699
|
+
borderLeftColor?: Color;
|
|
700
|
+
/**
|
|
701
|
+
* Bottom border style.
|
|
702
|
+
*
|
|
703
|
+
* @default "none"
|
|
704
|
+
*/
|
|
705
|
+
borderBottomStyle?: BorderStyle;
|
|
706
|
+
/**
|
|
707
|
+
* Bottom border color.
|
|
708
|
+
*/
|
|
709
|
+
borderBottomColor?: Color;
|
|
710
|
+
/**
|
|
711
|
+
* Right border style.
|
|
712
|
+
*
|
|
713
|
+
* @default "none"
|
|
714
|
+
*/
|
|
715
|
+
borderRightStyle?: BorderStyle;
|
|
716
|
+
/**
|
|
717
|
+
* Right border color.
|
|
718
|
+
*/
|
|
719
|
+
borderRightColor?: Color;
|
|
720
|
+
/**
|
|
721
|
+
* Horizontal alignment of the cells [text] content.
|
|
722
|
+
*
|
|
723
|
+
* @default "general"
|
|
724
|
+
*/
|
|
725
|
+
horizontalAlignment?: HAlign;
|
|
726
|
+
/**
|
|
727
|
+
* Vertical alignment of the cells [text] content.
|
|
728
|
+
*
|
|
729
|
+
* @default "bottom"
|
|
730
|
+
*/
|
|
731
|
+
verticalAlignment?: VAlign;
|
|
732
|
+
/**
|
|
733
|
+
* Indicates whether text should be wrapped when it exceeds the cell's width.
|
|
734
|
+
*
|
|
735
|
+
* @default false
|
|
736
|
+
*/
|
|
737
|
+
wrapText?: boolean;
|
|
738
|
+
/**
|
|
739
|
+
* Indicates whether the font-size should be automatically reduced in order to make the contents
|
|
740
|
+
* of the cell visible.
|
|
741
|
+
*/
|
|
742
|
+
shrinkToFit?: boolean;
|
|
743
|
+
/**
|
|
744
|
+
* The degrees to which the cell text should be rotated. Values range from 0 to 180, and 255 to
|
|
745
|
+
* indicate vertical text. The origin of the rotation is the first letter of the text.
|
|
746
|
+
*
|
|
747
|
+
* @min 0
|
|
748
|
+
* @max 255
|
|
749
|
+
* @defaultValue 0
|
|
750
|
+
*/
|
|
751
|
+
textRotation?: integer;
|
|
752
|
+
/**
|
|
753
|
+
* Formatting directions for rendering the cell's value to text.
|
|
754
|
+
*/
|
|
755
|
+
numberFormat?: string;
|
|
756
|
+
/**
|
|
757
|
+
* Name of the named style this style inherits from (e.g. "Percent", "Heading 1").
|
|
758
|
+
* Refers to a key in {@link Workbook.namedStyles}.
|
|
759
|
+
* When absent, the style inherits from the default style (typically "Normal").
|
|
760
|
+
*/
|
|
761
|
+
extendsStyle?: string;
|
|
762
|
+
/**
|
|
763
|
+
* Whether the a cell should appear as a pivot-table button header (typically shown with a
|
|
764
|
+
* dropdown-arrow filter UI, e.g. on "Row Labels" / "Column Labels").
|
|
765
|
+
*
|
|
766
|
+
* Should be set only on cell styles used in a pivot table's layout.
|
|
767
|
+
*/
|
|
768
|
+
pivotButton?: boolean;
|
|
769
|
+
};
|
|
770
|
+
//#endregion
|
|
771
|
+
//#region node_modules/@grid-is/grid-prompt-tools/dist/index.d.ts
|
|
772
|
+
//#endregion
|
|
773
|
+
//#region src/load_mismatches.d.ts
|
|
774
|
+
/**
|
|
775
|
+
* The flavour of cell value carried in load-mismatch entries.
|
|
776
|
+
*
|
|
777
|
+
* Sheet cells in Apiary always materialise to plain CellValue (number,
|
|
778
|
+
* string, boolean, FormulaError, or null) — never Matrix/Reference/Lambda.
|
|
779
|
+
* Both cached and computed sides of a mismatch are therefore CellValue.
|
|
780
|
+
*/
|
|
781
|
+
type CellValue$1 = CellValue;
|
|
782
|
+
interface MismatchEntry {
|
|
783
|
+
readonly sheetName: string;
|
|
784
|
+
readonly a1: string;
|
|
785
|
+
readonly cachedValue: CellValue$1;
|
|
786
|
+
readonly calculatedValue: CellValue$1;
|
|
787
|
+
readonly source: "formula" | "spill";
|
|
788
|
+
}
|
|
789
|
+
declare class LoadMismatches {
|
|
790
|
+
private readonly _entries;
|
|
791
|
+
constructor(entries?: Map<string, MismatchEntry>);
|
|
792
|
+
get count(): number;
|
|
793
|
+
/** Lookup by sheet-qualified A1; returns the entry or undefined. */
|
|
794
|
+
get(sheetName: string, a1: string): MismatchEntry | undefined;
|
|
795
|
+
[Symbol.iterator](): IterableIterator<MismatchEntry>;
|
|
796
|
+
}
|
|
797
|
+
//#endregion
|
|
798
|
+
//#region src/tools/types.d.ts
|
|
799
|
+
type ToolError = {
|
|
800
|
+
error: string;
|
|
801
|
+
};
|
|
802
|
+
/**
|
|
803
|
+
* Per-call context passed to tool implementations. Carries the model under
|
|
804
|
+
* test plus any per-call data the tool may want (load-time mismatches today,
|
|
805
|
+
* potentially more later).
|
|
806
|
+
*/
|
|
807
|
+
interface ToolContext {
|
|
808
|
+
readonly model: Model;
|
|
809
|
+
readonly mismatches?: LoadMismatches;
|
|
810
|
+
}
|
|
811
|
+
declare function isToolError(value: unknown): value is ToolError;
|
|
812
|
+
declare class SpreadsheetTool<TParams extends z.ZodType = z.ZodType, TResult = unknown> {
|
|
813
|
+
readonly name: string;
|
|
814
|
+
readonly description: string;
|
|
815
|
+
readonly parameters: TParams;
|
|
816
|
+
private _run;
|
|
817
|
+
constructor(options: {
|
|
818
|
+
name: string;
|
|
819
|
+
description: string;
|
|
820
|
+
parameters: TParams;
|
|
821
|
+
run: (ctx: ToolContext, input: z.infer<TParams>) => TResult;
|
|
822
|
+
});
|
|
823
|
+
execute(ctx: ToolContext, input: z.infer<TParams>): TResult | ToolError;
|
|
824
|
+
}
|
|
825
|
+
//#endregion
|
|
826
|
+
//#region src/tools/describe_structure.d.ts
|
|
827
|
+
type SheetStructure = {
|
|
828
|
+
name: string;
|
|
829
|
+
cellCount: number;
|
|
830
|
+
formulaCount: number;
|
|
831
|
+
errorCount?: number;
|
|
832
|
+
errorSample?: Array<{
|
|
833
|
+
key: string;
|
|
834
|
+
count: number;
|
|
835
|
+
cells: string[];
|
|
836
|
+
}>;
|
|
837
|
+
labels: string[];
|
|
838
|
+
totalLabels?: number;
|
|
839
|
+
};
|
|
840
|
+
type DescribeStructureResult = {
|
|
841
|
+
sheets: SheetStructure[];
|
|
842
|
+
totalErrors?: number;
|
|
843
|
+
summary: string;
|
|
844
|
+
};
|
|
845
|
+
declare const describeStructure: SpreadsheetTool<z.ZodObject<{
|
|
846
|
+
sheets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
847
|
+
labelOffset: z.ZodOptional<z.ZodNumber>;
|
|
848
|
+
}, z.core.$strip>, DescribeStructureResult | ToolError>;
|
|
849
|
+
//#endregion
|
|
850
|
+
//#region src/tools/utils/read_cells.d.ts
|
|
851
|
+
/**
|
|
852
|
+
* Cell information with optional A1 reference.
|
|
853
|
+
* When returned as a dict, ref is omitted (it's the key).
|
|
854
|
+
* When returned as a single cell, ref is included.
|
|
855
|
+
*/
|
|
856
|
+
type CellInfo = {
|
|
857
|
+
/** Cell value */ v?: string | number | boolean; /** Formula string as stored by Apiary */
|
|
858
|
+
f?: string; /** Cell type: 'z'=blank, 'b'=boolean, 'n'=number, 's'=string, 'e'=error */
|
|
859
|
+
t?: "z" | "b" | "n" | "s" | "e"; /** A1 address of the cell (e.g., "A1", "B10"). Omitted when returned in a dict. */
|
|
860
|
+
ref?: string; /** Number format string (omitted if default/general) */
|
|
861
|
+
num_format?: string; /** Index into workbook.styles array (omitted if cell has no style) */
|
|
862
|
+
style_index?: number; /** Formatted display value (only present when num_format is set) */
|
|
863
|
+
formatted?: string; /** Full style object (bold, italic, numberFormat, etc.) */
|
|
864
|
+
style?: Style | null; /** Hyperlink URL */
|
|
865
|
+
href?: string | null; /** For anchor cells: the full merged range (e.g., "A1:B2") */
|
|
866
|
+
mergedRange?: string; /** For non-anchor cells in a merge: the anchor cell to write to instead */
|
|
867
|
+
mergedInto?: string; /** Full FormulaError metadata. Present only when t === "e". */
|
|
868
|
+
error?: {
|
|
869
|
+
/** Error name, e.g. "#DIV/0!", "#NAME?", "#REF!". Same value as the stringified v. */ name: string; /** Integer error code from Apiary's FormulaError. */
|
|
870
|
+
code: number; /** Optional detail message, e.g. "function name not found". Present only if FormulaError.detail is set. */
|
|
871
|
+
detail?: string; /** Sheet-qualified reference of the cell where the error originated. Present only if FormulaError.origin is set. Compare to the inspected cell's own ref to tell whether the error originated here or propagated from elsewhere. */
|
|
872
|
+
origin?: string;
|
|
873
|
+
};
|
|
874
|
+
/**
|
|
875
|
+
* Load-time mismatch warning. Present when the JSF cache disagrees with
|
|
876
|
+
* Apiary's recalculated value for this cell. `cachedValue` is what the
|
|
877
|
+
* source workbook (e.g. Excel) wrote into the JSF; `calculatedValue` is
|
|
878
|
+
* what Apiary computed. See `LoadMismatches` for details.
|
|
879
|
+
*/
|
|
880
|
+
mismatch?: {
|
|
881
|
+
note: string;
|
|
882
|
+
cachedValue: string | number | boolean | null | FormulaError;
|
|
883
|
+
calculatedValue: string | number | boolean | null | FormulaError;
|
|
884
|
+
};
|
|
885
|
+
};
|
|
886
|
+
/** Multi-cell read result: dict of cells with optional metadata */
|
|
887
|
+
type MultiCellResult = Record<string, CellInfo> & {
|
|
888
|
+
_note?: string;
|
|
889
|
+
};
|
|
890
|
+
//#endregion
|
|
891
|
+
//#region src/tools/utils/slice_range.d.ts
|
|
892
|
+
interface TruncatedPage {
|
|
893
|
+
data: MultiCellResult;
|
|
894
|
+
truncated: true;
|
|
895
|
+
totalCells: number;
|
|
896
|
+
returnedCells: number;
|
|
897
|
+
offset: number;
|
|
898
|
+
nextOffset: number;
|
|
899
|
+
reference: string;
|
|
900
|
+
}
|
|
901
|
+
type PaginatedReadResult = CellInfo | MultiCellResult | TruncatedPage;
|
|
902
|
+
//#endregion
|
|
903
|
+
//#region src/tools/read_calculated_values.d.ts
|
|
904
|
+
type ExpressionResult = CellInfo | MultiCellResult | TruncatedPage | {
|
|
905
|
+
error: string;
|
|
906
|
+
};
|
|
907
|
+
type ReadCalculatedValuesResult = Record<string, ExpressionResult>;
|
|
908
|
+
declare const readCalculatedValues: SpreadsheetTool<z.ZodObject<{
|
|
909
|
+
read: z.ZodArray<z.ZodString>;
|
|
910
|
+
apply: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
911
|
+
cell: z.ZodString;
|
|
912
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
913
|
+
}, z.core.$strip>>>;
|
|
914
|
+
cursors: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
915
|
+
}, z.core.$strip>, ToolError | ReadCalculatedValuesResult>;
|
|
916
|
+
//#endregion
|
|
917
|
+
//#region src/tools/run_formula.d.ts
|
|
918
|
+
type RunFormulaResult = Record<string, unknown> & {
|
|
919
|
+
_note?: string;
|
|
920
|
+
};
|
|
921
|
+
declare const runFormula: SpreadsheetTool<z.ZodObject<{
|
|
922
|
+
apply: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
923
|
+
cell: z.ZodString;
|
|
924
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
925
|
+
}, z.core.$strip>>>;
|
|
926
|
+
formula: z.ZodOptional<z.ZodString>;
|
|
927
|
+
formulas: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
928
|
+
sheet: z.ZodOptional<z.ZodString>;
|
|
929
|
+
}, z.core.$strip>, ToolError | RunFormulaResult>;
|
|
930
|
+
//#endregion
|
|
931
|
+
//#region src/tools/edit_cells.d.ts
|
|
932
|
+
interface TypeChangeWarning {
|
|
933
|
+
level: "high" | "low";
|
|
934
|
+
note: string;
|
|
935
|
+
}
|
|
936
|
+
type EditCellsResult = {
|
|
937
|
+
success: true;
|
|
938
|
+
cellsModified: number;
|
|
939
|
+
changedCells: string[];
|
|
940
|
+
merged?: string[];
|
|
941
|
+
unmerged?: string[];
|
|
942
|
+
errors?: Record<string, string>;
|
|
943
|
+
mergeErrors?: Record<string, string>;
|
|
944
|
+
cell_errors?: Record<string, string[]>;
|
|
945
|
+
warnings?: Record<string, TypeChangeWarning>;
|
|
946
|
+
};
|
|
947
|
+
declare const editCells: SpreadsheetTool<z.ZodObject<{
|
|
948
|
+
apply: z.ZodArray<z.ZodObject<{
|
|
949
|
+
target: z.ZodString;
|
|
950
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
951
|
+
styleIndex: z.ZodOptional<z.ZodNumber>;
|
|
952
|
+
}, z.core.$strip>>;
|
|
953
|
+
styles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
954
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
955
|
+
borderBottomColor: z.ZodOptional<z.ZodString>;
|
|
956
|
+
borderBottomStyle: z.ZodOptional<z.ZodEnum<{
|
|
957
|
+
none: "none";
|
|
958
|
+
dashDot: "dashDot";
|
|
959
|
+
dashDotDot: "dashDotDot";
|
|
960
|
+
dashed: "dashed";
|
|
961
|
+
dotted: "dotted";
|
|
962
|
+
double: "double";
|
|
963
|
+
hair: "hair";
|
|
964
|
+
medium: "medium";
|
|
965
|
+
mediumDashDot: "mediumDashDot";
|
|
966
|
+
mediumDashDotDot: "mediumDashDotDot";
|
|
967
|
+
mediumDashed: "mediumDashed";
|
|
968
|
+
slantDashDot: "slantDashDot";
|
|
969
|
+
thick: "thick";
|
|
970
|
+
thin: "thin";
|
|
971
|
+
}>>;
|
|
972
|
+
borderLeftColor: z.ZodOptional<z.ZodString>;
|
|
973
|
+
borderLeftStyle: z.ZodOptional<z.ZodEnum<{
|
|
974
|
+
none: "none";
|
|
975
|
+
dashDot: "dashDot";
|
|
976
|
+
dashDotDot: "dashDotDot";
|
|
977
|
+
dashed: "dashed";
|
|
978
|
+
dotted: "dotted";
|
|
979
|
+
double: "double";
|
|
980
|
+
hair: "hair";
|
|
981
|
+
medium: "medium";
|
|
982
|
+
mediumDashDot: "mediumDashDot";
|
|
983
|
+
mediumDashDotDot: "mediumDashDotDot";
|
|
984
|
+
mediumDashed: "mediumDashed";
|
|
985
|
+
slantDashDot: "slantDashDot";
|
|
986
|
+
thick: "thick";
|
|
987
|
+
thin: "thin";
|
|
988
|
+
}>>;
|
|
989
|
+
borderRightColor: z.ZodOptional<z.ZodString>;
|
|
990
|
+
borderRightStyle: z.ZodOptional<z.ZodEnum<{
|
|
991
|
+
none: "none";
|
|
992
|
+
dashDot: "dashDot";
|
|
993
|
+
dashDotDot: "dashDotDot";
|
|
994
|
+
dashed: "dashed";
|
|
995
|
+
dotted: "dotted";
|
|
996
|
+
double: "double";
|
|
997
|
+
hair: "hair";
|
|
998
|
+
medium: "medium";
|
|
999
|
+
mediumDashDot: "mediumDashDot";
|
|
1000
|
+
mediumDashDotDot: "mediumDashDotDot";
|
|
1001
|
+
mediumDashed: "mediumDashed";
|
|
1002
|
+
slantDashDot: "slantDashDot";
|
|
1003
|
+
thick: "thick";
|
|
1004
|
+
thin: "thin";
|
|
1005
|
+
}>>;
|
|
1006
|
+
borderTopColor: z.ZodOptional<z.ZodString>;
|
|
1007
|
+
borderTopStyle: z.ZodOptional<z.ZodEnum<{
|
|
1008
|
+
none: "none";
|
|
1009
|
+
dashDot: "dashDot";
|
|
1010
|
+
dashDotDot: "dashDotDot";
|
|
1011
|
+
dashed: "dashed";
|
|
1012
|
+
dotted: "dotted";
|
|
1013
|
+
double: "double";
|
|
1014
|
+
hair: "hair";
|
|
1015
|
+
medium: "medium";
|
|
1016
|
+
mediumDashDot: "mediumDashDot";
|
|
1017
|
+
mediumDashDotDot: "mediumDashDotDot";
|
|
1018
|
+
mediumDashed: "mediumDashed";
|
|
1019
|
+
slantDashDot: "slantDashDot";
|
|
1020
|
+
thick: "thick";
|
|
1021
|
+
thin: "thin";
|
|
1022
|
+
}>>;
|
|
1023
|
+
fillColor: z.ZodOptional<z.ZodString>;
|
|
1024
|
+
fontColor: z.ZodOptional<z.ZodString>;
|
|
1025
|
+
fontName: z.ZodOptional<z.ZodString>;
|
|
1026
|
+
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
1027
|
+
horizontalAlignment: z.ZodOptional<z.ZodEnum<{
|
|
1028
|
+
fill: "fill";
|
|
1029
|
+
general: "general";
|
|
1030
|
+
left: "left";
|
|
1031
|
+
center: "center";
|
|
1032
|
+
right: "right";
|
|
1033
|
+
justify: "justify";
|
|
1034
|
+
centerContinuous: "centerContinuous";
|
|
1035
|
+
distributed: "distributed";
|
|
1036
|
+
}>>;
|
|
1037
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
1038
|
+
numberFormat: z.ZodOptional<z.ZodString>;
|
|
1039
|
+
numberFormatFromFormula: z.ZodOptional<z.ZodString>;
|
|
1040
|
+
shrinkToFit: z.ZodOptional<z.ZodBoolean>;
|
|
1041
|
+
underline: z.ZodOptional<z.ZodEnum<{
|
|
1042
|
+
none: "none";
|
|
1043
|
+
double: "double";
|
|
1044
|
+
single: "single";
|
|
1045
|
+
singleAccounting: "singleAccounting";
|
|
1046
|
+
doubleAccounting: "doubleAccounting";
|
|
1047
|
+
}>>;
|
|
1048
|
+
verticalAlignment: z.ZodOptional<z.ZodEnum<{
|
|
1049
|
+
center: "center";
|
|
1050
|
+
justify: "justify";
|
|
1051
|
+
distributed: "distributed";
|
|
1052
|
+
bottom: "bottom";
|
|
1053
|
+
top: "top";
|
|
1054
|
+
}>>;
|
|
1055
|
+
wrapText: z.ZodOptional<z.ZodBoolean>;
|
|
1056
|
+
}, z.core.$strip>>>;
|
|
1057
|
+
note: z.ZodOptional<z.ZodString>;
|
|
1058
|
+
merge: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1059
|
+
unmerge: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1060
|
+
}, z.core.$strip>, ToolError | EditCellsResult>;
|
|
1061
|
+
//#endregion
|
|
1062
|
+
//#region src/tools/fill_cells.d.ts
|
|
1063
|
+
type FillCellsResult = {
|
|
1064
|
+
success: true;
|
|
1065
|
+
filledRange: string;
|
|
1066
|
+
changedCells: string[];
|
|
1067
|
+
cell_errors?: Record<string, string[]>;
|
|
1068
|
+
};
|
|
1069
|
+
declare const fillCells: SpreadsheetTool<z.ZodObject<{
|
|
1070
|
+
sheet: z.ZodString;
|
|
1071
|
+
selection: z.ZodString;
|
|
1072
|
+
extend_to: z.ZodString;
|
|
1073
|
+
note: z.ZodOptional<z.ZodString>;
|
|
1074
|
+
}, z.core.$strip>, ToolError | FillCellsResult>;
|
|
1075
|
+
//#endregion
|
|
1076
|
+
//#region src/tools/manage_sheets.d.ts
|
|
1077
|
+
type ManageSheetsResult = {
|
|
1078
|
+
success: true;
|
|
1079
|
+
sheets: string[];
|
|
1080
|
+
};
|
|
1081
|
+
declare const manageSheets: SpreadsheetTool<z.ZodObject<{
|
|
1082
|
+
add: z.ZodOptional<z.ZodObject<{
|
|
1083
|
+
name: z.ZodString;
|
|
1084
|
+
}, z.core.$strip>>;
|
|
1085
|
+
remove: z.ZodOptional<z.ZodObject<{
|
|
1086
|
+
sheet: z.ZodString;
|
|
1087
|
+
}, z.core.$strip>>;
|
|
1088
|
+
rename: z.ZodOptional<z.ZodObject<{
|
|
1089
|
+
sheet: z.ZodString;
|
|
1090
|
+
name: z.ZodString;
|
|
1091
|
+
}, z.core.$strip>>;
|
|
1092
|
+
setVisibility: z.ZodOptional<z.ZodObject<{
|
|
1093
|
+
sheet: z.ZodString;
|
|
1094
|
+
hidden: z.ZodEnum<{
|
|
1095
|
+
visible: "visible";
|
|
1096
|
+
hidden: "hidden";
|
|
1097
|
+
veryHidden: "veryHidden";
|
|
1098
|
+
}>;
|
|
1099
|
+
}, z.core.$strip>>;
|
|
1100
|
+
note: z.ZodOptional<z.ZodString>;
|
|
1101
|
+
}, z.core.$strip>, ToolError | ManageSheetsResult>;
|
|
1102
|
+
//#endregion
|
|
1103
|
+
//#region src/tools/manage_rows_and_columns.d.ts
|
|
1104
|
+
type ManageRowsAndColumnsResult = {
|
|
1105
|
+
success: true;
|
|
1106
|
+
changedCells: string[];
|
|
1107
|
+
};
|
|
1108
|
+
declare const manageRowsAndColumns: SpreadsheetTool<z.ZodObject<{
|
|
1109
|
+
sheet: z.ZodString;
|
|
1110
|
+
columns: z.ZodOptional<z.ZodObject<{
|
|
1111
|
+
insert: z.ZodOptional<z.ZodObject<{
|
|
1112
|
+
column: z.ZodString;
|
|
1113
|
+
count: z.ZodNumber;
|
|
1114
|
+
}, z.core.$strip>>;
|
|
1115
|
+
delete: z.ZodOptional<z.ZodObject<{
|
|
1116
|
+
column: z.ZodString;
|
|
1117
|
+
count: z.ZodNumber;
|
|
1118
|
+
}, z.core.$strip>>;
|
|
1119
|
+
autoSize: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1120
|
+
}, z.core.$strip>>;
|
|
1121
|
+
rows: z.ZodOptional<z.ZodObject<{
|
|
1122
|
+
insert: z.ZodOptional<z.ZodObject<{
|
|
1123
|
+
row: z.ZodNumber;
|
|
1124
|
+
count: z.ZodNumber;
|
|
1125
|
+
}, z.core.$strip>>;
|
|
1126
|
+
delete: z.ZodOptional<z.ZodObject<{
|
|
1127
|
+
row: z.ZodNumber;
|
|
1128
|
+
count: z.ZodNumber;
|
|
1129
|
+
}, z.core.$strip>>;
|
|
1130
|
+
autoSize: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
1131
|
+
}, z.core.$strip>>;
|
|
1132
|
+
note: z.ZodOptional<z.ZodString>;
|
|
1133
|
+
}, z.core.$strip>, ToolError | ManageRowsAndColumnsResult>;
|
|
1134
|
+
//#endregion
|
|
1135
|
+
//#region src/tools/edit_cell_styles.d.ts
|
|
1136
|
+
type EditCellStylesResult = {
|
|
1137
|
+
success: true;
|
|
1138
|
+
rangesStyled: number;
|
|
1139
|
+
};
|
|
1140
|
+
declare const editCellStyles: SpreadsheetTool<z.ZodObject<{
|
|
1141
|
+
sheet: z.ZodString;
|
|
1142
|
+
apply: z.ZodArray<z.ZodObject<{
|
|
1143
|
+
target: z.ZodString;
|
|
1144
|
+
styles: z.ZodObject<{
|
|
1145
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
1146
|
+
borderBottomColor: z.ZodOptional<z.ZodString>;
|
|
1147
|
+
borderBottomStyle: z.ZodOptional<z.ZodEnum<{
|
|
1148
|
+
none: "none";
|
|
1149
|
+
dashDot: "dashDot";
|
|
1150
|
+
dashDotDot: "dashDotDot";
|
|
1151
|
+
dashed: "dashed";
|
|
1152
|
+
dotted: "dotted";
|
|
1153
|
+
double: "double";
|
|
1154
|
+
hair: "hair";
|
|
1155
|
+
medium: "medium";
|
|
1156
|
+
mediumDashDot: "mediumDashDot";
|
|
1157
|
+
mediumDashDotDot: "mediumDashDotDot";
|
|
1158
|
+
mediumDashed: "mediumDashed";
|
|
1159
|
+
slantDashDot: "slantDashDot";
|
|
1160
|
+
thick: "thick";
|
|
1161
|
+
thin: "thin";
|
|
1162
|
+
}>>;
|
|
1163
|
+
borderLeftColor: z.ZodOptional<z.ZodString>;
|
|
1164
|
+
borderLeftStyle: z.ZodOptional<z.ZodEnum<{
|
|
1165
|
+
none: "none";
|
|
1166
|
+
dashDot: "dashDot";
|
|
1167
|
+
dashDotDot: "dashDotDot";
|
|
1168
|
+
dashed: "dashed";
|
|
1169
|
+
dotted: "dotted";
|
|
1170
|
+
double: "double";
|
|
1171
|
+
hair: "hair";
|
|
1172
|
+
medium: "medium";
|
|
1173
|
+
mediumDashDot: "mediumDashDot";
|
|
1174
|
+
mediumDashDotDot: "mediumDashDotDot";
|
|
1175
|
+
mediumDashed: "mediumDashed";
|
|
1176
|
+
slantDashDot: "slantDashDot";
|
|
1177
|
+
thick: "thick";
|
|
1178
|
+
thin: "thin";
|
|
1179
|
+
}>>;
|
|
1180
|
+
borderRightColor: z.ZodOptional<z.ZodString>;
|
|
1181
|
+
borderRightStyle: z.ZodOptional<z.ZodEnum<{
|
|
1182
|
+
none: "none";
|
|
1183
|
+
dashDot: "dashDot";
|
|
1184
|
+
dashDotDot: "dashDotDot";
|
|
1185
|
+
dashed: "dashed";
|
|
1186
|
+
dotted: "dotted";
|
|
1187
|
+
double: "double";
|
|
1188
|
+
hair: "hair";
|
|
1189
|
+
medium: "medium";
|
|
1190
|
+
mediumDashDot: "mediumDashDot";
|
|
1191
|
+
mediumDashDotDot: "mediumDashDotDot";
|
|
1192
|
+
mediumDashed: "mediumDashed";
|
|
1193
|
+
slantDashDot: "slantDashDot";
|
|
1194
|
+
thick: "thick";
|
|
1195
|
+
thin: "thin";
|
|
1196
|
+
}>>;
|
|
1197
|
+
borderTopColor: z.ZodOptional<z.ZodString>;
|
|
1198
|
+
borderTopStyle: z.ZodOptional<z.ZodEnum<{
|
|
1199
|
+
none: "none";
|
|
1200
|
+
dashDot: "dashDot";
|
|
1201
|
+
dashDotDot: "dashDotDot";
|
|
1202
|
+
dashed: "dashed";
|
|
1203
|
+
dotted: "dotted";
|
|
1204
|
+
double: "double";
|
|
1205
|
+
hair: "hair";
|
|
1206
|
+
medium: "medium";
|
|
1207
|
+
mediumDashDot: "mediumDashDot";
|
|
1208
|
+
mediumDashDotDot: "mediumDashDotDot";
|
|
1209
|
+
mediumDashed: "mediumDashed";
|
|
1210
|
+
slantDashDot: "slantDashDot";
|
|
1211
|
+
thick: "thick";
|
|
1212
|
+
thin: "thin";
|
|
1213
|
+
}>>;
|
|
1214
|
+
fillColor: z.ZodOptional<z.ZodString>;
|
|
1215
|
+
fontColor: z.ZodOptional<z.ZodString>;
|
|
1216
|
+
fontName: z.ZodOptional<z.ZodString>;
|
|
1217
|
+
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
1218
|
+
horizontalAlignment: z.ZodOptional<z.ZodEnum<{
|
|
1219
|
+
fill: "fill";
|
|
1220
|
+
general: "general";
|
|
1221
|
+
left: "left";
|
|
1222
|
+
center: "center";
|
|
1223
|
+
right: "right";
|
|
1224
|
+
justify: "justify";
|
|
1225
|
+
centerContinuous: "centerContinuous";
|
|
1226
|
+
distributed: "distributed";
|
|
1227
|
+
}>>;
|
|
1228
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
1229
|
+
numberFormat: z.ZodOptional<z.ZodString>;
|
|
1230
|
+
numberFormatFromFormula: z.ZodOptional<z.ZodString>;
|
|
1231
|
+
shrinkToFit: z.ZodOptional<z.ZodBoolean>;
|
|
1232
|
+
underline: z.ZodOptional<z.ZodEnum<{
|
|
1233
|
+
none: "none";
|
|
1234
|
+
double: "double";
|
|
1235
|
+
single: "single";
|
|
1236
|
+
singleAccounting: "singleAccounting";
|
|
1237
|
+
doubleAccounting: "doubleAccounting";
|
|
1238
|
+
}>>;
|
|
1239
|
+
verticalAlignment: z.ZodOptional<z.ZodEnum<{
|
|
1240
|
+
center: "center";
|
|
1241
|
+
justify: "justify";
|
|
1242
|
+
distributed: "distributed";
|
|
1243
|
+
bottom: "bottom";
|
|
1244
|
+
top: "top";
|
|
1245
|
+
}>>;
|
|
1246
|
+
wrapText: z.ZodOptional<z.ZodBoolean>;
|
|
1247
|
+
}, z.core.$strip>;
|
|
1248
|
+
}, z.core.$strip>>;
|
|
1249
|
+
note: z.ZodOptional<z.ZodString>;
|
|
1250
|
+
}, z.core.$strip>, ToolError | EditCellStylesResult>;
|
|
1251
|
+
//#endregion
|
|
1252
|
+
//#region src/tools/get_styles.d.ts
|
|
1253
|
+
type GetStylesResult = Record<number, unknown> | unknown[];
|
|
1254
|
+
declare const getStyles: SpreadsheetTool<z.ZodObject<{
|
|
1255
|
+
indices: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
1256
|
+
}, z.core.$strip>, ToolError | GetStylesResult>;
|
|
1257
|
+
//#endregion
|
|
1258
|
+
//#region src/tools/goal_seek.d.ts
|
|
1259
|
+
type GoalSeekResult = {
|
|
1260
|
+
success: true;
|
|
1261
|
+
goalSeek: {
|
|
1262
|
+
targetCell: string;
|
|
1263
|
+
targetValue: number;
|
|
1264
|
+
controlCell: string;
|
|
1265
|
+
solution: unknown;
|
|
1266
|
+
};
|
|
1267
|
+
};
|
|
1268
|
+
declare const goalSeek: SpreadsheetTool<z.ZodObject<{
|
|
1269
|
+
write: z.ZodArray<z.ZodObject<{
|
|
1270
|
+
cell: z.ZodString;
|
|
1271
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
1272
|
+
}, z.core.$strip>>;
|
|
1273
|
+
goalSeek: z.ZodObject<{
|
|
1274
|
+
targetCell: z.ZodString;
|
|
1275
|
+
targetValue: z.ZodNumber;
|
|
1276
|
+
controlCell: z.ZodString;
|
|
1277
|
+
}, z.core.$strip>;
|
|
1278
|
+
persist: z.ZodOptional<z.ZodBoolean>;
|
|
1279
|
+
}, z.core.$strip>, ToolError | GoalSeekResult>;
|
|
1280
|
+
//#endregion
|
|
1281
|
+
//#region src/tools/intelligence/symbols.d.ts
|
|
1282
|
+
type SymbolsResult = {
|
|
1283
|
+
sheets: {
|
|
1284
|
+
name: string;
|
|
1285
|
+
size: [number, number];
|
|
1286
|
+
}[];
|
|
1287
|
+
namedRanges: {
|
|
1288
|
+
name: string;
|
|
1289
|
+
formula: string | null;
|
|
1290
|
+
scope: string;
|
|
1291
|
+
}[];
|
|
1292
|
+
tables: {
|
|
1293
|
+
name: string;
|
|
1294
|
+
sheet: string;
|
|
1295
|
+
ref: string;
|
|
1296
|
+
headers: number;
|
|
1297
|
+
totals: number;
|
|
1298
|
+
}[];
|
|
1299
|
+
stats: {
|
|
1300
|
+
cells: number;
|
|
1301
|
+
graphNodes: number;
|
|
1302
|
+
graphEdges: number;
|
|
1303
|
+
};
|
|
1304
|
+
};
|
|
1305
|
+
declare const symbols: SpreadsheetTool<z.ZodObject<{}, z.core.$strip>, ToolError | SymbolsResult>;
|
|
1306
|
+
//#endregion
|
|
1307
|
+
//#region src/tools/intelligence/what_if.d.ts
|
|
1308
|
+
type WhatIfResult = {
|
|
1309
|
+
applied: Record<string, string | number | boolean | null>;
|
|
1310
|
+
affected: Record<string, {
|
|
1311
|
+
before: string | number | boolean | null;
|
|
1312
|
+
after: string | number | boolean | null;
|
|
1313
|
+
formula: string | null;
|
|
1314
|
+
}>;
|
|
1315
|
+
truncated?: boolean;
|
|
1316
|
+
totalAffected?: number;
|
|
1317
|
+
};
|
|
1318
|
+
declare const whatIf: SpreadsheetTool<z.ZodObject<{
|
|
1319
|
+
changes: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
1320
|
+
}, z.core.$strip>, ToolError | WhatIfResult>;
|
|
1321
|
+
//#endregion
|
|
1322
|
+
//#region src/tools/intelligence/chunked_graph_node.d.ts
|
|
1323
|
+
type ChunkNode = WorkbookDescription["calculated"][number];
|
|
1324
|
+
/**
|
|
1325
|
+
* A node in a chunked dependency-graph traversal tree. Chunks represent groups
|
|
1326
|
+
* of cells with structurally identical formulas, collapsed into labeled nodes.
|
|
1327
|
+
*
|
|
1328
|
+
* Nodes are keyed by their chunk reference in the parent's `precedents` /
|
|
1329
|
+
* `dependents` dict (e.g. "Sheet1!C2:C10"), so there is no separate `ref`
|
|
1330
|
+
* field — its key is its address.
|
|
1331
|
+
*/
|
|
1332
|
+
type ChunkedGraphNode = {
|
|
1333
|
+
type: ChunkNode["type"];
|
|
1334
|
+
labels: string[];
|
|
1335
|
+
formula: string | null;
|
|
1336
|
+
rootHeight?: number;
|
|
1337
|
+
leafDepth?: number;
|
|
1338
|
+
precedents?: Record<string, ChunkedGraphNode>;
|
|
1339
|
+
dependents?: Record<string, ChunkedGraphNode>;
|
|
1340
|
+
alreadyVisited?: true;
|
|
1341
|
+
truncated?: {
|
|
1342
|
+
reason: "maxDepth" | "maxNodes";
|
|
1343
|
+
totalChildren?: number;
|
|
1344
|
+
};
|
|
1345
|
+
};
|
|
1346
|
+
/** Top-level result: a single-entry dict keyed by the root chunk's ref. */
|
|
1347
|
+
type ChunkedGraphWalkResult = Record<string, ChunkedGraphNode>;
|
|
1348
|
+
//#endregion
|
|
1349
|
+
//#region src/tools/intelligence/graph_node.d.ts
|
|
1350
|
+
/**
|
|
1351
|
+
* A node in a dependency-graph traversal tree. The same shape is used for
|
|
1352
|
+
* both the precedents tool (walks outgoing edges, populates `precedents`)
|
|
1353
|
+
* and the dependents tool (walks incoming edges, populates `dependents`).
|
|
1354
|
+
*
|
|
1355
|
+
* Nodes are keyed by their cell/range/name reference in the parent's
|
|
1356
|
+
* `precedents` / `dependents` dict, so there is no `ref` field on the node
|
|
1357
|
+
* itself — its key is its address.
|
|
1358
|
+
*/
|
|
1359
|
+
type GraphNode = {
|
|
1360
|
+
kind: "cell" | "range" | "name";
|
|
1361
|
+
formula: string | null;
|
|
1362
|
+
value?: string | number | boolean | null;
|
|
1363
|
+
errorValue?: string;
|
|
1364
|
+
precedents?: Record<string, GraphNode>;
|
|
1365
|
+
dependents?: Record<string, GraphNode>;
|
|
1366
|
+
alreadyVisited?: true;
|
|
1367
|
+
truncated?: {
|
|
1368
|
+
reason: "maxDepth" | "maxNodes";
|
|
1369
|
+
totalChildren?: number;
|
|
1370
|
+
};
|
|
1371
|
+
};
|
|
1372
|
+
/** Top-level result: a single-entry dict keyed by the root node's ref. */
|
|
1373
|
+
type GraphWalkResult = Record<string, GraphNode>;
|
|
1374
|
+
//#endregion
|
|
1375
|
+
//#region src/tools/intelligence/make_graph_tool.d.ts
|
|
1376
|
+
type GraphToolResult = GraphWalkResult | ChunkedGraphWalkResult | ToolError;
|
|
1377
|
+
//#endregion
|
|
1378
|
+
//#region src/tools/list_errors.d.ts
|
|
1379
|
+
type ListErrorsResult = {
|
|
1380
|
+
formulaErrors: {
|
|
1381
|
+
groups: Array<{
|
|
1382
|
+
key: string;
|
|
1383
|
+
count: number;
|
|
1384
|
+
cells: string[];
|
|
1385
|
+
omittedCells?: number;
|
|
1386
|
+
}>;
|
|
1387
|
+
totalCells: number;
|
|
1388
|
+
perSheet: Record<string, number>;
|
|
1389
|
+
};
|
|
1390
|
+
modelErrors: {
|
|
1391
|
+
entries: Array<{
|
|
1392
|
+
type: string;
|
|
1393
|
+
level: "ERROR" | "WARNING" | "NOTICE";
|
|
1394
|
+
message: string;
|
|
1395
|
+
references: string[];
|
|
1396
|
+
}>;
|
|
1397
|
+
total: number;
|
|
1398
|
+
};
|
|
1399
|
+
truncated?: {
|
|
1400
|
+
groupsWithOmittedCells: number;
|
|
1401
|
+
hint: string;
|
|
1402
|
+
};
|
|
1403
|
+
};
|
|
1404
|
+
declare const listErrors: SpreadsheetTool<z.ZodObject<{
|
|
1405
|
+
sheet: z.ZodOptional<z.ZodString>;
|
|
1406
|
+
range: z.ZodOptional<z.ZodString>;
|
|
1407
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
1408
|
+
}, z.core.$strip>, ToolError | ListErrorsResult>;
|
|
1409
|
+
//#endregion
|
|
1410
|
+
//#region src/tools/find_cells.d.ts
|
|
1411
|
+
type FindCellsMatch = {
|
|
1412
|
+
/** Sheet-qualified A1 reference of the matching cell. */ ref: string; /** Cell value (stringified; omitted if blank). */
|
|
1413
|
+
value?: string; /** Formula text (omitted for value cells). */
|
|
1414
|
+
formula?: string; /** Human-readable fill color string (omitted if no fill). */
|
|
1415
|
+
fillColor?: string;
|
|
1416
|
+
};
|
|
1417
|
+
type FindCellsResult = {
|
|
1418
|
+
matches: FindCellsMatch[];
|
|
1419
|
+
totalMatches: number;
|
|
1420
|
+
truncated?: {
|
|
1421
|
+
maxMatches: number;
|
|
1422
|
+
hint: string;
|
|
1423
|
+
};
|
|
1424
|
+
};
|
|
1425
|
+
declare const findCells: SpreadsheetTool<z.ZodObject<{
|
|
1426
|
+
sheet: z.ZodOptional<z.ZodString>;
|
|
1427
|
+
range: z.ZodOptional<z.ZodString>;
|
|
1428
|
+
matchMode: z.ZodOptional<z.ZodEnum<{
|
|
1429
|
+
AND: "AND";
|
|
1430
|
+
OR: "OR";
|
|
1431
|
+
}>>;
|
|
1432
|
+
hasFormula: z.ZodOptional<z.ZodBoolean>;
|
|
1433
|
+
fillColor: z.ZodOptional<z.ZodString>;
|
|
1434
|
+
formulaContains: z.ZodOptional<z.ZodString>;
|
|
1435
|
+
valueContains: z.ZodOptional<z.ZodString>;
|
|
1436
|
+
valueWithin: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
1437
|
+
}, z.core.$strip>, ToolError | FindCellsResult>;
|
|
1438
|
+
//#endregion
|
|
1439
|
+
//#region src/tools/capture_range.d.ts
|
|
1440
|
+
declare const captureRange: SpreadsheetTool<z.ZodObject<{
|
|
1441
|
+
reference: z.ZodString;
|
|
1442
|
+
headers: z.ZodDefault<z.ZodBoolean>;
|
|
1443
|
+
scale: z.ZodDefault<z.ZodNumber>;
|
|
1444
|
+
}, z.core.$strip>, Promise<ToolError | Uint8Array<ArrayBufferLike>>>;
|
|
1445
|
+
//#endregion
|
|
1446
|
+
//#region src/tools/comments/helpers.d.ts
|
|
1447
|
+
type CommentEntry = {
|
|
1448
|
+
/** Sheet-qualified A1 address, e.g. `'LBO Model'!E46`. */ address: string; /** `thread` = modern threaded comment; `note` = legacy single-author note. */
|
|
1449
|
+
kind: "thread" | "note";
|
|
1450
|
+
author: string; /** ISO datetime if known (threaded comments only). */
|
|
1451
|
+
datetime?: string; /** Number of replies on a thread; omitted for notes and unreplied threads. */
|
|
1452
|
+
replyCount?: number;
|
|
1453
|
+
resolved?: boolean; /** First `PREVIEW_CHARS` chars of the root text, whitespace-collapsed. */
|
|
1454
|
+
preview: string;
|
|
1455
|
+
truncated?: boolean;
|
|
1456
|
+
};
|
|
1457
|
+
type ThreadEntry = {
|
|
1458
|
+
author: string;
|
|
1459
|
+
datetime?: string;
|
|
1460
|
+
text: string;
|
|
1461
|
+
isReply: boolean;
|
|
1462
|
+
};
|
|
1463
|
+
//#endregion
|
|
1464
|
+
//#region src/tools/comments/get_comment.d.ts
|
|
1465
|
+
type GetCommentResult = {
|
|
1466
|
+
address: string;
|
|
1467
|
+
kind: "thread";
|
|
1468
|
+
resolved?: boolean;
|
|
1469
|
+
entries: ThreadEntry[];
|
|
1470
|
+
} | {
|
|
1471
|
+
address: string;
|
|
1472
|
+
kind: "note";
|
|
1473
|
+
author: string;
|
|
1474
|
+
text: string;
|
|
1475
|
+
} | {
|
|
1476
|
+
address: string;
|
|
1477
|
+
kind: "none";
|
|
1478
|
+
};
|
|
1479
|
+
declare const getComment: SpreadsheetTool<z.ZodObject<{
|
|
1480
|
+
address: z.ZodString;
|
|
1481
|
+
}, z.core.$strip>, ToolError | GetCommentResult>;
|
|
1482
|
+
//#endregion
|
|
1483
|
+
//#region src/tools/comments/get_comments.d.ts
|
|
1484
|
+
type GetCommentsResult = {
|
|
1485
|
+
comments: CommentEntry[];
|
|
1486
|
+
total: number;
|
|
1487
|
+
offset: number;
|
|
1488
|
+
hasMore: boolean;
|
|
1489
|
+
nextOffset?: number;
|
|
1490
|
+
};
|
|
1491
|
+
declare const getComments: SpreadsheetTool<z.ZodObject<{
|
|
1492
|
+
sheet: z.ZodOptional<z.ZodString>;
|
|
1493
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
1494
|
+
}, z.core.$strip>, ToolError | GetCommentsResult>;
|
|
1495
|
+
//#endregion
|
|
1496
|
+
//#region src/tools/intelligence/dependents.d.ts
|
|
1497
|
+
declare const dependents: SpreadsheetTool<import("zod").ZodObject<{
|
|
1498
|
+
reference: import("zod").ZodString;
|
|
1499
|
+
mode: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
1500
|
+
cells: "cells";
|
|
1501
|
+
grouped: "grouped";
|
|
1502
|
+
}>>;
|
|
1503
|
+
maxDepth: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1504
|
+
maxNodes: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1505
|
+
}, import("zod/v4/core").$strip>, GraphToolResult>;
|
|
1506
|
+
//#endregion
|
|
1507
|
+
//#region src/tools/intelligence/inspect.d.ts
|
|
1508
|
+
declare const inspect: SpreadsheetTool<z.ZodObject<{
|
|
1509
|
+
reference: z.ZodString;
|
|
1510
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
1511
|
+
}, z.core.$strip>, ToolError | PaginatedReadResult>;
|
|
1512
|
+
//#endregion
|
|
1513
|
+
//#region src/tools/intelligence/precedents.d.ts
|
|
1514
|
+
declare const precedents: SpreadsheetTool<import("zod").ZodObject<{
|
|
1515
|
+
reference: import("zod").ZodString;
|
|
1516
|
+
mode: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
1517
|
+
cells: "cells";
|
|
1518
|
+
grouped: "grouped";
|
|
1519
|
+
}>>;
|
|
1520
|
+
maxDepth: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1521
|
+
maxNodes: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1522
|
+
}, import("zod/v4/core").$strip>, GraphToolResult>;
|
|
1523
|
+
//#endregion
|
|
1524
|
+
//#region src/tools/view_range.d.ts
|
|
1525
|
+
declare const viewRange: SpreadsheetTool<z.ZodObject<{
|
|
1526
|
+
reference: z.ZodString;
|
|
1527
|
+
show: z.ZodOptional<z.ZodEnum<{
|
|
1528
|
+
value: "value";
|
|
1529
|
+
formula: "formula";
|
|
1530
|
+
fill: "fill";
|
|
1531
|
+
fontColor: "fontColor";
|
|
1532
|
+
numberFormat: "numberFormat";
|
|
1533
|
+
rawValue: "rawValue";
|
|
1534
|
+
}>>;
|
|
1535
|
+
}, z.core.$strip>, string>;
|
|
1536
|
+
//#endregion
|
|
1537
|
+
//#region src/tools/workbook_context.d.ts
|
|
1538
|
+
/**
|
|
1539
|
+
* Generate a pre-analyzed workbook summary suitable for injection into
|
|
1540
|
+
* an LLM system prompt. Combines the information from `symbols` and
|
|
1541
|
+
* `describeStructure` into a concise, structured format.
|
|
1542
|
+
*
|
|
1543
|
+
* Returns `null` only if the underlying tools fail.
|
|
1544
|
+
*/
|
|
1545
|
+
declare function generateWorkbookContext(model: Model): string | null;
|
|
1546
|
+
//#endregion
|
|
1547
|
+
//#region src/tools/index.d.ts
|
|
1548
|
+
/** All spreadsheet tools as an array for easy iteration */
|
|
1549
|
+
declare const spreadsheetTools: (SpreadsheetTool<import("zod").ZodObject<{
|
|
1550
|
+
sheets: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
1551
|
+
labelOffset: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1552
|
+
}, import("zod/v4/core").$strip>, DescribeStructureResult | ToolError> | SpreadsheetTool<import("zod").ZodObject<{
|
|
1553
|
+
read: import("zod").ZodArray<import("zod").ZodString>;
|
|
1554
|
+
apply: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
1555
|
+
cell: import("zod").ZodString;
|
|
1556
|
+
value: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean, import("zod").ZodNull]>;
|
|
1557
|
+
}, import("zod/v4/core").$strip>>>;
|
|
1558
|
+
cursors: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodNumber>>;
|
|
1559
|
+
}, import("zod/v4/core").$strip>, ToolError | ReadCalculatedValuesResult> | SpreadsheetTool<import("zod").ZodObject<{
|
|
1560
|
+
apply: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
1561
|
+
cell: import("zod").ZodString;
|
|
1562
|
+
value: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean, import("zod").ZodNull]>;
|
|
1563
|
+
}, import("zod/v4/core").$strip>>>;
|
|
1564
|
+
formula: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1565
|
+
formulas: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
1566
|
+
sheet: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1567
|
+
}, import("zod/v4/core").$strip>, ToolError | RunFormulaResult> | SpreadsheetTool<import("zod").ZodObject<{
|
|
1568
|
+
apply: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1569
|
+
target: import("zod").ZodString;
|
|
1570
|
+
value: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean, import("zod").ZodNull]>>;
|
|
1571
|
+
styleIndex: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1572
|
+
}, import("zod/v4/core").$strip>>;
|
|
1573
|
+
styles: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
1574
|
+
bold: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1575
|
+
borderBottomColor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1576
|
+
borderBottomStyle: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1577
|
+
none: "none";
|
|
1578
|
+
dashDot: "dashDot";
|
|
1579
|
+
dashDotDot: "dashDotDot";
|
|
1580
|
+
dashed: "dashed";
|
|
1581
|
+
dotted: "dotted";
|
|
1582
|
+
double: "double";
|
|
1583
|
+
hair: "hair";
|
|
1584
|
+
medium: "medium";
|
|
1585
|
+
mediumDashDot: "mediumDashDot";
|
|
1586
|
+
mediumDashDotDot: "mediumDashDotDot";
|
|
1587
|
+
mediumDashed: "mediumDashed";
|
|
1588
|
+
slantDashDot: "slantDashDot";
|
|
1589
|
+
thick: "thick";
|
|
1590
|
+
thin: "thin";
|
|
1591
|
+
}>>;
|
|
1592
|
+
borderLeftColor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1593
|
+
borderLeftStyle: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1594
|
+
none: "none";
|
|
1595
|
+
dashDot: "dashDot";
|
|
1596
|
+
dashDotDot: "dashDotDot";
|
|
1597
|
+
dashed: "dashed";
|
|
1598
|
+
dotted: "dotted";
|
|
1599
|
+
double: "double";
|
|
1600
|
+
hair: "hair";
|
|
1601
|
+
medium: "medium";
|
|
1602
|
+
mediumDashDot: "mediumDashDot";
|
|
1603
|
+
mediumDashDotDot: "mediumDashDotDot";
|
|
1604
|
+
mediumDashed: "mediumDashed";
|
|
1605
|
+
slantDashDot: "slantDashDot";
|
|
1606
|
+
thick: "thick";
|
|
1607
|
+
thin: "thin";
|
|
1608
|
+
}>>;
|
|
1609
|
+
borderRightColor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1610
|
+
borderRightStyle: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1611
|
+
none: "none";
|
|
1612
|
+
dashDot: "dashDot";
|
|
1613
|
+
dashDotDot: "dashDotDot";
|
|
1614
|
+
dashed: "dashed";
|
|
1615
|
+
dotted: "dotted";
|
|
1616
|
+
double: "double";
|
|
1617
|
+
hair: "hair";
|
|
1618
|
+
medium: "medium";
|
|
1619
|
+
mediumDashDot: "mediumDashDot";
|
|
1620
|
+
mediumDashDotDot: "mediumDashDotDot";
|
|
1621
|
+
mediumDashed: "mediumDashed";
|
|
1622
|
+
slantDashDot: "slantDashDot";
|
|
1623
|
+
thick: "thick";
|
|
1624
|
+
thin: "thin";
|
|
1625
|
+
}>>;
|
|
1626
|
+
borderTopColor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1627
|
+
borderTopStyle: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1628
|
+
none: "none";
|
|
1629
|
+
dashDot: "dashDot";
|
|
1630
|
+
dashDotDot: "dashDotDot";
|
|
1631
|
+
dashed: "dashed";
|
|
1632
|
+
dotted: "dotted";
|
|
1633
|
+
double: "double";
|
|
1634
|
+
hair: "hair";
|
|
1635
|
+
medium: "medium";
|
|
1636
|
+
mediumDashDot: "mediumDashDot";
|
|
1637
|
+
mediumDashDotDot: "mediumDashDotDot";
|
|
1638
|
+
mediumDashed: "mediumDashed";
|
|
1639
|
+
slantDashDot: "slantDashDot";
|
|
1640
|
+
thick: "thick";
|
|
1641
|
+
thin: "thin";
|
|
1642
|
+
}>>;
|
|
1643
|
+
fillColor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1644
|
+
fontColor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1645
|
+
fontName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1646
|
+
fontSize: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1647
|
+
horizontalAlignment: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1648
|
+
fill: "fill";
|
|
1649
|
+
general: "general";
|
|
1650
|
+
left: "left";
|
|
1651
|
+
center: "center";
|
|
1652
|
+
right: "right";
|
|
1653
|
+
justify: "justify";
|
|
1654
|
+
centerContinuous: "centerContinuous";
|
|
1655
|
+
distributed: "distributed";
|
|
1656
|
+
}>>;
|
|
1657
|
+
italic: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1658
|
+
numberFormat: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1659
|
+
numberFormatFromFormula: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1660
|
+
shrinkToFit: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1661
|
+
underline: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1662
|
+
none: "none";
|
|
1663
|
+
double: "double";
|
|
1664
|
+
single: "single";
|
|
1665
|
+
singleAccounting: "singleAccounting";
|
|
1666
|
+
doubleAccounting: "doubleAccounting";
|
|
1667
|
+
}>>;
|
|
1668
|
+
verticalAlignment: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1669
|
+
center: "center";
|
|
1670
|
+
justify: "justify";
|
|
1671
|
+
distributed: "distributed";
|
|
1672
|
+
bottom: "bottom";
|
|
1673
|
+
top: "top";
|
|
1674
|
+
}>>;
|
|
1675
|
+
wrapText: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1676
|
+
}, import("zod/v4/core").$strip>>>;
|
|
1677
|
+
note: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1678
|
+
merge: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
1679
|
+
unmerge: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
1680
|
+
}, import("zod/v4/core").$strip>, ToolError | EditCellsResult> | SpreadsheetTool<import("zod").ZodObject<{
|
|
1681
|
+
sheet: import("zod").ZodString;
|
|
1682
|
+
selection: import("zod").ZodString;
|
|
1683
|
+
extend_to: import("zod").ZodString;
|
|
1684
|
+
note: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1685
|
+
}, import("zod/v4/core").$strip>, ToolError | FillCellsResult> | SpreadsheetTool<import("zod").ZodObject<{
|
|
1686
|
+
add: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1687
|
+
name: import("zod").ZodString;
|
|
1688
|
+
}, import("zod/v4/core").$strip>>;
|
|
1689
|
+
remove: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1690
|
+
sheet: import("zod").ZodString;
|
|
1691
|
+
}, import("zod/v4/core").$strip>>;
|
|
1692
|
+
rename: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1693
|
+
sheet: import("zod").ZodString;
|
|
1694
|
+
name: import("zod").ZodString;
|
|
1695
|
+
}, import("zod/v4/core").$strip>>;
|
|
1696
|
+
setVisibility: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1697
|
+
sheet: import("zod").ZodString;
|
|
1698
|
+
hidden: import("zod").ZodEnum<{
|
|
1699
|
+
visible: "visible";
|
|
1700
|
+
hidden: "hidden";
|
|
1701
|
+
veryHidden: "veryHidden";
|
|
1702
|
+
}>;
|
|
1703
|
+
}, import("zod/v4/core").$strip>>;
|
|
1704
|
+
note: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1705
|
+
}, import("zod/v4/core").$strip>, ToolError | ManageSheetsResult> | SpreadsheetTool<import("zod").ZodObject<{
|
|
1706
|
+
sheet: import("zod").ZodString;
|
|
1707
|
+
columns: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1708
|
+
insert: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1709
|
+
column: import("zod").ZodString;
|
|
1710
|
+
count: import("zod").ZodNumber;
|
|
1711
|
+
}, import("zod/v4/core").$strip>>;
|
|
1712
|
+
delete: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1713
|
+
column: import("zod").ZodString;
|
|
1714
|
+
count: import("zod").ZodNumber;
|
|
1715
|
+
}, import("zod/v4/core").$strip>>;
|
|
1716
|
+
autoSize: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
1717
|
+
}, import("zod/v4/core").$strip>>;
|
|
1718
|
+
rows: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1719
|
+
insert: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1720
|
+
row: import("zod").ZodNumber;
|
|
1721
|
+
count: import("zod").ZodNumber;
|
|
1722
|
+
}, import("zod/v4/core").$strip>>;
|
|
1723
|
+
delete: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
1724
|
+
row: import("zod").ZodNumber;
|
|
1725
|
+
count: import("zod").ZodNumber;
|
|
1726
|
+
}, import("zod/v4/core").$strip>>;
|
|
1727
|
+
autoSize: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber>>;
|
|
1728
|
+
}, import("zod/v4/core").$strip>>;
|
|
1729
|
+
note: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1730
|
+
}, import("zod/v4/core").$strip>, ToolError | ManageRowsAndColumnsResult> | SpreadsheetTool<import("zod").ZodObject<{
|
|
1731
|
+
sheet: import("zod").ZodString;
|
|
1732
|
+
apply: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1733
|
+
target: import("zod").ZodString;
|
|
1734
|
+
styles: import("zod").ZodObject<{
|
|
1735
|
+
bold: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1736
|
+
borderBottomColor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1737
|
+
borderBottomStyle: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1738
|
+
none: "none";
|
|
1739
|
+
dashDot: "dashDot";
|
|
1740
|
+
dashDotDot: "dashDotDot";
|
|
1741
|
+
dashed: "dashed";
|
|
1742
|
+
dotted: "dotted";
|
|
1743
|
+
double: "double";
|
|
1744
|
+
hair: "hair";
|
|
1745
|
+
medium: "medium";
|
|
1746
|
+
mediumDashDot: "mediumDashDot";
|
|
1747
|
+
mediumDashDotDot: "mediumDashDotDot";
|
|
1748
|
+
mediumDashed: "mediumDashed";
|
|
1749
|
+
slantDashDot: "slantDashDot";
|
|
1750
|
+
thick: "thick";
|
|
1751
|
+
thin: "thin";
|
|
1752
|
+
}>>;
|
|
1753
|
+
borderLeftColor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1754
|
+
borderLeftStyle: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1755
|
+
none: "none";
|
|
1756
|
+
dashDot: "dashDot";
|
|
1757
|
+
dashDotDot: "dashDotDot";
|
|
1758
|
+
dashed: "dashed";
|
|
1759
|
+
dotted: "dotted";
|
|
1760
|
+
double: "double";
|
|
1761
|
+
hair: "hair";
|
|
1762
|
+
medium: "medium";
|
|
1763
|
+
mediumDashDot: "mediumDashDot";
|
|
1764
|
+
mediumDashDotDot: "mediumDashDotDot";
|
|
1765
|
+
mediumDashed: "mediumDashed";
|
|
1766
|
+
slantDashDot: "slantDashDot";
|
|
1767
|
+
thick: "thick";
|
|
1768
|
+
thin: "thin";
|
|
1769
|
+
}>>;
|
|
1770
|
+
borderRightColor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1771
|
+
borderRightStyle: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1772
|
+
none: "none";
|
|
1773
|
+
dashDot: "dashDot";
|
|
1774
|
+
dashDotDot: "dashDotDot";
|
|
1775
|
+
dashed: "dashed";
|
|
1776
|
+
dotted: "dotted";
|
|
1777
|
+
double: "double";
|
|
1778
|
+
hair: "hair";
|
|
1779
|
+
medium: "medium";
|
|
1780
|
+
mediumDashDot: "mediumDashDot";
|
|
1781
|
+
mediumDashDotDot: "mediumDashDotDot";
|
|
1782
|
+
mediumDashed: "mediumDashed";
|
|
1783
|
+
slantDashDot: "slantDashDot";
|
|
1784
|
+
thick: "thick";
|
|
1785
|
+
thin: "thin";
|
|
1786
|
+
}>>;
|
|
1787
|
+
borderTopColor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1788
|
+
borderTopStyle: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1789
|
+
none: "none";
|
|
1790
|
+
dashDot: "dashDot";
|
|
1791
|
+
dashDotDot: "dashDotDot";
|
|
1792
|
+
dashed: "dashed";
|
|
1793
|
+
dotted: "dotted";
|
|
1794
|
+
double: "double";
|
|
1795
|
+
hair: "hair";
|
|
1796
|
+
medium: "medium";
|
|
1797
|
+
mediumDashDot: "mediumDashDot";
|
|
1798
|
+
mediumDashDotDot: "mediumDashDotDot";
|
|
1799
|
+
mediumDashed: "mediumDashed";
|
|
1800
|
+
slantDashDot: "slantDashDot";
|
|
1801
|
+
thick: "thick";
|
|
1802
|
+
thin: "thin";
|
|
1803
|
+
}>>;
|
|
1804
|
+
fillColor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1805
|
+
fontColor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1806
|
+
fontName: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1807
|
+
fontSize: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1808
|
+
horizontalAlignment: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1809
|
+
fill: "fill";
|
|
1810
|
+
general: "general";
|
|
1811
|
+
left: "left";
|
|
1812
|
+
center: "center";
|
|
1813
|
+
right: "right";
|
|
1814
|
+
justify: "justify";
|
|
1815
|
+
centerContinuous: "centerContinuous";
|
|
1816
|
+
distributed: "distributed";
|
|
1817
|
+
}>>;
|
|
1818
|
+
italic: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1819
|
+
numberFormat: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1820
|
+
numberFormatFromFormula: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1821
|
+
shrinkToFit: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1822
|
+
underline: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1823
|
+
none: "none";
|
|
1824
|
+
double: "double";
|
|
1825
|
+
single: "single";
|
|
1826
|
+
singleAccounting: "singleAccounting";
|
|
1827
|
+
doubleAccounting: "doubleAccounting";
|
|
1828
|
+
}>>;
|
|
1829
|
+
verticalAlignment: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1830
|
+
center: "center";
|
|
1831
|
+
justify: "justify";
|
|
1832
|
+
distributed: "distributed";
|
|
1833
|
+
bottom: "bottom";
|
|
1834
|
+
top: "top";
|
|
1835
|
+
}>>;
|
|
1836
|
+
wrapText: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1837
|
+
}, import("zod/v4/core").$strip>;
|
|
1838
|
+
}, import("zod/v4/core").$strip>>;
|
|
1839
|
+
note: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1840
|
+
}, import("zod/v4/core").$strip>, ToolError | EditCellStylesResult> | SpreadsheetTool<import("zod").ZodObject<{
|
|
1841
|
+
indices: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber>>;
|
|
1842
|
+
}, import("zod/v4/core").$strip>, ToolError | GetStylesResult> | SpreadsheetTool<import("zod").ZodObject<{
|
|
1843
|
+
write: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1844
|
+
cell: import("zod").ZodString;
|
|
1845
|
+
value: import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean, import("zod").ZodNull]>;
|
|
1846
|
+
}, import("zod/v4/core").$strip>>;
|
|
1847
|
+
goalSeek: import("zod").ZodObject<{
|
|
1848
|
+
targetCell: import("zod").ZodString;
|
|
1849
|
+
targetValue: import("zod").ZodNumber;
|
|
1850
|
+
controlCell: import("zod").ZodString;
|
|
1851
|
+
}, import("zod/v4/core").$strip>;
|
|
1852
|
+
persist: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1853
|
+
}, import("zod/v4/core").$strip>, ToolError | GoalSeekResult> | SpreadsheetTool<import("zod").ZodObject<{}, import("zod/v4/core").$strip>, ToolError | SymbolsResult> | SpreadsheetTool<import("zod").ZodObject<{
|
|
1854
|
+
reference: import("zod").ZodString;
|
|
1855
|
+
show: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1856
|
+
value: "value";
|
|
1857
|
+
formula: "formula";
|
|
1858
|
+
fill: "fill";
|
|
1859
|
+
fontColor: "fontColor";
|
|
1860
|
+
numberFormat: "numberFormat";
|
|
1861
|
+
rawValue: "rawValue";
|
|
1862
|
+
}>>;
|
|
1863
|
+
}, import("zod/v4/core").$strip>, string> | SpreadsheetTool<import("zod").ZodObject<{
|
|
1864
|
+
reference: import("zod").ZodString;
|
|
1865
|
+
offset: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1866
|
+
}, import("zod/v4/core").$strip>, ToolError | PaginatedReadResult> | SpreadsheetTool<import("zod").ZodObject<{
|
|
1867
|
+
changes: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean, import("zod").ZodNull]>>;
|
|
1868
|
+
}, import("zod/v4/core").$strip>, ToolError | WhatIfResult> | SpreadsheetTool<import("zod").ZodObject<{
|
|
1869
|
+
reference: import("zod").ZodString;
|
|
1870
|
+
mode: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
1871
|
+
cells: "cells";
|
|
1872
|
+
grouped: "grouped";
|
|
1873
|
+
}>>;
|
|
1874
|
+
maxDepth: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1875
|
+
maxNodes: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1876
|
+
}, import("zod/v4/core").$strip>, GraphToolResult> | SpreadsheetTool<import("zod").ZodObject<{
|
|
1877
|
+
sheet: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1878
|
+
range: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1879
|
+
max: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1880
|
+
}, import("zod/v4/core").$strip>, ToolError | ListErrorsResult> | SpreadsheetTool<import("zod").ZodObject<{
|
|
1881
|
+
sheet: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1882
|
+
offset: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
1883
|
+
}, import("zod/v4/core").$strip>, ToolError | GetCommentsResult> | SpreadsheetTool<import("zod").ZodObject<{
|
|
1884
|
+
address: import("zod").ZodString;
|
|
1885
|
+
}, import("zod/v4/core").$strip>, ToolError | GetCommentResult> | SpreadsheetTool<import("zod").ZodObject<{
|
|
1886
|
+
sheet: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1887
|
+
range: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1888
|
+
matchMode: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
1889
|
+
AND: "AND";
|
|
1890
|
+
OR: "OR";
|
|
1891
|
+
}>>;
|
|
1892
|
+
hasFormula: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
1893
|
+
fillColor: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1894
|
+
formulaContains: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1895
|
+
valueContains: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1896
|
+
valueWithin: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber>>;
|
|
1897
|
+
}, import("zod/v4/core").$strip>, ToolError | FindCellsResult>)[];
|
|
1898
|
+
//#endregion
|
|
1899
|
+
export { runFormula as C, whatIf as D, viewRange as E, readCalculatedValues as S, symbols as T, isToolError as _, dependents as a, manageSheets as b, editCells as c, generateWorkbookContext as d, getComment as f, inspect as g, goalSeek as h, captureRange as i, fillCells as l, getStyles as m, ToolContext as n, describeStructure as o, getComments as p, ToolError as r, editCellStyles as s, SpreadsheetTool as t, findCells as u, listErrors as v, spreadsheetTools as w, precedents as x, manageRowsAndColumns as y };
|