@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.
- package/CHANGELOG.md +62 -0
- package/README.md +22 -0
- package/dist/GridMenus.svelte +17 -12
- package/dist/SvGrid.controller.svelte.d.ts +14 -8
- package/dist/SvGrid.controller.svelte.js +214 -74
- package/dist/SvGrid.css +1 -1
- package/dist/SvGrid.svelte +112 -57
- package/dist/SvGrid.types.d.ts +191 -1
- package/dist/ai.d.ts +28 -0
- package/dist/ai.js +6 -0
- package/dist/cdn/{GridMenus-B0F9iBrG.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-Cd0tearp.js → src-C9Hihx1W.js} +3497 -3487
- package/dist/cdn/{src-B1TdiyS8.js → src-D1lXwq1l.js} +8258 -8248
- package/dist/cdn/svgrid.js +10 -8
- package/dist/cdn/svgrid.svelte-external.js +10 -8
- package/dist/cdn/validate-_CDJzgIo.js +75 -0
- package/dist/cell-formatting.d.ts +2 -0
- package/dist/cell-formatting.js +2 -0
- package/dist/chart-export.d.ts +1 -0
- package/dist/chart.d.ts +31 -5
- package/dist/chart.js +9 -3
- 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 +216 -4
- package/dist/core.js +532 -119
- package/dist/createTree.svelte.d.ts +3 -0
- package/dist/createTree.svelte.js +1 -0
- package/dist/datetime/date-core.d.ts +2 -0
- package/dist/datetime/date-restrict.d.ts +1 -0
- package/dist/datetime/timezone.d.ts +1 -0
- package/dist/dock-manager-model.d.ts +3 -0
- package/dist/dock-manager-model.js +1 -0
- package/dist/dock-model.d.ts +6 -0
- package/dist/dock-model.js +3 -0
- package/dist/editor-contract.d.ts +1 -0
- 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/list-option.d.ts +1 -0
- package/dist/menus.js +1 -1
- package/dist/positioning.d.ts +2 -0
- package/dist/row-resize.d.ts +11 -0
- package/dist/row-resize.js +7 -1
- package/dist/scheduler-ical.d.ts +1 -0
- package/dist/scheduler-model.d.ts +1 -0
- package/dist/selection.js +9 -0
- package/dist/spreadsheet.d.ts +1 -1
- package/dist/spreadsheet.js +1 -1
- package/dist/summaries.js +22 -0
- package/dist/svgrid-wrapper.types.d.ts +5 -0
- package/dist/toast-store.svelte.d.ts +4 -0
- package/dist/validate.d.ts +50 -0
- package/dist/validate.js +187 -0
- package/package.json +4 -1
- package/src/GridMenus.svelte +17 -12
- package/src/SvGrid.controller.svelte.ts +223 -76
- package/src/SvGrid.css +1 -1
- package/src/SvGrid.svelte +112 -57
- package/src/SvGrid.types.ts +191 -1
- package/src/ai.ts +28 -0
- package/src/cell-formatting.ts +2 -0
- package/src/chart-export.ts +1 -0
- package/src/chart.ts +31 -5
- 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 +723 -119
- package/src/createTree.svelte.ts +3 -0
- package/src/datetime/date-core.ts +2 -0
- package/src/datetime/date-restrict.ts +1 -0
- package/src/datetime/timezone.ts +1 -0
- package/src/dock-manager-model.ts +3 -0
- package/src/dock-model.ts +6 -0
- package/src/editor-contract.ts +1 -0
- 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/list-option.ts +1 -0
- package/src/menus.ts +1 -1
- package/src/positioning.ts +2 -0
- 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/scheduler-ical.ts +1 -0
- package/src/scheduler-model.ts +1 -0
- package/src/selection.ts +9 -0
- package/src/spreadsheet.ts +1 -1
- package/src/summaries.ts +21 -0
- package/src/svgrid-wrapper.types.ts +5 -0
- package/src/svgrid.summaries.test.ts +217 -0
- package/src/toast-store.svelte.ts +4 -0
- package/src/validate.test.ts +207 -0
- package/src/validate.ts +269 -0
- 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 |
|
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>;
|
|
@@ -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;
|