wandertable 0.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.
Files changed (104) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +505 -0
  3. package/dist/style.css +1 -0
  4. package/dist/types/WanderTable.d.ts +112 -0
  5. package/dist/types/WanderTable.d.ts.map +1 -0
  6. package/dist/types/__tests__/ColumnModel.test.d.ts +2 -0
  7. package/dist/types/__tests__/ColumnModel.test.d.ts.map +1 -0
  8. package/dist/types/__tests__/CommandBus.test.d.ts +2 -0
  9. package/dist/types/__tests__/CommandBus.test.d.ts.map +1 -0
  10. package/dist/types/__tests__/DataModel.test.d.ts +2 -0
  11. package/dist/types/__tests__/DataModel.test.d.ts.map +1 -0
  12. package/dist/types/__tests__/Export.test.d.ts +2 -0
  13. package/dist/types/__tests__/Export.test.d.ts.map +1 -0
  14. package/dist/types/__tests__/GroupedHeaders.test.d.ts +2 -0
  15. package/dist/types/__tests__/GroupedHeaders.test.d.ts.map +1 -0
  16. package/dist/types/__tests__/MergeModel.test.d.ts +2 -0
  17. package/dist/types/__tests__/MergeModel.test.d.ts.map +1 -0
  18. package/dist/types/__tests__/SelectionModel.test.d.ts +2 -0
  19. package/dist/types/__tests__/SelectionModel.test.d.ts.map +1 -0
  20. package/dist/types/__tests__/ViewMapping.test.d.ts +2 -0
  21. package/dist/types/__tests__/ViewMapping.test.d.ts.map +1 -0
  22. package/dist/types/columns/ColumnModel.d.ts +25 -0
  23. package/dist/types/columns/ColumnModel.d.ts.map +1 -0
  24. package/dist/types/columns/GroupedHeaders.d.ts +20 -0
  25. package/dist/types/columns/GroupedHeaders.d.ts.map +1 -0
  26. package/dist/types/core/CommandBus.d.ts +63 -0
  27. package/dist/types/core/CommandBus.d.ts.map +1 -0
  28. package/dist/types/core/DataModel.d.ts +27 -0
  29. package/dist/types/core/DataModel.d.ts.map +1 -0
  30. package/dist/types/core/EventEmitter.d.ts +10 -0
  31. package/dist/types/core/EventEmitter.d.ts.map +1 -0
  32. package/dist/types/core/MergeModel.d.ts +35 -0
  33. package/dist/types/core/MergeModel.d.ts.map +1 -0
  34. package/dist/types/core/PaginationModel.d.ts +24 -0
  35. package/dist/types/core/PaginationModel.d.ts.map +1 -0
  36. package/dist/types/core/RowGroupModel.d.ts +36 -0
  37. package/dist/types/core/RowGroupModel.d.ts.map +1 -0
  38. package/dist/types/core/SelectionModel.d.ts +47 -0
  39. package/dist/types/core/SelectionModel.d.ts.map +1 -0
  40. package/dist/types/core/ViewMapping.d.ts +37 -0
  41. package/dist/types/core/ViewMapping.d.ts.map +1 -0
  42. package/dist/types/core/ViewportModel.d.ts +9 -0
  43. package/dist/types/core/ViewportModel.d.ts.map +1 -0
  44. package/dist/types/editors/BlankEditor.d.ts +20 -0
  45. package/dist/types/editors/BlankEditor.d.ts.map +1 -0
  46. package/dist/types/editors/DropdownEditor.d.ts +23 -0
  47. package/dist/types/editors/DropdownEditor.d.ts.map +1 -0
  48. package/dist/types/editors/EditorManager.d.ts +22 -0
  49. package/dist/types/editors/EditorManager.d.ts.map +1 -0
  50. package/dist/types/index.d.ts +35 -0
  51. package/dist/types/index.d.ts.map +1 -0
  52. package/dist/types/interaction/ClipboardManager.d.ts +19 -0
  53. package/dist/types/interaction/ClipboardManager.d.ts.map +1 -0
  54. package/dist/types/interaction/ColumnReorder.d.ts +20 -0
  55. package/dist/types/interaction/ColumnReorder.d.ts.map +1 -0
  56. package/dist/types/interaction/ColumnResize.d.ts +15 -0
  57. package/dist/types/interaction/ColumnResize.d.ts.map +1 -0
  58. package/dist/types/interaction/FillHandle.d.ts +39 -0
  59. package/dist/types/interaction/FillHandle.d.ts.map +1 -0
  60. package/dist/types/interaction/KeyboardNav.d.ts +19 -0
  61. package/dist/types/interaction/KeyboardNav.d.ts.map +1 -0
  62. package/dist/types/interaction/RowResize.d.ts +15 -0
  63. package/dist/types/interaction/RowResize.d.ts.map +1 -0
  64. package/dist/types/plugins/ContextMenu.d.ts +44 -0
  65. package/dist/types/plugins/ContextMenu.d.ts.map +1 -0
  66. package/dist/types/plugins/Export.d.ts +16 -0
  67. package/dist/types/plugins/Export.d.ts.map +1 -0
  68. package/dist/types/render/AutoFit.d.ts +23 -0
  69. package/dist/types/render/AutoFit.d.ts.map +1 -0
  70. package/dist/types/render/DOMRenderer.d.ts +91 -0
  71. package/dist/types/render/DOMRenderer.d.ts.map +1 -0
  72. package/dist/types/render/LoadingOverlay.d.ts +9 -0
  73. package/dist/types/render/LoadingOverlay.d.ts.map +1 -0
  74. package/dist/types/render/PaginationBar.d.ts +20 -0
  75. package/dist/types/render/PaginationBar.d.ts.map +1 -0
  76. package/dist/types/renderers/BadgeRenderer.d.ts +5 -0
  77. package/dist/types/renderers/BadgeRenderer.d.ts.map +1 -0
  78. package/dist/types/renderers/BlankRenderer.d.ts +9 -0
  79. package/dist/types/renderers/BlankRenderer.d.ts.map +1 -0
  80. package/dist/types/renderers/CheckboxRenderer.d.ts +5 -0
  81. package/dist/types/renderers/CheckboxRenderer.d.ts.map +1 -0
  82. package/dist/types/renderers/NumberRenderer.d.ts +7 -0
  83. package/dist/types/renderers/NumberRenderer.d.ts.map +1 -0
  84. package/dist/types/renderers/ProgressRenderer.d.ts +5 -0
  85. package/dist/types/renderers/ProgressRenderer.d.ts.map +1 -0
  86. package/dist/types/renderers/RendererRegistry.d.ts +10 -0
  87. package/dist/types/renderers/RendererRegistry.d.ts.map +1 -0
  88. package/dist/types/renderers/TextRenderer.d.ts +5 -0
  89. package/dist/types/renderers/TextRenderer.d.ts.map +1 -0
  90. package/dist/types/rows/RowModel.d.ts +20 -0
  91. package/dist/types/rows/RowModel.d.ts.map +1 -0
  92. package/dist/types/themes.d.ts +5 -0
  93. package/dist/types/themes.d.ts.map +1 -0
  94. package/dist/types/types/index.d.ts +348 -0
  95. package/dist/types/types/index.d.ts.map +1 -0
  96. package/dist/wandertable.cjs +14 -0
  97. package/dist/wandertable.cjs.map +1 -0
  98. package/dist/wandertable.global.js +14 -0
  99. package/dist/wandertable.global.js.map +1 -0
  100. package/dist/wandertable.js +2757 -0
  101. package/dist/wandertable.js.map +1 -0
  102. package/dist/wandertable.umd.js +14 -0
  103. package/dist/wandertable.umd.js.map +1 -0
  104. package/package.json +36 -0
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=DataModel.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataModel.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/DataModel.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Export.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Export.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/Export.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=GroupedHeaders.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GroupedHeaders.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/GroupedHeaders.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=MergeModel.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MergeModel.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/MergeModel.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SelectionModel.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectionModel.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/SelectionModel.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ViewMapping.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewMapping.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/ViewMapping.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,25 @@
1
+ import type { ColumnConfig } from '../types/index.js';
2
+ export declare class ColumnModel {
3
+ private configs;
4
+ private widths;
5
+ private prefixSums;
6
+ private defaultWidth;
7
+ constructor(colCount: number, defaultWidth: number, configs?: ColumnConfig[]);
8
+ private buildPrefixSums;
9
+ get count(): number;
10
+ getWidth(col: number): number;
11
+ setWidth(col: number, width: number): void;
12
+ getX(col: number): number;
13
+ getTotalWidth(): number;
14
+ getConfig(col: number): ColumnConfig | undefined;
15
+ setCount(count: number): void;
16
+ /** Find column at pixel X using binary search */
17
+ getColAtX(x: number): number;
18
+ static columnLabel(index: number): string;
19
+ }
20
+ /**
21
+ * Convert a 0-based column index to a spreadsheet-style label.
22
+ * 0 -> A, 1 -> B, ..., 25 -> Z, 26 -> AA, 27 -> AB, ..., 701 -> ZZ, 702 -> AAA
23
+ */
24
+ export declare function columnLabel(index: number): string;
25
+ //# sourceMappingURL=ColumnModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColumnModel.d.ts","sourceRoot":"","sources":["../../../src/columns/ColumnModel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,qBAAa,WAAW;IACtB,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,MAAM,CAAW;IACzB,OAAO,CAAC,UAAU,CAAW;IAC7B,OAAO,CAAC,YAAY,CAAS;gBAEjB,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,EAAE;IAU5E,OAAO,CAAC,eAAe;IASvB,IAAI,KAAK,IAAI,MAAM,CAElB;IAED,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAI7B,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAQ1C,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAIzB,aAAa,IAAI,MAAM;IAIvB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAIhD,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAQ7B,iDAAiD;IACjD,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM;IAgB5B,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;CAG1C;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQjD"}
@@ -0,0 +1,20 @@
1
+ import type { ColumnConfig } from '../types/index.js';
2
+ export interface HeaderCell {
3
+ label: string;
4
+ colSpan: number;
5
+ rowSpan: number;
6
+ col: number;
7
+ level: number;
8
+ config?: ColumnConfig;
9
+ }
10
+ /**
11
+ * Flatten nested ColumnConfig[] into:
12
+ * - flatColumns: leaf columns only (the actual data columns)
13
+ * - headerRows: 2D array of header cells for multi-level rendering
14
+ */
15
+ export declare function flattenColumns(columns: ColumnConfig[]): {
16
+ flatColumns: ColumnConfig[];
17
+ headerRows: HeaderCell[][];
18
+ maxDepth: number;
19
+ };
20
+ //# sourceMappingURL=GroupedHeaders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GroupedHeaders.d.ts","sourceRoot":"","sources":["../../../src/columns/GroupedHeaders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG;IACvD,WAAW,EAAE,YAAY,EAAE,CAAC;IAC5B,UAAU,EAAE,UAAU,EAAE,EAAE,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAYA"}
@@ -0,0 +1,63 @@
1
+ export interface CommandChange {
2
+ row: number;
3
+ col: number;
4
+ oldValue: unknown;
5
+ newValue: unknown;
6
+ }
7
+ export interface Command {
8
+ execute(): void;
9
+ undo(): void;
10
+ /** Return a description of what this command changes, for external sync */
11
+ getChanges(): CommandChange[];
12
+ }
13
+ export declare class CommandBus {
14
+ private undoStack;
15
+ private redoStack;
16
+ private limit;
17
+ onChange: (() => void) | null;
18
+ constructor(limit?: number);
19
+ execute(cmd: Command): void;
20
+ undo(): Command | null;
21
+ redo(): Command | null;
22
+ get canUndo(): boolean;
23
+ get canRedo(): boolean;
24
+ clear(): void;
25
+ }
26
+ import type { CellPatch } from '../types/index.js';
27
+ import type { DataModel } from './DataModel.js';
28
+ /** Set a single cell value */
29
+ export declare class SetCellValueCommand implements Command {
30
+ private data;
31
+ private row;
32
+ private col;
33
+ private newValue;
34
+ private oldValue;
35
+ constructor(data: DataModel, row: number, col: number, newValue: unknown);
36
+ execute(): void;
37
+ undo(): void;
38
+ getChanges(): CommandChange[];
39
+ }
40
+ /** Apply a batch of patches (stores snapshots of old cell data) */
41
+ export declare class PatchCommand implements Command {
42
+ private data;
43
+ private patches;
44
+ private snapshots;
45
+ constructor(data: DataModel, patches: CellPatch[]);
46
+ execute(): void;
47
+ undo(): void;
48
+ getChanges(): CommandChange[];
49
+ }
50
+ /** Delete selected cells (stores snapshots) */
51
+ export declare class DeleteCellsCommand implements Command {
52
+ private data;
53
+ private cells;
54
+ private snapshots;
55
+ constructor(data: DataModel, cells: {
56
+ row: number;
57
+ col: number;
58
+ }[]);
59
+ execute(): void;
60
+ undo(): void;
61
+ getChanges(): CommandChange[];
62
+ }
63
+ //# sourceMappingURL=CommandBus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandBus.d.ts","sourceRoot":"","sources":["../../../src/core/CommandBus.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC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,OAAO,CAAC,OAAO;IAJjB,OAAO,CAAC,SAAS,CAA4D;gBAGnE,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,SAAS,EAAE;IAS9B,OAAO,IAAI,IAAI;IAIf,IAAI,IAAI,IAAI;IAYZ,UAAU,IAAI,aAAa,EAAE;CAQ9B;AAED,+CAA+C;AAC/C,qBAAa,kBAAmB,YAAW,OAAO;IAI9C,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,KAAK;IAJf,OAAO,CAAC,SAAS,CAAqD;gBAG5D,IAAI,EAAE,SAAS,EACf,KAAK,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE;IAU/C,OAAO,IAAI,IAAI;IAQf,IAAI,IAAI,IAAI;IAQZ,UAAU,IAAI,aAAa,EAAE;CAQ9B"}
@@ -0,0 +1,27 @@
1
+ import type { CellData, CellKey, CellPatch } from '../types/index.js';
2
+ export declare class DataModel {
3
+ private cells;
4
+ private _rowCount;
5
+ private _colCount;
6
+ private _inTransaction;
7
+ private _dirtyKeys;
8
+ onChange: ((dirty: Set<CellKey>) => void) | null;
9
+ constructor(rowCount: number, colCount: number);
10
+ get rowCount(): number;
11
+ set rowCount(v: number);
12
+ get colCount(): number;
13
+ set colCount(v: number);
14
+ private key;
15
+ getCell(row: number, col: number): CellData | undefined;
16
+ setCell(row: number, col: number, data: CellData): void;
17
+ setCellValue(row: number, col: number, value: unknown): void;
18
+ deleteCell(row: number, col: number): void;
19
+ hasCell(row: number, col: number): boolean;
20
+ applyPatch(patches: CellPatch[]): void;
21
+ transaction(fn: () => void): void;
22
+ private markDirty;
23
+ clear(): void;
24
+ /** Iterate all cells that have data */
25
+ forEach(fn: (row: number, col: number, data: CellData) => void): void;
26
+ }
27
+ //# sourceMappingURL=DataModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataModel.d.ts","sourceRoot":"","sources":["../../../src/core/DataModel.ts"],"names":[],"mappings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ACvC,OAAO,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,KAAK,IAAI,GAAG,IAAI;CAMtE"}
@@ -0,0 +1,10 @@
1
+ export declare class EventEmitter<Events extends {
2
+ [K in keyof Events]: unknown;
3
+ }> {
4
+ private listeners;
5
+ on<K extends keyof Events>(event: K, fn: (data: Events[K]) => void): () => void;
6
+ off<K extends keyof Events>(event: K, fn: (data: Events[K]) => void): void;
7
+ emit<K extends keyof Events>(event: K, data: Events[K]): void;
8
+ removeAllListeners(): void;
9
+ }
10
+ //# sourceMappingURL=EventEmitter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventEmitter.d.ts","sourceRoot":"","sources":["../../../src/core/EventEmitter.ts"],"names":[],"mappings":"AAAA,qBAAa,YAAY,CAAC,MAAM,SAAS;KAAG,CAAC,IAAI,MAAM,MAAM,GAAG,OAAO;CAAE;IACvE,OAAO,CAAC,SAAS,CAAuD;IAExE,EAAE,CAAC,CAAC,SAAS,MAAM,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,MAAM,IAAI;IAQ/E,GAAG,CAAC,CAAC,SAAS,MAAM,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI,GAAG,IAAI;IAI1E,IAAI,CAAC,CAAC,SAAS,MAAM,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI;IAU7D,kBAAkB,IAAI,IAAI;CAG3B"}
@@ -0,0 +1,35 @@
1
+ export interface MergeRange {
2
+ row: number;
3
+ col: number;
4
+ rowSpan: number;
5
+ colSpan: number;
6
+ }
7
+ /**
8
+ * Tracks merged cell ranges.
9
+ * A merge means one "anchor" cell (top-left) spans multiple rows/columns.
10
+ * The other cells in the range are "hidden" (not rendered individually).
11
+ */
12
+ export declare class MergeModel {
13
+ /** All active merges */
14
+ private merges;
15
+ /** Quick lookup: "row:col" -> merge that covers this cell */
16
+ private coverMap;
17
+ onChange: (() => void) | null;
18
+ constructor(initialMerges?: MergeRange[]);
19
+ private key;
20
+ /** Add a merge. The anchor is (row, col). */
21
+ addMerge(merge: MergeRange, notify?: boolean): void;
22
+ /** Remove the merge anchored at (row, col) */
23
+ removeMerge(row: number, col: number, notify?: boolean): boolean;
24
+ /** Get the merge that covers (row, col), or null */
25
+ getMerge(row: number, col: number): MergeRange | null;
26
+ /** Is this cell the anchor (top-left) of a merge? */
27
+ isAnchor(row: number, col: number): boolean;
28
+ /** Is this cell hidden by a merge (i.e. not the anchor)? */
29
+ isHidden(row: number, col: number): boolean;
30
+ /** Get all merges */
31
+ getAll(): MergeRange[];
32
+ /** Clear all merges */
33
+ clear(): void;
34
+ }
35
+ //# sourceMappingURL=MergeModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MergeModel.d.ts","sourceRoot":"","sources":["../../../src/core/MergeModel.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,qBAAa,UAAU;IACrB,wBAAwB;IACxB,OAAO,CAAC,MAAM,CAAoB;IAClC,6DAA6D;IAC7D,OAAO,CAAC,QAAQ,CAAiC;IAEjD,QAAQ,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAQ;gBAEzB,aAAa,CAAC,EAAE,UAAU,EAAE;IAQxC,OAAO,CAAC,GAAG;IAIX,6CAA6C;IAC7C,QAAQ,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,UAAO,GAAG,IAAI;IA4BhD,8CAA8C;IAC9C,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,UAAO,GAAG,OAAO;IAkB7D,oDAAoD;IACpD,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI;IAIrD,qDAAqD;IACrD,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO;IAK3C,4DAA4D;IAC5D,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO;IAK3C,qBAAqB;IACrB,MAAM,IAAI,UAAU,EAAE;IAItB,uBAAuB;IACvB,KAAK,IAAI,IAAI;CAKd"}
@@ -0,0 +1,24 @@
1
+ import type { PaginationConfig, PaginationState } from '../types/index.js';
2
+ export declare class PaginationModel {
3
+ private _page;
4
+ private _pageSize;
5
+ private _totalRows;
6
+ enabled: boolean;
7
+ onChange: ((state: PaginationState) => void) | null;
8
+ constructor(config?: PaginationConfig);
9
+ get page(): number;
10
+ get pageSize(): number;
11
+ get totalRows(): number;
12
+ get totalPages(): number;
13
+ get startRow(): number;
14
+ get endRow(): number;
15
+ getState(): PaginationState;
16
+ setPage(page: number): void;
17
+ setPageSize(size: number): void;
18
+ setTotalRows(total: number): void;
19
+ nextPage(): void;
20
+ prevPage(): void;
21
+ firstPage(): void;
22
+ lastPage(): void;
23
+ }
24
+ //# sourceMappingURL=PaginationModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaginationModel.d.ts","sourceRoot":"","sources":["../../../src/core/PaginationModel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE3E,qBAAa,eAAe;IAC1B,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,EAAE,OAAO,CAAC;IAEjB,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC,GAAG,IAAI,CAAQ;gBAE/C,MAAM,CAAC,EAAE,gBAAgB;IAOrC,IAAI,IAAI,IAAI,MAAM,CAAuB;IACzC,IAAI,QAAQ,IAAI,MAAM,CAA2B;IACjD,IAAI,SAAS,IAAI,MAAM,CAA4B;IAEnD,IAAI,UAAU,IAAI,MAAM,CAGvB;IAED,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,QAAQ,IAAI,eAAe;IAW3B,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAO3B,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAQ/B,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IASjC,QAAQ,IAAI,IAAI;IAIhB,QAAQ,IAAI,IAAI;IAIhB,SAAS,IAAI,IAAI;IAIjB,QAAQ,IAAI,IAAI;CAGjB"}
@@ -0,0 +1,36 @@
1
+ export interface RowGroup {
2
+ /** First data row of the group */
3
+ startRow: number;
4
+ /** Number of child rows (excluding the header row) */
5
+ count: number;
6
+ /** Label shown on the group header */
7
+ label?: string;
8
+ /** Is the group currently expanded? */
9
+ expanded: boolean;
10
+ /** Nesting depth (0 = top level) */
11
+ depth: number;
12
+ }
13
+ /**
14
+ * Manages row grouping with expand/collapse.
15
+ * Groups hide/show rows by integrating with ViewMapping filters.
16
+ */
17
+ export declare class RowGroupModel {
18
+ private groups;
19
+ private hiddenRows;
20
+ onChange: (() => void) | null;
21
+ constructor(initialGroups?: RowGroup[]);
22
+ addGroup(group: RowGroup): void;
23
+ removeGroup(startRow: number): void;
24
+ toggleGroup(startRow: number): void;
25
+ expandAll(): void;
26
+ collapseAll(): void;
27
+ isGroupHeader(row: number): RowGroup | null;
28
+ isHidden(row: number): boolean;
29
+ getGroups(): RowGroup[];
30
+ /** Build the set of hidden rows based on collapsed groups */
31
+ private rebuildHidden;
32
+ /** Get a filter function compatible with ViewMapping */
33
+ getFilter(): (row: number) => boolean;
34
+ clear(): void;
35
+ }
36
+ //# sourceMappingURL=RowGroupModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RowGroupModel.d.ts","sourceRoot":"","sources":["../../../src/core/RowGroupModel.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,UAAU,CAAqB;IAEvC,QAAQ,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAQ;gBAEzB,aAAa,CAAC,EAAE,QAAQ,EAAE;IAOtC,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAM/B,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAMnC,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAQnC,SAAS,IAAI,IAAI;IAMjB,WAAW,IAAI,IAAI;IAMnB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI;IAI3C,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAI9B,SAAS,IAAI,QAAQ,EAAE;IAIvB,6DAA6D;IAC7D,OAAO,CAAC,aAAa;IAYrB,wDAAwD;IACxD,SAAS,IAAI,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO;IAIrC,KAAK,IAAI,IAAI;CAKd"}
@@ -0,0 +1,47 @@
1
+ import type { CellAddress, SelectionInfo, SelectionRange } from '../types/index.js';
2
+ export declare class SelectionModel {
3
+ private _focus;
4
+ private _ranges;
5
+ private _rowCount;
6
+ private _colCount;
7
+ onChange: (() => void) | null;
8
+ constructor(rowCount: number, colCount: number);
9
+ get focus(): CellAddress | null;
10
+ get ranges(): SelectionRange[];
11
+ setDimensions(rowCount: number, colCount: number): void;
12
+ /** Set focus and single selection */
13
+ focusCell(row: number, col: number): void;
14
+ /** Extend selection from focus to target */
15
+ extendTo(row: number, col: number): void;
16
+ /** Add a new range (Ctrl+Click) */
17
+ addRange(range: SelectionRange): void;
18
+ /** Select entire column */
19
+ selectColumn(col: number): void;
20
+ /** Select entire row */
21
+ selectRow(row: number): void;
22
+ /** Select all */
23
+ selectAll(): void;
24
+ /** Check if a cell is within any selected range */
25
+ isSelected(row: number, col: number): boolean;
26
+ isFocused(row: number, col: number): boolean;
27
+ /** Iterate all selected cells (clamped to actual dimensions) */
28
+ forEachSelected(fn: (row: number, col: number) => void): void;
29
+ /** Get the bounding box of the current selection (clamped to actual dimensions) */
30
+ getBounds(): {
31
+ r1: number;
32
+ c1: number;
33
+ r2: number;
34
+ c2: number;
35
+ } | null;
36
+ /** Get rich selection info */
37
+ getInfo(): SelectionInfo;
38
+ clear(): void;
39
+ /** Move focus in a direction */
40
+ move(dRow: number, dCol: number, extend: boolean): void;
41
+ private inRange;
42
+ /** When true, navigation beyond bounds is allowed (grid will expand) */
43
+ infinite: boolean;
44
+ private clampRow;
45
+ private clampCol;
46
+ }
47
+ //# sourceMappingURL=SelectionModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectionModel.d.ts","sourceRoot":"","sources":["../../../src/core/SelectionModel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEpF,qBAAa,cAAc;IACzB,OAAO,CAAC,MAAM,CAA4B;IAC1C,OAAO,CAAC,OAAO,CAAw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AO,IAAI,aAAa;IAgCxB,KAAK,IAAI,IAAI;IAMb,gCAAgC;IAChC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI;IAcvD,OAAO,CAAC,OAAO;IAQf,wEAAwE;IACxE,QAAQ,UAAS;IAEjB,OAAO,CAAC,QAAQ;IAKhB,OAAO,CAAC,QAAQ;CAIjB"}
@@ -0,0 +1,37 @@
1
+ import type { DataModel } from './DataModel.js';
2
+ export type SortDirection = 'asc' | 'desc' | null;
3
+ export interface SortState {
4
+ col: number;
5
+ direction: SortDirection;
6
+ compareFn?: (a: unknown, b: unknown) => number;
7
+ }
8
+ export type FilterFn = (row: number, data: DataModel) => boolean;
9
+ /**
10
+ * Maps visual row indices to actual data row indices.
11
+ * Handles sorting and filtering without mutating the DataModel.
12
+ */
13
+ export declare class ViewMapping {
14
+ /** visualIndex -> dataIndex */
15
+ private mapping;
16
+ private identity;
17
+ private sortState;
18
+ private filters;
19
+ private data;
20
+ onChange: (() => void) | null;
21
+ constructor(data: DataModel);
22
+ /** Total visible row count after filtering */
23
+ get visibleRowCount(): number;
24
+ /** Translate visual row to data row */
25
+ toDataRow(visualRow: number): number;
26
+ /** Translate data row to visual row (or -1 if filtered out) */
27
+ toVisualRow(dataRow: number): number;
28
+ sort(col: number, direction: SortDirection, compareFn?: (a: unknown, b: unknown) => number): void;
29
+ getSortState(): SortState | null;
30
+ clearSort(): void;
31
+ setFilter(col: number, fn: FilterFn): void;
32
+ removeFilter(col: number): void;
33
+ clearFilters(): void;
34
+ getActiveFilters(): number[];
35
+ rebuild(): void;
36
+ }
37
+ //# sourceMappingURL=ViewMapping.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewMapping.d.ts","sourceRoot":"","sources":["../../../src/core/ViewMapping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,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IAAI;CA+ChB"}
@@ -0,0 +1,9 @@
1
+ import type { Viewport } from '../types/index.js';
2
+ import type { ColumnModel } from '../columns/ColumnModel.js';
3
+ import type { RowModel } from '../rows/RowModel.js';
4
+ export declare class ViewportModel {
5
+ private overscan;
6
+ constructor(overscan?: number);
7
+ calculate(scrollX: number, scrollY: number, containerWidth: number, containerHeight: number, colModel: ColumnModel, rowModel: RowModel): Viewport;
8
+ }
9
+ //# sourceMappingURL=ViewportModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewportModel.d.ts","sourceRoot":"","sources":["../../../src/core/ViewportModel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAS;gBAEb,QAAQ,SAAI;IAIxB,SAAS,CACP,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,EACtB,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,WAAW,EACrB,QAAQ,EAAE,QAAQ,GACjB,QAAQ;CAeZ"}
@@ -0,0 +1,20 @@
1
+ import type { CellBounds, CellData, CellEditor } from '../types/index.js';
2
+ /**
3
+ * Editor for blank cells - does not allow editing.
4
+ * Optionally calls `onAttempt` when the user tries to edit,
5
+ * so you can open a modal, redirect, etc.
6
+ */
7
+ export declare class BlankEditor implements CellEditor {
8
+ private el;
9
+ private onAttempt;
10
+ private row;
11
+ private col;
12
+ constructor(onAttempt?: (row: number, col: number) => void);
13
+ createElement(container: HTMLElement): HTMLElement;
14
+ open(_value: unknown, _bounds: CellBounds, _cellData: CellData | undefined): void;
15
+ /** Called by EditorManager before open() to pass row/col */
16
+ setPosition(row: number, col: number): void;
17
+ getValue(): unknown;
18
+ close(): void;
19
+ }
20
+ //# sourceMappingURL=BlankEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlankEditor.d.ts","sourceRoot":"","sources":["../../../src/editors/BlankEditor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE1E;;;;GAIG;AACH,qBAAa,WAAY,YAAW,UAAU;IAC5C,OAAO,CAAC,EAAE,CAAe;IACzB,OAAO,CAAC,SAAS,CAA8C;IAC/D,OAAO,CAAC,GAAG,CAAM;IACjB,OAAO,CAAC,GAAG,CAAM;gBAEL,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI;IAI1D,aAAa,CAAC,SAAS,EAAE,WAAW,GAAG,WAAW;IAMlD,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,GAAG,SAAS,GAAG,IAAI;IAOjF,4DAA4D;IAC5D,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAK3C,QAAQ,IAAI,OAAO;IAInB,KAAK,IAAI,IAAI;CAGd"}
@@ -0,0 +1,23 @@
1
+ import type { CellBounds, CellData, CellEditor, DropdownConfig } from '../types/index.js';
2
+ export declare class DropdownEditor implements CellEditor {
3
+ private config;
4
+ private container;
5
+ private listEl;
6
+ private searchInput;
7
+ private selected;
8
+ private options;
9
+ private highlightIndex;
10
+ private searchInputHandler;
11
+ constructor(config: DropdownConfig);
12
+ createElement(parent: HTMLElement): HTMLElement;
13
+ open(value: unknown, _bounds: CellBounds, _cellData: CellData | undefined): void;
14
+ getValue(): unknown;
15
+ close(): void;
16
+ private handleItemClick;
17
+ private loadOptions;
18
+ private renderOptions;
19
+ private selectOption;
20
+ private handleKey;
21
+ private updateHighlight;
22
+ }
23
+ //# sourceMappingURL=DropdownEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropdownEditor.d.ts","sourceRoot":"","sources":["../../../src/editors/DropdownEditor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,cAAc,EAAkB,MAAM,mBAAmB,CAAC;AAE1G,qBAAa,cAAe,YAAW,UAAU;IAC/C,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,SAAS,CAAe;IAChC,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,QAAQ,CAA2B;IAC3C,OAAO,CAAC,OAAO,CAAwB;IACvC,OAAO,CAAC,cAAc,CAAM;IAC5B,OAAO,CAAC,kBAAkB,CAA6B;gBAE3C,MAAM,EAAE,cAAc;IAIlC,aAAa,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW;IA+B/C,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,GAAG,SAAS,GAAG,IAAI;IAmBhF,QAAQ,IAAI,OAAO;IAOnB,KAAK,IAAI,IAAI;IASb,OAAO,CAAC,eAAe,CASrB;YAEY,WAAW;IAYzB,OAAO,CAAC,aAAa;IA4BrB,OAAO,CAAC,YAAY;IAcpB,OAAO,CAAC,SAAS,CAoBf;IAEF,OAAO,CAAC,eAAe;CAOxB"}
@@ -0,0 +1,22 @@
1
+ import type { CellBounds, CellData, CellEditor } from '../types/index.js';
2
+ export declare class EditorManager {
3
+ private editors;
4
+ private activeEditor;
5
+ private activeEditorEl;
6
+ private activeRow;
7
+ private activeCol;
8
+ private overlayEl;
9
+ onClose: ((row: number, col: number, value: unknown, cancelled: boolean) => void) | null;
10
+ constructor(container: HTMLElement);
11
+ register(name: string, factory: () => CellEditor): void;
12
+ get isEditing(): boolean;
13
+ get editingCell(): {
14
+ row: number;
15
+ col: number;
16
+ } | null;
17
+ open(row: number, col: number, editorType: string, value: unknown, bounds: CellBounds, cellData: CellData | undefined, initialChar?: string): void;
18
+ close(save: boolean): void;
19
+ private handleEditorKey;
20
+ destroy(): void;
21
+ }
22
+ //# sourceMappingURL=EditorManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EditorManager.d.ts","sourceRoot":"","sources":["../../../src/editors/EditorManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE1E,qBAAa,aAAa;IACxB,OAAO,CAAC,OAAO,CAAuC;IACtD,OAAO,CAAC,YAAY,CAA2B;IAC/C,OAAO,CAAC,cAAc,CAA4B;IAClD,OAAO,CAAC,SAAS,CAAM;IACvB,OAAO,CAAC,SAAS,CAAM;IACvB,OAAO,CAAC,SAAS,CAAc;IAE/B,OAAO,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,IAAI,CAAQ;gBAEpF,SAAS,EAAE,WAAW;IAWlC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,UAAU,GAAG,IAAI;IAIvD,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,IAAI,WAAW,IAAI;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAGrD;IAED,IAAI,CACF,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,QAAQ,GAAG,SAAS,EAC9B,WAAW,CAAC,EAAE,MAAM,GACnB,IAAI;IA2BP,KAAK,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAkC1B,OAAO,CAAC,eAAe,CAoBrB;IAEF,OAAO,IAAI,IAAI;CAIhB"}
@@ -0,0 +1,35 @@
1
+ import './styles.css';
2
+ export { WanderTable } from './WanderTable.js';
3
+ export { DataModel } from './core/DataModel.js';
4
+ export { SelectionModel } from './core/SelectionModel.js';
5
+ export { EventEmitter } from './core/EventEmitter.js';
6
+ export { CommandBus, SetCellValueCommand, PatchCommand, DeleteCellsCommand } from './core/CommandBus.js';
7
+ export { ColumnModel, columnLabel } from './columns/ColumnModel.js';
8
+ export { ViewMapping } from './core/ViewMapping.js';
9
+ export { MergeModel } from './core/MergeModel.js';
10
+ export type { MergeRange } from './core/MergeModel.js';
11
+ export { PaginationModel } from './core/PaginationModel.js';
12
+ export { flattenColumns } from './columns/GroupedHeaders.js';
13
+ export type { HeaderCell } from './columns/GroupedHeaders.js';
14
+ export type { ExportOptions } from './plugins/Export.js';
15
+ export { RowGroupModel } from './core/RowGroupModel.js';
16
+ export type { RowGroup } from './core/RowGroupModel.js';
17
+ export type { FillDirection, FillCallback } from './interaction/FillHandle.js';
18
+ export type { SortDirection, SortState, FilterFn } from './core/ViewMapping.js';
19
+ export { RowModel } from './rows/RowModel.js';
20
+ export { RendererRegistry } from './renderers/RendererRegistry.js';
21
+ export { TextRenderer } from './renderers/TextRenderer.js';
22
+ export { CheckboxRenderer } from './renderers/CheckboxRenderer.js';
23
+ export { BadgeRenderer } from './renderers/BadgeRenderer.js';
24
+ export { NumberRenderer } from './renderers/NumberRenderer.js';
25
+ export { ProgressRenderer } from './renderers/ProgressRenderer.js';
26
+ export { DropdownEditor } from './editors/DropdownEditor.js';
27
+ export { BlankRenderer } from './renderers/BlankRenderer.js';
28
+ export { BlankEditor } from './editors/BlankEditor.js';
29
+ export { ContextMenu } from './plugins/ContextMenu.js';
30
+ export { exportCSV, exportJSON, downloadFile } from './plugins/Export.js';
31
+ export { THEME_LIGHT, THEME_DARK, THEME_MINIMAL } from './themes.js';
32
+ export type { CellData, CellPatch, CellStyle, CellState, CellBounds, CellKey, CellAddress, SelectionInfo, CellRenderer, CellEditor, SelectionRange, ColumnConfig, RowConfig, DropdownConfig, DropdownOption, Viewport, ThemeConfig, WanderTableEvents, WanderTableOptions, CommandChangeEvent, PaginationConfig, PaginationState, } from './types/index.js';
33
+ export type { Command, CommandChange } from './core/CommandBus.js';
34
+ export type { MenuItemConfig, MenuContext, MenuTarget } from './plugins/ContextMenu.js';
35
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACzG,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,YAAY,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,YAAY,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,YAAY,EAAE,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AAW,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { DataModel } from '../core/DataModel.js';
2
+ import type { SelectionModel } from '../core/SelectionModel.js';
3
+ import type { CellPatch } from '../types/index.js';
4
+ export declare class ClipboardManager {
5
+ private data;
6
+ private selection;
7
+ onChange: ((patches: CellPatch[]) => void) | null;
8
+ constructor(data: DataModel, selection: SelectionModel);
9
+ copy(): Promise<void>;
10
+ cut(): Promise<void>;
11
+ paste(): Promise<void>;
12
+ /** Check if current selection spans an entire row or column */
13
+ private isFullRowOrColSelected;
14
+ deleteSelected(): void;
15
+ private selectionToTSV;
16
+ private parseTSV;
17
+ private fallbackCopy;
18
+ }
19
+ //# sourceMappingURL=ClipboardManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClipboardManager.d.ts","sourceRoot":"","sources":["../../../src/interaction/ClipboardManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,IAAI,CAAY;IACxB,OAAO,CAAC,SAAS,CAAiB;IAElC,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC,GAAG,IAAI,CAAQ;gBAE7C,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc;IAKhD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAYrB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IAKpB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IA+C5B,+DAA+D;IAC/D,OAAO,CAAC,sBAAsB;IAQ9B,cAAc,IAAI,IAAI;IAatB,OAAO,CAAC,cAAc;IAiBtB,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,YAAY;CAUrB"}
@@ -0,0 +1,20 @@
1
+ import type { ColumnModel } from '../columns/ColumnModel.js';
2
+ export declare class ColumnReorder {
3
+ private columns;
4
+ private dragging;
5
+ private sourceCol;
6
+ private targetCol;
7
+ private ghostEl;
8
+ private indicatorEl;
9
+ onReorder: ((fromCol: number, toCol: number) => void) | null;
10
+ /** Resolve column index from screen X */
11
+ getColAtX: ((clientX: number) => number) | null;
12
+ /** Get column header label */
13
+ getColLabel: ((col: number) => string) | null;
14
+ constructor(columns: ColumnModel);
15
+ start(col: number, event: MouseEvent, container: HTMLElement): void;
16
+ private onMouseMove;
17
+ private onMouseUp;
18
+ destroy(): void;
19
+ }
20
+ //# sourceMappingURL=ColumnReorder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColumnReorder.d.ts","sourceRoot":"","sources":["../../../src/interaction/ColumnReorder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,qBAAa,aAAa;IACxB,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,SAAS,CAAM;IACvB,OAAO,CAAC,SAAS,CAAM;IACvB,OAAO,CAAC,OAAO,CAA4B;IAC3C,OAAO,CAAC,WAAW,CAA4B;IAE/C,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,IAAI,CAAQ;IAEpE,yCAAyC;IACzC,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,IAAI,CAAQ;IACvD,8BAA8B;IAC9B,WAAW,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,IAAI,CAAQ;gBAEzC,OAAO,EAAE,WAAW;IAIhC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,GAAG,IAAI;IAyBnE,OAAO,CAAC,WAAW,CAoBjB;IAEF,OAAO,CAAC,SAAS,CAiBf;IAEF,OAAO,IAAI,IAAI;CAMhB"}