y11n-spreadsheet 0.1.0 → 1.0.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/LICENSE +21 -0
- package/dist/components/y11n-format-toolbar.d.ts +43 -0
- package/dist/components/y11n-format-toolbar.d.ts.map +1 -0
- package/dist/components/y11n-formula-bar.d.ts +30 -0
- package/dist/components/y11n-formula-bar.d.ts.map +1 -0
- package/dist/controllers/clipboard-manager.d.ts +91 -0
- package/dist/controllers/clipboard-manager.d.ts.map +1 -0
- package/dist/controllers/selection-manager.d.ts +52 -0
- package/dist/controllers/selection-manager.d.ts.map +1 -0
- package/dist/engine/formula-engine.d.ts +75 -0
- package/dist/engine/formula-engine.d.ts.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1574 -433
- package/dist/types.d.ts +117 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/y11n-spreadsheet.d.ts +155 -0
- package/dist/y11n-spreadsheet.d.ts.map +1 -0
- package/package.json +26 -5
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coordinate System
|
|
3
|
+
* Zero-indexed (0,0 is A1)
|
|
4
|
+
*/
|
|
5
|
+
export interface CellCoord {
|
|
6
|
+
row: number;
|
|
7
|
+
col: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Cell-level formatting options
|
|
11
|
+
*/
|
|
12
|
+
export interface CellFormat {
|
|
13
|
+
bold?: boolean;
|
|
14
|
+
italic?: boolean;
|
|
15
|
+
underline?: boolean;
|
|
16
|
+
strikethrough?: boolean;
|
|
17
|
+
textColor?: string;
|
|
18
|
+
backgroundColor?: string;
|
|
19
|
+
textAlign?: 'left' | 'center' | 'right';
|
|
20
|
+
fontSize?: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Data Structure for a Single Cell
|
|
24
|
+
*/
|
|
25
|
+
export interface CellData {
|
|
26
|
+
rawValue: string;
|
|
27
|
+
displayValue: string;
|
|
28
|
+
type: 'text' | 'number' | 'boolean' | 'error';
|
|
29
|
+
format?: CellFormat;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The Sparse Data Map
|
|
33
|
+
* Key format: "${row}:${col}" (e.g., "0:0")
|
|
34
|
+
*/
|
|
35
|
+
export type GridData = Map<string, CellData>;
|
|
36
|
+
/**
|
|
37
|
+
* Selection Range (normalized bounding box)
|
|
38
|
+
*/
|
|
39
|
+
export interface SelectionRange {
|
|
40
|
+
start: CellCoord;
|
|
41
|
+
end: CellCoord;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Formula Context
|
|
45
|
+
* Passed to custom functions to allow them to access the grid
|
|
46
|
+
*/
|
|
47
|
+
export interface FormulaContext {
|
|
48
|
+
getCellValue: (ref: string) => unknown;
|
|
49
|
+
getRangeValues: (start: string, end: string) => unknown[];
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* A formula function that receives a context and arguments
|
|
53
|
+
*/
|
|
54
|
+
export type FormulaFunction = (ctx: FormulaContext, ...args: unknown[]) => unknown;
|
|
55
|
+
/**
|
|
56
|
+
* Cell change event detail
|
|
57
|
+
*/
|
|
58
|
+
export interface CellChangeDetail {
|
|
59
|
+
cellId: string;
|
|
60
|
+
value: string;
|
|
61
|
+
oldValue: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Selection change event detail
|
|
65
|
+
*/
|
|
66
|
+
export interface SelectionChangeDetail {
|
|
67
|
+
range: SelectionRange;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Data change event detail (bulk updates)
|
|
71
|
+
*/
|
|
72
|
+
export interface DataChangeDetail {
|
|
73
|
+
updates: Array<{
|
|
74
|
+
id: string;
|
|
75
|
+
value: string;
|
|
76
|
+
}>;
|
|
77
|
+
source?: 'user' | 'undo' | 'redo' | 'programmatic';
|
|
78
|
+
operation?: 'edit' | 'cut' | 'paste' | 'clear' | 'format';
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Format change event detail
|
|
82
|
+
*/
|
|
83
|
+
export interface FormatChangeDetail {
|
|
84
|
+
cellIds: string[];
|
|
85
|
+
format: CellFormat;
|
|
86
|
+
source: 'user' | 'undo' | 'redo' | 'programmatic';
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Shallow-compare two CellFormat objects (key-order independent)
|
|
90
|
+
*/
|
|
91
|
+
export declare function formatsEqual(a: CellFormat | undefined, b: CellFormat | undefined): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Creates a cell key from row and col indices
|
|
94
|
+
*/
|
|
95
|
+
export declare function cellKey(row: number, col: number): string;
|
|
96
|
+
/**
|
|
97
|
+
* Parse a cell key back to coordinates
|
|
98
|
+
*/
|
|
99
|
+
export declare function parseKey(key: string): CellCoord;
|
|
100
|
+
/**
|
|
101
|
+
* Convert a column index (0-based) to a letter (A, B, ... Z, AA, AB...)
|
|
102
|
+
*/
|
|
103
|
+
export declare function colToLetter(col: number): string;
|
|
104
|
+
/**
|
|
105
|
+
* Convert a column letter (A, B, ... Z, AA, AB...) to 0-based index
|
|
106
|
+
*/
|
|
107
|
+
export declare function letterToCol(letter: string): number;
|
|
108
|
+
/**
|
|
109
|
+
* Convert a cell reference like "A1" to a CellCoord
|
|
110
|
+
* Supports absolute/mixed references: $A$1, $A1, A$1
|
|
111
|
+
*/
|
|
112
|
+
export declare function refToCoord(ref: string): CellCoord;
|
|
113
|
+
/**
|
|
114
|
+
* Convert a CellCoord to a cell reference like "A1"
|
|
115
|
+
*/
|
|
116
|
+
export declare function coordToRef(coord: CellCoord): string;
|
|
117
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,SAAS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
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { type CellFormat, type GridData, type SelectionRange, type FormulaFunction } from './types.js';
|
|
3
|
+
import './components/y11n-formula-bar.js';
|
|
4
|
+
/**
|
|
5
|
+
* <y11n-spreadsheet> - An accessible spreadsheet web component.
|
|
6
|
+
*
|
|
7
|
+
* Implements the WAI-ARIA Grid pattern with roving tabindex,
|
|
8
|
+
* keyboard navigation, formula support, and clipboard operations.
|
|
9
|
+
*/
|
|
10
|
+
export declare class Y11nSpreadsheet extends LitElement {
|
|
11
|
+
rows: number;
|
|
12
|
+
cols: number;
|
|
13
|
+
data: GridData;
|
|
14
|
+
readOnly: boolean;
|
|
15
|
+
functions: Record<string, FormulaFunction>;
|
|
16
|
+
private _isEditing;
|
|
17
|
+
private _editValue;
|
|
18
|
+
private _formulaBarMode;
|
|
19
|
+
/** Whether arrow keys are currently selecting a cell reference in a formula */
|
|
20
|
+
private _refMode;
|
|
21
|
+
/** Screen reader announcement text for mode changes */
|
|
22
|
+
private _modeAnnouncement;
|
|
23
|
+
/** Track scroll position for virtual rendering */
|
|
24
|
+
private _scrollTop;
|
|
25
|
+
private _scrollLeft;
|
|
26
|
+
private _editor;
|
|
27
|
+
private _grid;
|
|
28
|
+
private _selection;
|
|
29
|
+
private _formulaEngine;
|
|
30
|
+
private _clipboardManager;
|
|
31
|
+
/** Internal data store - we keep a separate mutable copy */
|
|
32
|
+
private _internalData;
|
|
33
|
+
/** Track which cell started editing for commit logic */
|
|
34
|
+
private _editingCellKey;
|
|
35
|
+
private _undoStack;
|
|
36
|
+
private _redoStack;
|
|
37
|
+
private readonly _maxHistory;
|
|
38
|
+
/** Reference mode cursor position */
|
|
39
|
+
private _refCursorRow;
|
|
40
|
+
private _refCursorCol;
|
|
41
|
+
/** Start/end positions of the reference text within the formula string */
|
|
42
|
+
private _refInsertStart;
|
|
43
|
+
private _refInsertEnd;
|
|
44
|
+
connectedCallback(): void;
|
|
45
|
+
willUpdate(changedProps: Map<string, unknown>): void;
|
|
46
|
+
/** Returns the current state of the grid data */
|
|
47
|
+
getData(): GridData;
|
|
48
|
+
/** Hard reset of the grid data */
|
|
49
|
+
setData(data: GridData): void;
|
|
50
|
+
/** Dynamically register a formula function */
|
|
51
|
+
registerFunction(name: string, fn: FormulaFunction): void;
|
|
52
|
+
/** Returns the format for a cell, or undefined if unformatted */
|
|
53
|
+
getCellFormat(cellId: string): CellFormat | undefined;
|
|
54
|
+
/** Merges format into a cell (creates cell if needed). Pass undefined to unset a property. */
|
|
55
|
+
setCellFormat(cellId: string, format: CellFormat): void;
|
|
56
|
+
/** Applies format to all cells in a range (creates empty cells if needed) */
|
|
57
|
+
setRangeFormat(range: SelectionRange, format: CellFormat): void;
|
|
58
|
+
/** Removes all formatting from a cell */
|
|
59
|
+
clearCellFormat(cellId: string): void;
|
|
60
|
+
/** Removes all formatting from a range */
|
|
61
|
+
clearRangeFormat(range: SelectionRange): void;
|
|
62
|
+
/** Toggles a boolean format property on the current selection */
|
|
63
|
+
toggleFormat(prop: 'bold' | 'italic' | 'underline' | 'strikethrough'): void;
|
|
64
|
+
private _applyFormat;
|
|
65
|
+
private _clearFormat;
|
|
66
|
+
private _buildFormatBatch;
|
|
67
|
+
/** Convert CellFormat to inline styles for styleMap */
|
|
68
|
+
private _getCellStyles;
|
|
69
|
+
private _syncData;
|
|
70
|
+
private _recalcAll;
|
|
71
|
+
private _recalcAffected;
|
|
72
|
+
private _getCell;
|
|
73
|
+
private _getCellDisplay;
|
|
74
|
+
private _getCellRaw;
|
|
75
|
+
private _getActiveCellKey;
|
|
76
|
+
private _getActiveCellRef;
|
|
77
|
+
private _setCellRaw;
|
|
78
|
+
private _applyRawValueByString;
|
|
79
|
+
private _snapshotSelection;
|
|
80
|
+
private _restoreSelection;
|
|
81
|
+
private _buildCommandBatch;
|
|
82
|
+
private _pushHistory;
|
|
83
|
+
private _finalizeBatch;
|
|
84
|
+
private _applyBatch;
|
|
85
|
+
private _revertBatch;
|
|
86
|
+
/** Low-level: set or remove format on a cell */
|
|
87
|
+
private _applyCellFormat;
|
|
88
|
+
private _executeUserBatch;
|
|
89
|
+
private _commitRawValue;
|
|
90
|
+
private _undo;
|
|
91
|
+
private _redo;
|
|
92
|
+
/** Dispatch format-change for any batch that contains format deltas.
|
|
93
|
+
* NOTE: The event carries the format from the first delta only. For heterogeneous
|
|
94
|
+
* batches (e.g., paste with varied per-cell formatting), this is an approximation —
|
|
95
|
+
* the cellIds are accurate but the format may not represent every cell. Consumers
|
|
96
|
+
* that need per-cell accuracy should read cell data directly. */
|
|
97
|
+
private _dispatchFormatChangeForBatch;
|
|
98
|
+
private _startEditing;
|
|
99
|
+
private _commitEdit;
|
|
100
|
+
private _cancelEdit;
|
|
101
|
+
/**
|
|
102
|
+
* Check if the cursor is at a position in the formula where a cell reference
|
|
103
|
+
* can be inserted (after =, +, -, *, /, &, (, ,, or comparison operators).
|
|
104
|
+
*/
|
|
105
|
+
private _isRefPositionInFormula;
|
|
106
|
+
/**
|
|
107
|
+
* Handle an arrow key press during formula editing to insert or move
|
|
108
|
+
* a cell reference.
|
|
109
|
+
*/
|
|
110
|
+
private _handleRefArrow;
|
|
111
|
+
private _exitRefMode;
|
|
112
|
+
/**
|
|
113
|
+
* Cycle the cell reference at/before the cursor through reference modes:
|
|
114
|
+
* A1 → $A$1 → A$1 → $A1 → A1
|
|
115
|
+
*/
|
|
116
|
+
private _cycleReferenceMode;
|
|
117
|
+
private _focusActiveCell;
|
|
118
|
+
private _handleGridKeydown;
|
|
119
|
+
private _handleEditorKeydown;
|
|
120
|
+
private _handleCellPointerDown;
|
|
121
|
+
private _handleCellDblClick;
|
|
122
|
+
private _handleCopy;
|
|
123
|
+
private _handleCut;
|
|
124
|
+
private _handlePaste;
|
|
125
|
+
private _clearSelectedCells;
|
|
126
|
+
private _handleScroll;
|
|
127
|
+
private _handleEditorInput;
|
|
128
|
+
private _handleEditorBlur;
|
|
129
|
+
private _handleFormulaBarModeChange;
|
|
130
|
+
private _handleFormulaBarCommit;
|
|
131
|
+
private _dispatchCellChange;
|
|
132
|
+
private _dispatchSelectionChange;
|
|
133
|
+
private _dispatchDataChange;
|
|
134
|
+
private _dispatchFormatChange;
|
|
135
|
+
/**
|
|
136
|
+
* Compute which rows and columns are visible based on scroll position.
|
|
137
|
+
* We add a buffer of extra rows/cols for smooth scrolling.
|
|
138
|
+
*/
|
|
139
|
+
private _getVisibleRange;
|
|
140
|
+
private _getCSSVarPx;
|
|
141
|
+
private _getEditorStyle;
|
|
142
|
+
static styles: import("lit").CSSResult;
|
|
143
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
144
|
+
private _renderHeaderRow;
|
|
145
|
+
private _renderRows;
|
|
146
|
+
private _renderRow;
|
|
147
|
+
private _getAnnouncement;
|
|
148
|
+
protected updated(): void;
|
|
149
|
+
}
|
|
150
|
+
declare global {
|
|
151
|
+
interface HTMLElementTagNameMap {
|
|
152
|
+
'y11n-spreadsheet': Y11nSpreadsheet;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=y11n-spreadsheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"y11n-spreadsheet.d.ts","sourceRoot":"","sources":["../src/y11n-spreadsheet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAIrD,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,eAAe,EASrB,MAAM,YAAY,CAAC;AAIpB,OAAO,kCAAkC,CAAC;AA0B1C;;;;;GAKG;AACH,qBACa,eAAgB,SAAQ,UAAU;IAGjB,IAAI,SAAO;IACX,IAAI,SAAM;IACN,IAAI,EAAE,QAAQ,CAAa;IACS,QAAQ,UAAS;IACrD,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAM;IAIvE,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,UAAU,CAAM;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OAGG;IACH,OAAO,CAAC,mBAAmB;IAqD3B,OAAO,CAAC,gBAAgB;IAaxB,OAAO,CAAC,kBAAkB;IAkJ1B,OAAO,CAAC,oBAAoB;IAsD5B,OAAO,CAAC,sBAAsB;IA8C9B,OAAO,CAAC,mBAAmB;YAcb,WAAW;YAIX,UAAU;YAsBV,YAAY;IA6C1B,OAAO,CAAC,mBAAmB;IAsB3B,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,kBAAkB;IAK1B,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,2BAA2B;IAMnC,OAAO,CAAC,uBAAuB;IAgB/B,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,wBAAwB;IAOhC,OAAO,CAAC,mBAAmB;IAM3B,OAAO,CAAC,qBAAqB;IAQ7B;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IA4BxB,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,eAAe;IAkCvB,MAAM,CAAC,MAAM,0BAoKX;IAEF,SAAS,CAAC,MAAM;IAwDhB,OAAO,CAAC,gBAAgB;IA8BxB,OAAO,CAAC,WAAW;IAenB,OAAO,CAAC,UAAU;IA8ClB,OAAO,CAAC,gBAAgB;IAMxB,SAAS,CAAC,OAAO,IAAI,IAAI;CAY1B;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,eAAe,CAAC;KACrC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "y11n-spreadsheet",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Accessible spreadsheet web component built with Lit 3.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
9
15
|
"files": [
|
|
10
16
|
"dist"
|
|
11
17
|
],
|
|
12
18
|
"scripts": {
|
|
13
19
|
"dev": "vite",
|
|
14
|
-
"build": "tsc && vite build",
|
|
20
|
+
"build": "tsc --noEmit && vite build && tsc -p tsconfig.build.json --emitDeclarationOnly",
|
|
15
21
|
"preview": "vite preview",
|
|
16
22
|
"typecheck": "tsc --noEmit",
|
|
17
23
|
"test": "vitest run",
|
|
@@ -20,20 +26,34 @@
|
|
|
20
26
|
"test:e2e:ui": "playwright test --ui",
|
|
21
27
|
"test:e2e:headed": "playwright test --headed",
|
|
22
28
|
"storybook": "storybook dev -p 6006",
|
|
23
|
-
"build-storybook": "storybook build"
|
|
29
|
+
"build-storybook": "storybook build",
|
|
30
|
+
"prepublishOnly": "npm run build && npm test"
|
|
24
31
|
},
|
|
25
32
|
"keywords": [
|
|
26
33
|
"spreadsheet",
|
|
27
34
|
"accessible",
|
|
28
35
|
"web-component",
|
|
29
36
|
"lit",
|
|
30
|
-
"aria"
|
|
37
|
+
"aria",
|
|
38
|
+
"a11y",
|
|
39
|
+
"wai-aria",
|
|
40
|
+
"grid"
|
|
31
41
|
],
|
|
42
|
+
"author": "Ege Ozcan <egecan@gmail.com>",
|
|
32
43
|
"license": "MIT",
|
|
33
|
-
"
|
|
44
|
+
"repository": {
|
|
45
|
+
"type": "git",
|
|
46
|
+
"url": "git+https://github.com/egeozcan/accessible-spreadsheet-component.git"
|
|
47
|
+
},
|
|
48
|
+
"homepage": "https://github.com/egeozcan/accessible-spreadsheet-component#readme",
|
|
49
|
+
"bugs": {
|
|
50
|
+
"url": "https://github.com/egeozcan/accessible-spreadsheet-component/issues"
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
34
53
|
"lit": "^3.0.0"
|
|
35
54
|
},
|
|
36
55
|
"devDependencies": {
|
|
56
|
+
"lit": "^3.0.0",
|
|
37
57
|
"@playwright/test": "^1.56.1",
|
|
38
58
|
"@storybook/addon-essentials": "^8.6.17",
|
|
39
59
|
"@storybook/blocks": "^8.6.17",
|
|
@@ -41,6 +61,7 @@
|
|
|
41
61
|
"@storybook/test": "8.6.17",
|
|
42
62
|
"@storybook/web-components": "^8.6.17",
|
|
43
63
|
"@storybook/web-components-vite": "^8.6.17",
|
|
64
|
+
"jsdom": "^28.1.0",
|
|
44
65
|
"storybook": "^8.6.17",
|
|
45
66
|
"typescript": "^5.3.0",
|
|
46
67
|
"vite": "^5.0.0",
|