y11n-spreadsheet 1.0.1 → 1.1.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 +66 -13
- package/dist/components/y11n-format-toolbar.d.ts +17 -4
- package/dist/components/y11n-format-toolbar.d.ts.map +1 -1
- package/dist/components/y11n-formula-bar.d.ts +10 -3
- package/dist/components/y11n-formula-bar.d.ts.map +1 -1
- package/dist/controllers/clipboard-manager.d.ts +42 -18
- package/dist/controllers/clipboard-manager.d.ts.map +1 -1
- package/dist/controllers/selection-manager.d.ts +92 -7
- package/dist/controllers/selection-manager.d.ts.map +1 -1
- package/dist/engine/formula-engine.d.ts +79 -10
- package/dist/engine/formula-engine.d.ts.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2877 -2189
- package/dist/types.d.ts +145 -23
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/delimited.d.ts +40 -0
- package/dist/utils/delimited.d.ts.map +1 -0
- package/dist/y11n-spreadsheet.d.ts +175 -14
- package/dist/y11n-spreadsheet.d.ts.map +1 -1
- package/package.json +13 -14
package/dist/types.d.ts
CHANGED
|
@@ -1,117 +1,239 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* A zero-indexed cell coordinate.
|
|
3
|
+
* (0, 0) corresponds to cell A1.
|
|
4
4
|
*/
|
|
5
5
|
export interface CellCoord {
|
|
6
|
+
/** 0-indexed row number (0 = row 1) */
|
|
6
7
|
row: number;
|
|
8
|
+
/** 0-indexed column number (0 = column A) */
|
|
7
9
|
col: number;
|
|
8
10
|
}
|
|
9
11
|
/**
|
|
10
|
-
* Cell-level formatting options
|
|
12
|
+
* Cell-level formatting options.
|
|
13
|
+
* All properties are optional; only set properties are applied.
|
|
11
14
|
*/
|
|
12
15
|
export interface CellFormat {
|
|
16
|
+
/** Whether the cell text is bold */
|
|
13
17
|
bold?: boolean;
|
|
18
|
+
/** Whether the cell text is italic */
|
|
14
19
|
italic?: boolean;
|
|
20
|
+
/** Whether the cell text is underlined */
|
|
15
21
|
underline?: boolean;
|
|
22
|
+
/** Whether the cell text has a strikethrough */
|
|
16
23
|
strikethrough?: boolean;
|
|
24
|
+
/** CSS color string for text (e.g. "#ff0000", "red") */
|
|
17
25
|
textColor?: string;
|
|
26
|
+
/** CSS color string for cell background */
|
|
18
27
|
backgroundColor?: string;
|
|
28
|
+
/** Horizontal text alignment */
|
|
19
29
|
textAlign?: 'left' | 'center' | 'right';
|
|
30
|
+
/** Vertical text alignment within the cell (default: middle) */
|
|
31
|
+
verticalAlign?: 'top' | 'middle' | 'bottom';
|
|
32
|
+
/**
|
|
33
|
+
* Wrap long text onto multiple lines instead of truncating it with an
|
|
34
|
+
* ellipsis. Rows keep their fixed height (`--ls-cell-height`), so only the
|
|
35
|
+
* lines that fit are visible.
|
|
36
|
+
*/
|
|
37
|
+
wrap?: boolean;
|
|
38
|
+
/** Font size in pixels */
|
|
20
39
|
fontSize?: number;
|
|
40
|
+
/** Numeric display format (e.g. currency, percent) */
|
|
41
|
+
numberFormat?: NumberFormatOptions;
|
|
21
42
|
}
|
|
22
43
|
/**
|
|
23
|
-
*
|
|
44
|
+
* Available preset number format types. `date` renders a date serial number
|
|
45
|
+
* (days since 1899-12-30, as returned by `DATE()`, `TODAY()` and `NOW()`)
|
|
46
|
+
* using `datePattern`.
|
|
47
|
+
*/
|
|
48
|
+
export type NumberFormatType = 'number' | 'currency' | 'percent' | 'scientific' | 'date';
|
|
49
|
+
/** Options for number formatting */
|
|
50
|
+
export interface NumberFormatOptions {
|
|
51
|
+
type: NumberFormatType;
|
|
52
|
+
/** Number of decimal places (default: 2) */
|
|
53
|
+
decimals?: number;
|
|
54
|
+
/** Currency symbol (default: '$'), only used when type is 'currency' */
|
|
55
|
+
currencySymbol?: string;
|
|
56
|
+
/** Whether to use thousands separators (default: true for 'number' and 'currency') */
|
|
57
|
+
thousandsSep?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Pattern for the 'date' type (default: `'YYYY-MM-DD'`). Tokens: `YYYY`, `YY`,
|
|
60
|
+
* `MM`, `M`, `DD`, `D`, `HH`, `H`, `mm`, `ss`. Other characters are literal,
|
|
61
|
+
* e.g. `'DD/MM/YYYY'` or `'YYYY-MM-DD HH:mm'`.
|
|
62
|
+
*/
|
|
63
|
+
datePattern?: string;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Data for a single cell in the grid.
|
|
24
67
|
*/
|
|
25
68
|
export interface CellData {
|
|
69
|
+
/** The raw user-entered value (may be a formula starting with "=") */
|
|
26
70
|
rawValue: string;
|
|
71
|
+
/** The computed display string shown in the cell */
|
|
27
72
|
displayValue: string;
|
|
73
|
+
/** The resolved data type after evaluation */
|
|
28
74
|
type: 'text' | 'number' | 'boolean' | 'error';
|
|
75
|
+
/** Optional visual formatting applied to the cell */
|
|
29
76
|
format?: CellFormat;
|
|
30
77
|
}
|
|
31
78
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
79
|
+
* Sparse data map for the entire grid.
|
|
80
|
+
* Keys use the format `"${row}:${col}"` (e.g. `"0:0"` for A1, `"2:3"` for D3).
|
|
81
|
+
* Only cells with content are stored; absent keys represent empty cells.
|
|
34
82
|
*/
|
|
35
83
|
export type GridData = Map<string, CellData>;
|
|
36
84
|
/**
|
|
37
|
-
*
|
|
85
|
+
* A normalized rectangular selection range.
|
|
86
|
+
* `start` is always the top-left corner; `end` is always the bottom-right.
|
|
38
87
|
*/
|
|
39
88
|
export interface SelectionRange {
|
|
89
|
+
/** Top-left corner of the selection (minimum row and column) */
|
|
40
90
|
start: CellCoord;
|
|
91
|
+
/** Bottom-right corner of the selection (maximum row and column) */
|
|
41
92
|
end: CellCoord;
|
|
42
93
|
}
|
|
43
94
|
/**
|
|
44
|
-
*
|
|
45
|
-
* Passed to custom functions to allow them to access the grid
|
|
95
|
+
* Context object passed to custom formula functions, providing access to grid data.
|
|
46
96
|
*/
|
|
47
97
|
export interface FormulaContext {
|
|
98
|
+
/** Retrieve the evaluated value of a single cell by reference (e.g. "A1"). */
|
|
48
99
|
getCellValue: (ref: string) => unknown;
|
|
100
|
+
/** Retrieve a flat array of values for a rectangular range (e.g. "A1", "B5"). */
|
|
49
101
|
getRangeValues: (start: string, end: string) => unknown[];
|
|
50
102
|
}
|
|
51
103
|
/**
|
|
52
|
-
*
|
|
104
|
+
* Signature for user-defined formula functions.
|
|
105
|
+
*
|
|
106
|
+
* @param ctx - Provides access to cell/range values from the grid.
|
|
107
|
+
* @param args - Variadic evaluated arguments passed to the function in the formula.
|
|
108
|
+
* @returns The computed result (number, string, boolean, or error string).
|
|
53
109
|
*/
|
|
54
110
|
export type FormulaFunction = (ctx: FormulaContext, ...args: unknown[]) => unknown;
|
|
55
111
|
/**
|
|
56
|
-
*
|
|
112
|
+
* Detail for the `cell-change` event, fired when a single cell is edited.
|
|
57
113
|
*/
|
|
58
114
|
export interface CellChangeDetail {
|
|
115
|
+
/** Cell key in `"row:col"` format */
|
|
59
116
|
cellId: string;
|
|
117
|
+
/** New raw value of the cell */
|
|
60
118
|
value: string;
|
|
119
|
+
/** Previous raw value of the cell */
|
|
61
120
|
oldValue: string;
|
|
62
121
|
}
|
|
63
122
|
/**
|
|
64
|
-
*
|
|
123
|
+
* Detail for the `selection-change` event, fired when the selected range changes.
|
|
65
124
|
*/
|
|
66
125
|
export interface SelectionChangeDetail {
|
|
126
|
+
/** The current normalized selection range */
|
|
67
127
|
range: SelectionRange;
|
|
68
128
|
}
|
|
69
129
|
/**
|
|
70
|
-
*
|
|
130
|
+
* Detail for the `data-change` event, fired on bulk updates (paste, cut, clear, undo/redo).
|
|
71
131
|
*/
|
|
72
132
|
export interface DataChangeDetail {
|
|
133
|
+
/** Array of cell updates, each with a cell key and new raw value */
|
|
73
134
|
updates: Array<{
|
|
74
135
|
id: string;
|
|
75
136
|
value: string;
|
|
76
137
|
}>;
|
|
138
|
+
/** What triggered the change */
|
|
77
139
|
source?: 'user' | 'undo' | 'redo' | 'programmatic';
|
|
78
|
-
|
|
140
|
+
/** The type of operation that caused the change */
|
|
141
|
+
operation?: 'edit' | 'cut' | 'paste' | 'clear' | 'format' | 'fill' | 'import';
|
|
79
142
|
}
|
|
80
143
|
/**
|
|
81
|
-
*
|
|
144
|
+
* Detail for the `format-change` event, fired when cell formatting is modified.
|
|
82
145
|
*/
|
|
83
146
|
export interface FormatChangeDetail {
|
|
147
|
+
/** Cell keys that were affected */
|
|
84
148
|
cellIds: string[];
|
|
149
|
+
/** The format properties that were applied (empty object for clear) */
|
|
85
150
|
format: CellFormat;
|
|
151
|
+
/** What triggered the format change */
|
|
86
152
|
source: 'user' | 'undo' | 'redo' | 'programmatic';
|
|
87
153
|
}
|
|
88
154
|
/**
|
|
89
|
-
*
|
|
155
|
+
* Compare two CellFormat objects for deep equality (key-order independent).
|
|
156
|
+
* Deep-compares the `numberFormat` sub-object.
|
|
157
|
+
*
|
|
158
|
+
* @param a - First format (or undefined)
|
|
159
|
+
* @param b - Second format (or undefined)
|
|
160
|
+
* @returns `true` if both formats are structurally equal
|
|
90
161
|
*/
|
|
91
162
|
export declare function formatsEqual(a: CellFormat | undefined, b: CellFormat | undefined): boolean;
|
|
92
163
|
/**
|
|
93
|
-
*
|
|
164
|
+
* Format a numeric value according to the given number format options.
|
|
165
|
+
*
|
|
166
|
+
* @param value - The numeric value to format
|
|
167
|
+
* @param opts - Formatting options (type, decimals, currency symbol, thousands separator)
|
|
168
|
+
* @returns The formatted string representation
|
|
169
|
+
*/
|
|
170
|
+
export declare function formatNumber(value: number, opts: NumberFormatOptions): string;
|
|
171
|
+
/**
|
|
172
|
+
* Convert a date serial number (days since 1899-12-30; the fraction is the
|
|
173
|
+
* time of day) to a `Date` whose UTC fields hold the wall-clock date and time.
|
|
174
|
+
* Read it with `getUTCFullYear()`, `getUTCHours()`, etc.
|
|
175
|
+
*
|
|
176
|
+
* @param serial - Date serial number
|
|
177
|
+
* @returns The corresponding date, truncated to the second
|
|
178
|
+
*/
|
|
179
|
+
export declare function dateSerialToDate(serial: number): Date;
|
|
180
|
+
/**
|
|
181
|
+
* Convert wall-clock date/time fields to a date serial number. Uses UTC
|
|
182
|
+
* arithmetic so daylight-saving and historical timezone offsets never shift
|
|
183
|
+
* the result.
|
|
184
|
+
*
|
|
185
|
+
* @param year - Full year (e.g. 2024; 0-99 are not remapped)
|
|
186
|
+
* @param month - 0-indexed month
|
|
187
|
+
* @param day - Day of month (overflow rolls into the next month)
|
|
188
|
+
* @param hours - Hours (default 0)
|
|
189
|
+
* @param minutes - Minutes (default 0)
|
|
190
|
+
* @param seconds - Seconds (default 0)
|
|
191
|
+
* @returns The date serial number
|
|
192
|
+
*/
|
|
193
|
+
export declare function dateToSerial(year: number, month: number, day: number, hours?: number, minutes?: number, seconds?: number): number;
|
|
194
|
+
/**
|
|
195
|
+
* Creates a cell key string from row and column indices.
|
|
196
|
+
*
|
|
197
|
+
* @param row - 0-indexed row number
|
|
198
|
+
* @param col - 0-indexed column number
|
|
199
|
+
* @returns A key in `"row:col"` format (e.g. `"0:0"`)
|
|
94
200
|
*/
|
|
95
201
|
export declare function cellKey(row: number, col: number): string;
|
|
96
202
|
/**
|
|
97
|
-
* Parse a cell key back to coordinates
|
|
203
|
+
* Parse a cell key string back to row/col coordinates.
|
|
204
|
+
*
|
|
205
|
+
* @param key - A key in `"row:col"` format (e.g. `"0:0"`)
|
|
206
|
+
* @returns The parsed coordinate
|
|
98
207
|
*/
|
|
99
208
|
export declare function parseKey(key: string): CellCoord;
|
|
100
209
|
/**
|
|
101
|
-
* Convert a column index
|
|
210
|
+
* Convert a 0-based column index to a column letter (A, B, ... Z, AA, AB...).
|
|
211
|
+
*
|
|
212
|
+
* @param col - 0-indexed column number
|
|
213
|
+
* @returns The column letter(s) (e.g. 0 -> "A", 25 -> "Z", 26 -> "AA")
|
|
102
214
|
*/
|
|
103
215
|
export declare function colToLetter(col: number): string;
|
|
104
216
|
/**
|
|
105
|
-
* Convert a column letter (A, B, ... Z, AA, AB...) to 0-based index
|
|
217
|
+
* Convert a column letter (A, B, ... Z, AA, AB...) to a 0-based index.
|
|
218
|
+
*
|
|
219
|
+
* @param letter - Column letter(s) (e.g. "A", "Z", "AA")
|
|
220
|
+
* @returns 0-indexed column number (e.g. "A" -> 0, "Z" -> 25, "AA" -> 26)
|
|
106
221
|
*/
|
|
107
222
|
export declare function letterToCol(letter: string): number;
|
|
108
223
|
/**
|
|
109
|
-
* Convert a cell reference
|
|
110
|
-
* Supports absolute/mixed references:
|
|
224
|
+
* Convert a cell reference string to a CellCoord.
|
|
225
|
+
* Supports absolute/mixed references: `$A$1`, `$A1`, `A$1`.
|
|
226
|
+
*
|
|
227
|
+
* @param ref - Cell reference (e.g. "A1", "$B$3")
|
|
228
|
+
* @returns The 0-indexed coordinate
|
|
229
|
+
* @throws {Error} If the reference format is invalid
|
|
111
230
|
*/
|
|
112
231
|
export declare function refToCoord(ref: string): CellCoord;
|
|
113
232
|
/**
|
|
114
|
-
* Convert a CellCoord to a cell reference like "A1"
|
|
233
|
+
* Convert a CellCoord to a cell reference string like "A1".
|
|
234
|
+
*
|
|
235
|
+
* @param coord - The 0-indexed coordinate
|
|
236
|
+
* @returns Cell reference string (e.g. `{row: 0, col: 0}` -> "A1")
|
|
115
237
|
*/
|
|
116
238
|
export declare function coordToRef(coord: CellCoord): string;
|
|
117
239
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb;AAED
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB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;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAOjD;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAEnD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parsing and serialization for delimiter-separated text (CSV, TSV).
|
|
3
|
+
*
|
|
4
|
+
* Follows RFC 4180 quoting: a field that contains the delimiter, a double
|
|
5
|
+
* quote, or a line break is wrapped in double quotes, and embedded quotes are
|
|
6
|
+
* doubled (`""`). This is also the format Excel and Google Sheets put on the
|
|
7
|
+
* clipboard as TSV.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Parse delimited text into a 2D array of strings.
|
|
11
|
+
*
|
|
12
|
+
* - Quoted fields may contain delimiters, line breaks, and escaped quotes (`""`).
|
|
13
|
+
* - A quote only opens a quoted field at the start of a field; a quote in the
|
|
14
|
+
* middle of a field (e.g. `5" screen`, which Excel leaves unquoted) is literal.
|
|
15
|
+
* - `\r\n`, `\n`, and bare `\r` all end a row.
|
|
16
|
+
* - A single trailing line break does not produce an extra empty row.
|
|
17
|
+
* - A leading UTF-8 byte-order mark (common in Excel exports) is ignored.
|
|
18
|
+
*
|
|
19
|
+
* @param text - The text to parse
|
|
20
|
+
* @param delimiter - Field separator (default `,`)
|
|
21
|
+
* @returns Rows of fields
|
|
22
|
+
*/
|
|
23
|
+
export declare function parseDelimited(text: string, delimiter?: string): string[][];
|
|
24
|
+
/**
|
|
25
|
+
* Quote a single field if it contains the delimiter, a quote, or a line break.
|
|
26
|
+
*
|
|
27
|
+
* @param value - The field value
|
|
28
|
+
* @param delimiter - Field separator (default `,`)
|
|
29
|
+
* @returns The field, quoted and escaped when necessary
|
|
30
|
+
*/
|
|
31
|
+
export declare function quoteDelimitedField(value: string, delimiter?: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* Serialize a 2D array of strings as delimited text. Rows are joined with `\n`.
|
|
34
|
+
*
|
|
35
|
+
* @param rows - Rows of fields
|
|
36
|
+
* @param delimiter - Field separator (default `,`)
|
|
37
|
+
* @returns The delimited text
|
|
38
|
+
*/
|
|
39
|
+
export declare function serializeDelimited(rows: string[][], delimiter?: string): string;
|
|
40
|
+
//# sourceMappingURL=delimited.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delimited.d.ts","sourceRoot":"","sources":["../../src/utils/delimited.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,SAAM,GAAG,MAAM,EAAE,EAAE,CAiExE;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,SAAM,GAAG,MAAM,CAU1E;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,SAAM,GAAG,MAAM,CAU5E"}
|
|
@@ -1,21 +1,58 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
import { type CellFormat, type GridData, type SelectionRange, type FormulaFunction } from './types.js';
|
|
2
|
+
import { type CellCoord, type CellFormat, type GridData, type SelectionRange, type FormulaFunction } from './types.js';
|
|
3
3
|
import './components/y11n-formula-bar.js';
|
|
4
|
+
/** Options for `toCSV()`. */
|
|
5
|
+
export interface CSVExportOptions {
|
|
6
|
+
/** Range to export. Default: from A1 to the last row/column that has content. */
|
|
7
|
+
range?: SelectionRange;
|
|
8
|
+
/** Field separator. Default: `,` */
|
|
9
|
+
delimiter?: string;
|
|
10
|
+
/** Export computed display values (default) or raw values (formulas). */
|
|
11
|
+
values?: 'display' | 'raw';
|
|
12
|
+
}
|
|
13
|
+
/** Options for `fromCSV()`. */
|
|
14
|
+
export interface CSVImportOptions {
|
|
15
|
+
/** Field separator. Default: `,` */
|
|
16
|
+
delimiter?: string;
|
|
17
|
+
/** Top-left cell to write to. Default: A1 */
|
|
18
|
+
start?: CellCoord;
|
|
19
|
+
}
|
|
4
20
|
/**
|
|
5
|
-
*
|
|
21
|
+
* `<y11n-spreadsheet>` -- An accessible spreadsheet web component.
|
|
22
|
+
*
|
|
23
|
+
* Implements the WAI-ARIA Grid pattern with:
|
|
24
|
+
* - Roving tabindex and full keyboard navigation (arrows, Tab, Home/End, Ctrl+arrows)
|
|
25
|
+
* - Recursive-descent formula engine (`=SUM(A1:B5)`, `=IF(...)`, etc.)
|
|
26
|
+
* - Copy/cut/paste via the Clipboard API (HTML table + TSV formats)
|
|
27
|
+
* - Undo/redo command history (up to 100 entries)
|
|
28
|
+
* - Virtual rendering for large grids (only visible cells + buffer are in the DOM)
|
|
29
|
+
* - Cell formatting (bold, italic, colors, number formats, etc.)
|
|
6
30
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
31
|
+
* @fires cell-change - When a single cell value is edited
|
|
32
|
+
* @fires selection-change - When the selected range changes
|
|
33
|
+
* @fires data-change - On bulk updates (paste, cut, clear, undo/redo)
|
|
34
|
+
* @fires format-change - When cell formatting is modified
|
|
35
|
+
*
|
|
36
|
+
* @csspart editor - The inline cell editor input element
|
|
9
37
|
*/
|
|
10
38
|
export declare class Y11nSpreadsheet extends LitElement {
|
|
39
|
+
/** Number of rows in the grid. Default: 100 */
|
|
11
40
|
rows: number;
|
|
41
|
+
/** Number of columns in the grid. Default: 26 */
|
|
12
42
|
cols: number;
|
|
43
|
+
/** The sparse grid data map. Set externally or via `setData()`. */
|
|
13
44
|
data: GridData;
|
|
45
|
+
/** When true, all editing is disabled. Default: false */
|
|
14
46
|
readOnly: boolean;
|
|
47
|
+
/** Accessible label for the grid. Default: 'Spreadsheet' */
|
|
48
|
+
gridLabel: string;
|
|
49
|
+
/** Record of custom formula functions to register, keyed by name. */
|
|
15
50
|
functions: Record<string, FormulaFunction>;
|
|
16
51
|
private _isEditing;
|
|
17
52
|
private _editValue;
|
|
18
53
|
private _formulaBarMode;
|
|
54
|
+
/** When true, the next render should reposition the editor cursor (set on edit start / ref mode) */
|
|
55
|
+
private _editorNeedsCursorReset;
|
|
19
56
|
/** Whether arrow keys are currently selecting a cell reference in a formula */
|
|
20
57
|
private _refMode;
|
|
21
58
|
/** Screen reader announcement text for mode changes */
|
|
@@ -30,6 +67,7 @@ export declare class Y11nSpreadsheet extends LitElement {
|
|
|
30
67
|
private _clipboardManager;
|
|
31
68
|
/** Internal data store - we keep a separate mutable copy */
|
|
32
69
|
private _internalData;
|
|
70
|
+
private _lastSyncedDataRef;
|
|
33
71
|
/** Track which cell started editing for commit logic */
|
|
34
72
|
private _editingCellKey;
|
|
35
73
|
private _undoStack;
|
|
@@ -41,25 +79,93 @@ export declare class Y11nSpreadsheet extends LitElement {
|
|
|
41
79
|
/** Start/end positions of the reference text within the formula string */
|
|
42
80
|
private _refInsertStart;
|
|
43
81
|
private _refInsertEnd;
|
|
44
|
-
|
|
82
|
+
/** Whether an async paste operation is currently in progress */
|
|
83
|
+
private _pasteInProgress;
|
|
84
|
+
/** Number of cells to process per animation frame during large pastes */
|
|
85
|
+
private static readonly PASTE_CHUNK_SIZE;
|
|
86
|
+
private static readonly INITIAL_VIEW_ROWS;
|
|
87
|
+
private static readonly INITIAL_VIEW_COLS;
|
|
88
|
+
private static readonly ROW_HEADER_WIDTH;
|
|
45
89
|
willUpdate(changedProps: Map<string, unknown>): void;
|
|
46
|
-
/**
|
|
90
|
+
/**
|
|
91
|
+
* Returns a shallow copy of the current grid data.
|
|
92
|
+
*
|
|
93
|
+
* @returns A new Map containing all cell data
|
|
94
|
+
*/
|
|
47
95
|
getData(): GridData;
|
|
48
|
-
/**
|
|
96
|
+
/**
|
|
97
|
+
* Replaces the entire grid data and resets undo/redo history.
|
|
98
|
+
*
|
|
99
|
+
* @param data - The new sparse grid data map
|
|
100
|
+
*/
|
|
49
101
|
setData(data: GridData): void;
|
|
50
|
-
/**
|
|
102
|
+
/**
|
|
103
|
+
* Register a custom formula function at runtime.
|
|
104
|
+
* Triggers a full recalculation of all formulas.
|
|
105
|
+
*
|
|
106
|
+
* @param name - Function name (will be uppercased for lookup)
|
|
107
|
+
* @param fn - The function implementation
|
|
108
|
+
*/
|
|
51
109
|
registerFunction(name: string, fn: FormulaFunction): void;
|
|
52
|
-
/**
|
|
110
|
+
/**
|
|
111
|
+
* Serialize grid contents as CSV (or TSV etc. via `delimiter`).
|
|
112
|
+
* By default exports display values from A1 to the last row and column
|
|
113
|
+
* that contain a value.
|
|
114
|
+
*
|
|
115
|
+
* @param options - Range, delimiter, and whether to export display or raw values
|
|
116
|
+
* @returns The delimited text (rows joined with `\n`); empty string for an empty grid
|
|
117
|
+
*/
|
|
118
|
+
toCSV(options?: CSVExportOptions): string;
|
|
119
|
+
/**
|
|
120
|
+
* Write CSV (or TSV etc. via `delimiter`) text into the grid starting at
|
|
121
|
+
* `start` (default A1). Values beginning with `=` become formulas. Values
|
|
122
|
+
* outside the grid's `rows`/`cols` are dropped, so grow the grid first if
|
|
123
|
+
* needed. The import is a single undoable step and fires `data-change`
|
|
124
|
+
* with `operation: 'import'`.
|
|
125
|
+
*
|
|
126
|
+
* @param text - Delimited text
|
|
127
|
+
* @param options - Delimiter and top-left target cell
|
|
128
|
+
*/
|
|
129
|
+
fromCSV(text: string, options?: CSVImportOptions): void;
|
|
130
|
+
/**
|
|
131
|
+
* Returns the format for a cell, or undefined if unformatted.
|
|
132
|
+
*
|
|
133
|
+
* @param cellId - Cell key in `"row:col"` format
|
|
134
|
+
* @returns The cell's format, or undefined
|
|
135
|
+
*/
|
|
53
136
|
getCellFormat(cellId: string): CellFormat | undefined;
|
|
54
|
-
/**
|
|
137
|
+
/**
|
|
138
|
+
* Merges format properties into a cell. Creates the cell if it does not exist.
|
|
139
|
+
*
|
|
140
|
+
* @param cellId - Cell key in `"row:col"` format
|
|
141
|
+
* @param format - Format properties to merge
|
|
142
|
+
*/
|
|
55
143
|
setCellFormat(cellId: string, format: CellFormat): void;
|
|
56
|
-
/**
|
|
144
|
+
/**
|
|
145
|
+
* Applies format to all cells in a rectangular range.
|
|
146
|
+
*
|
|
147
|
+
* @param range - The selection range to format
|
|
148
|
+
* @param format - Format properties to apply
|
|
149
|
+
*/
|
|
57
150
|
setRangeFormat(range: SelectionRange, format: CellFormat): void;
|
|
58
|
-
/**
|
|
151
|
+
/**
|
|
152
|
+
* Removes all formatting from a single cell.
|
|
153
|
+
*
|
|
154
|
+
* @param cellId - Cell key in `"row:col"` format
|
|
155
|
+
*/
|
|
59
156
|
clearCellFormat(cellId: string): void;
|
|
60
|
-
/**
|
|
157
|
+
/**
|
|
158
|
+
* Removes all formatting from every cell in a range.
|
|
159
|
+
*
|
|
160
|
+
* @param range - The selection range to clear formatting from
|
|
161
|
+
*/
|
|
61
162
|
clearRangeFormat(range: SelectionRange): void;
|
|
62
|
-
/**
|
|
163
|
+
/**
|
|
164
|
+
* Toggles a boolean format property on the current selection.
|
|
165
|
+
* If all selected cells have the property set, it is removed; otherwise it is applied to all.
|
|
166
|
+
*
|
|
167
|
+
* @param prop - The boolean format property to toggle
|
|
168
|
+
*/
|
|
63
169
|
toggleFormat(prop: 'bold' | 'italic' | 'underline' | 'strikethrough'): void;
|
|
64
170
|
private _applyFormat;
|
|
65
171
|
private _clearFormat;
|
|
@@ -69,6 +175,12 @@ export declare class Y11nSpreadsheet extends LitElement {
|
|
|
69
175
|
private _syncData;
|
|
70
176
|
private _recalcAll;
|
|
71
177
|
private _recalcAffected;
|
|
178
|
+
/** Re-apply number formatting to all cells that have a numberFormat */
|
|
179
|
+
private _reapplyNumberFormats;
|
|
180
|
+
/** Re-apply number formatting only to the given set of cell keys */
|
|
181
|
+
private _applyNumberFormatsToKeys;
|
|
182
|
+
/** Apply number formatting to a single cell using rawValue for robustness */
|
|
183
|
+
private _applyNumberFormatToCell;
|
|
72
184
|
private _getCell;
|
|
73
185
|
private _getCellDisplay;
|
|
74
186
|
private _getCellRaw;
|
|
@@ -79,6 +191,16 @@ export declare class Y11nSpreadsheet extends LitElement {
|
|
|
79
191
|
private _snapshotSelection;
|
|
80
192
|
private _restoreSelection;
|
|
81
193
|
private _buildCommandBatch;
|
|
194
|
+
/**
|
|
195
|
+
* Build a batch that writes values and, optionally, formats. Cells whose
|
|
196
|
+
* value and format would both be unchanged are skipped.
|
|
197
|
+
*/
|
|
198
|
+
private _buildCellBatch;
|
|
199
|
+
/**
|
|
200
|
+
* Execute and record a user batch. Large batches are applied in chunks
|
|
201
|
+
* across animation frames so the UI stays responsive.
|
|
202
|
+
*/
|
|
203
|
+
private _runUserBatch;
|
|
82
204
|
private _pushHistory;
|
|
83
205
|
private _finalizeBatch;
|
|
84
206
|
private _applyBatch;
|
|
@@ -117,12 +239,48 @@ export declare class Y11nSpreadsheet extends LitElement {
|
|
|
117
239
|
private _focusActiveCell;
|
|
118
240
|
private _handleGridKeydown;
|
|
119
241
|
private _handleEditorKeydown;
|
|
242
|
+
private _isCellFilled;
|
|
243
|
+
/**
|
|
244
|
+
* Ctrl+Space: select the full columns spanned by the selection.
|
|
245
|
+
* Shift+Space: select the full rows. Both: select all.
|
|
246
|
+
* The active cell stays where it is.
|
|
247
|
+
*/
|
|
248
|
+
private _selectWholeRowsOrColumns;
|
|
249
|
+
/**
|
|
250
|
+
* Pointer selection on row/column headers: click selects the row or
|
|
251
|
+
* column, Shift+click extends from the selection's anchor, and dragging
|
|
252
|
+
* across headers selects a span. The active cell moves into the clicked
|
|
253
|
+
* column (or row) but keeps its row (or column), so the view doesn't jump.
|
|
254
|
+
*/
|
|
255
|
+
private _handleHeaderPointerDown;
|
|
256
|
+
private _handleSelectAll;
|
|
257
|
+
private _handleCornerKeydown;
|
|
120
258
|
private _handleCellPointerDown;
|
|
121
259
|
private _handleCellDblClick;
|
|
122
260
|
private _handleCopy;
|
|
123
261
|
private _handleCut;
|
|
124
262
|
private _handlePaste;
|
|
263
|
+
/**
|
|
264
|
+
* Apply a command batch progressively in chunks, yielding to the event loop
|
|
265
|
+
* between chunks via requestAnimationFrame to keep the UI responsive.
|
|
266
|
+
*/
|
|
267
|
+
private _applyBatchProgressive;
|
|
125
268
|
private _clearSelectedCells;
|
|
269
|
+
/**
|
|
270
|
+
* Fill down (Ctrl+D) or right (Ctrl+R): copy the first row/column of the
|
|
271
|
+
* selection into the rest of it, shifting relative formula references and
|
|
272
|
+
* copying formats. With a single row/column selected, copies from the
|
|
273
|
+
* row above / column to the left instead.
|
|
274
|
+
*/
|
|
275
|
+
private _fillSelection;
|
|
276
|
+
/** Shift the relative references of a formula; non-formulas are returned as-is. */
|
|
277
|
+
private _shiftFormula;
|
|
278
|
+
/**
|
|
279
|
+
* Ctrl/Cmd+Enter while editing: commit the edited value into every cell of
|
|
280
|
+
* the selection. Formulas are written relative to each cell, as if the
|
|
281
|
+
* edited cell were copied there.
|
|
282
|
+
*/
|
|
283
|
+
private _commitEditToSelection;
|
|
126
284
|
private _handleScroll;
|
|
127
285
|
private _handleEditorInput;
|
|
128
286
|
private _handleEditorBlur;
|
|
@@ -137,12 +295,15 @@ export declare class Y11nSpreadsheet extends LitElement {
|
|
|
137
295
|
* We add a buffer of extra rows/cols for smooth scrolling.
|
|
138
296
|
*/
|
|
139
297
|
private _getVisibleRange;
|
|
298
|
+
private _ensureCellVisible;
|
|
140
299
|
private _getCSSVarPx;
|
|
141
300
|
private _getEditorStyle;
|
|
142
301
|
static styles: import("lit").CSSResult;
|
|
143
302
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
303
|
+
private _renderColumnSpacer;
|
|
144
304
|
private _renderHeaderRow;
|
|
145
305
|
private _renderRows;
|
|
306
|
+
private _renderCell;
|
|
146
307
|
private _renderRow;
|
|
147
308
|
private _getAnnouncement;
|
|
148
309
|
protected updated(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"y11n-spreadsheet.d.ts","sourceRoot":"","sources":["../src/y11n-spreadsheet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU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Aa;IAQrB,OAAO,CAAC,kBAAkB;IAK1B,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,2BAA2B;IAMnC,OAAO,CAAC,uBAAuB;IAuB/B,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,wBAAwB;IAOhC,OAAO,CAAC,mBAAmB;IAM3B,OAAO,CAAC,qBAAqB;IAQ7B;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAkCxB,OAAO,CAAC,kBAAkB;IA6C1B,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,eAAe;IAkCvB,MAAM,CAAC,MAAM,0BAmLX;IAEF,SAAS,CAAC,MAAM,yCAuDf;IAED,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,gBAAgB;IAoCxB,OAAO,CAAC,WAAW;IAsBnB,OAAO,CAAC,WAAW;IA8BnB,OAAO,CAAC,UAAU;IA8BlB,OAAO,CAAC,gBAAgB;IA0BxB,SAAS,CAAC,OAAO,IAAI,IAAI,CAYxB;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,eAAe,CAAC;KACrC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "y11n-spreadsheet",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Accessible spreadsheet web component built with Lit 3.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -53,18 +53,17 @@
|
|
|
53
53
|
"lit": "^3.0.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"
|
|
57
|
-
"@playwright/test": "^1.
|
|
58
|
-
"@storybook/addon-
|
|
59
|
-
"@storybook/
|
|
60
|
-
"@storybook/
|
|
61
|
-
"@storybook/
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"vitest": "^4.0.18"
|
|
56
|
+
"@axe-core/playwright": "^4.14.0",
|
|
57
|
+
"@playwright/test": "^1.65.0",
|
|
58
|
+
"@storybook/addon-a11y": "^10.6.6",
|
|
59
|
+
"@storybook/addon-docs": "^10.6.6",
|
|
60
|
+
"@storybook/web-components": "^10.6.6",
|
|
61
|
+
"@storybook/web-components-vite": "^10.6.6",
|
|
62
|
+
"jsdom": "^31.0.0",
|
|
63
|
+
"lit": "^3.3.3",
|
|
64
|
+
"storybook": "^10.6.6",
|
|
65
|
+
"typescript": "^7.0.2",
|
|
66
|
+
"vite": "^8.3.6",
|
|
67
|
+
"vitest": "^5.1.0"
|
|
69
68
|
}
|
|
70
69
|
}
|