@svgrid/grid 2.6.21 → 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.
- package/CHANGELOG.md +62 -0
- package/README.md +22 -0
- package/dist/GridMenus.svelte +17 -12
- package/dist/SvGrid.controller.svelte.d.ts +13 -8
- package/dist/SvGrid.controller.svelte.js +150 -72
- package/dist/SvGrid.css +1 -1
- package/dist/SvGrid.svelte +110 -56
- package/dist/SvGrid.types.d.ts +41 -1
- package/dist/cdn/{GridMenus-BfTAKn84.js → GridMenus-BuoBPqxx.js} +137 -132
- package/dist/cdn/GridMenus-n4llxoOI.js +494 -0
- package/dist/cdn/column-resize-DsfNXMom.js +102 -0
- package/dist/cdn/row-resize-BRcimkUT.js +95 -0
- package/dist/cdn/{src-BYq-qyrp.js → src-C9Hihx1W.js} +3456 -3459
- package/dist/cdn/{src-DBel9wRZ.js → src-D1lXwq1l.js} +8283 -8286
- package/dist/cdn/svgrid.js +10 -8
- package/dist/cdn/svgrid.svelte-external.js +10 -8
- package/dist/column-groups.js +1 -1
- package/dist/column-resize.d.ts +46 -0
- package/dist/column-resize.js +205 -0
- package/dist/columns.d.ts +0 -3
- package/dist/columns.js +0 -57
- package/dist/core.d.ts +19 -4
- package/dist/core.js +460 -119
- package/dist/filtering/excel-filters.js +28 -0
- package/dist/group-display.d.ts +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +6 -0
- package/dist/menus.js +1 -1
- package/dist/row-resize.d.ts +11 -0
- package/dist/row-resize.js +7 -1
- package/dist/selection.js +9 -0
- package/dist/spreadsheet.d.ts +1 -1
- package/dist/spreadsheet.js +1 -1
- package/package.json +1 -1
- package/src/GridMenus.svelte +17 -12
- package/src/SvGrid.controller.svelte.ts +155 -74
- package/src/SvGrid.css +1 -1
- package/src/SvGrid.svelte +110 -56
- package/src/SvGrid.types.ts +41 -1
- package/src/column-groups.ts +1 -1
- package/src/column-resize.test.ts +381 -0
- package/src/column-resize.ts +227 -0
- package/src/columns.test.ts +0 -103
- package/src/columns.ts +0 -58
- package/src/core.aggregate.test.ts +134 -0
- package/src/core.filter.test.ts +156 -0
- package/src/core.grouping.test.ts +146 -0
- package/src/core.row-shape.test.ts +119 -0
- package/src/core.rowmodel-cache.test.ts +121 -0
- package/src/core.sort.test.ts +293 -0
- package/src/core.ts +516 -119
- package/src/filtering/excel-filters.ts +30 -0
- package/src/filtering/normalize-fast-path.test.ts +104 -0
- package/src/group-display.ts +1 -1
- package/src/index.ts +12 -1
- package/src/menus.ts +1 -1
- package/src/resize-props.test.ts +361 -0
- package/src/row-resize.test.ts +31 -0
- package/src/row-resize.ts +21 -3
- package/src/selection.ts +9 -0
- package/src/spreadsheet.ts +1 -1
- package/dist/cdn/GridMenus-C3bJd7w8.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 |
|
package/dist/GridMenus.svelte
CHANGED
|
@@ -450,18 +450,23 @@
|
|
|
450
450
|
</button>
|
|
451
451
|
{/if}
|
|
452
452
|
<div class="sv-grid-menu-sep"></div>
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
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>;
|
|
@@ -432,6 +429,12 @@ export declare function createSvGridController<TFeatures extends TableFeatures =
|
|
|
432
429
|
/** A row's measured height, or undefined before it has been measured.
|
|
433
430
|
* The non-virtualized body reads this directly (it has no virtual item). */
|
|
434
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;
|
|
435
438
|
readonly virtualRowTotalSize: number;
|
|
436
439
|
readonly virtualRowStart: number;
|
|
437
440
|
readonly virtualRowEnd: number;
|
|
@@ -508,11 +511,6 @@ export declare function createSvGridController<TFeatures extends TableFeatures =
|
|
|
508
511
|
readonly getColumnBaseWidth: (columnId: string) => any;
|
|
509
512
|
readonly fittedColumnWidths: Record<string, number> | null;
|
|
510
513
|
readonly getColumnWidth: (columnId: string) => any;
|
|
511
|
-
resizePendingWidth: number;
|
|
512
|
-
resizeRaf: number | null;
|
|
513
|
-
readonly startColumnResize: (event: PointerEvent, columnId: string) => void;
|
|
514
|
-
readonly onColumnResizeMove: (event: PointerEvent) => void;
|
|
515
|
-
readonly endColumnResize: () => void;
|
|
516
514
|
readonly setSelection: (rowIndex: number, colIndex: number, additive?: boolean) => void;
|
|
517
515
|
readonly extendSelection: (rowIndex: number, colIndex: number) => void;
|
|
518
516
|
readonly isCellInSelectedRange: (rowIndex: number, colIndex: number) => boolean;
|
|
@@ -540,6 +538,13 @@ export declare function createSvGridController<TFeatures extends TableFeatures =
|
|
|
540
538
|
right: boolean;
|
|
541
539
|
} | null;
|
|
542
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;
|
|
543
548
|
readonly readCellRaw: (rowIndex: number, columnId: string) => unknown;
|
|
544
549
|
readonly writeCellRaw: (rowIndex: number, columnId: string, value: unknown) => void;
|
|
545
550
|
readonly applyFillPattern: () => void;
|