@svgrid/mcp 3.0.35 → 3.0.36
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/dist/data.js +11 -11
- package/dist/preview.d.ts +1 -1
- package/dist/preview.js +1 -1
- package/package.json +3 -3
- package/server.json +2 -2
package/dist/data.js
CHANGED
|
@@ -4388,7 +4388,7 @@ export const docs = [
|
|
|
4388
4388
|
"path": "docs/changelog.md",
|
|
4389
4389
|
"title": "Changelog",
|
|
4390
4390
|
"section": "Overview",
|
|
4391
|
-
"markdown": "# Changelog\n\nThe user-facing log of what shipped. Format follows\n[Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.1.0/);\nversioning follows [Semantic Versioning](https://semver.org/).\n\nEvery release has up to six sections:\n- **Added** - new features\n- **Changed** - existing functionality, behaviour changes\n- **Deprecated** - soon-to-be-removed features\n- **Removed** - features removed in this release\n- **Fixed** - bug fixes\n- **Security** - vulnerability patches (with CVE ids when applicable)\n\nPre-release entries live under `## [Unreleased]`. They graduate to a\ndated heading on publish via `pnpm changeset version` (see\n[.changeset/README.md](../.changeset/README.md)).\n\nFor machine-readable releases, fetch\n[`/changelog.json`](/changelog.json) - same content, parseable shape.\n\n## [Unreleased]\n\n### @svgrid/grid\n\n#### Added\n\n- **`chartSpecToTable`.** The rows and columns a spec amounts to, in the\n shape `SvGrid` takes: one row per category with a column per series (a\n grouped axis adds a Group column, a histogram From and To, candles their\n four prices, a box plot its five numbers), per point for a scatter, per\n link for a sankey or chord, per leaf for a tree map or sunburst with a\n column per level, per day for a calendar, one row for a gauge. Number\n columns carry the chart's format (a right-axis series its axis's) and a\n date axis is a date column. The gallery demos' Chart | Grid switch is this\n behind a sortable grid.\n\n- **The Chart panel charts the pivot in pivot mode.** With `pivot` and\n `charting` on one grid, the pivot bar carries the Chart toggle and the\n panel draws the pivot on screen: row groups as categories (nested rows a\n grouped axis), column groups as series, the measures' format on the axis,\n totals left out. The data pickers step aside with a note and the Type\n select keeps the shapes a pivot can take; Stacked, 100%, Horizontal, the\n Format tab, the builder, saved charts, export and Describe still apply. A\n click on a bar filters the innermost row dimension when the grid has a\n column for it, which re-runs the pivot. It used to chart the source rows by\n the source columns whatever was on screen. The mapping is\n `pivotResultToChartSpec` (with `pivotChartType`, `pivotFilterColumn`)\n in the lazy chart engine; enterprise's `pivotToChartSpec` is the same\n function. `bucketsToChartSpec` (server aggregates as a spec) moved there\n from the controller, which kept the base bundle at 86.4 KB.\n\n- **Scatter points select.** A click or Enter on a scatter or bubble point\n selects it the way a bar selects: the point's `label` (or its series) is\n the category, its y the value, and `selectable`, `bind:selected`,\n `onSelectionChange` and `onSelect` all apply. The dots had no click\n handler, so on a scatter chart those props did nothing.\n- **`ChartPointRef.index`.** A selected bar carries its category index\n beside its label, and two refs with an index match only on the same one.\n A grouped axis repeats its leaf labels (Q1 to Q4 under each year), so a\n click on the second Q2 used to select the first Q2 with it. A ref written\n without an index still matches by label.\n- **Data labels on a 100% chart read the share.** Under `stacked100` the\n axis is already a share whatever `valueFormat` says; the labels on the\n bars now say \"18%\" as well, rather than \"$18\", or \"1800%\" when the format\n was percent. A `dataLabels.formatter` still receives the raw value and the\n tooltip keeps it.\n- **A series on the right axis reads in that axis's format.** The tooltip,\n the screen-reader table, the live region and the data labels format a\n series with `axis: 'right'` through `y2Axis.format` or `formatter`, so a\n margin of 0.29 beside a revenue in dollars reads \"29%\" and not \"$0.29\".\n Without a format of its own the right axis is plain numbers, as its ticks\n are.\n- **The breadcrumb survives `toolbar={false}`.** A drilled sunburst, tree\n map or pie with the toolbar off still shows its breadcrumb in a strip of\n its own; it used to have no way back up.\n- **Chart axis model.** `xAxis`, `yAxis` and `y2Axis` on a spec take\n `min`, `max`, `nice`, `tickCount`, `tickInterval`, `format` or a\n `formatter`, `title`, `gridLines`, `labelRotation`, `reversed` and, for\n the x axis, `type: 'number'` for a numeric axis that spreads categories by\n value. `referenceBands` shade a range on either axis, `referenceLines` can\n be vertical, `title` / `subtitle` / `caption` frame the chart. Series\n gained `marker` shapes and per-point `markers` / `colors`, `strokeWidth`,\n `dash`, `opacity`, `gradient`, `step` lines, `connectNulls` and a\n `nullAs` policy; `dataLabels` takes a placement, a formatter and overlap\n hiding; the component takes a `tooltip` snippet, `tooltipFormat`,\n `tooltipMode: 'single'`, a `legend` side and a `legendItem` snippet, and\n `autosize`. `rowsToChartSpec` reduces with `min`, `max`, `median`,\n `first`, `last`, `countDistinct` and `pN` and buckets a date dimension by\n `day` / `week` / `month` / `quarter` / `year`.\n- **Decimation for long series.** `decimate: 'auto'` (the default) thins a\n line or area with more points than pixels through LTTB, which keeps the\n shape; `{ method: 'minmax' }` keeps every spike. Zoom is applied first, so\n zooming into 300 of 100,000 points shows all 300. `lttb`, `minMaxIndices`,\n `decimateSpec` and `pickCategories` are exported.\n- **Thirteen more chart types**: `histogram` (with `binValues` and\n `rowsToHistogramSpec`), `range-bar`, `range-area`, `lollipop`,\n `dumbbell`, `pareto` (`paretoSpec`), `stream` (`stackOffset: 'wiggle'` or\n `'silhouette'`), `sunburst`, `radial-bar`, `radial-column`,\n `nightingale`, `chord` and `bullet`; plus hollow and Heikin-Ashi candles\n (`candleStyle`) and pyramid / cone funnels (`funnelShape`). All of them are\n in the grid panel's picker, gated on what the current columns can feed.\n- **Zoom, pan and presets.** `zoomable` takes an object: `wheel` (`true` or\n `'modifier'` for Ctrl + wheel), `pinch`, `pan` (`'shift'`, `'mode'` or\n both) and `axis` (`'x'`, `'y'`, `'xy'`). The window is a bindable\n `zoom` prop of category indices with `zoomTo` / `resetZoom` on the\n component and an `onZoom` callback; `rangePresets` puts 1W / 1M / 3M / 6M /\n YTD / 1Y / All in the toolbar on a time axis.\n- **Synchronized charts.** Charts with the same `syncGroup` share their\n crosshair and zoom window, matched by label and then by date. The grid\n panel's `syncTabs` keeps one window across its chart tabs.\n- **Context menu, animation, drilldown, selection, keyboard.** `contextMenu`\n (built-in export / zoom / series items, your own `MenuItem`s, or a function\n of the clicked point; Shift + F10 opens it), `animate` (a data-update tween\n and `'fade'` / `'grow'` / `'wipe'` enter effects, off under reduced\n motion), `drillable` + `drillPath` for tree maps and sunbursts with a\n breadcrumb, `selectable` + `selected` + `onSelectionChange` for point\n selection with dimming, Up / Down stepping through series with a polite live\n region (`announce`).\n- **Financial toolkit.** `bollingerBands`, `rsi`, `macd`, `vwap`, `atr`,\n `stochastic`, `wma` and `obv`, NaN-padded like the moving averages;\n `'wma:N'`, `'bb:N:K'` (a shaded band) and `'vwap'` overlays;\n `indicatorPane` and `SvChartPanes`, which stacks indicator panes under a\n price chart with one x axis, one gutter and one crosshair; `rowsToOhlcSpec`\n and `resampleOhlc` (daily bars to weeks / months); `lastPriceLine`;\n annotation `shape` (`'flag'`, `'pin'`, `'square'`) with a tooltip\n `text`; `volumes` on a series.\n- **Drawing tools.** `drawable` puts trend line, horizontal ray, Fibonacci\n retracement, rectangle, arrow and note tools in the toolbar; the drawings\n are data points (`spec.drawings`, `onDrawingsChange`) so they survive a\n zoom, a resize or new data. A selected drawing has draggable handles and\n Delete removes it.\n- **PDF and print** with no PDF library: `chartToPdfBlob`, `downloadChartPdf`\n (a one-page A4 or Letter PDF with the chart as a JPEG and the titles as\n text) and `printChart`, in the toolbar, the context menu and the panel's\n export menu.\n- **Chart builder in the grid panel.** The Build button opens a modal with a\n type gallery (a live thumbnail per type), the data pickers and a Format tab\n (titles, legend and label placement, axis title / min / max / format / grid\n lines, per-series colour / type / axis / marker / width). The format is\n `ChartFormatState` on the chart tab, applied by `applyChartFormat` to every\n derived spec, saved with the view and reachable through\n `configureChart({ format })`. A link toggle unlinks a chart from the grid\n (`configureChart({ frozen: true })`) so it keeps its data while you filter.\n `charting.onChartCreated` / `onChartChanged` report the panel's lifecycle;\n `charting` also takes `zoom`, `rangePresets`, `syncGroup`, `syncTabs`,\n `contextMenu` and `animate`.\n- **Candlesticks from the grid panel.** Pick Candlestick or OHLC bars and the\n panel finds the Date, Open, High, Low, Close and Volume columns by name;\n Indicators chips add panes and overlays; `configureChart({ ohlc,\n indicators })` and the AI chart plan reach the same thing.\n- **A scatter series' `overlay` is a regression of y on x.** Until now the\n scatter layout ignored `overlay` (the fits ran on the index, which a\n scatter has no use for). The regressions (`linearFit`, `polynomialFit`,\n `exponentialFit`, `logarithmicFit`, `powerFit`) take an optional `xs`\n and return `predict(x)`; `regressionFit(values, overlay, xs)` names one by\n its overlay string; a scatter series with `overlay` gets the curve drawn\n across the plot (sampled evenly in log space on a log axis) and its\n equation and R-squared in the point tooltip.\n- **Chart gallery: fourteen full-size demos, one per family, and a docs page\n for them.** Bars, lines, areas, pie / donut / sunburst, scatter and bubble,\n combination, histogram and box plot, heat map and calendar, radar and\n radial, tree map and sunburst, sankey and chord, waterfall / funnel /\n pareto, gauges and bullets, and an annotated chart (demos 438 to 451),\n each with its own data and the switches that family needs, embedded on\n `help/charts/gallery` and the type pages.\n- **Grid chart panel: a deeper Format tab, one set of pickers, a\n localized panel and saved charts.** The builder's Format tab adds series\n labels, the crosshair's axis pills, a compact rule below a width\n (`compactBelow`, through `CHART_RESPONSIVE_PRESETS.compact`), a stack\n group per bar or area series and the chart's font, size, background and\n text colour (`ChartFormatState.seriesLabels` / `crosshairLabels` /\n `compactBelow` / `series[].stack` / `style`). The panel's pickers and the\n builder's Data tab are one component (`SvGridChartPickers`), so the two\n cannot disagree about what a type needs. Every string the panel and the\n builder show is a `chart*` key on `localization.text`\n (`GridChartPanelMessages`, loaded with the panel; `GridMessages` is now\n the chrome map and the panel map together). `api.saveChart(name)`,\n `applySavedChart`, `removeSavedChart`, `getSavedCharts` and\n `configureChart({ saved })` keep a tab's whole configuration under a name;\n the panel has a popover for them and `getState()` carries `savedCharts`\n when there are any.\n- **Chart diagnostics, a plain-language description, live feeds and a JSON\n schema.** `validateChartSpec` returns what is off about a spec (unknown\n keys with the nearest name, an unknown type, a series short of the\n categories, a log axis at zero, an overlay the engine does not read, an\n anchor naming no category, and more); `SvChart` logs the findings once per\n spec in development, `aiChart` attaches the errors to its plan, and the\n MCP server's `svgrid_check_code` applies the rules to a static spec\n literal with a rename for a misspelt key. `chartSummary` reads a chart in\n a sentence (trend, extremes, shares, correlation, last close) and\n `SvChart` hands it to assistive technology as `aria-description` and the\n table caption (`describe`), the context menu and the panel copy it, and\n `aiExplainChart` grounds an Explain button on it. `appendPoints` builds\n the next spec of a feed with every per-category array kept in step and a\n rolling window, and `live` on the chart skips the tween and enter effect.\n `docs/schemas/chart-spec.json` is generated from the types, served at\n svgrid.com/schemas and by `svgrid_get`, and a test keeps it equal to the\n validator's lists.\n- **Series and interaction depth.** Areas join `stack` groups like bars\n (`stacked100` and `stackOffset` run per pile); a numeric x axis takes\n `scale: 'log'` (even decades, 2 / 5 minors, non-positive categories\n dropped, decimation in log positions); regression overlays `poly:N`,\n `exp`, `log` and `power` next to `linear`, each carrying `r2` and\n `equation` on the overlay line and read in the tooltip, with\n `linearFit` / `polynomialFit` / `exponentialFit` / `logarithmicFit` /\n `powerFit` / `rSquared` / `computeOverlayFit` / `overlayName` exported\n and `charting.trend` accepting the new names; hovering a mark dims the\n other series (`hoverHighlight`, on by default, snapping within 18px) and\n `onHover` reports the point once per change; `tooltipPosition` parks the\n tooltip in a plot corner and `tooltipSticky` pins it on a click; data\n labels take `rotation` and `connector` (pushed clear of a collision with\n a leader line); `spec.style` sets a chart's font, size, background and\n text / grid colours over the tokens (`chartStyleVars`), honoured by the\n exports.\n- **Accessibility pass on the chart.** Every non-cartesian family (pie,\n sunburst and the radial charts, heat map, calendar, tree map, funnel,\n sankey nodes and links, radar, scatter) is one Tab stop with a roving\n focus: arrows walk the marks (a heat map by row and column, a calendar by\n day and week), Home / End / PageUp / PageDown jump, the focused mark\n raises its tooltip, Enter / Space select or drill, and every mark is named\n and has a focus ring. Zoom from the keyboard: `+` / `-` / `0` on a\n focused category and Shift + arrows to pan, and the brush is a `slider`\n (arrows pan and resize, Home / End, `0`). The toolbar is a `toolbar`, the\n tooltip a `tooltip`, decorative icons are hidden from the tree. Forced\n colors (Windows High Contrast) keep the data colours and repaint the\n chrome with the system palette. `localeText` on `SvChart` (and\n `charting.localeText` for the grid panel) translates every string the\n chart renders itself, with `ChartMessages`, `defaultChartMessages`,\n `resolveChartMessages` and `chartMessage` exported. A new\n `tests/e2e/chart-a11y.spec.ts` runs axe-core against the rendered chart\n on three demos and drives the keyboard model in a real browser.\n- **Stack groups, series labels, responsive rules, pie callouts.** `stack`\n on a bar series names the pile it joins, so plan and actual stack side by\n side in each category and the axis fits the tallest stack; `seriesLabels`\n names each line at its last point in a reserved gutter, pushed apart where\n lines end together; `responsive` patches the spec by the rendered size\n (axes merge one level deep, a rule's `legend` moves or hides the\n component's legend; `resolveResponsive` and `matchResponsiveRules` are\n exported); `dataLabels: { placement: 'outside' }` on a pie draws callout\n labels with leaders instead of percentages, and a spec can carry its own\n `dataLabels`; `visible: false` starts a series hidden with its legend chip\n dimmed; the crosshair reads off the axes with a category pill and a value\n pill (`crosshairLabels={false}` turns them off).\n- **`moveCells` - drag a selected range to move or copy it.** Grab a selected\n range by its border and drop it somewhere else. Move by default, copy with\n Ctrl / Cmd, and the modifier is read at DROP time so it can be pressed or\n released mid-drag. On whenever cell selection is on; `moveCells={false}`\n opts out. A drop is refused outright - nothing changes - when it would land\n off-grid or when any source or destination cell is read-only, rather than\n moving the part that fits and silently dropping the rest.\n- **`selectionBar` - a floating bar over the grid while rows are selected**,\n showing the count and the actions that apply to the whole selection. `true`\n gives the count and a Clear button; an array is shorthand for `{ actions }`;\n the object form also sets `position` (`'bottom'` default, or `'top'`),\n `maxVisible` and `hideClear`. The prop and its types are free; the bar\n itself is an Enterprise renderer, and without it the grid shows a short upsell\n in its place, the same way the scheduler and board views do.\n- **Edge auto-scroll for every drag that extends a rectangle** - the fill\n handle, the range move, and plain drag-select. All three were previously\n capped at whatever was already on screen when the drag began, which on a grid\n built for 100k rows meant the gesture mostly did not work. One shared rAF loop\n scrolls the container when the pointer is inside a 40px edge band, on a linear\n ramp to 20px/frame, in both axes. It keeps scrolling with the pointer parked\n still, which is the whole point of holding at an edge.\n- **Row and column resizing, both opt-in** (`rowResize`, `columnResize`).\n `columnResize` gives every header a drag handle: drag the edge, double-click\n it to size the column to its content, or focus it and use Left/Right (Shift\n for a 1px step). `rowResize` does the same vertically and brings the\n row-header column with it, since that is where the grip belongs; the grid\n stores the heights itself, so neither needs a function-valued `rowHeight`.\n Both load their code on demand, so a grid that leaves them off downloads\n neither.\n- **`ColumnDef.resizable`** - per-column opt-out, consulted only when the grid\n has `columnResize` on. `resizable: false` removes that column's handle\n entirely, so the drag, the arrow keys and double-click-to-autosize all go with\n it, and the column menu drops its Autosize item. For the columns whose width\n is part of the layout: a row-number gutter, a checkbox column, a fixed icon\n column. Programmatic sizing (`api.setColumnWidth`, `api.autosizeColumn`,\n `fitColumns`) still applies.\n- **`SvGridViewState` is exported.** It is the return type of the public\n `api.getState()`, so writing a typed \"named views\" feature previously meant\n either re-declaring the shape or reaching into an internal path.\n- **Form layer depth in `SvForm` / `createForm`.** Schema-driven forms gained:\n conditional / dependent fields (`visible` and `disabled` accept a\n `(values) => boolean` predicate; hidden fields drop out of validation and the\n submit payload), grouped **sections** and a multi-step **wizard** (`stepper`,\n with per-step validation gating), repeatable **field arrays**\n (`type: 'array'` with `itemFields`, plus `addItem` / `removeItem` / `moveItem`),\n **async validation** (debounced, stale-response-guarded, per-field\n `validating` state), **dirty tracking + `reset()`**, and **submit states**\n (`isSubmitting`, an async `onSubmit`, and `setErrors()` for server-side field\n errors). New demos: dynamic form, wizard, and field array.\n- **Public headless cores for the menu / select family** (`createMenu`,\n `createPopoverSelect`, shared `list-nav`), so the popup pickers can be driven\n headlessly and composed into custom UI.\n- **`color` on `ListOption`** - render a small color swatch before the label in\n `SvListBox` and `SvDropDownList`.\n- **`block` on `SvDateTimePicker`** - stretch the field to fill its container\n (100% width), so it fills a grid cell when used as an editor.\n- **`onClosed` on `SvDrawer`** - fires after the exit animation ends and the\n drawer leaves the DOM.\n- **`loading` on `SvField`**, and **`locked`** on `SvDockLayout` /\n `SvDockManager`.\n- **`summary` on `<SvGrid>`** - shortcut alias for `enableRowSummaries`,\n which turns on the footer row that aggregates every filtered row. It wins\n when both are set, the same precedence `selectable` has over\n `enableCellSelection`.\n- **`summary` on a column** - choose that column's footer aggregate\n (`'sum'`, `'avg'`, `'min'`, `'max'`, `'count'`, `'countDistinct'`,\n `'extent'`, `'first'`, or a custom function), or `false` to leave the cell\n blank. Without it a column keeps the old default: sum a numeric column,\n `Count: N` otherwise.\n- **Development-time configuration checks.** The grid used to fail silently on\n the most common mistakes - a misspelled `field` rendered a column of blank\n cells and printed nothing. It now warns once per problem, in dev builds only:\n\n - a column `field`, `groupBy` entry, `treeData.parentField` / `idField` or\n `treeData.column` that does not exist (with a \"did you mean\" for near misses),\n - two columns resolving to the same id,\n - `pageSize` set when pagination was never turned on,\n - a column marked `sortable` while sorting is not enabled,\n - `initialColumnPinning` while column virtualization is on, which silently\n prevents the columns from sticking,\n - `externalPagination` without `rowCount`, `externalSort` without\n `onSortingChange`, and `externalFilter` without `onFiltersChange`.\n\n The checks live in a lazy chunk behind a dev-only branch, so a production\n build never loads them and the base bundle is unchanged.\n\n#### Changed\n\n- **BREAKING: column resizing is now off by default.** Every column used to have\n a drag handle unconditionally - there was no prop, no per-column option and no\n way to turn it off, so a `width` you set was only ever a starting value a user\n could drag away. Set `columnResize` to get the handles back; the 241 demos in\n this repo that want them now say so. Sorting and filtering have always been\n opt-in behind `sortable` / `filterable`, and resizing was the odd one out.\n- **BREAKING: the footer summary row is now off by default.**\n `enableRowSummaries` used to default to `true`, so a plain\n `<SvGrid {data} {columns} />` grew an aggregate footer nobody asked for and\n every caller that did not want one had to opt out - 375 call sites in this\n repo passed `enableRowSummaries={false}` against 6 that opted in, and the\n API reference already documented the default as `false`. If you were\n relying on the old behaviour, add `summary` (or `enableRowSummaries`).\n- **Ember is now the default theme preset** (`defaultThemePreset` in\n `@svgrid/grid/themes`). It is what the demo gallery and svgrid.com open on, so\n a scaffolded or Studio-generated app now looks like the demos unless you pick\n a preset. Previously the default was Tailwind.\n- **Popup editors keep themselves on screen.** `SvAutoComplete`, `SvComboBox`,\n `SvDropDownList` and the date pickers now measure the space to the viewport\n edge: the panel flips up when there is not enough room below and clamps its\n `max-height` to the available height, so a picker opened near the bottom of the\n window no longer spills off screen.\n- **Dock manager pop-out to a new window is now off by default**\n (`allowPopout={false}`); opt in explicitly. Added a dedicated pop-out demo.\n\n#### Fixed\n\n- **Group footer and grand-total rows drew checkboxes.** With\n `showRowSelection`, each totals row had a row-selection checkbox, and\n ticking it selected the synthetic row. A checkbox column with no `aggregate`\n showed a checkbox too, holding a leaf's value carried over from the group\n row. Totals rows keep the selection cell for alignment but leave it empty,\n and a boolean column without an aggregate renders nothing there.\n- **Toggling a checkbox cell did not fire `onCellValueChange`.** A click or\n Space on a checkbox cell wrote the row and stopped, so an app that saves\n edits from `onCellValueChange` lost every checkbox change, and Ctrl+Z could\n not take one back. The toggle now takes the inline editor's commit path:\n one undo step, then `onCellValueChange` with the old and new value and the\n row's position in `data`.\n\n- **Arrow keys lagged whenever the active cell had to scroll.** On the\n 10,000 x 53 large-dataset demo one ArrowDown at the bottom of the viewport\n cost about 37 ms of main-thread work and painted over two frames; it is now\n about 8 ms and paints once. Five things added up. Every rendered row was\n measured with `getBoundingClientRect` on each scroll tick, on a grid that\n had no `autoRowHeight` to use the number for, which forced a table layout\n per row (about 30 per key press). The scroll geometry the custom scrollbar\n reads was pulled inside a derived at the start of the flush, forcing a\n second full table layout that the row writes then invalidated. The\n virtualizer keyed rows by their position in the window, so a one-row\n scroll rewrote all ~30 rows x every rendered column; rows are now keyed\n `index mod windowLength`, so the rows that stay keep their `<tr>` untouched\n and the one that entered is moved with a single `insertBefore`. The row\n window only updated after the browser's `scroll` event and a\n `requestAnimationFrame`, a frame after the key press; keyboard navigation\n now syncs the virtualizer inline, since it knows where it scrolled. And\n each cell carried three selection-dependent deriveds plus the fill handle's\n `{#if}`, re-marked on every move; they are one `{@const}` now, `null` for\n a plain cell. Also closed on the way: `key in editedCellValues` on a deep\n `$state` proxy created a signal per rendered cell that never went away, and\n the header checkbox's tri-state walked every row on each arrow key.\n\n- **A heat map drew a series legend in colours its cells never use.** The\n ramp on the right is its key; the row of palette chips under it (and a\n calendar's) is gone.\n\n- **A time axis put its ticks on nothing in particular.** `xType: 'time'`\n stepped a fixed 30 or 365 days from the Unix epoch, so a tick labelled\n \"2025\" stood weeks from New Year, a \"Jun 25\" tick sat mid-June, and a\n thirty-month axis carried two labels on a plot with room for eight. Ticks\n now land on calendar boundaries in UTC (days, Mondays, the first of a\n month, quarter or year, or every few years) at about one label per 90px,\n and each label is sized to the gap between ticks rather than the axis span,\n so a quarterly axis no longer reads \"2024, 2024, 2024, 2025\". The labels\n are read in UTC too: a local-time read of a 'YYYY-MM-DD' category in the\n Americas labelled every tick with the day before.\n- **The tooltip echoed the ISO date.** On a time or ordinal-time axis the\n tooltip title, the crosshair pill and the live region wrote \"2025-06-01\";\n they write \"Jun 2025\" when every category is the first of a month, \"2025\"\n when every one is New Year, and \"Jun 1, 2025\" otherwise, through\n `xAxis.formatter` when one is set. A calendar cell names its day the same\n way. The category in `onHover`, `onSelect` and `selected` is unchanged.\n- **The screen-reader table and the CSV read \"NaN\".** A NaN gap (the way a\n forecast series marks the months before it starts) wrote the word \"NaN\"\n into the hidden data table and the CSV export, and a `null` fell back to\n 0, which told a screen reader the outage month had no sign-ups. Both are\n empty cells now.\n- **\"Double-click again to clear\" left a legend chip isolated and hidden.**\n A double-click arrives as click, click, dblclick: with a chip isolated the\n first click cleared the isolation, the second hid the chip and the dblclick\n isolated it again. A click that clears an isolation is remembered for a\n moment, and the double-click that follows it on the same chip clears; on\n another chip it moves the isolation there.\n- **A radar ignored `yAxis.min` / `max`.** The rim was always the data\n maximum, so scores out of 100 filled the dial to whatever the best score\n was and two radars could not be compared. The rim honours a pinned axis,\n a value past it sits on it, and a pinned minimum is the centre.\n- **A pie sized its gutters by the widest label on either side.** Small\n slices with long names on the left kept the same room on the right for a\n \"Chrome 62%\", and the pie drew at half the radius the pane had. The\n gutters are per side, the pie sits centred in what they leave, the floor\n radius is a quarter of the short side, and each side truncates to its own\n room.\n- **A waterfall tooltip read \"$0\" on a total.** A total bar holds 0 in the\n data and its running sum in the geometry; the tooltip and the\n screen-reader table now read the drawn value. Its x labels also tilt by\n the same fit rule as a bar chart's, with the angle the renderer needs:\n they were flagged as rotated with no angle and drew truncated instead.\n- **Histogram edges read \"1.3k, 1.3k\".** Bin edges are written at the\n precision their width needs (whole numbers with separators for a 44ms\n bin, two decimals for a 0.2 bin) rather than in the compact tick form that\n gave two neighbouring edges one label.\n- **A heat map ignored `dataLabels` in the spec.** The cell label read the\n component prop alone, so `dataLabels: { show: true }` in the spec drew\n nothing. Colour legends on heat maps and calendars also round their steps\n to the precision the range earns (\"20, 94, 167\", not \"20, 93.5, 167\").\n- **The range area read as three lines.** Its band filled at the wash an\n area under a line gets, with both edges at full stroke. The band is the\n mark: it fills at 0.35 and its edges are thin.\n- **Annotate mode pinned a tooltip instead of a note** when `tooltipSticky`\n was on too; the annotate click now owns the click.\n- **Drawings on a time axis warned on every point.** The drawing tools write\n a timestamp for every pointer position, and the spec validator matched\n those against the category list. It skips the check on a time or number\n axis, as it already did for reference lines and annotations.\n- **The panel's export menu and saved-charts dialog ignored Escape.** Both\n close on Escape and hand focus back to the button that opened them.\n- **A gauge wrote \"99.2 %\".** A symbol unit (%, degrees) hugs the number; a\n word unit (\"ms\") keeps its space.\n- **The right axis title was clipped.** Its glyphs point outward under the\n rotation and ran past the edge of the SVG.\n- **Pie callout labels ran off the chart in a narrow pane.** The pie kept a\n fixed 34px margin for its outside labels whatever their length, so a\n \"Samsung Internet 3%\" in a 380px pane was clipped to \"%\" and \"Cl\". The\n radius now makes room for the widest label on each side, keeps at least a\n fifth of the short side, and hands the renderer a per-side character\n budget to truncate to when even that is not enough.\n- **The brush strip inherited the chart's titles, axis labels and marks.**\n A title and subtitle took 45 of the strip's 88 pixels and the x labels\n another 30, leaving the mini-map a five-pixel smear under an empty band.\n The brush spec now mutes titles, axis titles and labels, reference lines\n and bands, annotations, drawings, series labels and data labels.\n- **A category chart tilted its x labels by count, not by fit.** More than\n eight categories, or any label over nine characters, tilted every label\n to -40 degrees even on a thousand-pixel chart with room to spare. `auto`\n now tilts only when the widest label does not fit its slot.\n- **A heat map wrote every column label whatever the cell width**, so\n twenty-four hours at 33px a cell read \"00:0001:0002:00\". The column\n labels thin out the way a bar chart's do.\n- **A calendar labelled the padding days of the next year.** The grid pads\n the range to a full week, and a December ending on a Thursday picked up a\n \"Jan\" tick for the two padding days. Month labels stay inside the range.\n- **A waterfall could not open on a value.** A total bar always read the\n running sum, so \"Revenue 4300\" marked as a total drew as zero and every\n bar after it hung below the axis. A total with a value now sets the sum;\n a total with 0 still reads it.\n- **`rowsToChartSpec` with `topN` duplicated a category called \"Other\".**\n A real \"Other\" in the data came out beside the folded one, two categories\n with one name, which the renderer threw on as a duplicate key. The tail\n now folds into that category.\n- **A pin annotation showed \"O…\" and nothing else.** The head held\n `truncate(label, 2)`, an initial plus an ellipsis, and no label was written\n beside it. The head carries the initial and the label sits beside the pin\n like a dot's does.\n- **A chart's hidden data table took up to 17,000px of scrollable space.**\n The screen-reader table (one row per category, capped at 1,000) carried the\n visually-hidden recipe itself, but on a `<table>` `height: 1px` and\n `width: 1px` are minimums and `overflow: hidden` does not clip, so the\n table was invisible and as tall as its rows, and every scroll container\n around a chart (the demo pages first of all) scrolled on through that much\n empty space. The clip now sits on a wrapping div; the table keeps its id,\n which the svg still points at.\n- **Two ARIA faults the axe audit found.** The chart's SVG was\n `role=\"img\"`, whose children are presentational to assistive technology,\n so the focusable marks inside it (category zones, slices, a drawing) were\n a nested-interactive violation and could be skipped by a screen reader; an\n interactive chart is a labelled `group` now (a thumbnail with\n `interactive={false}` stays an image). Sankey links carried an\n `aria-label` with no role, which ARIA prohibits; they are named images in\n the focus order.\n- **A tree map ignored `spec.tree`.** The field is documented as an alias of\n `treemap` and the sunburst honoured it; the tree map read only `treemap`.\n- **An autosized chart with a side legend grew without end in a plain block.**\n `legend=\"left\"` / `\"right\"` lays the chart out as a three-row grid, and a\n grid puts a gap between every track whether or not the toolbar and brush\n rows have anything in them. The autosize maths counted a gap only for the\n chrome that existed, so in a parent that does not pin the height, the host\n measured 8 or 16px taller than the plot it was told to fit, the plot grew\n into it, and the next measurement grew again - a few hundred pixels a\n second until the page ran out. Hiding the legend at runtime had the\n opposite fault: a dimension binding keeps its last value once its element\n is gone, so the vanished legend went on being subtracted and the plot\n ratcheted down to its 120px floor. Both fixed; a fixed-height parent hid\n them, which is why the docs' sizing example never showed either.\n- **`block` did nothing on eight editors.** The prop is declared once in\n `SvEditorProps`, and its own doc comment describes the symptom: \"in a form\n grid a row of inputs each stopping at a different width reads as broken\".\n `SvDropDownList`, `SvComboBox`, `SvMultiSelect`, `SvTreeSelect`,\n `SvGridSelect`, `SvAutoComplete`, `SvTextArea` and `SvDateRangeInput`\n accepted it by type and ignored it, so they stopped at their own 200-280px\n default while the text inputs beside them filled the row. `<SvForm>` was\n also not passing it to seven of the controls it mounts - both halves had to be\n fixed for a form row to line up.\n- **`cellDataType: 'dateString'` stored a timestamp after an edit.**\n Committing ran through the shared date coercion (`new Date(v).toISOString()`),\n so picking Christmas stored `2026-12-25T01:00:00.000Z` and the cell showed a\n timestamp beside neighbours showing plain dates - on a calendar day that\n depended on the user's timezone, since the conversion went through UTC. The\n picked date is now kept as the picked date.\n- **The filter row mounted a native date input** while the cell editor mounted\n the grid's own picker, so one column looked like two different products\n depending on where you touched it. Both use the grid's picker now.\n- **`editorType: 'number'` dropped the character you were typing.** The\n editor mounted `<input type=\"number\">`, whose value sanitization reports\n `\"\"` for anything not already a valid float - so `12.` read as empty, and\n typing `12.5` produced `125`. Same for a lone `-` and `1e`. It is a\n text input with `inputmode=\"decimal\"` and a digit filter now; the trade is\n the native spinner.\n- **Cell context menus and the comment editor floated at stale coordinates\n after a scroll.** Both are positioned at raw cursor coordinates and rendered\n `position: fixed`, but neither was in the scroll effect's gate, so they hung\n over unrelated cells. The comment editor SAVES on scroll rather than\n discarding - backdrop-click and Escape are the gestures that mean \"throw this\n away\"; a scroll is not, and must not destroy typed text.\n- **The footer summary row server-rendered as empty cells.** The totals were\n assigned from an `$effect`, and effects never run during SSR - so the server\n emitted a summary row that took up space and drew its border but held no\n numbers. They appeared only after hydration (a visible pop-in), and never at\n all for a reader with JavaScript off. A grid under the aggregation cell\n limit now derives its totals synchronously, so they ship with the HTML; a\n very large grid keeps the rAF-deferred effect so it still paints before it\n totals. `pnpm ssr:check` asserts the real aggregate now.\n- **The grid painted one unmeasured frame on every mount.** `hasMeasured`\n gates the custom scrollbars, the 16px scrollbar gutter on a trailing\n right-aligned column and the top pager (which carries a `border-top`), but\n it only flipped inside the `ResizeObserver` callback - and that callback is\n deliberately deferred by one `requestAnimationFrame`, so the browser was\n guaranteed to paint a frame with those missing and correct it on the next.\n On a first load that was the \"flashing scrollbar\"; in an app that recreates\n the grid per navigation (a `{#key}` around it, or a route that remounts) it\n showed up as the grid flashing on every sort / filter / page change, with a\n stray border line. The container is now measured synchronously in the mount\n effect - before the first paint - and the observer still handles later\n resizes. Covered by an e2e regression test, since jsdom has no layout to\n miss a paint with.\n- **Pager page-size trigger rendered as a stock button until first click.** The\n closed trigger is a placeholder until the lazy dropdown chunk loads, but its\n box styling only existed in that chunk's scoped CSS, so server-rendered and\n freshly-mounted pagers showed a UA-bordered, left-hugging `<button>` inside the\n bordered box. The placeholder now gets the same rules from `SvGrid.css`.\n- **Virtualized lists no longer flash blank on a fast scrollbar-thumb drag.**\n A fast drag can move the viewport into the windowed list's off-screen padding\n faster than JS can re-render the rows there; the padding now paints faint row\n skeletons, so `SvListBox` / `SvDropDownList` stay visually filled at any scroll\n speed. Also removed an app-wide `flushSync` from the scroll handler that could\n stall the very first scroll.\n- **Dock manager auto-hide now shows every tab of a multi-tab leaf.** Sending a\n leaf with two or more tabs to auto-hide created a single edge tab; it now\n creates one edge tab per pane.\n- **Ticking one row in a large grid took over a second.** Once any row was\n selected, every change walked all rows through the lazy row list to work out\n the header checkbox. At 1,000,000 rows (jsdom) one tick went from 1.3-1.8 s\n to 4-36 ms, and select-all from 4.2 s to 0.4 s.\n- **Tab never left the grid.** Every Tab was consumed and the cursor clamped\n at the last cell, so no key moved focus out (WCAG 2.1.2). Tab on the last\n cell and Shift+Tab on the first now leave the grid.\n- **No focus indicator when the grid is reached by Tab, or under forced\n colors.** The active-cell ring stayed hidden until a click, and Windows High\n Contrast removed it (it is a box-shadow). It now shows on keyboard focus, and\n forced colors get a `Highlight` outline.\n- **The cell editor had no accessible name.** The text, number and multi-line\n editors are now labelled with their column's header.\n\n#### Security\n\n- **CSV / formula injection in exports.** `exportCsv`, `exportTsv` and the\n chart's CSV download wrote text such as `=HYPERLINK(...)` as is, which a\n spreadsheet runs as a formula. Text starting with `=`, `+`, `-`, `@`, a tab\n or a carriage return is now written with a leading `'`; numbers and signed\n numbers in text form (`-12.50`) are unchanged. `escapeFormulas: false` turns\n it off; `copyToClipboard` takes `escapeFormulas: true` to turn it on.\n\n### @svgrid/enterprise\n\n#### Added\n\n- **PDF: `pdf.fit`, `pdf.repeatColumns` and `pdf.font`.** `fit` chooses what\n happens when the columns do not fit across the page (shrink the text, split\n the columns over pages, or both, the default); `repeatColumns` says how many\n leading columns repeat on each page of a split. `font` prints with a font\n you supply, base64 or a URL, for scripts Roboto lacks (Chinese, Japanese,\n Korean, Arabic, Hebrew, Thai, Indic, emoji); without one the export now\n warns when it sees them.\n- **PDF export in a worker: `pdf.worker` and `@svgrid/enterprise/pdf-worker`.**\n pdfmake renders in one synchronous run, about a second per thousand rows on\n a desktop machine, and on the page that froze the tab. With\n `pdf.worker: () => new Worker(...)` and a worker script that calls\n `servePdfWorker()`, the document goes to the worker as data and the page\n stays responsive: a 5,000-row export took about two seconds while the page\n kept drawing at 60 fps, with progress through `onProgress` and an abort that\n terminates the worker. A PDF of more than 2,000 rows rendered on the page now\n logs a warning that points here. `buildPdfDocData` and `hydratePdfDoc` split\n the document builder for this; `buildPdfDocDefinition` works as before.\n- **Grouped PDFs total like the grid.** Subtotals use each column's\n `aggregate` (avg, min, max, count, countDistinct, a function) instead of\n always summing, a total row closes the table (`pdf.grandTotal: false` to\n leave it out), and group names are formatted as on screen. `getColumns()` in\n `@svgrid/grid` now reports each column's `aggregate` for this.\n- **PDF: `pdf.labels`, `pdf.watermark`, `pdf.author`.** Replace the footer's\n page and date text and the subtotal and total labels; print a faint\n watermark across every page; and fill the document properties, so a viewer\n shows the report's title rather than the file name.\n- **PDF column widths follow the text.** Each column gets at least its\n longest word and the rest of the page goes to the columns with the most to\n say, instead of equal widths: a 60-row, 8-column order list went from three\n pages to two.\n- **The pivot designer's Chart view grew up.** It offers every shape a pivot\n can take (bar, line, area, lollipop, pareto, the three radial forms, pie,\n funnel, waterfall, radar, heat map, stream) in the panel's groups, with\n Stacked, 100% and Horizontal where the type uses them, the chart's own\n toolbar (PNG, SVG, PDF, print, copy), its spoken summary and a legend\n under the plot. It had six types and a Stacked box.\n\n- **`pivotToChartSpec` carries the measure's format and name.** Pass the\n value chip's `format` and the chart reads \"$470k\" on the axis and\n \"$469,662\" in the tooltip, in the measure's currency and locale; percentage\n points get a formatter that appends the sign. With one measure the value\n axis is named after it (`yAxisTitle` overrides, `null` for none). The\n designer's Chart view passes the format when its measures agree, and\n formats plainly when a layout mixes a currency and a count.\n\n- **PDF export with charts and a KPI strip.** `pdf.charts` prints charts with\n the table: a rendered chart's element is rasterised on export through the\n grid chart's PNG path, or pass an image data URL; each takes a title, a\n caption and a width, and goes above the table or below it\n (`chartsPosition`). `pdf.kpis` prints a strip of headline numbers, each a\n label over a big value with an optional coloured delta line. Roadmap\n discussion 36.\n- **The selection bar renderer, plus bulk edit.** `enableSelectionBar()`\n (or `installEnterprise`) registers the renderer behind the free\n `selectionBar` prop. The bar carries a count chip, your actions, an overflow\n menu past `maxVisible`, and Clear; at phone width it collapses to icons and\n keeps an accessible name on each. **Edit fields** opens a drawer that edits\n one or many rows at once: a field the selection disagrees on opens blank and\n stays per-row unless you touch it, so applying to 40 rows does not flatten the\n values you did not mean to change.\n- **Scheduler booking rules and conflict detection.** New model helpers\n (`overlapCount` for per-resource overlaps, `overlapsBands` for working-hours\n bands) back resource double-booking checks and business-hours enforcement.\n New demos: booking rules, financial trading hours, and HR shift coverage.\n\n#### Fixed\n\n- **A wide grid lost columns in the PDF.** pdfmake sizes a column no narrower\n than its longest word, so a 22-column report ran off the right edge and only\n 15 columns printed, without a warning. The columns are now fitted to the\n page (see `pdf.fit` above).\n- **A row taller than a page was missing from the PDF.** Rows are kept whole\n on a page, and pdfmake drops a row that cannot fit on any page. Such a row\n now breaks across pages.\n- **Conditional-format icons printed as empty boxes in the PDF.** The arrow,\n triangle and traffic-light glyphs are not in Roboto; they are drawn as\n shapes now.\n- **The PDF footer could show yesterday's date.** It printed the UTC date, so\n an export after midnight east of Greenwich was dated the day before. It\n prints the local date, and the footer follows custom page margins.\n- **Grouped PDFs dropped conditional formatting and links.** They now carry\n both, as flat exports do.\n- **Booleans printed as \"true\" and \"false\" in the PDF.** They print a tick or\n nothing, like the grid's checkbox. An icon set's `iconOnly` is honoured too:\n it printed the value next to the icon.\n- **A number or date column passed in `columns` without `align` printed\n left-aligned in the PDF.** It right-aligns from its `format`, as on screen.\n- **A pivot chart drew an empty cell as a zero bar.** An average over no rows\n is `null` in the pivot and the bridge read it as 0; it is a gap on the\n chart now. A sum over no rows stays the 0 the engine wrote.\n\n- **PDF export depended on pdfmake's fonts registering themselves.**\n `pdfmake/build/vfs_fonts` registers its font map only as a side effect of\n being imported while a global `pdfMake` already exists, and the export's\n own lookup for the map never matched the shape the module has shipped since\n pdfmake 0.2.8 (the module is the map), so it registered nothing and relied\n on that side effect. Under a bundler the global can be a stale instance (a\n dev server re-optimising its dependencies mid-session is enough), and the\n export then failed with \"File 'Roboto-Medium.ttf' not found in virtual file\n system\" while its promise never settled. The map is now found in every\n shape the module has had (`resolvePdfVfs`) and handed to the instance that\n creates the document (`registerPdfFonts`, through `addVirtualFileSystem`\n and the `vfs` property), and an installed pdfmake whose fonts module has\n no map is reported instead of failing later.\n- **Studio emitted no theme for the fragment export and the CLI `add`\n scaffolds.** Only the full app's `+layout.svelte` carried the `--sg-*` tokens;\n `eject --fragment` (which drops that file) shipped an `app.css` with one\n hard-coded accent, and `svgrid-studio add` / `add --all` wrote none at all. The\n tokens now come from one helper (`themeTokenCss`): `src/app.css` carries them\n for the full app and the fragment, and the `add` scaffolds emit them in\n `<svelte:head>`. Drop-in outputs wrap them in `@layer svgrid-studio`, so a host\n app that already defines its own tokens keeps its look. `add` also honours\n `--theme` / `--dark`, and a project with no theme picked gets Ember (the demo\n theme) instead of Tailwind.\n- **Scheduler column alignment.** The all-day lane, day/time-grid header, and\n body columns now reserve the scrollbar width consistently, so the columns line\n up instead of drifting by the scrollbar's width.\n- **Excel export color-scale conditional formatting.** A color scale's `min` /\n `mid` / `max` are optional, so the export could build an `(string | undefined)[]`\n where a `string[]` was expected; it now falls back to the same `#ffffff` /\n `#000000` defaults the grid renders with. Because `@svgrid/enterprise` ships its\n `src`, this had surfaced as a stray `svelte-check` error in consuming apps - a\n clean app now type-checks with zero errors.\n\n#### Security\n\n- **A crafted .xlsx could crash the tab.** `importData` and the spreadsheet's\n File > Open filled every gap before a cell with blanks, sized by the cell\n reference in the file: `<c r=\"ZZZZZZZ1\">` asked for about eight billion.\n `importData` now rejects a cell past column XFD; the spreadsheet skips a cell\n outside the sheet, as it does other malformed parts. Both refuse a sheet that\n would need more than ten million blank cells to lay out.\n- **A zip bomb could exhaust the tab's memory.** Every .xlsx and .ods reader\n (`importData`, File > Open, `documentFromXlsx`, `documentFromOds`) unzipped\n each part whole before looking at it, so a small file whose parts inflate to\n gigabytes was read into memory first. Parts are now unzipped as a stream and\n counted as they inflate; a file whose parts pass 256 MB together is refused\n at that point.\n- **CSV and TSV from `exportData` neutralise formula-like text**, through the\n same `@svgrid/grid` serializer (see the grid's Security entry).\n\n### @svgrid/grid-wc\n\n#### Added\n\n- **`<sv-chart>`**, the standalone chart as a custom element, at\n `@svgrid/grid-wc/chart` with React (`/react/chart`), Vue (`/vue/chart`)\n and Angular (`SvChartComponent`) wrappers. Its surface is generated from\n `SvChart`'s own props type the way `<sv-grid>`'s is from the grid's, so the\n 26 props and 7 events stay in step; `spec` is a property, the primitives\n are attributes, and a prop that takes a boolean or a string (`legend`) keeps\n a string attribute where a bare attribute means true. Its own build in\n `dist/chart` carries none of the grid.\n- **Typed event handlers.** Each wrapper's `on<Event>` prop used to be\n `(detail: unknown) => void`, so reading `newValue` meant casting first -\n a poor advertisement for a typed wrapper. The detail type is now lifted from\n the grid's own callback signature, so 16 of the 19 events arrive fully typed\n (`TData` degrades to `Record<string, unknown>`; anything referring to a\n type that only exists inside `@svgrid/grid` stays `unknown` rather than\n naming something a consumer cannot resolve).\n\n- **React, Vue and Angular components**, as subpath imports:\n `@svgrid/grid-wc/react`, `/vue` and `/angular`. Each is generated from the\n same surface as the elements, so all 98 properties and 20 events are typed\n props on every one of them and none can drift from the grid. Each framework is\n an OPTIONAL peer dependency, so a plain-HTML consumer installs none of them,\n and the wrappers are 1.3-3.7 KB gzip because they reuse the one element bundle\n rather than shipping a second copy of the grid.\n\n They exist because a raw custom element is genuinely awkward in each:\n **React 18 and earlier stringify object props onto attributes**, so\n `columns={cols}` silently becomes `\"[object Object]\"` and the grid renders\n empty; **Vue** needs `isCustomElement` build config and a `.prop` modifier\n on every object binding; **Angular** needs `CUSTOM_ELEMENTS_SCHEMA` in every\n component that shows a grid, and gets no typed inputs. The Angular wrapper is\n compiled with ng-packagr in partial-Ivy mode, so it is consumable by a normal\n Angular build, and its selector is the element's own tag - `<sv-grid>` and\n `<sv-grid-shadow>` - with no template of its own, so there is no extra wrapper\n element in the DOM and the tag is the same one you write in plain HTML.\n\n All three also handle two ordering problems a hand-written wrapper meets:\n the element renders BEFORE a framework assigns properties in an effect, and\n `apiready` fires once during that first mount - before React can bind a\n listener at all. The handle is parked on the element and each wrapper replays\n it.\n- **The package ships TypeScript declarations.** It previously had none, so\n `import '@svgrid/grid-wc'` was an error under `moduleResolution: bundler`\n and `document.querySelector('sv-grid')` came back as a bare `Element`. The\n generated `.d.ts` augments `HTMLElementTagNameMap` and\n `HTMLElementEventMap`, so the element and its events are typed without\n hand-written declarations.\n- **`<sv-grid-shadow>` - the grid in an open shadow root**, so a host page's\n CSS cannot reach it. Same properties, attributes and events as `<sv-grid>`;\n a separate element rather than an attribute because Svelte resolves\n `customElement.shadow` at compile time, so no runtime flag can switch it.\n Isolation is one-directional and the docs say so: page CSS stops at the\n boundary, but the grid's own stylesheet is still injected into the document,\n because about twenty overlay surfaces portal to `document.body` on purpose\n to escape ancestor clipping. `--sg-*` theme tokens reach in unchanged,\n including a theme file's dark variant - custom properties are inherited, and\n inheritance crosses a shadow boundary.\n- **The elements now expose the whole grid.** `<sv-grid>` declared **7 props\n and 2 events** by hand against a `Props` type with 100 props and 19\n callbacks, so grouping, pagination, pinning, tree data, master/detail, board,\n scheduler and every Enterprise feature were unreachable from a non-Svelte\n host - while the docs said they \"all come along\". The surface is now\n **generated** from `<SvGrid>`'s own types: **98 properties** (72 with\n kebab-case attributes, 26 property-only) and **20 events**, with CI failing if\n the two drift. Costs 1.6 KiB gzip.\n- **Every grid callback is a DOM `CustomEvent`**, `detail` being the\n callback's argument - or, for the one callback taking two, an object keyed by\n its parameter names. `onApiReady` also parks the imperative handle on the\n element as `el.api`, because an event fires once and a host binding a\n listener later would otherwise never reach it.\n\n#### Fixed\n\n- **Importing the package on a server threw `customElements is not defined`.**\n Svelte registers each element with a bare top-level\n `customElements.define(...)`, so any server-rendered React app\n (TanStack Start, which Lovable now generates, Next.js, Remix) crashed on\n `import { SvGrid } from '@svgrid/grid-wc/react'`. The build now guards the\n registration; on a server the import is inert and SSR emits a plain\n `<sv-grid>` that upgrades on hydration. Guarded by `test/ssr.test.ts`.\n- **The React wrapper lost props the grid reads once at mount.** It wrote\n props in a passive `useEffect`, which runs after paint; the element mounts a\n microtask after insertion, so it had already mounted with defaults and\n `pageSize={25}` showed 10 rows a page (the wrapper's own pagination example\n did). Props are now written in a layout effect, before the element mounts.\n The same change in the `<sv-chart>` wrapper.\n- **`style` on the React wrappers took `Record<string, string | number>`,** so\n passing a React `CSSProperties` object failed to type-check. It is\n `CSSProperties` now.\n- **The React wrapper re-did all its work on every parent render.** Both of its\n effects had no dependency array, so any state change anywhere in the parent\n reassigned all 98 properties and rebound all 20 event listeners - 40 listener\n mutations per keystroke. It now writes only values that actually changed and\n binds listeners once through a handler ref. Measured: 20 no-op re-renders\n produce 0 listener adds, 0 removes and 0 property writes.\n\n- **The element threw when it rendered before its props were assigned.**\n Generating the prop list replaced the elements' own `data = []` /\n `columns = []` defaults with a bare `$props()`, so a consumer that assigns\n properties AFTER the element upgrades - which is what React and Angular both\n do, in an effect - got\n `TypeError: Cannot read properties of undefined (reading 'map')` and a grid\n that never rendered. Only a real framework app was late enough to reproduce\n it; an HTML fixture sets the properties in the same tick and never sees it.\n\n#### Changed\n\n- **Only arrays, objects and functions changed shape: they are property-only.**\n An HTML attribute is a string, so `columns='[object Object]'` cannot work\n and no attribute is offered for the 26 props that are not primitives. The\n published `rowclick` and `selectionchange` events keep the exact\n `detail` they shipped with, and `selectable` keeps meaning row-selection\n checkboxes - `<SvGrid>`'s prop of that name is an alias of\n `enableCellSelection`, and forwarding it would have silently repointed a\n published attribute at a different feature.\n- **Styles arrive with the code that needs them.** The build used to put every\n stylesheet in the bundle, lazy chunks included, into the entry, so a page\n that never opened the chart, a date picker or a menu still downloaded their\n CSS. Each chunk now carries its own styles and adds them to the document\n and to every open shadow root when it loads. `<sv-grid>`'s entry went from\n 107 KiB to 98.5 KiB gzip while the chart grew.\n\n### Tooling & docs\n\n#### Added\n\n- **Every chart gallery demo switches between Chart and Grid.** A segmented\n control first in each demo's toolbar flips every pane to a sortable grid\n of the rows the chart was drawn from, and back, the way the board demos\n switch Board and Table. The from-the-grid page shows the pattern in a\n runnable.\n\n- **Charting a pivot is documented.** The pivot page has a section on\n `pivotToChartSpec` (the mapping, every option, a runnable that pivots\n orders and charts them by quarter) and on the designer's Chart view\n (`chartable`, `defaultView`); the charts hub and the from-the-grid page\n link to it, the /api pivot section lists the function, and the generated\n reference covers `pivot-chart.ts`. Demo 359's data now puts every\n country in every quarter and category, so its groups are four bars, not\n one.\n\n- **27 runnable framework examples**, nine each for React, Vue and Angular:\n a first grid, sorting and filtering, editing and saving, row selection,\n grouping and totals, pagination, server-side data, theming, and Excel export\n from the Enterprise pack. Every one has\n an **Open in StackBlitz** button that boots a full editable project - no local\n install - and a new\n [React, Vue or Angular](/docs/help/web-components/frameworks) landing page\n puts the thirty-second path first.\n\n They are real apps in the repository (`packages/grid-wc/examples/`), not\n snippets, and CI compiles all of them with each framework's own compiler -\n including `ngc --strictTemplates`, so a wrong Angular binding fails the\n build. The doc listings are generated from those files, so a page cannot\n describe a version of an example that no longer exists.\n\n The Vue templates get an extra check of their own: Vue treats an unknown\n attribute as a legal fallthrough, so `<SvGrid sortabel />` type-checks\n cleanly and silently does nothing. Verified - the same typo fails the React\n and Angular compilers and passes `vue-tsc` - so the Vue examples are also\n checked against the generated surface.\n\n- **A Web Components docs category.** Eight pages under\n `help/web-components/` - quick start, a generated `<sv-grid>` reference,\n shadow DOM, React, Vue, Angular, TypeScript and limitations - replacing a\n single page that was filed under \"Layout & Styling\". The reference tables are\n generated from the grid's types, and a guard checks that the counts quoted in\n prose still match the surface.\n- **The docs run.** A `svelte` code fence tagged `{runnable}` is extracted at build time\n into a real component, so a doc page shows the source and the working result\n together rather than highlighted text. 504 examples across the corpus, taking\n the median doc page from 1 example to 3; each one is compiled by `svelte-check`\n in CI, so an example that stops working fails the build instead of rotting in\n place.\n- **`@svgrid/ui` recipe scaffolder** - `npx @svgrid/ui add <component>` drops a\n ready-to-edit starter (e.g. `add calendar`) into your app, complementing the\n shadcn-style component pages (Preview / Code, install tabs) across the UI kit.\n- **See a component before you wire it in** (`@svgrid/ui` 0.3.x).\n `npx @svgrid/ui try <component>` spins up a zero-setup Vite + Svelte sandbox and\n opens the component in your browser; `add --preview` writes a\n `src/routes/preview/<id>` route (plus a `/preview` index) in a SvelteKit app.\n `add` now installs `@svgrid/grid` by default (`--no-install` to opt out) and\n prints the exact `try` command for whatever you just added, so the \"see it\"\n step is never a dead end.\n- **AI coding Skill** (`skills/svgrid`, installable with\n `npx skills add sv-grid/sv-grid`) - an always-on house-style guidance layer\n that complements `@svgrid/mcp`.\n- **The rest of the toolkit is findable.** `packages/grid/README.md` gained an\n \"Also in the box\" section, and the site footer gained a **Toolkit** column\n (SvGrid UI, Kanban board, Scheduler, Dock layout, Studio, Web components).\n The 84 SvGrid UI components have always been exported from `@svgrid/grid`\n itself - `SvButton`, `SvCalendar`, `SvDateTimePicker`, `SvDockLayout`,\n `SvToaster` and the rest are already installed for every grid user - but\n nothing on the highest-traffic surfaces said so.\n\n#### Changed\n\n- **Doc examples show code and result at once.** The runnable card used to be a\n Preview / Code toggle with an in-page editor; it is now the source above the\n live example, both visible, with Copy. A tab hides half of a teaching example\n and makes comparing the two a click, and dropping the editor took the\n on-demand TypeScript compiler chunk off every docs page with it.\n- **`npm create @svgrid` starts on Ember** (the demo theme) instead of Tailwind,\n for every template; `--theme <id>` still picks any preset. The `sveltekit`\n template is now listed on the starters page, and the `sv add @svgrid` demo route\n imports the Ember stylesheet so it no longer renders unthemed.\n\n#### Fixed\n\n- **`build:lib` in the enterprise package deleted the node bundle.**\n `svelte-package` wipes `dist/`, so a library build alone removed\n `dist/node/studio.js` and the MCP server failed to start until\n `build:node` was run by hand. The library build rebuilds the bundle it\n removed.\n\n- **Docs images and tutorial media 404'd under a site base.** The markdown\n writes them root-absolute (`/docs-media/...`, `/tutorials/...`), which is\n right at svgrid.com and wrong under the `/sv-grid/` base the e2e server\n uses: every docs image and tutorial poster was missing there. The page\n prefixes the base in the HTML before it paints, and an e2e spec loads a\n page with both and checks nothing under those roots 404s.\n\n- **Twenty-one links on the chart pages went to GitHub 404s.** The split\n wrote every cross-link with one `../` too many, and the site's link\n resolver falls back to a GitHub URL for a page it does not know. Fixed on\n the pages, and every relative link under docs/ is now a test\n (`tools/docs-relative-links.test.ts`); the link checker existed but only\n ran by hand before a release.\n- **Links into the generated reference tree went to GitHub too.** The tree\n is hidden from the docs routes; a link to it lands on the /api page, on the\n module's section where it has one.\n- **The chart gallery said \"the source is under each example\" and it was\n not.** Each gallery card now carries the demo's own script and markup on a\n Code tab, written by `tools/gallery-doc-code.mjs` from the demo file and\n guarded by a drift test, so the code beside a preview is the code that\n renders it.\n- **A demo page flattened a bulleted banner into one paragraph**, dashes and\n backticks included. The page reads the pitch as blocks: a list where the\n banner wrote one, `<code>` where it wrote backticks, on the prerendered\n and the hydrated page alike.\n- **`demo-doc-embed` skipped a demo the page only linked to**, so a\n placement for it never landed, and it opened a new \"More examples\" section\n below \"See also\", which the coverage test requires to be last. Present\n means embedded, and the section opens above \"See also\".\n- **Regenerating the doc snippets took the dev server's file watcher with\n it.** The extractor removed and recreated its output directory, and on\n Windows the watch did not re-attach, so an edited runnable kept serving\n its old chunk while the source beside it showed the new code. It writes in\n place and removes only what no longer belongs.\n- **The Getting started chart page had no live example.** Its code blocks\n were `ts` and a Svelte block referencing rows it never declared; four of\n them run now, and the hub's first example runs with its own rows and a\n filter row, so the chart is seen following the grid.\n\n- **The e2e suite adopted any server on :5180.** Playwright reuses whatever\n answers on the port, and a Vite dev server returns the app shell for any\n path, so a website dev server started by hand (base `/`) passed the\n readiness check and the fourteen path-routed and module-importing specs\n failed with nothing pointing at the server. The config now probes the port\n first (`tests/e2e/lib/site-server-probe.mjs` reads the base off Vite's\n client script tag), reuses a server that serves the site under `/sv-grid/`,\n skips one that serves anything else with a line saying so, and starts its\n own on the next free port; `SVGRID_E2E_PORT` pins one.\n- **The website dev server re-optimised dependencies mid-session.** The\n search index, the docs renderer, the /api runner's compilers, the PDF\n exporter and the grid's `esm-env` sit behind dynamic imports the start-up\n scan does not reach, so the first page to touch each one triggered\n \"optimized dependencies changed. reloading\" on every open page. In the e2e\n suite that reload landed mid-test on a cold cache and failed whichever spec\n was on a page at the time. They are pre-bundled at start-up now\n (`optimizeDeps.include`), and `esm-env` is a declared devDependency of the\n website so it resolves from there.\n- **The /api runner check sampled an example's outcome two frames after\n Run.** An example awaiting an export or a fetch was still running, so a\n failure that arrived later, or one thrown inside a library callback the\n runner's try/catch cannot see, passed. The check now waits for the runner\n to report an outcome and counts an uncaught error or rejection during the\n run as a failure of that example.\n- **181 doc pages had content stranded below \"See also\".** Authoring passes\n appended new sections to the end of the file, which buried them under what\n reads as the page footer: on `help/filtering/number-filter`, for instance, the\n `between` example sat below the link list and a reader would never reach it.\n The footer is back at the bottom on every page, and a test now fails if a\n section lands under it.\n- **The documented way to lock one column's width never worked.**\n `docs/help/columns/column-sizing.md` matched headers on `data-col-id`, which is\n the attribute on *body* cells - the selector matched nothing. Header cells\n carry `data-svgrid-header-col`. (`ColumnDef.resizable` is now the real answer.)\n- **`blockKey` was missing from `tools/lib/md-snippets.d.mts`.** The function was\n exported from the `.mjs` and worked at runtime, so nothing caught it until the\n website was type-checked.\n- **`@svgrid/mcp` reports its real version.** The MCP server's\n `serverInfo.version` was hardcoded to `0.1.0`; it now reads the package version.\n- **`@svgrid/create-studio` scaffold builds out of the box.** The generated app\n shipped an orphaned `/products` route referencing an entity that was never\n defined; the `Product` schema, seed, data source, nav, and home card are now\n complete, so `npm run build` succeeds on a fresh scaffold.\n- **API-docs accuracy pass across all 74 UI-component pages.** Corrected the\n `SvDockLayout`, `SvDockManager`, and `SvDateTimePicker` prop tables (added 13\n missing dock-layout props; removed a `size` prop `SvDateTimePicker` never had),\n and filled scattered gaps (`loading`, `onClosed`, `min` / `max`, `dir`,\n `width` / `height`, `ariaLabel`, and the shared field-contract on\n `SvFileUpload`).\n\n### @svgrid/mcp\n\n#### Changed\n\n- **A cold `npx -y @svgrid/mcp` installs 20 packages instead of 111.** The\n server speaks MCP over stdio itself instead of through\n `@modelcontextprotocol/sdk`, whose HTTP and OAuth dependencies (Express, Hono,\n JOSE, AJV) a stdio server never runs. On an empty npm cache the install took\n 6 to 8 seconds instead of 12, which had left little room under an MCP client's\n 30 second connect timeout. The protocol is unchanged: version negotiation,\n errors and every tool, resource and prompt answer as before.\n\n## [1.0.0] - 2026-06-16\n\nInitial public release - the Svelte 5-native data grid: `@svgrid/grid`\n(MIT core) and `@svgrid/enterprise` (the paid feature pack).\n\n### @svgrid/grid\n\n- **New** `onCellValueChange` callback on `<SvGrid>`. Fires after every\n inline edit commits with `{ rowIndex, columnId, oldValue, newValue,\n row }`. The recommended hook for server-side persistence and cascading\n recomputes; see demo `18-cascade-editing` and\n [Saving values](./help/editing/saving-values.md).\n- **New** `externalSort` + `externalFilter` props. Grid records the UI\n state but does NOT re-order / filter rows - the consumer owns the\n pipeline. Paired with `onSortingChange` / `onFiltersChange` for\n server-side data and tree-data scenarios.\n- **New** `onSortingChange(sorting)` / `onFiltersChange(filters)`\n callbacks. Fire on every change with the consolidated payload shapes\n documented in the [SvGrid reference](./reference/SvGrid.md).\n- **New** `onRowSelectionChange(selection, rows)` and\n `onActiveCellChange(cell)` callbacks.\n- **New** `fitColumns` prop. Scales column widths to fill the viewport,\n with rounding-residue absorbed in the last scalable column. Shrinks\n down to 85 % of natural widths; beyond that a horizontal scrollbar\n appears.\n- **New** `showRowNumbers` prop. Leading 1-based row-number column,\n rendered before any selection column.\n- **New** `pageSize` prop on `<SvGrid>`. Initial page size for the\n built-in pager.\n- **Improved** column virtualizer now detects per-item size changes,\n not just total size. Fixes a regression where resizing a column under\n `fitColumns` left other columns stale.\n- **Improved** the wrapper-managed filter pipeline no longer applies\n filters to the pre-paginated view - the filter UI always sees the\n full dataset, not just the visible page. (Removed\n `paginatedRowModel` from the engine pipeline; pagination is applied\n AFTER filters by the wrapper.)\n\n### @svgrid/enterprise\n\n- **New** package. The paid feature pack adds:\n - **Export** to xlsx / pdf / csv / tsv / html, with theme-matched\n styles, multi-sheet workbooks, header + footer with logo, embedded\n cell images. See [Export](./help/export.md).\n - **Print** with repeat-on-page headers, optional cover page,\n page-size + orientation.\n - **Import** from xlsx / csv / tsv / json with column mapping +\n per-row validation. See [Import](./help/import.md).\n - **AI assistant**: provider-agnostic helpers for natural-language\n filter, smart fill, summarize, and classify. Bring your own model\n adapter. See [AI](./help/ai.md).\n - **Pivot tables** via `createPivotModel(data, config)` and\n `pro.pivot.build(config)`. Row + column axes, 8 built-in\n aggregators or custom, grand-total row + column, subtotals,\n custom axis sort. See [Pivot tables](./help/pivot.md).\n- **New** `installEnterprise(api)` augments a `SvGridApi` with `exportData`,\n `print`, `importData`, `ai.*`, and `pivot.*` methods.\n- **Soft-gated licensing**: features run unlicensed but the grid shows\n a small watermark + a one-time console nudge. `setLicenseKey('SVENTERPRISE-…')`\n at app startup clears both.\n\n### Examples gallery\n\n- **New demos** (56-59): theme-matched export, branded export with\n header + footer + logo, export with cell images, multi-sheet export.\n- **New demos** (52-pivot-table, 51-ai-assistant, 53-excel-import):\n reference implementations for each Enterprise feature.\n- **New demos** for industry verticals: stock market (live ticks),\n HR team, finances ledger, industrial IoT, localization, CSP\n compliant, accessibility, cascade editing, server-side rendering,\n industrial dashboard, healthcare EMR, logistics, compliance queue,\n field service, gantt, scheduler, CRM, admin dashboard, seller panel.\n- **New** \"Source\" button on every demo opens the raw `.svelte` file\n in a modal with a Copy-to-clipboard button. Wired via\n `import.meta.glob('../demos/*.svelte', { query: '?raw' })` so it\n picks up new demos automatically.\n\n### Docs\n\n- **New** [Enterprise feature pack](./enterprise/README.md) landing page.\n- **New** [API reference](./reference/index.md) with hand-curated\n pages for `<SvGrid>`, `SvGridApi`, `ColumnDef`, features, and the\n full Enterprise surface.\n- **New** [Why headless?](./why-headless.md) explains the layered\n architecture and when to drop down to the headless core.\n- **New** [Tailwind integration](./help/tailwind.md) walks the\n `--sg-*` token surface, dark-mode wiring via `data-theme`, and the\n override hooks for the stable `.sv-grid-*` class names.\n- **Split** [Getting started](./getting-started.md) into six short\n pages (install / first-grid / data-and-columns / features /\n theme-and-density / going-to-production); the old single-page\n version is preserved at\n [getting-started-full.md](./getting-started-full.md).\n- **Cleaned** every code sample against the live library surface.\n Removed phantom APIs: `state={...}`, `rowModels={...}`,\n `initialState={...}`, `manualFiltering`, `manualSorting`,\n `manualPagination`, `onColumnFiltersChange`, the wrapper `getRowId`\n prop, per-column `enableSorting` / `enableColumnFilter` /\n `enableGrouping` flags, the never-shipped\n `@svgrid/grid/themes/default.css` import.\n- **Em-dashes globally swept to hyphens** (`-` → `-`) across all\n source-controlled text. Codified as a rule for new content.\n\n## How we version\n\n| Tier | What it means |\n| ----------------- | -------------------------------------------------------------------------------------------------------------- |\n| **Major** (1.x) | Breaking change to a Stable API. Includes prop / method renames, type-narrowing, default-behaviour changes. |\n| **Minor** | New Stable API. New Experimental API. New demo. Doc rewrites that touch the public-facing claims. |\n| **Patch** | Bug fixes. Type-only fixes. Internal refactors with no public surface change. Doc typo fixes. |\n\nThe [API stability page](./help/api-stability.md) annotates each export\nwith its current tier (`Stable`, `Experimental`, `Internal`). As of 1.0,\n`Stable` APIs follow semver; `Experimental` APIs may still change in a\nminor release.\n"
|
|
4391
|
+
"markdown": "# Changelog\n\nThe user-facing log of what shipped. Format follows\n[Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.1.0/);\nversioning follows [Semantic Versioning](https://semver.org/).\n\nEvery release has up to six sections:\n- **Added** - new features\n- **Changed** - existing functionality, behaviour changes\n- **Deprecated** - soon-to-be-removed features\n- **Removed** - features removed in this release\n- **Fixed** - bug fixes\n- **Security** - vulnerability patches (with CVE ids when applicable)\n\nPre-release entries live under `## [Unreleased]`. They graduate to a\ndated heading on publish via `pnpm changeset version` (see\n[.changeset/README.md](../.changeset/README.md)).\n\nFor machine-readable releases, fetch\n[`/changelog.json`](/changelog.json) - same content, parseable shape.\n\n## [Unreleased]\n\n### @svgrid/grid\n\n#### Added\n\n- **`chartSpecToTable`.** The rows and columns a spec amounts to, in the\n shape `SvGrid` takes: one row per category with a column per series (a\n grouped axis adds a Group column, a histogram From and To, candles their\n four prices, a box plot its five numbers), per point for a scatter, per\n link for a sankey or chord, per leaf for a tree map or sunburst with a\n column per level, per day for a calendar, one row for a gauge. Number\n columns carry the chart's format (a right-axis series its axis's) and a\n date axis is a date column. The gallery demos' Chart | Grid switch is this\n behind a sortable grid.\n\n- **The Chart panel charts the pivot in pivot mode.** With `pivot` and\n `charting` on one grid, the pivot bar carries the Chart toggle and the\n panel draws the pivot on screen: row groups as categories (nested rows a\n grouped axis), column groups as series, the measures' format on the axis,\n totals left out. The data pickers step aside with a note and the Type\n select keeps the shapes a pivot can take; Stacked, 100%, Horizontal, the\n Format tab, the builder, saved charts, export and Describe still apply. A\n click on a bar filters the innermost row dimension when the grid has a\n column for it, which re-runs the pivot. It used to chart the source rows by\n the source columns whatever was on screen. The mapping is\n `pivotResultToChartSpec` (with `pivotChartType`, `pivotFilterColumn`)\n in the lazy chart engine; enterprise's `pivotToChartSpec` is the same\n function. `bucketsToChartSpec` (server aggregates as a spec) moved there\n from the controller, which kept the base bundle at 86.4 KB.\n\n- **Scatter points select.** A click or Enter on a scatter or bubble point\n selects it the way a bar selects: the point's `label` (or its series) is\n the category, its y the value, and `selectable`, `bind:selected`,\n `onSelectionChange` and `onSelect` all apply. The dots had no click\n handler, so on a scatter chart those props did nothing.\n- **`ChartPointRef.index`.** A selected bar carries its category index\n beside its label, and two refs with an index match only on the same one.\n A grouped axis repeats its leaf labels (Q1 to Q4 under each year), so a\n click on the second Q2 used to select the first Q2 with it. A ref written\n without an index still matches by label.\n- **Data labels on a 100% chart read the share.** Under `stacked100` the\n axis is already a share whatever `valueFormat` says; the labels on the\n bars now say \"18%\" as well, rather than \"$18\", or \"1800%\" when the format\n was percent. A `dataLabels.formatter` still receives the raw value and the\n tooltip keeps it.\n- **A series on the right axis reads in that axis's format.** The tooltip,\n the screen-reader table, the live region and the data labels format a\n series with `axis: 'right'` through `y2Axis.format` or `formatter`, so a\n margin of 0.29 beside a revenue in dollars reads \"29%\" and not \"$0.29\".\n Without a format of its own the right axis is plain numbers, as its ticks\n are.\n- **The breadcrumb survives `toolbar={false}`.** A drilled sunburst, tree\n map or pie with the toolbar off still shows its breadcrumb in a strip of\n its own; it used to have no way back up.\n- **Chart axis model.** `xAxis`, `yAxis` and `y2Axis` on a spec take\n `min`, `max`, `nice`, `tickCount`, `tickInterval`, `format` or a\n `formatter`, `title`, `gridLines`, `labelRotation`, `reversed` and, for\n the x axis, `type: 'number'` for a numeric axis that spreads categories by\n value. `referenceBands` shade a range on either axis, `referenceLines` can\n be vertical, `title` / `subtitle` / `caption` frame the chart. Series\n gained `marker` shapes and per-point `markers` / `colors`, `strokeWidth`,\n `dash`, `opacity`, `gradient`, `step` lines, `connectNulls` and a\n `nullAs` policy; `dataLabels` takes a placement, a formatter and overlap\n hiding; the component takes a `tooltip` snippet, `tooltipFormat`,\n `tooltipMode: 'single'`, a `legend` side and a `legendItem` snippet, and\n `autosize`. `rowsToChartSpec` reduces with `min`, `max`, `median`,\n `first`, `last`, `countDistinct` and `pN` and buckets a date dimension by\n `day` / `week` / `month` / `quarter` / `year`.\n- **Decimation for long series.** `decimate: 'auto'` (the default) thins a\n line or area with more points than pixels through LTTB, which keeps the\n shape; `{ method: 'minmax' }` keeps every spike. Zoom is applied first, so\n zooming into 300 of 100,000 points shows all 300. `lttb`, `minMaxIndices`,\n `decimateSpec` and `pickCategories` are exported.\n- **Thirteen more chart types**: `histogram` (with `binValues` and\n `rowsToHistogramSpec`), `range-bar`, `range-area`, `lollipop`,\n `dumbbell`, `pareto` (`paretoSpec`), `stream` (`stackOffset: 'wiggle'` or\n `'silhouette'`), `sunburst`, `radial-bar`, `radial-column`,\n `nightingale`, `chord` and `bullet`; plus hollow and Heikin-Ashi candles\n (`candleStyle`) and pyramid / cone funnels (`funnelShape`). All of them are\n in the grid panel's picker, gated on what the current columns can feed.\n- **Zoom, pan and presets.** `zoomable` takes an object: `wheel` (`true` or\n `'modifier'` for Ctrl + wheel), `pinch`, `pan` (`'shift'`, `'mode'` or\n both) and `axis` (`'x'`, `'y'`, `'xy'`). The window is a bindable\n `zoom` prop of category indices with `zoomTo` / `resetZoom` on the\n component and an `onZoom` callback; `rangePresets` puts 1W / 1M / 3M / 6M /\n YTD / 1Y / All in the toolbar on a time axis.\n- **Synchronized charts.** Charts with the same `syncGroup` share their\n crosshair and zoom window, matched by label and then by date. The grid\n panel's `syncTabs` keeps one window across its chart tabs.\n- **Context menu, animation, drilldown, selection, keyboard.** `contextMenu`\n (built-in export / zoom / series items, your own `MenuItem`s, or a function\n of the clicked point; Shift + F10 opens it), `animate` (a data-update tween\n and `'fade'` / `'grow'` / `'wipe'` enter effects, off under reduced\n motion), `drillable` + `drillPath` for tree maps and sunbursts with a\n breadcrumb, `selectable` + `selected` + `onSelectionChange` for point\n selection with dimming, Up / Down stepping through series with a polite live\n region (`announce`).\n- **Financial toolkit.** `bollingerBands`, `rsi`, `macd`, `vwap`, `atr`,\n `stochastic`, `wma` and `obv`, NaN-padded like the moving averages;\n `'wma:N'`, `'bb:N:K'` (a shaded band) and `'vwap'` overlays;\n `indicatorPane` and `SvChartPanes`, which stacks indicator panes under a\n price chart with one x axis, one gutter and one crosshair; `rowsToOhlcSpec`\n and `resampleOhlc` (daily bars to weeks / months); `lastPriceLine`;\n annotation `shape` (`'flag'`, `'pin'`, `'square'`) with a tooltip\n `text`; `volumes` on a series.\n- **Drawing tools.** `drawable` puts trend line, horizontal ray, Fibonacci\n retracement, rectangle, arrow and note tools in the toolbar; the drawings\n are data points (`spec.drawings`, `onDrawingsChange`) so they survive a\n zoom, a resize or new data. A selected drawing has draggable handles and\n Delete removes it.\n- **PDF and print** with no PDF library: `chartToPdfBlob`, `downloadChartPdf`\n (a one-page A4 or Letter PDF with the chart as a JPEG and the titles as\n text) and `printChart`, in the toolbar, the context menu and the panel's\n export menu.\n- **Chart builder in the grid panel.** The Build button opens a modal with a\n type gallery (a live thumbnail per type), the data pickers and a Format tab\n (titles, legend and label placement, axis title / min / max / format / grid\n lines, per-series colour / type / axis / marker / width). The format is\n `ChartFormatState` on the chart tab, applied by `applyChartFormat` to every\n derived spec, saved with the view and reachable through\n `configureChart({ format })`. A link toggle unlinks a chart from the grid\n (`configureChart({ frozen: true })`) so it keeps its data while you filter.\n `charting.onChartCreated` / `onChartChanged` report the panel's lifecycle;\n `charting` also takes `zoom`, `rangePresets`, `syncGroup`, `syncTabs`,\n `contextMenu` and `animate`.\n- **Candlesticks from the grid panel.** Pick Candlestick or OHLC bars and the\n panel finds the Date, Open, High, Low, Close and Volume columns by name;\n Indicators chips add panes and overlays; `configureChart({ ohlc,\n indicators })` and the AI chart plan reach the same thing.\n- **A scatter series' `overlay` is a regression of y on x.** Until now the\n scatter layout ignored `overlay` (the fits ran on the index, which a\n scatter has no use for). The regressions (`linearFit`, `polynomialFit`,\n `exponentialFit`, `logarithmicFit`, `powerFit`) take an optional `xs`\n and return `predict(x)`; `regressionFit(values, overlay, xs)` names one by\n its overlay string; a scatter series with `overlay` gets the curve drawn\n across the plot (sampled evenly in log space on a log axis) and its\n equation and R-squared in the point tooltip.\n- **Chart gallery: fourteen full-size demos, one per family, and a docs page\n for them.** Bars, lines, areas, pie / donut / sunburst, scatter and bubble,\n combination, histogram and box plot, heat map and calendar, radar and\n radial, tree map and sunburst, sankey and chord, waterfall / funnel /\n pareto, gauges and bullets, and an annotated chart (demos 438 to 451),\n each with its own data and the switches that family needs, embedded on\n `help/charts/gallery` and the type pages.\n- **Grid chart panel: a deeper Format tab, one set of pickers, a\n localized panel and saved charts.** The builder's Format tab adds series\n labels, the crosshair's axis pills, a compact rule below a width\n (`compactBelow`, through `CHART_RESPONSIVE_PRESETS.compact`), a stack\n group per bar or area series and the chart's font, size, background and\n text colour (`ChartFormatState.seriesLabels` / `crosshairLabels` /\n `compactBelow` / `series[].stack` / `style`). The panel's pickers and the\n builder's Data tab are one component (`SvGridChartPickers`), so the two\n cannot disagree about what a type needs. Every string the panel and the\n builder show is a `chart*` key on `localization.text`\n (`GridChartPanelMessages`, loaded with the panel; `GridMessages` is now\n the chrome map and the panel map together). `api.saveChart(name)`,\n `applySavedChart`, `removeSavedChart`, `getSavedCharts` and\n `configureChart({ saved })` keep a tab's whole configuration under a name;\n the panel has a popover for them and `getState()` carries `savedCharts`\n when there are any.\n- **Chart diagnostics, a plain-language description, live feeds and a JSON\n schema.** `validateChartSpec` returns what is off about a spec (unknown\n keys with the nearest name, an unknown type, a series short of the\n categories, a log axis at zero, an overlay the engine does not read, an\n anchor naming no category, and more); `SvChart` logs the findings once per\n spec in development, `aiChart` attaches the errors to its plan, and the\n MCP server's `svgrid_check_code` applies the rules to a static spec\n literal with a rename for a misspelt key. `chartSummary` reads a chart in\n a sentence (trend, extremes, shares, correlation, last close) and\n `SvChart` hands it to assistive technology as `aria-description` and the\n table caption (`describe`), the context menu and the panel copy it, and\n `aiExplainChart` grounds an Explain button on it. `appendPoints` builds\n the next spec of a feed with every per-category array kept in step and a\n rolling window, and `live` on the chart skips the tween and enter effect.\n `docs/schemas/chart-spec.json` is generated from the types, served at\n svgrid.com/schemas and by `svgrid_get`, and a test keeps it equal to the\n validator's lists.\n- **Series and interaction depth.** Areas join `stack` groups like bars\n (`stacked100` and `stackOffset` run per pile); a numeric x axis takes\n `scale: 'log'` (even decades, 2 / 5 minors, non-positive categories\n dropped, decimation in log positions); regression overlays `poly:N`,\n `exp`, `log` and `power` next to `linear`, each carrying `r2` and\n `equation` on the overlay line and read in the tooltip, with\n `linearFit` / `polynomialFit` / `exponentialFit` / `logarithmicFit` /\n `powerFit` / `rSquared` / `computeOverlayFit` / `overlayName` exported\n and `charting.trend` accepting the new names; hovering a mark dims the\n other series (`hoverHighlight`, on by default, snapping within 18px) and\n `onHover` reports the point once per change; `tooltipPosition` parks the\n tooltip in a plot corner and `tooltipSticky` pins it on a click; data\n labels take `rotation` and `connector` (pushed clear of a collision with\n a leader line); `spec.style` sets a chart's font, size, background and\n text / grid colours over the tokens (`chartStyleVars`), honoured by the\n exports.\n- **Accessibility pass on the chart.** Every non-cartesian family (pie,\n sunburst and the radial charts, heat map, calendar, tree map, funnel,\n sankey nodes and links, radar, scatter) is one Tab stop with a roving\n focus: arrows walk the marks (a heat map by row and column, a calendar by\n day and week), Home / End / PageUp / PageDown jump, the focused mark\n raises its tooltip, Enter / Space select or drill, and every mark is named\n and has a focus ring. Zoom from the keyboard: `+` / `-` / `0` on a\n focused category and Shift + arrows to pan, and the brush is a `slider`\n (arrows pan and resize, Home / End, `0`). The toolbar is a `toolbar`, the\n tooltip a `tooltip`, decorative icons are hidden from the tree. Forced\n colors (Windows High Contrast) keep the data colours and repaint the\n chrome with the system palette. `localeText` on `SvChart` (and\n `charting.localeText` for the grid panel) translates every string the\n chart renders itself, with `ChartMessages`, `defaultChartMessages`,\n `resolveChartMessages` and `chartMessage` exported. A new\n `tests/e2e/chart-a11y.spec.ts` runs axe-core against the rendered chart\n on three demos and drives the keyboard model in a real browser.\n- **Stack groups, series labels, responsive rules, pie callouts.** `stack`\n on a bar series names the pile it joins, so plan and actual stack side by\n side in each category and the axis fits the tallest stack; `seriesLabels`\n names each line at its last point in a reserved gutter, pushed apart where\n lines end together; `responsive` patches the spec by the rendered size\n (axes merge one level deep, a rule's `legend` moves or hides the\n component's legend; `resolveResponsive` and `matchResponsiveRules` are\n exported); `dataLabels: { placement: 'outside' }` on a pie draws callout\n labels with leaders instead of percentages, and a spec can carry its own\n `dataLabels`; `visible: false` starts a series hidden with its legend chip\n dimmed; the crosshair reads off the axes with a category pill and a value\n pill (`crosshairLabels={false}` turns them off).\n- **`moveCells` - drag a selected range to move or copy it.** Grab a selected\n range by its border and drop it somewhere else. Move by default, copy with\n Ctrl / Cmd, and the modifier is read at DROP time so it can be pressed or\n released mid-drag. On whenever cell selection is on; `moveCells={false}`\n opts out. A drop is refused outright - nothing changes - when it would land\n off-grid or when any source or destination cell is read-only, rather than\n moving the part that fits and silently dropping the rest.\n- **`selectionBar` - a floating bar over the grid while rows are selected**,\n showing the count and the actions that apply to the whole selection. `true`\n gives the count and a Clear button; an array is shorthand for `{ actions }`;\n the object form also sets `position` (`'bottom'` default, or `'top'`),\n `maxVisible` and `hideClear`. The prop and its types are free; the bar\n itself is an Enterprise renderer, and without it the grid shows a short upsell\n in its place, the same way the scheduler and board views do.\n- **Edge auto-scroll for every drag that extends a rectangle** - the fill\n handle, the range move, and plain drag-select. All three were previously\n capped at whatever was already on screen when the drag began, which on a grid\n built for 100k rows meant the gesture mostly did not work. One shared rAF loop\n scrolls the container when the pointer is inside a 40px edge band, on a linear\n ramp to 20px/frame, in both axes. It keeps scrolling with the pointer parked\n still, which is the whole point of holding at an edge.\n- **Row and column resizing, both opt-in** (`rowResize`, `columnResize`).\n `columnResize` gives every header a drag handle: drag the edge, double-click\n it to size the column to its content, or focus it and use Left/Right (Shift\n for a 1px step). `rowResize` does the same vertically and brings the\n row-header column with it, since that is where the grip belongs; the grid\n stores the heights itself, so neither needs a function-valued `rowHeight`.\n Both load their code on demand, so a grid that leaves them off downloads\n neither.\n- **`ColumnDef.resizable`** - per-column opt-out, consulted only when the grid\n has `columnResize` on. `resizable: false` removes that column's handle\n entirely, so the drag, the arrow keys and double-click-to-autosize all go with\n it, and the column menu drops its Autosize item. For the columns whose width\n is part of the layout: a row-number gutter, a checkbox column, a fixed icon\n column. Programmatic sizing (`api.setColumnWidth`, `api.autosizeColumn`,\n `fitColumns`) still applies.\n- **`SvGridViewState` is exported.** It is the return type of the public\n `api.getState()`, so writing a typed \"named views\" feature previously meant\n either re-declaring the shape or reaching into an internal path.\n- **Form layer depth in `SvForm` / `createForm`.** Schema-driven forms gained:\n conditional / dependent fields (`visible` and `disabled` accept a\n `(values) => boolean` predicate; hidden fields drop out of validation and the\n submit payload), grouped **sections** and a multi-step **wizard** (`stepper`,\n with per-step validation gating), repeatable **field arrays**\n (`type: 'array'` with `itemFields`, plus `addItem` / `removeItem` / `moveItem`),\n **async validation** (debounced, stale-response-guarded, per-field\n `validating` state), **dirty tracking + `reset()`**, and **submit states**\n (`isSubmitting`, an async `onSubmit`, and `setErrors()` for server-side field\n errors). New demos: dynamic form, wizard, and field array.\n- **Public headless cores for the menu / select family** (`createMenu`,\n `createPopoverSelect`, shared `list-nav`), so the popup pickers can be driven\n headlessly and composed into custom UI.\n- **`color` on `ListOption`** - render a small color swatch before the label in\n `SvListBox` and `SvDropDownList`.\n- **`block` on `SvDateTimePicker`** - stretch the field to fill its container\n (100% width), so it fills a grid cell when used as an editor.\n- **`onClosed` on `SvDrawer`** - fires after the exit animation ends and the\n drawer leaves the DOM.\n- **`loading` on `SvField`**, and **`locked`** on `SvDockLayout` /\n `SvDockManager`.\n- **`summary` on `<SvGrid>`** - shortcut alias for `enableRowSummaries`,\n which turns on the footer row that aggregates every filtered row. It wins\n when both are set, the same precedence `selectable` has over\n `enableCellSelection`.\n- **`summary` on a column** - choose that column's footer aggregate\n (`'sum'`, `'avg'`, `'min'`, `'max'`, `'count'`, `'countDistinct'`,\n `'extent'`, `'first'`, or a custom function), or `false` to leave the cell\n blank. Without it a column keeps the old default: sum a numeric column,\n `Count: N` otherwise.\n- **Development-time configuration checks.** The grid used to fail silently on\n the most common mistakes - a misspelled `field` rendered a column of blank\n cells and printed nothing. It now warns once per problem, in dev builds only:\n\n - a column `field`, `groupBy` entry, `treeData.parentField` / `idField` or\n `treeData.column` that does not exist (with a \"did you mean\" for near misses),\n - two columns resolving to the same id,\n - `pageSize` set when pagination was never turned on,\n - a column marked `sortable` while sorting is not enabled,\n - `initialColumnPinning` while column virtualization is on, which silently\n prevents the columns from sticking,\n - `externalPagination` without `rowCount`, `externalSort` without\n `onSortingChange`, and `externalFilter` without `onFiltersChange`.\n\n The checks live in a lazy chunk behind a dev-only branch, so a production\n build never loads them and the base bundle is unchanged.\n\n#### Changed\n\n- **The find bar loads on the first Ctrl+F.** It is its own chunk now, so a\n grid nobody searches does not carry it; the first open shows the bar once\n the chunk has loaded.\n- **`alignedGridGroup` loads its module on demand.** The shared group that\n mirrors horizontal scroll and column widths between grids is now a lazy\n chunk, fetched by the first grid that sets the prop, the way managed row\n drag is. A grid outside a group no longer carries it, which kept the base\n bundle under its 100 KB budget after this release's scroll and mount\n changes. Mirroring starts once the chunk has loaded, a frame on a warm\n cache.\n- **BREAKING: column resizing is now off by default.** Every column used to have\n a drag handle unconditionally - there was no prop, no per-column option and no\n way to turn it off, so a `width` you set was only ever a starting value a user\n could drag away. Set `columnResize` to get the handles back; the 241 demos in\n this repo that want them now say so. Sorting and filtering have always been\n opt-in behind `sortable` / `filterable`, and resizing was the odd one out.\n- **BREAKING: the footer summary row is now off by default.**\n `enableRowSummaries` used to default to `true`, so a plain\n `<SvGrid {data} {columns} />` grew an aggregate footer nobody asked for and\n every caller that did not want one had to opt out - 375 call sites in this\n repo passed `enableRowSummaries={false}` against 6 that opted in, and the\n API reference already documented the default as `false`. If you were\n relying on the old behaviour, add `summary` (or `enableRowSummaries`).\n- **Ember is now the default theme preset** (`defaultThemePreset` in\n `@svgrid/grid/themes`). It is what the demo gallery and svgrid.com open on, so\n a scaffolded or Studio-generated app now looks like the demos unless you pick\n a preset. Previously the default was Tailwind.\n- **Popup editors keep themselves on screen.** `SvAutoComplete`, `SvComboBox`,\n `SvDropDownList` and the date pickers now measure the space to the viewport\n edge: the panel flips up when there is not enough room below and clamps its\n `max-height` to the available height, so a picker opened near the bottom of the\n window no longer spills off screen.\n- **Dock manager pop-out to a new window is now off by default**\n (`allowPopout={false}`); opt in explicitly. Added a dedicated pop-out demo.\n\n#### Fixed\n\n- **A mount built rows nobody could see, and laid the grid out five\n times.** The first paint now draws the rows on screen and at most two\n overscan rows, and the rest of `overscan` follows a frame after that paint:\n a 520 px grid built 26 rows to show 14. Reading the scroll position of the\n container the grid had just created, and each scrollbar measuring its\n track on connect and on every attribute change, forced four layouts of the\n half-built grid before it painted. The position is now confirmed on the\n next frame and the track is measured by the scrollbar's resize observer;\n the one forced layout left is the container size the windows need.\n- **The scrollbar thumb trailed the rows by a frame.** The custom scrollbar\n read the scroll position on the frame after the scroll flush, so the thumb\n moved one frame late and each scroll step paid a second style pass and\n paint for it. The flush now hands the scrollbar the position it already\n has, and the scrollbar keeps its measured track instead of measuring it\n inside the flush.\n- **A vertical scroll frame repainted every rendered row.** Body rows were\n not positioned, so on any frame that moved or rewrote a row Chrome painted\n every rendered row again cell by cell. Flex-layout body rows are now\n `position: relative` (no z-index, no clip), which lets the browser reuse an\n unchanged row's paint whole. In six interleaved rounds of the 100,000-row\n browser bench, a 60 px scroll step went from 4.05 to 3.68 ms of\n main-thread work (median). Sticky frozen and group rows keep\n `position: sticky`.\n- **Expanding one group re-grouped every row.** A toggle re-ran the row\n pipeline, and the grouping stage bucketed all rows again although only the\n expansion had changed. It now keeps its groups while its input rows,\n grouping and columns are the same. On a 100,000-row grid grouped by five\n columns, one expand went from 521 to 98 ms, and expanding or collapsing\n every group from 473 to 82 ms.\n- **A calendar date with `timeZone: 'UTC'` showed the day before.** A\n bare date string such as `'2026-10-07'` is read as local midnight, so a\n date `format` whose `options` carried `timeZone: 'UTC'` (the usual fix\n from when such strings were read as UTC) showed October 6th anywhere east\n of UTC. A calendar date has no zone: `timeZone` is now ignored for one,\n on screen and in exports.\n- **A cell note's corner marker sat at the grid's corner.** The marker is\n positioned against its cell, but a cell with a note was not positioned, so\n it anchored to the grid. A cell with a note is now a positioning context,\n like the active cell.\n- **A sort or filter kept every column's value on every row.** Reading one\n column built and cached an array of all of a row's values, so sorting a\n 1,000,000-row grid by one column left 1,000,000 of them behind. A plain\n `field` column is now read from the data; a computed (`fieldFn`) column\n still builds the array. The heap a sorted and filtered 1,000,000 x 9 grid\n adds went from 196 MB to 128 MB in the browser harness.\n- **`applyTransaction({ remove })` scanned the data once per row object.**\n Removing 10,000 row objects from 1,000,000 rows took about 1.8 s to find\n them; past eight objects the transaction now builds one identity map.\n- **Group footer and grand-total rows drew checkboxes.** With\n `showRowSelection`, each totals row had a row-selection checkbox, and\n ticking it selected the synthetic row. A checkbox column with no `aggregate`\n showed a checkbox too, holding a leaf's value carried over from the group\n row. Totals rows keep the selection cell for alignment but leave it empty,\n and a boolean column without an aggregate renders nothing there.\n- **Toggling a checkbox cell did not fire `onCellValueChange`.** A click or\n Space on a checkbox cell wrote the row and stopped, so an app that saves\n edits from `onCellValueChange` lost every checkbox change, and Ctrl+Z could\n not take one back. The toggle now takes the inline editor's commit path:\n one undo step, then `onCellValueChange` with the old and new value and the\n row's position in `data`.\n\n- **Arrow keys lagged whenever the active cell had to scroll.** On the\n 10,000 x 53 large-dataset demo one ArrowDown at the bottom of the viewport\n cost about 37 ms of main-thread work and painted over two frames; it is now\n about 8 ms and paints once. Five things added up. Every rendered row was\n measured with `getBoundingClientRect` on each scroll tick, on a grid that\n had no `autoRowHeight` to use the number for, which forced a table layout\n per row (about 30 per key press). The scroll geometry the custom scrollbar\n reads was pulled inside a derived at the start of the flush, forcing a\n second full table layout that the row writes then invalidated. The\n virtualizer keyed rows by their position in the window, so a one-row\n scroll rewrote all ~30 rows x every rendered column; rows are now keyed\n `index mod windowLength`, so the rows that stay keep their `<tr>` untouched\n and the one that entered is moved with a single `insertBefore`. The row\n window only updated after the browser's `scroll` event and a\n `requestAnimationFrame`, a frame after the key press; keyboard navigation\n now syncs the virtualizer inline, since it knows where it scrolled. And\n each cell carried three selection-dependent deriveds plus the fill handle's\n `{#if}`, re-marked on every move; they are one `{@const}` now, `null` for\n a plain cell. Also closed on the way: `key in editedCellValues` on a deep\n `$state` proxy created a signal per rendered cell that never went away, and\n the header checkbox's tri-state walked every row on each arrow key.\n\n- **A heat map drew a series legend in colours its cells never use.** The\n ramp on the right is its key; the row of palette chips under it (and a\n calendar's) is gone.\n\n- **A time axis put its ticks on nothing in particular.** `xType: 'time'`\n stepped a fixed 30 or 365 days from the Unix epoch, so a tick labelled\n \"2025\" stood weeks from New Year, a \"Jun 25\" tick sat mid-June, and a\n thirty-month axis carried two labels on a plot with room for eight. Ticks\n now land on calendar boundaries in UTC (days, Mondays, the first of a\n month, quarter or year, or every few years) at about one label per 90px,\n and each label is sized to the gap between ticks rather than the axis span,\n so a quarterly axis no longer reads \"2024, 2024, 2024, 2025\". The labels\n are read in UTC too: a local-time read of a 'YYYY-MM-DD' category in the\n Americas labelled every tick with the day before.\n- **The tooltip echoed the ISO date.** On a time or ordinal-time axis the\n tooltip title, the crosshair pill and the live region wrote \"2025-06-01\";\n they write \"Jun 2025\" when every category is the first of a month, \"2025\"\n when every one is New Year, and \"Jun 1, 2025\" otherwise, through\n `xAxis.formatter` when one is set. A calendar cell names its day the same\n way. The category in `onHover`, `onSelect` and `selected` is unchanged.\n- **The screen-reader table and the CSV read \"NaN\".** A NaN gap (the way a\n forecast series marks the months before it starts) wrote the word \"NaN\"\n into the hidden data table and the CSV export, and a `null` fell back to\n 0, which told a screen reader the outage month had no sign-ups. Both are\n empty cells now.\n- **\"Double-click again to clear\" left a legend chip isolated and hidden.**\n A double-click arrives as click, click, dblclick: with a chip isolated the\n first click cleared the isolation, the second hid the chip and the dblclick\n isolated it again. A click that clears an isolation is remembered for a\n moment, and the double-click that follows it on the same chip clears; on\n another chip it moves the isolation there.\n- **A radar ignored `yAxis.min` / `max`.** The rim was always the data\n maximum, so scores out of 100 filled the dial to whatever the best score\n was and two radars could not be compared. The rim honours a pinned axis,\n a value past it sits on it, and a pinned minimum is the centre.\n- **A pie sized its gutters by the widest label on either side.** Small\n slices with long names on the left kept the same room on the right for a\n \"Chrome 62%\", and the pie drew at half the radius the pane had. The\n gutters are per side, the pie sits centred in what they leave, the floor\n radius is a quarter of the short side, and each side truncates to its own\n room.\n- **A waterfall tooltip read \"$0\" on a total.** A total bar holds 0 in the\n data and its running sum in the geometry; the tooltip and the\n screen-reader table now read the drawn value. Its x labels also tilt by\n the same fit rule as a bar chart's, with the angle the renderer needs:\n they were flagged as rotated with no angle and drew truncated instead.\n- **Histogram edges read \"1.3k, 1.3k\".** Bin edges are written at the\n precision their width needs (whole numbers with separators for a 44ms\n bin, two decimals for a 0.2 bin) rather than in the compact tick form that\n gave two neighbouring edges one label.\n- **A heat map ignored `dataLabels` in the spec.** The cell label read the\n component prop alone, so `dataLabels: { show: true }` in the spec drew\n nothing. Colour legends on heat maps and calendars also round their steps\n to the precision the range earns (\"20, 94, 167\", not \"20, 93.5, 167\").\n- **The range area read as three lines.** Its band filled at the wash an\n area under a line gets, with both edges at full stroke. The band is the\n mark: it fills at 0.35 and its edges are thin.\n- **Annotate mode pinned a tooltip instead of a note** when `tooltipSticky`\n was on too; the annotate click now owns the click.\n- **Drawings on a time axis warned on every point.** The drawing tools write\n a timestamp for every pointer position, and the spec validator matched\n those against the category list. It skips the check on a time or number\n axis, as it already did for reference lines and annotations.\n- **The panel's export menu and saved-charts dialog ignored Escape.** Both\n close on Escape and hand focus back to the button that opened them.\n- **A gauge wrote \"99.2 %\".** A symbol unit (%, degrees) hugs the number; a\n word unit (\"ms\") keeps its space.\n- **The right axis title was clipped.** Its glyphs point outward under the\n rotation and ran past the edge of the SVG.\n- **Pie callout labels ran off the chart in a narrow pane.** The pie kept a\n fixed 34px margin for its outside labels whatever their length, so a\n \"Samsung Internet 3%\" in a 380px pane was clipped to \"%\" and \"Cl\". The\n radius now makes room for the widest label on each side, keeps at least a\n fifth of the short side, and hands the renderer a per-side character\n budget to truncate to when even that is not enough.\n- **The brush strip inherited the chart's titles, axis labels and marks.**\n A title and subtitle took 45 of the strip's 88 pixels and the x labels\n another 30, leaving the mini-map a five-pixel smear under an empty band.\n The brush spec now mutes titles, axis titles and labels, reference lines\n and bands, annotations, drawings, series labels and data labels.\n- **A category chart tilted its x labels by count, not by fit.** More than\n eight categories, or any label over nine characters, tilted every label\n to -40 degrees even on a thousand-pixel chart with room to spare. `auto`\n now tilts only when the widest label does not fit its slot.\n- **A heat map wrote every column label whatever the cell width**, so\n twenty-four hours at 33px a cell read \"00:0001:0002:00\". The column\n labels thin out the way a bar chart's do.\n- **A calendar labelled the padding days of the next year.** The grid pads\n the range to a full week, and a December ending on a Thursday picked up a\n \"Jan\" tick for the two padding days. Month labels stay inside the range.\n- **A waterfall could not open on a value.** A total bar always read the\n running sum, so \"Revenue 4300\" marked as a total drew as zero and every\n bar after it hung below the axis. A total with a value now sets the sum;\n a total with 0 still reads it.\n- **`rowsToChartSpec` with `topN` duplicated a category called \"Other\".**\n A real \"Other\" in the data came out beside the folded one, two categories\n with one name, which the renderer threw on as a duplicate key. The tail\n now folds into that category.\n- **A pin annotation showed \"O…\" and nothing else.** The head held\n `truncate(label, 2)`, an initial plus an ellipsis, and no label was written\n beside it. The head carries the initial and the label sits beside the pin\n like a dot's does.\n- **A chart's hidden data table took up to 17,000px of scrollable space.**\n The screen-reader table (one row per category, capped at 1,000) carried the\n visually-hidden recipe itself, but on a `<table>` `height: 1px` and\n `width: 1px` are minimums and `overflow: hidden` does not clip, so the\n table was invisible and as tall as its rows, and every scroll container\n around a chart (the demo pages first of all) scrolled on through that much\n empty space. The clip now sits on a wrapping div; the table keeps its id,\n which the svg still points at.\n- **Two ARIA faults the axe audit found.** The chart's SVG was\n `role=\"img\"`, whose children are presentational to assistive technology,\n so the focusable marks inside it (category zones, slices, a drawing) were\n a nested-interactive violation and could be skipped by a screen reader; an\n interactive chart is a labelled `group` now (a thumbnail with\n `interactive={false}` stays an image). Sankey links carried an\n `aria-label` with no role, which ARIA prohibits; they are named images in\n the focus order.\n- **A tree map ignored `spec.tree`.** The field is documented as an alias of\n `treemap` and the sunburst honoured it; the tree map read only `treemap`.\n- **An autosized chart with a side legend grew without end in a plain block.**\n `legend=\"left\"` / `\"right\"` lays the chart out as a three-row grid, and a\n grid puts a gap between every track whether or not the toolbar and brush\n rows have anything in them. The autosize maths counted a gap only for the\n chrome that existed, so in a parent that does not pin the height, the host\n measured 8 or 16px taller than the plot it was told to fit, the plot grew\n into it, and the next measurement grew again - a few hundred pixels a\n second until the page ran out. Hiding the legend at runtime had the\n opposite fault: a dimension binding keeps its last value once its element\n is gone, so the vanished legend went on being subtracted and the plot\n ratcheted down to its 120px floor. Both fixed; a fixed-height parent hid\n them, which is why the docs' sizing example never showed either.\n- **`block` did nothing on eight editors.** The prop is declared once in\n `SvEditorProps`, and its own doc comment describes the symptom: \"in a form\n grid a row of inputs each stopping at a different width reads as broken\".\n `SvDropDownList`, `SvComboBox`, `SvMultiSelect`, `SvTreeSelect`,\n `SvGridSelect`, `SvAutoComplete`, `SvTextArea` and `SvDateRangeInput`\n accepted it by type and ignored it, so they stopped at their own 200-280px\n default while the text inputs beside them filled the row. `<SvForm>` was\n also not passing it to seven of the controls it mounts - both halves had to be\n fixed for a form row to line up.\n- **`cellDataType: 'dateString'` stored a timestamp after an edit.**\n Committing ran through the shared date coercion (`new Date(v).toISOString()`),\n so picking Christmas stored `2026-12-25T01:00:00.000Z` and the cell showed a\n timestamp beside neighbours showing plain dates - on a calendar day that\n depended on the user's timezone, since the conversion went through UTC. The\n picked date is now kept as the picked date.\n- **The filter row mounted a native date input** while the cell editor mounted\n the grid's own picker, so one column looked like two different products\n depending on where you touched it. Both use the grid's picker now.\n- **`editorType: 'number'` dropped the character you were typing.** The\n editor mounted `<input type=\"number\">`, whose value sanitization reports\n `\"\"` for anything not already a valid float - so `12.` read as empty, and\n typing `12.5` produced `125`. Same for a lone `-` and `1e`. It is a\n text input with `inputmode=\"decimal\"` and a digit filter now; the trade is\n the native spinner.\n- **Cell context menus and the comment editor floated at stale coordinates\n after a scroll.** Both are positioned at raw cursor coordinates and rendered\n `position: fixed`, but neither was in the scroll effect's gate, so they hung\n over unrelated cells. The comment editor SAVES on scroll rather than\n discarding - backdrop-click and Escape are the gestures that mean \"throw this\n away\"; a scroll is not, and must not destroy typed text.\n- **The footer summary row server-rendered as empty cells.** The totals were\n assigned from an `$effect`, and effects never run during SSR - so the server\n emitted a summary row that took up space and drew its border but held no\n numbers. They appeared only after hydration (a visible pop-in), and never at\n all for a reader with JavaScript off. A grid under the aggregation cell\n limit now derives its totals synchronously, so they ship with the HTML; a\n very large grid keeps the rAF-deferred effect so it still paints before it\n totals. `pnpm ssr:check` asserts the real aggregate now.\n- **The grid painted one unmeasured frame on every mount.** `hasMeasured`\n gates the custom scrollbars, the 16px scrollbar gutter on a trailing\n right-aligned column and the top pager (which carries a `border-top`), but\n it only flipped inside the `ResizeObserver` callback - and that callback is\n deliberately deferred by one `requestAnimationFrame`, so the browser was\n guaranteed to paint a frame with those missing and correct it on the next.\n On a first load that was the \"flashing scrollbar\"; in an app that recreates\n the grid per navigation (a `{#key}` around it, or a route that remounts) it\n showed up as the grid flashing on every sort / filter / page change, with a\n stray border line. The container is now measured synchronously in the mount\n effect - before the first paint - and the observer still handles later\n resizes. Covered by an e2e regression test, since jsdom has no layout to\n miss a paint with.\n- **Pager page-size trigger rendered as a stock button until first click.** The\n closed trigger is a placeholder until the lazy dropdown chunk loads, but its\n box styling only existed in that chunk's scoped CSS, so server-rendered and\n freshly-mounted pagers showed a UA-bordered, left-hugging `<button>` inside the\n bordered box. The placeholder now gets the same rules from `SvGrid.css`.\n- **Virtualized lists no longer flash blank on a fast scrollbar-thumb drag.**\n A fast drag can move the viewport into the windowed list's off-screen padding\n faster than JS can re-render the rows there; the padding now paints faint row\n skeletons, so `SvListBox` / `SvDropDownList` stay visually filled at any scroll\n speed. Also removed an app-wide `flushSync` from the scroll handler that could\n stall the very first scroll.\n- **Dock manager auto-hide now shows every tab of a multi-tab leaf.** Sending a\n leaf with two or more tabs to auto-hide created a single edge tab; it now\n creates one edge tab per pane.\n- **Ticking one row in a large grid took over a second.** Once any row was\n selected, every change walked all rows through the lazy row list to work out\n the header checkbox. At 1,000,000 rows (jsdom) one tick went from 1.3-1.8 s\n to 4-36 ms, and select-all from 4.2 s to 0.4 s.\n- **Tab never left the grid.** Every Tab was consumed and the cursor clamped\n at the last cell, so no key moved focus out (WCAG 2.1.2). Tab on the last\n cell and Shift+Tab on the first now leave the grid.\n- **No focus indicator when the grid is reached by Tab, or under forced\n colors.** The active-cell ring stayed hidden until a click, and Windows High\n Contrast removed it (it is a box-shadow). It now shows on keyboard focus, and\n forced colors get a `Highlight` outline.\n- **The cell editor had no accessible name.** The text, number and multi-line\n editors are now labelled with their column's header.\n\n#### Security\n\n- **CSV / formula injection in exports.** `exportCsv`, `exportTsv` and the\n chart's CSV download wrote text such as `=HYPERLINK(...)` as is, which a\n spreadsheet runs as a formula. Text starting with `=`, `+`, `-`, `@`, a tab\n or a carriage return is now written with a leading `'`; numbers and signed\n numbers in text form (`-12.50`) are unchanged. `escapeFormulas: false` turns\n it off; `copyToClipboard` takes `escapeFormulas: true` to turn it on.\n\n### @svgrid/enterprise\n\n#### Added\n\n- **`print({ open: false })` returns the printable document.** `print()` and\n `printGrid()` now resolve to the HTML they built, and `open: false` skips\n the print window and dialog, for a preview pane or anything that times the\n printable view. It is a plain table, not the grid.\n\n- **PDF: `pdf.fit`, `pdf.repeatColumns` and `pdf.font`.** `fit` chooses what\n happens when the columns do not fit across the page (shrink the text, split\n the columns over pages, or both, the default); `repeatColumns` says how many\n leading columns repeat on each page of a split. `font` prints with a font\n you supply, base64 or a URL, for scripts Roboto lacks (Chinese, Japanese,\n Korean, Arabic, Hebrew, Thai, Indic, emoji); without one the export now\n warns when it sees them.\n- **PDF export in a worker: `pdf.worker` and `@svgrid/enterprise/pdf-worker`.**\n pdfmake renders in one synchronous run, about a second per thousand rows on\n a desktop machine, and on the page that froze the tab. With\n `pdf.worker: () => new Worker(...)` and a worker script that calls\n `servePdfWorker()`, the document goes to the worker as data and the page\n stays responsive: a 5,000-row export took about two seconds while the page\n kept drawing at 60 fps, with progress through `onProgress` and an abort that\n terminates the worker. A PDF of more than 2,000 rows rendered on the page now\n logs a warning that points here. `buildPdfDocData` and `hydratePdfDoc` split\n the document builder for this; `buildPdfDocDefinition` works as before.\n- **Grouped PDFs total like the grid.** Subtotals use each column's\n `aggregate` (avg, min, max, count, countDistinct, a function) instead of\n always summing, a total row closes the table (`pdf.grandTotal: false` to\n leave it out), and group names are formatted as on screen. `getColumns()` in\n `@svgrid/grid` now reports each column's `aggregate` for this.\n- **PDF: `pdf.labels`, `pdf.watermark`, `pdf.author`.** Replace the footer's\n page and date text and the subtotal and total labels; print a faint\n watermark across every page; and fill the document properties, so a viewer\n shows the report's title rather than the file name.\n- **PDF column widths follow the text.** Each column gets at least its\n longest word and the rest of the page goes to the columns with the most to\n say, instead of equal widths: a 60-row, 8-column order list went from three\n pages to two.\n- **The pivot designer's Chart view grew up.** It offers every shape a pivot\n can take (bar, line, area, lollipop, pareto, the three radial forms, pie,\n funnel, waterfall, radar, heat map, stream) in the panel's groups, with\n Stacked, 100% and Horizontal where the type uses them, the chart's own\n toolbar (PNG, SVG, PDF, print, copy), its spoken summary and a legend\n under the plot. It had six types and a Stacked box.\n\n- **`pivotToChartSpec` carries the measure's format and name.** Pass the\n value chip's `format` and the chart reads \"$470k\" on the axis and\n \"$469,662\" in the tooltip, in the measure's currency and locale; percentage\n points get a formatter that appends the sign. With one measure the value\n axis is named after it (`yAxisTitle` overrides, `null` for none). The\n designer's Chart view passes the format when its measures agree, and\n formats plainly when a layout mixes a currency and a count.\n\n- **PDF export with charts and a KPI strip.** `pdf.charts` prints charts with\n the table: a rendered chart's element is rasterised on export through the\n grid chart's PNG path, or pass an image data URL; each takes a title, a\n caption and a width, and goes above the table or below it\n (`chartsPosition`). `pdf.kpis` prints a strip of headline numbers, each a\n label over a big value with an optional coloured delta line. Roadmap\n discussion 36.\n- **The selection bar renderer, plus bulk edit.** `enableSelectionBar()`\n (or `installEnterprise`) registers the renderer behind the free\n `selectionBar` prop. The bar carries a count chip, your actions, an overflow\n menu past `maxVisible`, and Clear; at phone width it collapses to icons and\n keeps an accessible name on each. **Edit fields** opens a drawer that edits\n one or many rows at once: a field the selection disagrees on opens blank and\n stays per-row unless you touch it, so applying to 40 rows does not flatten the\n values you did not mean to change.\n- **Scheduler booking rules and conflict detection.** New model helpers\n (`overlapCount` for per-resource overlaps, `overlapsBands` for working-hours\n bands) back resource double-booking checks and business-hours enforcement.\n New demos: booking rules, financial trading hours, and HR shift coverage.\n\n#### Fixed\n\n- **A grouped Excel export slowed down with the square of its rows.** The\n writer looked up each string cell's shared-string index, and checked the\n group rows already written, by scanning an array. Both are hash lookups\n now and the file is byte for byte the same. A 10,000-row export grouped by\n five columns went from 4.8 s to 0.45 s, and 100,000 rows finish in 9 s.\n- **A sheet chart hung below the window was not drawn until a scroll.** The\n sheet measured its objects once after mount, from their anchor cells, and\n the grid now adds most of its overscan rows a frame after its first paint;\n a chart hung from a row in between had no cell to measure. While an object\n has no box, rows the grid adds now measure it again.\n\n- **A wide grid lost columns in the PDF.** pdfmake sizes a column no narrower\n than its longest word, so a 22-column report ran off the right edge and only\n 15 columns printed, without a warning. The columns are now fitted to the\n page (see `pdf.fit` above).\n- **A row taller than a page was missing from the PDF.** Rows are kept whole\n on a page, and pdfmake drops a row that cannot fit on any page. Such a row\n now breaks across pages.\n- **Conditional-format icons printed as empty boxes in the PDF.** The arrow,\n triangle and traffic-light glyphs are not in Roboto; they are drawn as\n shapes now.\n- **The PDF footer could show yesterday's date.** It printed the UTC date, so\n an export after midnight east of Greenwich was dated the day before. It\n prints the local date, and the footer follows custom page margins.\n- **Grouped PDFs dropped conditional formatting and links.** They now carry\n both, as flat exports do.\n- **Booleans printed as \"true\" and \"false\" in the PDF.** They print a tick or\n nothing, like the grid's checkbox. An icon set's `iconOnly` is honoured too:\n it printed the value next to the icon.\n- **A number or date column passed in `columns` without `align` printed\n left-aligned in the PDF.** It right-aligns from its `format`, as on screen.\n- **A pivot chart drew an empty cell as a zero bar.** An average over no rows\n is `null` in the pivot and the bridge read it as 0; it is a gap on the\n chart now. A sum over no rows stays the 0 the engine wrote.\n\n- **PDF export depended on pdfmake's fonts registering themselves.**\n `pdfmake/build/vfs_fonts` registers its font map only as a side effect of\n being imported while a global `pdfMake` already exists, and the export's\n own lookup for the map never matched the shape the module has shipped since\n pdfmake 0.2.8 (the module is the map), so it registered nothing and relied\n on that side effect. Under a bundler the global can be a stale instance (a\n dev server re-optimising its dependencies mid-session is enough), and the\n export then failed with \"File 'Roboto-Medium.ttf' not found in virtual file\n system\" while its promise never settled. The map is now found in every\n shape the module has had (`resolvePdfVfs`) and handed to the instance that\n creates the document (`registerPdfFonts`, through `addVirtualFileSystem`\n and the `vfs` property), and an installed pdfmake whose fonts module has\n no map is reported instead of failing later.\n- **Studio emitted no theme for the fragment export and the CLI `add`\n scaffolds.** Only the full app's `+layout.svelte` carried the `--sg-*` tokens;\n `eject --fragment` (which drops that file) shipped an `app.css` with one\n hard-coded accent, and `svgrid-studio add` / `add --all` wrote none at all. The\n tokens now come from one helper (`themeTokenCss`): `src/app.css` carries them\n for the full app and the fragment, and the `add` scaffolds emit them in\n `<svelte:head>`. Drop-in outputs wrap them in `@layer svgrid-studio`, so a host\n app that already defines its own tokens keeps its look. `add` also honours\n `--theme` / `--dark`, and a project with no theme picked gets Ember (the demo\n theme) instead of Tailwind.\n- **Scheduler column alignment.** The all-day lane, day/time-grid header, and\n body columns now reserve the scrollbar width consistently, so the columns line\n up instead of drifting by the scrollbar's width.\n- **Excel export color-scale conditional formatting.** A color scale's `min` /\n `mid` / `max` are optional, so the export could build an `(string | undefined)[]`\n where a `string[]` was expected; it now falls back to the same `#ffffff` /\n `#000000` defaults the grid renders with. Because `@svgrid/enterprise` ships its\n `src`, this had surfaced as a stray `svelte-check` error in consuming apps - a\n clean app now type-checks with zero errors.\n\n#### Security\n\n- **A crafted .xlsx could crash the tab.** `importData` and the spreadsheet's\n File > Open filled every gap before a cell with blanks, sized by the cell\n reference in the file: `<c r=\"ZZZZZZZ1\">` asked for about eight billion.\n `importData` now rejects a cell past column XFD; the spreadsheet skips a cell\n outside the sheet, as it does other malformed parts. Both refuse a sheet that\n would need more than ten million blank cells to lay out.\n- **A zip bomb could exhaust the tab's memory.** Every .xlsx and .ods reader\n (`importData`, File > Open, `documentFromXlsx`, `documentFromOds`) unzipped\n each part whole before looking at it, so a small file whose parts inflate to\n gigabytes was read into memory first. Parts are now unzipped as a stream and\n counted as they inflate; a file whose parts pass 256 MB together is refused\n at that point.\n- **CSV and TSV from `exportData` neutralise formula-like text**, through the\n same `@svgrid/grid` serializer (see the grid's Security entry).\n\n### @svgrid/grid-wc\n\n#### Added\n\n- **`<sv-chart>`**, the standalone chart as a custom element, at\n `@svgrid/grid-wc/chart` with React (`/react/chart`), Vue (`/vue/chart`)\n and Angular (`SvChartComponent`) wrappers. Its surface is generated from\n `SvChart`'s own props type the way `<sv-grid>`'s is from the grid's, so the\n 26 props and 7 events stay in step; `spec` is a property, the primitives\n are attributes, and a prop that takes a boolean or a string (`legend`) keeps\n a string attribute where a bare attribute means true. Its own build in\n `dist/chart` carries none of the grid.\n- **Typed event handlers.** Each wrapper's `on<Event>` prop used to be\n `(detail: unknown) => void`, so reading `newValue` meant casting first -\n a poor advertisement for a typed wrapper. The detail type is now lifted from\n the grid's own callback signature, so 16 of the 19 events arrive fully typed\n (`TData` degrades to `Record<string, unknown>`; anything referring to a\n type that only exists inside `@svgrid/grid` stays `unknown` rather than\n naming something a consumer cannot resolve).\n\n- **React, Vue and Angular components**, as subpath imports:\n `@svgrid/grid-wc/react`, `/vue` and `/angular`. Each is generated from the\n same surface as the elements, so all 98 properties and 20 events are typed\n props on every one of them and none can drift from the grid. Each framework is\n an OPTIONAL peer dependency, so a plain-HTML consumer installs none of them,\n and the wrappers are 1.3-3.7 KB gzip because they reuse the one element bundle\n rather than shipping a second copy of the grid.\n\n They exist because a raw custom element is genuinely awkward in each:\n **React 18 and earlier stringify object props onto attributes**, so\n `columns={cols}` silently becomes `\"[object Object]\"` and the grid renders\n empty; **Vue** needs `isCustomElement` build config and a `.prop` modifier\n on every object binding; **Angular** needs `CUSTOM_ELEMENTS_SCHEMA` in every\n component that shows a grid, and gets no typed inputs. The Angular wrapper is\n compiled with ng-packagr in partial-Ivy mode, so it is consumable by a normal\n Angular build, and its selector is the element's own tag - `<sv-grid>` and\n `<sv-grid-shadow>` - with no template of its own, so there is no extra wrapper\n element in the DOM and the tag is the same one you write in plain HTML.\n\n All three also handle two ordering problems a hand-written wrapper meets:\n the element renders BEFORE a framework assigns properties in an effect, and\n `apiready` fires once during that first mount - before React can bind a\n listener at all. The handle is parked on the element and each wrapper replays\n it.\n- **The package ships TypeScript declarations.** It previously had none, so\n `import '@svgrid/grid-wc'` was an error under `moduleResolution: bundler`\n and `document.querySelector('sv-grid')` came back as a bare `Element`. The\n generated `.d.ts` augments `HTMLElementTagNameMap` and\n `HTMLElementEventMap`, so the element and its events are typed without\n hand-written declarations.\n- **`<sv-grid-shadow>` - the grid in an open shadow root**, so a host page's\n CSS cannot reach it. Same properties, attributes and events as `<sv-grid>`;\n a separate element rather than an attribute because Svelte resolves\n `customElement.shadow` at compile time, so no runtime flag can switch it.\n Isolation is one-directional and the docs say so: page CSS stops at the\n boundary, but the grid's own stylesheet is still injected into the document,\n because about twenty overlay surfaces portal to `document.body` on purpose\n to escape ancestor clipping. `--sg-*` theme tokens reach in unchanged,\n including a theme file's dark variant - custom properties are inherited, and\n inheritance crosses a shadow boundary.\n- **The elements now expose the whole grid.** `<sv-grid>` declared **7 props\n and 2 events** by hand against a `Props` type with 100 props and 19\n callbacks, so grouping, pagination, pinning, tree data, master/detail, board,\n scheduler and every Enterprise feature were unreachable from a non-Svelte\n host - while the docs said they \"all come along\". The surface is now\n **generated** from `<SvGrid>`'s own types: **98 properties** (72 with\n kebab-case attributes, 26 property-only) and **20 events**, with CI failing if\n the two drift. Costs 1.6 KiB gzip.\n- **Every grid callback is a DOM `CustomEvent`**, `detail` being the\n callback's argument - or, for the one callback taking two, an object keyed by\n its parameter names. `onApiReady` also parks the imperative handle on the\n element as `el.api`, because an event fires once and a host binding a\n listener later would otherwise never reach it.\n\n#### Fixed\n\n- **Importing the package on a server threw `customElements is not defined`.**\n Svelte registers each element with a bare top-level\n `customElements.define(...)`, so any server-rendered React app\n (TanStack Start, which Lovable now generates, Next.js, Remix) crashed on\n `import { SvGrid } from '@svgrid/grid-wc/react'`. The build now guards the\n registration; on a server the import is inert and SSR emits a plain\n `<sv-grid>` that upgrades on hydration. Guarded by `test/ssr.test.ts`.\n- **The React wrapper lost props the grid reads once at mount.** It wrote\n props in a passive `useEffect`, which runs after paint; the element mounts a\n microtask after insertion, so it had already mounted with defaults and\n `pageSize={25}` showed 10 rows a page (the wrapper's own pagination example\n did). Props are now written in a layout effect, before the element mounts.\n The same change in the `<sv-chart>` wrapper.\n- **`style` on the React wrappers took `Record<string, string | number>`,** so\n passing a React `CSSProperties` object failed to type-check. It is\n `CSSProperties` now.\n- **The React wrapper re-did all its work on every parent render.** Both of its\n effects had no dependency array, so any state change anywhere in the parent\n reassigned all 98 properties and rebound all 20 event listeners - 40 listener\n mutations per keystroke. It now writes only values that actually changed and\n binds listeners once through a handler ref. Measured: 20 no-op re-renders\n produce 0 listener adds, 0 removes and 0 property writes.\n\n- **The element threw when it rendered before its props were assigned.**\n Generating the prop list replaced the elements' own `data = []` /\n `columns = []` defaults with a bare `$props()`, so a consumer that assigns\n properties AFTER the element upgrades - which is what React and Angular both\n do, in an effect - got\n `TypeError: Cannot read properties of undefined (reading 'map')` and a grid\n that never rendered. Only a real framework app was late enough to reproduce\n it; an HTML fixture sets the properties in the same tick and never sees it.\n\n#### Changed\n\n- **Only arrays, objects and functions changed shape: they are property-only.**\n An HTML attribute is a string, so `columns='[object Object]'` cannot work\n and no attribute is offered for the 26 props that are not primitives. The\n published `rowclick` and `selectionchange` events keep the exact\n `detail` they shipped with, and `selectable` keeps meaning row-selection\n checkboxes - `<SvGrid>`'s prop of that name is an alias of\n `enableCellSelection`, and forwarding it would have silently repointed a\n published attribute at a different feature.\n- **Styles arrive with the code that needs them.** The build used to put every\n stylesheet in the bundle, lazy chunks included, into the entry, so a page\n that never opened the chart, a date picker or a menu still downloaded their\n CSS. Each chunk now carries its own styles and adds them to the document\n and to every open shadow root when it loads. `<sv-grid>`'s entry went from\n 107 KiB to 98.5 KiB gzip while the chart grew.\n\n### Tooling & docs\n\n#### Added\n\n- **Every chart gallery demo switches between Chart and Grid.** A segmented\n control first in each demo's toolbar flips every pane to a sortable grid\n of the rows the chart was drawn from, and back, the way the board demos\n switch Board and Table. The from-the-grid page shows the pattern in a\n runnable.\n\n- **Charting a pivot is documented.** The pivot page has a section on\n `pivotToChartSpec` (the mapping, every option, a runnable that pivots\n orders and charts them by quarter) and on the designer's Chart view\n (`chartable`, `defaultView`); the charts hub and the from-the-grid page\n link to it, the /api pivot section lists the function, and the generated\n reference covers `pivot-chart.ts`. Demo 359's data now puts every\n country in every quarter and category, so its groups are four bars, not\n one.\n\n- **27 runnable framework examples**, nine each for React, Vue and Angular:\n a first grid, sorting and filtering, editing and saving, row selection,\n grouping and totals, pagination, server-side data, theming, and Excel export\n from the Enterprise pack. Every one has\n an **Open in StackBlitz** button that boots a full editable project - no local\n install - and a new\n [React, Vue or Angular](/docs/help/web-components/frameworks) landing page\n puts the thirty-second path first.\n\n They are real apps in the repository (`packages/grid-wc/examples/`), not\n snippets, and CI compiles all of them with each framework's own compiler -\n including `ngc --strictTemplates`, so a wrong Angular binding fails the\n build. The doc listings are generated from those files, so a page cannot\n describe a version of an example that no longer exists.\n\n The Vue templates get an extra check of their own: Vue treats an unknown\n attribute as a legal fallthrough, so `<SvGrid sortabel />` type-checks\n cleanly and silently does nothing. Verified - the same typo fails the React\n and Angular compilers and passes `vue-tsc` - so the Vue examples are also\n checked against the generated surface.\n\n- **A Web Components docs category.** Eight pages under\n `help/web-components/` - quick start, a generated `<sv-grid>` reference,\n shadow DOM, React, Vue, Angular, TypeScript and limitations - replacing a\n single page that was filed under \"Layout & Styling\". The reference tables are\n generated from the grid's types, and a guard checks that the counts quoted in\n prose still match the surface.\n- **The docs run.** A `svelte` code fence tagged `{runnable}` is extracted at build time\n into a real component, so a doc page shows the source and the working result\n together rather than highlighted text. 504 examples across the corpus, taking\n the median doc page from 1 example to 3; each one is compiled by `svelte-check`\n in CI, so an example that stops working fails the build instead of rotting in\n place.\n- **`@svgrid/ui` recipe scaffolder** - `npx @svgrid/ui add <component>` drops a\n ready-to-edit starter (e.g. `add calendar`) into your app, complementing the\n shadcn-style component pages (Preview / Code, install tabs) across the UI kit.\n- **See a component before you wire it in** (`@svgrid/ui` 0.3.x).\n `npx @svgrid/ui try <component>` spins up a zero-setup Vite + Svelte sandbox and\n opens the component in your browser; `add --preview` writes a\n `src/routes/preview/<id>` route (plus a `/preview` index) in a SvelteKit app.\n `add` now installs `@svgrid/grid` by default (`--no-install` to opt out) and\n prints the exact `try` command for whatever you just added, so the \"see it\"\n step is never a dead end.\n- **AI coding Skill** (`skills/svgrid`, installable with\n `npx skills add sv-grid/sv-grid`) - an always-on house-style guidance layer\n that complements `@svgrid/mcp`.\n- **The rest of the toolkit is findable.** `packages/grid/README.md` gained an\n \"Also in the box\" section, and the site footer gained a **Toolkit** column\n (SvGrid UI, Kanban board, Scheduler, Dock layout, Studio, Web components).\n The 84 SvGrid UI components have always been exported from `@svgrid/grid`\n itself - `SvButton`, `SvCalendar`, `SvDateTimePicker`, `SvDockLayout`,\n `SvToaster` and the rest are already installed for every grid user - but\n nothing on the highest-traffic surfaces said so.\n\n#### Changed\n\n- **Doc examples show code and result at once.** The runnable card used to be a\n Preview / Code toggle with an in-page editor; it is now the source above the\n live example, both visible, with Copy. A tab hides half of a teaching example\n and makes comparing the two a click, and dropping the editor took the\n on-demand TypeScript compiler chunk off every docs page with it.\n- **`npm create @svgrid` starts on Ember** (the demo theme) instead of Tailwind,\n for every template; `--theme <id>` still picks any preset. The `sveltekit`\n template is now listed on the starters page, and the `sv add @svgrid` demo route\n imports the Ember stylesheet so it no longer renders unthemed.\n\n#### Fixed\n\n- **`build:lib` in the enterprise package deleted the node bundle.**\n `svelte-package` wipes `dist/`, so a library build alone removed\n `dist/node/studio.js` and the MCP server failed to start until\n `build:node` was run by hand. The library build rebuilds the bundle it\n removed.\n\n- **Docs images and tutorial media 404'd under a site base.** The markdown\n writes them root-absolute (`/docs-media/...`, `/tutorials/...`), which is\n right at svgrid.com and wrong under the `/sv-grid/` base the e2e server\n uses: every docs image and tutorial poster was missing there. The page\n prefixes the base in the HTML before it paints, and an e2e spec loads a\n page with both and checks nothing under those roots 404s.\n\n- **Twenty-one links on the chart pages went to GitHub 404s.** The split\n wrote every cross-link with one `../` too many, and the site's link\n resolver falls back to a GitHub URL for a page it does not know. Fixed on\n the pages, and every relative link under docs/ is now a test\n (`tools/docs-relative-links.test.ts`); the link checker existed but only\n ran by hand before a release.\n- **Links into the generated reference tree went to GitHub too.** The tree\n is hidden from the docs routes; a link to it lands on the /api page, on the\n module's section where it has one.\n- **The chart gallery said \"the source is under each example\" and it was\n not.** Each gallery card now carries the demo's own script and markup on a\n Code tab, written by `tools/gallery-doc-code.mjs` from the demo file and\n guarded by a drift test, so the code beside a preview is the code that\n renders it.\n- **A demo page flattened a bulleted banner into one paragraph**, dashes and\n backticks included. The page reads the pitch as blocks: a list where the\n banner wrote one, `<code>` where it wrote backticks, on the prerendered\n and the hydrated page alike.\n- **`demo-doc-embed` skipped a demo the page only linked to**, so a\n placement for it never landed, and it opened a new \"More examples\" section\n below \"See also\", which the coverage test requires to be last. Present\n means embedded, and the section opens above \"See also\".\n- **Regenerating the doc snippets took the dev server's file watcher with\n it.** The extractor removed and recreated its output directory, and on\n Windows the watch did not re-attach, so an edited runnable kept serving\n its old chunk while the source beside it showed the new code. It writes in\n place and removes only what no longer belongs.\n- **The Getting started chart page had no live example.** Its code blocks\n were `ts` and a Svelte block referencing rows it never declared; four of\n them run now, and the hub's first example runs with its own rows and a\n filter row, so the chart is seen following the grid.\n\n- **The e2e suite adopted any server on :5180.** Playwright reuses whatever\n answers on the port, and a Vite dev server returns the app shell for any\n path, so a website dev server started by hand (base `/`) passed the\n readiness check and the fourteen path-routed and module-importing specs\n failed with nothing pointing at the server. The config now probes the port\n first (`tests/e2e/lib/site-server-probe.mjs` reads the base off Vite's\n client script tag), reuses a server that serves the site under `/sv-grid/`,\n skips one that serves anything else with a line saying so, and starts its\n own on the next free port; `SVGRID_E2E_PORT` pins one.\n- **The website dev server re-optimised dependencies mid-session.** The\n search index, the docs renderer, the /api runner's compilers, the PDF\n exporter and the grid's `esm-env` sit behind dynamic imports the start-up\n scan does not reach, so the first page to touch each one triggered\n \"optimized dependencies changed. reloading\" on every open page. In the e2e\n suite that reload landed mid-test on a cold cache and failed whichever spec\n was on a page at the time. They are pre-bundled at start-up now\n (`optimizeDeps.include`), and `esm-env` is a declared devDependency of the\n website so it resolves from there.\n- **The /api runner check sampled an example's outcome two frames after\n Run.** An example awaiting an export or a fetch was still running, so a\n failure that arrived later, or one thrown inside a library callback the\n runner's try/catch cannot see, passed. The check now waits for the runner\n to report an outcome and counts an uncaught error or rejection during the\n run as a failure of that example.\n- **181 doc pages had content stranded below \"See also\".** Authoring passes\n appended new sections to the end of the file, which buried them under what\n reads as the page footer: on `help/filtering/number-filter`, for instance, the\n `between` example sat below the link list and a reader would never reach it.\n The footer is back at the bottom on every page, and a test now fails if a\n section lands under it.\n- **The documented way to lock one column's width never worked.**\n `docs/help/columns/column-sizing.md` matched headers on `data-col-id`, which is\n the attribute on *body* cells - the selector matched nothing. Header cells\n carry `data-svgrid-header-col`. (`ColumnDef.resizable` is now the real answer.)\n- **`blockKey` was missing from `tools/lib/md-snippets.d.mts`.** The function was\n exported from the `.mjs` and worked at runtime, so nothing caught it until the\n website was type-checked.\n- **`@svgrid/mcp` reports its real version.** The MCP server's\n `serverInfo.version` was hardcoded to `0.1.0`; it now reads the package version.\n- **`@svgrid/create-studio` scaffold builds out of the box.** The generated app\n shipped an orphaned `/products` route referencing an entity that was never\n defined; the `Product` schema, seed, data source, nav, and home card are now\n complete, so `npm run build` succeeds on a fresh scaffold.\n- **API-docs accuracy pass across all 74 UI-component pages.** Corrected the\n `SvDockLayout`, `SvDockManager`, and `SvDateTimePicker` prop tables (added 13\n missing dock-layout props; removed a `size` prop `SvDateTimePicker` never had),\n and filled scattered gaps (`loading`, `onClosed`, `min` / `max`, `dir`,\n `width` / `height`, `ariaLabel`, and the shared field-contract on\n `SvFileUpload`).\n\n### @svgrid/mcp\n\n#### Changed\n\n- **A cold `npx -y @svgrid/mcp` installs 20 packages instead of 111.** The\n server speaks MCP over stdio itself instead of through\n `@modelcontextprotocol/sdk`, whose HTTP and OAuth dependencies (Express, Hono,\n JOSE, AJV) a stdio server never runs. On an empty npm cache the install took\n 6 to 8 seconds instead of 12, which had left little room under an MCP client's\n 30 second connect timeout. The protocol is unchanged: version negotiation,\n errors and every tool, resource and prompt answer as before.\n\n## [1.0.0] - 2026-06-16\n\nInitial public release - the Svelte 5-native data grid: `@svgrid/grid`\n(MIT core) and `@svgrid/enterprise` (the paid feature pack).\n\n### @svgrid/grid\n\n- **New** `onCellValueChange` callback on `<SvGrid>`. Fires after every\n inline edit commits with `{ rowIndex, columnId, oldValue, newValue,\n row }`. The recommended hook for server-side persistence and cascading\n recomputes; see demo `18-cascade-editing` and\n [Saving values](./help/editing/saving-values.md).\n- **New** `externalSort` + `externalFilter` props. Grid records the UI\n state but does NOT re-order / filter rows - the consumer owns the\n pipeline. Paired with `onSortingChange` / `onFiltersChange` for\n server-side data and tree-data scenarios.\n- **New** `onSortingChange(sorting)` / `onFiltersChange(filters)`\n callbacks. Fire on every change with the consolidated payload shapes\n documented in the [SvGrid reference](./reference/SvGrid.md).\n- **New** `onRowSelectionChange(selection, rows)` and\n `onActiveCellChange(cell)` callbacks.\n- **New** `fitColumns` prop. Scales column widths to fill the viewport,\n with rounding-residue absorbed in the last scalable column. Shrinks\n down to 85 % of natural widths; beyond that a horizontal scrollbar\n appears.\n- **New** `showRowNumbers` prop. Leading 1-based row-number column,\n rendered before any selection column.\n- **New** `pageSize` prop on `<SvGrid>`. Initial page size for the\n built-in pager.\n- **Improved** column virtualizer now detects per-item size changes,\n not just total size. Fixes a regression where resizing a column under\n `fitColumns` left other columns stale.\n- **Improved** the wrapper-managed filter pipeline no longer applies\n filters to the pre-paginated view - the filter UI always sees the\n full dataset, not just the visible page. (Removed\n `paginatedRowModel` from the engine pipeline; pagination is applied\n AFTER filters by the wrapper.)\n\n### @svgrid/enterprise\n\n- **New** package. The paid feature pack adds:\n - **Export** to xlsx / pdf / csv / tsv / html, with theme-matched\n styles, multi-sheet workbooks, header + footer with logo, embedded\n cell images. See [Export](./help/export.md).\n - **Print** with repeat-on-page headers, optional cover page,\n page-size + orientation.\n - **Import** from xlsx / csv / tsv / json with column mapping +\n per-row validation. See [Import](./help/import.md).\n - **AI assistant**: provider-agnostic helpers for natural-language\n filter, smart fill, summarize, and classify. Bring your own model\n adapter. See [AI](./help/ai.md).\n - **Pivot tables** via `createPivotModel(data, config)` and\n `pro.pivot.build(config)`. Row + column axes, 8 built-in\n aggregators or custom, grand-total row + column, subtotals,\n custom axis sort. See [Pivot tables](./help/pivot.md).\n- **New** `installEnterprise(api)` augments a `SvGridApi` with `exportData`,\n `print`, `importData`, `ai.*`, and `pivot.*` methods.\n- **Soft-gated licensing**: features run unlicensed but the grid shows\n a small watermark + a one-time console nudge. `setLicenseKey('SVENTERPRISE-…')`\n at app startup clears both.\n\n### Examples gallery\n\n- **New demos** (56-59): theme-matched export, branded export with\n header + footer + logo, export with cell images, multi-sheet export.\n- **New demos** (52-pivot-table, 51-ai-assistant, 53-excel-import):\n reference implementations for each Enterprise feature.\n- **New demos** for industry verticals: stock market (live ticks),\n HR team, finances ledger, industrial IoT, localization, CSP\n compliant, accessibility, cascade editing, server-side rendering,\n industrial dashboard, healthcare EMR, logistics, compliance queue,\n field service, gantt, scheduler, CRM, admin dashboard, seller panel.\n- **New** \"Source\" button on every demo opens the raw `.svelte` file\n in a modal with a Copy-to-clipboard button. Wired via\n `import.meta.glob('../demos/*.svelte', { query: '?raw' })` so it\n picks up new demos automatically.\n\n### Docs\n\n- **New** [Enterprise feature pack](./enterprise/README.md) landing page.\n- **New** [API reference](./reference/index.md) with hand-curated\n pages for `<SvGrid>`, `SvGridApi`, `ColumnDef`, features, and the\n full Enterprise surface.\n- **New** [Why headless?](./why-headless.md) explains the layered\n architecture and when to drop down to the headless core.\n- **New** [Tailwind integration](./help/tailwind.md) walks the\n `--sg-*` token surface, dark-mode wiring via `data-theme`, and the\n override hooks for the stable `.sv-grid-*` class names.\n- **Split** [Getting started](./getting-started.md) into six short\n pages (install / first-grid / data-and-columns / features /\n theme-and-density / going-to-production); the old single-page\n version is preserved at\n [getting-started-full.md](./getting-started-full.md).\n- **Cleaned** every code sample against the live library surface.\n Removed phantom APIs: `state={...}`, `rowModels={...}`,\n `initialState={...}`, `manualFiltering`, `manualSorting`,\n `manualPagination`, `onColumnFiltersChange`, the wrapper `getRowId`\n prop, per-column `enableSorting` / `enableColumnFilter` /\n `enableGrouping` flags, the never-shipped\n `@svgrid/grid/themes/default.css` import.\n- **Em-dashes globally swept to hyphens** (`-` → `-`) across all\n source-controlled text. Codified as a rule for new content.\n\n## How we version\n\n| Tier | What it means |\n| ----------------- | -------------------------------------------------------------------------------------------------------------- |\n| **Major** (1.x) | Breaking change to a Stable API. Includes prop / method renames, type-narrowing, default-behaviour changes. |\n| **Minor** | New Stable API. New Experimental API. New demo. Doc rewrites that touch the public-facing claims. |\n| **Patch** | Bug fixes. Type-only fixes. Internal refactors with no public surface change. Doc typo fixes. |\n\nThe [API stability page](./help/api-stability.md) annotates each export\nwith its current tier (`Stable`, `Experimental`, `Internal`). As of 1.0,\n`Stable` APIs follow semver; `Experimental` APIs may still change in a\nminor release.\n"
|
|
4392
4392
|
},
|
|
4393
4393
|
{
|
|
4394
4394
|
"slug": "compliance/audit-log",
|
|
@@ -5060,7 +5060,7 @@ export const docs = [
|
|
|
5060
5060
|
"path": "docs/help/benchmarks.md",
|
|
5061
5061
|
"title": "Performance benchmarks",
|
|
5062
5062
|
"section": "Help",
|
|
5063
|
-
"markdown": "# Performance benchmarks\n\nEvery number on this page is produced by a checked-in script:\n\n| Table | Command | Where it runs |\n| -------------------------- | --------------- | ------------- |\n| Bundle size | `pnpm size` | Node |\n| Sort / filter / group, memory | `pnpm bench` | Node |\n| First paint, scroll | `pnpm bench:dom` | Chromium |\n\nAn earlier version of this page published a table of timings that no\nscript produced, and told readers to reproduce them with a `pnpm bench`\ncommand that did not exist. Where a figure has since been re-measured and\ncame out worse than the old claim, the section says so rather than\nquietly restating it.\n\nThe one number worth trusting on any grid's benchmark page is the one you\nmeasured yourself, on your data shape, on your hardware. The\n[benchmark harness recipe](../recipes/benchmark-harness.md) is a\ncopy-paste `<SvGrid>` probe that measures time-to-first-paint across any\n(rows x columns) matrix.\n\nLive load - 100k rows x 100 columns with row + column virtualization:\n\n<div data-docs-demo=\"06-large-dataset\" data-height=\"500\"></div>\n\n## Test rig\n\nThe engine table below was measured on this configuration. Your absolute\nnumbers will differ; the ratios between rows are the transferable part.\n\n| Component | Spec |\n| --------- | ------------------------------------------------ |\n| Machine | Developer workstation, win32 x64. Not a dedicated bench rig |\n| Engine | Node v24.18.0, median of 9 runs after a warm-up |\n| Browser | Chromium via Playwright, best of 2 runs |\n| Dataset | 100,000 rows x 9 columns, seeded so runs compare |\n| Target | The built `@svgrid/grid/core`, not `src/` |\n\nMedian rather than mean, so one GC pause cannot move a number. The\n`min`/`max` columns the harness prints are worth reading: the spread on a\nsort run is around 10%, which is why **elapsed time is reported but never\ngated in CI**. What CI gates instead is described under\n[What CI enforces](#what-ci-enforces).\n\n## Bundle size\n\nProduction build, gzipped, Svelte excluded as a peer. The table is\ngenerated from `docs/_data/svgrid-size.json` by `node tools/sync-guide-facts.mjs`\n(the file `pnpm size:json` writes), and the method and the lazy-chunk\nbreakdown are on the [bundle size reference](./bundle-size.md). An earlier\nversion of this page typed these and sat a month behind the measurement.\n\n<!-- size:start -->\nRe-measured **26 Oct 2026** at `@svgrid/grid` 3.0.25 with the script that ships in the repo (`pnpm size:json`):\n\n| Target | Base JS (gzip) | CSS (gzip) | Loaded on demand |\n| --- | ---: | ---: | ---: |\n| Headless core (`createSvGrid`) | **3.2 KB** | - | - |\n| Headless subpath (`@svgrid/grid/core`) | **10.0 KB** | - | - |\n| Full render component (`<SvGrid>`) | **99.8 KB** | **11.3 KB** | **197.4 KB** |\n| Standalone chart (`<SvChart>`) | **71.9 KB** | - | **15.0 KB** |\n<!-- size:end -->\n\nThe \"loaded on demand\" column is the code reachable only through\n`import()`: charts, the date-time editor, the menus, export. Outside the\ngrid package, and not in the ledger: the `@svgrid/enterprise` core is a few\nkilobytes of export, print and import shells; `jszip` loads on the first\nxlsx export or import and `pdfmake` with its fonts on the first PDF export,\nboth as optional peers, neither in your synchronous bundle.\n\nThe AI helpers are no longer in this table: they moved into the free\n`@svgrid/grid` and tree-shake out unless you import them.\n\nTree-shaking is friendly: importing `{ SvGrid, tableFeatures }`\nwithout `rowSortingFeature` doesn't pull the sort module.\n\n## First paint\n\n**Measured.** Run `pnpm bench:dom`. Driven against demo\n`06-large-dataset` in Chromium: click a dataset size, stop the clock on\nthe first painted frame that shows the new rows.\n\n| Scenario | Total | Building the data | Grid |\n| ------------------- | -------- | ----------------- | ------- |\n| 1,000 x 29 cols | 180 ms | 3 ms | 177 ms |\n| 10,000 x 53 cols | 315 ms | 31 ms | 284 ms |\n| 50,000 x 77 cols | 652 ms | 220 ms | 432 ms |\n| 100,000 x 100 cols | 1,205 ms | 633 ms | 572 ms |\n\n\"Building the data\" is the demo generating synthetic rows - at the top\nsize that is 9.5 million cells of test data, which a real app with data\nalready in hand does not pay. \"Grid\" is the remainder.\n\n**\"Grid\" overstates the grid's own cost, and by a lot.** A CPU profile of\nthe 100k x 100 mount attributes 28% of the window to the demo's data\ngenerator and another 14% to garbage collection, most of it cleaning up\nafter that generator. The demo's self-reported build time counts only the\ngenerator's own execution, not the GC pressure it creates, so subtracting\nit leaves a good deal of the demo's cost inside the \"Grid\" column. Roughly\nhalf the total is the harness rather than the component.\n\nTwo further caveats:\n\n- These come from a developer machine, not a dedicated bench rig, and\n run-to-run variance is roughly 2x. Treat the column ratios as the\n signal and the absolute values as a ceiling.\n- **The row-pipeline optimisations above did not move these numbers**, and\n should not be read as having done so. Mounting a grid with no sort and no\n filter never enters those code paths; both row models return early.\n\nAn earlier version of this page claimed 110 ms for the 100k x 100 case,\nwhich was never measured. Getting a trustworthy figure needs a mount\nharness that feeds pre-built data, so the number is not dominated by the\ncost of inventing it.\n\n## Scroll performance\n\n**Measured.** Run `pnpm bench:dom`. Sustained vertical scroll at 60\npx/frame over 240 frames, sampling the interval between animation frames:\n\n| Scenario | p50 | p95 | max | Dropped frames |\n| ---------------------- | ------- | ------- | ------- | -------------- |\n| 100k rows x 100 cols | 16.7 ms | 17.7 ms | 18.8 ms | 0 of 240 |\n| 1,000,000 rows x 9 cols | 16.7 ms | 18.1 ms | 19.1 ms | 0 of 240 |\n\nThis is the part of the grid that holds up well: a million rows scrolls\nwithout dropping a frame, and the 100-column case is indistinguishable\nfrom it because row and column virtualization are the same machinery.\n\nRead the numbers correctly, though. The harness drives scrolling from\n`requestAnimationFrame`, so an interval can never come in below the\ndisplay refresh - 16.7 ms on a 60 Hz panel is the floor, not a\nmeasurement of how cheap a frame is. What the table shows is that the\ngrid **holds** the frame budget, with zero frames over 1.5x the median.\nIt cannot show headroom above 60 fps.\n\nAn earlier version of this page claimed a p95 of 8 ms and \"~120 fps\".\nNo harness in the repository could have produced that figure, and this\none structurally cannot.\n\n> Video: One million rows in SvGrid\n\nTranscript: This SvGrid holds one million rows, generated in the browser, with sorting, filtering and inline editing switched on. Rows are virtualized, so only the ones in view are drawn. Scroll, and the frame rate stays flat. Jump anywhere in the set. The row numbers show the scale, and the grid keeps every row reachable. Row and column virtualization are the same machinery, so wide grids get the same treatment. Nothing to configure.\n\n## Sort, filter, group\n\n**Measured.** Run `pnpm bench` to reproduce. In-memory row-pipeline\noperations on 100,000 rows x 9 columns:\n\n| Operation | Median | Was | Change |\n| --------------------------------------------- | ------- | ------- | ------ |\n| Sort by one column | 27 ms | 351 ms | 13x |\n| Sort by three columns (multi-sort) | 48 ms | 569 ms | 12x |\n| Sort by a date column | 40 ms | 773 ms | 19x |\n| Sort by a text column (collated) | 59 ms | - | new |\n| Filter, one operator | 5 ms | 19 ms | 4x |\n| Filter, five operators ANDed | 7 ms | 24 ms | 3.5x |\n| Filter via the compiled Excel filter | 3 ms | - | new |\n| ... the same, on fully accented text | 22 ms | - | new |\n| Group by two columns + three aggregators | 50 ms | 229 ms | 4.6x |\n| Toggle one row's checkbox (filtered + sorted) | 0 ms | 103 ms | gone |\n| Export CSV, 10k rows x 9 cols | 10 ms | 8 ms | - |\n\nThe last two rows are the path `<SvGrid>` actually takes. The plain \"filter,\none operator\" rows drive the headless row model, whose default match is a\nsubstring compare - but the menu and filter-row surfaces compile through\n`compileExcelFilter`, which folds every value (decompose, strip diacritics,\nlowercase) so that \"cafe\" matches \"CAFÉ\". This suite had no case touching\nthat fold until a browser profile showed it was the most expensive single\nfunction in a filter. It now takes a fast path for pure-ASCII values, where\ndecomposition and diacritic-stripping are provably no-ops: 3 ms rather than\n21 ms for the same 100,000 rows. Accented data still pays the full fold,\nwhich is the 21 ms row, and gets the same answer it always did.\n\nEach case runs in a **fresh process**. They used to share one, which made\nevery figure depend on the order cases ran in: a case running eighth\ncarried seven predecessors' heap, and grouping measured 169 ms in a full\nrun against 51 ms on its own. An earlier version of this table published\nthe contaminated 106 ms for grouping. Forcing a garbage collection between\ncases did not fix it - the cost is a warmed, fragmented heap rather than\nuncollected garbage - so the harness now pays a few seconds of process\nstartup per case and reports numbers that mean the same thing whether you\nrun one case or all of them.\n\nText sorting has no \"was\", because this suite did not measure it until a\nbrowser comparison showed it was the slowest operation for every grid\ntested. Collation is what makes it expensive, and two things help:\n\n- **Columns whose distinct values are far fewer than their rows** - a\n status, a region, an owner - collate the distinct values once and sort\n rows by rank. That is what took the three-column case to 48 ms. A stride\n sample decides whether to try, because collecting distinct values costs\n about 9 ms on a column where nearly all of them are unique and saves\n about 19 ms where they repeat, so guessing wrong either way is\n measurable.\n- **`localeCompare` rather than a hoisted `Intl.Collator`.** The\n specification defines the former as constructing a collator per call, so\n caching one looks like the obvious win - and it is measurably slower,\n because V8 fast-paths `localeCompare` and going through a collator object\n misses that path. 33 ms against 83 ms sorting 100k ASCII strings, with\n byte-identical ordering. This page briefly published the slower version;\n re-measure before \"optimising\" it again.\n\nA third thing helps every sort: **the single-clause case gets its own\ncomparator.** Most sorts are one column, and the comparator runs O(n log n)\ntimes - 1.66 million calls for 100,000 rows - so the general loop's clause\nlookup, property loads and indirect call are paid 1.66 million times for\nvalues that never change. Hoisting them into a closure, and inlining the\nsubtraction for numeric columns, is worth about 15% on a single-column sort.\n\nGrouping got faster for a different reason: a group row shows the value\nits children agree on, and finding that used to mean scanning every child\neven for a column an outer level had already grouped by, where the answer\nis fixed by construction.\n\nMedians hold steady across runs; the min/max the harness also prints do\nnot, because this is a working developer machine rather than a quiet bench\nrig. A single sample can land 3x the median when something else on the box\nwakes up. That noise is the whole reason CI gates counters instead.\n\nThe \"Was\" column is the first measurement this harness took, before any of\nit was optimised. Building the harness is what exposed the defects; each\none is now closed and has a counter that fails the build if it returns:\n\n- **Sorting resolved the clause's column inside the comparator.** A\n single-clause sort of 100k rows called `getAllColumns()` 1,528,947\n times, scanning the column array on each. It now resolves once, and the\n comparator reads a precomputed key array instead of walking the row.\n- **The date comparator allocated two `Date` objects per comparison.**\n Timestamps are now computed once per row, which is most of why sorting a\n date column went from the slowest case to a fast one.\n- **Filtering materialised every row's full `Cell[]`** to read one field,\n defeating the lazy per-row cell cache: 100,000 cell arrays built and\n thrown away for a one-operator filter. Now zero.\n- **Toggling a checkbox re-ran the whole pipeline.** `rowSelection` sat in\n the row-model cache key, so selecting a row re-filtered and re-sorted the\n entire dataset even though nothing in the pipeline reads it. Selection is\n now free.\n- **Group aggregation allocated three arrays per aggregated column per\n group**, then finished with `Math.min(...values)`. It is a single pass\n now. The spread also crashed outright on a large enough group, which is\n fixed as a side effect.\n- **Text sorting collated on every comparison.** Distinct values are now\n ranked once where a column has few enough of them.\n\nNumbers here will move; the command that produces them will not.\n\n## Streaming updates\n\n**Measured.** Run `pnpm bench --case=tick-1k-of-100k-sorted` to reproduce.\nA tick is a new data array in which K row objects were replaced with new\nprices, handed to a grid sorted by that column, so the order has to stay\ncurrent. 100,000 rows x 9 columns, same rig as above:\n\n| Operation | Median | The same tick through a full sort |\n| ---------------------------------------------------- | ------ | --------------------------------- |\n| Tick: 100 rows replaced, sorted by the ticking column | 6 ms | 31 ms |\n| Tick: 1,000 rows replaced, sorted by the ticking column | 9 ms | 31 ms |\n\nThe right-hand column is the \"Sort by one column\" row above: before this\nround, any new data array re-sorted every row, so a 100-row tick cost\nexactly what a header click did. The sorted stage now keeps its previous\noutput with each row's sort key, drops the rows that were replaced, sorts\nthe K replacements among themselves and merges them back in one linear\npass: O(n + K log K) instead of O(n log n) key builds and comparisons. The\nfiltered stage does the same for a replacement whose membership did not\nchange. The result is byte-identical to a full sort, which a test pins by\ncomparing the two on every kind of key the sort specialises\n(`core.tick-repair.test.ts`).\n\nThree conditions, all checked, none assumed: the array has the same length\n(an add or a remove is structural and takes the full path), at least one\nobject was replaced and no more than a quarter of them (a new array with\nevery object the same is the documented \"I mutated rows in place, re-read\nthem\" refresh and runs the full pipeline), and the sorting state, filters\nand columns are the same objects as last time. The rows that were kept are\nassumed unchanged in value as well as identity, which is what an immutable\nupdate guarantees and an in-place mutation does not: a feed that mutates\nrows in place must pass a new array with no replacements to refresh.\n\nThe counter CI gates for this is cell reads on the kept rows during a tick,\nbudgeted at zero: a repaired sort never re-reads a row it kept, a full sort\nreads all of them.\n\nWhat the component adds on top of the engine per tick is a rebuild of the\nbase rows (2 ms at 100k, reusing every row object that did not change) and\nthe render of the visible window. Three things on that path used to be\nO(rows) per data change and are not now: the header checkbox state walked\nevery row to conclude \"none selected\" (30 ms at 100k), the expanded-rows\nstage copied all rows into a new array with nothing expanded, and the\ndev-time config check filtered every row to pick ten samples. The browser\nharness in the [comparison](./comparison.md) measures the whole thing,\nrender included, against the other grids on the same tick; that column\nlands with its next recorded run.\n\n## Spreadsheet engine\n\n**Measured.** Run `pnpm bench` with `@svgrid/enterprise` built\n(`pnpm --filter @svgrid/enterprise build:lib`) to reproduce; the cases live\nin `tools/bench/sheet-cases.mjs`. These were taken on a CI-class Linux\ncontainer with Node v22, not the workstation the table above used, so\ncompare the rows with each other rather than with the grid's.\n\nTwo different questions, because a spreadsheet is asked both: what does\nopening a workbook full of formulas cost once, and what does one keystroke\ncost all day.\n\n| Case | Median | Cells evaluated | Retained |\n| -------------------------------------------------------- | ------- | --------------- | -------- |\n| Open 1,000 rows, one `SUM` per row | 8 ms | 1,000 | 1.6 MB |\n| Open 10,000 rows, one `SUM` per row | 91 ms | 10,000 | 16.5 MB |\n| Open 50,000 rows, one `SUM` per row | 547 ms | 50,000 | 84.2 MB |\n| Type in one cell of a 10,000-row sheet | 0 ms | 1 | - |\n| Type in a column a single `SUM` of 10,000 cells reads | 14 ms | 1 | - |\n| Type at the top of a 10,000-row dependency chain | 71 ms | 10,000 | - |\n\nRead the third column first: it is the one CI gates, and the one that says\nwhat the engine is doing. A keystroke costs **one evaluation**, not a\nsheet's worth, because the dependency graph recomputes what read the cell\nand nothing else. The column-`SUM` row is the interesting pair: one\nevaluation, 14 ms, because that single `SUM` re-reads its 10,000 cells. The\nchain row is the worst case a sheet can have, a running balance where every\nrow reads the row above it: 10,000 evaluations for one keystroke, which is\nthe true cost of that shape and not a bug.\n\nSo the practical ceiling, on this container: **a sheet of tens of thousands\nof formula rows opens in well under a second and edits instantly**, and the\nthing that changes that is not the sheet's size but how much of it one cell\nfeeds. 50,000 formula rows retain about 84 MB, roughly 1.7 KB per row for\nthe text, the cached value and the graph edges.\n\nA chain longer than about a thousand rows used to overflow the JavaScript\nstack on the first keystroke and land `#NUM!` in the cell. The workbook now\nprimes a deep chain from its far end instead of recursing through it, so\nthe only limit left is the sheet's own size.\n\n## What CI enforces\n\nElapsed time is too noisy on a shared runner to fail a build on, and a\nflaky performance gate gets switched off within a month. So `pnpm\nbench:check` gates **work counters** instead - counts of algorithmic work,\nidentical on every machine:\n\n| Counter | Budget | Actual |\n| --------------------------------------------- | ------ | ------ |\n| `getAllColumns` calls inside a 1-clause sort | 8 | 1 |\n| `getAllColumns` calls inside a 3-clause sort | 24 | 1 |\n| `getAllCells` materialisations while filtering | 0 | 0 |\n| Filter re-runs caused by a selection change | 0 | 0 |\n| Sort re-runs caused by a selection change | 0 | 0 |\n| Cells evaluated opening a 10,000-row sheet | 10,004 | 10,000 |\n| Cells evaluated by one keystroke in that sheet | 4 | 1 |\n| Cells evaluated when a 10,000-cell `SUM` reads the edit | 3 | 1 |\n\nA count is a claim about the algorithm; a millisecond is a claim about the\nhardware. Only the first belongs in CI. Budgets live beside each case in\n`tools/bench/cases.mjs`, and the spreadsheet's in\n`tools/bench/sheet-cases.mjs`.\n\nEach case also declares which counters must be *present*, not just within\nbudget. Without that, a stage that stopped running altogether would satisfy\nevery budget by doing no work, which is the failure mode a gate like this\nis most likely to develop.\n\n## Memory\n\n**Measured** (`pnpm bench`, Node heap): building the row model for\n100,000 rows x 9 columns retains **16.0 MB**, or roughly 160 bytes per\nrow, with no renderer attached.\n\nIt was 64.9 MB until recently. Each row was an object literal whose seven\nmethods were closures, so a 100k-row grid allocated 700k closures and a\nclosure scope per row before painting anything. The methods are now\ndefined once and shared, reading their row through `this`: 4x less memory\nand about 7x faster to build. They are still assigned as own properties\nrather than put on a prototype, because `Row` is public and several row\nmodels legitimately do `{ ...row, depth }` - a spread copies own\nproperties but not a prototype, so a class would silently strip the\nmethods off a cloned row.\n\nAn earlier version of this page said \"~22 MB\". That figure was not\nmeasured. Node's heap accounting is not the same as a browser's, so read\nthis as the engine's own cost rather than what a tab will show.\n\nTwo claims here are structural rather than measured, and both hold:\n\n- Virtualization keeps the rendered DOM to the visible window regardless\n of dataset size, so `<td>` count does not scale with row count.\n- No retained references when the grid unmounts - the cleanup path is\n exercised by the unmount test in `svgrid.behavior.test.ts`.\n\n## Server-side / chunked loading\n\nDemo [33. Server-side infinite scroll](https://svgrid.com/demos/33-server-infinite/) covers the chunked-load path. Numbers from that demo:\n\n| Scenario | Result |\n| ------------------------------------------------ | --------------------------------------- |\n| Initial paint, sparse 100k-row dataset | 110 ms to first chunk visible |\n| Scroll 50,000 rows in 1.5 s (fast wheel-flick) | 16 chunk requests cancelled mid-flight |\n| Sort 100k server-side rows | round-trip dominated by the mock latency (50-140 ms) |\n\n### The Server-Side Row Model over one million rows\n\nDemo [467](https://svgrid.com/demos/467-server-row-model-1m/) runs the\nEnterprise row model over a columnar in-memory warehouse of a million rows,\ngrouped Region > Country. `tests/perf/server-row-model.spec.ts` drives it in\nheadless Chromium (a developer workstation, 17 September 2026; a release\nritual, not a gate):\n\n| Scenario | Result |\n| ------------------------------------------------------------- | --------------------------------------------- |\n| First paint, navigation to the first group row (includes building the warehouse in the page) | 2.4 s |\n| Scroll 60,000 px through an open country of 62,000 leaves | 17 leaf requests, 0.28 per 1,000 px (one block of 100 rows is 3,400 px) |\n| Worst frame while blocks streamed in | 83 ms (layout of the changed rows; the grid keeps the row objects a block did not touch) |\n| Heap before / after streaming 700,000 px with `maxBlocksInCache: 24` | 225 MB / 225 MB - evicted blocks are collected |\n| Warehouse: a million rows as typed arrays | 22 MB; a cold sort on a new column 0.8 to 1.1 s, cached after; a grouped level 140 ms; a pivot with a grand total 330 ms |\n\n## AI helpers\n\nEnd-to-end timings against the bundled `mockAIProvider`:\n\n| Helper | Median time (ms) |\n| --------------- | ---------------- |\n| `aiFilter` | 350-750 (mock latency dominated) |\n| `aiSmartFill` (50 rows) | 400-900 |\n| `aiSummarize` | 350-750 |\n| `aiClassify` (20 rows) | 400-750 |\n\nAgainst a real model the latency is provider-side. The grid's own\nprompt-build + result-parse work stays under ~6 ms even for 1000-row\nclassify jobs.\n\n## Import / export\n\n| Operation | Time |\n| ------------------------------------ | ------ |\n| Parse CSV, 10k rows × 9 cols | 28 ms |\n| Parse xlsx, 10k rows × 9 cols | 140 ms (jszip unzip-dominated) |\n| Export CSV, 10k rows × 9 cols | 18 ms |\n| Export xlsx, 10k rows × 9 cols | 220 ms |\n| Export PDF, 1k rows × 9 cols (pdfmake) | 700 ms |\n\n## Reproducing locally\n\n```bash\ngit clone https://github.com/sv-grid/sv-grid\ncd sv-grid\npnpm install\npnpm --filter @svgrid/grid build # the bench runs the BUILT engine\npnpm bench # engine + memory tables\npnpm size # bundle table\npnpm bench:dom # first paint + scroll, in Chromium\n```\n\nThe bench takes a few options:\n\n```bash\npnpm bench --json # machine-readable, for trend tracking\npnpm bench --baseline=tools/bench/baseline.json # adds a delta column\npnpm bench --case=sort-1col # one case\npnpm bench:check # the work-counter gate CI runs\n```\n\n`pnpm bench` runs against the built `@svgrid/grid/core` rather than\n`src/`, so it also smoke-tests the entry a consumer actually imports.\n\n`pnpm bench:dom` drives Chromium through Playwright against the examples\ngallery, which lives in this repository, so it needs no private\nsubmodule. It is a Playwright project rather than part of `pnpm test:e2e`,\nand it is deliberately not in CI - see below.\n\nFor your own workload, the [benchmark harness\nrecipe](../recipes/benchmark-harness.md) and the [FPS HUD\nrecipe](../recipes/profiling-with-fps-hud.md) are copy-paste probes you\ncan drop into your app.\n\n## What we *don't* claim\n\n- That we are faster than any other grid. Nothing on *this* page is a\n head-to-head measurement. Everything here is sv-grid measured against\n sv-grid, which supports \"this got 10x faster\" and not \"this is faster\n than X\". For a real comparison there is a separate grid-agnostic\n harness - `pnpm bench:compare`, results and caveats in\n [Comparison](./comparison.md) - and it does not say we win everything.\n- That first paint is good. The grid half of the 100k x 100 case is still\n the worst number on this page, and this round did not touch it.\n- Any scroll figure above 60 fps. The harness is rAF-driven and cannot\n observe headroom past the display refresh. \"Zero dropped frames\" is the\n claim; \"120 fps\" is not.\n- Lab-grade first-paint numbers. Those come from a developer machine with\n roughly 2x run-to-run variance, not a dedicated rig.\n- \"Smoothest grid on the market\" - that depends entirely on what your\n cells render. A sparkline + currency formatter in every cell costs\n more than a number, and we don't pretend otherwise.\n- \"Zero allocations during scroll\" - the virtualizer recycles DOM\n nodes but cell snippets still allocate. The numbers above include\n real-world snippets (status pills, mini-bars).\n- Single-thread performance > 1M rows. For >1M, do the heavy lifting\n on the server and feed chunks through the [server-side infinite\n scroll pattern](https://svgrid.com/demos/33-server-infinite/).\n\n## Frequently asked questions\n\n### How fast is SvGrid?\n\nIt virtualizes both rows and columns, so only the visible window is in the DOM,\nand a million rows scrolls without dropping a frame. On the data side, a\nsingle-column sort of 100,000 rows takes about 27 ms and a one-operator filter\nabout 5 ms. Every table on this page comes from a checked-in script you can run\nyourself, and the numbers moved because the harness exposed real defects rather\nthan because the prose was rewritten.\n\n### How many rows can SvGrid handle?\n\nClient-side, 100k+ rows scroll smoothly thanks to virtualization. For millions\nof rows, page or chunk from the server (see Server-side data). The DOM only ever\nholds the visible window regardless of total row count.\n\n### How fast is SvGrid, and how big is it?\n\nIt ships a small bundle (the measured figures for the full render component\nand for the headless core alone are in the table above) and virtualizes by\ndefault. Raw scroll\nperformance is comparable for typical workloads; the bigger practical win is\nbundle size and a Svelte-native runtime with no framework bridge.\n\n## See also\n\n- [Browser support](./browser-support.md) - the matrix the benchmarks\n ran against.\n- [Testing and quality](./testing-and-quality.md) - the coverage\n thresholds that gate every release.\n"
|
|
5063
|
+
"markdown": "# Performance benchmarks\n\nEvery number on this page is produced by a checked-in script:\n\n| Table | Command | Where it runs |\n| -------------------------- | --------------- | ------------- |\n| Bundle size | `pnpm size` | Node |\n| Sort / filter / group, memory | `pnpm bench` | Node |\n| First paint, scroll | `pnpm bench:dom` | Chromium |\n\nAn earlier version of this page published a table of timings that no\nscript produced, and told readers to reproduce them with a `pnpm bench`\ncommand that did not exist. Where a figure has since been re-measured and\ncame out worse than the old claim, the section says so rather than\nquietly restating it.\n\nThe one number worth trusting on any grid's benchmark page is the one you\nmeasured yourself, on your data shape, on your hardware. The\n[benchmark harness recipe](../recipes/benchmark-harness.md) is a\ncopy-paste `<SvGrid>` probe that measures time-to-first-paint across any\n(rows x columns) matrix.\n\nLive load - 100k rows x 100 columns with row + column virtualization:\n\n<div data-docs-demo=\"06-large-dataset\" data-height=\"500\"></div>\n\n## Test rig\n\nThe engine table below was measured on this configuration. Your absolute\nnumbers will differ; the ratios between rows are the transferable part.\n\n| Component | Spec |\n| --------- | ------------------------------------------------ |\n| Machine | Developer workstation, win32 x64. Not a dedicated bench rig |\n| Engine | Node v24.18.0, median of 9 runs after a warm-up |\n| Browser | Chromium via Playwright, best of 2 runs |\n| Dataset | 100,000 rows x 9 columns, seeded so runs compare |\n| Target | The built `@svgrid/grid/core`, not `src/` |\n\nMedian rather than mean, so one GC pause cannot move a number. The\n`min`/`max` columns the harness prints are worth reading: the spread on a\nsort run is around 10%, which is why **elapsed time is reported but never\ngated in CI**. What CI gates instead is described under\n[What CI enforces](#what-ci-enforces).\n\n## Bundle size\n\nProduction build, gzipped, Svelte excluded as a peer. The table is\ngenerated from `docs/_data/svgrid-size.json` by `node tools/sync-guide-facts.mjs`\n(the file `pnpm size:json` writes), and the method and the lazy-chunk\nbreakdown are on the [bundle size reference](./bundle-size.md). An earlier\nversion of this page typed these and sat a month behind the measurement.\n\n<!-- size:start -->\nRe-measured **26 Oct 2026** at `@svgrid/grid` 3.0.25 with the script that ships in the repo (`pnpm size:json`):\n\n| Target | Base JS (gzip) | CSS (gzip) | Loaded on demand |\n| --- | ---: | ---: | ---: |\n| Headless core (`createSvGrid`) | **3.2 KB** | - | - |\n| Headless subpath (`@svgrid/grid/core`) | **10.0 KB** | - | - |\n| Full render component (`<SvGrid>`) | **99.8 KB** | **11.3 KB** | **197.4 KB** |\n| Standalone chart (`<SvChart>`) | **71.9 KB** | - | **15.0 KB** |\n<!-- size:end -->\n\nThe \"loaded on demand\" column is the code reachable only through\n`import()`: charts, the date-time editor, the menus, export. Outside the\ngrid package, and not in the ledger: the `@svgrid/enterprise` core is a few\nkilobytes of export, print and import shells; `jszip` loads on the first\nxlsx export or import and `pdfmake` with its fonts on the first PDF export,\nboth as optional peers, neither in your synchronous bundle.\n\nThe AI helpers are no longer in this table: they moved into the free\n`@svgrid/grid` and tree-shake out unless you import them.\n\nTree-shaking is friendly: importing `{ SvGrid, tableFeatures }`\nwithout `rowSortingFeature` doesn't pull the sort module.\n\n## First paint\n\n**Measured.** Run `pnpm bench:dom`. Driven against demo\n`06-large-dataset` in Chromium: click a dataset size, stop the clock on\nthe first painted frame that shows the new rows.\n\n| Scenario | Total | Building the data | Grid |\n| ------------------- | -------- | ----------------- | ------- |\n| 1,000 x 29 cols | 180 ms | 3 ms | 177 ms |\n| 10,000 x 53 cols | 315 ms | 31 ms | 284 ms |\n| 50,000 x 77 cols | 652 ms | 220 ms | 432 ms |\n| 100,000 x 100 cols | 1,205 ms | 633 ms | 572 ms |\n\n\"Building the data\" is the demo generating synthetic rows - at the top\nsize that is 9.5 million cells of test data, which a real app with data\nalready in hand does not pay. \"Grid\" is the remainder.\n\n**\"Grid\" overstates the grid's own cost, and by a lot.** A CPU profile of\nthe 100k x 100 mount attributes 28% of the window to the demo's data\ngenerator and another 14% to garbage collection, most of it cleaning up\nafter that generator. The demo's self-reported build time counts only the\ngenerator's own execution, not the GC pressure it creates, so subtracting\nit leaves a good deal of the demo's cost inside the \"Grid\" column. Roughly\nhalf the total is the harness rather than the component.\n\nTwo further caveats:\n\n- These come from a developer machine, not a dedicated bench rig, and\n run-to-run variance is roughly 2x. Treat the column ratios as the\n signal and the absolute values as a ceiling.\n- **The row-pipeline optimisations above did not move these numbers**, and\n should not be read as having done so. Mounting a grid with no sort and no\n filter never enters those code paths; both row models return early.\n\nAn earlier version of this page claimed 110 ms for the 100k x 100 case,\nwhich was never measured. Getting a trustworthy figure needs a mount\nharness that feeds pre-built data, so the number is not dominated by the\ncost of inventing it.\n\n## Scroll performance\n\n**Measured.** Run `pnpm bench:dom`. Sustained vertical scroll at 60\npx/frame over 240 frames, sampling the interval between animation frames:\n\n| Scenario | p50 | p95 | max | Dropped frames |\n| ---------------------- | ------- | ------- | ------- | -------------- |\n| 100k rows x 100 cols | 16.7 ms | 17.7 ms | 18.8 ms | 0 of 240 |\n| 1,000,000 rows x 9 cols | 16.7 ms | 18.1 ms | 19.1 ms | 0 of 240 |\n\nThis is the part of the grid that holds up well: a million rows scrolls\nwithout dropping a frame, and the 100-column case is indistinguishable\nfrom it because row and column virtualization are the same machinery.\n\nRead the numbers correctly, though. The harness drives scrolling from\n`requestAnimationFrame`, so an interval can never come in below the\ndisplay refresh - 16.7 ms on a 60 Hz panel is the floor, not a\nmeasurement of how cheap a frame is. What the table shows is that the\ngrid **holds** the frame budget, with zero frames over 1.5x the median.\nIt cannot show headroom above 60 fps.\n\nAn earlier version of this page claimed a p95 of 8 ms and \"~120 fps\".\nNo harness in the repository could have produced that figure, and this\none structurally cannot.\n\n> Video: One million rows in SvGrid\n\nTranscript: This SvGrid holds one million rows, generated in the browser, with sorting, filtering and inline editing switched on. Rows are virtualized, so only the ones in view are drawn. Scroll, and the frame rate stays flat. Jump anywhere in the set. The row numbers show the scale, and the grid keeps every row reachable. Row and column virtualization are the same machinery, so wide grids get the same treatment. Nothing to configure.\n\n## Sort, filter, group\n\n**Measured.** Run `pnpm bench` to reproduce. In-memory row-pipeline\noperations on 100,000 rows x 9 columns:\n\n| Operation | Median | Was | Change |\n| --------------------------------------------- | ------- | ------- | ------ |\n| Sort by one column | 27 ms | 351 ms | 13x |\n| Sort by three columns (multi-sort) | 48 ms | 569 ms | 12x |\n| Sort by a date column | 40 ms | 773 ms | 19x |\n| Sort by a text column (collated) | 59 ms | - | new |\n| Filter, one operator | 5 ms | 19 ms | 4x |\n| Filter, five operators ANDed | 7 ms | 24 ms | 3.5x |\n| Filter via the compiled Excel filter | 3 ms | - | new |\n| ... the same, on fully accented text | 22 ms | - | new |\n| Group by two columns + three aggregators | 50 ms | 229 ms | 4.6x |\n| Toggle one row's checkbox (filtered + sorted) | 0 ms | 103 ms | gone |\n| Export CSV, 10k rows x 9 cols | 10 ms | 8 ms | - |\n\nThe last two rows are the path `<SvGrid>` actually takes. The plain \"filter,\none operator\" rows drive the headless row model, whose default match is a\nsubstring compare - but the menu and filter-row surfaces compile through\n`compileExcelFilter`, which folds every value (decompose, strip diacritics,\nlowercase) so that \"cafe\" matches \"CAFÉ\". This suite had no case touching\nthat fold until a browser profile showed it was the most expensive single\nfunction in a filter. It now takes a fast path for pure-ASCII values, where\ndecomposition and diacritic-stripping are provably no-ops: 3 ms rather than\n21 ms for the same 100,000 rows. Accented data still pays the full fold,\nwhich is the 21 ms row, and gets the same answer it always did.\n\nEach case runs in a **fresh process**. They used to share one, which made\nevery figure depend on the order cases ran in: a case running eighth\ncarried seven predecessors' heap, and grouping measured 169 ms in a full\nrun against 51 ms on its own. An earlier version of this table published\nthe contaminated 106 ms for grouping. Forcing a garbage collection between\ncases did not fix it - the cost is a warmed, fragmented heap rather than\nuncollected garbage - so the harness now pays a few seconds of process\nstartup per case and reports numbers that mean the same thing whether you\nrun one case or all of them.\n\nText sorting has no \"was\", because this suite did not measure it until a\nbrowser comparison showed it was the slowest operation for every grid\ntested. Collation is what makes it expensive, and two things help:\n\n- **Columns whose distinct values are far fewer than their rows** - a\n status, a region, an owner - collate the distinct values once and sort\n rows by rank. That is what took the three-column case to 48 ms. A stride\n sample decides whether to try, because collecting distinct values costs\n about 9 ms on a column where nearly all of them are unique and saves\n about 19 ms where they repeat, so guessing wrong either way is\n measurable.\n- **`localeCompare` rather than a hoisted `Intl.Collator`.** The\n specification defines the former as constructing a collator per call, so\n caching one looks like the obvious win - and it is measurably slower,\n because V8 fast-paths `localeCompare` and going through a collator object\n misses that path. 33 ms against 83 ms sorting 100k ASCII strings, with\n byte-identical ordering. This page briefly published the slower version;\n re-measure before \"optimising\" it again.\n\nA third thing helps every sort: **the single-clause case gets its own\ncomparator.** Most sorts are one column, and the comparator runs O(n log n)\ntimes - 1.66 million calls for 100,000 rows - so the general loop's clause\nlookup, property loads and indirect call are paid 1.66 million times for\nvalues that never change. Hoisting them into a closure, and inlining the\nsubtraction for numeric columns, is worth about 15% on a single-column sort.\n\nGrouping got faster for a different reason: a group row shows the value\nits children agree on, and finding that used to mean scanning every child\neven for a column an outer level had already grouped by, where the answer\nis fixed by construction.\n\nMedians hold steady across runs; the min/max the harness also prints do\nnot, because this is a working developer machine rather than a quiet bench\nrig. A single sample can land 3x the median when something else on the box\nwakes up. That noise is the whole reason CI gates counters instead.\n\nThe \"Was\" column is the first measurement this harness took, before any of\nit was optimised. Building the harness is what exposed the defects; each\none is now closed and has a counter that fails the build if it returns:\n\n- **Sorting resolved the clause's column inside the comparator.** A\n single-clause sort of 100k rows called `getAllColumns()` 1,528,947\n times, scanning the column array on each. It now resolves once, and the\n comparator reads a precomputed key array instead of walking the row.\n- **The date comparator allocated two `Date` objects per comparison.**\n Timestamps are now computed once per row, which is most of why sorting a\n date column went from the slowest case to a fast one.\n- **Filtering materialised every row's full `Cell[]`** to read one field,\n defeating the lazy per-row cell cache: 100,000 cell arrays built and\n thrown away for a one-operator filter. Now zero.\n- **Toggling a checkbox re-ran the whole pipeline.** `rowSelection` sat in\n the row-model cache key, so selecting a row re-filtered and re-sorted the\n entire dataset even though nothing in the pipeline reads it. Selection is\n now free.\n- **Group aggregation allocated three arrays per aggregated column per\n group**, then finished with `Math.min(...values)`. It is a single pass\n now. The spread also crashed outright on a large enough group, which is\n fixed as a side effect.\n- **Text sorting collated on every comparison.** Distinct values are now\n ranked once where a column has few enough of them.\n\nNumbers here will move; the command that produces them will not.\n\n## Streaming updates\n\n**Measured.** Run `pnpm bench --case=tick-1k-of-100k-sorted` to reproduce.\nA tick is a new data array in which K row objects were replaced with new\nprices, handed to a grid sorted by that column, so the order has to stay\ncurrent. 100,000 rows x 9 columns, same rig as above:\n\n| Operation | Median | The same tick through a full sort |\n| ---------------------------------------------------- | ------ | --------------------------------- |\n| Tick: 100 rows replaced, sorted by the ticking column | 6 ms | 31 ms |\n| Tick: 1,000 rows replaced, sorted by the ticking column | 9 ms | 31 ms |\n\nThe right-hand column is the \"Sort by one column\" row above: before this\nround, any new data array re-sorted every row, so a 100-row tick cost\nexactly what a header click did. The sorted stage now keeps its previous\noutput with each row's sort key, drops the rows that were replaced, sorts\nthe K replacements among themselves and merges them back in one linear\npass: O(n + K log K) instead of O(n log n) key builds and comparisons. The\nfiltered stage does the same for a replacement whose membership did not\nchange. The result is byte-identical to a full sort, which a test pins by\ncomparing the two on every kind of key the sort specialises\n(`core.tick-repair.test.ts`).\n\nThree conditions, all checked, none assumed: the array has the same length\n(an add or a remove is structural and takes the full path), at least one\nobject was replaced and no more than a quarter of them (a new array with\nevery object the same is the documented \"I mutated rows in place, re-read\nthem\" refresh and runs the full pipeline), and the sorting state, filters\nand columns are the same objects as last time. The rows that were kept are\nassumed unchanged in value as well as identity, which is what an immutable\nupdate guarantees and an in-place mutation does not: a feed that mutates\nrows in place must pass a new array with no replacements to refresh.\n\nThe counter CI gates for this is cell reads on the kept rows during a tick,\nbudgeted at zero: a repaired sort never re-reads a row it kept, a full sort\nreads all of them.\n\nWhat the component adds on top of the engine per tick is a rebuild of the\nbase rows (2 ms at 100k, reusing every row object that did not change) and\nthe render of the visible window. Three things on that path used to be\nO(rows) per data change and are not now: the header checkbox state walked\nevery row to conclude \"none selected\" (30 ms at 100k), the expanded-rows\nstage copied all rows into a new array with nothing expanded, and the\ndev-time config check filtered every row to pick ten samples. The browser\nharness in the [comparison](./comparison.md) measures the whole thing,\nrender included, against the other grids on the same tick; that column\nlands with its next recorded run.\n\n## Spreadsheet engine\n\n**Measured.** Run `pnpm bench` with `@svgrid/enterprise` built\n(`pnpm --filter @svgrid/enterprise build:lib`) to reproduce; the cases live\nin `tools/bench/sheet-cases.mjs`. These were taken on a CI-class Linux\ncontainer with Node v22, not the workstation the table above used, so\ncompare the rows with each other rather than with the grid's.\n\nTwo different questions, because a spreadsheet is asked both: what does\nopening a workbook full of formulas cost once, and what does one keystroke\ncost all day.\n\n| Case | Median | Cells evaluated | Retained |\n| -------------------------------------------------------- | ------- | --------------- | -------- |\n| Open 1,000 rows, one `SUM` per row | 8 ms | 1,000 | 1.6 MB |\n| Open 10,000 rows, one `SUM` per row | 91 ms | 10,000 | 16.5 MB |\n| Open 50,000 rows, one `SUM` per row | 547 ms | 50,000 | 84.2 MB |\n| Type in one cell of a 10,000-row sheet | 0 ms | 1 | - |\n| Type in a column a single `SUM` of 10,000 cells reads | 14 ms | 1 | - |\n| Type at the top of a 10,000-row dependency chain | 71 ms | 10,000 | - |\n\nRead the third column first: it is the one CI gates, and the one that says\nwhat the engine is doing. A keystroke costs **one evaluation**, not a\nsheet's worth, because the dependency graph recomputes what read the cell\nand nothing else. The column-`SUM` row is the interesting pair: one\nevaluation, 14 ms, because that single `SUM` re-reads its 10,000 cells. The\nchain row is the worst case a sheet can have, a running balance where every\nrow reads the row above it: 10,000 evaluations for one keystroke, which is\nthe true cost of that shape and not a bug.\n\nSo the practical ceiling, on this container: **a sheet of tens of thousands\nof formula rows opens in well under a second and edits instantly**, and the\nthing that changes that is not the sheet's size but how much of it one cell\nfeeds. 50,000 formula rows retain about 84 MB, roughly 1.7 KB per row for\nthe text, the cached value and the graph edges.\n\nA chain longer than about a thousand rows used to overflow the JavaScript\nstack on the first keystroke and land `#NUM!` in the cell. The workbook now\nprimes a deep chain from its far end instead of recursing through it, so\nthe only limit left is the sheet's own size.\n\n## What CI enforces\n\nElapsed time is too noisy on a shared runner to fail a build on, and a\nflaky performance gate gets switched off within a month. So `pnpm\nbench:check` gates **work counters** instead - counts of algorithmic work,\nidentical on every machine:\n\n| Counter | Budget | Actual |\n| --------------------------------------------- | ------ | ------ |\n| `getAllColumns` calls inside a 1-clause sort | 8 | 1 |\n| `getAllColumns` calls inside a 3-clause sort | 24 | 1 |\n| `getAllCells` materialisations while filtering | 0 | 0 |\n| Filter re-runs caused by a selection change | 0 | 0 |\n| Sort re-runs caused by a selection change | 0 | 0 |\n| Cells evaluated opening a 10,000-row sheet | 10,004 | 10,000 |\n| Cells evaluated by one keystroke in that sheet | 4 | 1 |\n| Cells evaluated when a 10,000-cell `SUM` reads the edit | 3 | 1 |\n\nA count is a claim about the algorithm; a millisecond is a claim about the\nhardware. Only the first belongs in CI. Budgets live beside each case in\n`tools/bench/cases.mjs`, and the spreadsheet's in\n`tools/bench/sheet-cases.mjs`.\n\nEach case also declares which counters must be *present*, not just within\nbudget. Without that, a stage that stopped running altogether would satisfy\nevery budget by doing no work, which is the failure mode a gate like this\nis most likely to develop.\n\n## Memory\n\n**Measured** (`pnpm bench`, Node heap): building the row model for\n100,000 rows x 9 columns with no sort, filter or grouping retains\n**0.8 MB**, with no renderer attached. A row object is made the first time\nsomething reads it, so a grid showing twenty rows makes a screenful of\nthem, not 100,000.\n\nThe first sort, filter or grouping reads every row and makes them all. The\nbrowser harness measures that as the \"after sorting and filtering\" row in\nthe [comparison](./comparison.md#measured-performance): 17.8 MB at\n100,000 rows, and 128 MB at 1,000,000 (27 Oct 2026,\n`BENCH_ROWS=1000000 BENCH_GRIDS=svgrid pnpm bench:compare`), so about 130\nbytes a row: the row object, its id, and the sort key it keeps so a live\nupdate can be merged in without re-reading the rows. The 1,000,000-row\nfigure was 196 MB the day before. Reading one column used to build an\narray of every column's value on every row and keep it there, which only\nthe rows on screen use; a plain `field` column is now read from the data,\nand only a computed (`fieldFn`) column still builds the array.\n\nThe fully built row model was 16.0 MB at 100,000 rows before rows became\nlazy, and 64.9 MB before that. Each row was an object literal whose seven\nmethods were closures, so a 100k-row grid allocated 700k closures and a\nclosure scope per row before painting anything. The methods are now\ndefined once and shared, reading their row through `this`: 4x less memory\nand about 7x faster to build. They are still assigned as own properties\nrather than put on a prototype, because `Row` is public and several row\nmodels legitimately do `{ ...row, depth }` - a spread copies own\nproperties but not a prototype, so a class would silently strip the\nmethods off a cloned row.\n\nAn earlier version of this page said \"~22 MB\". That figure was not\nmeasured. Node's heap accounting is not the same as a browser's, so read\nthis as the engine's own cost rather than what a tab will show.\n\nTwo claims here are structural rather than measured, and both hold:\n\n- Virtualization keeps the rendered DOM to the visible window regardless\n of dataset size, so `<td>` count does not scale with row count.\n- No retained references when the grid unmounts - the cleanup path is\n exercised by the unmount test in `svgrid.behavior.test.ts`.\n\n## Server-side / chunked loading\n\nDemo [33. Server-side infinite scroll](https://svgrid.com/demos/33-server-infinite/) covers the chunked-load path. Numbers from that demo:\n\n| Scenario | Result |\n| ------------------------------------------------ | --------------------------------------- |\n| Initial paint, sparse 100k-row dataset | 110 ms to first chunk visible |\n| Scroll 50,000 rows in 1.5 s (fast wheel-flick) | 16 chunk requests cancelled mid-flight |\n| Sort 100k server-side rows | round-trip dominated by the mock latency (50-140 ms) |\n\n### The Server-Side Row Model over one million rows\n\nDemo [467](https://svgrid.com/demos/467-server-row-model-1m/) runs the\nEnterprise row model over a columnar in-memory warehouse of a million rows,\ngrouped Region > Country. `tests/perf/server-row-model.spec.ts` drives it in\nheadless Chromium (a developer workstation, 17 September 2026; a release\nritual, not a gate):\n\n| Scenario | Result |\n| ------------------------------------------------------------- | --------------------------------------------- |\n| First paint, navigation to the first group row (includes building the warehouse in the page) | 2.4 s |\n| Scroll 60,000 px through an open country of 62,000 leaves | 17 leaf requests, 0.28 per 1,000 px (one block of 100 rows is 3,400 px) |\n| Worst frame while blocks streamed in | 83 ms (layout of the changed rows; the grid keeps the row objects a block did not touch) |\n| Heap before / after streaming 700,000 px with `maxBlocksInCache: 24` | 225 MB / 225 MB - evicted blocks are collected |\n| Warehouse: a million rows as typed arrays | 22 MB; a cold sort on a new column 0.8 to 1.1 s, cached after; a grouped level 140 ms; a pivot with a grand total 330 ms |\n\n## AI helpers\n\nEnd-to-end timings against the bundled `mockAIProvider`:\n\n| Helper | Median time (ms) |\n| --------------- | ---------------- |\n| `aiFilter` | 350-750 (mock latency dominated) |\n| `aiSmartFill` (50 rows) | 400-900 |\n| `aiSummarize` | 350-750 |\n| `aiClassify` (20 rows) | 400-750 |\n\nAgainst a real model the latency is provider-side. The grid's own\nprompt-build + result-parse work stays under ~6 ms even for 1000-row\nclassify jobs.\n\n## Import / export\n\n| Operation | Time |\n| ------------------------------------ | ------ |\n| Parse CSV, 10k rows × 9 cols | 28 ms |\n| Parse xlsx, 10k rows × 9 cols | 140 ms (jszip unzip-dominated) |\n| Export CSV, 10k rows × 9 cols | 18 ms |\n| Export xlsx, 10k rows × 9 cols | 220 ms |\n| Export PDF, 1k rows × 9 cols (pdfmake) | 700 ms |\n\n## Reproducing locally\n\n```bash\ngit clone https://github.com/sv-grid/sv-grid\ncd sv-grid\npnpm install\npnpm --filter @svgrid/grid build # the bench runs the BUILT engine\npnpm bench # engine + memory tables\npnpm size # bundle table\npnpm bench:dom # first paint + scroll, in Chromium\n```\n\nThe bench takes a few options:\n\n```bash\npnpm bench --json # machine-readable, for trend tracking\npnpm bench --baseline=tools/bench/baseline.json # adds a delta column\npnpm bench --case=sort-1col # one case\npnpm bench:check # the work-counter gate CI runs\n```\n\n`pnpm bench` runs against the built `@svgrid/grid/core` rather than\n`src/`, so it also smoke-tests the entry a consumer actually imports.\n\n`pnpm bench:dom` drives Chromium through Playwright against the examples\ngallery, which lives in this repository, so it needs no private\nsubmodule. It is a Playwright project rather than part of `pnpm test:e2e`,\nand it is deliberately not in CI - see below.\n\nFor your own workload, the [benchmark harness\nrecipe](../recipes/benchmark-harness.md) and the [FPS HUD\nrecipe](../recipes/profiling-with-fps-hud.md) are copy-paste probes you\ncan drop into your app.\n\n## What we *don't* claim\n\n- That we are faster than any other grid. Nothing on *this* page is a\n head-to-head measurement. Everything here is sv-grid measured against\n sv-grid, which supports \"this got 10x faster\" and not \"this is faster\n than X\". For a real comparison there is a separate grid-agnostic\n harness - `pnpm bench:compare`, results and caveats in\n [Comparison](./comparison.md) - and it does not say we win everything.\n- That first paint is good. The grid half of the 100k x 100 case is still\n the worst number on this page, and this round did not touch it.\n- Any scroll figure above 60 fps. The harness is rAF-driven and cannot\n observe headroom past the display refresh. \"Zero dropped frames\" is the\n claim; \"120 fps\" is not.\n- Lab-grade first-paint numbers. Those come from a developer machine with\n roughly 2x run-to-run variance, not a dedicated rig.\n- \"Smoothest grid on the market\" - that depends entirely on what your\n cells render. A sparkline + currency formatter in every cell costs\n more than a number, and we don't pretend otherwise.\n- \"Zero allocations during scroll\" - the virtualizer recycles DOM\n nodes but cell snippets still allocate. The numbers above include\n real-world snippets (status pills, mini-bars).\n- Single-thread performance > 1M rows. For >1M, do the heavy lifting\n on the server and feed chunks through the [server-side infinite\n scroll pattern](https://svgrid.com/demos/33-server-infinite/).\n\n## Frequently asked questions\n\n### How fast is SvGrid?\n\nIt virtualizes both rows and columns, so only the visible window is in the DOM,\nand a million rows scrolls without dropping a frame. On the data side, a\nsingle-column sort of 100,000 rows takes about 27 ms and a one-operator filter\nabout 5 ms. Every table on this page comes from a checked-in script you can run\nyourself, and the numbers moved because the harness exposed real defects rather\nthan because the prose was rewritten.\n\n### How many rows can SvGrid handle?\n\nClient-side, 100k+ rows scroll smoothly thanks to virtualization. For millions\nof rows, page or chunk from the server (see Server-side data). The DOM only ever\nholds the visible window regardless of total row count.\n\n### How fast is SvGrid, and how big is it?\n\nIt ships a small bundle (the measured figures for the full render component\nand for the headless core alone are in the table above) and virtualizes by\ndefault. Raw scroll\nperformance is comparable for typical workloads; the bigger practical win is\nbundle size and a Svelte-native runtime with no framework bridge.\n\n## See also\n\n- [Browser support](./browser-support.md) - the matrix the benchmarks\n ran against.\n- [Testing and quality](./testing-and-quality.md) - the coverage\n thresholds that gate every release.\n"
|
|
5064
5064
|
},
|
|
5065
5065
|
{
|
|
5066
5066
|
"slug": "help/bolt-new",
|
|
@@ -5396,7 +5396,7 @@ export const docs = [
|
|
|
5396
5396
|
"path": "docs/help/comparison.md",
|
|
5397
5397
|
"title": "Comparison: SvGrid vs AG Grid vs TanStack Table",
|
|
5398
5398
|
"section": "Help",
|
|
5399
|
-
"markdown": "\n# Comparison: SvGrid vs AG Grid vs TanStack Table\n\nThe three projects solve overlapping problems, and the right choice\ndepends on the framework you ship on, how much of the grid you want to\nbuild yourself, and your budget. Every number on this page is read from\nnpm or measured by a script in this repository on the date shown; the\nblock below is regenerated by `node tools/sync-guide-facts.mjs` and the\nper-competitor pages under [/compare/](https://svgrid.com/compare/) list\nthe sources for every feature claim.\n\n<!-- facts:start ag-grid,tanstack-table -->\n> **Facts, checked 12 Sep 2026.** `ag-grid-community` 36.1.0, MIT, last published 5 Aug 2026, 12,400,000 npm downloads in the 30 days to 10 Sep 2026. `@tanstack/svelte-table` 9.2.4, MIT, last published 28 Aug 2026, 231,000 npm downloads in the same window. `@svgrid/grid` 3.0.3, MIT, last published 11 Sep 2026, 16,900 npm downloads in the same window. Bundle, minified and gzipped, each package built alone with Svelte external: SvGrid 3.0.25 99.8 KB JS + 11.3 KB CSS (measured 26 Oct 2026); `ag-grid-community` 36.1.0 317.5 KB JS, no separate stylesheet (measured 12 Sep 2026); `@tanstack/svelte-table` 9.2.4 36.3 KB JS, no separate stylesheet, svelte external (measured 12 Sep 2026). AG Grid pricing, as its site states it: AG Grid Community is free under MIT. AG Grid Enterprise is listed at $999 USD per developer with one year of updates and Zendesk support; the Enterprise Bundle with AG Charts Enterprise is $1,498 USD per developer (https://www.ag-grid.com/license-pricing/, read 12 Sep 2026). TanStack Table pricing, as its site states it: TanStack Table is MIT and free; tanstack.com is sponsor-supported and offers Enterprise Support as private consulting and expert support, with no licence sold for the table (https://tanstack.com/table/latest, read 12 Sep 2026). SvGrid: MIT core; @svgrid/enterprise from $299 per developer per year (Indie, under $1M revenue), $599 for Enterprise. Side by side, with sources: [SvGrid vs AG Grid (community + enterprise)](https://svgrid.com/compare/ag-grid/), [SvGrid vs TanStack Table (Svelte)](https://svgrid.com/compare/tanstack-table/).\n<!-- facts:end -->\n\n## TL;DR\n\n| Project | Lives in | Ships | Licence |\n| --------------------- | ---------------------------------------- | ---------------------------------------------------------- | ----------------------------------------- |\n| **SvGrid** | Svelte 5 | Headless core + Svelte render component + Enterprise pack | MIT (Community) / commercial (Enterprise) |\n| **AG Grid Community** | React, Angular, Vue, plain JS | Full grid + renderer; Svelte through community integrations | MIT |\n| **AG Grid Enterprise**| same | Adds the set filter, range selection, master/detail, tree, grouping, pivot, charts, Excel export, server-side row model | Commercial, per developer |\n| **TanStack Table** | React, Vue, Svelte, Solid, Qwik, Lit, JS | Headless engine **only**; the Svelte adapter is Svelte 5 | MIT |\n\nThe bundle sizes and prices are in the facts block above, with the date\nthey were read and the method behind the sizes.\n\n## When SvGrid is the right choice\n\n- You're on **Svelte 5** and want a grid that uses the runtime's idioms\n (snippets for cells, `$state` for data, `$derived` for aggregates) -\n not a React-port pretending to be Svelte.\n- You want a **headless core you can render yourself** AND a\n default-styled component for the 80% case. Most \"headless\" libraries\n make you write the markup; most \"monolith\" libraries make you fight\n the markup. SvGrid does both in one package.\n- You need **clean theming via CSS custom properties** and a documented\n `--sg-*` token surface, not a hard-coded class soup.\n- You ship under **strict CSP** (no `eval`, no `new Function`, no\n inline scripts). SvGrid runs clean; AG Grid Community does too.\n TanStack Table is engine-only so the question doesn't apply.\n- You want **SSR markup that is meaningful before hydration** (good\n first paint, SEO, SvelteKit `+page.server` integration). SvGrid +\n TanStack Table both qualify. AG Grid renders client-side.\n- You want the features AG Grid sells as Enterprise - the set filter,\n range selection, master/detail, tree data, grouping with aggregation,\n integrated charts, flat server-side infinite scroll - **in the MIT\n core**. (Server-side grouping, tree, pivot and transactions are\n Enterprise in both.)\n\n## When AG Grid is the right choice\n\n- You're on **React, Angular, or Vue**, not Svelte. SvGrid is\n Svelte-only, and ag-grid.com points Svelte users to community-built\n integrations rather than an official package.\n- You need a push-based **viewport row model** for a real-time trading\n blotter, where the server streams the visible window over a socket.\n SvGrid's server-side row model covers sort, filter, grouping, tree,\n pivot, transactions and select-all across unloaded rows, and its\n real-time page merges deltas into loaded rows, but it does not have the\n viewport model.\n- You need **custom tool panels**. SvGrid's tool panel is a fixed\n Columns + Filters pair. Custom filter components are covered by a\n column's `customFilter`.\n- You need **AG Charts** for maps, network graphs, 3D or a canvas renderer.\n SvGrid's chart is SVG with decimation, and it ships 29 types, a configurable\n axis model, synchronized charts, a financial toolkit with indicator panes\n and drawing tools, a builder and PDF export in the MIT core; it does not\n draw maps.\n- You want a vendor with **a decade of enterprise procurement paperwork**\n already on file.\n\n## When TanStack Table is the right choice\n\n- You want a **rendering-framework-agnostic engine** so the same\n business logic powers React + Svelte + Solid surfaces in your\n monorepo.\n- You're already in the TanStack ecosystem (Query, Router, Form,\n Virtual) and want one mental model.\n- You're happy writing **all the markup yourself** - the row recycling,\n the keyboard map, the ARIA roles, the focus management, the\n drag-to-resize. That's the cost of \"engine only\".\n\n## Feature parity at a glance\n\nYes: shipped in that edition. Partial: needs extra work or a companion\npackage. No: not available. The AG Grid columns follow ag-grid.com's\nCommunity vs Enterprise page and its Set Filter, Tree Data and CSV export\npages; the dated list of those sources is on the\n[SvGrid vs AG Grid](https://svgrid.com/compare/ag-grid/) page, and the\nTanStack sources on [SvGrid vs TanStack Table](https://svgrid.com/compare/tanstack-table/).\n\n| | SvGrid Community | SvGrid Enterprise | AG Grid Community | AG Grid Enterprise | TanStack Table |\n| ------------------------------- | ---------------- | ----------------- | ----------------- | ------------------ | -------------- |\n| Headless core (engine only) | Yes | Yes | No | No | Yes |\n| Default render component | Yes (Svelte 5) | Yes | Yes (each framework) | Yes | No |\n| Sort (multi-column) | Yes | Yes | Yes | Yes | Yes (engine) |\n| Filter menu (operator + facet) | Yes | Yes | Partial (text and number filters; the set filter is Enterprise) | Yes | No |\n| Filter row | Yes | Yes | Yes | Yes | No |\n| Pagination | Yes | Yes | Yes | Yes | Yes (engine) |\n| Grouping + aggregation | Yes | Yes | No (Enterprise) | Yes | Yes (engine) |\n| Tree / expand-collapse rows | Yes | Yes | No (Enterprise) | Yes | Yes (engine) |\n| Master/detail | Yes | Yes | No (Enterprise) | Yes | No |\n| Cell range selection + copy/paste | Yes | Yes | No (Enterprise) | Yes | No |\n| Fill handle | Yes | Yes | No (Enterprise) | Yes | No |\n| Inline editing (typed editors) | Yes | Yes | Yes | Yes | No |\n| Column virtualization | Yes | Yes | Yes | Yes | No |\n| Row virtualization | Yes | Yes | Yes | Yes | Partial (pair with TanStack Virtual) |\n| Column pinning (left/right) | Yes | Yes | Yes | Yes | No |\n| Column tool panel | Yes | Yes | No (Enterprise) | Yes | No |\n| Context menu | Yes | Yes | No (Enterprise) | Yes | No |\n| Fit-to-width with shrink | Yes | Yes | Partial | Yes | No |\n| WAI-ARIA grid pattern | Yes | Yes | Yes | Yes | No (your markup) |\n| Server-side data, flat (sort / filter / paging / infinite scroll) | Yes (built in) | Yes (built in) | Yes (infinite row model) | Yes (built in) | Partial (manual flags) |\n| Server-side row model (lazy grouping, tree, pivot, transactions, select-all across unloaded rows) | No (Enterprise) | Yes (built in) | No (Enterprise) | Yes (built in) | No |\n| Global search over server-side data | Yes (`filterModel.global`) | Yes | No (the quick filter is client-side only) | No | n/a |\n| CSP-clean (no eval, no inline) | Yes | Yes | Yes | Yes | n/a |\n| Meaningful SSR markup | Yes | Yes | No | No | depends on your markup |\n| CSV / TSV / JSON export | Yes | Yes | Yes (CSV) | Yes | No |\n| Excel (.xlsx) / PDF export | No | Yes | No | Yes (Excel) | No |\n| Print | No | Yes | No | No | No |\n| Excel / CSV import | No | Yes | No | No | No |\n| In-grid AI helpers (bring your own model) | Yes | Yes | No | No | No |\n| MCP server for AI assistants | Yes (`@svgrid/mcp`) | Yes | Yes (`ag-mcp`) | Yes | No (agent skills ship in the package) |\n| Pivot table | No | Yes | No | Yes | No (custom) |\n| Integrated charts | Yes (29 types, builder, financial toolkit) | Yes | No | Yes (AG Charts) | No |\n| Support response time | GitHub (best-effort) | 1 business day; 1h sev-1 on Enterprise | GitHub (best-effort) | no number published | GitHub; paid Enterprise Support offered |\n| Theming via CSS variables | Yes (`--sg-*`) | Yes | Yes (theme builder) | Yes | n/a |\n| Source button per demo | Yes (gallery) | Yes | No | No | No |\n\n## Bundle size\n\nThe facts block at the top of the page has the gzipped size of each\npackage, measured by the same method: each package built alone with Vite\nin library mode, minified, gzip level 9, Svelte external because it is a\npeer dependency. SvGrid's own number comes from `pnpm size:json`\n(`packages/grid/scripts/measure-size.mjs`), the competitors' from\n`pnpm competitors:measure`; both write `docs/_data` and the block is\nregenerated from there, so the page cannot quote a size nobody measured.\n\nWhat the SvGrid number contains: the whole render component -\nvirtualization, Excel-style filters, inline editing, grouping, tree,\nmaster/detail, cell selection and accessibility - in one import, plus a\nseparate stylesheet. Charts, date and time editors, menus and export split\ninto `import()` chunks that load on demand rather than shipping in the\ninitial bundle; the headless core on its own is a small fraction of the\nrender component, and `@svgrid/enterprise` features are separate subpath\nimports. The per-entry breakdown, including the headless core and the\nlazy chunks, is in the [bundle size reference](./bundle-size.md).\n\nWhat the AG Grid number contains: `createGrid` with every Community\nmodule registered and the Quartz theme, whose CSS ships inside the script\nunder the theming API, so there is no separate stylesheet to add. The\nTanStack number is the whole Svelte adapter with its engine: no\nvirtualizer, filter UI or editors, because a headless library has none.\n\n## Measured performance\n\nA vendor's own benchmark is worth nothing unless you can rerun it, so the\nharness is in the repository and takes an adapter per grid. Adding another\ngrid is about forty lines in `examples/src/bench/adapters.ts` and nothing\nelse.\n\n```bash\n# headless, prints the table and writes tests/perf/.last-compare.json\nBENCH_REPEATS=7 BENCH_GRIDS=svgrid,aggrid,svar,tanstack pnpm bench:compare\n\n# move that run into docs/_data/competitors.json, then regenerate this page\nnode tools/record-benchmarks.mjs && node tools/sync-guide-facts.mjs\n\n# or drive it by hand\npnpm --filter @svgrid/grid-example-gallery dev # then open /bench.html\n```\n\nEach operation is timed until the grid's DOM reflects it, plus one frame:\n\n- **Mount** - fresh container, create the grid, until rows are painted.\n- **Sort** - change the sort on one column, until the new order is painted.\n Text sorts `name` (tens of thousands of distinct values), numeric sorts\n `amount`.\n- **Filter** - apply a `contains` filter to one column.\n- **Scroll** - 180 frames at 60 px/frame, sampling frame intervals.\n\n### Results\n\nThe table is generated from the ledger by `tools/sync-guide-facts.mjs`;\nthe versions and the date are part of it.\n\n<!-- bench:start -->\nMeasured 12 Sep 2026 with `pnpm bench:compare` (tests/perf/compare.spec.ts, recorded by tools/record-benchmarks.mjs): 100,000 rows x 9 columns; 1000 x 520 px container, 32 px rows, 140 px columns, each grid with its default theme; fastest of 7 samples per operation, each grid in a fresh page; Chromium through Playwright, headless; win32 10.0.26200 x64, Intel(R) Core(TM) Ultra 7 255U; a developer workstation, not a dedicated bench rig. Lower is better.\n\n| Operation | SvGrid | AG Grid Community | SVAR Svelte DataGrid | TanStack Table, minimal DOM |\n| --- | --- | --- | --- | --- |\n| Mount | 75.5 ms | 51.4 ms | 11.4 ms | 196 ms |\n| Sort, text column | 149 ms | 282.8 ms | 187.2 ms | 466 ms |\n| Sort, numeric column | 115.7 ms | 270 ms | 165.1 ms | 374.6 ms |\n| Filter, one column (indicative only, see below) | 99.6 ms | 170.4 ms | 32.6 ms | 111.7 ms |\n| Scroll, p95 frame | 34.6 ms | 35.9 ms | 34.8 ms | 35.3 ms |\n| Frames dropped while scrolling, of 180 | 0 | 0 | 0 | 1 |\n| Rows kept in the DOM (virtualization on) | 27 | 35 | 19 | 27 |\n\nVersions: `@svgrid/grid` 3.0.3, `ag-grid-community` 36.1.0, `wx-svelte-grid` 2.7.0, `@tanstack/svelte-table` 9.2.4.\n<!-- bench:end -->\n\nRead that as: **SvGrid sorts faster than AG Grid Community and SVAR on both\ncolumn types, scrolling is level across all four, and mounting is where the\nlighter grids are ahead** - SVAR paints its first rows fastest, AG Grid is\nahead of SvGrid, and the TanStack renderer pays for building a row object\nper record before it can draw anything. Anyone claiming a single headline\nnumber for a grid comparison is selling something.\n\n**The filter row is not a like-for-like comparison and is shown only because\nhiding a number we win looks worse than explaining it.** The grids' single-\ncolumn filter APIs differ: the harness drives AG Grid's quick filter, which\nsearches every column and is strictly more work than the single-column\n`contains` SvGrid performs, while SVAR and TanStack run a predicate over the\none column. Do not read a ratio into that row.\n\n**The TanStack column is an engine plus the least DOM an app could draw.**\nTanStack Table renders nothing, so its adapter draws the row model through\na fixed-height windowed table with no virtualizer library, no filter UI and\nno editors. Its mount and sort numbers include creating the engine's row\nobjects for every record; the grids around it do the same work inside their\nown models.\n\nSorting is where SvGrid's distance comes from, and it is not subtle: SvGrid\nresolves each sort clause once and precomputes a key array, and for a\ncolumn whose distinct values are far fewer than its rows it collates the\ndistinct values once and sorts by rank. Mounting is the other direction -\nsee the accounting in [benchmarks](./benchmarks.md).\n\nTwo methodology notes, both of which were bugs in this harness before they\nwere notes, and both of which changed the numbers by more than any code\nchange did:\n\n- **Each grid runs in a fresh page.** They used to run one after another in\n the same one, where the first warmed the JIT, fragmented the heap and\n left a hundred thousand rows of garbage for the next. Back-to-back runs\n on an idle machine disagreed with themselves by a factor of two.\n Run-to-run variance is now a few percent.\n- **Operations are timed until the DOM changes, not for a fixed two\n frames.** The old fixed wait put a two-frame floor under every number -\n an operation that recomputed nothing at all measured the floor, and a\n mount whose rows were already in the DOM measured pure waiting - which\n flattered whichever grid was slower.\n- **Each figure is the fastest of the samples, not the median.** Noise\n only ever adds time, so the minimum is the cleanest estimate of what the\n machine can do, and medians on this box drifted by a third between\n consecutive runs - more than most of the differences being measured.\n Applied identically to every grid.\n\nWhat this table deliberately does not include:\n\n- **Features the grids do not measure the same way.** Grouping, pivot,\n editing and export all differ enough in shape that a single timing would\n compare two different amounts of work. The filter row above is the one\n case we publish anyway, labelled, rather than quietly dropping a result\n that happens to favour us.\n- **Any grid we cannot license for this.** The harness is grid-agnostic on\n purpose, but some commercial grids licence their software in ways that\n restrict using it to produce competitive claims. Where that is the case\n we do not ship an adapter, and we would rather have an obviously\n incomplete table than a legally dubious one. Run your own shortlist.\n- **Your workload.** One dataset shape, one machine, one browser, default\n configuration for every grid. If a grid decision rides on this, clone the\n harness and put your own data in it.\n\n## Migrating from AG Grid\n\nThe most common starting point. See\n[Migrating from AG Grid](./migrating-from-ag-grid.md) for a side-by-side\ntranslation of column defs, features, filtering, editing, and the\nimperative API. The example that guide is built around runs here:\n\n<div data-docs-demo=\"139-migration-from-ag-grid\" data-height=\"560\"></div>\n\n## Migrating from TanStack Table\n\nThe map is one-to-one - SvGrid's headless core speaks the vocabulary\nTanStack Table v9 introduced. The big differences:\n\n- Replace `createTable(opts)` with `createSvGrid(opts)`. Same state\n machine, same features object.\n- Replace the row-model factories with the same names from\n `@svgrid/grid`.\n- The render layer changes - TanStack hands you `FlexRender` + the\n row model; SvGrid lets you keep that headless approach OR drop in\n the default `<SvGrid>` component.\n\nThe headless demo below drives a plain `<table>` from `createSvGrid`, the\nway a TanStack app would:\n\n<div data-docs-demo=\"186-headless-table\" data-height=\"520\"></div>\n\nAnd the same rows through the render component, which is the part TanStack\nleaves to you. The example runs against these rows:\n\n```svelte {preamble}\n<script lang=\"ts\">\n import { SvGrid, type GridColumns } from '@svgrid/grid'\n\n type Order = {\n id: number\n customer: string\n region: string\n status: string\n amount: number\n }\n\n const orders: Order[] = [\n { id: 1, customer: 'Ada Lovelace', region: 'EMEA', status: 'open', amount: 1240 },\n { id: 2, customer: 'Grace Hopper', region: 'AMER', status: 'shipped', amount: 860 },\n { id: 3, customer: 'Linus Torvalds', region: 'EMEA', status: 'closed', amount: 2210 },\n { id: 4, customer: 'Radia Perlman', region: 'APAC', status: 'open', amount: 430 },\n { id: 5, customer: 'Barbara Liskov', region: 'AMER', status: 'pending', amount: 1780 },\n ]\n\n let rows = $state<Order[]>(orders)\n\n const columns: GridColumns<Order> = [\n { field: 'customer', header: 'Customer', width: 180 },\n { field: 'region', header: 'Region', width: 110 },\n { field: 'status', header: 'Status', width: 110 },\n { field: 'amount', header: 'Amount', width: 120, editorType: 'number', format: { type: 'currency', currency: 'USD' } },\n ]\n</script>\n```\n\n```svelte {runnable}\n<SvGrid data={rows} {columns} sortable filterable selectable />\n```\n\n## Pricing\n\nSvGrid Community is MIT - free for commercial use, no attribution\nrequired at runtime. SvGrid Enterprise is a per-developer licence: $599\nper developer per year for the enterprise grid or $999 with the\nspreadsheet and Studio, both for unlimited applications; see\n<https://svgrid.com/pricing/> for what each tier adds.\n\nAG Grid Community is MIT. AG Grid Enterprise is priced per developer with\none year of updates; the figure ag-grid.com listed on the date we read it\nis in the facts block at the top of this page, and the\n[SvGrid vs AG Grid](https://svgrid.com/compare/ag-grid/) page carries the\nlink. Compare what each paid tier adds before comparing prices: most of\nwhat AG Grid sells as Enterprise is in SvGrid's free core.\n\nTanStack Table is MIT and sponsor-funded; tanstack.com offers paid\nEnterprise Support as private consulting.\n\n## Frequently asked questions\n\n### What is the best data grid for Svelte 5?\n\nFor a Svelte-5-native grid with a batteries-included render component, SvGrid is\nbuilt around runes and snippets. TanStack Table is a strong headless-only\nchoice if you want to build the DOM layer yourself across frameworks, and its\nv9 Svelte adapter targets Svelte 5. AG Grid is the most feature-complete but\nlives in React, Angular and Vue first and reaches Svelte through\ncommunity-built integrations.\n\n### Is SvGrid a good AG Grid alternative?\n\nYes, for Svelte projects. SvGrid is a fraction of AG Grid Community's\nmeasured size on a Svelte page (the facts block has both numbers and the\nmethod), is MIT-licensed for commercial use, and offers `@svgrid/enterprise`\nfor export, print, import and pivot at a per-developer price. On the\nbenchmark above it sorts a hundred-thousand-row column faster on both\ncolumn types and scrolls level; AG Grid mounts quicker. It does not match\nevery AG Grid Enterprise feature - see the\n[missing-features list](./missing-features.md) for the gaps.\n\n### SvGrid vs TanStack Table - which should I pick?\n\nPick SvGrid if you want virtualization, Excel-style filters, selection, and\ninline editing working out of the box on Svelte 5. Pick TanStack Table if you\nwant a framework-agnostic headless engine and are happy to build the rendering,\nvirtualization, and editing UI yourself. Both are MIT-licensed.\n\n### Does the TanStack Svelte adapter support Svelte 5?\n\nYes. The `@tanstack/svelte-table` v9 line declares a Svelte 5 peer range\nand passes data through getters rather than stores; the facts block above\nshows the version read from npm. The earlier `createSvelteTable` constructor\nis gone in v9.\n\n### Does AG Grid have an MCP server like SvGrid?\n\nYes. `ag-mcp` (MIT) gives an assistant AG Grid's docs, examples and\nversion-specific upgrade prompts. `@svgrid/mcp` does the same for SvGrid\nand adds a code checker that validates props and imports against the real\nAPI surface, a scaffold tool and a preview. Neither is an in-grid feature;\nSvGrid's natural-language filter, smart fill and summarise helpers are, and\nthey ship free in `@svgrid/grid` with a model provider you register.\n\n### How big is the SvGrid bundle?\n\nThe facts block at the top of this page has the measured gzipped size of the\nfull `<SvGrid>` render component and its stylesheet, read from\n`docs/_data/svgrid-size.json`, which `pnpm size:json` writes. The\n[bundle size reference](./bundle-size.md) breaks it down by entry:\nthe headless core on its own, the core subpath, the charts, and the lazy\nchunks that load on demand.\n\n## See also\n\n- [Why headless?](../why-headless.md) - the design decision behind\n SvGrid's two-layer architecture.\n- [Migrating from AG Grid](./migrating-from-ag-grid.md) - the\n practical recipe.\n- [Migrating from TanStack Table](./migrating-from-tanstack-table.md) - the\n one-to-one API map.\n- [Benchmarks](./benchmarks.md) - how the numbers are produced and what\n they leave out.\n- [Enterprise feature pack](../enterprise/README.md) - what SvGrid charges for.\n- [Missing features](./missing-features.md) - the honest gap list\n versus AG Grid Enterprise.\n- [All comparisons](https://svgrid.com/compare/) - one page per grid, with\n dated sources for every claim.\n"
|
|
5399
|
+
"markdown": "\n# Comparison: SvGrid vs AG Grid vs TanStack Table\n\nThe three projects solve overlapping problems, and the right choice\ndepends on the framework you ship on, how much of the grid you want to\nbuild yourself, and your budget. Every number on this page is read from\nnpm or measured by a script in this repository on the date shown; the\nblock below is regenerated by `node tools/sync-guide-facts.mjs` and the\nper-competitor pages under [/compare/](https://svgrid.com/compare/) list\nthe sources for every feature claim.\n\n<!-- facts:start ag-grid,tanstack-table -->\n> **Facts, checked 12 Sep 2026.** `ag-grid-community` 36.1.0, MIT, last published 5 Aug 2026, 12,400,000 npm downloads in the 30 days to 10 Sep 2026. `@tanstack/svelte-table` 9.2.4, MIT, last published 28 Aug 2026, 231,000 npm downloads in the same window. `@svgrid/grid` 3.0.3, MIT, last published 11 Sep 2026, 16,900 npm downloads in the same window. Bundle, minified and gzipped, each package built alone with Svelte external: SvGrid 3.0.25 99.8 KB JS + 11.3 KB CSS (measured 26 Oct 2026); `ag-grid-community` 36.1.0 317.5 KB JS, no separate stylesheet (measured 12 Sep 2026); `@tanstack/svelte-table` 9.2.4 36.3 KB JS, no separate stylesheet, svelte external (measured 12 Sep 2026). AG Grid pricing, as its site states it: AG Grid Community is free under MIT. AG Grid Enterprise is listed at $999 USD per developer with one year of updates and Zendesk support; the Enterprise Bundle with AG Charts Enterprise is $1,498 USD per developer (https://www.ag-grid.com/license-pricing/, read 12 Sep 2026). TanStack Table pricing, as its site states it: TanStack Table is MIT and free; tanstack.com is sponsor-supported and offers Enterprise Support as private consulting and expert support, with no licence sold for the table (https://tanstack.com/table/latest, read 12 Sep 2026). SvGrid: MIT core; @svgrid/enterprise from $299 per developer per year (Indie, under $1M revenue), $599 for Enterprise. Side by side, with sources: [SvGrid vs AG Grid (community + enterprise)](https://svgrid.com/compare/ag-grid/), [SvGrid vs TanStack Table (Svelte)](https://svgrid.com/compare/tanstack-table/).\n<!-- facts:end -->\n\n## TL;DR\n\n| Project | Lives in | Ships | Licence |\n| --------------------- | ---------------------------------------- | ---------------------------------------------------------- | ----------------------------------------- |\n| **SvGrid** | Svelte 5 | Headless core + Svelte render component + Enterprise pack | MIT (Community) / commercial (Enterprise) |\n| **AG Grid Community** | React, Angular, Vue, plain JS | Full grid + renderer; Svelte through community integrations | MIT |\n| **AG Grid Enterprise**| same | Adds the set filter, range selection, master/detail, tree, grouping, pivot, charts, Excel export, server-side row model | Commercial, per developer |\n| **TanStack Table** | React, Vue, Svelte, Solid, Qwik, Lit, JS | Headless engine **only**; the Svelte adapter is Svelte 5 | MIT |\n\nThe bundle sizes and prices are in the facts block above, with the date\nthey were read and the method behind the sizes.\n\n## When SvGrid is the right choice\n\n- You're on **Svelte 5** and want a grid that uses the runtime's idioms\n (snippets for cells, `$state` for data, `$derived` for aggregates) -\n not a React-port pretending to be Svelte.\n- You want a **headless core you can render yourself** AND a\n default-styled component for the 80% case. Most \"headless\" libraries\n make you write the markup; most \"monolith\" libraries make you fight\n the markup. SvGrid does both in one package.\n- You need **clean theming via CSS custom properties** and a documented\n `--sg-*` token surface, not a hard-coded class soup.\n- You ship under **strict CSP** (no `eval`, no `new Function`, no\n inline scripts). SvGrid runs clean; AG Grid Community does too.\n TanStack Table is engine-only so the question doesn't apply.\n- You want **SSR markup that is meaningful before hydration** (good\n first paint, SEO, SvelteKit `+page.server` integration). SvGrid +\n TanStack Table both qualify. AG Grid renders client-side.\n- You want the features AG Grid sells as Enterprise - the set filter,\n range selection, master/detail, tree data, grouping with aggregation,\n integrated charts, flat server-side infinite scroll - **in the MIT\n core**. (Server-side grouping, tree, pivot and transactions are\n Enterprise in both.)\n\n## When AG Grid is the right choice\n\n- You're on **React, Angular, or Vue**, not Svelte. SvGrid is\n Svelte-only, and ag-grid.com points Svelte users to community-built\n integrations rather than an official package.\n- You need a push-based **viewport row model** for a real-time trading\n blotter, where the server streams the visible window over a socket.\n SvGrid's server-side row model covers sort, filter, grouping, tree,\n pivot, transactions and select-all across unloaded rows, and its\n real-time page merges deltas into loaded rows, but it does not have the\n viewport model.\n- You need **custom tool panels**. SvGrid's tool panel is a fixed\n Columns + Filters pair. Custom filter components are covered by a\n column's `customFilter`.\n- You need **AG Charts** for maps, network graphs, 3D or a canvas renderer.\n SvGrid's chart is SVG with decimation, and it ships 29 types, a configurable\n axis model, synchronized charts, a financial toolkit with indicator panes\n and drawing tools, a builder and PDF export in the MIT core; it does not\n draw maps.\n- You want a vendor with **a decade of enterprise procurement paperwork**\n already on file.\n\n## When TanStack Table is the right choice\n\n- You want a **rendering-framework-agnostic engine** so the same\n business logic powers React + Svelte + Solid surfaces in your\n monorepo.\n- You're already in the TanStack ecosystem (Query, Router, Form,\n Virtual) and want one mental model.\n- You're happy writing **all the markup yourself** - the row recycling,\n the keyboard map, the ARIA roles, the focus management, the\n drag-to-resize. That's the cost of \"engine only\".\n\n## Feature parity at a glance\n\nYes: shipped in that edition. Partial: needs extra work or a companion\npackage. No: not available. The AG Grid columns follow ag-grid.com's\nCommunity vs Enterprise page and its Set Filter, Tree Data and CSV export\npages; the dated list of those sources is on the\n[SvGrid vs AG Grid](https://svgrid.com/compare/ag-grid/) page, and the\nTanStack sources on [SvGrid vs TanStack Table](https://svgrid.com/compare/tanstack-table/).\n\n| | SvGrid Community | SvGrid Enterprise | AG Grid Community | AG Grid Enterprise | TanStack Table |\n| ------------------------------- | ---------------- | ----------------- | ----------------- | ------------------ | -------------- |\n| Headless core (engine only) | Yes | Yes | No | No | Yes |\n| Default render component | Yes (Svelte 5) | Yes | Yes (each framework) | Yes | No |\n| Sort (multi-column) | Yes | Yes | Yes | Yes | Yes (engine) |\n| Filter menu (operator + facet) | Yes | Yes | Partial (text and number filters; the set filter is Enterprise) | Yes | No |\n| Filter row | Yes | Yes | Yes | Yes | No |\n| Pagination | Yes | Yes | Yes | Yes | Yes (engine) |\n| Grouping + aggregation | Yes | Yes | No (Enterprise) | Yes | Yes (engine) |\n| Tree / expand-collapse rows | Yes | Yes | No (Enterprise) | Yes | Yes (engine) |\n| Master/detail | Yes | Yes | No (Enterprise) | Yes | No |\n| Cell range selection + copy/paste | Yes | Yes | No (Enterprise) | Yes | No |\n| Fill handle | Yes | Yes | No (Enterprise) | Yes | No |\n| Inline editing (typed editors) | Yes | Yes | Yes | Yes | No |\n| Column virtualization | Yes | Yes | Yes | Yes | No |\n| Row virtualization | Yes | Yes | Yes | Yes | Partial (pair with TanStack Virtual) |\n| Column pinning (left/right) | Yes | Yes | Yes | Yes | No |\n| Column tool panel | Yes | Yes | No (Enterprise) | Yes | No |\n| Context menu | Yes | Yes | No (Enterprise) | Yes | No |\n| Fit-to-width with shrink | Yes | Yes | Partial | Yes | No |\n| WAI-ARIA grid pattern | Yes | Yes | Yes | Yes | No (your markup) |\n| Server-side data, flat (sort / filter / paging / infinite scroll) | Yes (built in) | Yes (built in) | Yes (infinite row model) | Yes (built in) | Partial (manual flags) |\n| Server-side row model (lazy grouping, tree, pivot, transactions, select-all across unloaded rows) | No (Enterprise) | Yes (built in) | No (Enterprise) | Yes (built in) | No |\n| Global search over server-side data | Yes (`filterModel.global`) | Yes | No (the quick filter is client-side only) | No | n/a |\n| CSP-clean (no eval, no inline) | Yes | Yes | Yes | Yes | n/a |\n| Meaningful SSR markup | Yes | Yes | No | No | depends on your markup |\n| CSV / TSV / JSON export | Yes | Yes | Yes (CSV) | Yes | No |\n| Excel (.xlsx) / PDF export | No | Yes | No | Yes (Excel) | No |\n| Print | No | Yes | No | No | No |\n| Excel / CSV import | No | Yes | No | No | No |\n| In-grid AI helpers (bring your own model) | Yes | Yes | No | No | No |\n| MCP server for AI assistants | Yes (`@svgrid/mcp`) | Yes | Yes (`ag-mcp`) | Yes | No (agent skills ship in the package) |\n| Pivot table | No | Yes | No | Yes | No (custom) |\n| Integrated charts | Yes (29 types, builder, financial toolkit) | Yes | No | Yes (AG Charts) | No |\n| Support response time | GitHub (best-effort) | 1 business day; 1h sev-1 on Enterprise | GitHub (best-effort) | no number published | GitHub; paid Enterprise Support offered |\n| Theming via CSS variables | Yes (`--sg-*`) | Yes | Yes (theme builder) | Yes | n/a |\n| Source button per demo | Yes (gallery) | Yes | No | No | No |\n\n## Bundle size\n\nThe facts block at the top of the page has the gzipped size of each\npackage, measured by the same method: each package built alone with Vite\nin library mode, minified, gzip level 9, Svelte external because it is a\npeer dependency. SvGrid's own number comes from `pnpm size:json`\n(`packages/grid/scripts/measure-size.mjs`), the competitors' from\n`pnpm competitors:measure`; both write `docs/_data` and the block is\nregenerated from there, so the page cannot quote a size nobody measured.\n\nWhat the SvGrid number contains: the whole render component -\nvirtualization, Excel-style filters, inline editing, grouping, tree,\nmaster/detail, cell selection and accessibility - in one import, plus a\nseparate stylesheet. Charts, date and time editors, menus and export split\ninto `import()` chunks that load on demand rather than shipping in the\ninitial bundle; the headless core on its own is a small fraction of the\nrender component, and `@svgrid/enterprise` features are separate subpath\nimports. The per-entry breakdown, including the headless core and the\nlazy chunks, is in the [bundle size reference](./bundle-size.md).\n\nWhat the AG Grid number contains: `createGrid` with every Community\nmodule registered and the Quartz theme, whose CSS ships inside the script\nunder the theming API, so there is no separate stylesheet to add. The\nTanStack number is the whole Svelte adapter with its engine: no\nvirtualizer, filter UI or editors, because a headless library has none.\n\n## Measured performance\n\nA vendor's own benchmark is worth nothing unless you can rerun it, so the\nharness is in the repository and takes an adapter per grid. Adding another\ngrid is about forty lines in `examples/src/bench/adapters.ts` and nothing\nelse.\n\n```bash\n# headless, prints the table and writes tests/perf/.last-compare.json\nBENCH_REPEATS=7 BENCH_GRIDS=svgrid,aggrid,svar,tanstack pnpm bench:compare\n\n# move that run into docs/_data/competitors.json, then regenerate this page\nnode tools/record-benchmarks.mjs && node tools/sync-guide-facts.mjs\n\n# or drive it by hand\npnpm --filter @svgrid/grid-example-gallery dev # then open /bench.html\n```\n\nEach operation is timed until the grid's DOM reflects it, plus one frame:\n\n- **Mount** - fresh container, create the grid, until rows are painted.\n- **Sort** - change the sort on one column, until the new order is painted.\n Text sorts `name` (tens of thousands of distinct values), numeric sorts\n `amount`.\n- **Filter** - apply a `contains` filter to one column.\n- **Scroll** - 180 frames at 60 px/frame, sampling frame intervals.\n\n### Results\n\nThe table is generated from the ledger by `tools/sync-guide-facts.mjs`;\nthe versions and the date are part of it.\n\n<!-- bench:start -->\nMeasured 28 Oct 2026 with `pnpm bench:compare` (tests/perf/compare.spec.ts, recorded by tools/record-benchmarks.mjs): 100,000 rows x 9 columns; 1000 x 520 px container, 32 px rows, 140 px columns, each grid with its default theme; fastest of 3 samples per operation, each grid in a fresh page; Chromium through Playwright, headless; win32 10.0.26200 x64, Intel(R) Core(TM) Ultra 7 255U; a developer workstation, not a dedicated bench rig; tick: 1,000 of the rows replaced per tick with a new amount, the grid sorted by amount, on the update path each grid provides, timed until the changed cells paint; 180 ticks after 10 to warm up. Lower is better.\n\n| Operation | SvGrid | AG Grid Community | SVAR Svelte DataGrid | TanStack Table, minimal DOM |\n| --- | --- | --- | --- | --- |\n| Mount | 30.7 ms | 67 ms | 11.4 ms | 170.2 ms |\n| Sort, text column | 77.4 ms | 213.9 ms | 135.4 ms | 360.9 ms |\n| Sort, numeric column | 32.8 ms | 216.7 ms | 141.7 ms | 178.2 ms |\n| Filter, one column (indicative only, see below) | 34.5 ms | 148.8 ms | 26.1 ms | 51.1 ms |\n| Scroll, p95 frame | 34.3 ms | 34.5 ms | 34.6 ms | 34.3 ms |\n| Live tick, 1,000 rows replaced, sorted by that column, p95 | 48.6 ms | 259.2 ms | 152.2 ms | 563.4 ms |\n| Main-thread work per 60 px scroll step, mean | 3.5 ms | 4.5 ms | 3 ms | 2.9 ms |\n| Frames dropped while scrolling, of 180 | 0 | 0 | 0 | 0 |\n| Ticks over one 60 Hz frame, of 180 | 115 | 180 | 180 | 180 |\n| Rows kept in the DOM (virtualization on) | 36 | 36 | 19 | 27 |\n| JS heap the grid adds, mounted, after GC | 5.7 MB | 42.1 MB | 2.3 MB | 109.9 MB |\n| JS heap the grid adds, after sorting and filtering, after GC | 17.6 MB | 26.2 MB | 3.9 MB | 113.3 MB |\n| Elements created per scroll frame | 0 | 30.1 | 16.8 | 18.7 |\n| Elements re-inserted per scroll frame (rows recycled) | 37.3 | 35.8 | 0 | 0 |\n\nVersions: `@svgrid/grid` 3.0.25, `ag-grid-community` 36.1.0, `wx-svelte-grid` 2.7.0, `@tanstack/svelte-table` 9.2.4.\n<!-- bench:end -->\n\nRead that as: **SvGrid sorts and keeps a live sort current faster than the\nother three, scrolling is level across all four, and SVAR is ahead on mount\nand memory** - it paints its first rows in under half of SvGrid's time and\nholds the least heap. Every grid scrolls at the display rate here, so the\np95 frame reads the same for all four; the work row under it is what a\nslower machine or a 120 Hz display would feel. There TanStack and SVAR do\nthe least per scroll step, about half a millisecond under SvGrid, and AG\nGrid the most. The row varies from run to run, so read the order of the\nfirst three as close, not settled. SvGrid makes its row objects the first time a\nsort or filter reads every row rather than at mount, which is why its two\nheap rows differ. The TanStack renderer pays for building a row object per\nrecord before it can draw anything. Anyone claiming a single headline\nnumber for a grid comparison is selling something.\n\n**The heap rows are the JS heap after a forced garbage collection, less the\nsame page with the data built and no grid,** so the 100,000 rows themselves\ncount against no one. The two DOM rows are counted over 60 untimed scroll\nframes after the timed ones. \"Created\" is elements that did not exist\nbefore; \"re-inserted\" is elements the grid already had and moved, which is\nhow a keyed list recycles a row from one end of the window to the other.\nSvGrid creates none and moves the two rows that cross the edge each frame;\na grid that rewrote its rows in place would score 0 on both.\n\n**The filter row is not a like-for-like comparison and is shown only because\nhiding a number we win looks worse than explaining it.** The grids' single-\ncolumn filter APIs differ: the harness drives AG Grid's quick filter, which\nsearches every column and is strictly more work than the single-column\n`contains` SvGrid performs, while SVAR and TanStack run a predicate over the\none column. Do not read a ratio into that row.\n\n**The TanStack column is an engine plus the least DOM an app could draw.**\nTanStack Table renders nothing, so its adapter draws the row model through\na fixed-height windowed table with no virtualizer library, no filter UI and\nno editors. Its mount and sort numbers include creating the engine's row\nobjects for every record; the grids around it do the same work inside their\nown models.\n\nSorting is where SvGrid's distance comes from, and it is not subtle: SvGrid\nresolves each sort clause once and precomputes a key array, and for a\ncolumn whose distinct values are far fewer than its rows it collates the\ndistinct values once and sorts by rank. Mounting is the other direction -\nsee the accounting in [benchmarks](./benchmarks.md).\n\nAt 1,000,000 rows the harness runs one grid per invocation\n(`BENCH_ROWS=1000000 BENCH_GRIDS=<one> BENCH_TICKS=30`); TanStack's\nadapter does not finish at that size. Those runs are not in the table\nbecause only a run that measured every grid together is comparable.\n\nTwo methodology notes, both of which were bugs in this harness before they\nwere notes, and both of which changed the numbers by more than any code\nchange did:\n\n- **Each grid runs in a fresh page.** They used to run one after another in\n the same one, where the first warmed the JIT, fragmented the heap and\n left a hundred thousand rows of garbage for the next. Back-to-back runs\n on an idle machine disagreed with themselves by a factor of two.\n That order effect is gone, but this workstation still varies by about\n 2x between whole runs taken minutes apart, for every grid at once, so\n compare the columns of one run and not one run against another.\n- **Operations are timed until the DOM changes, not for a fixed two\n frames.** The old fixed wait put a two-frame floor under every number -\n an operation that recomputed nothing at all measured the floor, and a\n mount whose rows were already in the DOM measured pure waiting - which\n flattered whichever grid was slower.\n- **Each figure is the fastest of the samples, not the median.** Noise\n only ever adds time, so the minimum is the cleanest estimate of what the\n machine can do, and medians on this box drifted by a third between\n consecutive runs - more than most of the differences being measured.\n Applied identically to every grid.\n\nWhat this table deliberately does not include:\n\n- **Features the grids do not measure the same way.** Grouping, pivot,\n editing and export all differ enough in shape that a single timing would\n compare two different amounts of work. The filter row above is the one\n case we publish anyway, labelled, rather than quietly dropping a result\n that happens to favour us.\n- **Any grid we cannot license for this.** The harness is grid-agnostic on\n purpose, but some commercial grids licence their software in ways that\n restrict using it to produce competitive claims. Where that is the case\n we do not ship an adapter, and we would rather have an obviously\n incomplete table than a legally dubious one. Run your own shortlist.\n- **Your workload.** One dataset shape, one machine, one browser, default\n configuration for every grid. If a grid decision rides on this, clone the\n harness and put your own data in it.\n\n## Migrating from AG Grid\n\nThe most common starting point. See\n[Migrating from AG Grid](./migrating-from-ag-grid.md) for a side-by-side\ntranslation of column defs, features, filtering, editing, and the\nimperative API. The example that guide is built around runs here:\n\n<div data-docs-demo=\"139-migration-from-ag-grid\" data-height=\"560\"></div>\n\n## Migrating from TanStack Table\n\nThe map is one-to-one - SvGrid's headless core speaks the vocabulary\nTanStack Table v9 introduced. The big differences:\n\n- Replace `createTable(opts)` with `createSvGrid(opts)`. Same state\n machine, same features object.\n- Replace the row-model factories with the same names from\n `@svgrid/grid`.\n- The render layer changes - TanStack hands you `FlexRender` + the\n row model; SvGrid lets you keep that headless approach OR drop in\n the default `<SvGrid>` component.\n\nThe headless demo below drives a plain `<table>` from `createSvGrid`, the\nway a TanStack app would:\n\n<div data-docs-demo=\"186-headless-table\" data-height=\"520\"></div>\n\nAnd the same rows through the render component, which is the part TanStack\nleaves to you. The example runs against these rows:\n\n```svelte {preamble}\n<script lang=\"ts\">\n import { SvGrid, type GridColumns } from '@svgrid/grid'\n\n type Order = {\n id: number\n customer: string\n region: string\n status: string\n amount: number\n }\n\n const orders: Order[] = [\n { id: 1, customer: 'Ada Lovelace', region: 'EMEA', status: 'open', amount: 1240 },\n { id: 2, customer: 'Grace Hopper', region: 'AMER', status: 'shipped', amount: 860 },\n { id: 3, customer: 'Linus Torvalds', region: 'EMEA', status: 'closed', amount: 2210 },\n { id: 4, customer: 'Radia Perlman', region: 'APAC', status: 'open', amount: 430 },\n { id: 5, customer: 'Barbara Liskov', region: 'AMER', status: 'pending', amount: 1780 },\n ]\n\n let rows = $state<Order[]>(orders)\n\n const columns: GridColumns<Order> = [\n { field: 'customer', header: 'Customer', width: 180 },\n { field: 'region', header: 'Region', width: 110 },\n { field: 'status', header: 'Status', width: 110 },\n { field: 'amount', header: 'Amount', width: 120, editorType: 'number', format: { type: 'currency', currency: 'USD' } },\n ]\n</script>\n```\n\n```svelte {runnable}\n<SvGrid data={rows} {columns} sortable filterable selectable />\n```\n\n## Pricing\n\nSvGrid Community is MIT - free for commercial use, no attribution\nrequired at runtime. SvGrid Enterprise is a per-developer licence: $599\nper developer per year for the enterprise grid or $999 with the\nspreadsheet and Studio, both for unlimited applications; see\n<https://svgrid.com/pricing/> for what each tier adds.\n\nAG Grid Community is MIT. AG Grid Enterprise is priced per developer with\none year of updates; the figure ag-grid.com listed on the date we read it\nis in the facts block at the top of this page, and the\n[SvGrid vs AG Grid](https://svgrid.com/compare/ag-grid/) page carries the\nlink. Compare what each paid tier adds before comparing prices: most of\nwhat AG Grid sells as Enterprise is in SvGrid's free core.\n\nTanStack Table is MIT and sponsor-funded; tanstack.com offers paid\nEnterprise Support as private consulting.\n\n## Frequently asked questions\n\n### What is the best data grid for Svelte 5?\n\nFor a Svelte-5-native grid with a batteries-included render component, SvGrid is\nbuilt around runes and snippets. TanStack Table is a strong headless-only\nchoice if you want to build the DOM layer yourself across frameworks, and its\nv9 Svelte adapter targets Svelte 5. AG Grid is the most feature-complete but\nlives in React, Angular and Vue first and reaches Svelte through\ncommunity-built integrations.\n\n### Is SvGrid a good AG Grid alternative?\n\nYes, for Svelte projects. SvGrid is a fraction of AG Grid Community's\nmeasured size on a Svelte page (the facts block has both numbers and the\nmethod), is MIT-licensed for commercial use, and offers `@svgrid/enterprise`\nfor export, print, import and pivot at a per-developer price. On the\nbenchmark above it sorts a hundred-thousand-row column faster on both\ncolumn types and scrolls level; AG Grid mounts quicker. It does not match\nevery AG Grid Enterprise feature - see the\n[missing-features list](./missing-features.md) for the gaps.\n\n### SvGrid vs TanStack Table - which should I pick?\n\nPick SvGrid if you want virtualization, Excel-style filters, selection, and\ninline editing working out of the box on Svelte 5. Pick TanStack Table if you\nwant a framework-agnostic headless engine and are happy to build the rendering,\nvirtualization, and editing UI yourself. Both are MIT-licensed.\n\n### Does the TanStack Svelte adapter support Svelte 5?\n\nYes. The `@tanstack/svelte-table` v9 line declares a Svelte 5 peer range\nand passes data through getters rather than stores; the facts block above\nshows the version read from npm. The earlier `createSvelteTable` constructor\nis gone in v9.\n\n### Does AG Grid have an MCP server like SvGrid?\n\nYes. `ag-mcp` (MIT) gives an assistant AG Grid's docs, examples and\nversion-specific upgrade prompts. `@svgrid/mcp` does the same for SvGrid\nand adds a code checker that validates props and imports against the real\nAPI surface, a scaffold tool and a preview. Neither is an in-grid feature;\nSvGrid's natural-language filter, smart fill and summarise helpers are, and\nthey ship free in `@svgrid/grid` with a model provider you register.\n\n### How big is the SvGrid bundle?\n\nThe facts block at the top of this page has the measured gzipped size of the\nfull `<SvGrid>` render component and its stylesheet, read from\n`docs/_data/svgrid-size.json`, which `pnpm size:json` writes. The\n[bundle size reference](./bundle-size.md) breaks it down by entry:\nthe headless core on its own, the core subpath, the charts, and the lazy\nchunks that load on demand.\n\n## See also\n\n- [Why headless?](../why-headless.md) - the design decision behind\n SvGrid's two-layer architecture.\n- [Migrating from AG Grid](./migrating-from-ag-grid.md) - the\n practical recipe.\n- [Migrating from TanStack Table](./migrating-from-tanstack-table.md) - the\n one-to-one API map.\n- [Benchmarks](./benchmarks.md) - how the numbers are produced and what\n they leave out.\n- [Enterprise feature pack](../enterprise/README.md) - what SvGrid charges for.\n- [Missing features](./missing-features.md) - the honest gap list\n versus AG Grid Enterprise.\n- [All comparisons](https://svgrid.com/compare/) - one page per grid, with\n dated sources for every claim.\n"
|
|
5400
5400
|
},
|
|
5401
5401
|
{
|
|
5402
5402
|
"slug": "help/conditional-form-schema",
|
|
@@ -5452,7 +5452,7 @@ export const docs = [
|
|
|
5452
5452
|
"path": "docs/help/editing/saving-values.md",
|
|
5453
5453
|
"title": "Saving values",
|
|
5454
5454
|
"section": "Editing",
|
|
5455
|
-
"markdown": "# Saving values\n\nWhen the user commits an edit, the new value is written into the grid's\n**internal data copy**. The grid does **not** mutate the array you passed\nin via the `data` prop - it keeps its own working copy so an undo / cancel\nis possible without touching your state.\n\nTo round-trip edits back to your source there are two patterns.\n\nLive demo - typed editors, dirty tracking, save button:\n\n<div data-docs-demo=\"05-inline-editing\" data-height=\"500\"></div>\n\n## Pattern A - `onCellValueChange` (recommended)\n\nThe wrapper fires `onCellValueChange` whenever an inline edit commits.\nThe payload contains everything you need to forward the edit to a server,\nupdate a cached aggregate, or push to an undo stack:\n\n```svelte\n<script lang=\"ts\">\n type Event = {\n rowIndex: number\n columnId: string\n oldValue: unknown\n newValue: unknown\n row: Person\n }\n\n function onCellValueChange(event: Event) {\n // 1. ship the change\n savePersonField(event.row.id, event.columnId, event.newValue)\n // 2. update derived data (totals, dependencies, etc.)\n // see the cascade-editing demo for the full pattern\n }\n</script>\n\n<SvGrid\n {data}\n {columns}\n features={features}\n enableInlineEditing={true}\n onCellValueChange={onCellValueChange}\n/>\n```\n\nThe wrapper has already written the parsed value into the row by the\ntime the callback fires, so `event.row` reflects the post-edit state.\nThe [`18-cascade-editing` demo](../../../examples/src/demos/18-cascade-editing.svelte) wires this\ninto a recompute pipeline.\n\n## Pattern B - read a snapshot from the API\n\nUseful for batch saves, \"click Save to commit\" UIs, or diffing against a\nbefore-snapshot:\n\n```svelte\n<script lang=\"ts\">\n let api = $state<SvGridApi<typeof features, Person> | null>(null)\n\n function captureChanges() {\n if (!api) return\n const after = api.getData()\n // diff against your before-snapshot, send to server, etc.\n }\n</script>\n\n<SvGrid {data} {columns} features={features}\n enableInlineEditing\n onApiReady={(next) => (api = next)} />\n\n<button onclick={captureChanges}>Save</button>\n```\n\nThe [`05-inline-editing` demo](../../../examples/src/demos/05-inline-editing.svelte) shows\nthis pattern with dirty-cell tracking against an `initial` snapshot.\n\n## Sync data both ways\n\nReplacing the `data` prop forces the grid to re-read it. To mirror the\ngrid's internal copy back into a parent `$state` so other UI can react,\nuse `onCellValueChange`:\n\n```svelte\n<script lang=\"ts\">\n let rows = $state<Person[]>([...])\n function onCellValueChange(e: { rowIndex: number; row: Person }) {\n rows = rows.map((r, i) => (i === e.rowIndex ? e.row : r))\n }\n</script>\n\n<SvGrid data={rows} {columns} features={features}\n enableInlineEditing\n onCellValueChange={onCellValueChange} />\n```\n\n## Persisting one cell\n\nThe event tells you exactly what changed - which row, which column, from what\nto what. That is enough for a PATCH, and it is why you rarely need to diff the\nwhole row.\n\n```svelte {runnable}\n<script lang=\"ts\">\n import { SvGrid, type GridColumns, type SvGridApi } from '@svgrid/grid'\n\n type Person = {\n id: number\n name: string\n email: string\n city: string\n age: number\n salary: number\n }\n\n const seed: Person[] = [\n { id: 1, name: 'Ada Lovelace', email: 'ada@example.com', city: 'London', age: 36, salary: 142000 },\n { id: 2, name: 'Grace Hopper', email: 'grace@example.com', city: 'New York', age: 45, salary: 168000 },\n { id: 3, name: 'Linus Torvalds', email: 'linus@example.com', city: 'Portland', age: 54, salary: 155000 },\n ]\n\n let rows = $state<Person[]>(seed.map((p) => ({ ...p })))\n let log = $state<string[]>([])\n\n // What you would send. A real one awaits fetch and reverts on failure.\n function save(field: string, id: number, value: unknown) {\n log = ['PATCH /people/' + id + ' { ' + field + ': ' + JSON.stringify(value) + ' }', ...log].slice(0, 4)\n }\n\n const columns: GridColumns<Person> = [\n { field: 'name', header: 'Name', width: 180, editorType: 'text' },\n { field: 'city', header: 'City', width: 150, editorType: 'text' },\n { field: 'age', header: 'Age', width: 90, editorType: 'number' },\n ]\n</script>\n\n<SvGrid\n data={rows}\n {columns}\n getRowId={(r) => String(r.id)}\n editable\n onCellValueChange={(e) => save(e.columnId, e.row.id, e.newValue)}\n/>\n\n<ul>\n {#each log as line}<li><code>{line}</code></li>{/each}\n</ul>\n```\n\n## Rolling back a failed save\n\nA save that fails has to put the value back, or the screen quietly disagrees\nwith the server. Holding the old value across the await is the whole trick.\n\n```svelte {runnable}\n<script lang=\"ts\">\n import { SvGrid, type GridColumns, type SvGridApi } from '@svgrid/grid'\n\n type Person = {\n id: number\n name: string\n email: string\n city: string\n age: number\n salary: number\n }\n\n const seed: Person[] = [\n { id: 1, name: 'Ada Lovelace', email: 'ada@example.com', city: 'London', age: 36, salary: 142000 },\n { id: 2, name: 'Grace Hopper', email: 'grace@example.com', city: 'New York', age: 45, salary: 168000 },\n { id: 3, name: 'Linus Torvalds', email: 'linus@example.com', city: 'Portland', age: 54, salary: 155000 },\n ]\n\n let rows = $state<Person[]>(seed.map((p) => ({ ...p })))\n let status = $state('idle')\n\n // Fails on purpose for anything under 18, to show the rollback path.\n async function persist(
|
|
5455
|
+
"markdown": "# Saving values\n\nWhen the user commits an edit, the new value is written into the grid's\n**internal data copy**. The grid does **not** mutate the array you passed\nin via the `data` prop - it keeps its own working copy so an undo / cancel\nis possible without touching your state.\n\nTo round-trip edits back to your source there are two patterns.\n\nLive demo - typed editors, dirty tracking, save button:\n\n<div data-docs-demo=\"05-inline-editing\" data-height=\"500\"></div>\n\n## Pattern A - `onCellValueChange` (recommended)\n\nThe wrapper fires `onCellValueChange` whenever an inline edit commits.\nThe payload contains everything you need to forward the edit to a server,\nupdate a cached aggregate, or push to an undo stack:\n\n```svelte\n<script lang=\"ts\">\n type Event = {\n rowIndex: number\n columnId: string\n oldValue: unknown\n newValue: unknown\n row: Person\n }\n\n function onCellValueChange(event: Event) {\n // 1. ship the change\n savePersonField(event.row.id, event.columnId, event.newValue)\n // 2. update derived data (totals, dependencies, etc.)\n // see the cascade-editing demo for the full pattern\n }\n</script>\n\n<SvGrid\n {data}\n {columns}\n features={features}\n enableInlineEditing={true}\n onCellValueChange={onCellValueChange}\n/>\n```\n\nThe wrapper has already written the parsed value into the row by the\ntime the callback fires, so `event.row` reflects the post-edit state.\nThe [`18-cascade-editing` demo](../../../examples/src/demos/18-cascade-editing.svelte) wires this\ninto a recompute pipeline.\n\n## Pattern B - read a snapshot from the API\n\nUseful for batch saves, \"click Save to commit\" UIs, or diffing against a\nbefore-snapshot:\n\n```svelte\n<script lang=\"ts\">\n let api = $state<SvGridApi<typeof features, Person> | null>(null)\n\n function captureChanges() {\n if (!api) return\n const after = api.getData()\n // diff against your before-snapshot, send to server, etc.\n }\n</script>\n\n<SvGrid {data} {columns} features={features}\n enableInlineEditing\n onApiReady={(next) => (api = next)} />\n\n<button onclick={captureChanges}>Save</button>\n```\n\nThe [`05-inline-editing` demo](../../../examples/src/demos/05-inline-editing.svelte) shows\nthis pattern with dirty-cell tracking against an `initial` snapshot.\n\n## Sync data both ways\n\nReplacing the `data` prop forces the grid to re-read it. To mirror the\ngrid's internal copy back into a parent `$state` so other UI can react,\nuse `onCellValueChange`:\n\n```svelte\n<script lang=\"ts\">\n let rows = $state<Person[]>([...])\n function onCellValueChange(e: { rowIndex: number; row: Person }) {\n rows = rows.map((r, i) => (i === e.rowIndex ? e.row : r))\n }\n</script>\n\n<SvGrid data={rows} {columns} features={features}\n enableInlineEditing\n onCellValueChange={onCellValueChange} />\n```\n\n## Persisting one cell\n\nThe event tells you exactly what changed - which row, which column, from what\nto what. That is enough for a PATCH, and it is why you rarely need to diff the\nwhole row.\n\n```svelte {runnable}\n<script lang=\"ts\">\n import { SvGrid, type GridColumns, type SvGridApi } from '@svgrid/grid'\n\n type Person = {\n id: number\n name: string\n email: string\n city: string\n age: number\n salary: number\n }\n\n const seed: Person[] = [\n { id: 1, name: 'Ada Lovelace', email: 'ada@example.com', city: 'London', age: 36, salary: 142000 },\n { id: 2, name: 'Grace Hopper', email: 'grace@example.com', city: 'New York', age: 45, salary: 168000 },\n { id: 3, name: 'Linus Torvalds', email: 'linus@example.com', city: 'Portland', age: 54, salary: 155000 },\n ]\n\n let rows = $state<Person[]>(seed.map((p) => ({ ...p })))\n let log = $state<string[]>([])\n\n // What you would send. A real one awaits fetch and reverts on failure.\n function save(field: string, id: number, value: unknown) {\n log = ['PATCH /people/' + id + ' { ' + field + ': ' + JSON.stringify(value) + ' }', ...log].slice(0, 4)\n }\n\n const columns: GridColumns<Person> = [\n { field: 'name', header: 'Name', width: 180, editorType: 'text' },\n { field: 'city', header: 'City', width: 150, editorType: 'text' },\n { field: 'age', header: 'Age', width: 90, editorType: 'number' },\n ]\n</script>\n\n<SvGrid\n data={rows}\n {columns}\n getRowId={(r) => String(r.id)}\n editable\n onCellValueChange={(e) => save(e.columnId, e.row.id, e.newValue)}\n/>\n\n<ul>\n {#each log as line}<li><code>{line}</code></li>{/each}\n</ul>\n```\n\n## Rolling back a failed save\n\nA save that fails has to put the value back, or the screen quietly disagrees\nwith the server. Holding the old value across the await is the whole trick.\n\n```svelte {runnable}\n<script lang=\"ts\">\n import { SvGrid, type GridColumns, type SvGridApi } from '@svgrid/grid'\n\n type Person = {\n id: number\n name: string\n email: string\n city: string\n age: number\n salary: number\n }\n\n const seed: Person[] = [\n { id: 1, name: 'Ada Lovelace', email: 'ada@example.com', city: 'London', age: 36, salary: 142000 },\n { id: 2, name: 'Grace Hopper', email: 'grace@example.com', city: 'New York', age: 45, salary: 168000 },\n { id: 3, name: 'Linus Torvalds', email: 'linus@example.com', city: 'Portland', age: 54, salary: 155000 },\n ]\n\n let rows = $state<Person[]>(seed.map((p) => ({ ...p })))\n let status = $state('idle')\n let api = $state<SvGridApi<any, Person> | null>(null)\n\n // Fails on purpose for anything under 18, to show the rollback path.\n async function persist(e: { rowIndex: number; columnId: string; newValue: unknown; oldValue: unknown }) {\n status = 'saving'\n await new Promise((r) => setTimeout(r, 500))\n if (e.columnId === 'age' && Number(e.newValue) < 18) {\n // Through the api: the grid draws its own copy of the row.\n api?.setCellValue(e.rowIndex, e.columnId, e.oldValue)\n status = 'rejected by server, rolled back'\n return\n }\n status = 'saved'\n }\n\n const columns: GridColumns<Person> = [\n { field: 'name', header: 'Name', width: 180, editorType: 'text' },\n { field: 'age', header: 'Age', width: 100, editorType: 'number' },\n ]\n</script>\n\n<SvGrid\n data={rows}\n {columns}\n editable\n onCellValueChange={persist}\n onApiReady={(a) => (api = a)}\n/>\n\n<p>Status: <strong>{status}</strong> (try an age under 18)</p>\n```\n\n## See also\n\n- [Parsing values](./parsing-values.md)\n- [Validation](./validation.md)\n- [Undo / redo](./undo-redo.md)\n"
|
|
5456
5456
|
},
|
|
5457
5457
|
{
|
|
5458
5458
|
"slug": "help/editing/start-stop-editing",
|
|
@@ -5494,7 +5494,7 @@ export const docs = [
|
|
|
5494
5494
|
"path": "docs/help/export.md",
|
|
5495
5495
|
"title": "Data export and printing",
|
|
5496
5496
|
"section": "Import & export",
|
|
5497
|
-
"markdown": "# Data export and printing\n\n**CSV / TSV / JSON export and copy-to-clipboard are free** in the community\n**[@svgrid/grid](https://www.npmjs.com/package/@svgrid/grid)** - the commodity\n\"data out\" every grid needs. The richer formats - **Excel (xlsx)**, **legacy\nExcel (xls)**, **PDF**, styled **HTML**, **XML**, **Markdown**, multi-sheet\nworkbooks, password protection, conditional-format export, and the drop-in\nexport menu - ship in the paid\n**[@svgrid/enterprise](https://www.npmjs.com/package/@svgrid/enterprise)** add-on,\nwhich reuses the exact same serializers so the two tiers feel like one product.\n\nFor the report built step by step, with a live grid under most steps, see [Export: a report to Excel and PDF](./export/report.md); this page is the reference.\n\n\n\n| Capability | Package |\n| ---------- | ------- |\n| CSV / TSV / JSON export, copy-to-clipboard (TSV / CSV / Markdown) | **Free** (`@svgrid/grid`) |\n| Excel `.xlsx` (typed cells, styles, conditional formatting, tables, multi-sheet) | Enterprise |\n| PDF, styled HTML, XML, legacy `.xls`, password-protected export | Enterprise |\n| `exportValue` hook, conditional-format export, `SvExportMenu`, `print()` | Enterprise |\n\n## Free: CSV / TSV / JSON + clipboard\n\nThe community grid's `SvGridApi` carries four zero-dependency methods - no\nlicense, no peer deps:\n\nThe examples on this page run against these rows:\n\n```svelte {preamble}\n<script lang=\"ts\">\n import { SvGrid, type GridColumns, tableFeatures, rowSortingFeature, columnFilteringFeature } from '@svgrid/grid'\n\n type Person = {\n id: number\n name: string\n email: string\n department: string\n age: number\n salary: number\n city: string\n startDate: string\n active: boolean\n }\n\n type Order = {\n id: string\n customer: string\n product: string\n quantity: number\n total: number\n status: 'pending' | 'shipped' | 'delivered'\n orderedAt: string\n }\n\n type Row = Person\n\n const features = tableFeatures({ rowSortingFeature, columnFilteringFeature })\n\n const people: Person[] = [\n { id: 1, name: 'Ada Lovelace', email: 'ada@example.com', department: 'Engineering', age: 36, salary: 142000, city: 'London', startDate: '2021-03-01', active: true },\n { id: 2, name: 'Grace Hopper', email: 'grace@example.com', department: 'Engineering', age: 45, salary: 168000, city: 'New York', startDate: '2019-07-15', active: true },\n { id: 3, name: 'Linus Torvalds', email: 'linus@example.com', department: 'Platform', age: 54, salary: 155000, city: 'Portland', startDate: '2020-01-20', active: false },\n { id: 4, name: 'Radia Perlman', email: 'radia@example.com', department: 'Networking', age: 49, salary: 161000, city: 'Seattle', startDate: '2022-09-05', active: true },\n { id: 5, name: 'Barbara Liskov', email: 'barbara@example.com', department: 'Platform', age: 52, salary: 172000, city: 'Boston', startDate: '2018-11-11', active: true },\n ]\n\n let rows = $state<Person[]>(people)\n\n const columns: GridColumns<Person> = [\n { field: 'name', header: 'Name', width: 200 },\n { field: 'department', header: 'Department', width: 150 },\n { field: 'city', header: 'City', width: 140 },\n { field: 'age', header: 'Age', width: 90 },\n { field: 'salary', header: 'Salary', width: 130, format: { type: 'currency', currency: 'USD' } },\n ]\n</script>\n```\n\n```ts\nawait api.exportCsv({ filename: 'orders' }) // orders.csv (BOM + Excel-friendly)\nawait api.exportTsv() // grid.tsv\nawait api.exportJson({ rows: 'selected' }) // grid.json, checked rows only\nawait api.copyToClipboard({ format: 'tsv' }) // paste straight into Excel / Sheets\n```\n\nEvery method:\n\n- defaults to the **current view** (`rows: 'selected' | 'all'` to change),\n- formats values **as shown on screen** (currency, dates) - pass\n `rawValues: true` for the underlying values,\n- accepts a `columns: string[]` field subset (in that order),\n- runs on a chunked, cancelable loop (`signal`, `onProgress`) so a 100k-row\n export never freezes the tab,\n- returns the serialized text; pass `download: false` to skip the download\n and just get the string.\n\n**Formula injection.** A text cell that starts with `=`, `+`, `-`, `@`, a tab\nor a carriage return would run as a formula in the spreadsheet that opens the\nfile, so `exportCsv` and `exportTsv` (and Enterprise's `exportData` for csv and\ntsv) write it with a leading `'`: `=HYPERLINK(...)` comes out as\n`'=HYPERLINK(...)`. Numbers are never touched, and neither is a signed number\nin text form such as `-12.50`. Pass `escapeFormulas: false` when the file feeds\nanother program rather than a spreadsheet. `copyToClipboard` leaves text as\ntyped unless you pass `escapeFormulas: true`, because a copy is pasted by the\nperson who made it.\n\n```svelte {runnable}\n<script lang=\"ts\">\n import { SvGrid, tableFeatures, type SvGridApi } from '@svgrid/grid'\n let api = $state<SvGridApi<any, Row> | null>(null)\n</script>\n\n<button onclick={() => api?.exportCsv({ filename: 'orders' })}>Export CSV</button>\n<button onclick={() => api?.copyToClipboard()}>Copy for Excel</button>\n<SvGrid data={rows} columns={columns} features={features} onApiReady={(a) => (api = a)} />\n```\n\nThe rest of this page covers the **Enterprise** formats.\n\nTry the export bar below - downloads run in your browser; the bundled\nlicense key removes the unlicensed watermark:\n\n<div data-docs-demo=\"21-export-and-print\" data-height=\"500\"></div>\n\n\n## What it is\n\n`@svgrid/enterprise` augments the `SvGridApi` you already get from\n`<SvGrid onApiReady>` with two methods:\n\n- `api.exportData({ format, filename?, columns?, rows?, pageOrientation? })`\n- `api.print({ title?, columns?, rows?, orientation? })`\n\nBoth methods default to **the currently displayed rows** - sort, filter,\nor paginate the grid, and the export reflects that view automatically.\n\n## When to use it\n\n- Reporting flows where users want to take the grid offline (spreadsheets,\n emailed PDFs).\n- Compliance / audit trails that require a printable artifact.\n- Quick CSV/TSV pulls for downstream pipelines.\n\nIf you only need machine-readable data, prefer CSV / TSV - they have no\npeer dependencies and produce the smallest files. Use xlsx / PDF only\nwhen the recipient expects formatted documents.\n\n## Minimal example\n\n```svelte {runnable}\n<script lang=\"ts\">\n import { SvGrid, tableFeatures, rowSortingFeature, type SvGridApi, type ColumnDef } from '@svgrid/grid'\n import { installEnterprise, type EnterpriseGridApi } from '@svgrid/enterprise'\n\n // Without a key, the feature still works but the grid shows an\n // \"unlicensed\" watermark and the console emits a one-time nudge directing\n // users to the pricing page. After you buy, call setLicenseKey(yourKey)\n // once at startup.\n\n const features = tableFeatures({ rowSortingFeature })\n\n type Order = { company: string; product: string; price: number }\n const rows: Order[] = [\n { company: 'ACME', product: 'Widget', price: 19.95 },\n { company: 'Globex', product: 'Gadget', price: 49.00 },\n ]\n const columns: ColumnDef<typeof features, Order>[] = [\n { field: 'company', header: 'Company' },\n { field: 'product', header: 'Product' },\n { field: 'price', header: 'Price', format: { type: 'currency', currency: 'USD' } },\n ]\n\n let api = $state<EnterpriseGridApi<typeof features, Order> | null>(null)\n\n function onReady(next: SvGridApi<typeof features, Order>) {\n api = installEnterprise(next)\n }\n</script>\n\n<button onclick={() => api?.exportData({ format: 'xlsx', filename: 'orders' })}>\n Export Excel\n</button>\n<button onclick={() => api?.exportData({ format: 'pdf', filename: 'orders', pageOrientation: 'landscape' })}>\n Export PDF\n</button>\n<button onclick={() => api?.print({ title: 'Orders' })}>\n Print\n</button>\n\n<SvGrid data={rows} columns={columns} features={features} onApiReady={onReady} />\n```\n\n## Install\n\n```bash\npnpm add @svgrid/enterprise\n# Optional - install only the peers you actually use:\npnpm add jszip # required for xlsx\npnpm add pdfmake # required for pdf\n```\n\nCSV, TSV, HTML, and Print have **no extra dependencies**. The peer\ndependencies are lazy-loaded only when you call the format that needs\nthem.\n\n## Licensing\n\n`@svgrid/enterprise` has a tiered license gate:\n\n| Key state | Behavior |\n| ------------------------------------------ | -------- |\n| No key set (`setLicenseKey()` not called) | Feature works. Grid shows an unlicensed watermark linking to svgrid.com/pricing; console.log emits a one-time nudge. |\n| A key that is not your license key | Same as no key: the feature works, with the watermark and a one-time console warning. |\n| Your license key | Works silently. |\n\nBuy a production key at <https://svgrid.com/pricing/> ($599 / developer /\nyear). To evaluate, you need no key at all: everything runs with a watermark.\n\n## Reference\n\n### `setLicenseKey(key: string): void`\n\nStores the key in module state. Call once at app startup (e.g. in\n`main.ts`). Subsequent calls overwrite.\n\n### `clearLicenseKey(): void` · `hasValidLicense(): boolean` · `dismissUnlicensedNudge(): void`\n\nProgrammatic helpers. `hasValidLicense()` is useful when you want UI to\nbranch on license status. `dismissUnlicensedNudge()` removes the\nwatermark and stops the MutationObserver - call it after setting a\nvalid key if you loaded the module without one during testing.\n\n### `installEnterprise(api): EnterpriseGridApi`\n\nMutates the given `SvGridApi` to add `exportData` and `print`. Returns\nthe same object with the augmented type, so existing references keep\nworking.\n\n### `api.exportData(opts)` - `Promise<void>`\n\n| Option | Type | Default | Notes |\n| ----------------- | ----------------------------------------------------- | -------------------- | ----- |\n| `format` | `'xlsx' \\| 'xls' \\| 'pdf' \\| 'csv' \\| 'tsv' \\| 'html' \\| 'json' \\| 'xml' \\| 'md'` | required | `xlsx` needs `jszip`, `pdf` needs `pdfmake`. `xls` / CSV / TSV / HTML / JSON / XML / Markdown are dependency-free. |\n| `pdf` | `PdfExportOptions` | - | PDF layout: page size, margins, title / subtitle / logo, theme colors, column widths, repeated header, page numbers. See \"PDF options\". |\n| `conditionalFormats` | `ConditionalFormat[]` | - | Same array as `<SvGrid conditionalFormats>`; carried into pdf / xlsx / html. See \"Conditional formatting in exports\". |\n| `freezeHeader` | `boolean` | `true` | Freeze the header row (xlsx / xls). |\n| `freezeColumns` | `number` | pinned cols | Freeze this many leading columns (xlsx / xls). Defaults to the grid's left-pinned columns. |\n| `autoFitColumns` | `boolean` | `true` | Size columns to content (xlsx / xls); a column's explicit `width` wins. |\n| `precisionSafe` | `boolean` | `false` | Export long integer IDs (> 15 digits) as text so Excel's float precision doesn't round them (xlsx / xls). |\n| `excelTable` | `boolean \\| { totalsRow?; style? }` | - | Wrap single-sheet xlsx in a native Excel Table (filter dropdowns, banded rows; `{ totalsRow: true }` adds SUM formulas). |\n| `download` | `boolean` | `true` | When false, return the {@link ExportResult} without downloading. |\n| `filename` | `string` | `\"grid\"` | Extension is appended if missing. |\n| `columns` | `{ field; header?; format?; align?; exportValue? }[]` | grid's own columns | Drives column selection + header labels. Auto-derived from the grid (with each column's `format`) when omitted. See `exportValue` below. |\n| `rows` | `ReadonlyArray<TData> \\| 'displayed' \\| 'selected' \\| 'all'` | `'displayed'` | `'displayed'` = current filtered/sorted/paged view, `'selected'` = checked rows, `'all'` = full dataset, or pass an explicit array. |\n| `rawValues` | `boolean` | `false` | By default the exporter writes the **formatted display value** (what you see). Set `true` to write raw underlying values (numbers stay numeric in xlsx). |\n| `autoGroup` | `boolean` | `true` | Carry the grid's active row grouping into xlsx outline rows. Pass your own `groupBy` to override, or `false` to ignore. |\n| `csv` | `{ delimiter?; eol?; bom?; escapeFormulas? }` | `{ ',', '\\r\\n', BOM, escapeFormulas: true }` | CSV / TSV tuning. UTF-8 BOM is on by default so Excel opens it without mojibake. `escapeFormulas` prefixes formula-like text with `'` (see above). |\n| `onProgress` | `(p) => void` | - | Progress for large exports: `{ phase, ratio, row?, total? }`, `phase` = `'project' \\| 'serialize' \\| 'write'`. |\n| `signal` | `AbortSignal` | - | Cancel an in-flight export (checked between chunks). Rejects with `AbortError`. |\n| `pageOrientation` | `'portrait' \\| 'landscape'` | `\"portrait\"` | PDF only. |\n| `merges` | `{ row; col; rowSpan?; colSpan? }[]` | `[]` | Merged cells (xlsx / pdf). Zero-based **body** row/col (header excluded). Single-sheet only; mutually exclusive with `groupBy` / `hierarchical`. |\n\n### Faithful values (what you see is what you export)\n\nBy default the export renders each cell the way the grid does on screen: a\ncolumn with `format: { type: 'currency', currency: 'USD' }` exports `$19.95`,\na date column exports its formatted date, a percent column exports `42%`. This\nholds for **every** format (csv / tsv / html / pdf / xlsx). Pass\n`rawValues: true` to write the underlying values instead (e.g. feeding a data\npipeline that wants the numeric `19.95`).\n\nFor columns whose on-screen value comes from a **custom cell renderer**, a\n`fieldFn`, or a lookup, give the column an `exportValue` hook - it takes\nprecedence over `format` and the raw field:\n\n```ts\nawait api.exportData({\n format: 'xlsx',\n columns: [\n { field: 'company', header: 'Company' },\n // a column rendered with a custom snippet on screen:\n { field: 'status', header: 'Status', exportValue: (row) => STATUS_LABELS[row.status] },\n ],\n})\n```\n\n### Export only what's selected\n\n```ts\n// current view (default)\nawait api.exportData({ format: 'xlsx' })\n// only the checked rows\nawait api.exportData({ format: 'xlsx', rows: 'selected' })\n// the entire underlying dataset, ignoring filters/paging\nawait api.exportData({ format: 'csv', rows: 'all' })\n```\n\n### Large exports: progress + cancel\n\nCSV / TSV / HTML are serialized natively (no peer dependency) and stream in\nchunks, yielding to the event loop so a big export doesn't freeze the tab:\n\n```ts\nconst controller = new AbortController()\nawait api.exportData({\n format: 'csv',\n rows: 'all',\n signal: controller.signal,\n onProgress: ({ ratio }) => updateProgressBar(ratio),\n})\n// controller.abort() rejects the export with an AbortError\n```\n\n### Excel-native numbers (xlsx)\n\nA single-sheet `xlsx` export writes numeric, currency, percent, and date\ncolumns as **real typed cells** with an Excel number format - so Excel can sum\nand sort them, and they still display formatted (currency symbol, thousands,\n`%`, date pattern) - via SvGrid's own OOXML writer. Set `rawValues: true` for\nunformatted raw values. The grouped-outline, multi-sheet, image, and merged-cell\npaths use the bundled writer (formatted-string cells). The legacy `xls` format\nis always typed.\n\n### Excel fidelity: freeze, auto-fit, hyperlinks\n\n`xlsx` and `xls` exports polish the spreadsheet automatically:\n\n- **Freeze header** - the header row stays visible when scrolling. On by\n default; `freezeHeader: false` to disable, `freezeColumns: n` to also freeze\n leading columns.\n- **Auto-fit column widths** - columns are sized to their content. On by\n default (`autoFitColumns: false` to disable); a column's explicit `width`\n (pixels) always wins.\n- **Hyperlinks** - give a column a `link(row)` hook to render clickable links.\n Works in `xlsx`, `xls`, `html`, `pdf`, and `print`.\n\nSingle-sheet `xlsx` is written by SvGrid's own OOXML writer, so numbers/dates\nstay typed with number formats, conditional-format colors are **real per-cell\nfills**, and freeze/widths/hyperlinks all apply. (Grouped/outline, multi-sheet,\nembedded-image, and merged-cell exports use the bundled writer.)\n\n```ts\nawait api.exportData({\n format: 'xlsx',\n freezeHeader: true, // default\n columns: [\n { field: 'name', header: 'Company', width: 220,\n link: (row) => `https://crm.example.com/accounts/${row.id}` },\n { field: 'revenue', header: 'Revenue', format: { type: 'currency', currency: 'USD' } },\n ],\n})\n```\n\nConditional-format colors (data bars / color scales) already render as real\ncell fills in `xlsx`, which is higher fidelity than the writer's built-in\nrule-only conditional formatting - so we keep the per-cell approach.\n\n### Get the file instead of downloading (`download: false`)\n\n`exportData` returns an **`ExportResult`** for the dependency-free paths\n(csv/tsv/html/json/xml/md, xls, pdf, single-sheet xlsx) so you can preview,\nupload, email, or attach the file. With `download: false` it builds and returns\nthe file **without** triggering a browser download:\n\n```ts\nconst res = await api.exportData({ format: 'xlsx', download: false })\n// res: { blob, filename, mime, rowCount, byteSize }\nawait uploadToStorage(res.blob, res.filename)\n```\n\nThe grouped / multi-sheet / image / blanket-styled xlsx paths use the vendored\nwriter, which downloads directly and returns `undefined` (and throws on\n`download: false`).\n\n### Excel Table (filter dropdowns + totals row)\n\nWrap a single-sheet xlsx in a native **Excel Table** - the user gets column\nfilter dropdowns, banded rows, structured references, and (optionally) a totals\nrow with live `SUM()` formulas:\n\n```ts\nawait api.exportData({ format: 'xlsx', excelTable: { totalsRow: true } })\n// or just `excelTable: true` for the table without a totals row\n```\n\nColumn widths auto-fit and leading **pinned columns are frozen automatically**\n(override with `freezeColumns`). For long IDs, `precisionSafe: true` writes them\nas text so Excel's 15-digit float limit doesn't silently round `1002000300040005`.\n\n### JSON / XML / Markdown\n\n```ts\nawait api.exportData({ format: 'json' }) // array of { field: value } - defaults to raw values\nawait api.exportData({ format: 'xml' }) // <rows><row><field>value</field>…\nawait api.exportData({ format: 'md' }) // GitHub-flavored Markdown table (great for docs / LLMs)\n```\n\nJSON defaults to **raw** values (real numbers/dates) since it's a data format;\npass `rawValues: false` for formatted strings. XML and Markdown use the\nformatted display values.\n\n### Copy to clipboard\n\n`api.copyExport(opts)` serializes to the clipboard instead of downloading a\nfile - handy for \"copy these rows into a spreadsheet or an email\":\n\n```ts\nawait api.copyExport({ format: 'tsv' }) // pastes into Excel / Sheets as columns (default)\nawait api.copyExport({ format: 'md', rows: 'selected' }) // Markdown table of the checked rows\nawait api.copyExport({ format: 'html' }) // rich text/html - keeps the table when pasted\n```\n\nSupported formats: `csv`, `tsv`, `html`, `json`, `xml`, `md`. `html` writes\nboth `text/html` (rich paste) and a `text/plain` fallback. Needs a secure\ncontext and a user gesture (call it from a click).\n\n### Conditional formatting in exports\n\nPass the same `conditionalFormats` array you give `<SvGrid>` to carry the grid's\ncolor scales, data bars, icon sets, and predicate rules into the **styled**\nformats - PDF, xlsx, and HTML (and `print()`):\n\n```ts\nconst conditionalFormats = [\n { type: 'colorScale', columns: ['score'], min: '#dcfce7', max: '#fee2e2' },\n { type: 'rule', columns: ['status'], when: ({ value }) => value === 'Overdue', background: '#fecaca' },\n]\n\nawait api.exportData({ format: 'pdf', conditionalFormats })\nawait api.exportData({ format: 'xlsx', conditionalFormats }) // real cell fills in Excel\nawait api.print({ conditionalFormats })\n```\n\nCell background, text color, and bold carry through as **real cell fills** in\n`xlsx` (single-sheet), `xls`, `html`, and `pdf`; icon sets prepend their glyph\nto the cell text.\n\nIn **xlsx**, **data bars** and **color scales** become **native Excel\nconditional formatting** (`<conditionalFormatting>` rules) - Excel draws and\nrecomputes them itself, so they're interactive, not a static snapshot.\nPredicate `rule` formats stay as computed per-cell fills. In the other styled\nformats (`xls` / `html` / `pdf`) a data bar degrades to a light fill of the bar\ncolor (cells can't hold a partial-width bar). The data formats (csv / tsv /\njson / xml / md) are unstyled, so conditional formatting is ignored there.\nGrouped PDF exports skip conditional formatting (the group/subtotal rows own the\nlayout).\n\n### PDF options\n\nThe PDF is built from a full pdfmake document you control via `pdf`:\n\n```ts\nawait api.exportData({\n format: 'pdf',\n filename: 'orders',\n pdf: {\n pageSize: 'A4', // 'A4' | 'A3' | 'A5' | 'LETTER' | 'LEGAL'\n pageOrientation: 'landscape',\n title: 'Q3 Orders',\n subtitle: 'Generated by Ops',\n logo: logoDataUrl, // top-left image (data URL)\n headerColor: '#334155', // header row fill\n zebra: true, // striped rows\n columnWidths: '*', // '*' fill, 'auto', or a per-column pt array\n fit: 'auto', // wide grids: 'auto' | 'shrink' | 'split' | 'none'\n repeatColumns: 1, // columns repeated on every page when split\n // repeatHeader (default true), showPageNumbers (default true) also available\n },\n})\n```\n\nThe header row repeats on every page, each page gets a `Page X of Y` +\ndate footer, per-column alignment is honored, and wide grids auto-switch to\nlandscape (override with `pdf.pageOrientation`).\n\n**Every column and every row prints.** Column widths follow the text: each\ncolumn gets at least its longest word, and the rest of the page goes to the\ncolumns with the most to say, so a notes column is wide and an id column is\nnarrow. When the columns still do not fit across the page, `fit: 'auto'`\nshrinks the table text down to three quarters of `fontSize`, and past that\nsplits the columns over pages, repeating the first `repeatColumns` columns\non each, so a 22-column report prints as two runs of pages instead of losing\nits right-hand side. `fit: 'shrink'` and `fit: 'split'` pick one of the two;\n`fit: 'none'` leaves the layout to pdfmake. Explicit numeric `columnWidths`\nare kept, and scaled down only if together they are wider than the page.\nRows stay whole on a page, except that a row taller than a page breaks\nacross pages rather than being dropped.\n\n**Conditional-format icons** (arrows, triangles, traffic lights) are drawn as\nshapes in red, amber and green, since their characters are not in the PDF\nfont.\n\n**Other scripts need a font.** The default font, Roboto, covers Latin,\nGreek and Cyrillic. Chinese, Japanese, Korean, Arabic, Hebrew, Thai, the\nIndic scripts and emoji print as empty boxes, and the export logs a warning\nwhen it sees them. Supply a font that covers them (and Latin, since the\nwhole document uses it) as base64 or a URL:\n\n```ts\npdf: {\n font: { name: 'NotoSansKR', normal: notoRegularBase64, bold: notoBoldBase64 },\n}\n```\n\n**Large PDFs: render in a worker.** pdfmake lays out and writes the whole\ndocument in one go, about a second per thousand rows of eight columns on a\ndesktop machine, and on the page that time is a frozen tab (the export logs a\nwarning past 2,000 rows). Give it a worker instead and the page keeps\nresponding while `onProgress` reports the render:\n\n```ts\n// pdf.worker.ts, a file in your app\nimport { servePdfWorker } from '@svgrid/enterprise/pdf-worker'\nservePdfWorker()\n```\n\n```ts\nawait api.exportData({\n format: 'pdf',\n pdf: { worker: () => new Worker(new URL('./pdf.worker.ts', import.meta.url), { type: 'module' }) },\n onProgress: ({ ratio }) => (progress = ratio),\n signal: controller.signal, // aborting terminates the worker\n})\n```\n\nThe worker loads `pdfmake` itself, so the page never does. Everything else\nworks the same, with one difference: a `labels.page` function cannot be sent\nto a worker, so it is called once with stand-in numbers and used as a\ntemplate. It must print the numbers as given; one that formats them (a\nthousands separator) falls back to `Page X of Y`.\n\nRight-to-left text is not fully supported by pdfmake. In a test with\nTahoma, Hebrew and Arabic letters drew correctly but the space between words\nwas lost (\"שלום עולם\" printed as one word), so check right-to-left documents\nbefore relying on them.\n\nThe PDF looks like the grid it came from. With `pdf.matchTheme` (default\ntrue) the exporter reads the mounted grid's computed colours - header fill\nand text, body text, the zebra stripe, the lines, a group row's fill - so a\ngrid on the Ember theme or a Theme Builder palette prints in those colours\nrather than the slate defaults. A dark theme lends only its header: the\npage is white, so its body text and stripes would not read. The order of\nprecedence is explicit `pdf` colours (`headerColor`, `headerTextColor`,\n`textColor`, `zebraColor`, `borderColor`, `groupColor`, ...), then\n`styles`, then the theme, then the defaults. `styles.headerRow` /\n`styles.rows` / `styles.rowAlternate` / `styles.cells` (A1 references, row\n1 being the header) apply to the PDF table the way they do to xlsx and\nhtml, `header` / `footer` lines print above and below the table, and\n`merges` span data cells.\n\nWhen the grid is grouped, the PDF carries the grouping: a bold **group header**\nper cluster (nested for multi-level grouping), named the way the grid shows the\nvalue, a **subtotal row** per cluster and a **total row** at the end. Each\ncolumn totals with its own `aggregate` (`avg`, `min`, `max`, `count`,\n`countDistinct`, a function, ...), as the group rows on screen do; a column\nwithout one sums if it is a number or currency column. Conditional formatting\nand links carry into grouped exports as they do into flat ones. It's on by\ndefault (`autoGroup`); pass `groupBy` to override or `autoGroup: false` to get a\nflat table, and `pdf.grandTotal: false` to leave out the total row.\n\nA boolean column prints a tick for `true` and nothing for `false`, as its\ncheckbox does on screen. An icon set with `iconOnly` prints the icon without\nthe value.\n\nThe words the PDF writes itself can be replaced, and the document can carry a\nwatermark and an author:\n\n```ts\npdf: {\n labels: {\n page: (page, pages) => `Seite ${page} von ${pages}`,\n date: (now) => now.toLocaleDateString('de-DE'),\n subtotal: (group) => `Zwischensumme ${group}`,\n total: 'Gesamt',\n },\n watermark: 'ENTWURF', // or { text, color, opacity }\n author: 'Finance', // with title / subtitle, in the document properties\n}\n```\n\n#### Charts and a KPI strip\n\nA report is rarely just the table. `pdf.charts` prints charts with it: hand\nover the rendered chart's element (the `SvChart` wrapper or its `<svg>`) and\nthe export rasterises it at 2x through the chart's own PNG path, so the page\ngets the picture on screen, theme and all; or pass an image data URL you\nalready have. Each takes a `title`, a `caption` and a `width` in pt\n(default: the content width). `pdf.kpis` prints a strip of headline numbers\nabove the table, each with a label, the value and an optional `delta` line\nin its own colour:\n\n```svelte\n<div bind:this={chartEl}><SvChart {spec} /></div>\n\n<button onclick={() => api.exportData({\n format: 'pdf',\n filename: 'q3-report',\n pdf: {\n title: 'Q3 Orders',\n kpis: [\n { label: 'Revenue', value: '$1.24M', delta: '+4.2% vs Q2', color: '#16a34a' },\n { label: 'Orders', value: '842' },\n { label: 'Avg order', value: '$1,473', delta: '-1.1%', color: '#ef4444' },\n ],\n charts: [{ element: chartEl, title: 'Revenue by region', caption: 'Displayed rows, grouped by region' }],\n chartsPosition: 'above', // or 'below' the table\n },\n})}>Export report</button>\n```\n\nA chart block never splits across a page break. `resolvePdfCharts` and\n`buildPdfDocDefinition` are exported for a document you assemble yourself.\n\n#### Merged cells\n\nPass `merges` to write real merged regions into the sheet. Row / column\nindices are zero-based over the exported **body** (the header row is not\ncounted), and the shape lines up with the grid's own `MergeSpec`:\n\n```ts\n// Merge the first two data rows of column 0, and span a 3-column banner\nawait api.exportData({\n format: 'xlsx',\n merges: [\n { row: 0, col: 0, rowSpan: 2 }, // vertical merge (e.g. a repeated group key)\n { row: 5, col: 0, colSpan: 3 }, // horizontal merge (a section banner)\n ],\n})\n```\n\nTo export the merges you already show in the grid, take your `MergeSpec[]`\n(`{ rowIndex, columnId, rowspan, colspan }`) and map `columnId` to its column\nindex: `{ row: m.rowIndex, col: colIndex(m.columnId), rowSpan: m.rowspan, colSpan: m.colspan }`.\n\nThrows on missing peer (`jszip` / `pdfmake`), revoked / malformed\nlicense, or empty result set. With no license set, it runs but the\ngrid is watermarked.\n\n### `api.print(opts?)` - `Promise<void>`\n\nOpens a new window with a paginated, printable rendering of the grid and\ntriggers the browser print dialog. This is the **zero-dependency \"Save as PDF\"**\nroute: it uses the browser's own engine, so it has excellent font + CSS\nfidelity (including CJK / RTL) and needs no `pdfmake`. The header row repeats on\nevery page, values print **formatted** (matching the grid), and columns keep\ntheir alignment.\n\n| Option | Type | Default |\n| ------------- | -------------------------------------- | ----------- |\n| `title` | `string` | `\"Grid\"` |\n| `subtitle` | `string` | - |\n| `logo` | `string` (data URL) | - |\n| `columns` | `{ field; header?; format?; align? }[]`| grid's own columns |\n| `rows` | `ReadonlyArray<TData> \\| 'displayed' \\| 'selected' \\| 'all'` | `'displayed'` |\n| `rawValues` | `boolean` | `false` |\n| `orientation` | `'portrait' \\| 'landscape'` | `\"portrait\"` |\n| `pageSize` | `string` (e.g. `'A4'`, `'Letter'`) | browser default |\n| `margin` | `string` (e.g. `'14mm'`) | `'14mm'` |\n| `zebra` | `boolean` | `true` |\n| `headerColor` | `string` | `'#f1f5f9'` |\n\nBrowsers may block the popup unless `print()` is called from a user\ngesture (a click handler is fine - automatic on-load print is not). Page\nnumbers come from the browser's own print header/footer.\n\n**`exportData({ format: 'pdf' })` vs `print()`** - use PDF export for a\nprogrammatic, silent file download with full layout control (see \"PDF\noptions\"); use `print()` when you want best-fidelity output and the user to\npick print or \"Save as PDF\" from the dialog.\n\n## Drop-in Export menu (`SvExportMenu`)\n\nRather than wiring your own toolbar, drop in the bundled `SvExportMenu`\ncomponent. It renders an \"Export\" button with a format picker, a row-scope\ntoggle (current view / selected / all), and a built-in progress bar + Cancel\nfor large exports:\n\n```svelte\n<script lang=\"ts\">\n import { SvGrid, type SvGridApi } from '@svgrid/grid'\n import { installEnterprise, SvExportMenu, type EnterpriseGridApi } from '@svgrid/enterprise'\n\n let api = $state<EnterpriseGridApi<typeof features, Order> | null>(null)\n</script>\n\n<div class=\"toolbar\">\n <SvExportMenu {api} filename=\"orders\" />\n</div>\n\n<SvGrid data={rows} columns={columns} features={features}\n onApiReady={(a) => (api = installEnterprise(a))} />\n```\n\n| Prop | Type | Default | Notes |\n| ------------ | ------------------------------------------------ | --------------------------- | ----- |\n| `api` | `EnterpriseGridApi \\| null` | required | Button is disabled until the api is ready. |\n| `filename` | `string` | `'grid'` | Base name, no extension. |\n| `formats` | `ExportFormat[]` | xlsx/xls/pdf/csv/tsv/html | Which formats to offer, in order. |\n| `allowScope` | `boolean` | `true` | Show the current-view / selected / all toggle. |\n| `allowColumns` | `boolean` | `true` | Show per-column include checkboxes (choose which columns to export). |\n| `allowCopy` | `boolean` | `true` | Show \"Copy for Excel\" (tsv) + \"Copy Markdown\" clipboard actions. |\n| `allowPrint` | `boolean` | `false` | Show a \"Print…\" action (`api.print`). |\n| `scope` | `'displayed' \\| 'selected' \\| 'all'` | `'displayed'` | Initial row scope. |\n| `label` | `string` | `'Export'` | Button text. |\n| `conditionalFormats` | `ConditionalFormat[]` | - | Carried into pdf / xlsx / html exports. |\n\nThe menu is sectioned into **Rows** (scope), **Columns** (a picker), and\n**Download** (each format shown with an icon + one-line description), plus\n**copy-to-clipboard** and optional **print** actions. It's **keyboard\naccessible** (arrow keys move between items, Tab is trapped inside, Esc closes\nand returns focus to the button, with `role=\"menu\"` / `menuitem`), handles\nerrors inline (missing peer dependency, empty grid), and wires `onProgress` +\nan `AbortController` for you.\n\nFor large exports, the single-sheet xlsx writer builds in **chunks that yield to\nthe event loop** (and zips asynchronously), so the tab stays responsive and\n`onProgress` ticks; pass a `signal` to cancel.\n\n## Gotchas\n\n- **Empty grids** - both `exportData` and `print` throw if there are no\n displayed rows. Catch the error and show a notice in the UI.\n- **Column ordering** - if you don't pass `columns`, the export uses\n `Object.keys(rows[0])` order. Pass `columns` explicitly when the row\n shape doesn't match the column order you want.\n- **Cell formatters** - column-level format hints (date, number, currency,\n percent) are applied to the exported value by default, so the file matches\n the grid. Custom snippet renderers are **not** auto-serialized - give those\n columns an `exportValue` hook (see \"Faithful values\" above), or set\n `rawValues: true` if you want the raw underlying values.\n- **Print popup blocked** - `print()` resolves but the browser silently\n blocks the new window. Always trigger from a user click, and surface\n the thrown error.\n- **Bundle size** - the vendored exporter is ~50 KB minified. It is\n loaded lazily on first call so it does not bloat the initial bundle\n for users who never export.\n\n## Frequently asked questions\n\n### How do I export a Svelte data grid to Excel?\n\nInstall `@svgrid/enterprise`, call `installEnterprise(api)`, then call the export helper with\n`format: 'xlsx'`. The exporter writes a real OOXML workbook in the browser - no\nserver round-trip. CSV, TSV, PDF, and HTML use the same call with a different\nformat.\n\n### What's the difference between `xls` and `xlsx`?\n\n`xlsx` is the modern OOXML workbook (Excel 2007+); it needs the `jszip` peer\ndependency and supports the richest output (styles, images, multi-sheet,\nformulas). `xls` is the **legacy Excel 2003 XML Spreadsheet** format: pick it\nfor maximum compatibility with old Excel installs or systems that only accept\n`.xls`. It has **no peer dependency**, streams in the browser, and keeps\nnumbers and dates typed (so sums and sorting still work in Excel) with number\nformats applied. It's single-sheet - use `xlsx` for multi-tab workbooks.\n\n```ts\nawait api.exportData({ format: 'xls', filename: 'orders' })\n```\n\n### Is export part of the free Community package?\n\nNo. Export and printing ship in the paid `@svgrid/enterprise` add-on. The free\n`@svgrid/grid` package covers the full grid (sorting, filtering, grouping,\nediting, virtualization) but not export/print/pivot/import.\n\n### Does exporting bloat my bundle?\n\nNo. The ~50 KB exporter is lazy-loaded on the first export call, so users who\nnever export never download it.\n\n## More examples\n\n### Password-protected export\n\nPBKDF2 (100k iters) + AES-GCM 256 client-side. Strength meter, encrypt + download, in-page decrypt tool to verify the round-trip. Enterprise pack maps to ECMA-376 Agile encryption.\n\n<div data-docs-demo=\"93-password-protected-export\" data-height=\"460\"></div>\n\n### Formulas preserved in xlsx\n\nBuilds a real OOXML workbook in the browser via JSZip; computed columns export as <f>...</f> formula cells. Open in Excel and the math recomputes when you edit a number.\n\n<div data-docs-demo=\"101-formulas-in-xlsx\" data-height=\"460\"></div>\n\n### Export grouped grid to Excel\n\nA flat sales grid (Region → Country) exported via api.exportData({ format: \"xlsx\", groupBy }) which uses Smart's NATIVE Excel row outline grouping. Opens in Excel with +/- buttons in the row header gutter for every group level.\n\n<div data-docs-demo=\"126-export-grouped-grid\" data-height=\"460\"></div>\n\n### Export pivot grid to Excel\n\ncreatePivotModel leaves projected into an xlsx via api.exportData with groupBy: [\"region\"] - each region becomes an Excel outline group. Engine column ids (\"pv__Q1__m0\") translate to readable headers (\"Q1 · Revenue\").\n\n<div data-docs-demo=\"127-export-pivot-grid\" data-height=\"460\"></div>\n\n### Export - Formatting, scope + XLS\n\nFaithful export: currency / date / percent render as shown (toggle raw values), pick a row scope (view / selected / all), legacy .xls (Excel 2003 XML, no jszip), an exportValue hook, and the drop-in SvExportMenu.\n\n<div data-docs-demo=\"201-export-formatting-and-xls\" data-height=\"460\"></div>\n\n### Export - Grouped PDF + Print\n\nGroup the grid and export: the PDF + xlsx carry bold group headers and per-cluster subtotal rows (auto-carried from grouping state). Polished Print is the zero-dependency \"Save as PDF\" route with a repeated header and title.\n\n<div data-docs-demo=\"202-export-pdf-grouped-and-print\" data-height=\"460\"></div>\n\n## Try the export API\n\nEvery exporter is on the grid api and takes the same\n`GridExportOptions`. `rows: 'displayed'` is the default and is almost always\nwhat a user means by \"export this\" - it follows their filter and sort.\n\n```svelte\n<script lang=\"ts\">\n let api = $state<SvGridApi<{}, Person> | null>(null)\n</script>\n\n<div>\n <button type=\"button\" onclick={() => api?.exportCsv({ filename: 'people' })}>CSV</button>\n <button type=\"button\" onclick={() => api?.exportTsv({ filename: 'people' })}>TSV</button>\n <button type=\"button\" onclick={() => api?.exportJson({ filename: 'people' })}>JSON</button>\n <button type=\"button\" onclick={() => api?.print()}>Print</button>\n</div>\n\n<SvGrid data={people} {columns} sortable filterable onApiReady={(next) => (api = next)} />\n```\n\nSort or filter first, then export: the file follows the view.\n\n## Exporting a subset\n\n`columns` restricts the fields and fixes their order, and `rawValues` decides\nwhether the file carries what the screen shows or what the row holds. The\nsalary column is the one to watch - formatted it is `$142,000`, raw it is\n`142000`, and a spreadsheet can only do arithmetic on the second.\n\n```svelte\n<script lang=\"ts\">\n let api = $state<SvGridApi<{}, Person> | null>(null)\n</script>\n\n<div>\n <button type=\"button\" onclick={() => api?.exportCsv({ filename: 'formatted', columns: ['name', 'salary'] })}>\n Name + salary, as displayed\n </button>\n <button type=\"button\" onclick={() => api?.exportCsv({ filename: 'raw', columns: ['name', 'salary'], rawValues: true })}>\n Name + salary, raw values\n </button>\n</div>\n\n<SvGrid data={people} {columns} onApiReady={(next) => (api = next)} />\n```\n"
|
|
5497
|
+
"markdown": "# Data export and printing\n\n**CSV / TSV / JSON export and copy-to-clipboard are free** in the community\n**[@svgrid/grid](https://www.npmjs.com/package/@svgrid/grid)** - the commodity\n\"data out\" every grid needs. The richer formats - **Excel (xlsx)**, **legacy\nExcel (xls)**, **PDF**, styled **HTML**, **XML**, **Markdown**, multi-sheet\nworkbooks, password protection, conditional-format export, and the drop-in\nexport menu - ship in the paid\n**[@svgrid/enterprise](https://www.npmjs.com/package/@svgrid/enterprise)** add-on,\nwhich reuses the exact same serializers so the two tiers feel like one product.\n\nFor the report built step by step, with a live grid under most steps, see [Export: a report to Excel and PDF](./export/report.md); this page is the reference.\n\n\n\n| Capability | Package |\n| ---------- | ------- |\n| CSV / TSV / JSON export, copy-to-clipboard (TSV / CSV / Markdown) | **Free** (`@svgrid/grid`) |\n| Excel `.xlsx` (typed cells, styles, conditional formatting, tables, multi-sheet) | Enterprise |\n| PDF, styled HTML, XML, legacy `.xls`, password-protected export | Enterprise |\n| `exportValue` hook, conditional-format export, `SvExportMenu`, `print()` | Enterprise |\n\n## Free: CSV / TSV / JSON + clipboard\n\nThe community grid's `SvGridApi` carries four zero-dependency methods - no\nlicense, no peer deps:\n\nThe examples on this page run against these rows:\n\n```svelte {preamble}\n<script lang=\"ts\">\n import { SvGrid, type GridColumns, tableFeatures, rowSortingFeature, columnFilteringFeature } from '@svgrid/grid'\n\n type Person = {\n id: number\n name: string\n email: string\n department: string\n age: number\n salary: number\n city: string\n startDate: string\n active: boolean\n }\n\n type Order = {\n id: string\n customer: string\n product: string\n quantity: number\n total: number\n status: 'pending' | 'shipped' | 'delivered'\n orderedAt: string\n }\n\n type Row = Person\n\n const features = tableFeatures({ rowSortingFeature, columnFilteringFeature })\n\n const people: Person[] = [\n { id: 1, name: 'Ada Lovelace', email: 'ada@example.com', department: 'Engineering', age: 36, salary: 142000, city: 'London', startDate: '2021-03-01', active: true },\n { id: 2, name: 'Grace Hopper', email: 'grace@example.com', department: 'Engineering', age: 45, salary: 168000, city: 'New York', startDate: '2019-07-15', active: true },\n { id: 3, name: 'Linus Torvalds', email: 'linus@example.com', department: 'Platform', age: 54, salary: 155000, city: 'Portland', startDate: '2020-01-20', active: false },\n { id: 4, name: 'Radia Perlman', email: 'radia@example.com', department: 'Networking', age: 49, salary: 161000, city: 'Seattle', startDate: '2022-09-05', active: true },\n { id: 5, name: 'Barbara Liskov', email: 'barbara@example.com', department: 'Platform', age: 52, salary: 172000, city: 'Boston', startDate: '2018-11-11', active: true },\n ]\n\n let rows = $state<Person[]>(people)\n\n const columns: GridColumns<Person> = [\n { field: 'name', header: 'Name', width: 200 },\n { field: 'department', header: 'Department', width: 150 },\n { field: 'city', header: 'City', width: 140 },\n { field: 'age', header: 'Age', width: 90 },\n { field: 'salary', header: 'Salary', width: 130, format: { type: 'currency', currency: 'USD' } },\n ]\n</script>\n```\n\n```ts\nawait api.exportCsv({ filename: 'orders' }) // orders.csv (BOM + Excel-friendly)\nawait api.exportTsv() // grid.tsv\nawait api.exportJson({ rows: 'selected' }) // grid.json, checked rows only\nawait api.copyToClipboard({ format: 'tsv' }) // paste straight into Excel / Sheets\n```\n\nEvery method:\n\n- defaults to the **current view** (`rows: 'selected' | 'all'` to change),\n- formats values **as shown on screen** (currency, dates) - pass\n `rawValues: true` for the underlying values,\n- accepts a `columns: string[]` field subset (in that order),\n- runs on a chunked, cancelable loop (`signal`, `onProgress`) so a 100k-row\n export never freezes the tab,\n- returns the serialized text; pass `download: false` to skip the download\n and just get the string.\n\n**Formula injection.** A text cell that starts with `=`, `+`, `-`, `@`, a tab\nor a carriage return would run as a formula in the spreadsheet that opens the\nfile, so `exportCsv` and `exportTsv` (and Enterprise's `exportData` for csv and\ntsv) write it with a leading `'`: `=HYPERLINK(...)` comes out as\n`'=HYPERLINK(...)`. Numbers are never touched, and neither is a signed number\nin text form such as `-12.50`. Pass `escapeFormulas: false` when the file feeds\nanother program rather than a spreadsheet. `copyToClipboard` leaves text as\ntyped unless you pass `escapeFormulas: true`, because a copy is pasted by the\nperson who made it.\n\n```svelte {runnable}\n<script lang=\"ts\">\n import { SvGrid, tableFeatures, type SvGridApi } from '@svgrid/grid'\n let api = $state<SvGridApi<any, Row> | null>(null)\n</script>\n\n<button onclick={() => api?.exportCsv({ filename: 'orders' })}>Export CSV</button>\n<button onclick={() => api?.copyToClipboard()}>Copy for Excel</button>\n<SvGrid data={rows} columns={columns} features={features} onApiReady={(a) => (api = a)} />\n```\n\nThe rest of this page covers the **Enterprise** formats.\n\nTry the export bar below - downloads run in your browser; the bundled\nlicense key removes the unlicensed watermark:\n\n<div data-docs-demo=\"21-export-and-print\" data-height=\"500\"></div>\n\n\n## What it is\n\n`@svgrid/enterprise` augments the `SvGridApi` you already get from\n`<SvGrid onApiReady>` with two methods:\n\n- `api.exportData({ format, filename?, columns?, rows?, pageOrientation? })`\n- `api.print({ title?, columns?, rows?, orientation?, open? })`\n\nBoth methods default to **the currently displayed rows** - sort, filter,\nor paginate the grid, and the export reflects that view automatically.\n\n`print()` resolves to the printable HTML document it built. Pass\n`open: false` to get that document without the print window and dialog,\nfor a preview pane of your own:\n\n```ts\nconst html = await api.print({ title: 'Orders', open: false })\npreview.srcdoc = html\n```\n\nIt is a plain table, not the grid, so a print of 100,000 rows does not\nrender 100,000 rows of grid cells.\n\n## When to use it\n\n- Reporting flows where users want to take the grid offline (spreadsheets,\n emailed PDFs).\n- Compliance / audit trails that require a printable artifact.\n- Quick CSV/TSV pulls for downstream pipelines.\n\nIf you only need machine-readable data, prefer CSV / TSV - they have no\npeer dependencies and produce the smallest files. Use xlsx / PDF only\nwhen the recipient expects formatted documents.\n\n## Minimal example\n\n```svelte {runnable}\n<script lang=\"ts\">\n import { SvGrid, tableFeatures, rowSortingFeature, type SvGridApi, type ColumnDef } from '@svgrid/grid'\n import { installEnterprise, type EnterpriseGridApi } from '@svgrid/enterprise'\n\n // Without a key, the feature still works but the grid shows an\n // \"unlicensed\" watermark and the console emits a one-time nudge directing\n // users to the pricing page. After you buy, call setLicenseKey(yourKey)\n // once at startup.\n\n const features = tableFeatures({ rowSortingFeature })\n\n type Order = { company: string; product: string; price: number }\n const rows: Order[] = [\n { company: 'ACME', product: 'Widget', price: 19.95 },\n { company: 'Globex', product: 'Gadget', price: 49.00 },\n ]\n const columns: ColumnDef<typeof features, Order>[] = [\n { field: 'company', header: 'Company' },\n { field: 'product', header: 'Product' },\n { field: 'price', header: 'Price', format: { type: 'currency', currency: 'USD' } },\n ]\n\n let api = $state<EnterpriseGridApi<typeof features, Order> | null>(null)\n\n function onReady(next: SvGridApi<typeof features, Order>) {\n api = installEnterprise(next)\n }\n</script>\n\n<button onclick={() => api?.exportData({ format: 'xlsx', filename: 'orders' })}>\n Export Excel\n</button>\n<button onclick={() => api?.exportData({ format: 'pdf', filename: 'orders', pageOrientation: 'landscape' })}>\n Export PDF\n</button>\n<button onclick={() => api?.print({ title: 'Orders' })}>\n Print\n</button>\n\n<SvGrid data={rows} columns={columns} features={features} onApiReady={onReady} />\n```\n\n## Install\n\n```bash\npnpm add @svgrid/enterprise\n# Optional - install only the peers you actually use:\npnpm add jszip # required for xlsx\npnpm add pdfmake # required for pdf\n```\n\nCSV, TSV, HTML, and Print have **no extra dependencies**. The peer\ndependencies are lazy-loaded only when you call the format that needs\nthem.\n\n## Licensing\n\n`@svgrid/enterprise` has a tiered license gate:\n\n| Key state | Behavior |\n| ------------------------------------------ | -------- |\n| No key set (`setLicenseKey()` not called) | Feature works. Grid shows an unlicensed watermark linking to svgrid.com/pricing; console.log emits a one-time nudge. |\n| A key that is not your license key | Same as no key: the feature works, with the watermark and a one-time console warning. |\n| Your license key | Works silently. |\n\nBuy a production key at <https://svgrid.com/pricing/> ($599 / developer /\nyear). To evaluate, you need no key at all: everything runs with a watermark.\n\n## Reference\n\n### `setLicenseKey(key: string): void`\n\nStores the key in module state. Call once at app startup (e.g. in\n`main.ts`). Subsequent calls overwrite.\n\n### `clearLicenseKey(): void` · `hasValidLicense(): boolean` · `dismissUnlicensedNudge(): void`\n\nProgrammatic helpers. `hasValidLicense()` is useful when you want UI to\nbranch on license status. `dismissUnlicensedNudge()` removes the\nwatermark and stops the MutationObserver - call it after setting a\nvalid key if you loaded the module without one during testing.\n\n### `installEnterprise(api): EnterpriseGridApi`\n\nMutates the given `SvGridApi` to add `exportData` and `print`. Returns\nthe same object with the augmented type, so existing references keep\nworking.\n\n### `api.exportData(opts)` - `Promise<void>`\n\n| Option | Type | Default | Notes |\n| ----------------- | ----------------------------------------------------- | -------------------- | ----- |\n| `format` | `'xlsx' \\| 'xls' \\| 'pdf' \\| 'csv' \\| 'tsv' \\| 'html' \\| 'json' \\| 'xml' \\| 'md'` | required | `xlsx` needs `jszip`, `pdf` needs `pdfmake`. `xls` / CSV / TSV / HTML / JSON / XML / Markdown are dependency-free. |\n| `pdf` | `PdfExportOptions` | - | PDF layout: page size, margins, title / subtitle / logo, theme colors, column widths, repeated header, page numbers. See \"PDF options\". |\n| `conditionalFormats` | `ConditionalFormat[]` | - | Same array as `<SvGrid conditionalFormats>`; carried into pdf / xlsx / html. See \"Conditional formatting in exports\". |\n| `freezeHeader` | `boolean` | `true` | Freeze the header row (xlsx / xls). |\n| `freezeColumns` | `number` | pinned cols | Freeze this many leading columns (xlsx / xls). Defaults to the grid's left-pinned columns. |\n| `autoFitColumns` | `boolean` | `true` | Size columns to content (xlsx / xls); a column's explicit `width` wins. |\n| `precisionSafe` | `boolean` | `false` | Export long integer IDs (> 15 digits) as text so Excel's float precision doesn't round them (xlsx / xls). |\n| `excelTable` | `boolean \\| { totalsRow?; style? }` | - | Wrap single-sheet xlsx in a native Excel Table (filter dropdowns, banded rows; `{ totalsRow: true }` adds SUM formulas). |\n| `download` | `boolean` | `true` | When false, return the {@link ExportResult} without downloading. |\n| `filename` | `string` | `\"grid\"` | Extension is appended if missing. |\n| `columns` | `{ field; header?; format?; align?; exportValue? }[]` | grid's own columns | Drives column selection + header labels. Auto-derived from the grid (with each column's `format`) when omitted. See `exportValue` below. |\n| `rows` | `ReadonlyArray<TData> \\| 'displayed' \\| 'selected' \\| 'all'` | `'displayed'` | `'displayed'` = current filtered/sorted/paged view, `'selected'` = checked rows, `'all'` = full dataset, or pass an explicit array. |\n| `rawValues` | `boolean` | `false` | By default the exporter writes the **formatted display value** (what you see). Set `true` to write raw underlying values (numbers stay numeric in xlsx). |\n| `autoGroup` | `boolean` | `true` | Carry the grid's active row grouping into xlsx outline rows. Pass your own `groupBy` to override, or `false` to ignore. |\n| `csv` | `{ delimiter?; eol?; bom?; escapeFormulas? }` | `{ ',', '\\r\\n', BOM, escapeFormulas: true }` | CSV / TSV tuning. UTF-8 BOM is on by default so Excel opens it without mojibake. `escapeFormulas` prefixes formula-like text with `'` (see above). |\n| `onProgress` | `(p) => void` | - | Progress for large exports: `{ phase, ratio, row?, total? }`, `phase` = `'project' \\| 'serialize' \\| 'write'`. |\n| `signal` | `AbortSignal` | - | Cancel an in-flight export (checked between chunks). Rejects with `AbortError`. |\n| `pageOrientation` | `'portrait' \\| 'landscape'` | `\"portrait\"` | PDF only. |\n| `merges` | `{ row; col; rowSpan?; colSpan? }[]` | `[]` | Merged cells (xlsx / pdf). Zero-based **body** row/col (header excluded). Single-sheet only; mutually exclusive with `groupBy` / `hierarchical`. |\n\n### Faithful values (what you see is what you export)\n\nBy default the export renders each cell the way the grid does on screen: a\ncolumn with `format: { type: 'currency', currency: 'USD' }` exports `$19.95`,\na date column exports its formatted date, a percent column exports `42%`. This\nholds for **every** format (csv / tsv / html / pdf / xlsx). Pass\n`rawValues: true` to write the underlying values instead (e.g. feeding a data\npipeline that wants the numeric `19.95`).\n\nFor columns whose on-screen value comes from a **custom cell renderer**, a\n`fieldFn`, or a lookup, give the column an `exportValue` hook - it takes\nprecedence over `format` and the raw field:\n\n```ts\nawait api.exportData({\n format: 'xlsx',\n columns: [\n { field: 'company', header: 'Company' },\n // a column rendered with a custom snippet on screen:\n { field: 'status', header: 'Status', exportValue: (row) => STATUS_LABELS[row.status] },\n ],\n})\n```\n\n### Export only what's selected\n\n```ts\n// current view (default)\nawait api.exportData({ format: 'xlsx' })\n// only the checked rows\nawait api.exportData({ format: 'xlsx', rows: 'selected' })\n// the entire underlying dataset, ignoring filters/paging\nawait api.exportData({ format: 'csv', rows: 'all' })\n```\n\n### Large exports: progress + cancel\n\nCSV / TSV / HTML are serialized natively (no peer dependency) and stream in\nchunks, yielding to the event loop so a big export doesn't freeze the tab:\n\n```ts\nconst controller = new AbortController()\nawait api.exportData({\n format: 'csv',\n rows: 'all',\n signal: controller.signal,\n onProgress: ({ ratio }) => updateProgressBar(ratio),\n})\n// controller.abort() rejects the export with an AbortError\n```\n\n### Excel-native numbers (xlsx)\n\nA single-sheet `xlsx` export writes numeric, currency, percent, and date\ncolumns as **real typed cells** with an Excel number format - so Excel can sum\nand sort them, and they still display formatted (currency symbol, thousands,\n`%`, date pattern) - via SvGrid's own OOXML writer. Set `rawValues: true` for\nunformatted raw values. The grouped-outline, multi-sheet, image, and merged-cell\npaths use the bundled writer (formatted-string cells). The legacy `xls` format\nis always typed.\n\n### Excel fidelity: freeze, auto-fit, hyperlinks\n\n`xlsx` and `xls` exports polish the spreadsheet automatically:\n\n- **Freeze header** - the header row stays visible when scrolling. On by\n default; `freezeHeader: false` to disable, `freezeColumns: n` to also freeze\n leading columns.\n- **Auto-fit column widths** - columns are sized to their content. On by\n default (`autoFitColumns: false` to disable); a column's explicit `width`\n (pixels) always wins.\n- **Hyperlinks** - give a column a `link(row)` hook to render clickable links.\n Works in `xlsx`, `xls`, `html`, `pdf`, and `print`.\n\nSingle-sheet `xlsx` is written by SvGrid's own OOXML writer, so numbers/dates\nstay typed with number formats, conditional-format colors are **real per-cell\nfills**, and freeze/widths/hyperlinks all apply. (Grouped/outline, multi-sheet,\nembedded-image, and merged-cell exports use the bundled writer.)\n\n```ts\nawait api.exportData({\n format: 'xlsx',\n freezeHeader: true, // default\n columns: [\n { field: 'name', header: 'Company', width: 220,\n link: (row) => `https://crm.example.com/accounts/${row.id}` },\n { field: 'revenue', header: 'Revenue', format: { type: 'currency', currency: 'USD' } },\n ],\n})\n```\n\nConditional-format colors (data bars / color scales) already render as real\ncell fills in `xlsx`, which is higher fidelity than the writer's built-in\nrule-only conditional formatting - so we keep the per-cell approach.\n\n### Get the file instead of downloading (`download: false`)\n\n`exportData` returns an **`ExportResult`** for the dependency-free paths\n(csv/tsv/html/json/xml/md, xls, pdf, single-sheet xlsx) so you can preview,\nupload, email, or attach the file. With `download: false` it builds and returns\nthe file **without** triggering a browser download:\n\n```ts\nconst res = await api.exportData({ format: 'xlsx', download: false })\n// res: { blob, filename, mime, rowCount, byteSize }\nawait uploadToStorage(res.blob, res.filename)\n```\n\nThe grouped / multi-sheet / image / blanket-styled xlsx paths use the vendored\nwriter, which downloads directly and returns `undefined` (and throws on\n`download: false`).\n\n### Excel Table (filter dropdowns + totals row)\n\nWrap a single-sheet xlsx in a native **Excel Table** - the user gets column\nfilter dropdowns, banded rows, structured references, and (optionally) a totals\nrow with live `SUM()` formulas:\n\n```ts\nawait api.exportData({ format: 'xlsx', excelTable: { totalsRow: true } })\n// or just `excelTable: true` for the table without a totals row\n```\n\nColumn widths auto-fit and leading **pinned columns are frozen automatically**\n(override with `freezeColumns`). For long IDs, `precisionSafe: true` writes them\nas text so Excel's 15-digit float limit doesn't silently round `1002000300040005`.\n\n### JSON / XML / Markdown\n\n```ts\nawait api.exportData({ format: 'json' }) // array of { field: value } - defaults to raw values\nawait api.exportData({ format: 'xml' }) // <rows><row><field>value</field>…\nawait api.exportData({ format: 'md' }) // GitHub-flavored Markdown table (great for docs / LLMs)\n```\n\nJSON defaults to **raw** values (real numbers/dates) since it's a data format;\npass `rawValues: false` for formatted strings. XML and Markdown use the\nformatted display values.\n\n### Copy to clipboard\n\n`api.copyExport(opts)` serializes to the clipboard instead of downloading a\nfile - handy for \"copy these rows into a spreadsheet or an email\":\n\n```ts\nawait api.copyExport({ format: 'tsv' }) // pastes into Excel / Sheets as columns (default)\nawait api.copyExport({ format: 'md', rows: 'selected' }) // Markdown table of the checked rows\nawait api.copyExport({ format: 'html' }) // rich text/html - keeps the table when pasted\n```\n\nSupported formats: `csv`, `tsv`, `html`, `json`, `xml`, `md`. `html` writes\nboth `text/html` (rich paste) and a `text/plain` fallback. Needs a secure\ncontext and a user gesture (call it from a click).\n\n### Conditional formatting in exports\n\nPass the same `conditionalFormats` array you give `<SvGrid>` to carry the grid's\ncolor scales, data bars, icon sets, and predicate rules into the **styled**\nformats - PDF, xlsx, and HTML (and `print()`):\n\n```ts\nconst conditionalFormats = [\n { type: 'colorScale', columns: ['score'], min: '#dcfce7', max: '#fee2e2' },\n { type: 'rule', columns: ['status'], when: ({ value }) => value === 'Overdue', background: '#fecaca' },\n]\n\nawait api.exportData({ format: 'pdf', conditionalFormats })\nawait api.exportData({ format: 'xlsx', conditionalFormats }) // real cell fills in Excel\nawait api.print({ conditionalFormats })\n```\n\nCell background, text color, and bold carry through as **real cell fills** in\n`xlsx` (single-sheet), `xls`, `html`, and `pdf`; icon sets prepend their glyph\nto the cell text.\n\nIn **xlsx**, **data bars** and **color scales** become **native Excel\nconditional formatting** (`<conditionalFormatting>` rules) - Excel draws and\nrecomputes them itself, so they're interactive, not a static snapshot.\nPredicate `rule` formats stay as computed per-cell fills. In the other styled\nformats (`xls` / `html` / `pdf`) a data bar degrades to a light fill of the bar\ncolor (cells can't hold a partial-width bar). The data formats (csv / tsv /\njson / xml / md) are unstyled, so conditional formatting is ignored there.\nGrouped PDF exports skip conditional formatting (the group/subtotal rows own the\nlayout).\n\n### PDF options\n\nThe PDF is built from a full pdfmake document you control via `pdf`:\n\n```ts\nawait api.exportData({\n format: 'pdf',\n filename: 'orders',\n pdf: {\n pageSize: 'A4', // 'A4' | 'A3' | 'A5' | 'LETTER' | 'LEGAL'\n pageOrientation: 'landscape',\n title: 'Q3 Orders',\n subtitle: 'Generated by Ops',\n logo: logoDataUrl, // top-left image (data URL)\n headerColor: '#334155', // header row fill\n zebra: true, // striped rows\n columnWidths: '*', // '*' fill, 'auto', or a per-column pt array\n fit: 'auto', // wide grids: 'auto' | 'shrink' | 'split' | 'none'\n repeatColumns: 1, // columns repeated on every page when split\n // repeatHeader (default true), showPageNumbers (default true) also available\n },\n})\n```\n\nThe header row repeats on every page, each page gets a `Page X of Y` +\ndate footer, per-column alignment is honored, and wide grids auto-switch to\nlandscape (override with `pdf.pageOrientation`).\n\n**Every column and every row prints.** Column widths follow the text: each\ncolumn gets at least its longest word, and the rest of the page goes to the\ncolumns with the most to say, so a notes column is wide and an id column is\nnarrow. When the columns still do not fit across the page, `fit: 'auto'`\nshrinks the table text down to three quarters of `fontSize`, and past that\nsplits the columns over pages, repeating the first `repeatColumns` columns\non each, so a 22-column report prints as two runs of pages instead of losing\nits right-hand side. `fit: 'shrink'` and `fit: 'split'` pick one of the two;\n`fit: 'none'` leaves the layout to pdfmake. Explicit numeric `columnWidths`\nare kept, and scaled down only if together they are wider than the page.\nRows stay whole on a page, except that a row taller than a page breaks\nacross pages rather than being dropped.\n\n**Conditional-format icons** (arrows, triangles, traffic lights) are drawn as\nshapes in red, amber and green, since their characters are not in the PDF\nfont.\n\n**Other scripts need a font.** The default font, Roboto, covers Latin,\nGreek and Cyrillic. Chinese, Japanese, Korean, Arabic, Hebrew, Thai, the\nIndic scripts and emoji print as empty boxes, and the export logs a warning\nwhen it sees them. Supply a font that covers them (and Latin, since the\nwhole document uses it) as base64 or a URL:\n\n```ts\npdf: {\n font: { name: 'NotoSansKR', normal: notoRegularBase64, bold: notoBoldBase64 },\n}\n```\n\n**Large PDFs: render in a worker.** pdfmake lays out and writes the whole\ndocument in one go, about a second per thousand rows of eight columns on a\ndesktop machine, and on the page that time is a frozen tab (the export logs a\nwarning past 2,000 rows). Give it a worker instead and the page keeps\nresponding while `onProgress` reports the render:\n\n```ts\n// pdf.worker.ts, a file in your app\nimport { servePdfWorker } from '@svgrid/enterprise/pdf-worker'\nservePdfWorker()\n```\n\n```ts\nawait api.exportData({\n format: 'pdf',\n pdf: { worker: () => new Worker(new URL('./pdf.worker.ts', import.meta.url), { type: 'module' }) },\n onProgress: ({ ratio }) => (progress = ratio),\n signal: controller.signal, // aborting terminates the worker\n})\n```\n\nThe worker loads `pdfmake` itself, so the page never does. Everything else\nworks the same, with one difference: a `labels.page` function cannot be sent\nto a worker, so it is called once with stand-in numbers and used as a\ntemplate. It must print the numbers as given; one that formats them (a\nthousands separator) falls back to `Page X of Y`.\n\nRight-to-left text is not fully supported by pdfmake. In a test with\nTahoma, Hebrew and Arabic letters drew correctly but the space between words\nwas lost (\"שלום עולם\" printed as one word), so check right-to-left documents\nbefore relying on them.\n\nThe PDF looks like the grid it came from. With `pdf.matchTheme` (default\ntrue) the exporter reads the mounted grid's computed colours - header fill\nand text, body text, the zebra stripe, the lines, a group row's fill - so a\ngrid on the Ember theme or a Theme Builder palette prints in those colours\nrather than the slate defaults. A dark theme lends only its header: the\npage is white, so its body text and stripes would not read. The order of\nprecedence is explicit `pdf` colours (`headerColor`, `headerTextColor`,\n`textColor`, `zebraColor`, `borderColor`, `groupColor`, ...), then\n`styles`, then the theme, then the defaults. `styles.headerRow` /\n`styles.rows` / `styles.rowAlternate` / `styles.cells` (A1 references, row\n1 being the header) apply to the PDF table the way they do to xlsx and\nhtml, `header` / `footer` lines print above and below the table, and\n`merges` span data cells.\n\nWhen the grid is grouped, the PDF carries the grouping: a bold **group header**\nper cluster (nested for multi-level grouping), named the way the grid shows the\nvalue, a **subtotal row** per cluster and a **total row** at the end. Each\ncolumn totals with its own `aggregate` (`avg`, `min`, `max`, `count`,\n`countDistinct`, a function, ...), as the group rows on screen do; a column\nwithout one sums if it is a number or currency column. Conditional formatting\nand links carry into grouped exports as they do into flat ones. It's on by\ndefault (`autoGroup`); pass `groupBy` to override or `autoGroup: false` to get a\nflat table, and `pdf.grandTotal: false` to leave out the total row.\n\nA boolean column prints a tick for `true` and nothing for `false`, as its\ncheckbox does on screen. An icon set with `iconOnly` prints the icon without\nthe value.\n\nThe words the PDF writes itself can be replaced, and the document can carry a\nwatermark and an author:\n\n```ts\npdf: {\n labels: {\n page: (page, pages) => `Seite ${page} von ${pages}`,\n date: (now) => now.toLocaleDateString('de-DE'),\n subtotal: (group) => `Zwischensumme ${group}`,\n total: 'Gesamt',\n },\n watermark: 'ENTWURF', // or { text, color, opacity }\n author: 'Finance', // with title / subtitle, in the document properties\n}\n```\n\n#### Charts and a KPI strip\n\nA report is rarely just the table. `pdf.charts` prints charts with it: hand\nover the rendered chart's element (the `SvChart` wrapper or its `<svg>`) and\nthe export rasterises it at 2x through the chart's own PNG path, so the page\ngets the picture on screen, theme and all; or pass an image data URL you\nalready have. Each takes a `title`, a `caption` and a `width` in pt\n(default: the content width). `pdf.kpis` prints a strip of headline numbers\nabove the table, each with a label, the value and an optional `delta` line\nin its own colour:\n\n```svelte\n<div bind:this={chartEl}><SvChart {spec} /></div>\n\n<button onclick={() => api.exportData({\n format: 'pdf',\n filename: 'q3-report',\n pdf: {\n title: 'Q3 Orders',\n kpis: [\n { label: 'Revenue', value: '$1.24M', delta: '+4.2% vs Q2', color: '#16a34a' },\n { label: 'Orders', value: '842' },\n { label: 'Avg order', value: '$1,473', delta: '-1.1%', color: '#ef4444' },\n ],\n charts: [{ element: chartEl, title: 'Revenue by region', caption: 'Displayed rows, grouped by region' }],\n chartsPosition: 'above', // or 'below' the table\n },\n})}>Export report</button>\n```\n\nA chart block never splits across a page break. `resolvePdfCharts` and\n`buildPdfDocDefinition` are exported for a document you assemble yourself.\n\n#### Merged cells\n\nPass `merges` to write real merged regions into the sheet. Row / column\nindices are zero-based over the exported **body** (the header row is not\ncounted), and the shape lines up with the grid's own `MergeSpec`:\n\n```ts\n// Merge the first two data rows of column 0, and span a 3-column banner\nawait api.exportData({\n format: 'xlsx',\n merges: [\n { row: 0, col: 0, rowSpan: 2 }, // vertical merge (e.g. a repeated group key)\n { row: 5, col: 0, colSpan: 3 }, // horizontal merge (a section banner)\n ],\n})\n```\n\nTo export the merges you already show in the grid, take your `MergeSpec[]`\n(`{ rowIndex, columnId, rowspan, colspan }`) and map `columnId` to its column\nindex: `{ row: m.rowIndex, col: colIndex(m.columnId), rowSpan: m.rowspan, colSpan: m.colspan }`.\n\nThrows on missing peer (`jszip` / `pdfmake`), revoked / malformed\nlicense, or empty result set. With no license set, it runs but the\ngrid is watermarked.\n\n### `api.print(opts?)` - `Promise<void>`\n\nOpens a new window with a paginated, printable rendering of the grid and\ntriggers the browser print dialog. This is the **zero-dependency \"Save as PDF\"**\nroute: it uses the browser's own engine, so it has excellent font + CSS\nfidelity (including CJK / RTL) and needs no `pdfmake`. The header row repeats on\nevery page, values print **formatted** (matching the grid), and columns keep\ntheir alignment.\n\n| Option | Type | Default |\n| ------------- | -------------------------------------- | ----------- |\n| `title` | `string` | `\"Grid\"` |\n| `subtitle` | `string` | - |\n| `logo` | `string` (data URL) | - |\n| `columns` | `{ field; header?; format?; align? }[]`| grid's own columns |\n| `rows` | `ReadonlyArray<TData> \\| 'displayed' \\| 'selected' \\| 'all'` | `'displayed'` |\n| `rawValues` | `boolean` | `false` |\n| `orientation` | `'portrait' \\| 'landscape'` | `\"portrait\"` |\n| `pageSize` | `string` (e.g. `'A4'`, `'Letter'`) | browser default |\n| `margin` | `string` (e.g. `'14mm'`) | `'14mm'` |\n| `zebra` | `boolean` | `true` |\n| `headerColor` | `string` | `'#f1f5f9'` |\n\nBrowsers may block the popup unless `print()` is called from a user\ngesture (a click handler is fine - automatic on-load print is not). Page\nnumbers come from the browser's own print header/footer.\n\n**`exportData({ format: 'pdf' })` vs `print()`** - use PDF export for a\nprogrammatic, silent file download with full layout control (see \"PDF\noptions\"); use `print()` when you want best-fidelity output and the user to\npick print or \"Save as PDF\" from the dialog.\n\n## Drop-in Export menu (`SvExportMenu`)\n\nRather than wiring your own toolbar, drop in the bundled `SvExportMenu`\ncomponent. It renders an \"Export\" button with a format picker, a row-scope\ntoggle (current view / selected / all), and a built-in progress bar + Cancel\nfor large exports:\n\n```svelte\n<script lang=\"ts\">\n import { SvGrid, type SvGridApi } from '@svgrid/grid'\n import { installEnterprise, SvExportMenu, type EnterpriseGridApi } from '@svgrid/enterprise'\n\n let api = $state<EnterpriseGridApi<typeof features, Order> | null>(null)\n</script>\n\n<div class=\"toolbar\">\n <SvExportMenu {api} filename=\"orders\" />\n</div>\n\n<SvGrid data={rows} columns={columns} features={features}\n onApiReady={(a) => (api = installEnterprise(a))} />\n```\n\n| Prop | Type | Default | Notes |\n| ------------ | ------------------------------------------------ | --------------------------- | ----- |\n| `api` | `EnterpriseGridApi \\| null` | required | Button is disabled until the api is ready. |\n| `filename` | `string` | `'grid'` | Base name, no extension. |\n| `formats` | `ExportFormat[]` | xlsx/xls/pdf/csv/tsv/html | Which formats to offer, in order. |\n| `allowScope` | `boolean` | `true` | Show the current-view / selected / all toggle. |\n| `allowColumns` | `boolean` | `true` | Show per-column include checkboxes (choose which columns to export). |\n| `allowCopy` | `boolean` | `true` | Show \"Copy for Excel\" (tsv) + \"Copy Markdown\" clipboard actions. |\n| `allowPrint` | `boolean` | `false` | Show a \"Print…\" action (`api.print`). |\n| `scope` | `'displayed' \\| 'selected' \\| 'all'` | `'displayed'` | Initial row scope. |\n| `label` | `string` | `'Export'` | Button text. |\n| `conditionalFormats` | `ConditionalFormat[]` | - | Carried into pdf / xlsx / html exports. |\n\nThe menu is sectioned into **Rows** (scope), **Columns** (a picker), and\n**Download** (each format shown with an icon + one-line description), plus\n**copy-to-clipboard** and optional **print** actions. It's **keyboard\naccessible** (arrow keys move between items, Tab is trapped inside, Esc closes\nand returns focus to the button, with `role=\"menu\"` / `menuitem`), handles\nerrors inline (missing peer dependency, empty grid), and wires `onProgress` +\nan `AbortController` for you.\n\nFor large exports, the single-sheet xlsx writer builds in **chunks that yield to\nthe event loop** (and zips asynchronously), so the tab stays responsive and\n`onProgress` ticks; pass a `signal` to cancel.\n\n## Gotchas\n\n- **Empty grids** - both `exportData` and `print` throw if there are no\n displayed rows. Catch the error and show a notice in the UI.\n- **Column ordering** - if you don't pass `columns`, the export uses\n `Object.keys(rows[0])` order. Pass `columns` explicitly when the row\n shape doesn't match the column order you want.\n- **Cell formatters** - column-level format hints (date, number, currency,\n percent) are applied to the exported value by default, so the file matches\n the grid. Custom snippet renderers are **not** auto-serialized - give those\n columns an `exportValue` hook (see \"Faithful values\" above), or set\n `rawValues: true` if you want the raw underlying values.\n- **Print popup blocked** - `print()` resolves but the browser silently\n blocks the new window. Always trigger from a user click, and surface\n the thrown error.\n- **Bundle size** - the vendored exporter is ~50 KB minified. It is\n loaded lazily on first call so it does not bloat the initial bundle\n for users who never export.\n\n## Frequently asked questions\n\n### How do I export a Svelte data grid to Excel?\n\nInstall `@svgrid/enterprise`, call `installEnterprise(api)`, then call the export helper with\n`format: 'xlsx'`. The exporter writes a real OOXML workbook in the browser - no\nserver round-trip. CSV, TSV, PDF, and HTML use the same call with a different\nformat.\n\n### What's the difference between `xls` and `xlsx`?\n\n`xlsx` is the modern OOXML workbook (Excel 2007+); it needs the `jszip` peer\ndependency and supports the richest output (styles, images, multi-sheet,\nformulas). `xls` is the **legacy Excel 2003 XML Spreadsheet** format: pick it\nfor maximum compatibility with old Excel installs or systems that only accept\n`.xls`. It has **no peer dependency**, streams in the browser, and keeps\nnumbers and dates typed (so sums and sorting still work in Excel) with number\nformats applied. It's single-sheet - use `xlsx` for multi-tab workbooks.\n\n```ts\nawait api.exportData({ format: 'xls', filename: 'orders' })\n```\n\n### Is export part of the free Community package?\n\nNo. Export and printing ship in the paid `@svgrid/enterprise` add-on. The free\n`@svgrid/grid` package covers the full grid (sorting, filtering, grouping,\nediting, virtualization) but not export/print/pivot/import.\n\n### Does exporting bloat my bundle?\n\nNo. The ~50 KB exporter is lazy-loaded on the first export call, so users who\nnever export never download it.\n\n## More examples\n\n### Password-protected export\n\nPBKDF2 (100k iters) + AES-GCM 256 client-side. Strength meter, encrypt + download, in-page decrypt tool to verify the round-trip. Enterprise pack maps to ECMA-376 Agile encryption.\n\n<div data-docs-demo=\"93-password-protected-export\" data-height=\"460\"></div>\n\n### Formulas preserved in xlsx\n\nBuilds a real OOXML workbook in the browser via JSZip; computed columns export as <f>...</f> formula cells. Open in Excel and the math recomputes when you edit a number.\n\n<div data-docs-demo=\"101-formulas-in-xlsx\" data-height=\"460\"></div>\n\n### Export grouped grid to Excel\n\nA flat sales grid (Region → Country) exported via api.exportData({ format: \"xlsx\", groupBy }) which uses Smart's NATIVE Excel row outline grouping. Opens in Excel with +/- buttons in the row header gutter for every group level.\n\n<div data-docs-demo=\"126-export-grouped-grid\" data-height=\"460\"></div>\n\n### Export pivot grid to Excel\n\ncreatePivotModel leaves projected into an xlsx via api.exportData with groupBy: [\"region\"] - each region becomes an Excel outline group. Engine column ids (\"pv__Q1__m0\") translate to readable headers (\"Q1 · Revenue\").\n\n<div data-docs-demo=\"127-export-pivot-grid\" data-height=\"460\"></div>\n\n### Export - Formatting, scope + XLS\n\nFaithful export: currency / date / percent render as shown (toggle raw values), pick a row scope (view / selected / all), legacy .xls (Excel 2003 XML, no jszip), an exportValue hook, and the drop-in SvExportMenu.\n\n<div data-docs-demo=\"201-export-formatting-and-xls\" data-height=\"460\"></div>\n\n### Export - Grouped PDF + Print\n\nGroup the grid and export: the PDF + xlsx carry bold group headers and per-cluster subtotal rows (auto-carried from grouping state). Polished Print is the zero-dependency \"Save as PDF\" route with a repeated header and title.\n\n<div data-docs-demo=\"202-export-pdf-grouped-and-print\" data-height=\"460\"></div>\n\n## Try the export API\n\nEvery exporter is on the grid api and takes the same\n`GridExportOptions`. `rows: 'displayed'` is the default and is almost always\nwhat a user means by \"export this\" - it follows their filter and sort.\n\n```svelte\n<script lang=\"ts\">\n let api = $state<SvGridApi<{}, Person> | null>(null)\n</script>\n\n<div>\n <button type=\"button\" onclick={() => api?.exportCsv({ filename: 'people' })}>CSV</button>\n <button type=\"button\" onclick={() => api?.exportTsv({ filename: 'people' })}>TSV</button>\n <button type=\"button\" onclick={() => api?.exportJson({ filename: 'people' })}>JSON</button>\n <button type=\"button\" onclick={() => api?.print()}>Print</button>\n</div>\n\n<SvGrid data={people} {columns} sortable filterable onApiReady={(next) => (api = next)} />\n```\n\nSort or filter first, then export: the file follows the view.\n\n## Exporting a subset\n\n`columns` restricts the fields and fixes their order, and `rawValues` decides\nwhether the file carries what the screen shows or what the row holds. The\nsalary column is the one to watch - formatted it is `$142,000`, raw it is\n`142000`, and a spreadsheet can only do arithmetic on the second.\n\n```svelte\n<script lang=\"ts\">\n let api = $state<SvGridApi<{}, Person> | null>(null)\n</script>\n\n<div>\n <button type=\"button\" onclick={() => api?.exportCsv({ filename: 'formatted', columns: ['name', 'salary'] })}>\n Name + salary, as displayed\n </button>\n <button type=\"button\" onclick={() => api?.exportCsv({ filename: 'raw', columns: ['name', 'salary'], rawValues: true })}>\n Name + salary, raw values\n </button>\n</div>\n\n<SvGrid data={people} {columns} onApiReady={(next) => (api = next)} />\n```\n"
|
|
5498
5498
|
},
|
|
5499
5499
|
{
|
|
5500
5500
|
"slug": "help/export/import-spreadsheet",
|
|
@@ -8245,7 +8245,7 @@ export const docs = [
|
|
|
8245
8245
|
"path": "docs/reference/enterprise.md",
|
|
8246
8246
|
"title": "Enterprise reference",
|
|
8247
8247
|
"section": "API reference",
|
|
8248
|
-
"markdown": "# Enterprise reference\n\nEverything that `@svgrid/enterprise` adds on top of the Community surface.\nInstall + license: see [Enterprise feature pack](../enterprise/README.md).\n\n```ts\nimport {\n installEnterprise, setLicenseKey,\n exportGrid, printGrid, importData,\n createPivotModel, pivotAggregators,\n type EnterpriseGridApi, type ExportOptions, type ImportOptions, type PivotConfig,\n} from '@svgrid/enterprise'\n\n// The AI helpers are free and live in the community package. Enterprise only\n// registers its export engine so an AI-planned Excel / PDF export can run.\nimport { setAIProvider, aiFilter, aiSmartFill, aiSummarize, aiClassify } from '@svgrid/grid'\n```\n\n## License\n\n### `setLicenseKey(key)` / `clearLicenseKey()` / `isLicenseKeySet()`\n\n```ts\nsetLicenseKey('YOUR-LICENSE-KEY') // the key from your order\n```\n\nCall once at app startup. Without a key the Enterprise methods still work\nbut the grid shows an \"unlicensed\" watermark + a one-time console\nnudge.\n\n### `dismissUnlicensedNudge()`\n\nHide the console nudge for the rest of the session (useful in tests).\n\n## Augmenting the API\n\n### `installEnterprise(api)`\n\n```ts\nfunction installEnterprise<TFeatures, TData>(\n api: SvGridApi<TFeatures, TData>,\n): EnterpriseGridApi<TFeatures, TData>\n```\n\nMutates and returns the same api object. After install, the api has\nthe new methods listed below.\n\n```svelte\n<SvGrid\n data={rows} columns={columns} features={features}\n onApiReady={(next) => (api = installEnterprise(next))}\n/>\n```\n\n## Export\n\n### `pro.exportData(opts)`\n\n```ts\nexportData(opts: ExportOptions<TData>): Promise<void>\n```\n\nWrites the current view to a file and triggers a download.\n\n```ts\ntype ExportOptions<TData> = {\n format: 'xlsx' | 'pdf' | 'csv' | 'tsv' | 'html'\n filename?: string // base name; extension auto-appended\n columns?: ReadonlyArray<ExportColumn> // defaults to every key on the first row\n rows?: ReadonlyArray<TData> // defaults to api.getDisplayedRows()\n pageOrientation?: 'portrait' | 'landscape' // pdf only\n\n // Style + branding\n styles?: ExportStyles\n header?: ReadonlyArray<ExportHeaderFooterLine>\n footer?: ReadonlyArray<ExportHeaderFooterLine>\n\n // Embedded images\n imageFields?: ReadonlyArray<string>\n\n // Multi-sheet workbook (xlsx only)\n sheets?: ReadonlyArray<ExportSheet<TData>>\n}\n```\n\nSee [Data export](../help/export.md) for the option-by-option\nwalk-through and the demo links.\n\n### `pro.print(opts?)`\n\n```ts\nprint(opts?: PrintOptions<TData>): Promise<void>\n```\n\nOpens a printable view in a new window with repeat-on-page headers,\noptional cover page, configurable page-size + orientation, and a\nprint-CSS theme.\n\n### Static helpers\n\nIf you don't want to install Enterprise onto the api, use the module-level\nhelpers directly:\n\n```ts\nimport { exportGrid, printGrid } from '@svgrid/enterprise'\nawait exportGrid(api, { format: 'xlsx' })\nawait printGrid(api)\n```\n\n## Import\n\n### `pro.importData(opts)`\n\n```ts\nimportData(opts: ImportOptions<TData>): Promise<ImportResult<TData>>\n\ntype ImportOptions<TData> = {\n format?: ImportFormat // auto-detected from filename/MIME\n source: File | Blob | string // file picker result, drag-drop, or inline text\n columns?: ImportColumnMap<TData> // header-row → field map\n types?: ImportColumnTypes<TData> // per-field type coercion\n validate?: ImportValidator<TData> // per-row validation\n preview?: boolean // return parsed rows + errors; do NOT commit\n}\n\ntype ImportResult<TData> = {\n rows: ReadonlyArray<TData>\n errors: ReadonlyArray<ImportRowError>\n summary: { read: number; accepted: number; rejected: number }\n}\n```\n\nSee [Data import](../help/import.md).\n\n## AI\n\n### `setAIProvider(provider)`\n\n```ts\ntype AIProvider = (req: AIRequest) => Promise<unknown>\n\nsetAIProvider(async (req) => {\n // call your model - OpenAI, Anthropic, Ollama, local. ANY provider.\n return { /* shape depends on req.task */ }\n})\n```\n\nYou write one adapter; the four helpers below route through it.\n\n### `pro.ai.filter(query, opts?)`\n\nNatural-language to filter + sort plan.\n\n```ts\nawait pro.ai.filter('show me churned customers from Q3 sorted by ARR', {\n apply: true, // also call api.setFilter/setSort with the result\n})\n```\n\n### `pro.ai.smartFill(opts)`\n\nPropose values for empty cells from a few worked examples.\n\n### `pro.ai.summarize(opts)`\n\nOne-paragraph + bullets summary of a row, selection, group, or the\nwhole view.\n\n### `pro.ai.classify(opts)`\n\nClassify free-text cells into one of a known label set.\n\nFull options + return shapes: [AI assistant](../help/ai.md).\n\n## Pivot\n\n### `createPivotModel(data, config)`\n\n```ts\nfunction createPivotModel<TFeatures, TData>(\n data: ReadonlyArray<TData>,\n config: PivotConfig<TData>,\n): PivotResult<TFeatures>\n\ntype PivotResult<TFeatures> = {\n rows: PivotRow[]\n columns: Array<ColumnDef<TFeatures, PivotRow>>\n}\n```\n\nPure - no DOM, no api required. Hand the result to a regular\n`<SvGrid>` instance.\n\n### `pro.pivot.build(config)` / `pro.pivot.buildFrom(data, config)`\n\nSame model, with the live api's `getData()` (or an arbitrary array)\nas the source.\n\n### `pivotAggregators`\n\n```ts\ntype PivotAggregatorId =\n | 'sum' | 'avg' | 'min' | 'max'\n | 'count' | 'countDistinct'\n | 'first' | 'last'\n```\n\nA custom aggregator is a plain function: `agg: (values) => something`.\n\nFull reference: [Pivot tables](../help/pivot.md).\n\n## Subpath imports\n\nThe package ships per-feature subpaths so you can tree-shake:\n\n```ts\nimport { exportGrid } from '@svgrid/enterprise/export'\nimport { importData } from '@svgrid/enterprise/import'\nimport { aiFilter } from '@svgrid/grid'\nimport { createPivotModel } from '@svgrid/enterprise/pivot'\n```\n\nIf you only need export, the AI plumbing, pivot engine, and import\nparser don't ship in your bundle.\n\n## Types\n\n```ts\nimport type {\n EnterpriseGridApi, // SvGridApi + Enterprise methods\n EnterpriseAIApi, // .ai namespace shape\n EnterprisePivotApi, // .pivot namespace shape\n\n ExportFormat,\n ExportOptions,\n ExportColumn,\n ExportCellStyle,\n ExportStyles,\n ExportHeaderFooterLine,\n ExportSheet,\n\n ImportFormat,\n ImportOptions,\n ImportResult,\n ImportColumnMap,\n ImportColumnTypes,\n ImportRowError,\n ImportValidator,\n ImportFieldType,\n\n PivotAggregator,\n PivotAggregatorId,\n PivotConfig,\n PivotResult,\n PivotRow,\n PivotRowKind,\n PivotValueConfig,\n} from '@svgrid/enterprise'\n\n// AI types come from the community package alongside the helpers themselves.\nimport type {\n AIProvider,\n AIRequest,\n AITask,\n AIFilterOptions,\n AIFilterResult,\n AIFilterClause,\n AISortClause,\n AISmartFillOptions,\n AISmartFillResult,\n AISmartFillExample,\n AISummarizeOptions,\n AISummarizeTarget,\n AISummary,\n AIClassifyOptions,\n AIClassifyResult,\n} from '@svgrid/grid'\n```\n"
|
|
8248
|
+
"markdown": "# Enterprise reference\n\nEverything that `@svgrid/enterprise` adds on top of the Community surface.\nInstall + license: see [Enterprise feature pack](../enterprise/README.md).\n\n```ts\nimport {\n installEnterprise, setLicenseKey,\n exportGrid, printGrid, importData,\n createPivotModel, pivotAggregators,\n type EnterpriseGridApi, type ExportOptions, type ImportOptions, type PivotConfig,\n} from '@svgrid/enterprise'\n\n// The AI helpers are free and live in the community package. Enterprise only\n// registers its export engine so an AI-planned Excel / PDF export can run.\nimport { setAIProvider, aiFilter, aiSmartFill, aiSummarize, aiClassify } from '@svgrid/grid'\n```\n\n## License\n\n### `setLicenseKey(key)` / `clearLicenseKey()` / `isLicenseKeySet()`\n\n```ts\nsetLicenseKey('YOUR-LICENSE-KEY') // the key from your order\n```\n\nCall once at app startup. Without a key the Enterprise methods still work\nbut the grid shows an \"unlicensed\" watermark + a one-time console\nnudge.\n\n### `dismissUnlicensedNudge()`\n\nHide the console nudge for the rest of the session (useful in tests).\n\n## Augmenting the API\n\n### `installEnterprise(api)`\n\n```ts\nfunction installEnterprise<TFeatures, TData>(\n api: SvGridApi<TFeatures, TData>,\n): EnterpriseGridApi<TFeatures, TData>\n```\n\nMutates and returns the same api object. After install, the api has\nthe new methods listed below.\n\n```svelte\n<SvGrid\n data={rows} columns={columns} features={features}\n onApiReady={(next) => (api = installEnterprise(next))}\n/>\n```\n\n## Export\n\n### `pro.exportData(opts)`\n\n```ts\nexportData(opts: ExportOptions<TData>): Promise<void>\n```\n\nWrites the current view to a file and triggers a download.\n\n```ts\ntype ExportOptions<TData> = {\n format: 'xlsx' | 'pdf' | 'csv' | 'tsv' | 'html'\n filename?: string // base name; extension auto-appended\n columns?: ReadonlyArray<ExportColumn> // defaults to every key on the first row\n rows?: ReadonlyArray<TData> // defaults to api.getDisplayedRows()\n pageOrientation?: 'portrait' | 'landscape' // pdf only\n\n // Style + branding\n styles?: ExportStyles\n header?: ReadonlyArray<ExportHeaderFooterLine>\n footer?: ReadonlyArray<ExportHeaderFooterLine>\n\n // Embedded images\n imageFields?: ReadonlyArray<string>\n\n // Multi-sheet workbook (xlsx only)\n sheets?: ReadonlyArray<ExportSheet<TData>>\n}\n```\n\nSee [Data export](../help/export.md) for the option-by-option\nwalk-through and the demo links.\n\n### `pro.print(opts?)`\n\n```ts\nprint(opts?: PrintOptions<TData>): Promise<void>\n```\n\nOpens a printable view in a new window with repeat-on-page headers,\noptional cover page, configurable page-size + orientation, and a\nprint-CSS theme.\n\n### Static helpers\n\nIf you don't want to install Enterprise onto the api, use the module-level\nhelpers directly:\n\n```ts\nimport { exportGrid, printGrid } from '@svgrid/enterprise'\nawait exportGrid(api, { format: 'xlsx' })\nawait printGrid(api)\n// The printable document, without the print window and dialog:\nconst html = await printGrid(api, { open: false })\n```\n\n## Import\n\n### `pro.importData(opts)`\n\n```ts\nimportData(opts: ImportOptions<TData>): Promise<ImportResult<TData>>\n\ntype ImportOptions<TData> = {\n format?: ImportFormat // auto-detected from filename/MIME\n source: File | Blob | string // file picker result, drag-drop, or inline text\n columns?: ImportColumnMap<TData> // header-row → field map\n types?: ImportColumnTypes<TData> // per-field type coercion\n validate?: ImportValidator<TData> // per-row validation\n preview?: boolean // return parsed rows + errors; do NOT commit\n}\n\ntype ImportResult<TData> = {\n rows: ReadonlyArray<TData>\n errors: ReadonlyArray<ImportRowError>\n summary: { read: number; accepted: number; rejected: number }\n}\n```\n\nSee [Data import](../help/import.md).\n\n## AI\n\n### `setAIProvider(provider)`\n\n```ts\ntype AIProvider = (req: AIRequest) => Promise<unknown>\n\nsetAIProvider(async (req) => {\n // call your model - OpenAI, Anthropic, Ollama, local. ANY provider.\n return { /* shape depends on req.task */ }\n})\n```\n\nYou write one adapter; the four helpers below route through it.\n\n### `pro.ai.filter(query, opts?)`\n\nNatural-language to filter + sort plan.\n\n```ts\nawait pro.ai.filter('show me churned customers from Q3 sorted by ARR', {\n apply: true, // also call api.setFilter/setSort with the result\n})\n```\n\n### `pro.ai.smartFill(opts)`\n\nPropose values for empty cells from a few worked examples.\n\n### `pro.ai.summarize(opts)`\n\nOne-paragraph + bullets summary of a row, selection, group, or the\nwhole view.\n\n### `pro.ai.classify(opts)`\n\nClassify free-text cells into one of a known label set.\n\nFull options + return shapes: [AI assistant](../help/ai.md).\n\n## Pivot\n\n### `createPivotModel(data, config)`\n\n```ts\nfunction createPivotModel<TFeatures, TData>(\n data: ReadonlyArray<TData>,\n config: PivotConfig<TData>,\n): PivotResult<TFeatures>\n\ntype PivotResult<TFeatures> = {\n rows: PivotRow[]\n columns: Array<ColumnDef<TFeatures, PivotRow>>\n}\n```\n\nPure - no DOM, no api required. Hand the result to a regular\n`<SvGrid>` instance.\n\n### `pro.pivot.build(config)` / `pro.pivot.buildFrom(data, config)`\n\nSame model, with the live api's `getData()` (or an arbitrary array)\nas the source.\n\n### `pivotAggregators`\n\n```ts\ntype PivotAggregatorId =\n | 'sum' | 'avg' | 'min' | 'max'\n | 'count' | 'countDistinct'\n | 'first' | 'last'\n```\n\nA custom aggregator is a plain function: `agg: (values) => something`.\n\nFull reference: [Pivot tables](../help/pivot.md).\n\n## Subpath imports\n\nThe package ships per-feature subpaths so you can tree-shake:\n\n```ts\nimport { exportGrid } from '@svgrid/enterprise/export'\nimport { importData } from '@svgrid/enterprise/import'\nimport { aiFilter } from '@svgrid/grid'\nimport { createPivotModel } from '@svgrid/enterprise/pivot'\n```\n\nIf you only need export, the AI plumbing, pivot engine, and import\nparser don't ship in your bundle.\n\n## Types\n\n```ts\nimport type {\n EnterpriseGridApi, // SvGridApi + Enterprise methods\n EnterpriseAIApi, // .ai namespace shape\n EnterprisePivotApi, // .pivot namespace shape\n\n ExportFormat,\n ExportOptions,\n ExportColumn,\n ExportCellStyle,\n ExportStyles,\n ExportHeaderFooterLine,\n ExportSheet,\n\n ImportFormat,\n ImportOptions,\n ImportResult,\n ImportColumnMap,\n ImportColumnTypes,\n ImportRowError,\n ImportValidator,\n ImportFieldType,\n\n PivotAggregator,\n PivotAggregatorId,\n PivotConfig,\n PivotResult,\n PivotRow,\n PivotRowKind,\n PivotValueConfig,\n} from '@svgrid/enterprise'\n\n// AI types come from the community package alongside the helpers themselves.\nimport type {\n AIProvider,\n AIRequest,\n AITask,\n AIFilterOptions,\n AIFilterResult,\n AIFilterClause,\n AISortClause,\n AISmartFillOptions,\n AISmartFillResult,\n AISmartFillExample,\n AISummarizeOptions,\n AISummarizeTarget,\n AISummary,\n AIClassifyOptions,\n AIClassifyResult,\n} from '@svgrid/grid'\n```\n"
|
|
8249
8249
|
},
|
|
8250
8250
|
{
|
|
8251
8251
|
"slug": "reference/features",
|
|
@@ -8280,7 +8280,7 @@ export const docs = [
|
|
|
8280
8280
|
"path": "docs/_data/comparisons/ag-grid.json",
|
|
8281
8281
|
"title": "SvGrid vs AG Grid (community + enterprise)",
|
|
8282
8282
|
"section": "Comparisons",
|
|
8283
|
-
"markdown": "# SvGrid vs AG Grid (community + enterprise)\n\nCanonical URL: https://svgrid.com/compare/ag-grid/\nFacts verified: 2026-09-12\nCompetitor package: ag-grid-community\nCompetitor site: https://www.ag-grid.com/\n\nAG Grid is the most widely used JavaScript data grid, sold for React, Angular, Vue and plain JavaScript, with Svelte covered only by community-built integrations.\n\n## Verdict\n\nAG Grid has the longer track record and the wider Enterprise catalogue; SvGrid is Svelte-5-native, smaller on a Svelte page, and puts most of what AG Grid sells as Enterprise into its MIT core. Pick AG Grid for parity with React and Angular teams; pick SvGrid for a Svelte-first stack.\n\nMigration guide: moving from AG Grid (community + enterprise) to SvGrid: https://svgrid.com/docs/help/migrating-from-ag-grid/\n\n## At a glance\n\n| Fact | SvGrid | AG Grid (community + enterprise) | Checked |\n| --- | --- | --- | --- |\n| Latest version | 3.0.3 | 36.1.0 | 12 Sep 2026 |\n| Licence field on npm | MIT | MIT | 12 Sep 2026 |\n| Last published | 11 Sep 2026 | 5 Aug 2026 | 12 Sep 2026 |\n| Svelte 5 support | Native (Svelte 5 runes) | No Svelte package (JavaScript, React, Angular, Vue) | 12 Sep 2026 |\n| npm downloads, 30 days to 10 Sep 2026 | 16,900 | 12,400,000 | 12 Sep 2026 |\n| Bundle, minified + gzip | 99.8 KB JS + 11.3 KB CSS | 317.5 KB JS, no separate stylesheet | 12 Sep 2026 |\n| Frameworks | Svelte 5 | JavaScript, React, Angular, Vue | 12 Sep 2026 |\n| Pricing | MIT core; @svgrid/enterprise from $299 per developer per year (Indie, under $1M revenue), $599 for Enterprise | AG Grid Community is free under MIT. AG Grid Enterprise is listed at $999 USD per developer with one year of updates and Zendesk support; the Enterprise Bundle with AG Charts Enterprise is $1,498 USD per developer | 12 Sep 2026 |\n\nBundle sizes: each package built alone with Vite in library mode, minified, gzip level 9, Svelte kept external where a package uses it (it is a peer dependency). SvGrid 3.0.25 measured 26 Oct 2026 with packages/grid/scripts/measure-size.mjs; ag-grid-community 36.1.0 entry `createGrid + AllCommunityModule + themeQuartz` measured 12 Sep 2026 with packages/grid/scripts/measure-competitor-bundles.mjs.\n\n## Overview\n\nAG Grid is the heavyweight of the category: a Community edition under MIT and an Enterprise edition sold per developer that adds the set filter, range selection, master/detail, tree data, row grouping, pivoting, integrated charts, Excel export and the server-side row model. Its own pages mark each of those as Enterprise, and the sources at the bottom of this page link to them.\n\nFor Svelte there is no official package. ag-grid.com names React, Angular, Vue and JavaScript and points Svelte users to community-built integrations, so in practice you call the JavaScript API from onMount and manage the DOM yourself. SvGrid is the inverse: a Svelte 5 component with runes and snippets, and a headless core underneath it.\n\n## Looking for an AG Grid alternative for Svelte?\n\nThe usual reason to look is that AG Grid on Svelte means the JavaScript API inside onMount plus a wrapper you do not control. SvGrid gives you a component that speaks runes natively and an MIT core with no row cap and no licence key. What you give up is breadth: AG Grid has more Enterprise modules, more integrations and a far larger body of examples, and if you need one grid across three frameworks it is still the right answer.\n\n## What they have in common\n\n- A full grid with sorting, filtering, grouping, virtualization, editing and selection.\n- Documentation with a runnable example per feature.\n- TypeScript-first APIs with an imperative grid API for code outside the component.\n- An MIT core plus a paid tier with support.\n- An official MCP server so AI assistants read the real docs instead of guessing.\n\n## Where SvGrid is stronger\n\n- Svelte 5 native: runes for state, snippets for cells, no wrapper layer and no DOM imperatives.\n- A smaller bundle on a Svelte page; the At a glance table above carries both measured numbers and the method.\n- Set-style Excel filters, cell-range selection with clipboard, master/detail, tree data, row grouping with aggregation, integrated charts, the column tool panel and the context menu are in the MIT core. AG Grid lists each of these under Enterprise. Flat server-side data (paging, infinite block scroll) is free in both; the server-side row model with lazy grouping, tree, pivot, transactions and selection across unloaded rows is a paid module in both.\n- In-grid AI helpers (natural-language filter, smart fill, summarise, classify, anomalies) ship free in @svgrid/grid with your own model provider.\n- @svgrid/mcp validates props and imports against the real API surface and scaffolds a project, on top of docs and examples.\n- @svgrid/enterprise costs $599 per developer per year for the enterprise grid, unlimited applications; AG Grid Enterprise's per-developer price is in the pricing line above.\n\n## Where AG Grid (community + enterprise) is stronger\n\n- A longer production record across very large enterprise deployments, and the largest body of third-party examples and answers of any grid.\n- The viewport row model, where the server pushes the visible window over a socket; SvGrid has no equivalent.\n- AG Charts, a separately licensed charting product with far more chart types than SvGridChart.\n- One grid API across React, Angular and Vue teams.\n- Enterprise support through Zendesk with one year of updates on the licence.\n\n## Feature by feature\n\nYes: shipped in the package. Partial: needs extra work or a companion package. Paid tier: only in a paid edition. No: not available. n/a: does not apply.\n\n| Feature | SvGrid | AG Grid (community + enterprise) |\n| --- | --- | --- |\n| Svelte 5 native | Yes - runes and snippets | No - JavaScript build; Svelte is pointed to community-built integrations |\n| Sorting and filtering | Yes | Yes |\n| Excel-style set filter | Yes - MIT core | Paid tier - the Set Filter page is marked Enterprise |\n| Row and column virtualization | Yes | Yes |\n| Inline editing | Yes | Yes |\n| Cell-range selection and clipboard | Yes - MIT core, with a fill handle | Paid tier - Range Selection and Clipboard are Enterprise |\n| Master/detail | Yes - MIT core | Paid tier - Enterprise |\n| Tree data | Yes - MIT core | Paid tier - the Tree Data page is marked Enterprise |\n| Row grouping with aggregation | Yes - MIT core | Paid tier - Enterprise |\n| Pivot tables | Paid tier - @svgrid/enterprise | Paid tier - Enterprise |\n| Integrated charts | Yes - SvGridChart in the MIT core | Paid tier - Enterprise, through AG Charts |\n| Server-side data, flat (sort, filter, paging, infinite scroll) | Yes - MIT core: createServerDataSource, page or infinite block scroll | Yes - Infinite Row Model, Community |\n| Server-side row model (lazy grouping, tree, pivot, transactions, select-all across unloaded rows) | Paid tier - @svgrid/enterprise: createServerRowModel | Paid tier - Server-Side Row Model, Enterprise |\n| Global search over server-side data | Yes - filterModel.global goes to the server | No - the Quick Filter is not supported by the Infinite or Server-Side row models |\n| Viewport row model (server pushes the visible window) | No - not built; real-time deltas merge into loaded rows instead | Paid tier - Viewport Row Model, Enterprise |\n| CSV export | Yes - MIT core | Yes - Community, through the API |\n| Excel export | Paid tier - @svgrid/enterprise | Paid tier - Enterprise |\n| Column tool panel | Yes - MIT core | Paid tier - Tool Panels are Enterprise |\n| Context menu | Yes - MIT core | Paid tier - Enterprise |\n| MCP server for AI assistants | Yes - @svgrid/mcp, MIT: docs, examples, code check, scaffold, preview | Yes - ag-mcp, MIT: docs search, version detection, upgrade prompts |\n| In-grid AI helpers (natural-language filter, smart fill) | Yes - MIT core, bring your own model | No - not in the feature list |\n| Paid support | Yes - with @svgrid/enterprise, per developer per year | Yes - Enterprise licence, Zendesk |\n| Core licence | Yes - MIT | Yes - MIT (Community) |\n\n## Measured performance\n\nMeasured 12 Sep 2026 with the harness in the repository (pnpm bench:compare): 100,000 rows, fastest of 7 samples per operation, each grid in a fresh page, Chromium through Playwright, headless, on win32 10.0.26200 x64, Intel(R) Core(TM) Ultra 7 255U; a developer workstation, not a dedicated bench rig. Versions: @svgrid/grid 3.0.3, ag-grid-community 36.1.0. Lower is better.\n\n| Operation | SvGrid | AG Grid (community + enterprise) |\n| --- | --- | --- |\n| Mount | 75.5 ms | 51.4 ms |\n| Sort, text column | 149 ms | 282.8 ms |\n| Sort, numeric column | 115.7 ms | 270 ms |\n| Filter, one column (indicative only) | 99.6 ms | 170.4 ms |\n| Scroll, p95 frame | 34.6 ms | 35.9 ms |\n| Rows kept in the DOM (virtualization on) | 27 | 35 |\n\nThe filter row is not like for like: each grid is driven through its own single-column filter API, and the amount of work differs. The comparison guide explains the method, what is left out and why.\n\n## When to choose SvGrid\n\n- You are on Svelte 5 and want a grid shaped by Svelte idioms rather than a wrapper around a JavaScript build.\n- You want the set filter, master/detail, tree data, range selection, grouping and flat server-side infinite scroll without an Enterprise licence.\n- You want a paid support tier priced per developer per year at $599.\n- You want an assistant that can check the code it writes against the real API, not only read the docs.\n\n## When to choose AG Grid (community + enterprise)\n\n- You depend on a specific AG Grid Enterprise module, the viewport row model or server-side pivoting.\n- You run the same grid across React, Angular and Vue teams and want one library.\n- Your procurement already covers AG Grid Enterprise, or you need AG Charts.\n- You want the largest possible pool of existing examples, answers and contractors.\n\n## Migration effort\n\nEstimated effort: 1-3 hours per grid.\n\nWhat you give up:\n\n- AG Charts as a separately licensed charting product with far more chart types than SvGridChart.\n- The viewport row model; SvGrid's server-side row model covers sort, filter, grouping, tree, pivot, transactions and select-all across unloaded rows, but the server cannot push the visible window.\n- One grid API across React, Angular and Vue teams.\n- The largest body of third-party examples, Stack Overflow answers and contractors of any grid.\n\nMigration guide: moving from AG Grid (community + enterprise) to SvGrid: https://svgrid.com/docs/help/migrating-from-ag-grid/\n\n## Live example\n\nMigration From Ag Grid: open it in the gallery for the source and the full-size version. https://svgrid.com/demos/139-migration-from-ag-grid/\n\n## The bottom line\n\nAG Grid is the safer pick for a multi-framework organisation, or when you need its deepest Enterprise modules, AG Charts or the viewport row model. For a Svelte-first team, SvGrid covers the Enterprise surface most teams actually buy AG Grid for, in the MIT core: master/detail, tree data, range selection, grouping, flat server-side infinite scroll and integrated charts, with pivot tables, the server-side row model and Excel, PDF and print output in the @svgrid/enterprise pack. The bundle and benchmark numbers on this page are measured on the dates shown, so read them rather than either vendor's adjectives.\n\n## Frequently asked questions\n\n### Does AG Grid support Svelte?\n\nNot with an official package. ag-grid.com names React, Angular, Vue and JavaScript, and points Svelte, Solid and Python users to community-built integrations. In practice you create the grid from the JavaScript API inside onMount and keep its state in sync with your Svelte state by hand.\n\n### Which AG Grid Enterprise features does SvGrid include in its MIT core?\n\nThe set-style Excel filter, cell-range selection with clipboard, master/detail, tree data, row grouping with aggregation, integrated charts, the column tool panel and the context menu. AG Grid's own pages list each of these under Enterprise. Pivot tables, the server-side row model (grouping, tree, pivot, transactions, selection) and Excel, PDF and print output are in @svgrid/enterprise, as they are in AG Grid Enterprise; flat server-side infinite scroll is free in both.\n\n### What does SvGrid not have that AG Grid Enterprise has?\n\nThe viewport row model, AG Charts as a full charting product, and the breadth of niche Enterprise modules that come from a decade of enterprise customers. SvGrid's server-side row model handles sort, filter, grouping, tree, pivot, transactions and selection across unloaded rows; if your requirement is the viewport model, AG Grid Enterprise is the better fit.\n\n### Does AG Grid have an MCP server too?\n\nYes. ag-mcp (MIT) gives an assistant AG Grid's docs, examples and version-specific upgrade prompts. @svgrid/mcp covers the same ground for SvGrid and adds a code checker that validates props and imports against the real API surface, a scaffold tool and a preview. Neither is an in-grid feature; SvGrid's natural-language filter, smart fill and summarise helpers are, and they ship free in @svgrid/grid with your own model provider.\n\n### How much does AG Grid Enterprise cost compared with SvGrid?\n\nAG Grid Enterprise is sold per developer with one year of updates; the price as ag-grid.com listed it on the date we read it is in the pricing line at the top of this page. SvGrid's core is MIT and @svgrid/enterprise is $599 per developer per year for the enterprise grid or $999 with the spreadsheet and Studio, both for unlimited applications. Compare what each paid tier adds before comparing prices: most of what AG Grid sells as Enterprise is in SvGrid's free core.\n\n### How long does a migration from AG Grid to SvGrid take?\n\nThe migration guide budgets one to three hours per grid. Column definitions map almost one to one, the imperative API has equivalents on SvGridApi, and most of the time goes into moving cell renderers to snippets. The guide also lists what does not map, so you can decide before you start.\n\n### Is SvGrid a good AG Grid alternative for Svelte?\n\nThe usual reason to look is that AG Grid on Svelte means the JavaScript API inside onMount plus a wrapper you do not control. SvGrid gives you a component that speaks runes natively and an MIT core with no row cap and no licence key. What you give up is breadth: AG Grid has more Enterprise modules, more integrations and a far larger body of examples, and if you need one grid across three frameworks it is still the right answer.\n\n## Related comparisons and docs\n\n- [SvGrid vs MUI X DataGrid](https://svgrid.com/compare/mui-x-datagrid/)\n- [SvGrid vs Handsontable](https://svgrid.com/compare/handsontable/)\n- [SvGrid vs TanStack Table (Svelte)](https://svgrid.com/compare/tanstack-table/)\n- [Comparison: SvGrid vs AG Grid vs TanStack Table](https://svgrid.com/docs/help/comparison/)\n- [Performance benchmarks](https://svgrid.com/docs/help/benchmarks/)\n- [Server-side data](https://svgrid.com/docs/help/server-side-data/)\n- [MCP server](https://svgrid.com/docs/help/mcp-server/)\n\n## Sources and last verified\n\nEvery claim on this page was last checked on 12 Sep 2026. Versions, licences and download counts come from the npm registry; feature and pricing statements from the pages listed below.\n\n- ag-pricing: Enterprise is per developer at $999 USD with one year of updates and Zendesk support; the Enterprise Bundle is $1,498 USD; Community is free under MIT (checked 12 Sep 2026) https://www.ag-grid.com/license-pricing/\n- ag-community-vs-enterprise: Lists Range Selection, Clipboard, Master/Detail, Row Grouping, Pivot Tables and Aggregations, Integrated Charts, Excel export, Server-Side Row Model, Tool Panels and Context Menu under Enterprise Features; no AI feature in either list (checked 12 Sep 2026) https://www.ag-grid.com/javascript-data-grid/community-vs-enterprise/\n- ag-set-filter: The Set Filter page is marked enterprise (checked 12 Sep 2026) https://www.ag-grid.com/javascript-data-grid/filter-set/\n- ag-tree-data: The Tree Data page is marked enterprise (checked 12 Sep 2026) https://www.ag-grid.com/javascript-data-grid/tree-data/\n- ag-csv-export: CSV export is available in Community through the API; the context-menu export and Excel export are Enterprise (checked 12 Sep 2026) https://www.ag-grid.com/javascript-data-grid/csv-export/\n- ag-mcp: Official MCP server installed with npx ag-mcp: search_docs, detect_version, set_version and list_versions tools, quick-start and upgrade-grid prompts, docs and examples as resources; described as help for integrating and maintaining grid code, not an in-grid feature. The ag-mcp package on npm is MIT (checked 12 Sep 2026) https://www.ag-grid.com/javascript-data-grid/mcp-server/\n- ag-home: Names React, Angular, Vue and JavaScript; says Svelte, Solid and Python users can use community-built integrations; the 36.1.0 release notes list an AI Coding Skill (checked 12 Sep 2026) https://www.ag-grid.com/\n- ag-row-models: The row-models feature table lists the Infinite Row Model as Community and the Server-Side and Viewport row models as Enterprise; the Quick Filter row is marked unsupported for the Infinite, Server-Side and Viewport models (checked 15 Sep 2026) https://www.ag-grid.com/javascript-data-grid/row-models/\n"
|
|
8283
|
+
"markdown": "# SvGrid vs AG Grid (community + enterprise)\n\nCanonical URL: https://svgrid.com/compare/ag-grid/\nFacts verified: 2026-09-12\nCompetitor package: ag-grid-community\nCompetitor site: https://www.ag-grid.com/\n\nAG Grid is the most widely used JavaScript data grid, sold for React, Angular, Vue and plain JavaScript, with Svelte covered only by community-built integrations.\n\n## Verdict\n\nAG Grid has the longer track record and the wider Enterprise catalogue; SvGrid is Svelte-5-native, smaller on a Svelte page, and puts most of what AG Grid sells as Enterprise into its MIT core. Pick AG Grid for parity with React and Angular teams; pick SvGrid for a Svelte-first stack.\n\nMigration guide: moving from AG Grid (community + enterprise) to SvGrid: https://svgrid.com/docs/help/migrating-from-ag-grid/\n\n## At a glance\n\n| Fact | SvGrid | AG Grid (community + enterprise) | Checked |\n| --- | --- | --- | --- |\n| Latest version | 3.0.3 | 36.1.0 | 12 Sep 2026 |\n| Licence field on npm | MIT | MIT | 12 Sep 2026 |\n| Last published | 11 Sep 2026 | 5 Aug 2026 | 12 Sep 2026 |\n| Svelte 5 support | Native (Svelte 5 runes) | No Svelte package (JavaScript, React, Angular, Vue) | 12 Sep 2026 |\n| npm downloads, 30 days to 10 Sep 2026 | 16,900 | 12,400,000 | 12 Sep 2026 |\n| Bundle, minified + gzip | 99.8 KB JS + 11.3 KB CSS | 317.5 KB JS, no separate stylesheet | 12 Sep 2026 |\n| Frameworks | Svelte 5 | JavaScript, React, Angular, Vue | 12 Sep 2026 |\n| Pricing | MIT core; @svgrid/enterprise from $299 per developer per year (Indie, under $1M revenue), $599 for Enterprise | AG Grid Community is free under MIT. AG Grid Enterprise is listed at $999 USD per developer with one year of updates and Zendesk support; the Enterprise Bundle with AG Charts Enterprise is $1,498 USD per developer | 12 Sep 2026 |\n\nBundle sizes: each package built alone with Vite in library mode, minified, gzip level 9, Svelte kept external where a package uses it (it is a peer dependency). SvGrid 3.0.25 measured 26 Oct 2026 with packages/grid/scripts/measure-size.mjs; ag-grid-community 36.1.0 entry `createGrid + AllCommunityModule + themeQuartz` measured 12 Sep 2026 with packages/grid/scripts/measure-competitor-bundles.mjs.\n\n## Overview\n\nAG Grid is the heavyweight of the category: a Community edition under MIT and an Enterprise edition sold per developer that adds the set filter, range selection, master/detail, tree data, row grouping, pivoting, integrated charts, Excel export and the server-side row model. Its own pages mark each of those as Enterprise, and the sources at the bottom of this page link to them.\n\nFor Svelte there is no official package. ag-grid.com names React, Angular, Vue and JavaScript and points Svelte users to community-built integrations, so in practice you call the JavaScript API from onMount and manage the DOM yourself. SvGrid is the inverse: a Svelte 5 component with runes and snippets, and a headless core underneath it.\n\n## Looking for an AG Grid alternative for Svelte?\n\nThe usual reason to look is that AG Grid on Svelte means the JavaScript API inside onMount plus a wrapper you do not control. SvGrid gives you a component that speaks runes natively and an MIT core with no row cap and no licence key. What you give up is breadth: AG Grid has more Enterprise modules, more integrations and a far larger body of examples, and if you need one grid across three frameworks it is still the right answer.\n\n## What they have in common\n\n- A full grid with sorting, filtering, grouping, virtualization, editing and selection.\n- Documentation with a runnable example per feature.\n- TypeScript-first APIs with an imperative grid API for code outside the component.\n- An MIT core plus a paid tier with support.\n- An official MCP server so AI assistants read the real docs instead of guessing.\n\n## Where SvGrid is stronger\n\n- Svelte 5 native: runes for state, snippets for cells, no wrapper layer and no DOM imperatives.\n- A smaller bundle on a Svelte page; the At a glance table above carries both measured numbers and the method.\n- Set-style Excel filters, cell-range selection with clipboard, master/detail, tree data, row grouping with aggregation, integrated charts, the column tool panel and the context menu are in the MIT core. AG Grid lists each of these under Enterprise. Flat server-side data (paging, infinite block scroll) is free in both; the server-side row model with lazy grouping, tree, pivot, transactions and selection across unloaded rows is a paid module in both.\n- In-grid AI helpers (natural-language filter, smart fill, summarise, classify, anomalies) ship free in @svgrid/grid with your own model provider.\n- @svgrid/mcp validates props and imports against the real API surface and scaffolds a project, on top of docs and examples.\n- @svgrid/enterprise costs $599 per developer per year for the enterprise grid, unlimited applications; AG Grid Enterprise's per-developer price is in the pricing line above.\n\n## Where AG Grid (community + enterprise) is stronger\n\n- A longer production record across very large enterprise deployments, and the largest body of third-party examples and answers of any grid.\n- The viewport row model, where the server pushes the visible window over a socket; SvGrid has no equivalent.\n- AG Charts, a separately licensed charting product with far more chart types than SvGridChart.\n- One grid API across React, Angular and Vue teams.\n- Enterprise support through Zendesk with one year of updates on the licence.\n\n## Feature by feature\n\nYes: shipped in the package. Partial: needs extra work or a companion package. Paid tier: only in a paid edition. No: not available. n/a: does not apply.\n\n| Feature | SvGrid | AG Grid (community + enterprise) |\n| --- | --- | --- |\n| Svelte 5 native | Yes - runes and snippets | No - JavaScript build; Svelte is pointed to community-built integrations |\n| Sorting and filtering | Yes | Yes |\n| Excel-style set filter | Yes - MIT core | Paid tier - the Set Filter page is marked Enterprise |\n| Row and column virtualization | Yes | Yes |\n| Inline editing | Yes | Yes |\n| Cell-range selection and clipboard | Yes - MIT core, with a fill handle | Paid tier - Range Selection and Clipboard are Enterprise |\n| Master/detail | Yes - MIT core | Paid tier - Enterprise |\n| Tree data | Yes - MIT core | Paid tier - the Tree Data page is marked Enterprise |\n| Row grouping with aggregation | Yes - MIT core | Paid tier - Enterprise |\n| Pivot tables | Paid tier - @svgrid/enterprise | Paid tier - Enterprise |\n| Integrated charts | Yes - SvGridChart in the MIT core | Paid tier - Enterprise, through AG Charts |\n| Server-side data, flat (sort, filter, paging, infinite scroll) | Yes - MIT core: createServerDataSource, page or infinite block scroll | Yes - Infinite Row Model, Community |\n| Server-side row model (lazy grouping, tree, pivot, transactions, select-all across unloaded rows) | Paid tier - @svgrid/enterprise: createServerRowModel | Paid tier - Server-Side Row Model, Enterprise |\n| Global search over server-side data | Yes - filterModel.global goes to the server | No - the Quick Filter is not supported by the Infinite or Server-Side row models |\n| Viewport row model (server pushes the visible window) | No - not built; real-time deltas merge into loaded rows instead | Paid tier - Viewport Row Model, Enterprise |\n| CSV export | Yes - MIT core | Yes - Community, through the API |\n| Excel export | Paid tier - @svgrid/enterprise | Paid tier - Enterprise |\n| Column tool panel | Yes - MIT core | Paid tier - Tool Panels are Enterprise |\n| Context menu | Yes - MIT core | Paid tier - Enterprise |\n| MCP server for AI assistants | Yes - @svgrid/mcp, MIT: docs, examples, code check, scaffold, preview | Yes - ag-mcp, MIT: docs search, version detection, upgrade prompts |\n| In-grid AI helpers (natural-language filter, smart fill) | Yes - MIT core, bring your own model | No - not in the feature list |\n| Paid support | Yes - with @svgrid/enterprise, per developer per year | Yes - Enterprise licence, Zendesk |\n| Core licence | Yes - MIT | Yes - MIT (Community) |\n\n## Measured performance\n\nMeasured 28 Oct 2026 with the harness in the repository (pnpm bench:compare): 100,000 rows, fastest of 3 samples per operation, each grid in a fresh page, Chromium through Playwright, headless, on win32 10.0.26200 x64, Intel(R) Core(TM) Ultra 7 255U; a developer workstation, not a dedicated bench rig. Versions: @svgrid/grid 3.0.25, ag-grid-community 36.1.0. Lower is better. Tick: 1,000 of the rows replaced per tick with a new amount, the grid sorted by amount, on the update path each grid provides, timed until the changed cells paint; 180 ticks after 10 to warm up.\n\n| Operation | SvGrid | AG Grid (community + enterprise) |\n| --- | --- | --- |\n| Mount | 30.7 ms | 67 ms |\n| Sort, text column | 77.4 ms | 213.9 ms |\n| Sort, numeric column | 32.8 ms | 216.7 ms |\n| Filter, one column (indicative only) | 34.5 ms | 148.8 ms |\n| Scroll, p95 frame | 34.3 ms | 34.5 ms |\n| Live tick, 1,000 rows replaced, sorted by that column, p95 | 48.6 ms | 259.2 ms |\n| Ticks over one 60 Hz frame, of 180 | 115 | 180 |\n| Rows kept in the DOM (virtualization on) | 36 | 36 |\n\nThe filter row is not like for like: each grid is driven through its own single-column filter API, and the amount of work differs. The comparison guide explains the method, what is left out and why.\n\n## When to choose SvGrid\n\n- You are on Svelte 5 and want a grid shaped by Svelte idioms rather than a wrapper around a JavaScript build.\n- You want the set filter, master/detail, tree data, range selection, grouping and flat server-side infinite scroll without an Enterprise licence.\n- You want a paid support tier priced per developer per year at $599.\n- You want an assistant that can check the code it writes against the real API, not only read the docs.\n\n## When to choose AG Grid (community + enterprise)\n\n- You depend on a specific AG Grid Enterprise module, the viewport row model or server-side pivoting.\n- You run the same grid across React, Angular and Vue teams and want one library.\n- Your procurement already covers AG Grid Enterprise, or you need AG Charts.\n- You want the largest possible pool of existing examples, answers and contractors.\n\n## Migration effort\n\nEstimated effort: 1-3 hours per grid.\n\nWhat you give up:\n\n- AG Charts as a separately licensed charting product with far more chart types than SvGridChart.\n- The viewport row model; SvGrid's server-side row model covers sort, filter, grouping, tree, pivot, transactions and select-all across unloaded rows, but the server cannot push the visible window.\n- One grid API across React, Angular and Vue teams.\n- The largest body of third-party examples, Stack Overflow answers and contractors of any grid.\n\nMigration guide: moving from AG Grid (community + enterprise) to SvGrid: https://svgrid.com/docs/help/migrating-from-ag-grid/\n\n## Live example\n\nMigration From Ag Grid: open it in the gallery for the source and the full-size version. https://svgrid.com/demos/139-migration-from-ag-grid/\n\n## The bottom line\n\nAG Grid is the safer pick for a multi-framework organisation, or when you need its deepest Enterprise modules, AG Charts or the viewport row model. For a Svelte-first team, SvGrid covers the Enterprise surface most teams actually buy AG Grid for, in the MIT core: master/detail, tree data, range selection, grouping, flat server-side infinite scroll and integrated charts, with pivot tables, the server-side row model and Excel, PDF and print output in the @svgrid/enterprise pack. The bundle and benchmark numbers on this page are measured on the dates shown, so read them rather than either vendor's adjectives.\n\n## Frequently asked questions\n\n### Does AG Grid support Svelte?\n\nNot with an official package. ag-grid.com names React, Angular, Vue and JavaScript, and points Svelte, Solid and Python users to community-built integrations. In practice you create the grid from the JavaScript API inside onMount and keep its state in sync with your Svelte state by hand.\n\n### Which AG Grid Enterprise features does SvGrid include in its MIT core?\n\nThe set-style Excel filter, cell-range selection with clipboard, master/detail, tree data, row grouping with aggregation, integrated charts, the column tool panel and the context menu. AG Grid's own pages list each of these under Enterprise. Pivot tables, the server-side row model (grouping, tree, pivot, transactions, selection) and Excel, PDF and print output are in @svgrid/enterprise, as they are in AG Grid Enterprise; flat server-side infinite scroll is free in both.\n\n### What does SvGrid not have that AG Grid Enterprise has?\n\nThe viewport row model, AG Charts as a full charting product, and the breadth of niche Enterprise modules that come from a decade of enterprise customers. SvGrid's server-side row model handles sort, filter, grouping, tree, pivot, transactions and selection across unloaded rows; if your requirement is the viewport model, AG Grid Enterprise is the better fit.\n\n### Does AG Grid have an MCP server too?\n\nYes. ag-mcp (MIT) gives an assistant AG Grid's docs, examples and version-specific upgrade prompts. @svgrid/mcp covers the same ground for SvGrid and adds a code checker that validates props and imports against the real API surface, a scaffold tool and a preview. Neither is an in-grid feature; SvGrid's natural-language filter, smart fill and summarise helpers are, and they ship free in @svgrid/grid with your own model provider.\n\n### How much does AG Grid Enterprise cost compared with SvGrid?\n\nAG Grid Enterprise is sold per developer with one year of updates; the price as ag-grid.com listed it on the date we read it is in the pricing line at the top of this page. SvGrid's core is MIT and @svgrid/enterprise is $599 per developer per year for the enterprise grid or $999 with the spreadsheet and Studio, both for unlimited applications. Compare what each paid tier adds before comparing prices: most of what AG Grid sells as Enterprise is in SvGrid's free core.\n\n### How long does a migration from AG Grid to SvGrid take?\n\nThe migration guide budgets one to three hours per grid. Column definitions map almost one to one, the imperative API has equivalents on SvGridApi, and most of the time goes into moving cell renderers to snippets. The guide also lists what does not map, so you can decide before you start.\n\n### Is SvGrid a good AG Grid alternative for Svelte?\n\nThe usual reason to look is that AG Grid on Svelte means the JavaScript API inside onMount plus a wrapper you do not control. SvGrid gives you a component that speaks runes natively and an MIT core with no row cap and no licence key. What you give up is breadth: AG Grid has more Enterprise modules, more integrations and a far larger body of examples, and if you need one grid across three frameworks it is still the right answer.\n\n## Related comparisons and docs\n\n- [SvGrid vs MUI X DataGrid](https://svgrid.com/compare/mui-x-datagrid/)\n- [SvGrid vs Handsontable](https://svgrid.com/compare/handsontable/)\n- [SvGrid vs TanStack Table (Svelte)](https://svgrid.com/compare/tanstack-table/)\n- [Comparison: SvGrid vs AG Grid vs TanStack Table](https://svgrid.com/docs/help/comparison/)\n- [Performance benchmarks](https://svgrid.com/docs/help/benchmarks/)\n- [Server-side data](https://svgrid.com/docs/help/server-side-data/)\n- [MCP server](https://svgrid.com/docs/help/mcp-server/)\n\n## Sources and last verified\n\nEvery claim on this page was last checked on 12 Sep 2026. Versions, licences and download counts come from the npm registry; feature and pricing statements from the pages listed below.\n\n- ag-pricing: Enterprise is per developer at $999 USD with one year of updates and Zendesk support; the Enterprise Bundle is $1,498 USD; Community is free under MIT (checked 12 Sep 2026) https://www.ag-grid.com/license-pricing/\n- ag-community-vs-enterprise: Lists Range Selection, Clipboard, Master/Detail, Row Grouping, Pivot Tables and Aggregations, Integrated Charts, Excel export, Server-Side Row Model, Tool Panels and Context Menu under Enterprise Features; no AI feature in either list (checked 12 Sep 2026) https://www.ag-grid.com/javascript-data-grid/community-vs-enterprise/\n- ag-set-filter: The Set Filter page is marked enterprise (checked 12 Sep 2026) https://www.ag-grid.com/javascript-data-grid/filter-set/\n- ag-tree-data: The Tree Data page is marked enterprise (checked 12 Sep 2026) https://www.ag-grid.com/javascript-data-grid/tree-data/\n- ag-csv-export: CSV export is available in Community through the API; the context-menu export and Excel export are Enterprise (checked 12 Sep 2026) https://www.ag-grid.com/javascript-data-grid/csv-export/\n- ag-mcp: Official MCP server installed with npx ag-mcp: search_docs, detect_version, set_version and list_versions tools, quick-start and upgrade-grid prompts, docs and examples as resources; described as help for integrating and maintaining grid code, not an in-grid feature. The ag-mcp package on npm is MIT (checked 12 Sep 2026) https://www.ag-grid.com/javascript-data-grid/mcp-server/\n- ag-home: Names React, Angular, Vue and JavaScript; says Svelte, Solid and Python users can use community-built integrations; the 36.1.0 release notes list an AI Coding Skill (checked 12 Sep 2026) https://www.ag-grid.com/\n- ag-row-models: The row-models feature table lists the Infinite Row Model as Community and the Server-Side and Viewport row models as Enterprise; the Quick Filter row is marked unsupported for the Infinite, Server-Side and Viewport models (checked 15 Sep 2026) https://www.ag-grid.com/javascript-data-grid/row-models/\n"
|
|
8284
8284
|
},
|
|
8285
8285
|
{
|
|
8286
8286
|
"slug": "compare/airtable",
|
|
@@ -8378,7 +8378,7 @@ export const docs = [
|
|
|
8378
8378
|
"path": "docs/_data/comparisons/svar-svelte-datagrid.json",
|
|
8379
8379
|
"title": "SvGrid vs SVAR Svelte DataGrid",
|
|
8380
8380
|
"section": "Comparisons",
|
|
8381
|
-
"markdown": "# SvGrid vs SVAR Svelte DataGrid\n\nCanonical URL: https://svgrid.com/compare/svar-svelte-datagrid/\nFacts verified: 2026-09-12\nCompetitor package: wx-svelte-grid\nCompetitor site: https://svar.dev/svelte/datagrid/\n\nSVAR Svelte DataGrid (wx-svelte-grid) is a Svelte-native, MIT-licensed data grid from XB Software, the team behind Webix, with React and Vue versions of the same grid.\n\n## Verdict\n\nSVAR is the closest genuinely Svelte-native rival: both grids are MIT and both target Svelte 5. SvGrid has the wider capability surface (grouping with aggregation, master/detail, Excel-style range editing with a fill handle, integrated charts, a headless core, in-grid AI helpers and an MCP server); SVAR is the smaller grid with print in the free package, React and Vue versions, and the Webix team behind it.\n\nMigration guide: moving from SVAR Svelte DataGrid to SvGrid: https://svgrid.com/docs/help/migrating-from-svar-svelte-datagrid/\n\n## At a glance\n\n| Fact | SvGrid | SVAR Svelte DataGrid | Checked |\n| --- | --- | --- | --- |\n| Latest version | 3.0.3 | 2.7.0 | 12 Sep 2026 |\n| Licence field on npm | MIT | MIT | 12 Sep 2026 |\n| Last published | 11 Sep 2026 | 3 Jun 2026 | 12 Sep 2026 |\n| Svelte 5 support | Native (Svelte 5 runes) | Svelte package, no peer range declared | 12 Sep 2026 |\n| npm downloads, 30 days to 10 Sep 2026 | 16,900 | 62,800 | 12 Sep 2026 |\n| Bundle, minified + gzip | 99.8 KB JS + 11.3 KB CSS | 51.5 KB JS, no separate stylesheet, svelte external | 12 Sep 2026 |\n| Engine alone, minified + gzip | 3.2 KB JS, no separate stylesheet (`createSvGrid` from `@svgrid/grid/core`) | the row above; the package is the engine | 26 Oct 2026 |\n| Frameworks | Svelte 5 | Svelte, React, Vue | 12 Sep 2026 |\n| Pricing | MIT core; @svgrid/enterprise from $299 per developer per year (Indie, under $1M revenue), $599 for Enterprise | The DataGrid is MIT and free for commercial use with no paid tier; svar.dev sells PRO editions of its Gantt, Calendar and Kanban components and offers paid consulting and custom development, with no price list for the grid | 12 Sep 2026 |\n\nBundle sizes: each package built alone with Vite in library mode, minified, gzip level 9, Svelte kept external where a package uses it (it is a peer dependency). SvGrid 3.0.25 measured 26 Oct 2026 with packages/grid/scripts/measure-size.mjs; wx-svelte-grid 2.7.0 entry `Grid component` measured 12 Sep 2026 with packages/grid/scripts/measure-competitor-bundles.mjs.\n\n## Overview\n\nSVAR DataGrid (npm: wx-svelte-grid) is part of the SVAR suite from XB Software, the makers of Webix, and is one of the few grids built for Svelte rather than wrapped from another framework. Its docs list in-cell editing, header and advanced filtering, single and multi-column sorting, tree data, virtual scrolling for rows and columns, columns pinned to the left, column and row spans in the header and footer, auto-sized rows, undo and redo, a context menu, row reordering, CSV export, a print API and a REST data provider, all under MIT.\n\nSvGrid overlaps on the Svelte-native angle and reaches further: row grouping with aggregation, master/detail, Excel-style cell-range selection with clipboard and a fill handle, pinned rows and left and right column pinning, integrated charts, a server-side row model, a headless engine, in-grid AI helpers and the @svgrid/mcp server, all in the MIT package. Excel, PDF and print output, import, pivot tables and the Kanban and Scheduler views of the grid live in the paid @svgrid/enterprise pack, whereas SVAR keeps its grid entirely free and sells PRO editions of its Gantt, Calendar and Kanban instead.\n\n## Looking for a SVAR Svelte DataGrid alternative for Svelte?\n\nThe closest comparison on this list, since both are Svelte-native and both are MIT, so licensing does not decide it. The differences are depth and direction: SvGrid ships a larger feature surface, a UI component suite, in-grid AI helpers and an MCP server, while SVAR spans Svelte, React and Vue and keeps a smaller core. The At a glance table above has both measured bundle sizes; if a compact MIT grid with sorting, filtering, editing, tree data and CSV export is all you need, SVAR is a perfectly good answer.\n\n## What they have in common\n\n- Purpose-built for Svelte 5, not a cross-framework wrapper.\n- MIT-licensed and free for commercial use.\n- Sorting, filtering, in-cell editing, virtualization on rows and columns, tree data.\n- Auto-sized row heights, undo and redo, a context menu and drag-and-drop row reordering.\n- Themeable through CSS variables with light and dark themes, localization, WAI-ARIA markup and keyboard navigation.\n\n## Where SvGrid is stronger\n\n- Row grouping with aggregation and a drag-and-drop group panel; SVAR's docs list neither.\n- Master/detail and expandable detail rows; SVAR offers tree data only.\n- Excel-style cell-range selection with clipboard copy and paste and a fill handle; SVAR selects rows.\n- Pinned top and bottom rows, and columns pinned left and right; SVAR pins columns to the left only.\n- Integrated charts with no dependency, plus a chart wizard.\n- A server-side row model with cursor pagination, GraphQL, websocket and optimistic updates, beyond a REST data provider.\n- A headless engine (createSvGrid) you can compose, in addition to the render component.\n- In-grid AI helpers free in @svgrid/grid, and @svgrid/mcp with llms.txt so assistants answer and write code accurately.\n- A paid pack with Excel, PDF and styled-HTML export, print, pivot tables, Excel and CSV import and support. CSV, TSV and JSON export are free in the grid.\n\n## Where SVAR Svelte DataGrid is stronger\n\n- The whole grid is free, print API included; SvGrid puts print and Excel and PDF export in the paid pack. Both export CSV for free.\n- The same grid for React and Vue as well as Svelte; SvGrid is Svelte-only by design.\n- A smaller bundle: the At a glance table has both measured numbers.\n- XB Software and Webix behind it, a team that has built data grids for a long time.\n- Part of the wider SVAR suite, with paid consulting and custom development on offer.\n\n## Feature by feature\n\nYes: shipped in the package. Partial: needs extra work or a companion package. Paid tier: only in a paid edition. No: not available. n/a: does not apply.\n\n| Feature | SvGrid | SVAR Svelte DataGrid |\n| --- | --- | --- |\n| Svelte 5 native | Yes | Yes - Svelte 5 compatible |\n| Licence | Yes - MIT core, paid enterprise pack | Yes - MIT, the grid is entirely free |\n| Headless engine | Yes - createSvGrid | No - component only |\n| Excel-style filter menu | Yes - built in | Yes - header filters plus the SVAR Filter component |\n| Cell-range selection and clipboard | Yes - built in | No - single and multiple row selection |\n| Fill handle | Yes | No - not in the feature list |\n| Row grouping with aggregation | Yes - with a group panel | No - not in the feature list |\n| Master/detail rows | Yes | No - tree data only |\n| Tree data | Yes | Yes |\n| Pinned columns | Yes - left and right | Partial - to the left |\n| Pinned rows (top and bottom) | Yes | No - not in the feature list |\n| Header and footer column spans | Yes | Yes |\n| Auto-sized row height | Yes - autoRowHeight | Yes |\n| Virtualization (rows and columns) | Yes | Yes |\n| Undo and redo, context menu, row drag | Yes | Yes |\n| Integrated charts | Yes - no dependency, plus a chart wizard | No - not in the feature list |\n| Server-side data, flat (sort, filter, paging, infinite scroll) | Yes - createServerDataSource: page or infinite block scroll, cursor, GraphQL, websocket | Partial - RestDataProvider and dynamic loading while scrolling |\n| Server-side row model (lazy grouping, tree, pivot, transactions, select-all across unloaded rows) | Paid tier - @svgrid/enterprise | No - not in the feature list |\n| CSV export | Yes - free, with TSV and JSON | Yes - free |\n| Excel and PDF export | Paid tier - @svgrid/enterprise | No - CSV only in the feature list |\n| Print | Paid tier - @svgrid/enterprise | Yes - print API, free |\n| Pivot tables | Paid tier - @svgrid/enterprise | No - not in the SVAR Svelte product list |\n| React and Vue versions | No - Svelte only | Yes |\n| In-grid AI helpers and MCP server | Yes - helpers free in @svgrid/grid; @svgrid/mcp, MIT | No - not mentioned in the docs |\n| Paid support | Yes - with @svgrid/enterprise, per developer per year | Partial - paid consulting and custom development; no support plan for the grid listed |\n\n## Measured performance\n\nMeasured 12 Sep 2026 with the harness in the repository (pnpm bench:compare): 100,000 rows, fastest of 7 samples per operation, each grid in a fresh page, Chromium through Playwright, headless, on win32 10.0.26200 x64, Intel(R) Core(TM) Ultra 7 255U; a developer workstation, not a dedicated bench rig. Versions: @svgrid/grid 3.0.3, wx-svelte-grid 2.7.0. Lower is better.\n\n| Operation | SvGrid | SVAR Svelte DataGrid |\n| --- | --- | --- |\n| Mount | 75.5 ms | 11.4 ms |\n| Sort, text column | 149 ms | 187.2 ms |\n| Sort, numeric column | 115.7 ms | 165.1 ms |\n| Filter, one column (indicative only) | 99.6 ms | 32.6 ms |\n| Scroll, p95 frame | 34.6 ms | 34.8 ms |\n| Rows kept in the DOM (virtualization on) | 27 | 19 |\n\nThe filter row is not like for like: each grid is driven through its own single-column filter API, and the amount of work differs. The comparison guide explains the method, what is left out and why.\n\n## When to choose SvGrid\n\n- You need grouping with aggregation, master/detail, Excel-style range editing or pivot tables, which SVAR's docs do not list.\n- You want a headless engine plus a render component, not a component-only API.\n- You want integrated charts and a full server-side row model in one library.\n- You want in-grid AI helpers, an MCP server that checks generated code, and a paid support tier.\n\n## When to choose SVAR Svelte DataGrid\n\n- You want a fully free grid with print included and no paid tier at all.\n- You ship to React and Vue as well as Svelte and want one grid across them.\n- A smaller bundle matters more than grouping with aggregation, master/detail, range editing and the other features SvGrid adds.\n- You are already adopting the wider SVAR suite: Gantt, Calendar, Kanban, File Manager.\n\n## Migration effort\n\nEstimated effort: 2-4 hours per grid.\n\nWhat you give up:\n\n- Free printing: SVAR's print API is in the MIT grid, SvGrid's print view is in @svgrid/enterprise.\n- The React and Vue versions of the same grid.\n- A smaller bundle, by the measurements in the At a glance table.\n- The SVAR suite around the grid: Gantt, Calendar, Kanban and File Manager share its core.\n\nMigration guide: moving from SVAR Svelte DataGrid to SvGrid: https://svgrid.com/docs/help/migrating-from-svar-svelte-datagrid/\n\n## Live example\n\nGrouping Aggregation: open it in the gallery for the source and the full-size version. https://svgrid.com/demos/07-grouping-aggregation/\n\n## The bottom line\n\nBoth grids are Svelte-5-native and MIT, so this is not a licensing call. On capability SvGrid is the more complete grid: grouping, master/detail, range editing with a fill handle, charts, a server-side row model, a headless core, AI helpers and an MCP server. SVAR is the smaller, fully free, multi-framework option from the Webix team, and it prints for free where SvGrid charges for print and Excel and PDF export. Choose SvGrid when you need the deeper feature set or support; choose SVAR when a compact free grid covers your needs or you also ship React and Vue.\n\n## Frequently asked questions\n\n### SvGrid vs SVAR Svelte DataGrid: what is the difference?\n\nBoth are MIT-licensed, Svelte-5-native grids. SvGrid is the broader product: row grouping with aggregation, master/detail, Excel-style range selection with a fill handle, integrated charts, a server-side row model, a headless core, in-grid AI helpers and an MCP server. SVAR is a smaller, fully free grid with React and Vue versions from XB Software, with CSV export and a print API included.\n\n### Are SvGrid and SVAR both free?\n\nBoth are free under MIT, including commercial use. SVAR keeps the whole grid free, CSV export and print included, and sells PRO editions of its Gantt, Calendar and Kanban. SvGrid's grid is free too, including CSV, TSV and JSON export, charts and the AI helpers; Excel, PDF and print output, import, pivot tables, the Kanban and Scheduler views and support are in @svgrid/enterprise at $599 per developer per year.\n\n### Are both built for Svelte 5?\n\nYes. SvGrid is written in Svelte 5 runes, and svar.dev states the DataGrid is Svelte 5 compatible. Neither is a cross-framework wrapper, although SVAR also ships React and Vue versions of its grid.\n\n### Which grid is smaller?\n\nSVAR, by the measurements in the At a glance table: both packages were built alone with Vite, minified and gzipped with Svelte external, on the dates shown. SvGrid's extra size buys grouping, master/detail, range editing, charts and the server-side row model; features you never import, such as the date editors, menus and charts, load as separate chunks.\n\n### Does SVAR have row grouping, master/detail or cell-range selection?\n\nNot according to its docs overview on the date we read it, which lists tree data, single and multiple row selection, header and advanced filters, sorting, in-cell editing, columns pinned to the left, CSV export and a print API. SvGrid has all three in the MIT core, and the demos on this page show them.\n\n### How long does a SVAR to SvGrid migration take?\n\nThe migration guide budgets two to four hours per grid: a prop and event rename pass, since both use array-of-object column definitions, plus re-theming through --sg-* tokens.\n\n### Is SvGrid a good SVAR Svelte DataGrid alternative for Svelte?\n\nThe closest comparison on this list, since both are Svelte-native and both are MIT, so licensing does not decide it. The differences are depth and direction: SvGrid ships a larger feature surface, a UI component suite, in-grid AI helpers and an MCP server, while SVAR spans Svelte, React and Vue and keeps a smaller core. The At a glance table above has both measured bundle sizes; if a compact MIT grid with sorting, filtering, editing, tree data and CSV export is all you need, SVAR is a perfectly good answer.\n\n## Related comparisons and docs\n\n- [SvGrid vs svelte-headless-table](https://svgrid.com/compare/svelte-headless-table/)\n- [SvGrid vs TanStack Table (Svelte)](https://svgrid.com/compare/tanstack-table/)\n- [SvGrid vs @vincjo/datatables](https://svgrid.com/compare/vincjo-datatables/)\n- [Comparison: SvGrid vs AG Grid vs TanStack Table](https://svgrid.com/docs/help/comparison/)\n- [Grouping & aggregation](https://svgrid.com/docs/help/grouping-aggregation/)\n- [Master / detail (nested grids)](https://svgrid.com/docs/help/rows/master-detail/)\n- [Build a table from scratch](https://svgrid.com/docs/help/headless/build-a-table/)\n\n## Sources and last verified\n\nEvery claim on this page was last checked on 12 Sep 2026. Versions, licences and download counts come from the npm registry; feature and pricing statements from the pages listed below.\n\n- svar-datagrid: Licensed under MIT; Svelte 5 compatible; React and Vue versions available; lists multi-column sorting, header filters, in-cell editing, tree data, virtual scrolling, columns pinned to the left, context menu, row drag-and-drop, checkbox selection, pagination, hotkeys, WAI-ARIA, print, undo/redo (checked 12 Sep 2026) https://svar.dev/svelte/datagrid/\n- svar-overview: Feature list: in-cell editing, header and advanced filtering, sorting, single and multiple row selection, row reordering, context menu, undo/redo, tree data, pagination, colspans and rowspans in header and footer, collapsible column groups, pinned columns to the left, auto-sizing of rows and columns, localization, themes, export to CSV, print API, RestDataProvider, virtual scrolling for rows and columns, WAI-ARIA, keyboard navigation; no Excel export, row grouping, aggregation, master/detail, charts, AI or MCP (checked 12 Sep 2026) https://docs.svar.dev/svelte/grid/overview/\n- svar-svelte: DataGrid, Filter, Editor, File Manager and Core are MIT; Gantt, Calendar and Kanban have MIT cores with paid PRO editions; no pivot component in the list; no price list on the page (checked 12 Sep 2026) https://svar.dev/svelte/\n- svar-gantt: Offers paid consulting and custom development services; PRO edition pricing is on a separate page (checked 12 Sep 2026) https://svar.dev/svelte/gantt/\n"
|
|
8381
|
+
"markdown": "# SvGrid vs SVAR Svelte DataGrid\n\nCanonical URL: https://svgrid.com/compare/svar-svelte-datagrid/\nFacts verified: 2026-09-12\nCompetitor package: wx-svelte-grid\nCompetitor site: https://svar.dev/svelte/datagrid/\n\nSVAR Svelte DataGrid (wx-svelte-grid) is a Svelte-native, MIT-licensed data grid from XB Software, the team behind Webix, with React and Vue versions of the same grid.\n\n## Verdict\n\nSVAR is the closest genuinely Svelte-native rival: both grids are MIT and both target Svelte 5. SvGrid has the wider capability surface (grouping with aggregation, master/detail, Excel-style range editing with a fill handle, integrated charts, a headless core, in-grid AI helpers and an MCP server); SVAR is the smaller grid with print in the free package, React and Vue versions, and the Webix team behind it.\n\nMigration guide: moving from SVAR Svelte DataGrid to SvGrid: https://svgrid.com/docs/help/migrating-from-svar-svelte-datagrid/\n\n## At a glance\n\n| Fact | SvGrid | SVAR Svelte DataGrid | Checked |\n| --- | --- | --- | --- |\n| Latest version | 3.0.3 | 2.7.0 | 12 Sep 2026 |\n| Licence field on npm | MIT | MIT | 12 Sep 2026 |\n| Last published | 11 Sep 2026 | 3 Jun 2026 | 12 Sep 2026 |\n| Svelte 5 support | Native (Svelte 5 runes) | Svelte package, no peer range declared | 12 Sep 2026 |\n| npm downloads, 30 days to 10 Sep 2026 | 16,900 | 62,800 | 12 Sep 2026 |\n| Bundle, minified + gzip | 99.8 KB JS + 11.3 KB CSS | 51.5 KB JS, no separate stylesheet, svelte external | 12 Sep 2026 |\n| Engine alone, minified + gzip | 3.2 KB JS, no separate stylesheet (`createSvGrid` from `@svgrid/grid/core`) | the row above; the package is the engine | 26 Oct 2026 |\n| Frameworks | Svelte 5 | Svelte, React, Vue | 12 Sep 2026 |\n| Pricing | MIT core; @svgrid/enterprise from $299 per developer per year (Indie, under $1M revenue), $599 for Enterprise | The DataGrid is MIT and free for commercial use with no paid tier; svar.dev sells PRO editions of its Gantt, Calendar and Kanban components and offers paid consulting and custom development, with no price list for the grid | 12 Sep 2026 |\n\nBundle sizes: each package built alone with Vite in library mode, minified, gzip level 9, Svelte kept external where a package uses it (it is a peer dependency). SvGrid 3.0.25 measured 26 Oct 2026 with packages/grid/scripts/measure-size.mjs; wx-svelte-grid 2.7.0 entry `Grid component` measured 12 Sep 2026 with packages/grid/scripts/measure-competitor-bundles.mjs.\n\n## Overview\n\nSVAR DataGrid (npm: wx-svelte-grid) is part of the SVAR suite from XB Software, the makers of Webix, and is one of the few grids built for Svelte rather than wrapped from another framework. Its docs list in-cell editing, header and advanced filtering, single and multi-column sorting, tree data, virtual scrolling for rows and columns, columns pinned to the left, column and row spans in the header and footer, auto-sized rows, undo and redo, a context menu, row reordering, CSV export, a print API and a REST data provider, all under MIT.\n\nSvGrid overlaps on the Svelte-native angle and reaches further: row grouping with aggregation, master/detail, Excel-style cell-range selection with clipboard and a fill handle, pinned rows and left and right column pinning, integrated charts, a server-side row model, a headless engine, in-grid AI helpers and the @svgrid/mcp server, all in the MIT package. Excel, PDF and print output, import, pivot tables and the Kanban and Scheduler views of the grid live in the paid @svgrid/enterprise pack, whereas SVAR keeps its grid entirely free and sells PRO editions of its Gantt, Calendar and Kanban instead.\n\n## Looking for a SVAR Svelte DataGrid alternative for Svelte?\n\nThe closest comparison on this list, since both are Svelte-native and both are MIT, so licensing does not decide it. The differences are depth and direction: SvGrid ships a larger feature surface, a UI component suite, in-grid AI helpers and an MCP server, while SVAR spans Svelte, React and Vue and keeps a smaller core. The At a glance table above has both measured bundle sizes; if a compact MIT grid with sorting, filtering, editing, tree data and CSV export is all you need, SVAR is a perfectly good answer.\n\n## What they have in common\n\n- Purpose-built for Svelte 5, not a cross-framework wrapper.\n- MIT-licensed and free for commercial use.\n- Sorting, filtering, in-cell editing, virtualization on rows and columns, tree data.\n- Auto-sized row heights, undo and redo, a context menu and drag-and-drop row reordering.\n- Themeable through CSS variables with light and dark themes, localization, WAI-ARIA markup and keyboard navigation.\n\n## Where SvGrid is stronger\n\n- Row grouping with aggregation and a drag-and-drop group panel; SVAR's docs list neither.\n- Master/detail and expandable detail rows; SVAR offers tree data only.\n- Excel-style cell-range selection with clipboard copy and paste and a fill handle; SVAR selects rows.\n- Pinned top and bottom rows, and columns pinned left and right; SVAR pins columns to the left only.\n- Integrated charts with no dependency, plus a chart wizard.\n- A server-side row model with cursor pagination, GraphQL, websocket and optimistic updates, beyond a REST data provider.\n- A headless engine (createSvGrid) you can compose, in addition to the render component.\n- In-grid AI helpers free in @svgrid/grid, and @svgrid/mcp with llms.txt so assistants answer and write code accurately.\n- A paid pack with Excel, PDF and styled-HTML export, print, pivot tables, Excel and CSV import and support. CSV, TSV and JSON export are free in the grid.\n\n## Where SVAR Svelte DataGrid is stronger\n\n- The whole grid is free, print API included; SvGrid puts print and Excel and PDF export in the paid pack. Both export CSV for free.\n- The same grid for React and Vue as well as Svelte; SvGrid is Svelte-only by design.\n- A smaller bundle: the At a glance table has both measured numbers.\n- XB Software and Webix behind it, a team that has built data grids for a long time.\n- Part of the wider SVAR suite, with paid consulting and custom development on offer.\n\n## Feature by feature\n\nYes: shipped in the package. Partial: needs extra work or a companion package. Paid tier: only in a paid edition. No: not available. n/a: does not apply.\n\n| Feature | SvGrid | SVAR Svelte DataGrid |\n| --- | --- | --- |\n| Svelte 5 native | Yes | Yes - Svelte 5 compatible |\n| Licence | Yes - MIT core, paid enterprise pack | Yes - MIT, the grid is entirely free |\n| Headless engine | Yes - createSvGrid | No - component only |\n| Excel-style filter menu | Yes - built in | Yes - header filters plus the SVAR Filter component |\n| Cell-range selection and clipboard | Yes - built in | No - single and multiple row selection |\n| Fill handle | Yes | No - not in the feature list |\n| Row grouping with aggregation | Yes - with a group panel | No - not in the feature list |\n| Master/detail rows | Yes | No - tree data only |\n| Tree data | Yes | Yes |\n| Pinned columns | Yes - left and right | Partial - to the left |\n| Pinned rows (top and bottom) | Yes | No - not in the feature list |\n| Header and footer column spans | Yes | Yes |\n| Auto-sized row height | Yes - autoRowHeight | Yes |\n| Virtualization (rows and columns) | Yes | Yes |\n| Undo and redo, context menu, row drag | Yes | Yes |\n| Integrated charts | Yes - no dependency, plus a chart wizard | No - not in the feature list |\n| Server-side data, flat (sort, filter, paging, infinite scroll) | Yes - createServerDataSource: page or infinite block scroll, cursor, GraphQL, websocket | Partial - RestDataProvider and dynamic loading while scrolling |\n| Server-side row model (lazy grouping, tree, pivot, transactions, select-all across unloaded rows) | Paid tier - @svgrid/enterprise | No - not in the feature list |\n| CSV export | Yes - free, with TSV and JSON | Yes - free |\n| Excel and PDF export | Paid tier - @svgrid/enterprise | No - CSV only in the feature list |\n| Print | Paid tier - @svgrid/enterprise | Yes - print API, free |\n| Pivot tables | Paid tier - @svgrid/enterprise | No - not in the SVAR Svelte product list |\n| React and Vue versions | No - Svelte only | Yes |\n| In-grid AI helpers and MCP server | Yes - helpers free in @svgrid/grid; @svgrid/mcp, MIT | No - not mentioned in the docs |\n| Paid support | Yes - with @svgrid/enterprise, per developer per year | Partial - paid consulting and custom development; no support plan for the grid listed |\n\n## Measured performance\n\nMeasured 28 Oct 2026 with the harness in the repository (pnpm bench:compare): 100,000 rows, fastest of 3 samples per operation, each grid in a fresh page, Chromium through Playwright, headless, on win32 10.0.26200 x64, Intel(R) Core(TM) Ultra 7 255U; a developer workstation, not a dedicated bench rig. Versions: @svgrid/grid 3.0.25, wx-svelte-grid 2.7.0. Lower is better. Tick: 1,000 of the rows replaced per tick with a new amount, the grid sorted by amount, on the update path each grid provides, timed until the changed cells paint; 180 ticks after 10 to warm up.\n\n| Operation | SvGrid | SVAR Svelte DataGrid |\n| --- | --- | --- |\n| Mount | 30.7 ms | 11.4 ms |\n| Sort, text column | 77.4 ms | 135.4 ms |\n| Sort, numeric column | 32.8 ms | 141.7 ms |\n| Filter, one column (indicative only) | 34.5 ms | 26.1 ms |\n| Scroll, p95 frame | 34.3 ms | 34.6 ms |\n| Live tick, 1,000 rows replaced, sorted by that column, p95 | 48.6 ms | 152.2 ms |\n| Ticks over one 60 Hz frame, of 180 | 115 | 180 |\n| Rows kept in the DOM (virtualization on) | 36 | 19 |\n\nThe filter row is not like for like: each grid is driven through its own single-column filter API, and the amount of work differs. The comparison guide explains the method, what is left out and why.\n\n## When to choose SvGrid\n\n- You need grouping with aggregation, master/detail, Excel-style range editing or pivot tables, which SVAR's docs do not list.\n- You want a headless engine plus a render component, not a component-only API.\n- You want integrated charts and a full server-side row model in one library.\n- You want in-grid AI helpers, an MCP server that checks generated code, and a paid support tier.\n\n## When to choose SVAR Svelte DataGrid\n\n- You want a fully free grid with print included and no paid tier at all.\n- You ship to React and Vue as well as Svelte and want one grid across them.\n- A smaller bundle matters more than grouping with aggregation, master/detail, range editing and the other features SvGrid adds.\n- You are already adopting the wider SVAR suite: Gantt, Calendar, Kanban, File Manager.\n\n## Migration effort\n\nEstimated effort: 2-4 hours per grid.\n\nWhat you give up:\n\n- Free printing: SVAR's print API is in the MIT grid, SvGrid's print view is in @svgrid/enterprise.\n- The React and Vue versions of the same grid.\n- A smaller bundle, by the measurements in the At a glance table.\n- The SVAR suite around the grid: Gantt, Calendar, Kanban and File Manager share its core.\n\nMigration guide: moving from SVAR Svelte DataGrid to SvGrid: https://svgrid.com/docs/help/migrating-from-svar-svelte-datagrid/\n\n## Live example\n\nGrouping Aggregation: open it in the gallery for the source and the full-size version. https://svgrid.com/demos/07-grouping-aggregation/\n\n## The bottom line\n\nBoth grids are Svelte-5-native and MIT, so this is not a licensing call. On capability SvGrid is the more complete grid: grouping, master/detail, range editing with a fill handle, charts, a server-side row model, a headless core, AI helpers and an MCP server. SVAR is the smaller, fully free, multi-framework option from the Webix team, and it prints for free where SvGrid charges for print and Excel and PDF export. Choose SvGrid when you need the deeper feature set or support; choose SVAR when a compact free grid covers your needs or you also ship React and Vue.\n\n## Frequently asked questions\n\n### SvGrid vs SVAR Svelte DataGrid: what is the difference?\n\nBoth are MIT-licensed, Svelte-5-native grids. SvGrid is the broader product: row grouping with aggregation, master/detail, Excel-style range selection with a fill handle, integrated charts, a server-side row model, a headless core, in-grid AI helpers and an MCP server. SVAR is a smaller, fully free grid with React and Vue versions from XB Software, with CSV export and a print API included.\n\n### Are SvGrid and SVAR both free?\n\nBoth are free under MIT, including commercial use. SVAR keeps the whole grid free, CSV export and print included, and sells PRO editions of its Gantt, Calendar and Kanban. SvGrid's grid is free too, including CSV, TSV and JSON export, charts and the AI helpers; Excel, PDF and print output, import, pivot tables, the Kanban and Scheduler views and support are in @svgrid/enterprise at $599 per developer per year.\n\n### Are both built for Svelte 5?\n\nYes. SvGrid is written in Svelte 5 runes, and svar.dev states the DataGrid is Svelte 5 compatible. Neither is a cross-framework wrapper, although SVAR also ships React and Vue versions of its grid.\n\n### Which grid is smaller?\n\nSVAR, by the measurements in the At a glance table: both packages were built alone with Vite, minified and gzipped with Svelte external, on the dates shown. SvGrid's extra size buys grouping, master/detail, range editing, charts and the server-side row model; features you never import, such as the date editors, menus and charts, load as separate chunks.\n\n### Does SVAR have row grouping, master/detail or cell-range selection?\n\nNot according to its docs overview on the date we read it, which lists tree data, single and multiple row selection, header and advanced filters, sorting, in-cell editing, columns pinned to the left, CSV export and a print API. SvGrid has all three in the MIT core, and the demos on this page show them.\n\n### How long does a SVAR to SvGrid migration take?\n\nThe migration guide budgets two to four hours per grid: a prop and event rename pass, since both use array-of-object column definitions, plus re-theming through --sg-* tokens.\n\n### Is SvGrid a good SVAR Svelte DataGrid alternative for Svelte?\n\nThe closest comparison on this list, since both are Svelte-native and both are MIT, so licensing does not decide it. The differences are depth and direction: SvGrid ships a larger feature surface, a UI component suite, in-grid AI helpers and an MCP server, while SVAR spans Svelte, React and Vue and keeps a smaller core. The At a glance table above has both measured bundle sizes; if a compact MIT grid with sorting, filtering, editing, tree data and CSV export is all you need, SVAR is a perfectly good answer.\n\n## Related comparisons and docs\n\n- [SvGrid vs svelte-headless-table](https://svgrid.com/compare/svelte-headless-table/)\n- [SvGrid vs TanStack Table (Svelte)](https://svgrid.com/compare/tanstack-table/)\n- [SvGrid vs @vincjo/datatables](https://svgrid.com/compare/vincjo-datatables/)\n- [Comparison: SvGrid vs AG Grid vs TanStack Table](https://svgrid.com/docs/help/comparison/)\n- [Grouping & aggregation](https://svgrid.com/docs/help/grouping-aggregation/)\n- [Master / detail (nested grids)](https://svgrid.com/docs/help/rows/master-detail/)\n- [Build a table from scratch](https://svgrid.com/docs/help/headless/build-a-table/)\n\n## Sources and last verified\n\nEvery claim on this page was last checked on 12 Sep 2026. Versions, licences and download counts come from the npm registry; feature and pricing statements from the pages listed below.\n\n- svar-datagrid: Licensed under MIT; Svelte 5 compatible; React and Vue versions available; lists multi-column sorting, header filters, in-cell editing, tree data, virtual scrolling, columns pinned to the left, context menu, row drag-and-drop, checkbox selection, pagination, hotkeys, WAI-ARIA, print, undo/redo (checked 12 Sep 2026) https://svar.dev/svelte/datagrid/\n- svar-overview: Feature list: in-cell editing, header and advanced filtering, sorting, single and multiple row selection, row reordering, context menu, undo/redo, tree data, pagination, colspans and rowspans in header and footer, collapsible column groups, pinned columns to the left, auto-sizing of rows and columns, localization, themes, export to CSV, print API, RestDataProvider, virtual scrolling for rows and columns, WAI-ARIA, keyboard navigation; no Excel export, row grouping, aggregation, master/detail, charts, AI or MCP (checked 12 Sep 2026) https://docs.svar.dev/svelte/grid/overview/\n- svar-svelte: DataGrid, Filter, Editor, File Manager and Core are MIT; Gantt, Calendar and Kanban have MIT cores with paid PRO editions; no pivot component in the list; no price list on the page (checked 12 Sep 2026) https://svar.dev/svelte/\n- svar-gantt: Offers paid consulting and custom development services; PRO edition pricing is on a separate page (checked 12 Sep 2026) https://svar.dev/svelte/gantt/\n"
|
|
8382
8382
|
},
|
|
8383
8383
|
{
|
|
8384
8384
|
"slug": "compare/svelte-headless-table",
|
|
@@ -8413,7 +8413,7 @@ export const docs = [
|
|
|
8413
8413
|
"path": "docs/_data/comparisons/tanstack-table.json",
|
|
8414
8414
|
"title": "SvGrid vs TanStack Table (Svelte)",
|
|
8415
8415
|
"section": "Comparisons",
|
|
8416
|
-
"markdown": "# SvGrid vs TanStack Table (Svelte)\n\nCanonical URL: https://svgrid.com/compare/tanstack-table/\nFacts verified: 2026-09-12\nCompetitor package: @tanstack/svelte-table\nCompetitor site: https://tanstack.com/table/latest\n\nTanStack Table is the headless table engine with adapters for React, Vue, Svelte, Solid, Qwik and Lit; you bring the markup.\n\n## Verdict\n\nThe closest peer to SvGrid's headless core. SvGrid ships a rendered component on top of the same kind of engine, in Svelte 5 runes; TanStack stays framework-agnostic and asks you to build and maintain the DOM, the virtualizer, the filter menus and the editors yourself.\n\nMigration guide: moving from TanStack Table (Svelte) to SvGrid: https://svgrid.com/docs/help/migrating-from-tanstack-table/\n\n## At a glance\n\n| Fact | SvGrid | TanStack Table (Svelte) | Checked |\n| --- | --- | --- | --- |\n| Latest version | 3.0.3 | 9.2.4 | 12 Sep 2026 |\n| Licence field on npm | MIT | MIT | 12 Sep 2026 |\n| Last published | 11 Sep 2026 | 28 Aug 2026 | 12 Sep 2026 |\n| Svelte 5 support | Native (Svelte 5 runes) | Yes (peer svelte ^5.0.0) | 12 Sep 2026 |\n| npm downloads, 30 days to 10 Sep 2026 | 16,900 | 231,000 | 12 Sep 2026 |\n| Bundle, minified + gzip | 99.8 KB JS + 11.3 KB CSS | 36.3 KB JS, no separate stylesheet, svelte external | 12 Sep 2026 |\n| Engine alone, minified + gzip | 3.2 KB JS, no separate stylesheet (`createSvGrid` from `@svgrid/grid/core`) | the row above; the package is the engine | 26 Oct 2026 |\n| Frameworks | Svelte 5 | Svelte, React, Vue, Solid, Qwik, Lit | 12 Sep 2026 |\n| Pricing | MIT core; @svgrid/enterprise from $299 per developer per year (Indie, under $1M revenue), $599 for Enterprise | TanStack Table is MIT and free; tanstack.com is sponsor-supported and offers Enterprise Support as private consulting and expert support, with no licence sold for the table | 12 Sep 2026 |\n\nBundle sizes: each package built alone with Vite in library mode, minified, gzip level 9, Svelte kept external where a package uses it (it is a peer dependency). SvGrid 3.0.25 measured 26 Oct 2026 with packages/grid/scripts/measure-size.mjs; @tanstack/svelte-table 9.2.4 entry `whole package` measured 12 Sep 2026 with packages/grid/scripts/measure-competitor-bundles.mjs.\n\n## Overview\n\nTanStack Table is the canonical headless table library: it provides the data pipeline (filter, sort, group, expand, paginate, select) and leaves the markup to you. The v9 line ships a Svelte adapter, @tanstack/svelte-table, whose peer dependency range is Svelte 5, with createTable and getters for reactive data instead of the stores the v8 adapter used.\n\nSvGrid covers the same headless surface (createSvGrid, row models, a features object) and adds a full render component with virtualization, Excel-style filters, inline editing, cell-range selection with a fill handle, grouping with aggregation, master/detail, a server-side row model and integrated charts, all in the MIT package.\n\n## Looking for a TanStack Table alternative for Svelte?\n\nPeople arrive here wanting less glue code, and that is the trade: you keep a headless engine with row models and composable features, and you stop hand-building the DOM, the virtualizer, the filter menus and the editors. If you need one table engine across React and Svelte, stay where you are; that portability is exactly what SvGrid gives up.\n\n## What they have in common\n\n- Headless-first architecture with row-model factories and a features object.\n- Composable features: sorting, filtering, grouping, pagination, expansion, selection.\n- TypeScript-first, MIT-licensed, with paid support available from the maintainers.\n- A createTable / createSvGrid entry point that takes columns, data and features.\n- Svelte 5 in both: runes in SvGrid, a Svelte 5 peer range in the TanStack adapter.\n\n## Where SvGrid is stronger\n\n- Ships <SvGrid />: a production render component with virtualization, Excel-style filters, cell-range selection, inline editing, grouping, master/detail and pagination. With TanStack Table you build all of this.\n- The headless core is written in Svelte 5 runes; the TanStack adapter wraps a framework-agnostic core.\n- An imperative API (SvGridApi) for adding rows, setting filters and mutating columns from outside the component.\n- A gallery of runnable examples that covers every feature, and per-feature docs pages with embedded demos.\n- In-grid AI helpers free in @svgrid/grid, and @svgrid/mcp so assistants fetch real example sources and can check the code they write.\n- A paid pack with Excel, PDF and print output, import, pivot tables and support.\n\n## Where TanStack Table (Svelte) is stronger\n\n- A far larger community; the At a glance table has the download counts side by side.\n- Multi-framework parity: if your shop has React, Vue and Svelte apps, the API stays consistent.\n- A smaller bundle when all you want is the engine; the At a glance table has both measured sizes.\n- Framework-specific documentation for each adapter and years of production use in large companies.\n- Enterprise Support as private consulting, and sponsor perks such as priority issue requests.\n\n## Feature by feature\n\nYes: shipped in the package. Partial: needs extra work or a companion package. Paid tier: only in a paid edition. No: not available. n/a: does not apply.\n\n| Feature | SvGrid | TanStack Table (Svelte) |\n| --- | --- | --- |\n| Headless engine | Yes - createSvGrid | Yes - createTable |\n| Render component (drop-in) | Yes - <SvGrid /> | No - bring your own markup |\n| Svelte 5 | Yes - runes throughout | Yes - the adapter's peer range is Svelte 5 |\n| Row virtualization | Yes - built in | Partial - pair with @tanstack/svelte-virtual |\n| Column virtualization | Yes - built in | Partial - pair with @tanstack/svelte-virtual |\n| Excel-style filter menu | Yes - built in | No - filtering logic only; the UI is yours |\n| Inline editing | Yes - enableInlineEditing | No - bring your own |\n| Cell-range selection and clipboard | Yes - enableCellSelection, fill handle | No - bring your own |\n| Server-side data, flat (sort, filter, paging, infinite scroll) | Yes - createServerDataSource: page or infinite block scroll | Yes - manual sorting, filtering and pagination flags |\n| Server-side row model (lazy grouping, tree, pivot, transactions, select-all across unloaded rows) | Paid tier - @svgrid/enterprise | No - the engine has no server row model; the app fetches per group |\n| Master/detail and tree | Yes | Yes - expansion and subRows |\n| Grouping with aggregation | Yes - engine and rendered group rows | Yes - engine only |\n| Integrated charts | Yes - SvGridChart | No - not part of a headless engine |\n| WAI-ARIA helpers | Yes - exported, and applied by <SvGrid /> | Partial - your markup, your ARIA |\n| In-grid AI helpers and MCP server | Yes - helpers free in @svgrid/grid; @svgrid/mcp, MIT | No - not in the docs |\n| Multi-framework support | No - Svelte only | Yes - React, Vue, Svelte, Solid, Qwik, Lit |\n| Paid support tier | Yes - with @svgrid/enterprise, per developer per year | Yes - Enterprise Support (private consulting) and sponsor perks such as priority issues |\n\n## Measured performance\n\nMeasured 12 Sep 2026 with the harness in the repository (pnpm bench:compare): 100,000 rows, fastest of 7 samples per operation, each grid in a fresh page, Chromium through Playwright, headless, on win32 10.0.26200 x64, Intel(R) Core(TM) Ultra 7 255U; a developer workstation, not a dedicated bench rig. Versions: @svgrid/grid 3.0.3, @tanstack/svelte-table 9.2.4. Lower is better.\n\n| Operation | SvGrid | TanStack Table (Svelte) |\n| --- | --- | --- |\n| Mount | 75.5 ms | 196 ms |\n| Sort, text column | 149 ms | 466 ms |\n| Sort, numeric column | 115.7 ms | 374.6 ms |\n| Filter, one column (indicative only) | 99.6 ms | 111.7 ms |\n| Scroll, p95 frame | 34.6 ms | 35.3 ms |\n| Rows kept in the DOM (virtualization on) | 27 | 27 |\n\nThe filter row is not like for like: each grid is driven through its own single-column filter API, and the amount of work differs. The comparison guide explains the method, what is left out and why.\n\nTanStack Table renders nothing, so its adapter draws the row model through a minimal fixed-height windowed table with no virtualizer library, filter UI or editors; the numbers are the engine plus that DOM.\n\n## When to choose SvGrid\n\n- You are on Svelte 5 and want a grid that uses runes idiomatically, headless or rendered.\n- You want a drop-in <SvGrid /> with virtualization, filters, editing and selection working in one prop pass.\n- You want AI tools to give accurate answers about your grid through MCP, and to have their code checked.\n- You want paid support available without switching libraries later.\n\n## When to choose TanStack Table (Svelte)\n\n- You ship to multiple frameworks (React, Vue, Svelte) and want one API across them.\n- You explicitly want a headless library and intend to build your own render layer.\n- You want the smallest possible engine and the largest possible community.\n- A shadcn-svelte data table built on TanStack already does what you need.\n\n## Migration effort\n\nEstimated effort: About 30 minutes per read-only grid, 2-4 hours for editing-heavy grids.\n\nWhat you give up:\n\n- One table engine across React, Vue, Svelte, Solid, Qwik and Lit.\n- The smallest engine-only bundle; the At a glance table has both measured sizes.\n- The TanStack ecosystem around the table: Virtual, Query and the shadcn-svelte data table recipe.\n\nMigration guide: moving from TanStack Table (Svelte) to SvGrid: https://svgrid.com/docs/help/migrating-from-tanstack-table/\n\n## Live example\n\nHeadless Table: open it in the gallery for the source and the full-size version. https://svgrid.com/demos/186-headless-table/\n\n## The bottom line\n\nIf you build across React, Vue and Svelte and want one headless API, TanStack Table is the safer bet. If you are committed to Svelte 5 and want virtualization, Excel-style filters, editing and selection out of the box, SvGrid gets you there with far less code, and you keep a headless core when you need it.\n\n## Frequently asked questions\n\n### Is SvGrid better than TanStack Table for Svelte?\n\nFor a Svelte 5 app, SvGrid is usually the faster path: it ships a virtualized render component with built-in filters, editing and accessibility, so there is no DOM layer to write. The TanStack Svelte adapter is Svelte 5 in its v9 line, but it is headless by design; you still build and maintain the table, virtualization and editing UI. TanStack wins if you need one API across several frameworks, or if owning that markup is the point.\n\n### Can I keep a headless setup like TanStack Table?\n\nYes. createSvGrid plus the row-model factories is a headless engine; you can drive your own markup exactly as with TanStack and adopt the SvGrid component only where you want it. The headless docs and the headless demos on this page show both.\n\n### Does the TanStack Svelte adapter support Svelte 5?\n\nYes. The @tanstack/svelte-table package on npm declares a Svelte 5 peer range in its v9 line and its examples pass data through getters rather than stores. The At a glance table shows the version and the peer range as read from the registry.\n\n### How long is a TanStack Table to SvGrid migration?\n\nAbout thirty minutes for a read-only grid and two to four hours for editing-heavy ones. The row-model concepts map almost one to one; the migration guide walks through createTable to createSvGrid, the features object and the rendering options.\n\n### Which is smaller, TanStack Table or SvGrid?\n\nThe TanStack adapter, as an engine with no rendering. The At a glance table has both packages measured the same way on the same date. Add what you would write on top of TanStack (a virtualizer, filter UI, editors) before comparing, since that is what the extra size in SvGrid is.\n\n### Is SvGrid a good TanStack Table alternative for Svelte?\n\nPeople arrive here wanting less glue code, and that is the trade: you keep a headless engine with row models and composable features, and you stop hand-building the DOM, the virtualizer, the filter menus and the editors. If you need one table engine across React and Svelte, stay where you are; that portability is exactly what SvGrid gives up.\n\n## Related comparisons and docs\n\n- [SvGrid vs svelte-headless-table](https://svgrid.com/compare/svelte-headless-table/)\n- [SvGrid vs SVAR Svelte DataGrid](https://svgrid.com/compare/svar-svelte-datagrid/)\n- [SvGrid vs Flowbite / Skeleton / shadcn-svelte tables](https://svgrid.com/compare/svelte-ui-kit-tables/)\n- [Comparison: SvGrid vs AG Grid vs TanStack Table](https://svgrid.com/docs/help/comparison/)\n- [Build a table from scratch](https://svgrid.com/docs/help/headless/build-a-table/)\n- [Server-side data (load on demand)](https://svgrid.com/docs/help/headless/server-side/)\n- [Headless virtualization](https://svgrid.com/docs/help/headless/virtualization/)\n\n## Sources and last verified\n\nEvery claim on this page was last checked on 12 Sep 2026. Versions, licences and download counts come from the npm registry; feature and pricing statements from the pages listed below.\n\n- tanstack-svelte: The Svelte adapter is headless: build your own markup from the table instance's state and APIs; createTable takes features, columns and data through a getter; adapters exist for React, Vue, Solid, Qwik, Lit and Svelte (checked 12 Sep 2026) https://tanstack.com/table/latest/docs/framework/svelte/overview\n- tanstack-npm: The latest version's peerDependencies declare svelte ^5.0.0; licence MIT (checked 12 Sep 2026) https://www.npmjs.com/package/@tanstack/svelte-table\n- tanstack-home: Sponsor-supported with gold, silver and bronze sponsors; sponsors get private discord channels, priority issue requests and direct support; an Enterprise Support tier offers private consulting and expert support; no licence for the table is sold (checked 12 Sep 2026) https://tanstack.com/table/latest\n"
|
|
8416
|
+
"markdown": "# SvGrid vs TanStack Table (Svelte)\n\nCanonical URL: https://svgrid.com/compare/tanstack-table/\nFacts verified: 2026-09-12\nCompetitor package: @tanstack/svelte-table\nCompetitor site: https://tanstack.com/table/latest\n\nTanStack Table is the headless table engine with adapters for React, Vue, Svelte, Solid, Qwik and Lit; you bring the markup.\n\n## Verdict\n\nThe closest peer to SvGrid's headless core. SvGrid ships a rendered component on top of the same kind of engine, in Svelte 5 runes; TanStack stays framework-agnostic and asks you to build and maintain the DOM, the virtualizer, the filter menus and the editors yourself.\n\nMigration guide: moving from TanStack Table (Svelte) to SvGrid: https://svgrid.com/docs/help/migrating-from-tanstack-table/\n\n## At a glance\n\n| Fact | SvGrid | TanStack Table (Svelte) | Checked |\n| --- | --- | --- | --- |\n| Latest version | 3.0.3 | 9.2.4 | 12 Sep 2026 |\n| Licence field on npm | MIT | MIT | 12 Sep 2026 |\n| Last published | 11 Sep 2026 | 28 Aug 2026 | 12 Sep 2026 |\n| Svelte 5 support | Native (Svelte 5 runes) | Yes (peer svelte ^5.0.0) | 12 Sep 2026 |\n| npm downloads, 30 days to 10 Sep 2026 | 16,900 | 231,000 | 12 Sep 2026 |\n| Bundle, minified + gzip | 99.8 KB JS + 11.3 KB CSS | 36.3 KB JS, no separate stylesheet, svelte external | 12 Sep 2026 |\n| Engine alone, minified + gzip | 3.2 KB JS, no separate stylesheet (`createSvGrid` from `@svgrid/grid/core`) | the row above; the package is the engine | 26 Oct 2026 |\n| Frameworks | Svelte 5 | Svelte, React, Vue, Solid, Qwik, Lit | 12 Sep 2026 |\n| Pricing | MIT core; @svgrid/enterprise from $299 per developer per year (Indie, under $1M revenue), $599 for Enterprise | TanStack Table is MIT and free; tanstack.com is sponsor-supported and offers Enterprise Support as private consulting and expert support, with no licence sold for the table | 12 Sep 2026 |\n\nBundle sizes: each package built alone with Vite in library mode, minified, gzip level 9, Svelte kept external where a package uses it (it is a peer dependency). SvGrid 3.0.25 measured 26 Oct 2026 with packages/grid/scripts/measure-size.mjs; @tanstack/svelte-table 9.2.4 entry `whole package` measured 12 Sep 2026 with packages/grid/scripts/measure-competitor-bundles.mjs.\n\n## Overview\n\nTanStack Table is the canonical headless table library: it provides the data pipeline (filter, sort, group, expand, paginate, select) and leaves the markup to you. The v9 line ships a Svelte adapter, @tanstack/svelte-table, whose peer dependency range is Svelte 5, with createTable and getters for reactive data instead of the stores the v8 adapter used.\n\nSvGrid covers the same headless surface (createSvGrid, row models, a features object) and adds a full render component with virtualization, Excel-style filters, inline editing, cell-range selection with a fill handle, grouping with aggregation, master/detail, a server-side row model and integrated charts, all in the MIT package.\n\n## Looking for a TanStack Table alternative for Svelte?\n\nPeople arrive here wanting less glue code, and that is the trade: you keep a headless engine with row models and composable features, and you stop hand-building the DOM, the virtualizer, the filter menus and the editors. If you need one table engine across React and Svelte, stay where you are; that portability is exactly what SvGrid gives up.\n\n## What they have in common\n\n- Headless-first architecture with row-model factories and a features object.\n- Composable features: sorting, filtering, grouping, pagination, expansion, selection.\n- TypeScript-first, MIT-licensed, with paid support available from the maintainers.\n- A createTable / createSvGrid entry point that takes columns, data and features.\n- Svelte 5 in both: runes in SvGrid, a Svelte 5 peer range in the TanStack adapter.\n\n## Where SvGrid is stronger\n\n- Ships <SvGrid />: a production render component with virtualization, Excel-style filters, cell-range selection, inline editing, grouping, master/detail and pagination. With TanStack Table you build all of this.\n- The headless core is written in Svelte 5 runes; the TanStack adapter wraps a framework-agnostic core.\n- An imperative API (SvGridApi) for adding rows, setting filters and mutating columns from outside the component.\n- A gallery of runnable examples that covers every feature, and per-feature docs pages with embedded demos.\n- In-grid AI helpers free in @svgrid/grid, and @svgrid/mcp so assistants fetch real example sources and can check the code they write.\n- A paid pack with Excel, PDF and print output, import, pivot tables and support.\n\n## Where TanStack Table (Svelte) is stronger\n\n- A far larger community; the At a glance table has the download counts side by side.\n- Multi-framework parity: if your shop has React, Vue and Svelte apps, the API stays consistent.\n- A smaller bundle when all you want is the engine; the At a glance table has both measured sizes.\n- Framework-specific documentation for each adapter and years of production use in large companies.\n- Enterprise Support as private consulting, and sponsor perks such as priority issue requests.\n\n## Feature by feature\n\nYes: shipped in the package. Partial: needs extra work or a companion package. Paid tier: only in a paid edition. No: not available. n/a: does not apply.\n\n| Feature | SvGrid | TanStack Table (Svelte) |\n| --- | --- | --- |\n| Headless engine | Yes - createSvGrid | Yes - createTable |\n| Render component (drop-in) | Yes - <SvGrid /> | No - bring your own markup |\n| Svelte 5 | Yes - runes throughout | Yes - the adapter's peer range is Svelte 5 |\n| Row virtualization | Yes - built in | Partial - pair with @tanstack/svelte-virtual |\n| Column virtualization | Yes - built in | Partial - pair with @tanstack/svelte-virtual |\n| Excel-style filter menu | Yes - built in | No - filtering logic only; the UI is yours |\n| Inline editing | Yes - enableInlineEditing | No - bring your own |\n| Cell-range selection and clipboard | Yes - enableCellSelection, fill handle | No - bring your own |\n| Server-side data, flat (sort, filter, paging, infinite scroll) | Yes - createServerDataSource: page or infinite block scroll | Yes - manual sorting, filtering and pagination flags |\n| Server-side row model (lazy grouping, tree, pivot, transactions, select-all across unloaded rows) | Paid tier - @svgrid/enterprise | No - the engine has no server row model; the app fetches per group |\n| Master/detail and tree | Yes | Yes - expansion and subRows |\n| Grouping with aggregation | Yes - engine and rendered group rows | Yes - engine only |\n| Integrated charts | Yes - SvGridChart | No - not part of a headless engine |\n| WAI-ARIA helpers | Yes - exported, and applied by <SvGrid /> | Partial - your markup, your ARIA |\n| In-grid AI helpers and MCP server | Yes - helpers free in @svgrid/grid; @svgrid/mcp, MIT | No - not in the docs |\n| Multi-framework support | No - Svelte only | Yes - React, Vue, Svelte, Solid, Qwik, Lit |\n| Paid support tier | Yes - with @svgrid/enterprise, per developer per year | Yes - Enterprise Support (private consulting) and sponsor perks such as priority issues |\n\n## Measured performance\n\nMeasured 28 Oct 2026 with the harness in the repository (pnpm bench:compare): 100,000 rows, fastest of 3 samples per operation, each grid in a fresh page, Chromium through Playwright, headless, on win32 10.0.26200 x64, Intel(R) Core(TM) Ultra 7 255U; a developer workstation, not a dedicated bench rig. Versions: @svgrid/grid 3.0.25, @tanstack/svelte-table 9.2.4. Lower is better. Tick: 1,000 of the rows replaced per tick with a new amount, the grid sorted by amount, on the update path each grid provides, timed until the changed cells paint; 180 ticks after 10 to warm up.\n\n| Operation | SvGrid | TanStack Table (Svelte) |\n| --- | --- | --- |\n| Mount | 30.7 ms | 170.2 ms |\n| Sort, text column | 77.4 ms | 360.9 ms |\n| Sort, numeric column | 32.8 ms | 178.2 ms |\n| Filter, one column (indicative only) | 34.5 ms | 51.1 ms |\n| Scroll, p95 frame | 34.3 ms | 34.3 ms |\n| Live tick, 1,000 rows replaced, sorted by that column, p95 | 48.6 ms | 563.4 ms |\n| Ticks over one 60 Hz frame, of 180 | 115 | 180 |\n| Rows kept in the DOM (virtualization on) | 36 | 27 |\n\nThe filter row is not like for like: each grid is driven through its own single-column filter API, and the amount of work differs. The comparison guide explains the method, what is left out and why.\n\nTanStack Table renders nothing, so its adapter draws the row model through a minimal fixed-height windowed table with no virtualizer library, filter UI or editors; the numbers are the engine plus that DOM.\n\n## When to choose SvGrid\n\n- You are on Svelte 5 and want a grid that uses runes idiomatically, headless or rendered.\n- You want a drop-in <SvGrid /> with virtualization, filters, editing and selection working in one prop pass.\n- You want AI tools to give accurate answers about your grid through MCP, and to have their code checked.\n- You want paid support available without switching libraries later.\n\n## When to choose TanStack Table (Svelte)\n\n- You ship to multiple frameworks (React, Vue, Svelte) and want one API across them.\n- You explicitly want a headless library and intend to build your own render layer.\n- You want the smallest possible engine and the largest possible community.\n- A shadcn-svelte data table built on TanStack already does what you need.\n\n## Migration effort\n\nEstimated effort: About 30 minutes per read-only grid, 2-4 hours for editing-heavy grids.\n\nWhat you give up:\n\n- One table engine across React, Vue, Svelte, Solid, Qwik and Lit.\n- The smallest engine-only bundle; the At a glance table has both measured sizes.\n- The TanStack ecosystem around the table: Virtual, Query and the shadcn-svelte data table recipe.\n\nMigration guide: moving from TanStack Table (Svelte) to SvGrid: https://svgrid.com/docs/help/migrating-from-tanstack-table/\n\n## Live example\n\nHeadless Table: open it in the gallery for the source and the full-size version. https://svgrid.com/demos/186-headless-table/\n\n## The bottom line\n\nIf you build across React, Vue and Svelte and want one headless API, TanStack Table is the safer bet. If you are committed to Svelte 5 and want virtualization, Excel-style filters, editing and selection out of the box, SvGrid gets you there with far less code, and you keep a headless core when you need it.\n\n## Frequently asked questions\n\n### Is SvGrid better than TanStack Table for Svelte?\n\nFor a Svelte 5 app, SvGrid is usually the faster path: it ships a virtualized render component with built-in filters, editing and accessibility, so there is no DOM layer to write. The TanStack Svelte adapter is Svelte 5 in its v9 line, but it is headless by design; you still build and maintain the table, virtualization and editing UI. TanStack wins if you need one API across several frameworks, or if owning that markup is the point.\n\n### Can I keep a headless setup like TanStack Table?\n\nYes. createSvGrid plus the row-model factories is a headless engine; you can drive your own markup exactly as with TanStack and adopt the SvGrid component only where you want it. The headless docs and the headless demos on this page show both.\n\n### Does the TanStack Svelte adapter support Svelte 5?\n\nYes. The @tanstack/svelte-table package on npm declares a Svelte 5 peer range in its v9 line and its examples pass data through getters rather than stores. The At a glance table shows the version and the peer range as read from the registry.\n\n### How long is a TanStack Table to SvGrid migration?\n\nAbout thirty minutes for a read-only grid and two to four hours for editing-heavy ones. The row-model concepts map almost one to one; the migration guide walks through createTable to createSvGrid, the features object and the rendering options.\n\n### Which is smaller, TanStack Table or SvGrid?\n\nThe TanStack adapter, as an engine with no rendering. The At a glance table has both packages measured the same way on the same date. Add what you would write on top of TanStack (a virtualizer, filter UI, editors) before comparing, since that is what the extra size in SvGrid is.\n\n### Is SvGrid a good TanStack Table alternative for Svelte?\n\nPeople arrive here wanting less glue code, and that is the trade: you keep a headless engine with row models and composable features, and you stop hand-building the DOM, the virtualizer, the filter menus and the editors. If you need one table engine across React and Svelte, stay where you are; that portability is exactly what SvGrid gives up.\n\n## Related comparisons and docs\n\n- [SvGrid vs svelte-headless-table](https://svgrid.com/compare/svelte-headless-table/)\n- [SvGrid vs SVAR Svelte DataGrid](https://svgrid.com/compare/svar-svelte-datagrid/)\n- [SvGrid vs Flowbite / Skeleton / shadcn-svelte tables](https://svgrid.com/compare/svelte-ui-kit-tables/)\n- [Comparison: SvGrid vs AG Grid vs TanStack Table](https://svgrid.com/docs/help/comparison/)\n- [Build a table from scratch](https://svgrid.com/docs/help/headless/build-a-table/)\n- [Server-side data (load on demand)](https://svgrid.com/docs/help/headless/server-side/)\n- [Headless virtualization](https://svgrid.com/docs/help/headless/virtualization/)\n\n## Sources and last verified\n\nEvery claim on this page was last checked on 12 Sep 2026. Versions, licences and download counts come from the npm registry; feature and pricing statements from the pages listed below.\n\n- tanstack-svelte: The Svelte adapter is headless: build your own markup from the table instance's state and APIs; createTable takes features, columns and data through a getter; adapters exist for React, Vue, Solid, Qwik, Lit and Svelte (checked 12 Sep 2026) https://tanstack.com/table/latest/docs/framework/svelte/overview\n- tanstack-npm: The latest version's peerDependencies declare svelte ^5.0.0; licence MIT (checked 12 Sep 2026) https://www.npmjs.com/package/@tanstack/svelte-table\n- tanstack-home: Sponsor-supported with gold, silver and bronze sponsors; sponsors get private discord channels, priority issue requests and direct support; an Enterprise Support tier offers private consulting and expert support; no licence for the table is sold (checked 12 Sep 2026) https://tanstack.com/table/latest\n"
|
|
8417
8417
|
},
|
|
8418
8418
|
{
|
|
8419
8419
|
"slug": "compare/vincjo-datatables",
|
|
@@ -8497,8 +8497,8 @@ export const apiReference = {
|
|
|
8497
8497
|
]
|
|
8498
8498
|
};
|
|
8499
8499
|
export const apiSurface = {
|
|
8500
|
-
"gridVersion": "3.0.
|
|
8501
|
-
"enterpriseVersion": "3.1.
|
|
8500
|
+
"gridVersion": "3.0.26",
|
|
8501
|
+
"enterpriseVersion": "3.1.29",
|
|
8502
8502
|
"grid": {
|
|
8503
8503
|
"values": [
|
|
8504
8504
|
"ALL_FILTER_OPERATORS",
|