@vueye-table/core 3.0.0-alpha.1 → 3.0.0-alpha.11

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 CHANGED
@@ -5,6 +5,12 @@ filtering, stable multi-column sorting, pagination, selection, column visibility
5
5
  editing with undo, spreadsheet addressing, clipboard text, and CSV export. No DOM, no Node.js,
6
6
  no framework.
7
7
 
8
+ Nested and adjacency trees share sibling sorting, hierarchical filtering, cascading selection,
9
+ immutable child edits and lazy loading with injected cancellation. Read the
10
+ [tree guide](https://github.com/boussadjra/vueye-table/blob/main/docs/guide/trees.md) for the API and runnable example.
11
+
12
+ Append cursor batches, upsert keyed source records, or consume cancellable async iterables without clearing local edits. Read the [streaming guide](https://github.com/boussadjra/vueye-table/blob/main/docs/guide/streaming.md) and [runnable source example](https://github.com/boussadjra/vueye-table/blob/main/examples/streaming.ts) for load state, conflict reporting and undo retention.
13
+
8
14
  ```bash
9
15
  pnpm add @vueye-table/core
10
16
  ```
package/dist/index.d.ts CHANGED
@@ -1,10 +1,58 @@
1
- //#region src/path.d.ts
1
+ //#region src/state.d.ts
2
+ /** A stable identity for a row, read from the row itself or produced by a function. */
3
+ type RowKey = string | number;
4
+ type ExpandedState = readonly RowKey[] | true;
5
+ type SortDirection = "asc" | "desc";
6
+ /** One level of a sort. Several rules sort by the first, then break ties with the next. */
7
+ interface SortRule {
8
+ readonly column: string;
9
+ readonly direction: SortDirection;
10
+ }
11
+ /** Pages are counted from 1. */
12
+ interface PaginationState {
13
+ readonly page: number;
14
+ readonly pageSize: number;
15
+ }
2
16
  /**
3
- * Dotted property paths.
17
+ * Everything a user can change about a table, as plain serializable data.
4
18
  *
5
- * A column addresses nested data with a path such as `"address.city"`. The types below give every
6
- * such path its value type, and the functions read and write through a path without mutating.
19
+ * Being plain data, the state can be stored, restored, sent to a server that sorts and pages, or
20
+ * written to the URL with a library such as QueryWeave.
21
+ */
22
+ interface TableState {
23
+ readonly sorting: readonly SortRule[];
24
+ /** Free text matched against every searchable column. */
25
+ readonly search: string;
26
+ /** Filter value per column id, interpreted by that column's `filter`. */
27
+ readonly filters: Readonly<Record<string, unknown>>;
28
+ readonly pagination: PaginationState;
29
+ readonly selection: readonly RowKey[];
30
+ /** Expanded keys, or true for every expandable row. */
31
+ readonly expanded: ExpandedState;
32
+ readonly hiddenColumns: readonly string[];
33
+ /** Column ids in display order. Columns missing from the list keep their definition order. */
34
+ readonly columnOrder: readonly string[];
35
+ }
36
+ /** A partial state, as accepted by `setState` and `initialState`. */
37
+ type TableStatePatch = { readonly [K in keyof TableState]?: TableState[K] | undefined; };
38
+ declare const DEFAULT_PAGE_SIZE = 10;
39
+ //#endregion
40
+ //#region src/issues.d.ts
41
+ /** Every problem the engine can report. The union grows in minor versions. */
42
+ type TableIssueCode = "stream_error" | "invalid_stream_option" | "ingestion_conflict" | "invalid_ingestion" | "duplicate_row_key" | "unknown_column" | "invalid_page_size" | "unknown_row" | "read_only_cell" | "invalid_value" | "validation_failed" | "stale_draft" | "invalid_row_operation" | "invalid_expanded" | "unsafe_path" | "paste_truncated" | "invalid_paste_limit" | "invalid_virtual_option" | "invalid_virtual_size" | "invalid_virtual_viewport" | "duplicate_virtual_key" | "tree_cycle" | "tree_depth_exceeded" | "tree_orphan" | "tree_duplicate_key" | "tree_load_error" | "invalid_tree_option";
43
+ /**
44
+ * A problem the engine recovered from. Invalid input is never dropped silently: the engine falls
45
+ * back to something safe and reports what it did here.
7
46
  */
47
+ interface TableIssue {
48
+ readonly code: TableIssueCode;
49
+ readonly message: string;
50
+ readonly column?: string | undefined;
51
+ readonly rowKey?: RowKey | undefined;
52
+ readonly validationCode?: string | undefined;
53
+ }
54
+ //#endregion
55
+ //#region src/path.d.ts
8
56
  type Leaf = string | number | boolean | bigint | symbol | null | undefined | Date | readonly unknown[] | ((...args: never[]) => unknown);
9
57
  type Depth = [never, 0, 1, 2, 3];
10
58
  /** Every dotted path into `T`, four levels deep. Arrays, dates, and functions are leaves. */
@@ -15,9 +63,30 @@ type PathValue<T, TPath extends string> = TPath extends `${infer THead}.${infer
15
63
  declare function getPath(source: unknown, path: string): unknown;
16
64
  /**
17
65
  * Return a copy of `source` with `value` at `path`. Only the objects along the path are copied;
18
- * everything else is shared. Missing steps are created as plain objects.
66
+ * everything else is shared. Missing steps are created as plain objects. Unsafe paths return
67
+ * `source` unchanged and report an `unsafe_path` issue through `onIssue`, when supplied.
19
68
  */
20
- declare function setPath<T>(source: T, path: string, value: unknown): T;
69
+ declare function setPath<T>(source: T, path: string, value: unknown, onIssue?: (problem: TableIssue) => void): T;
70
+ //#endregion
71
+ //#region src/validation.d.ts
72
+ type ValidationResult = true | string | {
73
+ readonly message: string;
74
+ readonly code?: string;
75
+ };
76
+ type Validator<TValue, TRow> = (value: TValue, row: TRow) => ValidationResult | Promise<ValidationResult>;
77
+ interface EditorSpec {
78
+ readonly kind: "text" | "number" | "select" | "checkbox" | "date";
79
+ readonly options?: readonly (string | number | boolean | null)[] | undefined;
80
+ readonly min?: number | undefined;
81
+ readonly max?: number | undefined;
82
+ readonly maxLength?: number | undefined;
83
+ readonly pattern?: string | undefined;
84
+ }
85
+ interface PendingCell {
86
+ readonly rowKey: RowKey;
87
+ readonly column: string;
88
+ readonly value: unknown;
89
+ }
21
90
  //#endregion
22
91
  //#region src/column.d.ts
23
92
  type ColumnAlign = "start" | "center" | "end";
@@ -60,6 +129,9 @@ interface ColumnOptions<TRow, TValue> {
60
129
  * column's `type`.
61
130
  */
62
131
  readonly parse?: ((input: string, row: TRow) => TValue) | undefined;
132
+ readonly validate?: Validator<TValue, TRow> | undefined;
133
+ /** Serializable editor hints. Core enforces their constraints for every write. */
134
+ readonly editor?: EditorSpec | undefined;
63
135
  /** Free-form data for renderers. The engine never reads it. */
64
136
  readonly meta?: Readonly<Record<string, unknown>> | undefined;
65
137
  }
@@ -215,6 +287,9 @@ interface GridKey {
215
287
  }
216
288
  /** What a key press asks a grid to do while no cell is being edited. */
217
289
  type GridCommand = {
290
+ readonly type: "tree";
291
+ readonly action: "expand" | "collapse" | "child" | "parent" | "siblings";
292
+ } | {
218
293
  readonly type: "move";
219
294
  readonly direction: GridDirection;
220
295
  readonly options: MoveOptions;
@@ -238,7 +313,12 @@ type GridCommand = {
238
313
  * a printable character starts editing with that character, Delete and Backspace clear, Escape
239
314
  * collapses the selection, and Ctrl or Cmd with A, Z, Y select all, undo, and redo.
240
315
  */
241
- declare function gridCommand(event: GridKey): GridCommand | undefined;
316
+ /** Hierarchy navigation is enabled only at the caller's designated tree column. */
317
+ interface GridTreeContext {
318
+ readonly canExpand: boolean;
319
+ readonly expanded: boolean;
320
+ }
321
+ declare function gridCommand(event: GridKey, tree?: GridTreeContext): GridCommand | undefined;
242
322
  //#endregion
243
323
  //#region src/undo-stack.d.ts
244
324
  /**
@@ -254,9 +334,54 @@ interface UndoStack<TEntry> {
254
334
  /** Take the most recently undone batch to redo, if any. */
255
335
  redo(): TEntry | undefined;
256
336
  clear(): void;
337
+ /** Reconcile retained user batches after source ingestion. Undefined drops a batch. */
338
+ transform(map: (entry: TEntry) => TEntry | undefined): void;
257
339
  }
258
340
  declare function createUndoStack<TEntry>(limit?: number): UndoStack<TEntry>;
259
341
  //#endregion
342
+ //#region src/virtualizer.d.ts
343
+ type VirtualAlign = "start" | "center" | "end" | "auto";
344
+ interface VirtualizerOptions {
345
+ readonly count: number;
346
+ readonly estimateSize: number | ((index: number) => number);
347
+ /** Extra items on each side. Defaults to 5. */
348
+ readonly overscan?: number | undefined;
349
+ /** Stable, unique identities preserve measurements across reorder and filtering. */
350
+ readonly getKey?: ((index: number) => RowKey) | undefined;
351
+ readonly onIssue?: ((problem: TableIssue) => void) | undefined;
352
+ }
353
+ interface VirtualItem {
354
+ readonly index: number;
355
+ readonly key: RowKey;
356
+ readonly start: number;
357
+ readonly size: number;
358
+ }
359
+ interface VirtualWindow {
360
+ readonly items: readonly VirtualItem[];
361
+ readonly totalSize: number;
362
+ readonly paddingStart: number;
363
+ readonly paddingEnd: number;
364
+ /** Inclusive indices; an empty result uses 0 and -1. */
365
+ readonly startIndex: number;
366
+ readonly endIndex: number;
367
+ /** Clamped viewport values, excluding overscan. */
368
+ readonly offset: number;
369
+ readonly viewportSize: number;
370
+ readonly issues: readonly TableIssue[];
371
+ }
372
+ interface Virtualizer {
373
+ setOptions(options: VirtualizerOptions): void;
374
+ setViewport(offset: number, size: number): void;
375
+ measure(key: RowKey, size: number): void;
376
+ getWindow(): VirtualWindow;
377
+ /** Read an item's layout without moving the viewport; out-of-range indices return undefined. */
378
+ getItem(index: number): VirtualItem | undefined;
379
+ getOffsetForIndex(index: number, align?: VirtualAlign): number;
380
+ subscribe(listener: (view: VirtualWindow) => void): () => void;
381
+ }
382
+ /** Layout arithmetic for either axis. All viewport values and measurements come from the caller. */
383
+ declare function createVirtualizer(initialOptions: VirtualizerOptions): Virtualizer;
384
+ //#endregion
260
385
  //#region src/humanize.d.ts
261
386
  /**
262
387
  * Turn a column id into a readable header: `"name.first_name"` becomes `"Name first name"` and
@@ -264,61 +389,31 @@ declare function createUndoStack<TEntry>(limit?: number): UndoStack<TEntry>;
264
389
  */
265
390
  declare function humanize(id: string): string;
266
391
  //#endregion
267
- //#region src/infer.d.ts
268
- /**
269
- * Columns for data that has none declared: one path column per leaf of the first `sample` rows,
270
- * nested objects flattened into dotted paths, in first-seen order.
271
- */
272
- declare function inferColumns<TRow>(rows: readonly TRow[], sample?: number): readonly ColumnDef<TRow>[];
273
- //#endregion
274
- //#region src/state.d.ts
275
- /** A stable identity for a row, read from the row itself or produced by a function. */
276
- type RowKey = string | number;
277
- type SortDirection = "asc" | "desc";
278
- /** One level of a sort. Several rules sort by the first, then break ties with the next. */
279
- interface SortRule {
280
- readonly column: string;
281
- readonly direction: SortDirection;
392
+ //#region src/tree.d.ts
393
+ /** A runtime supplies its own cancellation primitive; core needs no platform globals. */
394
+ interface TreeLoadSignal {
395
+ readonly aborted: boolean;
282
396
  }
283
- /** Pages are counted from 1. */
284
- interface PaginationState {
285
- readonly page: number;
286
- readonly pageSize: number;
397
+ interface TreeLoadController<TSignal extends TreeLoadSignal = TreeLoadSignal> {
398
+ readonly signal: TSignal;
399
+ abort(): void;
287
400
  }
288
- /**
289
- * Everything a user can change about a table, as plain serializable data.
290
- *
291
- * Being plain data, the state can be stored, restored, sent to a server that sorts and pages, or
292
- * written to the URL with a library such as QueryWeave.
293
- */
294
- interface TableState {
295
- readonly sorting: readonly SortRule[];
296
- /** Free text matched against every searchable column. */
297
- readonly search: string;
298
- /** Filter value per column id, interpreted by that column's `filter`. */
299
- readonly filters: Readonly<Record<string, unknown>>;
300
- readonly pagination: PaginationState;
301
- readonly selection: readonly RowKey[];
302
- readonly hiddenColumns: readonly string[];
303
- /** Column ids in display order. Columns missing from the list keep their definition order. */
304
- readonly columnOrder: readonly string[];
305
- }
306
- /** A partial state, as accepted by `setState` and `initialState`. */
307
- type TableStatePatch = { readonly [K in keyof TableState]?: TableState[K] | undefined; };
308
- declare const DEFAULT_PAGE_SIZE = 10;
309
- //#endregion
310
- //#region src/issues.d.ts
311
- /** Every problem the engine can report. The union grows in minor versions. */
312
- type TableIssueCode = "duplicate_row_key" | "unknown_column" | "invalid_page_size" | "unknown_row" | "read_only_cell" | "invalid_value";
313
- /**
314
- * A problem the engine recovered from. Invalid input is never dropped silently: the engine falls
315
- * back to something safe and reports what it did here.
316
- */
317
- interface TableIssue {
318
- readonly code: TableIssueCode;
319
- readonly message: string;
320
- readonly column?: string | undefined;
321
- readonly rowKey?: RowKey | undefined;
401
+ type TreeFilter = "ancestors" | "descendants" | "strict";
402
+ type TreePagination = "root" | "row";
403
+ type ChildStatus = "idle" | "loading" | "loaded" | "error";
404
+ interface TreeOptions<TRow, TSignal extends TreeLoadSignal = TreeLoadSignal> {
405
+ readonly getChildren?: ((row: TRow) => readonly TRow[] | undefined) | undefined;
406
+ /** Immutable counterpart of getChildren, required when editing nested descendants. */
407
+ readonly setChildren?: ((row: TRow, children: readonly TRow[]) => TRow) | undefined;
408
+ readonly getParentKey?: ((row: TRow) => RowKey | null | undefined) | undefined;
409
+ readonly hasChildren?: ((row: TRow) => boolean) | undefined;
410
+ readonly loadChildren?: ((row: TableRow<TRow>, signal: TSignal) => Promise<readonly TRow[]>) | undefined;
411
+ /** Required with loadChildren. Supply a controller from the caller's runtime. */
412
+ readonly createChildLoadController?: (() => TreeLoadController<TSignal>) | undefined;
413
+ readonly treeFilter?: TreeFilter | undefined;
414
+ readonly paginateBy?: TreePagination | undefined;
415
+ /** Maximum edges from a root. Deeper rows recover as roots. Defaults to 1,000. */
416
+ readonly maxDepth?: number | undefined;
322
417
  }
323
418
  //#endregion
324
419
  //#region src/row.d.ts
@@ -331,10 +426,32 @@ interface TableRow<TRow> {
331
426
  /** Position in the data the table was given. */
332
427
  readonly index: number;
333
428
  readonly original: TRow;
429
+ readonly canExpand: boolean;
430
+ readonly isExpanded: boolean;
431
+ readonly depth: number;
432
+ readonly parentKey: RowKey | undefined;
433
+ readonly childCount: number | undefined;
434
+ readonly childStatus: ChildStatus;
435
+ /** Coverage of this row and its loaded descendants. */
436
+ readonly selection: "none" | "some" | "all";
437
+ readonly isDirty: boolean;
438
+ readonly cellIssues: ReadonlyMap<string, TableIssue> | undefined;
334
439
  getValue(columnId: string): unknown;
335
440
  /** The formatted text of a cell, as shown, searched, copied, and exported. */
336
441
  getDisplay(columnId: string): string;
337
442
  }
443
+ type RowItemKind = "row" | "detail";
444
+ /** A renderer item; detail items do not count as data rows or grid coordinates. */
445
+ interface TableRenderItem<TRow> {
446
+ readonly kind: RowItemKind;
447
+ readonly key: string;
448
+ /** The parent data row, also for detail items. */
449
+ readonly row: TableRow<TRow>;
450
+ /** Position of the parent in snapshot.rows. */
451
+ readonly rowIndex: number;
452
+ }
453
+ /** Disjoint namespaces and typed keys avoid collisions between 1, "1", and detail-like ids. */
454
+ declare function getRowItemKey(key: RowKey, kind?: RowItemKind): string;
338
455
  //#endregion
339
456
  //#region src/pipeline.d.ts
340
457
  /**
@@ -365,11 +482,47 @@ type PageItem = {
365
482
  */
366
483
  declare function paginationItems(page: number, pageCount: number, siblings?: number): readonly PageItem[];
367
484
  //#endregion
485
+ //#region src/stream.d.ts
486
+ type LoadState = "idle" | "loading" | "streaming" | "done" | "error" | "aborted";
487
+ /** Structural cancellation, compatible with the caller's native signal. */
488
+ interface StreamSignal {
489
+ readonly aborted: boolean;
490
+ addEventListener?(type: "abort", listener: () => void, options?: {
491
+ readonly once?: boolean;
492
+ }): void;
493
+ removeEventListener?(type: "abort", listener: () => void): void;
494
+ }
495
+ interface StreamOptions {
496
+ readonly signal?: StreamSignal | undefined;
497
+ readonly batchSize?: number | undefined;
498
+ readonly expectedRowCount?: number | undefined;
499
+ readonly mode?: "append" | "upsert" | undefined;
500
+ }
501
+ interface DataIngestionResult {
502
+ readonly status: "applied" | "partial" | "rejected" | "unchanged";
503
+ readonly appended: number;
504
+ readonly replaced: number;
505
+ readonly removed: number;
506
+ readonly issues: readonly TableIssue[];
507
+ }
508
+ interface StreamResult {
509
+ readonly status: "done" | "error" | "aborted";
510
+ readonly receivedRowCount: number;
511
+ readonly issues: readonly TableIssue[];
512
+ }
513
+ //#endregion
368
514
  //#region src/table.d.ts
369
515
  type SelectionMode = "none" | "single" | "multiple";
516
+ type ExpandMode = "single" | "multiple";
370
517
  /** Which rows "select all" covers: the current page, or every row that passes the filters. */
371
518
  type SelectScope = "page" | "all";
372
- interface TableOptions<TRow> {
519
+ interface PasteLimit {
520
+ /** Maximum fields examined per paste, including clipped columns. Defaults to 100,000. */
521
+ readonly maxCells?: number | undefined;
522
+ /** Maximum UTF-16 code units examined per paste. Defaults to 5,000,000. */
523
+ readonly maxLength?: number | undefined;
524
+ }
525
+ interface TableOptions<TRow, TSignal extends TreeLoadSignal = TreeLoadSignal> extends TreeOptions<TRow, TSignal> {
373
526
  readonly data: readonly TRow[];
374
527
  readonly columns: readonly ColumnDef<TRow>[];
375
528
  /**
@@ -378,6 +531,10 @@ interface TableOptions<TRow> {
378
531
  */
379
532
  readonly rowKey?: DeepKeys<TRow> | ((row: TRow, index: number) => RowKey) | undefined;
380
533
  readonly initialState?: TableStatePatch | undefined;
534
+ /** Present all processed rows rather than a page. Defaults to true. */
535
+ readonly paginate?: boolean | undefined;
536
+ readonly getRowCanExpand?: ((row: TRow) => boolean) | undefined;
537
+ readonly expandMode?: ExpandMode | undefined;
381
538
  /** Defaults to `"multiple"`. */
382
539
  readonly selectionMode?: SelectionMode | undefined;
383
540
  /** Defaults to `"all"`. */
@@ -389,14 +546,23 @@ interface TableOptions<TRow> {
389
546
  readonly manual?: boolean | undefined;
390
547
  /** The total number of rows across all pages, for `manual` tables. */
391
548
  readonly rowCount?: number | undefined;
549
+ /** Caller-owned source hint, independent of filtering and pagination. */
550
+ readonly expectedRowCount?: number | undefined;
392
551
  /** Called after every state change a table operation makes, not after `setState`. */
393
552
  readonly onStateChange?: ((state: TableState, previous: TableState) => void) | undefined;
394
- /** Called with the new data after an edit, a paste, an undo, or a redo. */
553
+ /** Called with new data after edits or ingestion; ingestion has an empty cell-change list. */
395
554
  readonly onDataChange?: ((data: readonly TRow[], changes: readonly CellChange<TRow>[]) => void) | undefined;
396
555
  /** Called with the reasons whenever an edit, a paste, or a clear refuses some cells. */
397
556
  readonly onEditIssues?: ((issues: readonly TableIssue[]) => void) | undefined;
398
557
  /** The most edit batches `undo` can reach. Defaults to 100. */
399
558
  readonly historyLimit?: number | undefined;
559
+ /** Bound clipboard parsing. Only complete cells inside the visible grid are applied. */
560
+ readonly pasteLimit?: PasteLimit | undefined;
561
+ readonly validateRow?: ((next: TRow, previous: TRow) => ValidationResult | Promise<ValidationResult>) | undefined;
562
+ readonly asyncValidation?: "held" | "optimistic" | undefined;
563
+ readonly createRow?: (() => TRow) | undefined;
564
+ /** Immutable inverse of getParentKey for inserting adjacency children. */
565
+ readonly setParentKey?: ((row: TRow, parent: RowKey | undefined) => TRow) | undefined;
400
566
  }
401
567
  type SelectionCoverage = "none" | "some" | "all";
402
568
  interface SortInfo {
@@ -409,13 +575,21 @@ interface SortInfo {
409
575
  * frozen and replaced on each change, so comparing snapshots by identity detects a change.
410
576
  */
411
577
  interface TableSnapshot<TRow> {
578
+ /** True when hierarchy options are configured, including an empty tree. */
579
+ readonly tree: boolean;
580
+ readonly loadState: LoadState;
581
+ readonly loadedRowCount: number;
582
+ readonly expectedRowCount: number | undefined;
412
583
  readonly state: TableState;
413
584
  /** Visible columns in display order. */
414
585
  readonly columns: readonly TableColumn<TRow>[];
415
586
  /** Every column in display order, hidden ones included. */
416
587
  readonly allColumns: readonly TableColumn<TRow>[];
417
- /** Rows on the current page. */
588
+ /** Rows on the current page, or all processed rows when pagination is disabled. */
418
589
  readonly rows: readonly TableRow<TRow>[];
590
+ /** Data rows followed by their open details; details do not affect pagination or grid positions. */
591
+ readonly renderItems: readonly TableRenderItem<TRow>[];
592
+ readonly paginate: boolean;
419
593
  /** Rows on every page, filtered and sorted. For `manual` tables this is the current page. */
420
594
  readonly processedRows: readonly TableRow<TRow>[];
421
595
  /** The current page, clamped into range. */
@@ -442,6 +616,7 @@ interface TableSnapshot<TRow> {
442
616
  readonly canUndo: boolean;
443
617
  readonly canRedo: boolean;
444
618
  readonly issues: readonly TableIssue[];
619
+ readonly pendingCells: readonly PendingCell[];
445
620
  isSelected(key: RowKey): boolean;
446
621
  getSort(columnId: string): SortInfo | undefined;
447
622
  getColumn(columnId: string): TableColumn<TRow> | undefined;
@@ -460,6 +635,10 @@ interface CellInputEdit {
460
635
  readonly input: string;
461
636
  }
462
637
  type CellEdit = CellValueEdit | CellInputEdit;
638
+ /** Optional identity checks for a batch prepared from an earlier row snapshot. */
639
+ interface EditOptions<TRow> {
640
+ readonly expectedRows?: ReadonlyMap<RowKey, TRow> | undefined;
641
+ }
463
642
  interface CellChange<TRow> {
464
643
  readonly rowKey: RowKey;
465
644
  readonly column: string;
@@ -468,7 +647,7 @@ interface CellChange<TRow> {
468
647
  /** The row after the change. */
469
648
  readonly row: TRow;
470
649
  }
471
- type EditStatus = "applied" | "partial" | "rejected" | "unchanged";
650
+ type EditStatus = "applied" | "partial" | "rejected" | "unchanged" | "pending";
472
651
  /**
473
652
  * The outcome of a batch of edits. `partial` means some edits applied and others were refused;
474
653
  * each refusal is in `issues`.
@@ -477,8 +656,22 @@ interface EditResult<TRow> {
477
656
  readonly status: EditStatus;
478
657
  readonly changes: readonly CellChange<TRow>[];
479
658
  readonly issues: readonly TableIssue[];
659
+ readonly rowChanges: readonly RowChange<TRow>[];
660
+ readonly pendingCells: readonly PendingCell[];
661
+ /** Present on pending batches; resolves to their final outcome, including superseded cells. */
662
+ readonly completion?: Promise<EditResult<TRow>> | undefined;
480
663
  }
481
- interface ExportOptions {
664
+ interface CopyOptions {
665
+ /** Prefix formula-like text with an apostrophe. Defaults to false for clipboard copies. */
666
+ readonly escapeFormulas?: boolean | undefined;
667
+ }
668
+ interface ExportOptions extends CopyOptions {
669
+ /** Prepend a numeric Depth column for hierarchical exports. */
670
+ readonly depth?: boolean | undefined;
671
+ /** Prefix the first data column with this text repeated per level. */
672
+ readonly indent?: string | undefined;
673
+ /** Prefix formula-like text with an apostrophe. Defaults to true for exports. */
674
+ readonly escapeFormulas?: boolean | undefined;
482
675
  /** Defaults to `"csv"`. */
483
676
  readonly format?: "csv" | "tsv" | undefined;
484
677
  /** Column ids to export. Defaults to the visible columns. */
@@ -493,6 +686,15 @@ interface ExportOptions {
493
686
  * about rendering; a framework binding subscribes to it and draws each snapshot.
494
687
  */
495
688
  interface DataTable<TRow> {
689
+ appendData(rows: readonly TRow[]): DataIngestionResult;
690
+ upsertData(rows: readonly TRow[]): DataIngestionResult;
691
+ removeData(keys: readonly RowKey[]): DataIngestionResult;
692
+ stream(source: AsyncIterable<readonly TRow[] | TRow>, options?: StreamOptions): Promise<StreamResult>;
693
+ insertRows(rows?: readonly TRow[], at?: InsertPosition): EditResult<TRow>;
694
+ removeRows(keys: readonly RowKey[]): EditResult<TRow>;
695
+ getPendingChanges(): PendingChanges<TRow>;
696
+ markSaved(keys?: readonly RowKey[]): void;
697
+ revert(keys?: readonly RowKey[]): EditResult<TRow>;
496
698
  getSnapshot(): TableSnapshot<TRow>;
497
699
  getState(): TableState;
498
700
  /** Called after every change with the new snapshot. Returns the unsubscribe function. */
@@ -502,6 +704,8 @@ interface DataTable<TRow> {
502
704
  /** Replace the data. The undo stack is cleared unless the data is the table's own. */
503
705
  setData(data: readonly TRow[]): void;
504
706
  setColumns(columns: readonly ColumnDef<TRow>[]): void;
707
+ /** Change tree search context without replacing rows or clearing loaded children. */
708
+ setTreeFilter(mode: TreeFilter | undefined): void;
505
709
  /** Update the total row count of a `manual` table. */
506
710
  setRowCount(rowCount: number): void;
507
711
  /** Cycle a column through ascending, descending, and unsorted. */
@@ -530,13 +734,16 @@ interface DataTable<TRow> {
530
734
  clearSelection(): void;
531
735
  /** The selected rows that are present in the data. */
532
736
  getSelectedRows(): readonly TableRow<TRow>[];
737
+ toggleExpanded(key: RowKey, expanded?: boolean): void;
738
+ expandAll(): void;
739
+ collapseAll(): void;
533
740
  toggleColumn(columnId: string, visible?: boolean): void;
534
741
  moveColumn(columnId: string, toIndex: number): void;
535
- edit(edits: CellEdit | readonly CellEdit[]): EditResult<TRow>;
742
+ edit(edits: CellEdit | readonly CellEdit[], options?: EditOptions<TRow>): EditResult<TRow>;
536
743
  undo(): boolean;
537
744
  redo(): boolean;
538
745
  /** The text of a range of shown cells, tab-separated like a spreadsheet clipboard. */
539
- copy(range: CellRange): string;
746
+ copy(range: CellRange, options?: CopyOptions): string;
540
747
  /** Paste tab-separated text with its top-left cell at `origin`, clipped to the grid. */
541
748
  paste(origin: CellPosition, text: string): EditResult<TRow>;
542
749
  /** Empty every editable cell in a range. */
@@ -548,7 +755,37 @@ interface DataTable<TRow> {
548
755
  destroy(): void;
549
756
  }
550
757
  /** Create a data table. */
551
- declare function createTable<TRow>(options: TableOptions<TRow>): DataTable<TRow>;
758
+ declare function createTable<TRow, TSignal extends TreeLoadSignal = TreeLoadSignal>(options: TableOptions<TRow, TSignal>): DataTable<TRow>;
759
+ //#endregion
760
+ //#region src/pending-changes.d.ts
761
+ interface InsertPosition {
762
+ readonly before?: RowKey | undefined;
763
+ readonly parent?: RowKey | undefined;
764
+ }
765
+ interface RowChange<TRow> {
766
+ readonly kind: "inserted" | "removed";
767
+ readonly rowKey: RowKey;
768
+ readonly row: TRow;
769
+ readonly position: InsertPosition;
770
+ }
771
+ interface UpdatedRow<TRow> {
772
+ readonly rowKey: RowKey;
773
+ readonly row: TRow;
774
+ readonly previous: TRow;
775
+ readonly changes: readonly CellChange<TRow>[];
776
+ }
777
+ interface PendingChanges<TRow> {
778
+ readonly inserted: readonly RowChange<TRow>[];
779
+ readonly updated: readonly UpdatedRow<TRow>[];
780
+ readonly removed: readonly RowChange<TRow>[];
781
+ }
782
+ //#endregion
783
+ //#region src/infer.d.ts
784
+ /**
785
+ * Columns for data that has none declared: one path column per leaf of the first `sample` rows,
786
+ * nested objects flattened into dotted paths, in first-seen order.
787
+ */
788
+ declare function inferColumns<TRow>(rows: readonly TRow[], sample?: number): readonly ColumnDef<TRow>[];
552
789
  //#endregion
553
- export { type AnyColumnDef, type CellChange, type CellEdit, type CellInputEdit, type CellPosition, type CellRange, type CellValueEdit, type ColumnAlign, type ColumnDef, type ColumnOptions, type ColumnType, type ComputedColumnDef, DEFAULT_PAGE_SIZE, type DataTable, type DeepKeys, type EditResult, type EditStatus, type ExportOptions, type GridBounds, type GridCommand, type GridDirection, type GridKey, type GridSelection, type MoveOptions, type PageItem, type PaginationState, type ParseResult, type PathColumnDef, type PathValue, type RangeFilter, type RowKey, type SelectScope, type SelectionCoverage, type SelectionMode, type SortDirection, type SortInfo, type SortRule, type TableColumn, type TableIssue, type TableIssueCode, type TableOptions, type TableRow, type TableSnapshot, type TableState, type TableStatePatch, type UndoStack, clampPage, clampPosition, columnLabel, compareValues, countPages, createTable, createUndoStack, defineColumns, filterRows, formatValue, fromA1, getPath, gridCommand, humanize, inferColumns, matchesFilter, moveSelection, paginateRows, paginationItems, parseAs, parseDelimited, rangeContains, resolveColumn, selectCell, selectionRange, setPath, sortRows, toA1, toDelimited, typeOf };
790
+ export { type AnyColumnDef, type CellChange, type CellEdit, type CellInputEdit, type CellPosition, type CellRange, type CellValueEdit, type ChildStatus, type ColumnAlign, type ColumnDef, type ColumnOptions, type ColumnType, type ComputedColumnDef, type CopyOptions, DEFAULT_PAGE_SIZE, type DataIngestionResult, type DataTable, type DeepKeys, type EditOptions, type EditResult, type EditStatus, type EditorSpec, type ExpandMode, type ExpandedState, type ExportOptions, type GridBounds, type GridCommand, type GridDirection, type GridKey, type GridSelection, type GridTreeContext, type InsertPosition, type LoadState, type MoveOptions, type PageItem, type PaginationState, type ParseResult, type PasteLimit, type PathColumnDef, type PathValue, type PendingCell, type PendingChanges, type RangeFilter, type RowChange, type RowItemKind, type RowKey, type SelectScope, type SelectionCoverage, type SelectionMode, type SortDirection, type SortInfo, type SortRule, type StreamOptions, type StreamResult, type StreamSignal, type TableColumn, type TableIssue, type TableIssueCode, type TableOptions, type TableRenderItem, type TableRow, type TableSnapshot, type TableState, type TableStatePatch, type TreeFilter, type TreeLoadController, type TreeLoadSignal, type TreeOptions, type TreePagination, type UndoStack, type UpdatedRow, type ValidationResult, type Validator, type VirtualAlign, type VirtualItem, type VirtualWindow, type Virtualizer, type VirtualizerOptions, clampPage, clampPosition, columnLabel, compareValues, countPages, createTable, createUndoStack, createVirtualizer, defineColumns, filterRows, formatValue, fromA1, getPath, getRowItemKey, gridCommand, humanize, inferColumns, matchesFilter, moveSelection, paginateRows, paginationItems, parseAs, parseDelimited, rangeContains, resolveColumn, selectCell, selectionRange, setPath, sortRows, toA1, toDelimited, typeOf };
554
791
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/path.ts","../src/column.ts","../src/delimited.ts","../src/grid.ts","../src/undo-stack.ts","../src/humanize.ts","../src/infer.ts","../src/state.ts","../src/issues.ts","../src/row.ts","../src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OAAO,KAAK,SAAS,SAAS;;;UAIf;WACN,QAAQ;WACR;WACA;;;UAIM;WACN,QAAQ;WACR;WACA;;KAGC,WAAW,gBAAgB;UAEtB,WAAW;WACjB,QAAQ;WACR;WACA;WACA;;WAEA,KAAK;;KAGJ;;;;;UAMK,WAAW;WACjB,QAAQ;WACR,kBAAkB,WAAW;WAC7B,iBAAiB;;UAGX;;WAEN;;WAEA;;WAEA;;WAEA;;;;;;UAOM,UAAU;EACzB,eAAe,cAAc;EAC7B,YAAY;;EAEZ,UAAU,WAAW,UAAU,cAAc;;EAG7C,SAAS,OAAO;;EAEhB,QAAQ,eAAe;EACvB,WAAW,kBAAkB,UAAU;;EAEvC,YAAY;;EAGZ,WAAW,kBAAkB;aAAqB;;;EAElD,KACE,kBACA,WAAW,2BACX;aAAqB;;EAEvB;EACA,OAAO;;EAEP,OAAO,kBAAkB;EACzB;EAEA,SAAS;EACT;EACA;;EAEA,YAAY;EAEZ,OAAO,eAAe;EACtB,SAAS,eAAe;EACxB,UAAU,KAAK,QAAQ;;EAEvB,UAAU,QAAQ;EAClB;;EAEA,4BAA4B,SAAS;EAErC,aAAa,kBAAkB;EAC/B,WAAW,kBAAkB;EAE7B,KAAK,OAAO,oBAAoB,aAAa,WAAW;EACxD;EACA;;EAEA,KAAK,OAAO;;EAEZ,MAAM,QAAQ,cAAc,eAAe,WAAW;;EAEtD,MAAM,OAAO,YAAY,WAAW;EACpC,WAAW,UAAU;;EAGrB;;EAEA;;;iBA2Cc,YAAY,MAAM,SAAS,aAAa,QAAQ,UAAU"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/state.ts","../src/issues.ts","../src/path.ts","../src/validation.ts","../src/column.ts","../src/delimited.ts","../src/grid.ts","../src/undo-stack.ts","../src/virtualizer.ts","../src/humanize.ts","../src/tree.ts","../src/row.ts","../src/pipeline.ts","../src/stream.ts","../src/table.ts","../src/pending-changes.ts","../src/infer.ts"],"mappings":";;KAGY;KACA,yBAAyB;KAEzB;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