@rowsncolumns/common-types 5.2.29

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/LICENSE.md ADDED
@@ -0,0 +1,100 @@
1
+ # Rows n' Columns Commercial License Agreement
2
+
3
+ This Rows n' Columns Commercial License Agreement (the "Agreement") governs
4
+ the use of the Rows n' Columns software packages published under the
5
+ `@rowsncolumns` npm scope, including associated JavaScript, WebAssembly
6
+ binaries, stylesheets, type definitions and documentation (the "Software").
7
+
8
+ The Software is **not** open source. Downloading or installing the Software
9
+ from a public package registry does not grant any right to use it beyond the
10
+ evaluation use described below.
11
+
12
+ ## 1. Definitions
13
+
14
+ - **"Licensor"** means Rows n' Columns (rowsncolumns.app).
15
+ - **"Licensee"** means the individual or legal entity identified in an Order.
16
+ - **"Order"** means a purchase of a license for the Software from Licensor,
17
+ identified by an order ID and associated with a License Key.
18
+ - **"License Key"** means the signed key issued by Licensor that identifies
19
+ the Licensee, license tier, and Update Window.
20
+ - **"Update Window"** means the period stated in the Order during which
21
+ Software versions released by Licensor are covered by the License Key.
22
+
23
+ ## 2. License Grant
24
+
25
+ Subject to payment of the applicable fees and compliance with this Agreement,
26
+ Licensor grants Licensee a non-exclusive, non-transferable, worldwide license
27
+ to use, and to distribute in compiled form as an embedded component of
28
+ Licensee's own applications, any version of the Software released during the
29
+ Update Window, in accordance with the license tier stated in the Order.
30
+
31
+ This grant is perpetual for versions released during the Update Window:
32
+ Licensee may continue to use those versions after the Update Window ends.
33
+ Versions released after the Update Window ends require a new or renewed
34
+ Order.
35
+
36
+ ## 3. Evaluation Use
37
+
38
+ The Software may be used without a License Key solely for internal
39
+ evaluation and development purposes. Evaluation use in production, or
40
+ removal or suppression of evaluation notices, is not permitted.
41
+
42
+ ## 4. Restrictions
43
+
44
+ Except as expressly permitted by this Agreement or by applicable law that
45
+ cannot be contractually waived, Licensee shall not:
46
+
47
+ 1. redistribute, resell, sublicense, or otherwise make the Software
48
+ available as a standalone product, library, or development component;
49
+ 2. use the Software to build a product that competes with the Software;
50
+ 3. remove, alter, or circumvent License Key validation, evaluation notices,
51
+ watermarks, or copyright notices in the Software;
52
+ 4. share License Keys with any third party, or use a License Key outside
53
+ the scope of the tier stated in the Order;
54
+ 5. reverse engineer, decompile, or disassemble the Software except to the
55
+ extent permitted by applicable law.
56
+
57
+ ## 5. Ownership
58
+
59
+ The Software is licensed, not sold. Licensor and its licensors retain all
60
+ right, title, and interest in and to the Software, including all
61
+ intellectual property rights.
62
+
63
+ ## 6. Third-Party Components
64
+
65
+ The Software may include third-party open-source components. Those
66
+ components remain governed by their own license terms, which are included
67
+ with the applicable component and are not limited by this Agreement.
68
+
69
+ ## 7. Termination
70
+
71
+ This Agreement terminates automatically upon material breach by Licensee
72
+ that remains uncured 30 days after written notice. Upon termination,
73
+ Licensee must cease use and distribution of the Software, except that
74
+ end-user copies of Licensee applications already distributed in compliance
75
+ with this Agreement are unaffected.
76
+
77
+ ## 8. Warranty Disclaimer
78
+
79
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
80
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
81
+ FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
82
+
83
+ ## 9. Limitation of Liability
84
+
85
+ TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL LICENSOR BE LIABLE
86
+ FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES,
87
+ OR ANY LOSS OF PROFITS, DATA, OR GOODWILL, ARISING OUT OF OR RELATED TO THIS
88
+ AGREEMENT, AND LICENSOR'S AGGREGATE LIABILITY SHALL NOT EXCEED THE FEES PAID
89
+ BY LICENSEE IN THE TWELVE MONTHS PRECEDING THE CLAIM.
90
+
91
+ ## 10. General
92
+
93
+ This Agreement constitutes the entire agreement between the parties
94
+ concerning the Software and supersedes any prior agreements. If any
95
+ provision is held unenforceable, the remainder remains in effect. Failure to
96
+ enforce a provision is not a waiver.
97
+
98
+ For licensing inquiries, visit <https://www.rowsncolumns.app/pricing>.
99
+
100
+ Copyright © Rows n' Columns. All rights reserved.
@@ -0,0 +1,581 @@
1
+ export type BaseStructuredResult = {
2
+ kind: string;
3
+ formattedValue?: string;
4
+ };
5
+ export type HyperlinkResult = BaseStructuredResult & {
6
+ kind: "hyperlink";
7
+ title: string;
8
+ url: string;
9
+ };
10
+ export type HyperlinkValue = {
11
+ kind: "external";
12
+ url: string;
13
+ display?: string;
14
+ tooltip?: string;
15
+ } | {
16
+ kind: "internal";
17
+ location: string;
18
+ display?: string;
19
+ tooltip?: string;
20
+ };
21
+ export type SparkLineResult = BaseStructuredResult & {
22
+ kind: "sparkline";
23
+ data: (number | null)[];
24
+ options?: SparkLineResultOptions;
25
+ };
26
+ export type SparkLineResultOptions = {
27
+ charttype?: "column" | "line" | "winloss";
28
+ color?: string;
29
+ markers?: boolean;
30
+ colorMarkers?: string;
31
+ colorFirst?: string;
32
+ colorLast?: string;
33
+ colorHigh?: string;
34
+ colorLow?: string;
35
+ colorNegative?: string;
36
+ first?: boolean;
37
+ last?: boolean;
38
+ high?: boolean;
39
+ low?: boolean;
40
+ negative?: boolean;
41
+ max?: number;
42
+ min?: number;
43
+ maxaxistype?: "individual" | "group" | "custom";
44
+ minaxistype?: "individual" | "group" | "custom";
45
+ emptycells?: "gap" | "zero" | "span";
46
+ rtl?: boolean;
47
+ lineweight?: number;
48
+ axis?: boolean;
49
+ dateaxis?: boolean;
50
+ displayhidden?: boolean;
51
+ };
52
+ export type ImageResult = BaseStructuredResult & {
53
+ kind: "image";
54
+ imageUrl: string;
55
+ width?: number;
56
+ height?: number;
57
+ };
58
+ export type CommonStructuredResult = HyperlinkResult | SparkLineResult | ImageResult;
59
+ export type ExtensibleStructuredResult = BaseStructuredResult & {
60
+ [key: string]: any;
61
+ };
62
+ export type StructuredResult = CommonStructuredResult | ExtensibleStructuredResult;
63
+ /**
64
+ * Utility type for values that can be undefined or null
65
+ */
66
+ export type Maybe<T> = T | undefined | null;
67
+ export type IterativeCalculationOptions = {
68
+ enabled: boolean;
69
+ maxIterations?: number;
70
+ maxChange?: number;
71
+ };
72
+ export type CellInterface = {
73
+ rowIndex: number;
74
+ columnIndex: number;
75
+ };
76
+ export type GridRange = {
77
+ startRowIndex: number;
78
+ endRowIndex: number;
79
+ startColumnIndex: number;
80
+ endColumnIndex: number;
81
+ };
82
+ export type SheetRange = GridRange & {
83
+ sheetId: number;
84
+ };
85
+ export type SheetCoordinate = CellInterface & {
86
+ sheetId: number;
87
+ };
88
+ export type SortOrder = "ASCENDING" | "DESCENDING";
89
+ export declare enum Direction {
90
+ Up = "UP",
91
+ Down = "DOWN",
92
+ Left = "LEFT",
93
+ Right = "RIGHT"
94
+ }
95
+ export type AreaStyle = Record<string, unknown>;
96
+ export type SelectionArea<T = AreaStyle> = {
97
+ range: GridRange;
98
+ inProgress?: boolean;
99
+ /**
100
+ * When user drags the fill handle
101
+ */
102
+ isFilling?: boolean;
103
+ } & Partial<T>;
104
+ export type ColorIndex = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
105
+ export type ColorTheme = {
106
+ theme: ColorIndex;
107
+ tint?: number | null;
108
+ };
109
+ export type Color = string | ColorTheme;
110
+ export type BorderStyle = "dotted" | "dashed" | "solid" | "thin" | "solid_medium" | "solid_thick" | "double" | "hair" | "mediumDashed" | "mediumDashDot" | "dashDot" | "dashDotDot" | "slantDashDot";
111
+ export type Border = {
112
+ style: BorderStyle;
113
+ width: number;
114
+ color?: Color | null;
115
+ };
116
+ export type Borders = {
117
+ top?: Maybe<Border>;
118
+ bottom?: Maybe<Border>;
119
+ left?: Maybe<Border>;
120
+ right?: Maybe<Border>;
121
+ diagonalUp?: Maybe<Border>;
122
+ diagonalDown?: Maybe<Border>;
123
+ };
124
+ export type BaselineOffset = "superscript" | "subscript";
125
+ export type TextFormat = {
126
+ color?: Color | null;
127
+ fontFamily?: string | null;
128
+ fontSize?: number | null;
129
+ bold?: boolean | null;
130
+ italic?: boolean | null;
131
+ strikethrough?: boolean | null;
132
+ underline?: boolean | null;
133
+ baselineOffset?: BaselineOffset | null;
134
+ };
135
+ export type NumberFormatType = "GENERAL" | "NUMBER" | "CURRENCY" | "ACCOUNTING" | "DATE" | "TIME" | "DATE_TIME" | "PERCENT" | "FRACTION" | "SCIENTIFIC" | "TEXT" | "SPECIAL";
136
+ export type NumberFormat = {
137
+ type: NumberFormatType;
138
+ pattern?: Maybe<string>;
139
+ };
140
+ export type HorizontalAlign = "left" | "right" | "center";
141
+ export type VerticalAlign = "top" | "middle" | "bottom";
142
+ export type WrapStrategy = "overflow" | "wrap" | "clip";
143
+ export type FillPattern = "none" | "solid" | "mediumGray" | "darkGray" | "lightGray" | "darkHorizontal" | "darkVertical" | "darkDown" | "darkUp" | "darkGrid" | "darkTrellis" | "lightHorizontal" | "lightVertical" | "lightDown" | "lightUp" | "lightGrid" | "lightTrellis" | "gray125" | "gray0625";
144
+ export type GradientStop = {
145
+ position: number;
146
+ color: string;
147
+ };
148
+ export type GradientFill = {
149
+ type: "linear" | "path";
150
+ degree?: number;
151
+ left?: number;
152
+ right?: number;
153
+ top?: number;
154
+ bottom?: number;
155
+ stops: GradientStop[];
156
+ };
157
+ export type CellFormat = {
158
+ backgroundColor?: Maybe<Color | string>;
159
+ borders?: Maybe<Borders>;
160
+ textFormat?: Maybe<TextFormat>;
161
+ numberFormat?: Maybe<NumberFormat>;
162
+ horizontalAlignment?: Maybe<HorizontalAlign>;
163
+ verticalAlignment?: Maybe<VerticalAlign>;
164
+ wrapStrategy?: Maybe<WrapStrategy>;
165
+ indent?: Maybe<number>;
166
+ relativeIndent?: Maybe<number>;
167
+ textRotation?: Maybe<number | "vertical">;
168
+ shrinkToFit?: Maybe<boolean>;
169
+ fillPattern?: Maybe<FillPattern>;
170
+ foregroundColor?: Maybe<Color | string>;
171
+ gradient?: Maybe<GradientFill>;
172
+ conditionalIcon?: Maybe<{
173
+ glyph: string;
174
+ color?: Maybe<string>;
175
+ /** Source iconSet family (e.g. "3Arrows"). Needed for icon filters. */
176
+ iconSet?: Maybe<string>;
177
+ /** 0-based index within that iconSet (e.g. 0 = first glyph). */
178
+ iconId?: Maybe<number>;
179
+ }>;
180
+ conditionalDataBar?: Maybe<{
181
+ color: string;
182
+ fillFraction: number;
183
+ negative?: boolean;
184
+ borderColor?: string;
185
+ direction?: "leftToRight" | "rightToLeft";
186
+ }>;
187
+ };
188
+ /** CellXfs registry type for resolving style references */
189
+ export type CellXfs = Map<string | number, CellFormat | undefined | null>;
190
+ export type ErrorValue = {
191
+ type: "Error" | "Invalid";
192
+ name?: string;
193
+ message: string;
194
+ };
195
+ export type ExtendedValue = {
196
+ numberValue?: Maybe<number>;
197
+ stringValue?: Maybe<string>;
198
+ boolValue?: Maybe<boolean>;
199
+ formulaValue?: Maybe<string>;
200
+ errorValue?: Maybe<ErrorValue>;
201
+ nv?: Maybe<number>;
202
+ sv?: Maybe<string>;
203
+ bv?: Maybe<boolean>;
204
+ fv?: Maybe<string>;
205
+ ev?: Maybe<ErrorValue>;
206
+ };
207
+ export type StructuredValue<T extends StructuredResult = StructuredResult> = {
208
+ structuredValue?: Maybe<T>;
209
+ };
210
+ export type CustomFormulaResult = string | number | boolean | Date | undefined | null | object | ErrorValue;
211
+ export type RowData<T extends CellData | null | undefined> = {
212
+ values?: T[];
213
+ };
214
+ export type RowDataWithValue<T extends CellData | null | undefined> = {
215
+ values: T[];
216
+ };
217
+ export type SheetData<T extends CellData> = Record<string | number, (RowData<T | null> | RowDataWithValue<T | null> | null)[]>;
218
+ export type StyleReference = {
219
+ styleId?: Maybe<string>;
220
+ sid?: Maybe<string>;
221
+ } & ({
222
+ styleId: string;
223
+ sid?: Maybe<string>;
224
+ } | {
225
+ styleId?: Maybe<string>;
226
+ sid: string;
227
+ });
228
+ /**
229
+ * Mention type for referencing entities in text
230
+ */
231
+ export type Mention = {
232
+ value: string;
233
+ label: string;
234
+ };
235
+ /**
236
+ * TextFormatRun represents formatted text segments in a cell
237
+ * Can be either a text node with formatting or a mention node
238
+ */
239
+ export type TextFormatRun<Format extends TextFormat = TextFormat, M extends Mention = Mention> = {
240
+ startIndex: number;
241
+ endIndex: number;
242
+ format: Format;
243
+ nodeType: "text";
244
+ } | {
245
+ startIndex: number;
246
+ endIndex: number;
247
+ nodeType: "mention";
248
+ mention: M;
249
+ };
250
+ export declare const CONDITION_TYPES: readonly ["NUMBER_GREATER", "NUMBER_GREATER_THAN_EQ", "NUMBER_LESS", "NUMBER_LESS_THAN_EQ", "NUMBER_GREATER_THAN_PREVIOUS", "NUMBER_GREATER_THAN_EQ_PREVIOUS", "NUMBER_LESS_THAN_PREVIOUS", "NUMBER_LESS_THAN_EQ_PREVIOUS", "NUMBER_ABOVE_AVERAGE", "NUMBER_BELOW_AVERAGE", "NUMBER_EQ", "NUMBER_NOT_EQ", "NUMBER_BETWEEN", "NUMBER_NOT_BETWEEN", "TEXT_CONTAINS", "TEXT_NOT_CONTAINS", "TEXT_STARTS_WITH", "TEXT_ENDS_WITH", "TEXT_EQ", "TEXT_IS_EMAIL", "TEXT_IS_URL", "DATE_EQ", "DATE_BEFORE", "DATE_AFTER", "DATE_ON_OR_BEFORE", "DATE_ON_OR_AFTER", "DATE_BETWEEN", "DATE_NOT_BETWEEN", "DATE_IS_VALID", "DATE_TODAY", "DATE_YESTERDAY", "DATE_TOMORROW", "DATE_LAST_7_DAYS", "DATE_LAST_WEEK", "DATE_THIS_WEEK", "DATE_NEXT_WEEK", "DATE_LAST_MONTH", "DATE_THIS_MONTH", "DATE_NEXT_MONTH", "ONE_OF_RANGE", "ONE_OF_LIST", "BLANK", "NOT_BLANK", "ERROR", "NOT_ERROR", "CUSTOM_FORMULA", "BOOLEAN", "TEXT_NOT_EQ", "DATE_NOT_EQ"];
251
+ export type ConditionType = (typeof CONDITION_TYPES)[number];
252
+ export type ConditionValue = {
253
+ userEnteredValue: string;
254
+ };
255
+ export type BooleanCondition = {
256
+ type?: Maybe<ConditionType>;
257
+ values?: Maybe<ConditionValue[]>;
258
+ };
259
+ export type DataValidationInputMessage = {
260
+ title?: Maybe<string>;
261
+ message?: Maybe<string>;
262
+ };
263
+ export type DataValidationRuleAlert = {
264
+ style: "stop" | "warning" | "information";
265
+ message?: Maybe<DataValidationInputMessage>;
266
+ };
267
+ export type DataValidationRuleRecord = DataValidationRule & {
268
+ id: string | number;
269
+ ranges: SheetRange[];
270
+ };
271
+ export type DataValidationRule = {
272
+ condition?: BooleanCondition;
273
+ inputMessage?: Maybe<DataValidationInputMessage>;
274
+ displayStyle?: Maybe<"arrow" | "plain">;
275
+ alert?: Maybe<DataValidationRuleAlert>;
276
+ allowBlank?: Maybe<boolean>;
277
+ /**
278
+ * Verbatim source-xlsx representation captured on import. When set, the
279
+ * xlsx exporter writes these fields directly instead of synthesizing from
280
+ * `condition` — this preserves the original `whole`/`decimal`/`time`/
281
+ * `textLength` type, the original operator, and the user's formula text
282
+ * (without `INDIRECT("RC",FALSE)` self-reference rewriting).
283
+ *
284
+ * Newly-created rules (from the UI) won't carry this field; the exporter
285
+ * falls back to `condition`-based synthesis for those.
286
+ */
287
+ xlsxSource?: Maybe<{
288
+ type: string;
289
+ operator?: string;
290
+ formula1?: string;
291
+ formula2?: string;
292
+ }>;
293
+ };
294
+ export type PivotTable = {
295
+ /**
296
+ * Name of the pivot table
297
+ */
298
+ name?: string;
299
+ /**
300
+ * Pivot table ID
301
+ */
302
+ pivotId: string | number;
303
+ /**
304
+ * Datasource of the pivot
305
+ */
306
+ source?: SheetRange;
307
+ /**
308
+ * Position of the
309
+ */
310
+ targetPosition: SheetCoordinate;
311
+ /**
312
+ * Current data range of pivot results
313
+ * Helps in clearing
314
+ */
315
+ pivotRange?: SheetRange;
316
+ rows: PivotGroup[];
317
+ columns: PivotGroup[];
318
+ values: PivotValue[];
319
+ filters?: Record<string, any>;
320
+ sortModel?: Array<{
321
+ field: string;
322
+ sort: "asc" | "desc";
323
+ }>;
324
+ /**
325
+ * Display toggles — Excel-equivalent. Default `true` if omitted so
326
+ * existing pivots keep showing totals.
327
+ */
328
+ showSubtotals?: boolean;
329
+ showRowGrandTotals?: boolean;
330
+ showColumnGrandTotals?: boolean;
331
+ };
332
+ export type PivotGroup = {
333
+ field: string;
334
+ displayName?: string;
335
+ expandedGroups?: string[][];
336
+ sourceColumnOffset?: number;
337
+ sortOrder?: Maybe<SortOrder>;
338
+ /**
339
+ * Excel-style field grouping. When set, the SOURCE CTE rewrites
340
+ * this column with a derived expression so all downstream pivot
341
+ * logic sees the grouped value transparently.
342
+ *
343
+ * Date grouping uses DuckDB `date_trunc('<period>', "<field>")`.
344
+ * Numeric grouping buckets into ranges of width `bucketSize`,
345
+ * optionally offset by `startAt`.
346
+ *
347
+ * Both shapes can be persisted to/from XLSX via the pivotCache
348
+ * fieldGroup element (Phase D1/D2).
349
+ */
350
+ grouping?: {
351
+ type: "date";
352
+ period: "year" | "quarter" | "month" | "week" | "day";
353
+ } | {
354
+ type: "numeric";
355
+ bucketSize: number;
356
+ startAt?: number;
357
+ };
358
+ };
359
+ export type PivotValue = {
360
+ field: string;
361
+ displayName?: string;
362
+ sourceColumnOffset?: number;
363
+ aggFunc: PivotValueSummarizeFunction;
364
+ /**
365
+ * Excel-style "Show Values As" post-aggregation transform.
366
+ * Applied AFTER the raw aggregate (sum/avg/etc) lands. Hosts get
367
+ * the raw values from DuckDB and we transform them in JS so the
368
+ * transform doesn't have to be re-expressed as SQL window
369
+ * functions for each agg.
370
+ *
371
+ * Currently supported modes:
372
+ * - "pct_of_total": value / sum-of-all-cells
373
+ * - "pct_of_row": value / sum-of-row
374
+ * - "pct_of_column": value / sum-of-column
375
+ * - "running_total": cumulative sum down each column
376
+ * - "rank_desc": 1-based dense rank within column, largest first
377
+ * - "rank_asc": 1-based dense rank within column, smallest first
378
+ * Omit (or set "as_is") for the raw aggregate.
379
+ */
380
+ showAs?: "as_is" | "pct_of_total" | "pct_of_row" | "pct_of_column" | "running_total" | "rank_desc" | "rank_asc";
381
+ };
382
+ export type PivotValueSummarizeFunction = "sum" | "count" | "counta" | "countunique" | "avg" | "min" | "max" | "median" | "var" | "varp" | "stddev" | "stddevp" | "product";
383
+ /**
384
+ * CellData type represents the data structure for a spreadsheet cell
385
+ * @template T - The type of structured result (extends StructuredResult)
386
+ * @template M - The type of mention (defaults to Mention)
387
+ */
388
+ export type CellData<T extends StructuredResult = StructuredResult, M extends Mention = Mention> = {
389
+ /**
390
+ * The value the user entered in the cell. e.g, 1234 , 'Hello' , or =NOW() Note: Dates, Times and DateTimes are represented as doubles in serial number format.
391
+ * errorValue: Captures data validation errors
392
+ * @deprecated use ue instead
393
+ */
394
+ userEnteredValue?: Maybe<ExtendedValue>;
395
+ ue?: Maybe<ExtendedValue>;
396
+ /**
397
+ * The effective value of the cell. For cells with formulas, this is the calculated value. For cells with literals, this is the same as the userEnteredValue. This field is read-only.
398
+ *
399
+ * errorValue: Capture errors from formula calculation
400
+ * @deprecated use ev instead
401
+ */
402
+ effectiveValue?: Maybe<ExtendedValue & StructuredValue<T>>;
403
+ ev?: Maybe<ExtendedValue & StructuredValue<T>>;
404
+ /**
405
+ * Conditional formatting results by rule id
406
+ */
407
+ conditionalFormattingResultById?: Maybe<Record<string, CustomFormulaResult>>;
408
+ /**
409
+ * Result of data validation formulas
410
+ */
411
+ dataValidationResult?: Maybe<CustomFormulaResult>;
412
+ /**
413
+ * The formatted value of the cell. This is the value as it's shown to the user. This field is read-only.
414
+ * @deprecated use fv instead
415
+ */
416
+ formattedValue?: Maybe<string>;
417
+ fv?: Maybe<string>;
418
+ /**
419
+ * Any note on the cell.
420
+ */
421
+ note?: Maybe<string>;
422
+ /**
423
+ * Comment thread id
424
+ */
425
+ commentThreadId?: Maybe<string | number>;
426
+ /**
427
+ * Citation id
428
+ */
429
+ citationId?: Maybe<Citation["id"]>;
430
+ /**
431
+ * Hyperlink URL or structured hyperlink value
432
+ */
433
+ hyperlink?: Maybe<string | HyperlinkValue>;
434
+ /**
435
+ * Cell-level protection flags. Only take effect when sheet protection
436
+ * is enabled — preserved here for xlsx round-trip fidelity.
437
+ * - `locked`: when sheet is protected and `locked: true`, the cell
438
+ * can't be edited. Excel's per-cell default is `locked: true`, so
439
+ * this field is typically set to `false` to opt a cell OUT of
440
+ * protection.
441
+ * - `hidden`: when sheet is protected, the formula bar hides this
442
+ * cell's formula.
443
+ */
444
+ protection?: Maybe<{
445
+ locked?: Maybe<boolean>;
446
+ hidden?: Maybe<boolean>;
447
+ }>;
448
+ /**
449
+ * Validation applied to a cell with specific DataValidationRule type
450
+ */
451
+ dataValidation?: Maybe<DataValidationRule> | DataValidationRuleRecord["id"];
452
+ /**
453
+ * Image url
454
+ */
455
+ imageUrl?: Maybe<string>;
456
+ /**
457
+ * Cell meta style
458
+ */
459
+ metaType?: Maybe<"people">;
460
+ /**
461
+ * The format the user entered for the cell. When writing, the new format will be merged with the existing format.
462
+ * @deprecated use uf instead
463
+ */
464
+ userEnteredFormat?: Maybe<CellFormat | StyleReference>;
465
+ uf?: Maybe<CellFormat | StyleReference>;
466
+ /**
467
+ * @deprecated Effective format is no longer persisted on `CellData`. The
468
+ * renderer derives it on the fly from `uf`, the cell value, and (for
469
+ * formula cells) precedent formats — see
470
+ * `useSheetProperties.getEffectiveFormat`. This field is retained only so
471
+ * older saved data continues to load; new writes should set `uf`.
472
+ */
473
+ effectiveFormat?: Maybe<CellFormat | StyleReference>;
474
+ /**
475
+ * @deprecated See `effectiveFormat` above. Retained for backwards
476
+ * compatibility with legacy persisted data only.
477
+ */
478
+ ef?: Maybe<CellFormat | StyleReference>;
479
+ /**
480
+ * Collapsible cells, grouping and pivot table
481
+ */
482
+ expandable?: Maybe<boolean>;
483
+ /**
484
+ * Collapsed state of a cell
485
+ */
486
+ expanded?: Maybe<boolean>;
487
+ /**
488
+ * Pivot category of the cell
489
+ */
490
+ groupKeys?: string[];
491
+ /**
492
+ * Version metadata for collaborative syncing or server reconciliation
493
+ */
494
+ version?: Maybe<number>;
495
+ /**
496
+ * Timestamp of the last authoritative update (ms since epoch)
497
+ */
498
+ updatedAt?: Maybe<number>;
499
+ /**
500
+ * Number of children
501
+ */
502
+ childrenCount?: number;
503
+ /**
504
+ * Pivot id attached to the cell
505
+ */
506
+ pivotId?: Maybe<PivotTable["pivotId"]>;
507
+ /**
508
+ * Shared strings key (always a string for Map-based storage)
509
+ */
510
+ ss?: string;
511
+ /**
512
+ * Array formula spill range in A1 notation (e.g. "G7:G7" single-cell,
513
+ * "B5:B20" multi-cell). Only set on the anchor cell of an array formula;
514
+ * spilled cells in the range carry no `af`. Maps to <f t="array" ref="..."/>
515
+ * on xlsx export and is captured from the same attribute on import.
516
+ */
517
+ af?: Maybe<string>;
518
+ /**
519
+ * Shared-formula provenance. xlsx encodes formula deduplication via
520
+ * `<f t="shared" si="N" ref="A1:A10">FORMULA</f>` on the leader cell
521
+ * and `<f t="shared" si="N"/>` on follower cells. The toolkit expands
522
+ * followers' formulas via `formulaToRelativeReference` on import so
523
+ * evaluation works, but the structural grouping is also captured here
524
+ * so the export can re-emit the `t="shared"` markers. The leader has
525
+ * both `si` and `ref` set; followers carry only `si`.
526
+ */
527
+ sf?: Maybe<{
528
+ si: number;
529
+ ref?: string;
530
+ }>;
531
+ };
532
+ export type FunctionParameter = {
533
+ title: string;
534
+ description: string;
535
+ };
536
+ export type CalculatorFunction = {
537
+ title: string;
538
+ description: string;
539
+ example?: string;
540
+ syntax: string;
541
+ datatype: string;
542
+ usage?: string[];
543
+ parameters: FunctionParameter[];
544
+ };
545
+ export type Citation = {
546
+ id: string;
547
+ range: SheetRange;
548
+ /** Citation URL string in the standard Athena citation format */
549
+ citation_string: string;
550
+ active?: boolean;
551
+ created_at?: string;
552
+ created_by?: string;
553
+ updated_at?: string;
554
+ updated_by?: string;
555
+ };
556
+ /**
557
+ * A single message within a {@link CommentThread}. The first message in a
558
+ * thread is the root comment; subsequent messages are replies.
559
+ */
560
+ export type CommentMessage = {
561
+ id: string;
562
+ /** Plain-text body. Rich/markdown sources must be flattened to text. */
563
+ text: string;
564
+ /** Stable author identity (e.g. user id). Dedupes authors on export. */
565
+ authorId: string;
566
+ /** Human-readable author name shown in Excel's Comments pane. */
567
+ authorName: string;
568
+ /** ISO-8601 timestamp; emitted as the threaded comment's `dT`. */
569
+ createdAtISO?: string;
570
+ };
571
+ /**
572
+ * A cell comment thread. Placement is NOT carried here — the owning cell
573
+ * references the thread via {@link CellData.commentThreadId}, so `id` must
574
+ * match that value. Exported to XLSX as modern threaded comments.
575
+ */
576
+ export type CommentThread = {
577
+ id: string;
578
+ messages: CommentMessage[];
579
+ resolved?: boolean;
580
+ };
581
+ //# sourceMappingURL=index.d.ts.map