@svgrid/grid 2.6.20 → 2.6.22

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 (110) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/README.md +22 -0
  3. package/dist/GridMenus.svelte +17 -12
  4. package/dist/SvGrid.controller.svelte.d.ts +14 -8
  5. package/dist/SvGrid.controller.svelte.js +214 -74
  6. package/dist/SvGrid.css +1 -1
  7. package/dist/SvGrid.svelte +112 -57
  8. package/dist/SvGrid.types.d.ts +191 -1
  9. package/dist/ai.d.ts +28 -0
  10. package/dist/ai.js +6 -0
  11. package/dist/cdn/{GridMenus-B0F9iBrG.js → GridMenus-BuoBPqxx.js} +137 -132
  12. package/dist/cdn/GridMenus-n4llxoOI.js +494 -0
  13. package/dist/cdn/column-resize-DsfNXMom.js +102 -0
  14. package/dist/cdn/row-resize-BRcimkUT.js +95 -0
  15. package/dist/cdn/{src-Cd0tearp.js → src-C9Hihx1W.js} +3497 -3487
  16. package/dist/cdn/{src-B1TdiyS8.js → src-D1lXwq1l.js} +8258 -8248
  17. package/dist/cdn/svgrid.js +10 -8
  18. package/dist/cdn/svgrid.svelte-external.js +10 -8
  19. package/dist/cdn/validate-_CDJzgIo.js +75 -0
  20. package/dist/cell-formatting.d.ts +2 -0
  21. package/dist/cell-formatting.js +2 -0
  22. package/dist/chart-export.d.ts +1 -0
  23. package/dist/chart.d.ts +31 -5
  24. package/dist/chart.js +9 -3
  25. package/dist/column-groups.js +1 -1
  26. package/dist/column-resize.d.ts +46 -0
  27. package/dist/column-resize.js +205 -0
  28. package/dist/columns.d.ts +0 -3
  29. package/dist/columns.js +0 -57
  30. package/dist/core.d.ts +216 -4
  31. package/dist/core.js +532 -119
  32. package/dist/createTree.svelte.d.ts +3 -0
  33. package/dist/createTree.svelte.js +1 -0
  34. package/dist/datetime/date-core.d.ts +2 -0
  35. package/dist/datetime/date-restrict.d.ts +1 -0
  36. package/dist/datetime/timezone.d.ts +1 -0
  37. package/dist/dock-manager-model.d.ts +3 -0
  38. package/dist/dock-manager-model.js +1 -0
  39. package/dist/dock-model.d.ts +6 -0
  40. package/dist/dock-model.js +3 -0
  41. package/dist/editor-contract.d.ts +1 -0
  42. package/dist/filtering/excel-filters.js +28 -0
  43. package/dist/group-display.d.ts +1 -1
  44. package/dist/index.d.ts +2 -1
  45. package/dist/index.js +6 -0
  46. package/dist/list-option.d.ts +1 -0
  47. package/dist/menus.js +1 -1
  48. package/dist/positioning.d.ts +2 -0
  49. package/dist/row-resize.d.ts +11 -0
  50. package/dist/row-resize.js +7 -1
  51. package/dist/scheduler-ical.d.ts +1 -0
  52. package/dist/scheduler-model.d.ts +1 -0
  53. package/dist/selection.js +9 -0
  54. package/dist/spreadsheet.d.ts +1 -1
  55. package/dist/spreadsheet.js +1 -1
  56. package/dist/summaries.js +22 -0
  57. package/dist/svgrid-wrapper.types.d.ts +5 -0
  58. package/dist/toast-store.svelte.d.ts +4 -0
  59. package/dist/validate.d.ts +50 -0
  60. package/dist/validate.js +187 -0
  61. package/package.json +4 -1
  62. package/src/GridMenus.svelte +17 -12
  63. package/src/SvGrid.controller.svelte.ts +223 -76
  64. package/src/SvGrid.css +1 -1
  65. package/src/SvGrid.svelte +112 -57
  66. package/src/SvGrid.types.ts +191 -1
  67. package/src/ai.ts +28 -0
  68. package/src/cell-formatting.ts +2 -0
  69. package/src/chart-export.ts +1 -0
  70. package/src/chart.ts +31 -5
  71. package/src/column-groups.ts +1 -1
  72. package/src/column-resize.test.ts +381 -0
  73. package/src/column-resize.ts +227 -0
  74. package/src/columns.test.ts +0 -103
  75. package/src/columns.ts +0 -58
  76. package/src/core.aggregate.test.ts +134 -0
  77. package/src/core.filter.test.ts +156 -0
  78. package/src/core.grouping.test.ts +146 -0
  79. package/src/core.row-shape.test.ts +119 -0
  80. package/src/core.rowmodel-cache.test.ts +121 -0
  81. package/src/core.sort.test.ts +293 -0
  82. package/src/core.ts +723 -119
  83. package/src/createTree.svelte.ts +3 -0
  84. package/src/datetime/date-core.ts +2 -0
  85. package/src/datetime/date-restrict.ts +1 -0
  86. package/src/datetime/timezone.ts +1 -0
  87. package/src/dock-manager-model.ts +3 -0
  88. package/src/dock-model.ts +6 -0
  89. package/src/editor-contract.ts +1 -0
  90. package/src/filtering/excel-filters.ts +30 -0
  91. package/src/filtering/normalize-fast-path.test.ts +104 -0
  92. package/src/group-display.ts +1 -1
  93. package/src/index.ts +12 -1
  94. package/src/list-option.ts +1 -0
  95. package/src/menus.ts +1 -1
  96. package/src/positioning.ts +2 -0
  97. package/src/resize-props.test.ts +361 -0
  98. package/src/row-resize.test.ts +31 -0
  99. package/src/row-resize.ts +21 -3
  100. package/src/scheduler-ical.ts +1 -0
  101. package/src/scheduler-model.ts +1 -0
  102. package/src/selection.ts +9 -0
  103. package/src/spreadsheet.ts +1 -1
  104. package/src/summaries.ts +21 -0
  105. package/src/svgrid-wrapper.types.ts +5 -0
  106. package/src/svgrid.summaries.test.ts +217 -0
  107. package/src/toast-store.svelte.ts +4 -0
  108. package/src/validate.test.ts +207 -0
  109. package/src/validate.ts +269 -0
  110. package/dist/cdn/GridMenus-IHK_l7m6.js +0 -489
package/CHANGELOG.md CHANGED
@@ -4,6 +4,68 @@ Releases above 1.2.3 are generated from the commit subjects in each release tag
4
4
  (`node tools/build-changelog.mjs`), so they describe what changed rather than
5
5
  reading as polished release notes. Entries from 1.2.3 down are hand-written.
6
6
 
7
+ ## 2.6.21
8
+
9
+ _2026-08-31_
10
+
11
+ - mobile fixes and 2 more property shortcuts
12
+ - Add a stars scorecard, drop the misleading downloads badge, add a code of conduct
13
+ - Make the MCP discovery tools usable, and stop the twice-daily version churn
14
+
15
+ ## 2.6.18
16
+
17
+ _2026-08-29_
18
+
19
+ - Ship @svgrid/mcp as 2.6.4 after npm stalled the 2.6.3 publish
20
+
21
+ ## 2.6.17
22
+
23
+ _2026-08-29_
24
+
25
+ - mobile demo fixes
26
+
27
+ ## 2.6.13
28
+
29
+ _2026-08-28_
30
+
31
+ - mobile demos fixes
32
+ - Update image width attributes in README.md
33
+ - Enhance README with SvGrid props details
34
+
35
+ ## 2.6.12
36
+
37
+ _2026-08-27_
38
+
39
+ - Advance the website gitlink to today's SEO commit
40
+
41
+ ## 2.6.10
42
+
43
+ _2026-08-26_
44
+
45
+ - chore: untrack Claude Code auto-memory leaked into the repo
46
+ - chore: untrack maintainer-only scripts in tools/
47
+ - small fixes
48
+
49
+ ## 2.6.9
50
+
51
+ _2026-08-25_
52
+
53
+ - SvelteKit with SvGrid Quick Start template
54
+ - Fix the red CI step, and give the SvelteKit guide a runnable example
55
+ - Correct the CSV-as-paid claim and the stale testing numbers in docs
56
+
57
+ ## 2.6.8
58
+
59
+ _2026-08-25_
60
+
61
+ - Server-render grid rows, and a SvelteKit tutorial
62
+
63
+ ## 2.6.7
64
+
65
+ _2026-08-25_
66
+
67
+ - Headless subpath, lazy cell editor, row-drag fixes, MIT MCP
68
+
7
69
  ## 2.6.5
8
70
 
9
71
  _2026-08-24_
package/README.md CHANGED
@@ -165,6 +165,28 @@ on the export- and analytics-heavy features teams tend to need last:
165
165
 
166
166
  OSS projects receive an Enterprise key free. See [Pricing](https://svgrid.com/pricing/).
167
167
 
168
+ ## Also in the box
169
+
170
+ The grid is the hero, but it is not everything in the package. The component suite below already ships
171
+ inside `@svgrid/grid`; the tools after it install separately and are entirely optional.
172
+
173
+ - **[SvGrid UI](https://svgrid.com/docs/help/ui-components/index/)** (MIT) - 84 Svelte 5 components
174
+ already inside this package, no extra install: `SvButton`, `SvCalendar`, `SvDateTimePicker`,
175
+ `SvDockLayout`, `SvToaster`, selects, dialogs, split panes. Import them the same way you import
176
+ `SvGrid`. If you would rather own and edit the source, `npx @svgrid/ui try calendar` previews a
177
+ component and copies it into your project, shadcn-style.
178
+ - **[`@svgrid/grid-wc`](https://www.npmjs.com/package/@svgrid/grid-wc)** (MIT) - the same grid as a
179
+ `<sv-grid>` custom element for React, Vue, Angular, or plain HTML. No build step.
180
+ - **[`@svgrid/mcp`](https://www.npmjs.com/package/@svgrid/mcp)** (MIT) - MCP server that checks the code
181
+ your AI writes against the real API surface, with version-pinned docs and every demo source.
182
+ - **[`@svgrid/migrate`](https://www.npmjs.com/package/@svgrid/migrate)** (MIT) - codemod that ports a
183
+ `svelte-headless-table` or TanStack Table v9 component to SvGrid, including the shadcn-svelte data
184
+ table.
185
+ - **[`@svgrid/sv`](https://www.npmjs.com/package/@svgrid/sv)** (MIT) - `npx sv add @svgrid` add-on for
186
+ the Svelte CLI.
187
+ - **[SvGrid Studio](https://svgrid.com/docs/studio/)** (commercial) - visual designer that generates a
188
+ SvelteKit CRUD app from a database schema: screens, forms, API routes, auth. Code you own, no runtime.
189
+
168
190
  ## Comparison
169
191
 
170
192
  | | SvGrid | AG Grid Community | TanStack Table |
@@ -450,18 +450,23 @@
450
450
  </button>
451
451
  {/if}
452
452
  <div class="sv-grid-menu-sep"></div>
453
- <button
454
- type="button"
455
- class="sv-grid-menu-item"
456
- role="menuitem"
457
- onclick={() => {
458
- autosizeColumn(menuColumnId);
459
- closeMenus();
460
- }}
461
- >
462
- <span class="sv-grid-header-icon">{@render icon("autosize")}</span> Autosize
463
- this column
464
- </button>
453
+ <!-- `resizable: false` means the width is part of the layout, so the
454
+ menu must not offer to change it either - otherwise removing the
455
+ drag handle just moves the same action one click away. -->
456
+ {#if ctrl.columnResizable(menuColumnId)}
457
+ <button
458
+ type="button"
459
+ class="sv-grid-menu-item"
460
+ role="menuitem"
461
+ onclick={() => {
462
+ autosizeColumn(menuColumnId);
463
+ closeMenus();
464
+ }}
465
+ >
466
+ <span class="sv-grid-header-icon">{@render icon("autosize")}</span> Autosize
467
+ this column
468
+ </button>
469
+ {/if}
465
470
  <button
466
471
  type="button"
467
472
  class="sv-grid-menu-item"
@@ -92,9 +92,6 @@ export declare function createSvGridController<TFeatures extends TableFeatures =
92
92
  headerHeight: number;
93
93
  editorSelectAll: boolean;
94
94
  columnWidths: Record<string, number>;
95
- resizingColumnId: string | null;
96
- resizeStartX: number;
97
- resizeStartWidth: number;
98
95
  readonly MIN_COLUMN_WIDTH: number;
99
96
  columnPinning: {
100
97
  left: Array<string>;
@@ -160,6 +157,7 @@ export declare function createSvGridController<TFeatures extends TableFeatures =
160
157
  readonly showColumnFiltersEffective: boolean;
161
158
  readonly showInlineColumnFilterEffective: boolean;
162
159
  readonly showRowSelectionEffective: boolean;
160
+ readonly rowSummariesEnabled: boolean;
163
161
  readonly enableCellSelectionEffective: boolean;
164
162
  readonly flushScheduledScrollSync: () => void;
165
163
  readonly scheduleScrollSync: (scrollTop: number, scrollLeft: number) => void;
@@ -431,6 +429,12 @@ export declare function createSvGridController<TFeatures extends TableFeatures =
431
429
  /** A row's measured height, or undefined before it has been measured.
432
430
  * The non-virtualized body reads this directly (it has no virtual item). */
433
431
  readonly measuredRowHeightPx: (index: number) => number | undefined;
432
+ /** True when the `rowResize` prop is on and nothing overrides it. */
433
+ readonly rowResizeOn: boolean;
434
+ /** Record the height the user dragged a row to. */
435
+ readonly setRowResizeHeight: (index: number, height: number) => void;
436
+ /** A row's dragged height, or undefined when it has not been resized. */
437
+ readonly rowResizeHeightPx: (index: number) => number | undefined;
434
438
  readonly virtualRowTotalSize: number;
435
439
  readonly virtualRowStart: number;
436
440
  readonly virtualRowEnd: number;
@@ -507,11 +511,6 @@ export declare function createSvGridController<TFeatures extends TableFeatures =
507
511
  readonly getColumnBaseWidth: (columnId: string) => any;
508
512
  readonly fittedColumnWidths: Record<string, number> | null;
509
513
  readonly getColumnWidth: (columnId: string) => any;
510
- resizePendingWidth: number;
511
- resizeRaf: number | null;
512
- readonly startColumnResize: (event: PointerEvent, columnId: string) => void;
513
- readonly onColumnResizeMove: (event: PointerEvent) => void;
514
- readonly endColumnResize: () => void;
515
514
  readonly setSelection: (rowIndex: number, colIndex: number, additive?: boolean) => void;
516
515
  readonly extendSelection: (rowIndex: number, colIndex: number) => void;
517
516
  readonly isCellInSelectedRange: (rowIndex: number, colIndex: number) => boolean;
@@ -539,6 +538,13 @@ export declare function createSvGridController<TFeatures extends TableFeatures =
539
538
  right: boolean;
540
539
  } | null;
541
540
  readonly findColumnById: (columnId: string) => any;
541
+ /**
542
+ * Whether this column may be resized by the user, from its
543
+ * `ColumnDef.resizable`. Defaults to true, so a column only opts out by
544
+ * saying so; the grid-wide `columnResize` prop gates all of them above
545
+ * this. Used by the resize action and by the column menu's Autosize item.
546
+ */
547
+ columnResizable(columnId: string): boolean;
542
548
  readonly readCellRaw: (rowIndex: number, columnId: string) => unknown;
543
549
  readonly writeCellRaw: (rowIndex: number, columnId: string, value: unknown) => void;
544
550
  readonly applyFillPattern: () => void;