y11n-spreadsheet 0.1.0 → 1.0.1

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ege Ozcan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,43 @@
1
+ import { LitElement } from 'lit';
2
+ export interface FormatActionDetail {
3
+ action: 'bold' | 'italic' | 'underline' | 'strikethrough' | 'textColor' | 'backgroundColor' | 'textAlign' | 'fontSize' | 'clearFormat';
4
+ value?: string | number | boolean;
5
+ }
6
+ /**
7
+ * <y11n-format-toolbar> - A companion toolbar for cell formatting.
8
+ *
9
+ * Connected to <y11n-spreadsheet> via properties and events.
10
+ * Consumer wires them together:
11
+ *
12
+ * ```html
13
+ * <y11n-format-toolbar
14
+ * .bold=${format.bold}
15
+ * @format-action=${handle}
16
+ * ></y11n-format-toolbar>
17
+ * ```
18
+ */
19
+ export declare class Y11nFormatToolbar extends LitElement {
20
+ bold: boolean;
21
+ italic: boolean;
22
+ underline: boolean;
23
+ strikethrough: boolean;
24
+ textColor: string;
25
+ backgroundColor: string;
26
+ textAlign: 'left' | 'center' | 'right';
27
+ fontSize: number;
28
+ readOnly: boolean;
29
+ static styles: import("lit").CSSResult;
30
+ private _dispatch;
31
+ private _handleToolbarKeydown;
32
+ render(): import("lit-html").TemplateResult<1>;
33
+ }
34
+ /** Compute consensus format from a selection range */
35
+ export declare function computeSelectionFormat(getData: (cellId: string) => {
36
+ format?: import('../types.js').CellFormat;
37
+ } | undefined, range: import('../types.js').SelectionRange): import('../types.js').CellFormat;
38
+ declare global {
39
+ interface HTMLElementTagNameMap {
40
+ 'y11n-format-toolbar': Y11nFormatToolbar;
41
+ }
42
+ }
43
+ //# sourceMappingURL=y11n-format-toolbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"y11n-format-toolbar.d.ts","sourceRoot":"","sources":["../../src/components/y11n-format-toolbar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,MAAM,WAAW,kBAAkB;IACjC,MAAM,EACF,MAAM,GACN,QAAQ,GACR,WAAW,GACX,eAAe,GACf,WAAW,GACX,iBAAiB,GACjB,WAAW,GACX,UAAU,GACV,aAAa,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CACnC;AAED;;;;;;;;;;;;GAYG;AACH,qBACa,iBAAkB,SAAQ,UAAU;IAGlB,IAAI,UAAS;IACb,MAAM,UAAS;IACf,SAAS,UAAS;IAClB,aAAa,UAAS;IACvB,SAAS,SAAa;IACtB,eAAe,SAAa;IAC5B,SAAS,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAU;IAChD,QAAQ,SAAM;IAC0B,QAAQ,UAAS;IAIrF,MAAM,CAAC,MAAM,0BAiKX;IAIF,OAAO,CAAC,SAAS;IAYjB,OAAO,CAAC,qBAAqB;IAgC7B,MAAM;CAuJP;AAED,sDAAsD;AACtD,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK;IAAE,MAAM,CAAC,EAAE,OAAO,aAAa,EAAE,UAAU,CAAA;CAAE,GAAG,SAAS,EACtF,KAAK,EAAE,OAAO,aAAa,EAAE,cAAc,GAC1C,OAAO,aAAa,EAAE,UAAU,CAkDlC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,qBAAqB,EAAE,iBAAiB,CAAC;KAC1C;CACF"}
@@ -0,0 +1,30 @@
1
+ import { LitElement } from 'lit';
2
+ export type FormulaBarMode = 'raw' | 'formatted';
3
+ /**
4
+ * Reusable formula bar that supports raw/formatted value display.
5
+ * Emits commit + mode-change events and leaves data persistence to parent components.
6
+ */
7
+ export declare class Y11nFormulaBar extends LitElement {
8
+ cellRef: string;
9
+ rawValue: string;
10
+ displayValue: string;
11
+ mode: FormulaBarMode;
12
+ readOnly: boolean;
13
+ private _draft;
14
+ private _suppressNextBlur;
15
+ static styles: import("lit").CSSResult;
16
+ willUpdate(changedProps: Map<string, unknown>): void;
17
+ private _sourceValue;
18
+ private _setMode;
19
+ private _onInput;
20
+ private _commit;
21
+ private _onKeydown;
22
+ private _onBlur;
23
+ render(): import("lit-html").TemplateResult<1>;
24
+ }
25
+ declare global {
26
+ interface HTMLElementTagNameMap {
27
+ 'y11n-formula-bar': Y11nFormulaBar;
28
+ }
29
+ }
30
+ //# sourceMappingURL=y11n-formula-bar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"y11n-formula-bar.d.ts","sourceRoot":"","sources":["../../src/components/y11n-formula-bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,WAAW,CAAC;AAUjD;;;GAGG;AACH,qBACa,cAAe,SAAQ,UAAU;IACO,OAAO,SAAQ;IACd,QAAQ,SAAM;IACV,YAAY,SAAM;IAC9C,IAAI,EAAE,cAAc,CAAS;IACW,QAAQ,UAAS;IAE5E,OAAO,CAAC,MAAM,CAAM;IAC7B,OAAO,CAAC,iBAAiB,CAAS;IAElC,MAAM,CAAC,MAAM,0BAuEX;IAEF,UAAU,CAAC,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAUpD,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,QAAQ;IAWhB,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,OAAO;IAUf,OAAO,CAAC,UAAU;IAWlB,OAAO,CAAC,OAAO;IAQf,MAAM;CA8BP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,cAAc,CAAC;KACpC;CACF"}
@@ -0,0 +1,91 @@
1
+ import { type CellFormat, type GridData, type SelectionRange } from '../types.js';
2
+ export interface PasteUpdate {
3
+ id: string;
4
+ value: string;
5
+ format?: CellFormat;
6
+ }
7
+ /**
8
+ * ClipboardManager - Handles copy, cut, and paste operations
9
+ * using the system clipboard API with TSV and HTML table formats.
10
+ */
11
+ export declare class ClipboardManager {
12
+ /** Source range and data from the last internal copy/cut, used for reference adjustment on paste */
13
+ private _copySourceRange;
14
+ private _copySourceData;
15
+ /**
16
+ * Copy the selected range to the clipboard as both HTML table and TSV.
17
+ * Falls back to text-only if ClipboardItem API is unavailable.
18
+ */
19
+ copy(data: GridData, range: SelectionRange): Promise<void>;
20
+ /**
21
+ * Cut: copy to clipboard and return the keys that should be cleared.
22
+ */
23
+ cut(data: GridData, range: SelectionRange): Promise<string[]>;
24
+ /**
25
+ * Parse clipboard content and return the updates to apply.
26
+ * If data was copied internally, uses raw values with reference adjustment.
27
+ * Otherwise tries HTML table format first, then falls back to TSV text.
28
+ * The target is the top-left cell where paste begins.
29
+ */
30
+ paste(targetRow: number, targetCol: number, maxRows: number, maxCols: number): Promise<PasteUpdate[] | null>;
31
+ /**
32
+ * Paste using internally stored copy data with formula reference adjustment.
33
+ * Returns null if no internal data is available.
34
+ */
35
+ private _pasteInternal;
36
+ /**
37
+ * Parse an HTML string and extract table data with format information.
38
+ * Prefers data-format (lossless) over inline styles (best-effort).
39
+ */
40
+ parseHTMLTableWithFormat(html: string): Array<Array<{
41
+ value: string;
42
+ format?: CellFormat;
43
+ }>> | null;
44
+ /**
45
+ * Convert format-aware parsed rows into PasteUpdate array.
46
+ */
47
+ private _applyParsedRowsWithFormat;
48
+ /**
49
+ * Parse a TSV string and generate cell updates.
50
+ * Handles RFC 4180-style quoting: fields containing tabs, newlines, or
51
+ * double-quotes are wrapped in double-quotes, with internal quotes escaped
52
+ * as "". This is the format Excel and Google Sheets use on the clipboard.
53
+ *
54
+ * Exported for testability with paste events where text is already available.
55
+ */
56
+ parseTSV(text: string, targetRow: number, targetCol: number, maxRows: number, maxCols: number): Array<{
57
+ id: string;
58
+ value: string;
59
+ }>;
60
+ /**
61
+ * Parse TSV text into a 2D array of strings, respecting quoted fields.
62
+ * Quoted fields may contain tabs, newlines, and escaped quotes ("").
63
+ */
64
+ private _parseTSVRows;
65
+ /**
66
+ * Adjust cell references in a formula by the given row/col offset.
67
+ * Absolute references ($A$1) are not adjusted.
68
+ * Mixed references ($A1, A$1) only adjust the non-absolute part.
69
+ */
70
+ adjustFormulaReferences(formula: string, rowOffset: number, colOffset: number): string;
71
+ private serializeRange;
72
+ /** Quote a TSV field if it contains tabs, newlines, or double-quotes */
73
+ private _quoteTSVField;
74
+ /**
75
+ * Convert a selection range to an HTML table string.
76
+ * Includes inline styles for visual formatting and data-format for lossless round-trip.
77
+ */
78
+ private _serializeRangeAsHTML;
79
+ /** Convert CellFormat to a CSS inline style string */
80
+ private _formatToInlineStyle;
81
+ /** Parse a CSS inline style string into a CellFormat (best-effort for external sources) */
82
+ private _parseStyleToFormat;
83
+ /** Validate and sanitize a parsed CellFormat from an external source */
84
+ private _sanitizeFormat;
85
+ private _extractStyleProp;
86
+ /** Escape special HTML characters */
87
+ private _escapeHTML;
88
+ /** @deprecated Uses document.execCommand('copy') which is deprecated. Only used as a fallback when the Clipboard API is unavailable. */
89
+ private fallbackCopy;
90
+ }
91
+ //# sourceMappingURL=clipboard-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clipboard-manager.d.ts","sourceRoot":"","sources":["../../src/controllers/clipboard-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,cAAc,EAIpB,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED;;;GAGG;AACH,qBAAa,gBAAgB;IAC3B,oGAAoG;IACpG,OAAO,CAAC,gBAAgB,CAA+B;IACvD,OAAO,CAAC,eAAe,CAAyB;IAEhD;;;OAGG;IACG,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBhE;;OAEG;IACG,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAWnE;;;;;OAKG;IACG,KAAK,CACT,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC;IAmChC;;;OAGG;IACH,OAAO,CAAC,cAAc;IAuCtB;;;OAGG;IACH,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,UAAU,CAAA;KAAE,CAAC,CAAC,GAAG,IAAI;IA4CnG;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAuBlC;;;;;;;OAOG;IACH,QAAQ,CACN,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAkBvC;;;OAGG;IACH,OAAO,CAAC,aAAa;IAqErB;;;;OAIG;IACH,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM;IA4BtF,OAAO,CAAC,cAAc;IAgBtB,wEAAwE;IACxE,OAAO,CAAC,cAAc;IAOtB;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAgC7B,sDAAsD;IACtD,OAAO,CAAC,oBAAoB;IAe5B,2FAA2F;IAC3F,OAAO,CAAC,mBAAmB;IAsC3B,wEAAwE;IACxE,OAAO,CAAC,eAAe;IA6BvB,OAAO,CAAC,iBAAiB;IAQzB,qCAAqC;IACrC,OAAO,CAAC,WAAW;IAUnB,wIAAwI;IACxI,OAAO,CAAC,YAAY;CAerB"}
@@ -0,0 +1,52 @@
1
+ import { type ReactiveController, type ReactiveControllerHost } from 'lit';
2
+ import { type CellCoord, type SelectionRange } from '../types.js';
3
+ /**
4
+ * SelectionManager - Reactive Controller for managing grid selection state.
5
+ *
6
+ * Implements anchor/head selection model:
7
+ * - anchor: where the selection started
8
+ * - head: where the selection currently extends to
9
+ * - range: the normalized bounding box
10
+ */
11
+ export declare class SelectionManager implements ReactiveController {
12
+ host: ReactiveControllerHost;
13
+ /** The cell where the selection was initiated */
14
+ anchor: CellCoord;
15
+ /** The current end of the selection */
16
+ head: CellCoord;
17
+ /** Whether a drag selection is in progress */
18
+ private _isDragging;
19
+ /** Grid bounds */
20
+ private _maxRows;
21
+ private _maxCols;
22
+ constructor(host: ReactiveControllerHost, maxRows: number, maxCols: number);
23
+ hostConnected(): void;
24
+ hostDisconnected(): void;
25
+ /** Update grid bounds (e.g., when rows/cols properties change) */
26
+ setBounds(maxRows: number, maxCols: number): void;
27
+ /** Get the normalized selection range (top-left to bottom-right) */
28
+ get range(): SelectionRange;
29
+ /** Get the currently active cell (head of selection) */
30
+ get activeCell(): CellCoord;
31
+ /** Check if a cell is within the current selection */
32
+ isCellSelected(row: number, col: number): boolean;
33
+ /** Check if a cell is the active cell (head) */
34
+ isCellActive(row: number, col: number): boolean;
35
+ /** Called on mousedown/pointerdown on a cell */
36
+ startSelection(row: number, col: number, extend?: boolean): void;
37
+ /** Called on mousemove during drag */
38
+ extendSelection(row: number, col: number): void;
39
+ /** Called on mouseup */
40
+ endSelection(): void;
41
+ get isDragging(): boolean;
42
+ /** Move the active cell by delta. If extend=true, extends selection. */
43
+ move(dRow: number, dCol: number, extend?: boolean): void;
44
+ /** Move to a specific cell */
45
+ moveTo(row: number, col: number, extend?: boolean): void;
46
+ /** Select all cells */
47
+ selectAll(): void;
48
+ /** Clear selection (collapse to active cell) */
49
+ clearSelection(): void;
50
+ private clamp;
51
+ }
52
+ //# sourceMappingURL=selection-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selection-manager.d.ts","sourceRoot":"","sources":["../../src/controllers/selection-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,sBAAsB,EAAE,MAAM,KAAK,CAAC;AAC3E,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAElE;;;;;;;GAOG;AACH,qBAAa,gBAAiB,YAAW,kBAAkB;IACzD,IAAI,EAAE,sBAAsB,CAAC;IAE7B,iDAAiD;IACjD,MAAM,EAAE,SAAS,CAAsB;IAEvC,uCAAuC;IACvC,IAAI,EAAE,SAAS,CAAsB;IAErC,8CAA8C;IAC9C,OAAO,CAAC,WAAW,CAAS;IAE5B,kBAAkB;IAClB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAAS;gBAEb,IAAI,EAAE,sBAAsB,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAO1E,aAAa,IAAI,IAAI;IAIrB,gBAAgB,IAAI,IAAI;IAIxB,kEAAkE;IAClE,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAKjD,oEAAoE;IACpE,IAAI,KAAK,IAAI,cAAc,CAW1B;IAED,wDAAwD;IACxD,IAAI,UAAU,IAAI,SAAS,CAE1B;IAED,sDAAsD;IACtD,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO;IAKjD,gDAAgD;IAChD,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO;IAM/C,gDAAgD;IAChD,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,UAAQ,GAAG,IAAI;IAa9D,sCAAsC;IACtC,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAM/C,wBAAwB;IACxB,YAAY,IAAI,IAAI;IAIpB,IAAI,UAAU,IAAI,OAAO,CAExB;IAID,wEAAwE;IACxE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,UAAQ,GAAG,IAAI;IAatD,8BAA8B;IAC9B,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,UAAQ,GAAG,IAAI;IAStD,uBAAuB;IACvB,SAAS,IAAI,IAAI;IAMjB,gDAAgD;IAChD,cAAc,IAAI,IAAI;IAOtB,OAAO,CAAC,KAAK;CAMd"}
@@ -0,0 +1,75 @@
1
+ import { type GridData, type FormulaFunction } from '../types.js';
2
+ /**
3
+ * Represents a 2D range of values with shape information.
4
+ * Used by lookup functions (VLOOKUP, INDEX, etc.) that need row/col structure.
5
+ */
6
+ export declare class RangeValue {
7
+ readonly values: unknown[];
8
+ readonly rows: number;
9
+ readonly cols: number;
10
+ constructor(values: unknown[], rows: number, cols: number);
11
+ get(row: number, col: number): unknown;
12
+ getRow(row: number): unknown[];
13
+ getCol(col: number): unknown[];
14
+ }
15
+ export declare class FormulaEngine {
16
+ private _functions;
17
+ private _data;
18
+ private _evaluating;
19
+ private _evalDepth;
20
+ private _deps;
21
+ private _reverseDeps;
22
+ private _trackingCellKey;
23
+ private _cache;
24
+ constructor();
25
+ /** Register a user-defined function */
26
+ registerFunction(name: string, fn: FormulaFunction): void;
27
+ /** Update the data reference for evaluation (full reset of dep graph and cache) */
28
+ setData(data: GridData): void;
29
+ /**
30
+ * Update the data reference while preserving the dependency graph for
31
+ * unchanged cells. Only clears deps and cache for the specified changed keys,
32
+ * allowing recalculateAffected() to use the existing graph for BFS traversal.
33
+ */
34
+ updateData(data: GridData, changedKeys: string[]): void;
35
+ /**
36
+ * Evaluate a raw value. If it starts with '=', parse and execute the formula.
37
+ * Otherwise, return the value as-is (possibly coerced).
38
+ *
39
+ * @param forCellKey - If provided, tracks formula dependencies for this cell key.
40
+ */
41
+ evaluate(rawValue: string, forCellKey?: string): {
42
+ displayValue: string;
43
+ type: 'text' | 'number' | 'boolean' | 'error';
44
+ };
45
+ /**
46
+ * Re-evaluate all formula cells in the grid.
47
+ * Rebuilds the dependency graph. Returns a set of cell keys that changed.
48
+ */
49
+ recalculate(): Set<string>;
50
+ /**
51
+ * Recalculate only formulas affected by the given changed cell keys.
52
+ * Uses the dependency graph for targeted recalculation (BFS order).
53
+ */
54
+ recalculateAffected(changedKeys: string[]): Set<string>;
55
+ private _clearDepsFor;
56
+ private _trackDep;
57
+ private coerceValue;
58
+ private tokenize;
59
+ private _peek;
60
+ private _consume;
61
+ private parseExpression;
62
+ private _parseComparison;
63
+ private _parseConcatenation;
64
+ private _parseAddSub;
65
+ private _parseMulDiv;
66
+ private _parseUnary;
67
+ private _parsePrimary;
68
+ private _parseFunction;
69
+ private _compareValues;
70
+ private _resolveRef;
71
+ private _resolveRange;
72
+ private _createContext;
73
+ private registerBuiltins;
74
+ }
75
+ //# sourceMappingURL=formula-engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formula-engine.d.ts","sourceRoot":"","sources":["../../src/engine/formula-engine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EAEb,KAAK,eAAe,EAGrB,MAAM,aAAa,CAAC;AAoDrB;;;GAGG;AACH,qBAAa,UAAU;IACrB,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAEV,MAAM,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAMzD,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO;IAItC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,EAAE;IAK9B,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,EAAE;CAO/B;AA4DD,qBAAa,aAAa;IACxB,OAAO,CAAC,UAAU,CAA2C;IAC7D,OAAO,CAAC,KAAK,CAAuB;IACpC,OAAO,CAAC,WAAW,CAA0B;IAC7C,OAAO,CAAC,UAAU,CAAK;IAGvB,OAAO,CAAC,KAAK,CAAuC;IACpD,OAAO,CAAC,YAAY,CAAuC;IAC3D,OAAO,CAAC,gBAAgB,CAAuB;IAG/C,OAAO,CAAC,MAAM,CAAmG;;IAMjH,uCAAuC;IACvC,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,eAAe,GAAG,IAAI;IAIzD,mFAAmF;IACnF,OAAO,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI;IAO7B;;;;OAIG;IACH,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,IAAI;IAOvD;;;;;OAKG;IACH,QAAQ,CACN,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,MAAM,GAClB;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAA;KAAE;IA6D1E;;;OAGG;IACH,WAAW,IAAI,GAAG,CAAC,MAAM,CAAC;IAqB1B;;;OAGG;IACH,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC;IAuEvD,OAAO,CAAC,aAAa;IAWrB,OAAO,CAAC,SAAS;IAoBjB,OAAO,CAAC,WAAW;IAqBnB,OAAO,CAAC,QAAQ;IA+JhB,OAAO,CAAC,KAAK;IAIb,OAAO,CAAC,QAAQ;IAShB,OAAO,CAAC,eAAe;IAavB,OAAO,CAAC,gBAAgB;IAexB,OAAO,CAAC,mBAAmB;IAY3B,OAAO,CAAC,YAAY;IAgBpB,OAAO,CAAC,YAAY;IAoBpB,OAAO,CAAC,WAAW;IAYnB,OAAO,CAAC,aAAa;IAsCrB,OAAO,CAAC,cAAc;IA4CtB,OAAO,CAAC,cAAc;IA8CtB,OAAO,CAAC,WAAW;IAoCnB,OAAO,CAAC,aAAa;IA4DrB,OAAO,CAAC,cAAc;IAuCtB,OAAO,CAAC,gBAAgB;CA+azB"}
@@ -0,0 +1,11 @@
1
+ export { Y11nSpreadsheet } from './y11n-spreadsheet.js';
2
+ export { Y11nFormulaBar } from './components/y11n-formula-bar.js';
3
+ export { Y11nFormatToolbar, computeSelectionFormat } from './components/y11n-format-toolbar.js';
4
+ export type { FormatActionDetail } from './components/y11n-format-toolbar.js';
5
+ export { FormulaEngine, RangeValue } from './engine/formula-engine.js';
6
+ export { SelectionManager } from './controllers/selection-manager.js';
7
+ export { ClipboardManager } from './controllers/clipboard-manager.js';
8
+ export type { PasteUpdate } from './controllers/clipboard-manager.js';
9
+ export type { CellCoord, CellData, CellFormat, GridData, SelectionRange, FormulaContext, FormulaFunction, CellChangeDetail, SelectionChangeDetail, DataChangeDetail, FormatChangeDetail, } from './types.js';
10
+ export { cellKey, parseKey, colToLetter, letterToCol, refToCoord, coordToRef, formatsEqual } from './types.js';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAChG,YAAY,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,YAAY,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACtE,YAAY,EACV,SAAS,EACT,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,cAAc,EACd,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC"}