@svgrid/mcp 3.0.32 → 3.0.33

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 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- **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- **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 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### @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#### 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- **CSV and TSV from `exportData` neutralise formula-like text**, through the\n same `@svgrid/grid` serializer (see the grid's Security entry).\n\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- **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## [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- **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- **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- **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",
@@ -4423,7 +4423,7 @@ export const docs = [
4423
4423
  "path": "docs/compliance/security-questionnaire.md",
4424
4424
  "title": "Security questionnaire answers",
4425
4425
  "section": "Compliance",
4426
- "markdown": "# Security questionnaire answers\n\nAnswers to the questions a vendor security review asks about a front-end\ncomponent library, grouped the way most questionnaires (SIG Lite, CAIQ, a\nbuyer's own) group them. Each answer points at the code, file or workflow that\nbacks it, so a reviewer can check it rather than take it on trust.\n\nQuestions about the company rather than the product (insurance, headcount,\nfinancial statements) go to sales@jqwidgets.com.\n\n## Scope: what is being assessed\n\n| Question | Answer |\n| --- | --- |\n| What is the product? | JavaScript packages installed from npm: `@svgrid/grid` (MIT) and `@svgrid/enterprise` (commercial). They run inside your application, in the browser or under Node for SSR. |\n| Is it a hosted service? | **No.** We operate no service your application depends on. Your data never reaches a system of ours. |\n| Do you host anything at all? | The website (svgrid.com), the trial and licensing forms, and an optional remote MCP server (mcp.svgrid.com) for AI coding assistants. None of them is in your application's runtime path. What the MCP server records is listed on the [privacy page](https://svgrid.com/privacy/). |\n| Does a SOC 2 report apply? | SOC 2 examines service organizations, and we run no service in your data path. See [SOC 2 posture](./soc2.md) for how the library fits your own report. |\n\n## Data handling\n\n| Question | Answer |\n| --- | --- |\n| Does the library send data anywhere? | **No.** No telemetry, analytics or update checks. The only network calls are ones you configure: a server data source calls the `fetch` you pass it, and the AI helpers call the `AIProvider` you register. |\n| Does the license check phone home? | **No.** The Enterprise key is validated offline, in the browser. Without a valid key the features still run and show a watermark. |\n| Does it write to storage? | Not unless you opt in (saved views, for example). See [GDPR + data residency](./gdpr.md). |\n| Does it evaluate code? | No `eval` or `new Function` in `@svgrid/grid`; it runs under a strict CSP. See [security](../help/security.md#csp-guidance). |\n| Personal data, PHI | The library processes only what your app renders. See [GDPR](./gdpr.md) and [HIPAA](./hipaa.md). |\n\n## Supply chain\n\n| Question | Answer |\n| --- | --- |\n| Runtime dependencies | `@svgrid/grid`: one, `esm-env` (MIT, no dependencies of its own). `@svgrid/enterprise`: none required; `jszip` and `pdfmake` are optional peers loaded on first XLSX or PDF use. Enterprise also ships one vendored module, the Smart UI exporter (jQWidgets). |\n| SBOM | CycloneDX 1.6, one per package, in [`sbom/`](https://github.com/sv-grid/sv-grid/tree/main/sbom). Regenerated with every release, and CI fails if one drifts from its manifest (`pnpm sbom:check`). Vendored code is listed as a component. |\n| Are releases signed? | npm packages are published from GitHub Actions with `--provenance`, so npm shows the workflow and commit that built them. From the next release on, each SBOM also carries a Sigstore attestation: `gh attestation verify sbom/svgrid-grid.cdx.json --repo sv-grid/sv-grid`. |\n| Can you build from source? | Yes. The npm packages are built from this public repository; there are no private patches. |\n| Licenses of what you ship | MIT for the grid and its dependency; the vendored exporter is jQWidgets' own code under its license. The SBOM records each license. |\n\n## Secure development\n\n| Question | Answer |\n| --- | --- |\n| How is code tested before release? | Every push to `main` runs the Test workflow (`.github/workflows/test.yml`): type checks of every package, lint, the grid and Enterprise unit suites, browser specs in Chromium, bundle-size budgets and SBOM drift. The release workflow (`.github/workflows/publish-npm.yml`) runs when a push to `main` finishes its Test run green, and publishes that commit; there is no scheduled publish. A manual run is the maintainer's override. |\n| Security-relevant tests | HTML sanitization of cell content (`sanitize-html.test.ts`); formula injection in CSV, TSV and chart CSV exports (`csv-injection.test.ts`); crafted .xlsx files that address cells far outside the sheet (`import-xlsx-limits.dom.test.ts`); LIMIT and OFFSET rejected unless they are non-negative integers in the SvelteKit SQL data source (`sql-source.test.ts`); and the accessibility suites. |\n| CSV / formula injection | File exports prefix text that a spreadsheet would run as a formula (`=`, `+`, `-`, `@`, tab, carriage return) with `'`, by default. See [export](../help/export.md). |\n| Can a version change after release? | No. npm does not allow a published version to be overwritten. |\n\n## Vulnerability management\n\n| Question | Answer |\n| --- | --- |\n| How do we report a vulnerability? | Privately, through GitHub's vulnerability reporting or by email, as [SECURITY.md](https://github.com/sv-grid/sv-grid/blob/main/SECURITY.md) describes. |\n| Response times | Acknowledgement within 3 working days and an assessment within 10 (SECURITY.md). Enterprise customers: acknowledgement within one business day, and a fix for High and Critical issues within five business days ([security](../help/security.md#vulnerability-handling)). |\n| How are customers told? | A GitHub security advisory and the release notes. Enterprise customers hear before the advisory is public. |\n| Known vulnerabilities | None published. Check the repository's advisories page for the current list. |\n| EU Cyber Resilience Act | The pieces the CRA asks a manufacturer for are in place: a coordinated disclosure policy (SECURITY.md), a machine-readable SBOM per release, and a published support policy ([API stability](../help/api-stability.md#long-term-support)). |\n\n## Accessibility\n\n| Question | Answer |\n| --- | --- |\n| Do you publish an ACR / VPAT? | Yes: [VPAT 2.5Rev INT against WCAG 2.2 AA](./vpat.md), self-assessed, with every gap listed. |\n\n## See also\n\n- [Compliance overview](./index.md)\n- [Security & supply chain](../help/security.md)\n- [Audit log integration](./audit-log.md)\n"
4426
+ "markdown": "# Security questionnaire answers\n\nAnswers to the questions a vendor security review asks about a front-end\ncomponent library, grouped the way most questionnaires (SIG Lite, CAIQ, a\nbuyer's own) group them. Each answer points at the code, file or workflow that\nbacks it, so a reviewer can check it rather than take it on trust.\n\nQuestions about the company rather than the product (insurance, headcount,\nfinancial statements) go to sales@jqwidgets.com.\n\n## Scope: what is being assessed\n\n| Question | Answer |\n| --- | --- |\n| What is the product? | JavaScript packages installed from npm: `@svgrid/grid` (MIT) and `@svgrid/enterprise` (commercial). They run inside your application, in the browser or under Node for SSR. |\n| Is it a hosted service? | **No.** We operate no service your application depends on. Your data never reaches a system of ours. |\n| Do you host anything at all? | The website (svgrid.com), the trial and licensing forms, and an optional remote MCP server (mcp.svgrid.com) for AI coding assistants. None of them is in your application's runtime path. What the MCP server records is listed on the [privacy page](https://svgrid.com/privacy/). |\n| Does a SOC 2 report apply? | SOC 2 examines service organizations, and we run no service in your data path. See [SOC 2 posture](./soc2.md) for how the library fits your own report. |\n\n## Data handling\n\n| Question | Answer |\n| --- | --- |\n| Does the library send data anywhere? | **No.** No telemetry, analytics or update checks. The only network calls are ones you configure: a server data source calls the `fetch` you pass it, and the AI helpers call the `AIProvider` you register. |\n| Does the license check phone home? | **No.** The Enterprise key is validated offline, in the browser. Without a valid key the features still run and show a watermark. |\n| Does it write to storage? | Not unless you opt in (saved views, for example). See [GDPR + data residency](./gdpr.md). |\n| Does it evaluate code? | No `eval` or `new Function` in `@svgrid/grid`; it runs under a strict CSP. See [security](../help/security.md#csp-guidance). |\n| Personal data, PHI | The library processes only what your app renders. See [GDPR](./gdpr.md) and [HIPAA](./hipaa.md). |\n\n## Supply chain\n\n| Question | Answer |\n| --- | --- |\n| Runtime dependencies | `@svgrid/grid`: one, `esm-env` (MIT, no dependencies of its own). `@svgrid/enterprise`: none required; `jszip` and `pdfmake` are optional peers loaded on first XLSX or PDF use. Enterprise also ships one vendored module, the Smart UI exporter (jQWidgets). |\n| SBOM | CycloneDX 1.6, one per package, in [`sbom/`](https://github.com/sv-grid/sv-grid/tree/main/sbom). Regenerated with every release, and CI fails if one drifts from its manifest (`pnpm sbom:check`). Vendored code is listed as a component. |\n| Are releases signed? | npm packages are published from GitHub Actions with `--provenance`, so npm shows the workflow and commit that built them. From the next release on, each SBOM also carries a Sigstore attestation: `gh attestation verify sbom/svgrid-grid.cdx.json --repo sv-grid/sv-grid`. |\n| Can you build from source? | Yes. The npm packages are built from this public repository; there are no private patches. |\n| Licenses of what you ship | MIT for the grid and its dependency; the vendored exporter is jQWidgets' own code under its license. The SBOM records each license. |\n\n## Secure development\n\n| Question | Answer |\n| --- | --- |\n| How is code tested before release? | Every push to `main` runs the Test workflow (`.github/workflows/test.yml`): type checks of every package, lint, the grid and Enterprise unit suites, browser specs in Chromium, bundle-size budgets and SBOM drift. The release workflow (`.github/workflows/publish-npm.yml`) runs when a push to `main` finishes its Test run green, and publishes that commit; there is no scheduled publish. A manual run is the maintainer's override. |\n| Security-relevant tests | HTML sanitization of cell content (`sanitize-html.test.ts`); formula injection in CSV, TSV and chart CSV exports (`csv-injection.test.ts`); crafted .xlsx files that address cells far outside the sheet (`import-xlsx-limits.dom.test.ts`) or unzip to far more than they weigh (`xlsx-zip-bomb.dom.test.ts`); LIMIT and OFFSET rejected unless they are non-negative integers in the SvelteKit SQL data source (`sql-source.test.ts`); and the accessibility suites. |\n| CSV / formula injection | File exports prefix text that a spreadsheet would run as a formula (`=`, `+`, `-`, `@`, tab, carriage return) with `'`, by default. See [export](../help/export.md). |\n| Can a version change after release? | No. npm does not allow a published version to be overwritten. |\n\n## Vulnerability management\n\n| Question | Answer |\n| --- | --- |\n| How do we report a vulnerability? | Privately, through GitHub's vulnerability reporting or by email, as [SECURITY.md](https://github.com/sv-grid/sv-grid/blob/main/SECURITY.md) describes. |\n| Response times | Acknowledgement within 3 working days and an assessment within 10 (SECURITY.md). Enterprise customers: acknowledgement within one business day, and a fix for High and Critical issues within five business days ([security](../help/security.md#vulnerability-handling)). |\n| How are customers told? | A GitHub security advisory and the release notes. Enterprise customers hear before the advisory is public. |\n| Known vulnerabilities | None published. Check the repository's advisories page for the current list. |\n| EU Cyber Resilience Act | The pieces the CRA asks a manufacturer for are in place: a coordinated disclosure policy (SECURITY.md), a machine-readable SBOM per release, and a published support policy ([API stability](../help/api-stability.md#long-term-support)). |\n\n## Accessibility\n\n| Question | Answer |\n| --- | --- |\n| Do you publish an ACR / VPAT? | Yes: [VPAT 2.5Rev INT against WCAG 2.2 AA](./vpat.md), self-assessed, with every gap listed. |\n\n## See also\n\n- [Compliance overview](./index.md)\n- [Security & supply chain](../help/security.md)\n- [Audit log integration](./audit-log.md)\n"
4427
4427
  },
4428
4428
  {
4429
4429
  "slug": "compliance/soc2",
@@ -4437,7 +4437,7 @@ export const docs = [
4437
4437
  "path": "docs/compliance/vpat.md",
4438
4438
  "title": "Accessibility Conformance Report (VPAT 2.5Rev, INT)",
4439
4439
  "section": "Compliance",
4440
- "markdown": "# Accessibility Conformance Report (VPAT 2.5Rev, INT)\n\n**Product:** SvGrid (`@svgrid/grid`, `@svgrid/enterprise`)\n**Report version:** 2.0\n**Report date:** 2026-10-25\n**Standards:** WCAG 2.2 Level A and AA, Revised Section 508, EN 301 549 v3.2.1\n**Contact:** support@jqwidgets.com\n\nThis report follows the **VPAT 2.5Rev International edition**. Version 1.0\n(2026-08-24) covered WCAG 2.1. This version moves to WCAG 2.2, re-checks every\nrow against the code, and corrects four rows that version 1.0 overstated\n(2.1.1, 2.1.2, 2.4.3, 2.4.7). The defects behind 2.1.2 and 2.4.7 were fixed\nwhile this report was written; the rest are listed as gaps below.\n\n> **This is a self-assessment, not a third-party audit.** Every \"Supports\"\n> names the test or the code behind it. Where a criterion depends on your\n> content or your theme, the row says so.\n\n## What SvGrid is, for the purposes of this report\n\nSvGrid is a **software component** that renders a data grid inside a page you\ncontrol. Page-level criteria (page title, language of page, bypass blocks,\nconsistent navigation, consistent help) are **Not Applicable** to the\ncomponent; you remain responsible for them in the host page.\n\nSeveral criteria are **shared**: the grid supplies roles, names and keyboard\nbehaviour, and you supply cell content. A custom cell renderer that emits an\nimage without alt text fails 1.1.1 whatever the grid does. Those rows read\n*Supports, with author responsibility*.\n\n## Evaluation methods\n\n| Method | What it covers | Where it runs |\n| --- | --- | --- |\n| `axe-core` in jsdom | Roles, names, relationships, duplicate ids, nested interactive controls. Plain grid, filter row + global filter, row selection, pagination, an invalid cell, an open cell editor | `packages/grid/src/a11y.axe.test.ts`, every commit |\n| `axe-core` in Chromium | The same plus the layout rules jsdom cannot run (`color-contrast`, `target-size`), tags `wcag2a`, `wcag2aa`, `wcag21a`, `wcag21aa`, `wcag22aa`, on the quick-start demo in the default theme | `tests/e2e/grid-a11y.spec.ts`, every commit |\n| Keyboard and focus in Chromium | Tab leaves the grid at both ends; focus is visible when the keyboard brings it in; the forced-colors indicator | `tests/e2e/grid-a11y.spec.ts` |\n| WCAG contrast computation | Body, secondary, header, zebra, hover, selection and on-accent text at 4.5:1, and the accent at 3:1, for **all 20 built-in themes in light and dark** | `packages/grid/src/themes/contrast.test.ts` |\n| ARIA contract and announcement tests | Role and `aria-*` builders; the live-region messages on a mounted grid | `a11y.test.ts`, `a11y.contract.test.ts`, `a11y.announce.test.ts`, `a11y/*.test.ts` |\n| Code review | Each row below, re-read against the source on 2026-10-25 | This report |\n\n### Known limits of this evidence\n\n- **No scripted screen-reader pass (NVDA, JAWS, VoiceOver) has been\n recorded.** Rows that depend on assistive-technology behaviour rest on the\n ARIA implementation and the axe runs.\n- The browser axe run covers one configuration (the quick-start demo, default\n theme). The jsdom runs cover the others with virtualization off.\n- Only the built-in themes are contrast-tested. A custom theme is yours to\n verify; the method is in [accessibility](../help/accessibility.md).\n\n## WCAG 2.2 Level A\n\n| Criterion | Conformance | Remarks |\n| --- | --- | --- |\n| 1.1.1 Non-text Content | Supports, with author responsibility | Grid controls carry text or `aria-label`. Content you render in cells is yours. |\n| 1.2.1-1.2.3 Time-based Media | Not Applicable | No audio or video. |\n| 1.3.1 Info and Relationships | Partially Supports | Native `<table>` semantics plus `grid` / `treegrid`, `rowgroup`, `row`, `columnheader`, `gridcell`, `aria-rowcount`, `aria-colcount`, and absolute `aria-rowindex` / `aria-colindex` on body cells. Gaps: header rows carry no `aria-rowindex` and header cells no `aria-colindex` (matters under column virtualization); a cell range selection is shown visually but not exposed through `aria-selected`; grouped rows on a plain `grid` carry `aria-level`, which ARIA defines only for `treegrid`. |\n| 1.3.2 Meaningful Sequence | Supports | DOM order follows visual order, pinned columns included. |\n| 1.3.3 Sensory Characteristics | Supports | Sort state is exposed through `aria-sort`, not only by the icon. |\n| 1.4.1 Use of Color | Supports, with author responsibility | Sort, row selection and validation errors are carried by `aria-sort`, `aria-selected` and `aria-invalid` with the message, not by colour alone. Conditional formatting you configure is yours. |\n| 1.4.2 Audio Control | Not Applicable | No audio. |\n| 2.1.1 Keyboard | Partially Supports | Navigation, row selection, sorting, filtering, editing, undo, column and row resize (arrow keys on the focused handle) and tree / group expand all work from the keyboard. Gaps: managed row dragging (`rowDragManaged`) has no keyboard path; moving a column has one only through the tool panel's Move up / Move down; the column menu opens without taking focus and has no arrow-key navigation; a custom header renderer gets `role=\"button\"` with `tabindex=\"-1\"`. |\n| 2.1.2 No Keyboard Trap | Supports | Tab on the last cell and Shift+Tab on the first move focus off the grid (`tests/e2e/grid-a11y.spec.ts`). Before 2026-10-25 every Tab was consumed and no key left the grid. |\n| 2.1.4 Character Key Shortcuts | Supports | Typing a character starts editing only while focus is on the grid (the \"active only on focus\" exception). |\n| 2.2.1 Timing Adjustable | Not Applicable | No time limits. |\n| 2.2.2 Pause, Stop, Hide | Supports, with author responsibility | The grid starts no auto-updating content. A live feed you push into it is yours to make pausable. The cell flash stops under `prefers-reduced-motion`. |\n| 2.3.1 Three Flashes or Below Threshold | Supports | The cell flash is one fade per value change. |\n| 2.4.1 Bypass Blocks | Not Applicable | Page-level. |\n| 2.4.2 Page Titled | Not Applicable | Page-level. |\n| 2.4.3 Focus Order | Partially Supports | The grid is one tab stop, and Tab leaves it at either end. Gap: grid menus (column menu, context menu) do not return focus to the button that opened them when they close. |\n| 2.4.4 Link Purpose (In Context) | Supports, with author responsibility | Links in cells are yours. |\n| 2.5.1 Pointer Gestures | Supports | No multipoint or path-based gesture is required. |\n| 2.5.2 Pointer Cancellation | Supports | A pointer-down on a cell only moves the active cell and starts a selection; buttons, menus, sorting and editing act on click (the up event). |\n| 2.5.3 Label in Name | Supports | Accessible names of grid controls contain their visible text. |\n| 2.5.4 Motion Actuation | Not Applicable | No motion input. |\n| 3.1.1 Language of Page | Not Applicable | Page-level. |\n| 3.2.1 On Focus | Supports | Focus alone never changes context. |\n| 3.2.2 On Input | Supports | Filtering and editing update the grid in place. |\n| 3.2.6 Consistent Help | Not Applicable | Page-level. |\n| 3.3.1 Error Identification | Supports, with author responsibility | A cell failing its column's `validate` gets `aria-invalid=\"true\"`, and the message reaches assistive technology as text read with the cell. What counts as invalid is yours. |\n| 3.3.2 Labels or Instructions | Partially Supports | Cell editors are named after their column (`a11y.axe.test.ts`). Gap: the inline filter-row input has a placeholder and no label. |\n| 3.3.7 Redundant Entry | Not Applicable | The grid runs no multi-step process. |\n| 4.1.2 Name, Role, Value | Partially Supports | Grid structure, selection checkboxes (`aria-checked`, including `mixed`), sort buttons, expanders (`aria-expanded`) and editors expose name, role and state, and both axe runs pass. Gaps: range selection state (see 1.3.1) and custom header renderers (see 2.1.1). |\n| 4.1.3 Status Messages | Supports | Filter match counts, cleared filters and bulk selection changes go to a visually hidden `role=\"status\"` region (`a11y.announce.test.ts`). What the tree already carries (the active cell, `aria-sort`, one row's `aria-selected`) is not repeated there. |\n\nWCAG 2.2 removed 4.1.1 Parsing; it is not listed.\n\n## WCAG 2.2 Level AA\n\n| Criterion | Conformance | Remarks |\n| --- | --- | --- |\n| 1.2.4, 1.2.5 Captions, Audio Description | Not Applicable | No media. |\n| 1.3.4 Orientation | Supports | No orientation lock. |\n| 1.3.5 Identify Input Purpose | Not Applicable | The grid collects no personal data about the user. |\n| 1.4.3 Contrast (Minimum) | Supports for built-in themes; author responsibility for custom themes | All 20 presets pass 4.5:1 in light and dark (`contrast.test.ts`), and axe's `color-contrast` rule passes in Chromium on the default theme. |\n| 1.4.4 Resize Text | Supports | Sizes are CSS pixel tokens that scale with browser zoom. No automated 200% test yet. |\n| 1.4.5 Images of Text | Supports | None. |\n| 1.4.10 Reflow | Partially Supports | A table with many columns scrolls horizontally at 320 CSS px, which tabular data needs. The `responsive` prop and per-column `hideBelow` reduce the column set at narrow widths. |\n| 1.4.11 Non-text Contrast | Supports | The accent used for the focus ring and selection is tested at 3:1 against the background in every theme. Gridlines are decorative and not held to 3:1. |\n| 1.4.12 Text Spacing | Supports | Row height and padding are tokens; no automated text-spacing test yet. |\n| 1.4.13 Content on Hover or Focus | Supports | Tooltips and popovers close with Escape and stay while hovered. |\n| 2.4.5 Multiple Ways | Not Applicable | Page-level. |\n| 2.4.6 Headings and Labels | Supports | Column headers name their columns. |\n| 2.4.7 Focus Visible | Supports | The active cell has an accent ring, shown when the keyboard brings focus to the grid, and a system `Highlight` outline under forced colors (`grid-a11y.spec.ts`). Before 2026-10-25 a grid reached by Tab showed no indicator, and forced colors removed the ring. |\n| 2.4.11 Focus Not Obscured (Minimum) | Partially Supports | Moving the active cell scrolls it into view below the sticky header. Gap: horizontal scrolling does not allow for left-pinned columns, so a cell can end up under one. |\n| 2.5.7 Dragging Movements | Partially Supports | Range selection has Shift+click, the fill handle has double-click, column order has the tool panel buttons. Gaps: managed row dragging and column resize by pointer have no single-pointer alternative. |\n| 2.5.8 Target Size (Minimum) | Supports | axe's `target-size` rule passes in Chromium on the quick-start demo. Several controls are under 24 px (selection checkbox 16 px, tree toggle 14 px, header filter and menu buttons 22 px, resize handle 5 px) and pass on the spacing exception; a body-row checkbox's whole cell is also clickable. |\n| 3.1.2 Language of Parts | Not Applicable | Page-level. |\n| 3.2.3 Consistent Navigation | Not Applicable | Page-level. |\n| 3.2.4 Consistent Identification | Supports | Controls are named the same way across instances. |\n| 3.3.3 Error Suggestion | Supports, with author responsibility | The string `validate` returns reaches the user verbatim. |\n| 3.3.4 Error Prevention (Legal, Financial, Data) | Not Applicable | No such transaction originates in the grid. |\n| 3.3.8 Accessible Authentication (Minimum) | Not Applicable | No authentication. |\n\n## Enterprise components\n\nRows above describe `<SvGrid>`. The Enterprise components add their own\nsurfaces:\n\n| Component | Status |\n| --- | --- |\n| `<SvSheet>` spreadsheet shell | axe in Chromium over 11 demos, light and dark; ribbon and sheet tabs use roving tabindex; dialogs take focus and return it (`tests/e2e/sheet-a11y.spec.ts`). |\n| Export menu, import dialog | `role=\"menu\"` with arrow keys and Escape; `role=\"dialog\"` with focus moved in and restored. |\n| Change review panel | Keyboard decisions (J / K, Enter, A, R), focus kept after a decision, axe-tested (`review/SvReviewPanel.dom.test.ts`). |\n| Grid board (`SvGridBoard`) | Cards and lanes move by keyboard (Space to grab, arrows, Escape) with a polite live region. Announcements are English only. |\n| Scheduler (`SvGridScheduler`) | Arrow keys move the focused event and select ranges; status messages use `role=\"status\"`. Gap: no keyboard resize of an event. |\n| Kanban (`SvBoard`), pivot designer | Gap: cards between lanes, and pivot fields between wells, move by drag only. The pivot designer adds fields by keyboard. |\n\n## Other gaps on record\n\nNot tied to a single criterion, and on the list for remediation:\n\n- Several accessible names are hard-coded English (\"Select row\", \"Select all\n rows\", \"Fill handle\", \"Resize row\", the find bar's buttons) instead of going\n through `localization.text`.\n- No browser test yet for RTL on the plain grid (the sheet has one).\n- No screen-reader pass recorded (see *Known limits*).\n\n## Revised Section 508\n\nSection 508 incorporates **WCAG 2.0 Level A and AA** by reference. Every WCAG\n2.0 criterion appears in the tables above with the same verdict.\n\n| Chapter | Conformance | Remarks |\n| --- | --- | --- |\n| 302 Functional Performance Criteria | Partially Supports | Operation without vision relies on the ARIA grid pattern (no recorded screen-reader pass); operation without fine motor control is limited by the drag-only actions under 2.1.1 and 2.5.7. |\n| 501-504 Software | See WCAG tables | The grid is web content inside a host application and exposes the platform accessibility API through ARIA. |\n| 602 Support Documentation | Supports | [Accessibility](../help/accessibility.md) documents roles, the keyboard map and how to verify a custom theme. |\n\n## EN 301 549\n\nEN 301 549 v3.2.1 incorporates **WCAG 2.1 Level A and AA** for web content\n(clause 9) and software (clause 11). Its criteria are a subset of the WCAG 2.2\ntables above and carry the same verdicts.\n\n## Reproducing these results\n\n```bash\npnpm --filter @svgrid/grid test:lib # jsdom axe, contrast, ARIA contract, announcements\nnpx playwright test tests/e2e/grid-a11y.spec.ts --project=chromium\n```\n\nBoth run in CI on every commit, so a regression in a \"Supports\" row fails the\nbuild.\n\n## See also\n\n- [Accessibility](../help/accessibility.md) - roles, keyboard map, how to verify a custom theme\n- [Compliance overview](./index.md) - the other procurement questions\n"
4440
+ "markdown": "# Accessibility Conformance Report (VPAT 2.5Rev, INT)\n\n**Product:** SvGrid (`@svgrid/grid`, `@svgrid/enterprise`)\n**Report version:** 2.0\n**Report date:** 2026-10-25\n**Standards:** WCAG 2.2 Level A and AA, Revised Section 508, EN 301 549 v3.2.1\n**Contact:** support@jqwidgets.com\n\nThis report follows the **VPAT 2.5Rev International edition**. Version 1.0\n(2026-08-24) covered WCAG 2.1. This version moves to WCAG 2.2, re-checks every\nrow against the code, and corrects four rows that version 1.0 overstated\n(2.1.1, 2.1.2, 2.4.3, 2.4.7). The defects behind 2.1.2 and 2.4.7 were fixed\nwhile this report was written; the rest are listed as gaps below.\n\n> **This is a self-assessment, not a third-party audit.** Every \"Supports\"\n> names the test or the code behind it. Where a criterion depends on your\n> content or your theme, the row says so.\n\n## What SvGrid is, for the purposes of this report\n\nSvGrid is a **software component** that renders a data grid inside a page you\ncontrol. Page-level criteria (page title, language of page, bypass blocks,\nconsistent navigation, consistent help) are **Not Applicable** to the\ncomponent; you remain responsible for them in the host page.\n\nSeveral criteria are **shared**: the grid supplies roles, names and keyboard\nbehaviour, and you supply cell content. A custom cell renderer that emits an\nimage without alt text fails 1.1.1 whatever the grid does. Those rows read\n*Supports, with author responsibility*.\n\n## Evaluation methods\n\n| Method | What it covers | Where it runs |\n| --- | --- | --- |\n| `axe-core` in jsdom | Roles, names, relationships, duplicate ids, nested interactive controls. Plain grid, filter row + global filter, row selection, pagination, an invalid cell, an open cell editor | `packages/grid/src/a11y.axe.test.ts`, every commit |\n| `axe-core` in Chromium | The same plus the layout rules jsdom cannot run (`color-contrast`, `target-size`), tags `wcag2a`, `wcag2aa`, `wcag21a`, `wcag21aa`, `wcag22aa`, on the quick-start demo in the default theme | `tests/e2e/grid-a11y.spec.ts`, every commit |\n| Keyboard and focus in Chromium | Tab leaves the grid at both ends; focus is visible when the keyboard brings it in; the forced-colors indicator | `tests/e2e/grid-a11y.spec.ts` |\n| WCAG contrast computation | Body, secondary, header, zebra, hover, selection and on-accent text at 4.5:1, and the accent at 3:1, for **all 20 built-in themes in light and dark** | `packages/grid/src/themes/contrast.test.ts` |\n| ARIA contract and announcement tests | Role and `aria-*` builders; the live-region messages on a mounted grid | `a11y.test.ts`, `a11y.contract.test.ts`, `a11y.announce.test.ts`, `a11y/*.test.ts` |\n| Code review | Each row below, re-read against the source on 2026-10-25 | This report |\n\n### Known limits of this evidence\n\n- **No scripted screen-reader pass (NVDA, JAWS, VoiceOver) has been\n recorded.** Rows that depend on assistive-technology behaviour rest on the\n ARIA implementation and the axe runs.\n- The browser axe run covers one configuration (the quick-start demo, default\n theme). The jsdom runs cover the others with virtualization off.\n- Only the built-in themes are contrast-tested. A custom theme is yours to\n verify; the method is in [accessibility](../help/accessibility.md).\n\n## WCAG 2.2 Level A\n\n| Criterion | Conformance | Remarks |\n| --- | --- | --- |\n| 1.1.1 Non-text Content | Supports, with author responsibility | Grid controls carry text or `aria-label`. Content you render in cells is yours. |\n| 1.2.1-1.2.3 Time-based Media | Not Applicable | No audio or video. |\n| 1.3.1 Info and Relationships | Partially Supports | Native `<table>` semantics plus `grid` / `treegrid`, `rowgroup`, `row`, `columnheader`, `gridcell`, `aria-rowcount`, `aria-colcount`, and absolute `aria-rowindex` / `aria-colindex` on body cells. Gaps: header rows carry no `aria-rowindex` and header cells no `aria-colindex` (matters under column virtualization); a cell range selection is shown visually but not exposed through `aria-selected`; grouped rows on a plain `grid` carry `aria-level`, which ARIA defines only for `treegrid`. |\n| 1.3.2 Meaningful Sequence | Supports | DOM order follows visual order, pinned columns included. |\n| 1.3.3 Sensory Characteristics | Supports | Sort state is exposed through `aria-sort`, not only by the icon. |\n| 1.4.1 Use of Color | Supports, with author responsibility | Sort, row selection and validation errors are carried by `aria-sort`, `aria-selected` and `aria-invalid` with the message, not by colour alone. Conditional formatting you configure is yours. |\n| 1.4.2 Audio Control | Not Applicable | No audio. |\n| 2.1.1 Keyboard | Partially Supports | Navigation, row selection, sorting, filtering, editing, undo, column and row resize (arrow keys on the focused handle) and tree / group expand all work from the keyboard. Gaps: managed row dragging (`rowDragManaged`) has no keyboard path; moving a column has one only through the tool panel's Move up / Move down; the column menu opens without taking focus and has no arrow-key navigation; a custom header renderer gets `role=\"button\"` with `tabindex=\"-1\"`. |\n| 2.1.2 No Keyboard Trap | Supports | Tab on the last cell and Shift+Tab on the first move focus off the grid (`tests/e2e/grid-a11y.spec.ts`). Before 2026-10-25 every Tab was consumed and no key left the grid. |\n| 2.1.4 Character Key Shortcuts | Supports | Typing a character starts editing only while focus is on the grid (the \"active only on focus\" exception). |\n| 2.2.1 Timing Adjustable | Not Applicable | No time limits. |\n| 2.2.2 Pause, Stop, Hide | Supports, with author responsibility | The grid starts no auto-updating content. A live feed you push into it is yours to make pausable. The cell flash stops under `prefers-reduced-motion`. |\n| 2.3.1 Three Flashes or Below Threshold | Supports | The cell flash is one fade per value change. |\n| 2.4.1 Bypass Blocks | Not Applicable | Page-level. |\n| 2.4.2 Page Titled | Not Applicable | Page-level. |\n| 2.4.3 Focus Order | Partially Supports | The grid is one tab stop, and Tab leaves it at either end. Gap: grid menus (column menu, context menu) do not return focus to the button that opened them when they close. |\n| 2.4.4 Link Purpose (In Context) | Supports, with author responsibility | Links in cells are yours. |\n| 2.5.1 Pointer Gestures | Supports | No multipoint or path-based gesture is required. |\n| 2.5.2 Pointer Cancellation | Supports | A pointer-down on a cell only moves the active cell and starts a selection; buttons, menus, sorting and editing act on click (the up event). |\n| 2.5.3 Label in Name | Supports | Accessible names of grid controls contain their visible text. |\n| 2.5.4 Motion Actuation | Not Applicable | No motion input. |\n| 3.1.1 Language of Page | Not Applicable | Page-level. |\n| 3.2.1 On Focus | Supports | Focus alone never changes context. |\n| 3.2.2 On Input | Supports | Filtering and editing update the grid in place. |\n| 3.2.6 Consistent Help | Not Applicable | Page-level. |\n| 3.3.1 Error Identification | Supports, with author responsibility | A cell failing its column's `validate` gets `aria-invalid=\"true\"`, and the message reaches assistive technology as text read with the cell. What counts as invalid is yours. |\n| 3.3.2 Labels or Instructions | Partially Supports | Cell editors are named after their column (`a11y.axe.test.ts`). Gap: the inline filter-row input has a placeholder and no label. |\n| 3.3.7 Redundant Entry | Not Applicable | The grid runs no multi-step process. |\n| 4.1.2 Name, Role, Value | Partially Supports | Grid structure, selection checkboxes (`aria-checked`, including `mixed`), sort buttons, expanders (`aria-expanded`) and editors expose name, role and state, and both axe runs pass. Gaps: range selection state (see 1.3.1) and custom header renderers (see 2.1.1). |\n| 4.1.3 Status Messages | Supports | Filter match counts, cleared filters and bulk selection changes go to a visually hidden `role=\"status\"` region (`a11y.announce.test.ts`). What the tree already carries (the active cell, `aria-sort`, one row's `aria-selected`) is not repeated there. |\n\nWCAG 2.2 removed 4.1.1 Parsing; it is not listed.\n\n## WCAG 2.2 Level AA\n\n| Criterion | Conformance | Remarks |\n| --- | --- | --- |\n| 1.2.4, 1.2.5 Captions, Audio Description | Not Applicable | No media. |\n| 1.3.4 Orientation | Supports | No orientation lock. |\n| 1.3.5 Identify Input Purpose | Not Applicable | The grid collects no personal data about the user. |\n| 1.4.3 Contrast (Minimum) | Supports for built-in themes; author responsibility for custom themes | All 20 presets pass 4.5:1 in light and dark (`contrast.test.ts`), and axe's `color-contrast` rule passes in Chromium on the default theme. |\n| 1.4.4 Resize Text | Supports | Sizes are CSS pixel tokens that scale with browser zoom. No automated 200% test yet. |\n| 1.4.5 Images of Text | Supports | None. |\n| 1.4.10 Reflow | Partially Supports | A table with many columns scrolls horizontally at 320 CSS px, which tabular data needs. The `responsive` prop and per-column `hideBelow` reduce the column set at narrow widths. |\n| 1.4.11 Non-text Contrast | Supports | The accent used for the focus ring and selection is tested at 3:1 against the background in every theme. Gridlines are decorative and not held to 3:1. |\n| 1.4.12 Text Spacing | Supports | Row height and padding are tokens; no automated text-spacing test yet. |\n| 1.4.13 Content on Hover or Focus | Supports | Tooltips and popovers close with Escape and stay while hovered. |\n| 2.4.5 Multiple Ways | Not Applicable | Page-level. |\n| 2.4.6 Headings and Labels | Supports | Column headers name their columns. |\n| 2.4.7 Focus Visible | Supports | The active cell has an accent ring, shown when the keyboard brings focus to the grid, and a system `Highlight` outline under forced colors (`grid-a11y.spec.ts`). Before 2026-10-25 a grid reached by Tab showed no indicator, and forced colors removed the ring. |\n| 2.4.11 Focus Not Obscured (Minimum) | Partially Supports | Moving the active cell scrolls it into view below the sticky header. Gap: horizontal scrolling does not allow for left-pinned columns, so a cell can end up under one. |\n| 2.5.7 Dragging Movements | Partially Supports | Range selection has Shift+click, the fill handle has double-click, column order has the tool panel buttons. Gaps: managed row dragging and column resize by pointer have no single-pointer alternative. |\n| 2.5.8 Target Size (Minimum) | Supports | axe's `target-size` rule passes in Chromium on the quick-start demo. Several controls are under 24 px (selection checkbox 16 px, tree toggle 14 px, header filter and menu buttons 22 px, resize handle 5 px) and pass on the spacing exception; a body-row checkbox's whole cell is also clickable. |\n| 3.1.2 Language of Parts | Not Applicable | Page-level. |\n| 3.2.3 Consistent Navigation | Not Applicable | Page-level. |\n| 3.2.4 Consistent Identification | Supports | Controls are named the same way across instances. |\n| 3.3.3 Error Suggestion | Supports, with author responsibility | The string `validate` returns reaches the user verbatim. |\n| 3.3.4 Error Prevention (Legal, Financial, Data) | Not Applicable | No such transaction originates in the grid. |\n| 3.3.8 Accessible Authentication (Minimum) | Not Applicable | No authentication. |\n\n## Enterprise components\n\nRows above describe `<SvGrid>`. The Enterprise components add their own\nsurfaces:\n\n| Component | Status |\n| --- | --- |\n| `<SvSheet>` spreadsheet shell | axe in Chromium over 11 demos, light and dark; ribbon and sheet tabs use roving tabindex; dialogs take focus and return it (`tests/e2e/sheet-a11y.spec.ts`). |\n| Export menu, import dialog | `role=\"menu\"` with arrow keys and Escape; `role=\"dialog\"` with focus moved in and restored. |\n| Change review panel | Keyboard decisions (J / K, Enter, A, R), focus kept after a decision, axe-tested (`review/SvReviewPanel.dom.test.ts`). |\n| Grid board (`SvGridBoard`) | Cards and lanes move by keyboard (Space to grab, arrows, Escape) with a polite live region. Announcements are English only. |\n| Scheduler (`SvGridScheduler`) | Arrow keys move the focused event and select ranges; status messages use `role=\"status\"`. Gap: no keyboard resize of an event. |\n| Kanban (`SvBoard`), pivot designer | Gap: cards between lanes, and pivot fields between wells, move by drag only. The pivot designer adds fields by keyboard. |\n\n## Other gaps on record\n\nNot tied to a single criterion, and on the list for remediation:\n\n- Several accessible names are hard-coded English (\"Select row\", \"Select all\n rows\", \"Fill handle\", \"Resize row\", the find bar's buttons) instead of going\n through `localization.text`.\n- No browser test yet for RTL on the plain grid (the sheet has one).\n- No screen-reader pass recorded (see *Known limits*).\n- PDF exports are not tagged PDF (PDF/UA): the renderer, pdfmake, writes no\n structure tree, so a screen reader reads a PDF table as loose text. Exports\n to XLSX and HTML keep the table structure; offer one of those where an\n accessible document is required.\n\n## Revised Section 508\n\nSection 508 incorporates **WCAG 2.0 Level A and AA** by reference. Every WCAG\n2.0 criterion appears in the tables above with the same verdict.\n\n| Chapter | Conformance | Remarks |\n| --- | --- | --- |\n| 302 Functional Performance Criteria | Partially Supports | Operation without vision relies on the ARIA grid pattern (no recorded screen-reader pass); operation without fine motor control is limited by the drag-only actions under 2.1.1 and 2.5.7. |\n| 501-504 Software | See WCAG tables | The grid is web content inside a host application and exposes the platform accessibility API through ARIA. |\n| 602 Support Documentation | Supports | [Accessibility](../help/accessibility.md) documents roles, the keyboard map and how to verify a custom theme. |\n\n## EN 301 549\n\nEN 301 549 v3.2.1 incorporates **WCAG 2.1 Level A and AA** for web content\n(clause 9) and software (clause 11). Its criteria are a subset of the WCAG 2.2\ntables above and carry the same verdicts.\n\n## Reproducing these results\n\n```bash\npnpm --filter @svgrid/grid test:lib # jsdom axe, contrast, ARIA contract, announcements\nnpx playwright test tests/e2e/grid-a11y.spec.ts --project=chromium\n```\n\nBoth run in CI on every commit, so a regression in a \"Supports\" row fails the\nbuild.\n\n## See also\n\n- [Accessibility](../help/accessibility.md) - roles, keyboard map, how to verify a custom theme\n- [Compliance overview](./index.md) - the other procurement questions\n"
4441
4441
  },
4442
4442
  {
4443
4443
  "slug": "enterprise/README",
@@ -5473,7 +5473,7 @@ export const docs = [
5473
5473
  "path": "docs/help/export.md",
5474
5474
  "title": "Data export and printing",
5475
5475
  "section": "Import & export",
5476
- "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![Pick a row scope, then serialize the grid to Excel, CSV, TSV, HTML, PDF, or Print.](/docs-media/grid-export.svg)\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 // 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\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) and a **subtotal row** summing the\nnumber / currency columns - matching the xlsx outline export. It's on by\ndefault (`autoGroup`); pass `groupBy` to override or `autoGroup: false` to get a\nflat table.\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"
5476
+ "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![Pick a row scope, then serialize the grid to Excel, CSV, TSV, HTML, PDF, or Print.](/docs-media/grid-export.svg)\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"
5477
5477
  },
5478
5478
  {
5479
5479
  "slug": "help/export/import-spreadsheet",
@@ -6082,7 +6082,7 @@ export const docs = [
6082
6082
  "path": "docs/help/security.md",
6083
6083
  "title": "Security & supply chain",
6084
6084
  "section": "Help",
6085
- "markdown": "# Security & supply chain\n\nSvGrid is built for shipping into regulated environments where every\ndependency, every runtime call, and every network egress has to be\njustified before procurement signs. This page is the answer to \"what\ndoes this package do, what does it depend on, and what would I tell\nour InfoSec team?\".\n\n![The SvGrid library renders and holds state inside the browser and opens no connection of its own - no fetch, no telemetry; only your app code crosses the boundary to the network to fetch rows and persist changes.](/docs-media/grid-security.svg)\n\n<div data-docs-demo=\"16-csp-compliant\" data-height=\"540\"></div>\n\n## TL;DR\n\n| Property | Status |\n| --------------------------------- | ---------------------------------------------------------------------- |\n| Network egress at runtime | **None.** Zero analytics, zero phone-home, no automatic update checks. |\n| Telemetry | **Zero.** No `fetch`, no `navigator.sendBeacon`, no console identifiers. |\n| `eval` / `new Function` / dynamic code | **None in `@svgrid/grid`.** See [CSP-compliant grid](https://svgrid.com/demos/16-csp-compliant/) demo + runtime self-check. |\n| Cookies / localStorage | None set by the library itself. (Your app's saved-views helpers may opt in.) |\n| Outbound dependencies | **Community:** one runtime dep, `esm-env` (MIT, no dependencies of its own). **Enterprise:** two optional peer deps (`jszip`, `pdfmake`), see below. |\n| AI calls | The user's own `AIProvider` adapter calls whichever endpoint *they* configured. The package never embeds a model client. |\n| License | Community: MIT. Enterprise: commercial (see [LICENSE](../../packages/enterprise/LICENSE)). |\n| npm provenance + signing | Published with `npm publish --provenance` from GitHub Actions; integrity hashes in the npm registry. |\n| Source | 100% open source. `pnpm patch` works; everything in this monorepo is the same code that ships to npm. |\n\n## Runtime dependencies\n\n`@svgrid/grid` has **one runtime dependency**, [`esm-env`](https://www.npmjs.com/package/esm-env)\n(MIT), which has no dependencies of its own and only reports the build's\nbrowser / dev / SSR conditions. Beyond that the user's build pulls in\n`svelte` itself (peer). Verify with `npm view @svgrid/grid dependencies`.\n\n`@svgrid/enterprise` adds two **optional** peer dependencies, both lazy-loaded\non first use:\n\n| Peer | When loaded | License | Why optional |\n| --------------- | -------------------------------------------- | -------------- | ---------------------------------------------------------------- |\n| `jszip` ^3.10 | `api.exportData({ format: 'xlsx' })` *or* `api.importData({ format: 'xlsx' })` | MIT | If you don't export/import Excel, you don't install this peer. |\n| `pdfmake` ^0.2 | `api.exportData({ format: 'pdf' })` | MIT | If you don't export to PDF, you don't install this peer. |\n\nNeither is bundled. Both are dynamically `import()`-ed at first call. If\nthe consumer hasn't installed the peer, the call throws a typed error\nnaming the missing module and the install command - the rest of the\nlibrary keeps working.\n\nOne piece of third-party code *is* bundled: `@svgrid/enterprise` ships the\nSmart UI export module (jQWidgets) as `dist/smart.export.js`, vendored\nunmodified. The SBOM lists it as a component with its version.\n\nCSV, TSV, HTML, JSON import/export, print, the AI assistant, and the\npivot helpers have **no extra peer dependencies** at all.\n\n## What the package does at runtime\n\nEvery observable side effect, mapped:\n\n| Surface | Side effect |\n| ------------------------------------ | -------------------------------------------------------------------------- |\n| `<SvGrid>` mount | Sets up `requestAnimationFrame`, `ResizeObserver`, and DOM event listeners on the grid container. |\n| Inline editing | Reads + writes `document` selection; commits via your `onCellValueChange`. |\n| Export to xlsx / pdf / csv / tsv / html | Creates a `Blob` and triggers a download via a synthetic `<a download>`. No network. CSV and TSV prefix formula-like text with `'` so a spreadsheet does not run it ([export](./export.md)). |\n| Import from xlsx / csv / tsv / json | Reads the user-provided `File` via `arrayBuffer()` / `text()`. No network. An .xlsx cell addressed outside the sheet (past column XFD) is rejected, and so is a sheet that would need more than ten million blank cells to lay out, so a crafted file cannot exhaust memory. |\n| Print | Opens a sandbox popup window with an isolated HTML document and calls its `print()`. |\n| AI helpers | Build a prompt locally and call the consumer-registered `AIProvider`. The grid itself never opens a connection. |\n| License key check | A 4-line string-prefix check against an in-memory revoked-key set. No network. |\n| Unlicensed watermark | Renders a small DOM badge linking to the pricing page. No network. |\n| Unlicensed upgrade prompt | On first unlicensed Enterprise feature call, appends a one-time DOM card linking to a trial. No network, no storage; one in-memory flag. |\n\n## CSP guidance\n\nThe community grid is CSP-friendly. A strict policy that works:\n\n```\ndefault-src 'self';\nscript-src 'self';\nstyle-src 'self' 'unsafe-inline';\nimg-src 'self' data:;\nconnect-src 'self';\n```\n\nNotes:\n\n- `'unsafe-inline'` on `style-src` is needed because Svelte 5 emits\n scoped style attributes inline. You can drop it if you switch to\n `unsafe-hashes` with a CSP nonce-aware build of Svelte.\n- `connect-src 'self'` is enough - the grid never opens a connection to\n a third-party origin.\n- `script-src` does NOT need `'unsafe-eval'` for community. (Enterprise pulls\n in `pdfmake` which historically used `eval`; check the pdfmake version\n if your CSP is strict.)\n- Demo [16. CSP-compliant grid](https://svgrid.com/demos/16-csp-compliant/) runs the grid under a CSP header and surfaces any violation in real time.\n\n## Source provenance\n\n- Source repository: `github.com/sv-grid/sv-grid` - all releases tagged.\n- Build pipeline: GitHub Actions. The release workflow signs and\n publishes to npm with `--provenance`. You can verify the signature\n via `npm audit signatures` (npm 9+) or by inspecting the\n package metadata on the registry.\n- No private patches. The code on npm is the code in the public\n monorepo at the tagged commit.\n\n## Vulnerability handling\n\n- Reports: open a draft security advisory on the GitHub repository, or\n email the address in\n [SECURITY.md](https://github.com/sv-grid/sv-grid/blob/main/SECURITY.md).\n [`/.well-known/security.txt`](https://svgrid.com/.well-known/security.txt)\n points to the same place.\n- Response SLA (paid customers): acknowledgement within one business\n day, advisory + patch within five business days for severity High +\n Critical.\n- Community: best-effort but every report is triaged.\n- Public advisories for Enterprise customers go out via the support Slack +\n email **before** the GitHub advisory page goes public.\n\n## SBOM\n\nWe publish a **CycloneDX 1.6** document per package in\n[`sbom/`](https://github.com/sv-grid/sv-grid/tree/main/sbom), covering runtime\nand peer dependencies to full declared depth, plus vendored code. Fetch the\none you need straight from the repo, or regenerate from a clone:\n\n```bash\npnpm sbom # write sbom/*.cdx.json\npnpm sbom:check # non-zero exit if they have drifted from the manifests\n```\n\nThe release workflow regenerates the SBOMs at the released versions and signs\nthem with a Sigstore build attestation, and the Test workflow runs\n`pnpm sbom:check` on every commit. To check that a copy is the one the\nrelease produced:\n\n```bash\ngh attestation verify sbom/svgrid-grid.cdx.json --repo sv-grid/sv-grid\n```\n\n`@svgrid/mcp` is the one package with a deeper graph (the MCP SDK, `zod`,\n`svelte`); its SBOM lists those top-level dependencies, not their own.\n\nIf your process prefers a scanner-produced document, or you want SPDX instead,\ngenerate one against your own installed tree:\n\n```bash\nnpx @cyclonedx/cdxgen -t npm -o sbom.json\n```\n\nFor Enterprise, the SBOM lists `jszip` and `pdfmake` as optional peers - flag\nto your scanner if you don't use those formats.\n\n## Data residency\n\nThe library processes data **in the browser**. Nothing leaves the user's\nmachine via the package itself.\n\nIf you wire `setAIProvider(fn)` to a remote endpoint, the prompt + row\nsample the helpers build (a column schema + at most ~25 sampled rows)\nis what goes through your adapter. The package gives you the prompt\nverbatim before sending - you decide whether to redact, route to an\non-prem model, or hash sensitive fields.\n\n## Audit-friendly defaults\n\n- **No global state** beyond a few module-scoped variables for the\n license + AI provider registration. No singletons that survive HMR.\n- **Pure-function helpers** for filtering / sorting / aggregation -\n every callable you import is testable in isolation (vitest suite\n proves this for 1000+ assertions).\n- **No prototype pollution surface.** Every helper uses\n `Object.create(null)` or own-property maps; no untyped object\n merging.\n- **No reflection-driven config.** Column definitions are plain\n objects; the grid never reads metadata via `eval` or `with`.\n\n## Frequently asked questions\n\n### Is SvGrid safe to use in a regulated or enterprise environment?\n\nYes. SvGrid is a client-side library: it makes no network calls of its own,\nsends no telemetry, and runs CSP-clean (no `eval`, no `new Function`, no inline\nscripts). All data stays in the browser, so it does not change your app's data\negress posture.\n\n### Does SvGrid send any telemetry or phone home?\n\nNo. There is zero outbound traffic from the library. Any network calls in your\napp are ones you write.\n\n### What is SvGrid's supply-chain footprint?\n\nThe Community core has a minimal dependency surface; Enterprise export/import features\nlazy-load their dependencies only when used. See this page for the full\ndependency and runtime-call accounting procurement asks for.\n\n## See also\n\n- [Browser support](./browser-support.md) - tested target matrix.\n- [Testing and quality](./testing-and-quality.md) - the test suite that\n underwrites this page's claims.\n- [API stability](./api-stability.md) - semver policy, deprecation\n lifecycle.\n"
6085
+ "markdown": "# Security & supply chain\n\nSvGrid is built for shipping into regulated environments where every\ndependency, every runtime call, and every network egress has to be\njustified before procurement signs. This page is the answer to \"what\ndoes this package do, what does it depend on, and what would I tell\nour InfoSec team?\".\n\n![The SvGrid library renders and holds state inside the browser and opens no connection of its own - no fetch, no telemetry; only your app code crosses the boundary to the network to fetch rows and persist changes.](/docs-media/grid-security.svg)\n\n<div data-docs-demo=\"16-csp-compliant\" data-height=\"540\"></div>\n\n## TL;DR\n\n| Property | Status |\n| --------------------------------- | ---------------------------------------------------------------------- |\n| Network egress at runtime | **None.** Zero analytics, zero phone-home, no automatic update checks. |\n| Telemetry | **Zero.** No `fetch`, no `navigator.sendBeacon`, no console identifiers. |\n| `eval` / `new Function` / dynamic code | **None in `@svgrid/grid`.** See [CSP-compliant grid](https://svgrid.com/demos/16-csp-compliant/) demo + runtime self-check. |\n| Cookies / localStorage | None set by the library itself. (Your app's saved-views helpers may opt in.) |\n| Outbound dependencies | **Community:** one runtime dep, `esm-env` (MIT, no dependencies of its own). **Enterprise:** two optional peer deps (`jszip`, `pdfmake`), see below. |\n| AI calls | The user's own `AIProvider` adapter calls whichever endpoint *they* configured. The package never embeds a model client. |\n| License | Community: MIT. Enterprise: commercial (see [LICENSE](../../packages/enterprise/LICENSE)). |\n| npm provenance + signing | Published with `npm publish --provenance` from GitHub Actions; integrity hashes in the npm registry. |\n| Source | 100% open source. `pnpm patch` works; everything in this monorepo is the same code that ships to npm. |\n\n## Runtime dependencies\n\n`@svgrid/grid` has **one runtime dependency**, [`esm-env`](https://www.npmjs.com/package/esm-env)\n(MIT), which has no dependencies of its own and only reports the build's\nbrowser / dev / SSR conditions. Beyond that the user's build pulls in\n`svelte` itself (peer). Verify with `npm view @svgrid/grid dependencies`.\n\n`@svgrid/enterprise` adds two **optional** peer dependencies, both lazy-loaded\non first use:\n\n| Peer | When loaded | License | Why optional |\n| --------------- | -------------------------------------------- | -------------- | ---------------------------------------------------------------- |\n| `jszip` ^3.10 | `api.exportData({ format: 'xlsx' })` *or* `api.importData({ format: 'xlsx' })` | MIT | If you don't export/import Excel, you don't install this peer. |\n| `pdfmake` ^0.2 | `api.exportData({ format: 'pdf' })` | MIT | If you don't export to PDF, you don't install this peer. |\n\nNeither is bundled. Both are dynamically `import()`-ed at first call. If\nthe consumer hasn't installed the peer, the call throws a typed error\nnaming the missing module and the install command - the rest of the\nlibrary keeps working.\n\nOne piece of third-party code *is* bundled: `@svgrid/enterprise` ships the\nSmart UI export module (jQWidgets) as `dist/smart.export.js`, vendored\nunmodified. The SBOM lists it as a component with its version.\n\nCSV, TSV, HTML, JSON import/export, print, the AI assistant, and the\npivot helpers have **no extra peer dependencies** at all.\n\n## What the package does at runtime\n\nEvery observable side effect, mapped:\n\n| Surface | Side effect |\n| ------------------------------------ | -------------------------------------------------------------------------- |\n| `<SvGrid>` mount | Sets up `requestAnimationFrame`, `ResizeObserver`, and DOM event listeners on the grid container. |\n| Inline editing | Reads + writes `document` selection; commits via your `onCellValueChange`. |\n| Export to xlsx / pdf / csv / tsv / html | Creates a `Blob` and triggers a download via a synthetic `<a download>`. No network. CSV and TSV prefix formula-like text with `'` so a spreadsheet does not run it ([export](./export.md)). |\n| Import from xlsx / csv / tsv / json | Reads the user-provided `File` via `arrayBuffer()` / `text()`. No network. An .xlsx cell addressed outside the sheet (past column XFD) is rejected, and so is a sheet that would need more than ten million blank cells to lay out. An .xlsx or .ods is unzipped as a stream and refused once its parts pass 256 MB together, so a zip bomb never lands in memory. A crafted file cannot exhaust memory either way. |\n| Print | Opens a sandbox popup window with an isolated HTML document and calls its `print()`. |\n| AI helpers | Build a prompt locally and call the consumer-registered `AIProvider`. The grid itself never opens a connection. |\n| License key check | A 4-line string-prefix check against an in-memory revoked-key set. No network. |\n| Unlicensed watermark | Renders a small DOM badge linking to the pricing page. No network. |\n| Unlicensed upgrade prompt | On first unlicensed Enterprise feature call, appends a one-time DOM card linking to a trial. No network, no storage; one in-memory flag. |\n\n## CSP guidance\n\nThe community grid is CSP-friendly. A strict policy that works:\n\n```\ndefault-src 'self';\nscript-src 'self';\nstyle-src 'self' 'unsafe-inline';\nimg-src 'self' data:;\nconnect-src 'self';\n```\n\nNotes:\n\n- `'unsafe-inline'` on `style-src` is needed because Svelte 5 emits\n scoped style attributes inline. You can drop it if you switch to\n `unsafe-hashes` with a CSP nonce-aware build of Svelte.\n- `connect-src 'self'` is enough - the grid never opens a connection to\n a third-party origin.\n- `script-src` does NOT need `'unsafe-eval'` for community. (Enterprise pulls\n in `pdfmake` which historically used `eval`; check the pdfmake version\n if your CSP is strict.)\n- Demo [16. CSP-compliant grid](https://svgrid.com/demos/16-csp-compliant/) runs the grid under a CSP header and surfaces any violation in real time.\n\n## Source provenance\n\n- Source repository: `github.com/sv-grid/sv-grid` - all releases tagged.\n- Build pipeline: GitHub Actions. The release workflow signs and\n publishes to npm with `--provenance`. You can verify the signature\n via `npm audit signatures` (npm 9+) or by inspecting the\n package metadata on the registry.\n- No private patches. The code on npm is the code in the public\n monorepo at the tagged commit.\n\n## Vulnerability handling\n\n- Reports: open a draft security advisory on the GitHub repository, or\n email the address in\n [SECURITY.md](https://github.com/sv-grid/sv-grid/blob/main/SECURITY.md).\n [`/.well-known/security.txt`](https://svgrid.com/.well-known/security.txt)\n points to the same place.\n- Response SLA (paid customers): acknowledgement within one business\n day, advisory + patch within five business days for severity High +\n Critical.\n- Community: best-effort but every report is triaged.\n- Public advisories for Enterprise customers go out via the support Slack +\n email **before** the GitHub advisory page goes public.\n\n## SBOM\n\nWe publish a **CycloneDX 1.6** document per package in\n[`sbom/`](https://github.com/sv-grid/sv-grid/tree/main/sbom), covering runtime\nand peer dependencies to full declared depth, plus vendored code. Fetch the\none you need straight from the repo, or regenerate from a clone:\n\n```bash\npnpm sbom # write sbom/*.cdx.json\npnpm sbom:check # non-zero exit if they have drifted from the manifests\n```\n\nThe release workflow regenerates the SBOMs at the released versions and signs\nthem with a Sigstore build attestation, and the Test workflow runs\n`pnpm sbom:check` on every commit. To check that a copy is the one the\nrelease produced:\n\n```bash\ngh attestation verify sbom/svgrid-grid.cdx.json --repo sv-grid/sv-grid\n```\n\n`@svgrid/mcp` is the one package with a deeper graph (the MCP SDK, `zod`,\n`svelte`); its SBOM lists those top-level dependencies, not their own.\n\nIf your process prefers a scanner-produced document, or you want SPDX instead,\ngenerate one against your own installed tree:\n\n```bash\nnpx @cyclonedx/cdxgen -t npm -o sbom.json\n```\n\nFor Enterprise, the SBOM lists `jszip` and `pdfmake` as optional peers - flag\nto your scanner if you don't use those formats.\n\n## Data residency\n\nThe library processes data **in the browser**. Nothing leaves the user's\nmachine via the package itself.\n\nIf you wire `setAIProvider(fn)` to a remote endpoint, the prompt + row\nsample the helpers build (a column schema + at most ~25 sampled rows)\nis what goes through your adapter. The package gives you the prompt\nverbatim before sending - you decide whether to redact, route to an\non-prem model, or hash sensitive fields.\n\n## Audit-friendly defaults\n\n- **No global state** beyond a few module-scoped variables for the\n license + AI provider registration. No singletons that survive HMR.\n- **Pure-function helpers** for filtering / sorting / aggregation -\n every callable you import is testable in isolation (vitest suite\n proves this for 1000+ assertions).\n- **No prototype pollution surface.** Every helper uses\n `Object.create(null)` or own-property maps; no untyped object\n merging.\n- **No reflection-driven config.** Column definitions are plain\n objects; the grid never reads metadata via `eval` or `with`.\n\n## Frequently asked questions\n\n### Is SvGrid safe to use in a regulated or enterprise environment?\n\nYes. SvGrid is a client-side library: it makes no network calls of its own,\nsends no telemetry, and runs CSP-clean (no `eval`, no `new Function`, no inline\nscripts). All data stays in the browser, so it does not change your app's data\negress posture.\n\n### Does SvGrid send any telemetry or phone home?\n\nNo. There is zero outbound traffic from the library. Any network calls in your\napp are ones you write.\n\n### What is SvGrid's supply-chain footprint?\n\nThe Community core has a minimal dependency surface; Enterprise export/import features\nlazy-load their dependencies only when used. See this page for the full\ndependency and runtime-call accounting procurement asks for.\n\n## See also\n\n- [Browser support](./browser-support.md) - tested target matrix.\n- [Testing and quality](./testing-and-quality.md) - the test suite that\n underwrites this page's claims.\n- [API stability](./api-stability.md) - semver policy, deprecation\n lifecycle.\n"
6086
6086
  },
6087
6087
  {
6088
6088
  "slug": "help/server-side-data",
@@ -8456,7 +8456,7 @@ export const apiReference = {
8456
8456
  };
8457
8457
  export const apiSurface = {
8458
8458
  "gridVersion": "3.0.23",
8459
- "enterpriseVersion": "3.1.26",
8459
+ "enterpriseVersion": "3.1.27",
8460
8460
  "grid": {
8461
8461
  "values": [
8462
8462
  "ALL_FILTER_OPERATORS",
@@ -9776,6 +9776,7 @@ export const apiSurface = {
9776
9776
  "buildDisplayRows",
9777
9777
  "buildEntitySchema",
9778
9778
  "buildInitialValues",
9779
+ "buildPdfDocData",
9779
9780
  "buildPdfDocDefinition",
9780
9781
  "buildPivotResultColumns",
9781
9782
  "buildResourceRows",
@@ -9997,6 +9998,7 @@ export const apiSurface = {
9997
9998
  "heatCells",
9998
9999
  "heatPeak",
9999
10000
  "hiddenRowsFor",
10001
+ "hydratePdfDoc",
10000
10002
  "iconIndex",
10001
10003
  "imageCall",
10002
10004
  "importData",
@@ -10150,6 +10152,7 @@ export const apiSurface = {
10150
10152
  "redactConnectionString",
10151
10153
  "reduceValue",
10152
10154
  "referenceSpans",
10155
+ "registerPdfFont",
10153
10156
  "registerPdfFonts",
10154
10157
  "registerPredicateKind",
10155
10158
  "relativeDateOperators",
@@ -10577,11 +10580,15 @@ export const apiSurface = {
10577
10580
  "PasteWhat",
10578
10581
  "PdfChart",
10579
10582
  "PdfChartImage",
10583
+ "PdfDocData",
10584
+ "PdfDocParams",
10580
10585
  "PdfExportOptions",
10586
+ "PdfFont",
10581
10587
  "PdfKpi",
10582
10588
  "PdfMakeLike",
10583
10589
  "PdfPageSize",
10584
10590
  "PdfVirtualFileSystem",
10591
+ "PdfWorkerLike",
10585
10592
  "PerSheetState",
10586
10593
  "PivotAggregator",
10587
10594
  "PivotAggregatorId",
@@ -10803,6 +10810,7 @@ export const apiSurface = {
10803
10810
  "@svgrid/enterprise/gantt",
10804
10811
  "@svgrid/enterprise/import",
10805
10812
  "@svgrid/enterprise/license",
10813
+ "@svgrid/enterprise/pdf-worker",
10806
10814
  "@svgrid/enterprise/pivot",
10807
10815
  "@svgrid/enterprise/print",
10808
10816
  "@svgrid/enterprise/review",
package/dist/index.js CHANGED
@@ -18,9 +18,9 @@
18
18
  * npx @svgrid/mcp
19
19
  */
20
20
  import { createRequire } from 'node:module';
21
- import { Server } from '@modelcontextprotocol/sdk/server/index.js';
22
- import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
23
- import { CallToolRequestSchema, GetPromptRequestSchema, ListPromptsRequestSchema, ListResourcesRequestSchema, ListToolsRequestSchema, ReadResourceRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
21
+ // Our own stdio transport, not @modelcontextprotocol/sdk: the SDK's HTTP and
22
+ // OAuth dependencies were most of a cold npx install (see stdio-server.ts).
23
+ import { StdioMcpServer } from './stdio-server.js';
24
24
  import { CORE_TOOLS, PREVIEW_TOOL } from './tool-defs.js';
25
25
  import { PROMPTS, getPrompt } from './prompts.js';
26
26
  import { installedGrid, versionNote } from './installed.js';
@@ -101,7 +101,7 @@ const pkgVersion = (() => {
101
101
  return '0.0.0';
102
102
  }
103
103
  })();
104
- const server = new Server({ name: '@svgrid/mcp', version: pkgVersion }, {
104
+ const server = new StdioMcpServer({ name: '@svgrid/mcp', version: pkgVersion }, {
105
105
  // Tools alone was half the protocol. The corpus is a natural fit for
106
106
  // resources (the user attaches a doc, no tool call needed) and the common
107
107
  // tasks are a natural fit for prompts.
@@ -152,7 +152,7 @@ async function listedTools() {
152
152
  tools.push(...studioTools.STUDIO_TOOLS);
153
153
  return tools;
154
154
  }
155
- server.setRequestHandler(ListToolsRequestSchema, async () => {
155
+ server.setRequestHandler('tools/list', async () => {
156
156
  const tools = await listedTools();
157
157
  // Warm the corpus once this reply is on the wire, so its first load overlaps
158
158
  // the model choosing a tool rather than the first call.
@@ -160,8 +160,8 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
160
160
  return { tools };
161
161
  });
162
162
  // ---- resources ------------------------------------------------------------
163
- server.setRequestHandler(ListResourcesRequestSchema, async (req) => (await corpus()).resources.listResources(req.params?.cursor));
164
- server.setRequestHandler(ReadResourceRequestSchema, async (req) => {
163
+ server.setRequestHandler('resources/list', async (req) => (await corpus()).resources.listResources(req.params?.cursor));
164
+ server.setRequestHandler('resources/read', async (req) => {
165
165
  const { preview, resources } = await corpus();
166
166
  const found = preview.readPreviewResource(req.params.uri) ?? resources.readResource(req.params.uri);
167
167
  if (!found)
@@ -169,8 +169,8 @@ server.setRequestHandler(ReadResourceRequestSchema, async (req) => {
169
169
  return found;
170
170
  });
171
171
  // ---- prompts --------------------------------------------------------------
172
- server.setRequestHandler(ListPromptsRequestSchema, async () => ({ prompts: PROMPTS }));
173
- server.setRequestHandler(GetPromptRequestSchema, async (req) => {
172
+ server.setRequestHandler('prompts/list', async () => ({ prompts: PROMPTS }));
173
+ server.setRequestHandler('prompts/get', async (req) => {
174
174
  const found = getPrompt(req.params.name, (req.params.arguments ?? {}));
175
175
  if (!found)
176
176
  throw new Error(`No SvGrid prompt named "${req.params.name}".`);
@@ -284,8 +284,11 @@ const LEGACY_TARGET = {
284
284
  get_doc: 'svgrid_get',
285
285
  get_api_reference: 'svgrid_get',
286
286
  };
287
- server.setRequestHandler(CallToolRequestSchema, async (req) => {
287
+ server.setRequestHandler('tools/call', async (req) => {
288
288
  const { name, arguments: rawArgs } = req.params;
289
+ // As the SDK answered it: a call that names no tool is invalid params.
290
+ if (typeof name !== 'string')
291
+ throw Object.assign(new Error('Invalid params: tools/call needs a tool name'), { code: -32602 });
289
292
  const args = (rawArgs ?? {});
290
293
  const [{ core: coreTools, preview }] = await Promise.all([corpus(), loadStudio()]);
291
294
  // Retrieval tools, old names mapped onto the new ones.
@@ -346,13 +349,12 @@ server.setRequestHandler(CallToolRequestSchema, async (req) => {
346
349
  };
347
350
  });
348
351
  async function main() {
349
- // Connect and nothing else: `initialize` is answered by the SDK and needs
350
- // neither the corpus nor enterprise. They load on the first request that
352
+ // Connect and nothing else: `initialize` is answered by the transport and
353
+ // needs neither the corpus nor enterprise. They load on the first request that
351
354
  // does (normally tools/list). Loading them eagerly after connect did not
352
355
  // help: the first read of the 12 MB corpus held the event loop for seconds,
353
356
  // and the initialize reply waited behind it.
354
- const transport = new StdioServerTransport();
355
- await server.connect(transport);
357
+ server.connect();
356
358
  process.stderr.write(`@svgrid/mcp ${pkgVersion} on stdio\n`);
357
359
  }
358
360
  /** The fuller banner, once the corpus is in, naming both grid versions. */
package/dist/preview.d.ts CHANGED
@@ -8,7 +8,7 @@ export declare const UI_MIME_TYPE = "text/html;profile=mcp-app";
8
8
  * start failing in a way nobody is watching for. `tools/mcp-tools.test.ts` checks these
9
9
  * against the workspace so they cannot quietly rot either.
10
10
  */
11
- export declare const PREVIEW_GRID_WC_VERSION = "3.0.33";
11
+ export declare const PREVIEW_GRID_WC_VERSION = "3.0.34";
12
12
  export declare function previewResource(): {
13
13
  uri: string;
14
14
  name: string;
package/dist/preview.js CHANGED
@@ -27,7 +27,7 @@ export const UI_MIME_TYPE = 'text/html;profile=mcp-app';
27
27
  * start failing in a way nobody is watching for. `tools/mcp-tools.test.ts` checks these
28
28
  * against the workspace so they cannot quietly rot either.
29
29
  */
30
- export const PREVIEW_GRID_WC_VERSION = '3.0.33';
30
+ export const PREVIEW_GRID_WC_VERSION = '3.0.34';
31
31
  const EXT_APPS_VERSION = '1.7.5';
32
32
  const CDN = 'https://cdn.jsdelivr.net/npm';
33
33
  /**
@@ -0,0 +1,60 @@
1
+ /**
2
+ * The MCP stdio transport this server needs, in place of
3
+ * @modelcontextprotocol/sdk.
4
+ *
5
+ * The SDK carries HTTP transports and OAuth (Express, Hono, JOSE, AJV and
6
+ * their dependencies), none of which a stdio server runs, and a cold
7
+ * `npx -y @svgrid/mcp` spent its time installing them: 111 packages, 23 to 38
8
+ * seconds to the `initialize` reply against a client's 30 second connect
9
+ * timeout, with the server itself starting in 0.3 s.
10
+ *
11
+ * What MCP over stdio is: JSON-RPC 2.0, one message per line on stdin and
12
+ * stdout. This answers `initialize` the way the SDK does (the client's
13
+ * protocol version when it is one of SUPPORTED_PROTOCOL_VERSIONS, else the
14
+ * latest), answers `ping`, and hands every other request to the handler
15
+ * registered for its method. Unknown methods get -32601 and a handler that
16
+ * throws gets -32603 with its message, as from the SDK. Notifications need no
17
+ * reply: `notifications/initialized` and `notifications/cancelled` are
18
+ * accepted and nothing else is sent. Requests run concurrently, as the SDK
19
+ * runs them, so a slow first tools/call does not hold up a ping.
20
+ */
21
+ import type { Readable, Writable } from 'node:stream';
22
+ export declare const LATEST_PROTOCOL_VERSION = "2025-11-25";
23
+ export declare const SUPPORTED_PROTOCOL_VERSIONS: string[];
24
+ export declare const ErrorCode: {
25
+ readonly ParseError: -32700;
26
+ readonly InvalidRequest: -32600;
27
+ readonly MethodNotFound: -32601;
28
+ readonly InvalidParams: -32602;
29
+ readonly InternalError: -32603;
30
+ };
31
+ /** A request as a handler receives it, the same shape the SDK passed. */
32
+ export type McpRequest = {
33
+ method: string;
34
+ params: Record<string, any>;
35
+ };
36
+ type Handler = (request: McpRequest) => unknown | Promise<unknown>;
37
+ export declare class StdioMcpServer {
38
+ private readonly serverInfo;
39
+ private readonly options;
40
+ private readonly handlers;
41
+ constructor(serverInfo: {
42
+ name: string;
43
+ version: string;
44
+ }, options: {
45
+ capabilities: Record<string, unknown>;
46
+ instructions?: string;
47
+ });
48
+ setRequestHandler(method: string, handler: Handler): void;
49
+ /**
50
+ * The reply to one message, or null when none is owed (a notification).
51
+ * Exported for tests; connect() feeds it each line.
52
+ */
53
+ handle(message: unknown): Promise<object | null>;
54
+ /** Read requests from `input`, one per line, and write the replies to `output`. */
55
+ connect(input?: Readable, output?: Writable): void;
56
+ private initialize;
57
+ private result;
58
+ private error;
59
+ }
60
+ export {};
@@ -0,0 +1,95 @@
1
+ export const LATEST_PROTOCOL_VERSION = '2025-11-25';
2
+ export const SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, '2025-06-18', '2025-03-26', '2024-11-05', '2024-10-07'];
3
+ export const ErrorCode = {
4
+ ParseError: -32700,
5
+ InvalidRequest: -32600,
6
+ MethodNotFound: -32601,
7
+ InvalidParams: -32602,
8
+ InternalError: -32603,
9
+ };
10
+ export class StdioMcpServer {
11
+ serverInfo;
12
+ options;
13
+ handlers = new Map();
14
+ constructor(serverInfo, options) {
15
+ this.serverInfo = serverInfo;
16
+ this.options = options;
17
+ }
18
+ setRequestHandler(method, handler) {
19
+ this.handlers.set(method, handler);
20
+ }
21
+ /**
22
+ * The reply to one message, or null when none is owed (a notification).
23
+ * Exported for tests; connect() feeds it each line.
24
+ */
25
+ async handle(message) {
26
+ const m = (message ?? {});
27
+ const isRequest = m.id !== undefined && m.id !== null;
28
+ if (typeof m.method !== 'string') {
29
+ return isRequest ? this.error(m.id, ErrorCode.InvalidRequest, 'Invalid request: no method') : null;
30
+ }
31
+ // A notification never gets a reply, whatever it is.
32
+ if (!isRequest)
33
+ return null;
34
+ const params = m.params && typeof m.params === 'object' ? m.params : {};
35
+ try {
36
+ if (m.method === 'initialize')
37
+ return this.result(m.id, this.initialize(params));
38
+ if (m.method === 'ping')
39
+ return this.result(m.id, {});
40
+ const handler = this.handlers.get(m.method);
41
+ if (!handler)
42
+ return this.error(m.id, ErrorCode.MethodNotFound, `Method not found: ${m.method}`);
43
+ return this.result(m.id, (await handler({ method: m.method, params })) ?? {});
44
+ }
45
+ catch (err) {
46
+ const e = err;
47
+ const code = Number.isSafeInteger(e?.code) ? e.code : ErrorCode.InternalError;
48
+ return this.error(m.id, code, e?.message ?? String(err), e?.data);
49
+ }
50
+ }
51
+ /** Read requests from `input`, one per line, and write the replies to `output`. */
52
+ connect(input = process.stdin, output = process.stdout) {
53
+ let buffer = '';
54
+ const send = (reply) => {
55
+ if (reply)
56
+ output.write(JSON.stringify(reply) + '\n');
57
+ };
58
+ input.setEncoding('utf8');
59
+ input.on('data', (chunk) => {
60
+ buffer += chunk;
61
+ let nl;
62
+ while ((nl = buffer.indexOf('\n')) !== -1) {
63
+ const line = buffer.slice(0, nl).replace(/\r$/, '');
64
+ buffer = buffer.slice(nl + 1);
65
+ if (!line.trim())
66
+ continue;
67
+ let message;
68
+ try {
69
+ message = JSON.parse(line);
70
+ }
71
+ catch {
72
+ send(this.error(null, ErrorCode.ParseError, 'Parse error: a line was not JSON'));
73
+ continue;
74
+ }
75
+ // Not awaited: each request answers when it is ready.
76
+ void this.handle(message).then(send, (err) => process.stderr.write(`@svgrid/mcp: ${String(err)}\n`));
77
+ }
78
+ });
79
+ }
80
+ initialize(params) {
81
+ const requested = params.protocolVersion;
82
+ return {
83
+ protocolVersion: SUPPORTED_PROTOCOL_VERSIONS.includes(requested) ? requested : LATEST_PROTOCOL_VERSION,
84
+ capabilities: this.options.capabilities,
85
+ serverInfo: this.serverInfo,
86
+ ...(this.options.instructions ? { instructions: this.options.instructions } : {}),
87
+ };
88
+ }
89
+ result(id, result) {
90
+ return { jsonrpc: '2.0', id, result };
91
+ }
92
+ error(id, code, message, data) {
93
+ return { jsonrpc: '2.0', id, error: { code, message, ...(data !== undefined ? { data } : {}) } };
94
+ }
95
+ }
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "commercial",
6
6
  "url": "https://svgrid.com/pricing"
7
7
  },
8
- "version": "3.0.32",
8
+ "version": "3.0.33",
9
9
  "description": "Model Context Protocol server for SvGrid, the Svelte 5 data grid: checks the code your AI writes against the real API surface, plus version-pinned docs, API reference and 373 demo sources.",
10
10
  "license": "MIT",
11
11
  "author": "jQWidgets <sales@jqwidgets.com>",
@@ -30,12 +30,10 @@
30
30
  "access": "public"
31
31
  },
32
32
  "dependencies": {
33
- "@modelcontextprotocol/sdk": "^1.0.4",
34
- "svelte": "^5.55.5",
35
- "zod": "^3.23.8"
33
+ "svelte": "^5.55.5"
36
34
  },
37
35
  "peerDependencies": {
38
- "@svgrid/enterprise": "^3.1.26"
36
+ "@svgrid/enterprise": "^3.1.27"
39
37
  },
40
38
  "peerDependenciesMeta": {
41
39
  "@svgrid/enterprise": {
@@ -45,7 +43,7 @@
45
43
  "devDependencies": {
46
44
  "@types/node": "^22.10.7",
47
45
  "typescript": "6.0.3",
48
- "@svgrid/enterprise": "^3.1.26"
46
+ "@svgrid/enterprise": "^3.1.27"
49
47
  },
50
48
  "engines": {
51
49
  "node": ">=18"
package/server.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "com.svgrid/svgrid",
4
4
  "title": "SvGrid",
5
5
  "description": "Checks AI-written SvGrid code against the real API, plus version-pinned Svelte 5 grid docs.",
6
- "version": "3.0.32",
6
+ "version": "3.0.33",
7
7
  "websiteUrl": "https://svgrid.com/docs/help/mcp-server/",
8
8
  "repository": {
9
9
  "url": "https://github.com/sv-grid/sv-grid",
@@ -15,7 +15,7 @@
15
15
  "registryType": "npm",
16
16
  "registryBaseUrl": "https://registry.npmjs.org",
17
17
  "identifier": "@svgrid/mcp",
18
- "version": "3.0.32",
18
+ "version": "3.0.33",
19
19
  "runtimeHint": "npx",
20
20
  "transport": {
21
21
  "type": "stdio"