Lattice Grid Buy a licence

api reference

Type reference

Every interface the library declares, with the type of each member, generated from the declarations so it always matches the release.

API reference › Type reference

Type reference

Every interface the library declares, with the type of each member. The sections above describe how the grid is used; this one is the complete surface, generated from the type declarations so that it always matches the release.

AiApi

MemberTypeDescription
schema(opts?: { maxColumns?: number; maxRows?: number }): Record<string, unknown>A machine-readable description of the grid, for a model's context.
tool(opts?: { maxColumns?: number; maxRows?: number }): Record<string, unknown>The same schema as a tool definition.
prompt(opts?: Record<string, unknown>): stringThe prompt describing this grid (its columns, types and operators) for sending to a model. It carries no row values. It does not take the user's question: compose that yourself alongside the text this returns, which is what `ask` receives as `schemaText`.
buildPrompt(text: string, opts?: Record<string, unknown>): string
plan(reply: string | Record<string, unknown>, opts?: Record<string, unknown>): Record<string, unknown>Parse what the model returned into a plan.
apply(plan: Record<string, unknown>): Record<string, unknown>Run a plan as one undoable step.

AnnotationApi

The presenter's drawing layer. Pixels over the grid, it never reads or writes data, and it is inert until a tool is chosen, so scrolling and selection pass straight through. Marks are held in content coordinates, so they stay with the cells they annotate when the grid scrolls, and are cleared when a presentation ends.

MemberTypeDescription
tool'pen' | 'arrow' | 'rect' | 'highlight' | null(read-only)
countnumber(read-only)
use(tool: 'pen' | 'arrow' | 'rect' | 'highlight' | null, opts?: { colour?: string }): string | null
undo(): number
clear(): void
redraw(): void

BooleanFormat

MemberTypeDescription
type'boolean'
display'checkbox' | 'switch' | 'text' | 'icon'(optional)
trueLabelstring(optional)
falseLabelstring(optional)
nullLabelstring(optional)
trueIconstring(optional)
falseIconstring(optional)

CapabilityInterval

An interval for a capability index, by Bissell's approximation.

MemberTypeDescription
indexnumber
lowernumber
uppernumber
marginnumber
nnumber
confidencenumber

CaptureOptions

Rendering the grid to a still image. `scale` multiplies the pixel dimensions : 2 for a retina still, 3 or 4 for a slide. `background` fills behind the grid so a PNG dropped into a deck does not show it through.

MemberTypeDescription
scalenumber(optional)
backgroundstring(optional)
downloadboolean(optional)
fileNamestring(optional)

CellMenuParams

What a cell-menu builder and a host item's `action` are handed.

MemberTypeDescription
keystring
colIdstring
valueunknown
rowRowThe row wrapper.
dataunknownYour original row object.
columnResolvedColumn
indexnumber
gridGrid

CellParams

MemberTypeDescription
textstring
indexnumber
propsRecord<string, unknown>(optional)

CellRange

MemberTypeDescription
startRownumber
endRownumber
columnsstring[]

ChangeResult

MemberTypeDescription
addedRow[]
updatedRow[]
removedstring[]
rejectedRejectedRow[]Rows that could not be applied. A batch of a thousand containing three bad ones applies the other 997 and lists the three here. (optional)

Chart

A live chart.

MemberTypeDescription
elementSVGElement(read-only)
draw(): voidRedraw now.
update(spec: Partial<ChartSpec>): voidChange the spec and redraw; unnamed keys keep their values.
data(): object | nullThe data the chart last bound.
ascend(levels?: number): voidGo up one level, on a drillable hierarchy.
on(event: ChartEventName, handler: (payload: unknown) => void): () => void
emit(event: ChartEventName, payload?: unknown): void
toSVG(opts?: object): string
toPNG(opts?: { scale?: number; background?: string }): Promise<Blob>
toCSV(): string
destroy(): void

ChartLabels

Data labels beside each mark.

MemberTypeDescription
position'outside' | 'inside' | 'auto'(optional)
formatstring | ((value: unknown, point?: unknown) => string)A format mask, or a function of the value. (optional)
minGapnumberPixels two labels must leave between them before both are kept. (optional)

ChartMeasure

A measure a chart reduces, when the chart is not given a bare `y`.

MemberTypeDescription
colstring
fnTotalNameA reduction name, as the totals row uses. (optional)
type'bar' | 'line' | 'area'The mark this measure draws with, on a combo chart. (optional)
axis'left' | 'right'Which axis it belongs to, on a combo chart. (optional)
titlestring(optional)

ChartSpec

What a chart draws and how. `grid` and `container` are required; everything else describes the chart. A chart reads the grid's *filtered* rows, so it follows the grid without being told to.

MemberTypeDescription
gridGrid
containerElement | string
typeChartType
xstringThe category column. (optional)
ystringThe measure column, for the types that take one. (optional)
seriesstringSplits the measure into one series per distinct value. (optional)
measuresChartMeasure[]Several measures at once, for combo and candlestick. (optional)
sourcestringEndpoints, for sankey, chord and network. (optional)
targetstring(optional)
labelstringRow label and dates, for gantt. (optional)
startstring(optional)
endstring(optional)
titlestring(optional)
schemestring | string[]A named scheme, or an array of colours. (optional)
legendboolean | { position?: 'top' | 'bottom' | 'left' | 'right'; isolate?: boolean }(optional)
labelsboolean | ChartLabels(optional)
axisobject(optional)
fontobject(optional)
marginnumber | { top?: number; right?: number; bottom?: number; left?: number }(optional)
fitboolean | 'line'A least-squares line through a scatter or bubble chart, one per series. `true` draws the line and its R²; `'line'` draws the line alone. Only where the x axis is numeric: on a band scale the positions are categories in an arbitrary order, and a slope through them would be a slope through the order they happened to be listed in. (optional)
errorboolean | { of?: string; confidence?: number }Whiskers showing the uncertainty in each mark. `true` computes a confidence interval from the readings behind the mark; `of` takes a symmetric margin from another column instead. (optional)
reference{ value: number; label?: string }[](optional)
bucketsnumberBins for a histogram; the default is twelve. (optional)
divergingbooleanA diverging colour ramp, for heatmap and geomap. (optional)
shapesunknownCountry outlines, for a geomap drawing countries rather than continents. (optional)
codePropertystring(optional)
multiplesstringOne chart per distinct value of this column. (optional)
canvasboolean | numberDraw to canvas past this many points. (optional)
downsamplenumber(optional)
emptyTextstring(optional)
subtitlestringA second line under the title. (optional)
footnotestringA note under the plot, a source, a caveat, a unit. (optional)
tooltipboolean`false` turns the hover tooltip off. (optional)
selectionbooleanDraw the grid's selected rows emphasised, and follow the selection. (optional)
drillbooleanClicking a group drills into it. (optional)
filterOnClickbooleanClicking a mark filters the grid to it. (optional)
stackbooleanStack the series rather than drawing them side by side. (optional)
curvebooleanOverlay a kernel density curve on a histogram. (optional)
measurestringAn alias for `y`, where "the measure" reads better than "the y axis". (optional)
sizestringBubble charts: the column driving the radius, and the largest it may be. (optional)
maxRadiusnumber(optional)
minnumberFix the measure axis rather than taking it from the data. (optional)
maxnumber(optional)
codestringA geomap's ISO code column. An alias for `x`. (optional)
columnsstring[]Correlogram: which columns to correlate, how, and whether to print them. (optional)
method'pearson' | 'spearman' | 'kendall'(optional)
valuesboolean(optional)
iterationsnumberNetwork layouts: how many relaxation passes to run. (optional)
spec{ lower?: number; upper?: number; target?: number }Control and capability charts: a tolerance overriding the column's own `spec`, how many leading readings fix the control limits, which rule set the violations are judged against, and the level for the capability interval. (optional)
baselinenumber(optional)
rules'westernElectric' | 'nelson'(optional)
confidencenumber(optional)

Chunk

MemberTypeDescription
rowsunknown[]
progress{ loaded: number; estimated?: number }(optional)
doneboolean(optional)

ClipboardOptions

MemberTypeDescription
headersboolean(optional)
rows'visible' | 'all' | 'selected' | 'range'(optional)

Column

MemberTypeDescription
tagsstring | string[]Free-form labels for grouping columns together. A bare string is accepted for a single tag. Used by the column tag bar to show and hide sets of columns: tag sixty monthly columns with their year, and a user can switch to one year. (optional)
idstringThe column's own identity. Defaults to `field`; needed explicitly when two columns read the same field, as a value and its running total do. (optional)
fieldstringThe property to read from each row. Dotted paths reach into nested data. (optional)
titlestringThe heading. Defaults to a readable form of `field`. (optional)
typeTypeName | falseThe data type, which decides parsing, formatting, sorting, the default editor and the default filter together. `false` turns inference off and treats the values as opaque. (optional)
presetstring | string[]Named column presets to merge in first, so a house style is declared once. (optional)
formatFormatSpec | stringHow a value is rendered as text. A string is a shorthand mask. (optional)
lookupLookupSpecDisplay a stored code as a label, and edit it as a list. (optional)
valueColumnValueSpecA computed value, with the columns it depends on, in place of a stored one. (optional)
cellColumnCellSpec | stringThe renderer, and what it is given. A string names a registered renderer. (optional)
editColumnEditSpec | boolean | stringWhether and how the cell can be edited. A string names an editor. (optional)
sortColumnSortSpec | booleanWhether the column sorts, and by what comparison. `false` refuses it. (optional)
filterColumnFilterSpec | boolean | FilterNameWhether the column filters, and with which filter. A string names one. (optional)
group{ enabled?: boolean; index?: number; explode?: boolean } | booleanRow grouping by this column. `index` fixes its place among several; `explode` gives a multi-value cell one group per value rather than one group for the combination. (optional)
pivot{ enabled?: boolean; index?: number } | booleanUse this column as a pivot dimension, and where it sits among several. (optional)
totalTotalName | TotalFnThe reduction shown in the totals row and in group footers. (optional)
shadowShadowKind | {A value the grid maintains about this column's own history, rather than a field in the data. `{of: 'price', kind: 'delta'}`, or the bare kind to shadow the column it sits beside. (optional)
running'total' | 'percent' | 'delta'A running total down the grid **as it is currently ordered**. The one derived value that depends on the display order: sort differently and every value changes. That is why it is not a shadow kind: every shadow reads the same however the rows are arranged. (optional)
spec{ lower?: number; upper?: number; target?: number }The customer's tolerance, for process capability and control charts. Declared here rather than passed to each call so the capability figures, a control chart and any rule marking an out-of-tolerance cell cannot disagree about what the tolerance is. (optional)
layoutColumnLayoutSpec | numberWidth, pinning and flex. A bare number is the width in pixels. (optional)
headerColumnHeaderSpec | stringThe header cell: its text, tooltip, menu and any header chart. (optional)
exportColumnExportSpecHow the column leaves the grid, where that differs from how it is shown. (optional)
allowGroupbooleanWhether the user may group by this column from the interface. (optional)
allowPivotbooleanWhether the user may pivot on it. (optional)
allowTotalbooleanWhether the user may put a total on it. (optional)
nullablebooleanWhether an empty value is a legitimate value rather than a gap. (optional)

ColumnCellSpec

MemberTypeDescription
decorationDecorationName | DecorationSpec(optional)
variantVariantSpec(optional)
templatestring(optional)
renderstring | RenderFn | RendererCtor(optional)
propsRecord<string, unknown>(optional)
css(p: CellParams) => CellStyle(optional)
classstring | string[] | ((p: CellParams) => string | string[])(optional)
classWhenRecord<string, string | ((p: CellParams) => boolean)>(optional)
styleCellStyle | ((p: CellParams) => CellStyle)(optional)
tooltipstring | ((p: CellParams) => string)(optional)
alignAlign(optional)
wrapboolean(optional)
autoHeightboolean(optional)
flashboolean(optional)
spanColumns(p: SpanParams) => number(optional)
spanRows(p: SpanParams) => number(optional)

ColumnDistribution

MemberTypeDescription
nnumber
minnumber
maxnumber
meannumber
stddevnumber
mediannumber
q1number
q3number
iqrnumber
sortednumber[]

ColumnEditSpec

MemberTypeDescription
enabledboolean | ((p: CellParams) => boolean)(optional)
editorstring | EditorCtor(optional)
propsRecord<string, unknown>(optional)
popupboolean(optional)
validate(p: ValidateParams) => true | string(optional)

ColumnExportSpec

MemberTypeDescription
lookup'label' | 'value' | 'columns'(optional)
csvboolean(optional)
excelboolean(optional)

ColumnFacetConfig

Per-column histogram settings, layered over the grid's.

MemberTypeDescription
enabledboolean(optional)
bucketsnumber(optional)
strategy'equal' | 'quantile' | 'log'(optional)
granularity'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'(optional)
order'count' | 'alpha'(optional)
cardinalityLimitnumber(optional)
aboveLimit'suppress' | 'topN'(optional)
bucketFn(handle: unknown, indices: Uint32Array | null, count: number) => FacetBoundsReplace the built-in bucketing entirely. (optional)
format(bucket: FacetBucket, count: number, unfiltered: number) => stringLabel a bucket for its tooltip and accessible name. (optional)

ColumnFilterSpec

MemberTypeDescription
enabledboolean(optional)
typeFilterName | FilterCtor(optional)
propsRecord<string, unknown>(optional)

ColumnGroup

MemberTypeDescription
idstring(optional)
titlestring
columns(Column | ColumnGroup)[]
collapsibleboolean(optional)
openByDefaultboolean(optional)
showWhen'open' | 'closed' | 'always'(optional)
marryChildrenboolean(optional)
header{ render?: string | RendererCtor; props?: Record<string, unknown>; class?: string | string[] }(optional)
facetColumnFacetConfig | booleanThis column's histogram. `true` turns it on with the grid's settings. (optional)

ColumnHeaderSpec

MemberTypeDescription
templatestring(optional)
renderstring | RendererCtor(optional)
propsRecord<string, unknown>(optional)
classstring | string[](optional)
tooltipstring(optional)
alignAlign(optional)

ColumnLayoutSpec

MemberTypeDescription
widthnumber | stringA pixel width, or a percentage of the grid's inner width as a string, `'25%'`. A percentage is a share of the *whole* grid. `flex` divides only the space left over after fixed columns, so the two are not interchangeable: `flex: 25` on four columns is a quarter of the remainder, which is a quarter of the grid only when nothing else is fixed. (optional)
minnumber(optional)
maxnumber(optional)
flexnumber(optional)
pin'start' | 'end' | null(optional)
hiddenboolean(optional)
resizableboolean(optional)
movableboolean(optional)
lockVisibleboolean(optional)
lockPositionboolean | 'start' | 'end'(optional)

ColumnMenuParams

What a column menu's item builder and its actions are handed.

MemberTypeDescription
colIdstring
columnResolvedColumnThe resolved column, including any properties you defined on it.
gridGrid

ColumnProfile

MemberTypeDescription
columnstring
rowsnumber
presentnumber
missingnumber
distinctnumber
minnumber | null
maxnumber | null
meannumber | null
mediannumber | null
q1number | null
q3number | null
iqrnumber | null
stddevnumber | null
outliersnumber
histogramHistogramBin[]

ColumnsApi

MemberTypeDescription
setTotal(id: string, fn: TotalName | TotalFn | null): voidSet or clear a column's totals-row reduction.
distinct(id: string): unknown[]Every distinct value in a column, from the dictionary where there is one.
get(id: string): ResolvedColumn | undefined
all(): ResolvedColumn[]
visible(): ResolvedColumn[]
state(): ColumnState[]
apply(state: ColumnState[]): void
tags(): string[]Every distinct column tag, in the order first declared.
showTagged(tags?: string | string[] | null): string[]Show only the columns carrying one of these tags. **Columns with no tags are never hidden.** Pass nothing to show every tagged column again. Returns the ids that were hidden.
activeTags(): string[]The tags currently being shown, empty when all are.
show(ids: string | string[]): void
hide(ids: string | string[]): void
move(id: string, to: number): void
pin(id: string, side: 'start' | 'end' | null): void
resize(id: string, px: number): void
autoSize(ids?: string | string[]): void
fit(): void
group(ids: string | string[]): void
pivot(ids: string | string[]): void
totals(ids: string | string[]): void

ColumnSortSpec

MemberTypeDescription
enabledboolean(optional)
direction'asc' | 'desc' | null(optional)
ordernumber(optional)
nullsFirstboolean(optional)

ColumnState

MemberTypeDescription
idstring
widthnumber(optional)
flexnumber(optional)
hiddenboolean(optional)
pin'start' | 'end' | null(optional)
sort'asc' | 'desc' | null(optional)
sortIndexnumber | null(optional)
groupIndexnumber | null(optional)
pivotIndexnumber | null(optional)
totalTotalName | null(optional)

ColumnValueSpec

MemberTypeDescription
compute(deps: DepValues, ctx: ValueContext) => unknown(optional)
depsstring[] | '*'(optional)
pureboolean(optional)
format(p: FormatParams) => string(optional)
apply(p: ApplyParams) => boolean(optional)
parse(p: ParseParams) => unknown(optional)
key(p: KeyParams) => string(optional)
compareComparator(optional)
quickFilterText(p: ValueParams) => string(optional)

Comment

One comment in a thread, as the provider returns it.

MemberTypeDescription
idstring
bodystring
author{ name?: string; avatarUrl?: string; initials?: string }Rendered as supplied. The grid does not know who the user is. (optional)
atnumber(optional)
editedboolean(optional)
resolvedboolean(optional)
parentIdstring | null(optional)
valueunknownThe cell's value when this was written, so a later reader is told it moved. (optional)
can{ edit?: boolean; delete?: boolean; resolve?: boolean }What the current user may do. Absent means the grid shows every affordance and relies on the provider to refuse. Hiding a button is a convenience, never a security control. (optional)

CommentConfig

MemberTypeDescription
providerCommentProviderWithout one the feature is inert and no error is raised. (optional)
debouncenumberMilliseconds a viewport change waits before the index is fetched. (optional)
indexLimitnumberCell descriptors held before the oldest are dropped. (optional)
mode'anchored' | 'docked'`'anchored'` floats beside the cell; `'docked'` uses a side panel. (optional)
markdownbooleanRestricted markdown in bodies: emphasis, code and links only. (optional)
rowLabel(row: Row) => stringLabel for the row, so the panel says what is being commented on. (optional)

CommentDescriptor

Counts for one cell. Never bodies: this is consulted on every repaint.

MemberTypeDescription
countnumber
unresolvednumber
updatednumber

CommentIndexEntry

What `loadIndex` returns per commented cell.

MemberTypeDescription
cellKeystring(optional)
rowIdstring(optional)
fieldstring(optional)

CommentProvider

Storage for comments. Every method returns a promise; a rejection surfaces in the panel without disturbing grid state.

MemberTypeDescription
loadIndex(rowIds: string[], fields: string[]): Promise<CommentIndexEntry[]>
loadThread(cellKey: string): Promise<Comment[]>
addComment(cellKey: string, body: string, parentId: string | null,
editComment(commentId: string, body: string): Promise<Comment>
deleteComment(commentId: string): Promise<void>
resolveThread(cellKey: string): Promise<void>
unresolveThread(cellKey: string): Promise<void>

CommentsApi

MemberTypeDescription
enabledboolean(read-only)
openKeystring | null(read-only)
threadComment[] | null(read-only)
loadingboolean(read-only)
completeboolean(read-only)
unavailable(): string | null`'no-provider'`, `'no-row-identity'`, or null when available.
at(rowId: string, colId: string): CommentDescriptor | null
request(rowIds: string[], fields?: string[]): void
open(rowId: string, colId: string): Promise<Comment[] | null>
close(opts?: { reason?: string }): void
add(body: string, opts?: { parentId?: string; author?: object }): Promise<Comment | null>
edit(commentId: string, body: string): Promise<Comment | null>
remove(commentId: string): Promise<boolean>
resolve(): Promise<boolean>
unresolve(): Promise<boolean>
refresh(): void
loadAll(): Promise<boolean>
hiddenUnresolved(): number
filterToCommented(opts?: { unresolvedOnly?: boolean }): boolean

Condition

MemberTypeDescription
colstring
typeTypeName(optional)
opOperator
valueunknown(optional)
bounds'[]' | '[)' | '(]' | '()'(optional)
caseSensitiveboolean(optional)
metaRecord<string, unknown>(optional)

ConfidenceInterval

An interval for an estimated figure, at a stated level.

MemberTypeDescription
meannumber
lowernumber
uppernumber
marginnumber
nnumber
confidencenumberThe level the bounds were computed at, 0 to 1.

CrossFilter

MemberTypeDescription
enabled(): booleanWhether this grid can cross-filter a source.
column(): string | nullThe source column the filter is pushed onto.
get(): string[]The keys currently filtering the source.
set(keys: string | string[] | null): voidFilter the source to these derived rows.
toggle(key: string): voidAdd or remove one key, for click-to-filter.
clear(): voidTake this grid's filter off its source.

CsvExportOptions

MemberTypeDescription
delimiterstring(optional)
quotestring(optional)
lineEndingstring(optional)
headersboolean(optional)
columnsstring[](optional)
rows'visible' | 'all' | 'selected'(optional)
fileNamestring(optional)
processCell(p: CellParams) => string(optional)
downloadboolean(optional)

DataType

MemberTypeDescription
base'text' | 'number' | 'boolean' | 'date' | 'dateString' | 'object'
extendsTypeName(optional)
matches(value: unknown) => boolean(optional)
format(p: FormatParams) => string(optional)
parse(p: ParseParams) => unknown(optional)
compareComparator(optional)
defaults{(optional)
storage'float64' | 'int32' | 'bitset' | 'dictionary' | 'object'(optional)
totals{Which aggregates are meaningful for this type, and how. Omit it and every aggregate is allowed, which is what every type that shipped before this does. (optional)
excelstring(optional)
toClipboard(v: unknown) => string(optional)
fromClipboard(s: string) => unknown(optional)

DateFormat

MemberTypeDescription
type'date'
patternstring(optional)
dateStyle'short' | 'medium' | 'long' | 'full'(optional)
timeStyle'short' | 'medium' | 'long'(optional)
timeZonestring(optional)
relativeboolean | { threshold?: number }(optional)
nullDisplaystring(optional)
localestring(optional)

DecorationSpec

MemberTypeDescription
typeDecorationName
size'sm' | 'md' | 'lg'(optional)
shape'pill' | 'rounded' | 'square'(optional)
outlineboolean(optional)
edgeboolean(optional)
position'start' | 'end'(optional)
namestring | Record<string, string>(optional)
minnumber(optional)
maxnumber(optional)
originnumber(optional)
showValueboolean(optional)
trackboolean(optional)
rampstring(optional)
midpointnumber(optional)

DerivedJoin

MemberTypeDescription
withGridThe grid holding the other side.
onstring | { left?: string; right?: string }The shared key: one field name when both sides use it, or one each.
type'inner' | 'left'`inner` keeps only rows that matched; `left` keeps them all. (optional)
selectstring[]Which of the partner's fields to bring across. All of them by default. (optional)
prefixstringRename the brought-across fields, when both sides have one worth keeping. (optional)
follow'all' | 'filtered'Which of the partner's rows to read. `all` by default. (optional)

DerivedSelect

One reduced column of a derived grid.

MemberTypeDescription
ofstringThe column to reduce, as a field name or a dotted path. Omit for `count`. (optional)
fnTotalNameA key of `TOTAL_FNS`: `sum`, `avg`, `median`, `p95`, `distinct` and the rest. (optional)

DerivedSourceConfig

A grid whose rows are derived from another grid: aggregated, unnested, filtered, ranked or profiled. Read-only: write to the source instead.

MemberTypeDescription
mode'derived'
fromGridThe grid to read.
follow'filtered' | 'all' | 'selected' | 'grouped'Which of its rows to read. `filtered` by default. (optional)
unneststringAn array property to expand, one row per element, before anything else. (optional)
joinDerivedJoinMatch each row against a second grid on a shared key, and bring some of its fields across. Runs after `unnest` and before `where`, so a condition: and a grouping, and a total: can read a field the join produced. (optional)
where(row: unknown) => booleanA row predicate, applied before grouping. (optional)
bucket{ of: string; by: 'day' | 'week' | 'month' | 'quarter' | 'year' }Round a date column down to a period, and group on that. (optional)
groupBystring | string[]The dimension, or dimensions, to group by. Omit to pass rows through. (optional)
selectRecord<string, DerivedSelect>The reduced columns, by output id. (optional)
sort{ col: string; dir?: 'asc' | 'desc' }[]How to order the derived rows before limiting them. (optional)
limitnumberKeep at most this many rows. (optional)
limitPerstringApply `limit` within each distinct value of this column, not overall. (optional)
cumulative{ of: string; upTo: number }Keep rows until their running share of the total reaches `upTo`, 0 to 1. (optional)
profilestring | string[]One row per column, with the statistics as columns. Replaces the pipeline. (optional)
orient'columns' | 'metrics'With `profile`, emit one row per statistic instead of one per column. (optional)
refresh'live' | 'idle' | 'manual' | numberWhen to re-derive. `idle` by default: coalesced to a frame. (optional)
crossFilterboolean | string | { col?: string }Let this grid filter the grid it derives from. `true` cross-filters through whatever it groups by; a string names a different source column. (optional)

DetailApi

MemberTypeDescription
enabled(): boolean
isMaster(target: string | Row): boolean
isOpen(key: string): boolean
open(key: string): void
close(key: string): void
toggle(key: string): boolean
closeAll(): void
keys(): string[]
active(): string | null
placement(): 'inline' | 'target' | null
config(): DetailConfig | null

DetailConfig

MemberTypeDescription
enabledboolean(optional)
renderstring | RendererCtor(optional)
configGridConfig(optional)
rows(row: Row) => unknown[] | Promise<unknown[]>(optional)
heightnumber | 'auto' | ((row: Row) => number)(optional)
cacheLimitnumber(optional)
isMaster(data: unknown, row: Row) => boolean(optional)
targetstring | HTMLElementRender the detail into this element instead of into a row beneath its master. A selector or an element. Exactly one detail is open at a time in this placement. (optional)
onCreate(grid: Grid, masterRow: Row) => voidHanded the nested grid as it is created, for whatever the forwarded events do not cover. (optional)
pathstringThe property of the master's record the detail rows live on, so an edit in the detail is reported as a path on the master: `ports.1.vlan`. Inferred by identity when `rows(row)` returns an array already on the record, which is the usual shape; set this when it does not. (optional)

DiagnosticsApi

MemberTypeDescription
snapshot(): Record<string, unknown>
renders(): Record<string, unknown>`dom.cellWrites` is the figure a DOM-write assertion reads.
store(): Record<string, unknown>
operations(): Record<string, unknown>
providers(): Record<string, unknown>
events(): Record<string, number>
config(): { effective: Record<string, unknown>; supplied: string[]; defaulted: string[] }
warnings(): DiagnosticWarning[]
dismiss(id: string): void
bundle(): Record<string, unknown>Contains no row data, cell values or column values.
checkOptions(options: unknown): boolean
record(kind: string, detail: { rows?: number; ms?: number; worker?: boolean }): void
render(cause: string, phases?: Record<string, number>): void
recordEvents(on: boolean, limit?: number): voidOff by default; recording times every emit.
eventLog(): Array<{ type: string; origin: string; listeners: number
clearEventLog(): void
mark(): Record<string, unknown>Keep current store statistics so growth can be measured against them.
since(): Record<string, unknown> | null
reset(): void

DiagnosticWarning

One thing the grid has flagged as probably a mistake.

MemberTypeDescription
idstringStable identifier, nameable in a support conversation.
messagestring
valuesRecord<string, unknown>The specific values involved, so the warning is actionable.
countnumber
firstnumber
lastnumber
source'check' | 'reported' | 'info'`'check'` raised by a diagnostic check, `'reported'` from `warnOnce`.

DiffApi

MemberTypeDescription
swap(): booleanExchange the baseline and the current rows. Returns false with nothing to swap.
enabledboolean(read-only)
setSnapshot(rows: unknown[] | null): voidSet the baseline every row is compared against.
clear(): void
summary(): { added: number; removed: number; changed: number; unchanged: number }
statusOf(key: string): 'added' | 'removed' | 'changed' | 'unchanged'
cellStatus(key: string, colId: string): 'changed' | 'unchanged'
isChanged(key: string, colId?: string): boolean
changedColumns(key: string): string[]
before(key: string, colId: string): unknownThe value a cell held in the baseline.
beforeRow(key: string): unknown
removedKeys(): string[]
removedRows(): unknown[]
report(): Record<string, unknown>

EditApi

MemberTypeDescription
start(key: string, colId: string): boolean
stop(cancel?: boolean): void
undo(): void
redo(): void
setCells(writes: { key: string; colId: string; value: unknown }[], type?: 'cell' | 'fill' | 'paste'): number
pasteInto(anchor: { key: string; colId: string }, text: string, extent?: { rows?: number; columns?: number }): number
settle(id: string, ok: boolean, reason?: string): boolean
pending(): OpenWrite[]
status(key: string, colId: string): 'pending' | null

EditConfig

MemberTypeDescription
enabledboolean(optional)
mode'cell' | 'row'(optional)
start'single' | 'double' | 'key'(optional)
enterMovesDownboolean(optional)
undoDepthnumber(optional)
commit(write: PendingWrite) => unknown(optional)
confirm'auto' | 'manual'(optional)
pendingTimeoutnumber(optional)

Editor

MemberTypeDescription
init(p: EditorParams): void
element(): HTMLElement
value(): unknown
attached(): void(optional)
cancelBeforeStart(): boolean(optional)
cancelOnClose(): boolean(optional)
popupboolean(optional)
destroy(): void(optional)

EditorParams

MemberTypeDescription
stop(cancel?: boolean): void
keystring(optional)
charPressstring(optional)

ExcelExportOptions

MemberTypeDescription
sheetNamestring(optional)
freezePanesboolean(optional)
variantFillsboolean(optional)
onProgress(p: { written: number; total: number }) => void(optional)

ExportApi

MemberTypeDescription
rangeText(opts?: object): stringThe selected range as tab-separated text, the shape a spreadsheet pastes.
csv(opts?: CsvExportOptions): string | Promise<Blob>
excel(opts?: ExcelExportOptions): Promise<Blob>
clipboard(opts?: ClipboardOptions): Promise<void>
print(): void

FacetBounds

Where a column's buckets are, and how they were chosen.

MemberTypeDescription
kind'numeric' | 'date' | 'category' | 'boolean' | 'none'
bucketsFacetBucket[]
suppressed'type' | 'cardinality' | 'rows' | 'streaming' | 'no-provider' | 'disabled'Set when no histogram was drawn, naming why. (optional)
cardinalitynumberDistinct values, on categorical columns. (optional)
granularity'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'The time unit chosen, on date columns. (optional)
strategy'equal' | 'quantile' | 'log'The numeric strategy actually applied, which may differ from the request. (optional)
minnumber(optional)
maxnumber(optional)

FacetBucket

One bucket of a column's distribution.

MemberTypeDescription
fromnumberLower edge, for ordered columns. Half-open `[from, to)` except the last. (optional)
tonumberUpper edge, for ordered columns. Inclusive on the last bucket only. (optional)
valueunknownThe value, for categorical and boolean columns. (optional)
nullbooleanTrue on the terminal bucket holding nulls, NaN and empty values. (optional)
remainderbooleanTrue on the aggregated tail bucket under `aboveLimit: 'topN'`. (optional)
labelstringA ready-made label, where one is more useful than the raw value. (optional)

FacetConfig

Grid-level histogram settings.

MemberTypeDescription
enabledbooleanOff unless asked for: header space is tight and this doubles its height. (optional)
collapsedbooleanStart as a one-line density strip that opens on hover or click. (optional)
heightnumberBand height in pixels. (optional)
rowCeilingnumberRows above which histograms are suppressed. (optional)
debouncenumberMilliseconds a filter change waits before charts recount. (optional)
whilePausedbooleanWhether a paused stream re-enables histograms. Defaults to true. (optional)
provider(request: {Bucket counts for a source the client cannot compute over. (optional)

FacetsApi

MemberTypeDescription
get(colId: string): FacetState | null
suppression(colId: string): string | null
config(colId?: string): FacetConfig
refresh(opts?: { immediate?: boolean }): void
isExpanded(colId: string): boolean
toggle(colId: string, open?: boolean): boolean
select(colId: string, from: number, to?: number,
clear(colId: string): boolean
selected(colId: string): number[]
expanded(): string[]

FacetState

A column's computed distribution.

MemberTypeDescription
boundsFacetBounds | null
countsUint32Array | nullCounts under every filter except this column's own. Aligned to `buckets`.
unfilteredUint32Array | nullCounts with no filter applied, for the "40 of 200" reading.
stalebooleanTrue while a recount is outstanding; draw the previous counts faded.
suppressedstring | null

Filter

MemberTypeDescription
init(p: FilterParams): void
active(): boolean
passes(p: { row: Row; data: unknown }): boolean
get(): unknown
set(state: unknown): void
element(): HTMLElement
onRowsChanged(): void(optional)

FilterGroup

MemberTypeDescription
op'and' | 'or' | 'not'
conditionsFilterSet[]

FilterParams

MemberTypeDescription
columnColumn
colIdstring
gridGrid
contextunknown
propsRecord<string, unknown>(optional)
changed(): void

FiltersApi

MemberTypeDescription
quickState(): { text: string; mode: string }The quick filter's text and match mode, for restoring a control.
get(): FilterSet
set(filters: FilterSet): void
clear(): void
quick(text: string): void

FormattingApi

MemberTypeDescription
list(scope?: FormattingScope): FormattingRule[]
all(): Record<FormattingScope, FormattingRule[]>
scopes(): FormattingScope[]
add(scope: FormattingScope, rule: FormattingRule, opts?: { at?: number }): FormattingRule | null
remove(scope: FormattingScope, which: string | number): boolean
update(scope: FormattingScope, which: string | number, patch: FormattingRule): FormattingRule | null
move(scope: FormattingScope, which: string | number, to: number): boolean
set(scope: FormattingScope, rules: FormattingRule[]): FormattingRule[]
replaceAll(rules: Record<FormattingScope, FormattingRule[]>): void
clear(scope?: FormattingScope): void
styleFor(colId: string, value: unknown): CellStyle | null
restat(): voidRe-derive the thresholds of distribution rules from the data as it stands.
distribution(colId: string): ColumnDistribution | nullThe five numbers a distribution rule resolves against for one column.

FormattingCondition

MemberTypeDescription
opOperator | DistributionOpA filter operator compared against `value`, or a distribution operator whose threshold comes from the column itself: `{op: 'topPercent', value: 10}`, `{op: 'outlier'}`. Distribution thresholds are pinned when the rules compile; `grid.formatting.restat()` moves them.
valueunknown(optional)
value2unknown(optional)

FormattingRule

One rule. Either a condition and the styling it produces, or a colour scale. A rule held as runtime state must be JSON, so `style` may not be a function there: config-time `cell.style` still accepts one.

MemberTypeDescription
idstring(optional)
whenFormattingCondition(optional)
styleCellStyle | ((p: CellParams) => CellStyle | null)(optional)
scaleFormattingScale(optional)
stopIfTrueboolean(optional)
enabledboolean(optional)
iconstring(optional)
barboolean(optional)
labelstring(optional)

FormattingScale

MemberTypeDescription
from'minmax' | 'quantile' | 'stddev'Where the bounds come from when `min` and `max` are not given. `'minmax'` spans the data, `'quantile'` spans `low` to `high` (5th to 95th percentile by default), `'stddev'` spans `deviations` either side of the mean. (optional)
minnumber(optional)
maxnumber(optional)
midnumber(optional)
lownumber(optional)
highnumber(optional)
deviationsnumber(optional)
coloursstring[](optional)

FullWidthParams

What `fullWidth.render` is handed.

MemberTypeDescription
rowRow
dataunknownYour original row object.
indexnumberDisplay index of the row.
gridGrid
elementHTMLElementThe element to fill. Write into it directly, or return content instead.

Grid

MemberTypeDescription
rowsRowsApiThe data: reading it, changing it, walking it. (read-only)
columnsColumnsApiThe columns: order, width, visibility, grouping and pivoting. (read-only)
selectionSelectionApiWhat is selected, and the range the user has marked. (read-only)
filtersFiltersApiThe filter tree, however it was set. (read-only)
sortSortApiThe sort, in priority order. (read-only)
editEditApiEditing sessions: starting, committing and cancelling them. (read-only)
scrollScrollApiWhere the viewport is, and moving it. (read-only)
exportExportApiCSV, Excel and clipboard. (read-only)
stateStateApiEverything the user arranged, as a serialisable object. (read-only)
overlayOverlayApiThe loading, empty and error surfaces drawn over the grid. (read-only)
historyHistoryApiUndo and redo over edits and structural changes. (read-only)
viewsViewsApiSaved arrangements the user can switch between. (read-only)
diffDiffApiWhat changed against a baseline, cell by cell. (read-only)
permissionsPermissionsApiWho may see, edit and export what. (read-only)
aiAiApiA machine-readable description of the grid, for a model to read. (read-only)
messagesMessagesApiTranslation: the catalogue and the active locale. (read-only)
licenceLicenceApiLicence state, and setting a key after construction. (read-only)
paginationPaginationApiPages, where the grid is paged rather than scrolled. (read-only)
highlightHighlightApiTransient emphasis on a row, column or cell. (read-only)
redactionRedactionApiValues hidden from view and from export. (read-only)
capture(opts?: CaptureOptions): Promise<Blob>An image of the grid as drawn, where the module is installed. (optional)
annotateAnnotationApiDrawing over the grid, where the module is installed. (optional)
presentationPresentationApiFull screen, scaling and chrome suppression. (read-only)
updatesUpdatesApiThe live feed: pausing it, flushing it, and what it has done. (read-only)
timelineTimelineApiReplaying the changes the grid has seen. (read-only)
crossFilterCrossFilterCross-filtering, a derived grid filtering the grid it derives from. (read-only)
facetsFacetsApiHeader distributions, and the filters clicking one creates. (read-only)
detailDetailApiThe expandable panel beneath a row. (read-only)
commentsCommentsApiThreads attached to rows and cells. (read-only)
presencePresenceApiWho else is looking, and where. (read-only)
diagnosticsDiagnosticsApiWhat the grid is doing, for when it is doing it slowly. (read-only)
statisticsStatisticsApiReductions, profiles, correlations, capability and intervals. (read-only)
formattingFormattingApiFormatting a value as the grid would, outside a cell. (read-only)
maximiseMaximiseApiFull-screen control, where it is enabled. (read-only, optional)
elementHTMLElement | nullThe element you passed to `createGrid`, not the grid's own root. The grid builds its `.lattice` root *inside* that element, so `el.closest('.lattice')` never matches this, and a theme attribute set on it has no effect, the theme is read from the root within. Use `element.querySelector('.lattice')` for the grid's own root. (read-only)
destroyedbooleanWhether `destroy` has run. Every other member is inert afterwards. (read-only)
readybooleanFalse until the first render has been laid out. (read-only)
config(): GridConfigThe resolved configuration, as one object.
setAll(values: Partial<GridConfig>): voidApply several configuration changes as one update rather than several.
on(event: EventName, handler: EventHandler): UnsubscribeListen. Returns the function that stops listening.
once(event: EventName, handler: EventHandler): UnsubscribeListen until it fires once.
off(event: EventName, handler: EventHandler): voidStop listening.
emit(event: string, payload?: Record<string, unknown>): voidRaise an event of your own on the grid's bus.
setPinnedRows(rows: unknown[], opts?: { edge?: 'top' | 'bottom' }): voidPin rows above or below the scrolling body. The rows render through the ordinary column pipeline but are not part of the data: not counted, sorted, filtered, grouped, selectable or exported. Pass a new array rather than mutating the one you passed before: array identity is how the grid knows the pinned rows have changed.
getPinnedRows(opts?: { edge?: 'top' | 'bottom' }): unknown[]The objects currently pinned at one edge, as a copy.
formRowFormApiThe row form. Declines when `rowForm` is not configured. (read-only)
getVersion(): stringThe library version.
destroy(): voidRelease everything: listeners, timers, workers and the DOM the grid made.

GridConfig

MemberTypeDescription
columns(Column | ColumnGroup)[]The columns, in order. A group nests columns under one heading. (optional)
columnGroupsColumnGroup[]Header groups declared separately from the columns they contain. (optional)
rowsunknown[]The data, for a memory grid. Use `source` for anything fetched. (optional)
rowKeystring | ((row: unknown) => string)What identifies a row. Everything that survives a refresh (selection, expansion, and edits in flight) is keyed on it, so it must be stable and unique. A derived grid defaults to its own derived key. (optional)
sourceSourceConfigWhere rows come from: memory, paged, remote, stream or derived. (optional)
columnDefaultsColumnApplied to every column before its own settings. (optional)
columnPresetsRecord<string, Column>Named bundles of column settings, referenced by a column's `preset`. (optional)
dataTypesRecord<string, DataType>Your own data types, alongside the built-in catalogue. (optional)
sampleSizenumberValues sampled per undeclared column when inferring its type. Default 100. (optional)
targetSize'default' | 'large'Raise every interactive target to a comfortable size for touch, without changing the type. `'large'` asks for it; `'default'` opts out of the coarse-pointer rule that would otherwise apply it. (optional)
componentsRecord<string, RendererCtor | EditorCtor | FilterCtor>Your own renderers, editors and filters, registered by name. (optional)
pipesRecord<string, (value: unknown, ...args: string[]) => string>Named text transforms usable from a format mask or a template. (optional)
totalFnsRecord<string, TotalFn>Your own reductions, alongside the built-in ones. (optional)
variantsRecord<string, VariantDefinition>Named appearance variants a row or cell can be switched into by a rule. (optional)
treeTreeConfigHierarchical rows: where the parent link or the path lives. (optional)
detailDetailConfigThe expandable panel beneath a row. (optional)
selectionSelectionConfig | 'single' | 'multiple' | 'none'What the user may select, and how selection behaves across groups. (optional)
editEditConfig | booleanEditing, and how a change is committed and validated. (optional)
paginationPaginationConfig | booleanPage the rows rather than scrolling them. (optional)
localestring(optional)
timeZonestringIANA zone every date column formats in, e.g. 'Europe/London' or 'UTC'. Omit to use each viewer's own zone. A column's own `format.timeZone` wins. (optional)
themeThemeThe visual theme. (optional)
densityDensityRow height and padding as a named step, rather than pixel by pixel. (optional)
gridLinesboolean | 'both' | 'horizontal' | 'vertical' | 'none' | 'rows' | 'columns'Which rules are drawn between cells. `'both'` by default. The two axes are separate decisions: horizontal rules help the eye track along a row, vertical ones stop adjacent values running together. `false` or `'none'` draws neither. Only the rules *between data* are affected, the header's underline, the pinned seams and the totals separator are structure, not grid lines. (optional)
cornerRadiusboolean | number | stringRound the grid's outer corners. Square by default. `true` adopts the theme's own radius; a number is pixels; a string is used as written, so a host can pass its own token or a relative unit. (optional)
columnTagFilterboolean | { multiple?: boolean; label?: string }Show a bar above the column headings for filtering columns by tag. Off by default, and it draws nothing unless some column carries a `tags` entry. `multiple: true` lets more than one tag be chosen at once. Only tagged columns are ever hidden, so an untagged account or total column stays visible whatever is selected. (optional)
typeOptionsRecord<string, {Per-column options a data type reads. `ratio` and `percentRate` use `{ weight }` to name the column their average is weighted by. A unit type reads `{ significantFigures }` to render to a fixed precision rather than a fixed number of decimals. (optional)
rowTemplatestring | {(optional)
responsive{Present rows as cards when the grid's container is too narrow to be a table honestly, a phone, or a narrow panel on a wide screen. Measured on the container, not the viewport, so a grid in a sidebar collapses and a grid filling a small tablet does not. Sorting, filtering and export continue to work; the tool panel is where they live when there are no column headings to click. Emits `presentation:changed`. (optional)
rowFormboolean | {(optional)
showColumnFunctionsbooleanDraw the sort, filter and menu controls in the column headings. `true` by default. `false` leaves each heading as its label alone, which is what a dense grid wants: three affordances take roughly fifty pixels, and on an eighty-pixel column that leaves the heading nothing and the label disappears entirely. Only the furniture goes. Sorting, filtering and the column menu are still reachable through the API, the keyboard and the tool panel. (optional)
rowHeightnumber | ((row: Row) => number)Row height in pixels, or a function of the row. A function makes the grid measure rather than assume, which costs a pass over what is on screen: worth it for wrapped text, wasteful for a uniform grid. (optional)
titlestringA caption for the grid, drawn above the column headings. Inside the grid rather than an element the host places above it: a title outside does not scroll with the grid, is not in the region a screen reader announces, and is left behind by image capture and print. (optional)
showHeaderbooleanDraw the column headings at all. `true` by default. `false` removes the row, and removes it from the accessibility tree rather than only from view, a heading a screen reader still announces is invisible, not hidden. What a small dashboard tile wants when its `title` already says what the panel is. Distinct from `showColumnFunctions`, which keeps the headings and drops only the sort, filter and menu controls inside them. (optional)
headerHeightnumberHeader height in pixels. (optional)
overscannumberHow many rows to render beyond the viewport. More costs memory and smooths fast scrolling; fewer is lighter and can show a gap. (optional)
autoHeightboolean | 'visible'Size rows to their content rather than to the density token. Only rows that are actually rendered are ever measured, in both settings: the grid does not lay out rows you cannot see. The difference is what happens on a large grid: `true` gives up above ten thousand rows and falls back to fixed heights, because a cumulative offset array being patched as you scroll a million rows is not worth the result. `'visible'` keeps measuring at any size, accepting that the scrollbar shifts as rows are measured on the way past. The name is historical and reads as though it were about which rows are measured; it is about whether the ceiling applies. (optional)
stateGridStateSort, filters, grouping, widths and the rest, restored at construction. (optional)
licencestringYour licence key. Without one the grid renders in full and watermarks off localhost. (optional)
maximisebooleanOffer a full-screen control. (optional)
formulaFunctionsRecord<string, (args: unknown[]) => unknown>Extra functions a formula may call, on top of the built-in library. (optional)
allowUnsafeTemplatesbooleanPermit raw HTML from a template without sanitising it. Off, and worth leaving off: a template usually interpolates data, and data is where injected markup arrives from. (optional)
updates{Caps on the change log behind `grid.updates` and `grid.timeline`. Two caps, because an entry is not a fixed size: `logLimit` bounds how many changes are kept (default 2000) and `logRows` bounds the rows they account for between them (default 100,000). A feed delivering large batches reaches the second long before the first, and without it the log is unbounded in bytes while looking bounded in entries. (optional)
commentsCommentConfigThreaded comments on individual cells. Requires a stable `rowKey`: comments outlive the values they annotate, and index identity would reattach every thread on the next sort. (optional)
presencePresenceConfigCollaborative presence. A display feature over a transport the grid does not own; without a provider it is inert. (optional)
environment() => Record<string, unknown>Host environment for a support bundle. Supplied by the DOM layer; core cannot read `navigator` or `window` itself. (optional)
facetsFacetConfig | booleanColumn header histograms and the filters clicking them creates. Off by default: the band roughly doubles header height, which is a cost no grid should pay without asking. Per-column settings layer over these. (optional)
hostFilter{ active(): boolean; passes(row: Row): boolean }A filter your application owns, applied alongside the grid's own and invisible to its filter UI. (optional)
contextunknownAnything of yours, passed untouched to renderers, editors and sources. (optional)
workerThresholdnumberRow count above which a column distribution is computed in a Worker. (optional)
useWorkerbooleanCompute column distributions off the main thread. Sorting, filtering and grouping run on the main thread; see the reference for why. (optional)
workerUrlstringWhere to load the worker kernel from, when hosting it yourself. (optional)
sharedMemorybooleanUse a shared buffer for the worker, where the page's headers allow it. (optional)
groupFooterbooleanA totals line at the foot of each group as well as the grid. (optional)
grandTotalRowboolean | 'bottom'Where the grand total goes. `true` adds it as the last display row, counted by `rows.count()` like any other. `'bottom'` pins it beneath the viewport instead, so it stays in view while the rows scroll and is *not* part of `rows.count()`. Omitted or `false` means no grand total row. (optional)
pinnedTopRowsunknown[]Rows pinned above the scrolling body. The objects are rendered through the ordinary column pipeline but are not part of the data: not counted by `rows.count()`, not sorted, filtered, grouped, selectable or exported. Use it for a totals line or a units row that must stay against the header. (optional)
pinnedBottomRowsunknown[]Rows pinned below the scrolling body. As `pinnedTopRows`, at the other edge. (optional)
fullWidth{Rows drawn as a single band across every column instead of being divided into them, a section banner, a note, a "load more" affordance. `when` picks the rows; `render` fills them. A full-width row is still one of your data rows: counted by `rows.count()`, sorted, filtered and exported like any other. Only its presentation changes. For a row that should *not* be part of the data, use `pinnedTopRows`. (optional)
totalFilteredOnlybooleanTotal what the filters left rather than the whole set. (optional)
totalOnlyChangedColumnsbooleanOn a change, recompute only the totals whose column moved. (optional)
showTotalInHeaderbooleanPut the total in the header rather than a footer row. (optional)
columnVirtualisationAbovenumberRender only the visible columns once there are more than this many. (optional)
statusBarboolean | { panels?: string[] }The bar beneath the grid, and which panels it carries. (optional)
contextMenuboolean | ((p: CellMenuParams, defaults: MenuItem[]) => MenuItem[] | void)The cell right-click menu. A function supplies custom items; `false` suppresses it entirely, which is what a read-only grid wants, the default menu offers Paste, Clear and Fill down. (optional)
columnMenuboolean | ((p: ColumnMenuParams, defaults: MenuItem[]) => MenuItem[] | void)The header's 3-dot menu, and the right-click menu on a column heading. `false` suppresses both. A function supplies custom items, receiving the grid's own so it can add to them rather than reproduce them. Default true. (optional)
shortcutsbooleanThe `?` keyboard shortcut overlay. `false` suppresses it, for a host that wants `?` for itself. Default true. (optional)
rowReorderboolean | { column?: string }Let a user reorder rows by dragging a handle, or with Alt+Shift+Up/Down. `true` puts the handle in the first visible column; `{ column }` names a different one. The move reorders your data and emits `row:moved`; persisting it is yours, and `rows.data()` afterwards is the new order. Refused, with a reason announced, while a sort, filter or grouping is active, the position a row is dropped at has no single meaning in the underlying order then. (optional)
rowTransferboolean | {Let rows be dragged out of this grid, into it, or both. Off by default: rows leaving a grid is a data change a host has to want, and a mis-drag that silently removed one has no gesture a user would think to undo. `send` and `receive` are both on when the option is present, so one-way is expressed by turning off the direction you do not want, a source grid is `{ receive: false }` and a target is `{ send: false }`. `mode: 'copy'` leaves the row where it was. `group` restricts exchange to grids sharing the same name, so two unrelated grids on a page do not accept each other's rows. The source needs `rowReorder` as well, since that is what draws the handle a drag starts from. (optional)
alignedGridsunknown[]Other grids to stay column-aligned with. Column widths, order, visibility and pinning are shared, and horizontal scrolling moves them together. Sort, filters, selection, grouping and the rows themselves stay independent: sharing those would make one grid with extra steps rather than two aligned ones. Declared on the grid created last, since it is the only one that can name the others; the link is peer-based once made. (optional)
stickyGroupHeadersboolean | number | { depth?: number }Keep the enclosing group headings pinned above the viewport while scrolling inside a group. On by default, stacking at most two. `false` turns it off; a number, or `{ depth }`, sets how many may stack: each costs a row of viewport, so a deep grouping would otherwise spend the screen describing itself. (optional)
highlightOnChangeboolean | string | {Flash a cell when its value changes. `true` takes the defaults; an object names a colour, a duration in milliseconds, or both. (optional)
formattingRecord<string, FormattingRule[]>Conditional formatting rules the grid holds as runtime state, keyed by column id or `'*'` for every column (spec 8.12). Seeds `grid.formatting`, which an end user can then change; the rules travel in saved views and undo like any other change. Config-time `cell.style` is unaffected. (optional)
rowClassstring | string[] | ((p: RowStyleParams) => string | string[])A class, or classes, for every row. Re-evaluated on each repaint. (optional)
rowStyleCellStyle | ((p: RowStyleParams) => CellStyle)Inline styles for every row. Camel-case or hyphenated property names. (optional)
toolPanelboolean | {(optional)
quickFilterTextstringThe quick filter's initial text. (optional)
permissionsPermissionPolicyPer-column read/write/hidden policy. A usability control, not a security boundary: hidden data is still resident in the store. Enforce the same policy server-side with `permittedColumns` / `permittedExport`. (optional)
diff{Prior state for diff and audit mode. (optional)
views{ storage?: { read(): unknown[]; write(views: unknown[]): void }; saved?: unknown[] }Saved views: a storage adapter and any pre-loaded views. (optional)
historyBarboolean | { element?: HTMLElement; timeline?: boolean }The undo toolbar. `element` mounts it into the host's own chrome. (optional)
ai{The AI skill layer. The grid makes no network call of its own: `ask` is the host's, and owns the model, the key and the privacy decision. (optional)
pivot{(optional)

GridEvent

MemberTypeDescription
typestring
origin'api' | 'user' | 'init'
gridGrid

GridModule

MemberTypeDescription
namestring
versionstring(optional)
install(ctx: ModuleContext): void
uninstall(ctx: ModuleContext): void(optional)

GridState

MemberTypeDescription
versionnumber
columnsColumnState[](optional)
columnOrderstring[](optional)
filtersFilterSet(optional)
quickstring(optional)
sortSortEntry[](optional)
groupstring[](optional)
pivot{ enabled: boolean; columns: string[] }(optional)
formattingRecord<string, FormattingRule[]>(optional)
expandedstring[](optional)
selectionstring[](optional)
scroll{ top: number; left: number }(optional)
pagination{ page: number; pageSize: number }(optional)

HighlightApi

MemberTypeDescription
clear(target?: { key?: string; colId?: string } | string): booleanClear one target, or every highlight when called with nothing.
list(): { scope: string; key: string | null; colId: string | null; colour: string; duration: number }[]
colourFor(key: string, colId: string): string | null

HistogramBin

MemberTypeDescription
fromnumber
tonumber
countnumber

HistoryApi

MemberTypeDescription
undo(): HistoryEntry | null
redo(): HistoryEntry | null
canUndo(): boolean
canRedo(): boolean
peek(direction?: 'undo' | 'redo'): HistoryEntry | nullWhat undo or redo would apply next, for labelling a button.
list(): HistoryEntry[]
transaction(label: string, fn: () => void): HistoryEntry | nullGroup everything `fn` does into one undoable step.
clear(): void

HistoryEntry

MemberTypeDescription
seqnumberMonotonic sequence number, in the order actions were recorded.
typestringWhat kind of action it was, e.g. `'sort'`, `'column:pin'`, `'edit'`.
labelstringHuman text for a button, e.g. `'sort by Region'`.
targetstring | nullThe column or row the action was aimed at, where there was one.
atnumberWhen it was recorded, on the high-resolution clock.
delegatedbooleanTrue when the edit model owns the undo rather than the history stack.
undonebooleanSet once the entry has been undone. (optional)

LicenceApi

MemberTypeDescription
set(key: string): LicenceInfo
info(): LicenceInfo
state(): 'licensed' | 'localhost' | 'trial'
watermark(): boolean
readyPromise<LicenceInfo>Settles when the licence check finishes. (read-only)

LicenceInfo

MemberTypeDescription
validboolean
productstring(optional)
issuedTostring(optional)
expiresstring(optional)
reasonstring(optional)

LookupSpec

MemberTypeDescription
optionsOption[] | (() => Option[] | Promise<Option[]>)(optional)
valueKeystring(optional)
labelKeystring(optional)
groupKeystring(optional)
multipleboolean(optional)
allowCustomboolean(optional)
unknownLabelstring | ((v: unknown) => string)(optional)
search(query: string, signal: AbortSignal) => Promise<Option[]>(optional)
sortBy'label' | 'value' | 'optionOrder' | 'count'(optional)
separatorstring(optional)

MaximiseApi

MemberTypeDescription
enter(): boolean
exit(): boolean
toggle(): boolean
active(): boolean

MenuItem

MemberTypeDescription
namestring(optional)
iconstring(optional)
shortcutstring(optional)
action() => void(optional)
disabledboolean(optional)
separatorboolean(optional)
childrenMenuItem[](optional)

MessagesApi

The resolved message set for a grid: every user-visible string, in the grid's locale.

MemberTypeDescription
t(key: string, params?: Record<string, unknown>): stringFormat a message.
list(items: string[], type?: 'conjunction' | 'disjunction'): stringJoin parts the way this locale joins lists.
number(value: number, opts?: Intl.NumberFormatOptions): stringFormat a number for this locale.
localestringThe resolved BCP 47 tag. (read-only)
keysReadonlyArray<string>Every key the catalogue defines. (read-only)

ModuleContext

MemberTypeDescription
registryRegistry
gridGrid(optional)

NumberFormat

MemberTypeDescription
type'number'(optional)
style'decimal' | 'currency' | 'percent'(optional)
currencystring(optional)
currencyDisplay'symbol' | 'code' | 'name' | 'narrowSymbol'(optional)
decimalsnumber(optional)
minDecimalsnumber(optional)
maxDecimalsnumber(optional)
thousandsSeparatorboolean | string(optional)
decimalSeparatorstring(optional)
notation'standard' | 'compact' | 'scientific'(optional)
negative'minus' | 'parentheses' | 'suffix'(optional)
negativeClassstring(optional)
prefixstring(optional)
suffixstring(optional)
zeroDisplaystring(optional)
nullDisplaystring(optional)
localestringThe locale for number, date and text formatting. The page's by default. (optional)
messagesRecord<string, string | Record<string, string>>A partial message catalogue laid over the built-in British English one. Every valid key is listed in `MESSAGE_KEYS`; a key that is not is ignored with a warning. Import a bundled locale (`FR_FR`, `AR`, …) or supply your own object. Merged rather than replacing, so an incomplete translation leaves the remainder in English rather than showing raw keys. (optional)
direction'ltr' | 'rtl'Writing direction. Omit to settle it from the element's own `dir` and then from `locale`: `ar`, `he`, `fa` and the rest resolve to `rtl`. (optional)
scalenumber(optional)

OpenWrite

MemberTypeDescription
idstring
keystring
colIdstring
valueunknown
beforeunknown
state'pending' | 'superseded'
agenumber

Option

MemberTypeDescription
idunknown
labelstring
disabledboolean(optional)
variantVariantName(optional)
iconstring(optional)
groupstring(optional)

OverlayApi

MemberTypeDescription
show(kind: 'loading' | 'empty' | (string & {}), message?: string): void
hide(): void

PagedSourceConfig

MemberTypeDescription
mode'paged'
pageSizenumber(optional)
maxCachedPagesnumber(optional)
fetch(req: {

PaginationApi

MemberTypeDescription
get(): { page: number; pageSize: number; total: number; pageCount: number }
set(next: { page?: number; pageSize?: number }): void
applyPage(next: { page?: number; pageSize?: number }): void

PaginationConfig

MemberTypeDescription
enabledboolean(optional)
pageSizenumber(optional)
pageSizesnumber[](optional)

Peer

One peer, as the grid holds them.

MemberTypeDescription
idstring
namestring
colourstringAssigned deterministically from the id when the provider supplies none.
avatarUrlstring | null(optional)
initialsstring | null(optional)
cursor{ rowId: string; colId: string } | nullRow key and column, never an index.
rangesArray<{ rowIds: string[]; columns: string[] }>
editing{ rowId: string; colId: string } | null
atnumberLocal receipt time, not the sender's clock.
sentAtnumber | nullThe sender's own timestamp, for inspection only. Nothing decides on it. (optional)
idleboolean(optional)
silentMsnumber(optional)
hiddenbooleanTrue when the peer's cursor is on a row this view is not showing. (optional)

PendingWrite

MemberTypeDescription
idstring
keystring
colIdstring
valueunknown
beforeunknown
rowRow(optional)

PermissionsApi

MemberTypeDescription
levelOf(column: string | ResolvedColumn): PermissionLevel
isHidden(column: string | ResolvedColumn): boolean
isReadable(column: string | ResolvedColumn): boolean
isEditable(column: string | ResolvedColumn): boolean
isSecret(column: string | ResolvedColumn): booleanTrue only at `writeOnly`: writable, never shown or exported.
isExportable(column: string | ResolvedColumn): boolean
levels(): Record<string, PermissionLevel>
setContext(context: unknown): voidChange the context permissions are evaluated against, and re-evaluate.
invalidate(): void

PresenceApi

MemberTypeDescription
enabledboolean(read-only)
meRecord<string, unknown> | null(read-only)
publishingboolean(read-only)
peers(): Peer[]
hiddenCount(): number
editorOf(rowId: string, colId: string): Peer | null
lockedBy(rowId: string, colId: string): Peer | nullAdvisory. Reduces collisions; does not eliminate them.
jumpTo(peerId: string): boolean
publish(): void
setPublishing(on: boolean): void
setPaused(paused: boolean): void
connect(provider: PresenceProvider | null): void
stats(): Record<string, number>

PresenceConfig

MemberTypeDescription
providerPresenceProviderWithout one the feature is inert and raises nothing. (optional)
me{ id: string; name?: string; colour?: string; avatarUrl?: string; initials?: string }The local identity, echoed in everything published. (optional)
throttleMsnumberMilliseconds between published updates. Throttled, not debounced. (optional)
idleMsnumberSilence after which a peer is shown idle. (optional)
removeMsnumberSilence after which a peer is dropped. (optional)
lockMsnumberSilence after which a peer's edit claim is disregarded. (optional)
lockbooleanRefuse local editing of a cell a peer is editing. Advisory only: the authoritative resolution is the conditional write in `edit.commit`. (optional)
palettestring[]Override the peer colour palette. (optional)
rosterboolean | { side?: 'start' | 'end' }Suppress the roster, or place it. (optional)
announcebooleanSuppress join and leave announcements to assistive technology. (optional)

PresenceProvider

Transport for presence. The grid never opens a connection: it subscribes to what the provider delivers and hands it what changed locally.

MemberTypeDescription
subscribe(onMessage: (message: Peer | Peer[]) => void): (() => void) | voidReturns an unsubscribe function, if it has one.
publish(state: Record<string, unknown>): void

PresentationApi

MemberTypeDescription
activeboolean(read-only)
scalenumber(read-only)
options{ scale?: number; chrome?: string[]; views?: string[]; from?: number; autoAdvance?: number }(read-only)
viewsstring[](read-only)
indexnumber(read-only)
viewIdstring | null(read-only)
start(options?: {
stop(): boolean
setScale(value: number): number
nudge(steps?: number): number
step(by?: number): number
goTo(index: number): number
reset(): boolean
spotlight{ keys: string[]; colIds: string[] } | null(read-only)
setSpotlight(target?: { keys?: string[]; colIds?: string[] } | null): boolean

ProcessCapability

MemberTypeDescription
nnumber
meannumber
lowernumber | null
uppernumber | null
targetnumber | null
sigmaWithinnumber | nullShort-term variation, from the moving range: what Cp and Cpk use.
sigmaOverallnumber | nullOverall variation: what Pp and Ppk use.
cpnumber | nullPotential capability. Null for a one-sided specification.
cpknumber | nullCapability allowing for where the process is centred.
ppnumber | nullCp over the overall spread: what the process actually delivered.
ppknumber | nullCpk over the overall spread. Well below Cpk means the process drifted.
outOfSpecnumber
defectRatenumber | null
limits{ centre: number; upper: number; lower: number; sigma: number } | nullThree sigma either side of the process mean, from the moving range.
baselinenumberHow many leading readings set the limits. (optional)
ruleSet'westernElectric' | 'nelson'Which rule set `violations` were judged against, they number differently. (optional)
violations{ index: number; rule: number; description: string }[]
intervalCapabilityInterval | nullA confidence interval for `cpk`. A study that reports the point estimate alone overstates itself: 1.35 from thirty parts has a lower bound below 1. (optional)
intervalPpCapabilityInterval | nullThe same, for `ppk`. (optional)

ProportionInterval

A Wilson score interval for a rate. Stays inside 0 to 1 at the extremes.

MemberTypeDescription
proportionnumber
lowernumber
uppernumber
nnumber
confidencenumber

PushdownAdapter

An engine the grid can query, and what it is able to answer.

MemberTypeDescription
namestringUsed in diagnostics and in the message when work cannot be pushed. (optional)
capabilitiesPushdownCapabilities(optional)
execute(query: RemoteRequest, request?: RemoteRequest):Run the part of the query the adapter declared it could handle.

PushdownCapabilities

What a pushdown adapter can answer. Everything is off unless declared.

MemberTypeDescription
filterfalse | 'term' | 'flat' | 'tree'`false`, a single field and term, a flat conjunction, or a full tree. (optional)
operatorsstring[]Which comparison operators the engine understands. (optional)
sortfalse | 'single' | 'multi'`false`, one column only, or many. (optional)
quickbooleanWhether a free-text search across columns can be pushed. (optional)
rangebooleanWhether the engine can return a window rather than the whole result. (optional)
totalbooleanWhether it can report the count of matching rows. (optional)
groupbooleanWhether it can group and aggregate. (optional)

PushdownPlan

How one request was divided between the engine and the grid.

MemberTypeDescription
pushedRemoteRequestThe query the adapter was given.
residual{ filters: object | null; sort: SortEntry[] | null; quick: string }What the grid applied afterwards.
needsAllbooleanWhether the whole result had to be fetched rather than a window.
unpushedstring[]Which parts could not be pushed: `filter`, `sort`, `quick`.

PushdownSourceConfig

MemberTypeDescription
adapterPushdownAdapter
computeobjectThe compute barrel, for applying whatever the engine could not. (optional)
pageSizenumber(optional)

RailAction

MemberTypeDescription
namestring
titlestring | (() => string)
iconstring | (() => string)(optional)
run(params: RailActionParams): void
enabled(): boolean(optional)

RailActionParams

What a host rail action's `run` is handed.

MemberTypeDescription
gridGrid
keysstring[]
cells{ key: string; colId: string }[]

RedactionApi

Redaction obscures a column's values on screen. It is presentational: the values stay in the model, the DOM, the clipboard and every export. Use `permissions` with `writeOnly` for a value that must not be readable.

MemberTypeDescription
has(colId: string): boolean
list(): string[]
toggle(colId: string): boolean
add(colId: string): void
remove(colId: string): void
set(ids: string[]): void
clear(): void
activeboolean(read-only)

Registry

MemberTypeDescription
modules(): GridModule[]
has(name: string): boolean
renderer(name: string): RendererCtor | RenderFn | undefined
editor(name: string): EditorCtor | undefined
filter(name: string): FilterCtor | undefined
dataType(name: string): DataType | undefined
totalFn(name: string): TotalFn | undefined
pipe(name: string): ((v: unknown, ...a: string[]) => string) | undefined
register(kind: string, name: string, impl: unknown): void

RegressionFit

MemberTypeDescription
slopenumber
interceptnumber
r2numberThe square of Pearson's r: how much of the response the fit accounts for.
stdErrornumberStandard error of the slope, which is what says it differs from zero.
nnumberPairs that survived pairwise deletion, not rows scanned.

RejectedRow

A row a change could not apply, and why. Reported, never thrown.

MemberTypeDescription
operation'add' | 'update' | 'remove'
idstring
reason'unknown-id' | 'duplicate-id'`unknown-id`, no row with that key. `duplicate-id`, a row with that key already exists; admitting a second would corrupt every structure that resolves one key to one row.

RemoteRequest

MemberTypeDescription
protocol1
range{ start: number; end: number }
groupPathstring[]
groupByColumnRef[]
totalsColumnRef[]
pivotByColumnRef[]
pivotModeboolean
filtersFilterSet
quickstring(optional)
sortSortEntry[]
contextunknown
signalAbortSignal

RemoteResult

MemberTypeDescription
rowsunknown[]
countnumber(optional)
pivotFieldsstring[](optional)

RemoteSourceConfig

MemberTypeDescription
mode'remote'
pageSizenumber(optional)
maxCachedPagesnumber(optional)
fetch(req: RemoteRequest): Promise<RemoteResult>

Renderer

MemberTypeDescription
init(p: CellParams): void
element(): HTMLElement
refresh(p: CellParams): boolean(optional)
attached(): void(optional)
destroy(): void(optional)

ResolvedColumn

A column after presets, type defaults and grid defaults are folded in.

MemberTypeDescription
idstring
fieldstring | null
titlestring
typeTypeName
dataTypeDataType
nullableboolean
alignAlign
valueRequired<Pick<ColumnValueSpec, 'pure'>> & ColumnValueSpec
cellColumnCellSpec
editColumnEditSpec
sortColumnSortSpec
filterColumnFilterSpec
group{ enabled: boolean; index: number; explode: boolean }
pivot{ enabled: boolean; index: number }
totalTotalName | TotalFn | null
layoutColumnLayoutSpec
headerColumnHeaderSpec
exportColumnExportSpec
lookupLookupSpec | null
allowGroupboolean
allowPivotboolean
allowTotalboolean
formatValue(value: unknown, row?: Row, data?: unknown): stringCompiled display-text producer.
getValue(data: unknown, row?: Row): unknownResolve the value for a row, through the computed-value graph.
defColumn

Row

MemberTypeDescription
keystringWhat identifies the row. Selection, expansion and edits are all keyed on it.
dataunknown | nullThe object you supplied. Null on a group heading, which is a product of the grouping rather than a record.
levelnumberDepth in a tree or a grouping. Zero at the top.
parentRow | nullThe row above it in a tree or grouping, or null at the top.
childrenRow[]Every child, before filtering. (optional)
filteredChildrenRow[]The children the filters left. (optional)
sortedChildrenRow[]The children in display order. (optional)
groupbooleanWhether this is a group heading rather than a record. A heading carries no data and must be skipped when totalling.
expandedbooleanWhether its children are showing.
leafCountnumberHow many records sit beneath it, at any depth.
totalsRecord<string, unknown>The group's own reductions, by column id. (optional)
detailbooleanWhether this row is the expanded detail panel of the one above. (optional)
masterbooleanWhether this row has a detail panel. (optional)
heightnumberThe row's height in pixels, as measured or configured.
indexnumber | nullPosition in the display order, or null when off screen.
selectedboolean | 'partial'Selection state. `partial` is a group some but not all of whose children are selected.
physicalnumber | nullPhysical index into the ColumnStore. Null for synthetic rows. (optional)
groupColumnstringGroup rows only: the column id this level groups on, and the group value. (optional)
groupValueunknownThe value this group heading stands for. (optional)
groupPathstring[]Stable path of group keys from root to this row. (optional)
hasChildrenbooleanWhether children exist, which a lazily loaded tree knows before it has them. (optional)
pinned'top' | 'bottom'Which sticky strip this row is pinned in, when it is one the host pinned through `setPinnedRows`. Absent on every row that is part of the data. (optional)

RowChange

MemberTypeDescription
addunknown[](optional)
atnumber(optional)
updateunknown[](optional)
removeunknown[] | string[](optional)

RowFormApi

MemberTypeDescription
open(key: string): booleanOpen the form for a row. False when the form is not configured.
close(): void
save(): boolean
isOpen(): boolean

RowsApi

MemberTypeDescription
load(rows: unknown[]): voidReplace the data. Sort, filters, grouping and column layout are kept.
apply(change: RowChange): ChangeResult
queue(change: RowChange): Promise<ChangeResult>
get(index: number): Row | undefined
byKey(key: string): Row | undefined
count(): number
totalCount(): numberRows in the source before filtering; under pagination, across every page.
matchCount(): numberData rows matching the filters, excluding group, footer and total rows.
data(): unknown[]
forEach(fn: (row: Row, index: number) => void): void
forEachAll(fn: (row: Row, index: number) => void): voidEvery row in the data, before any filter. Leaf rows, in physical order.
forEachExcept(colId: string, fn: (row: Row, index: number) => void): voidVisit the rows surviving every filter except one column's own: the faceting question, asked of the rows.
value(key: string, colId: string): unknown
text(key: string, colId: string): string
values(key: string): Record<string, unknown>
refresh(opts?: { rows?: string[]; columns?: string[]; force?: boolean }): void
move(key: string, to: number): { moved: boolean; from: number; to: number; reason?: string }Move a row to another position in the data. Refuses, with a reason, while a sort, filter or grouping is active.
groupHeadings(index: number): Row[]The group headings enclosing a display row, outermost first. Empty when the grid is not grouped.
expand(key: string, deep?: boolean): void
collapse(key: string): void
expandAll(): void
collapseAll(): void

RowStyleParams

MemberTypeDescription
rowRow
keystring
indexnumber
dataunknown
gridGrid
contextunknown

SavedView

MemberTypeDescription
idstring
namestring
descriptionstring
sharedboolean
isDefaultboolean
builtinbooleanSupplied in `config.views.saved`: listed apart, and not renamable or deletable.
createdAtnumber
updatedAtnumber
stateGridStateA partial `GridState`; only the sections it names are applied.

ScrollApi

MemberTypeDescription
toRow(row: string | number, align?: 'start' | 'center' | 'end' | 'auto'): voidA row key, or a display index. A key survives a sort and is usually what a caller holds; resolving one scans the display order, so prefer an index when scrolling a very large grid repeatedly.
toColumn(id: string): void
toCell(row: string | number, colId: string, align?: 'start' | 'center' | 'end' | 'auto'): voidScroll a cell into view, both axes in one call.
position(): { top: number; left: number }
to(at: { top?: number; left?: number }): void`left` is the logical offset, zero at the content's start in either direction.

SelectionApi

MemberTypeDescription
clearRange(): voidDrop every range, leaving the row and cell selection alone.
statistics(): object | nullEverything worth knowing about the selected cells: what `summary()` reports plus median, quartiles, deviation, distinct and outliers. Over the cells rather than a column, so a rectangle spanning three columns is one set of numbers. Null with nothing selected.
rows(): Row[]
keys(): string[]
set(keys: string[]): void
all(): void
clear(): void
headerState(): boolean | 'partial'
cells(): { key: string; colId: string }[]
ranges(): CellRange[]
setRange(range: CellRange): void
addRange(range: CellRange): void
startRange(rowIndex: number, colId: string, opts?: { additive?: boolean }): void
extendRange(rowIndex: number, colId: string): void
corner(): { row: number; colId: string } | null
inRange(rowIndex: number, colId: string): boolean

SelectionConfig

MemberTypeDescription
mode'none' | 'single' | 'multiple'(optional)
checkboxboolean(optional)
headerCheckboxboolean(optional)
groupSelectsChildrenboolean(optional)
groupSelectsFilteredboolean(optional)
rangesboolean(optional)
fillHandleboolean(optional)
fill(p: { source: unknown[]; target: { row: Row; column: ResolvedColumn }[]; direction: string }) => unknown[](optional)

SeriesStats

MemberTypeDescription
nnumber
firstnumber
lastnumber
changenumber
changePercentnumber | null
volatilitynumber | nullStandard deviation of period-on-period returns.
annualisedVolatilitynumber | nullThe same, times the root of `periodsPerYear`; null unless one was given.
growthnumber | nullCompound growth per period, annualised when `periodsPerYear` is given.
maxDrawdownnumber | nullThe largest peak-to-trough fall, as a fraction.
maxDrawdownFromnumber
maxDrawdownTonumber
autocorrelationnumber | nullLag-1: positive is momentum, negative is mean reversion.
upDaysnumber
downDaysnumber

SortApi

MemberTypeDescription
get(): SortEntry[]
set(entries: SortEntry[]): void
clear(): void

SortEntry

MemberTypeDescription
colstring
dir'asc' | 'desc'
nullsFirstboolean(optional)

Source

MemberTypeDescription
mode'memory' | 'paged' | 'remote' | 'stream'(read-only)
count(): number
at(index: number): Row | undefined
byKey(key: string): Row | undefined
loaded(index: number): boolean
hint(start: number, end: number): void
apply(change: RowChange): ChangeResult
reload(opts?: ReloadOptions): void
destroy(): void(optional)

Stat

The handle `createStat` returns.

MemberTypeDescription
element(): HTMLElement | null
value(): unknown
refresh(): void
destroy(): void

StatConfig

A statistic block: a label, a value, its change, and what it is compared with. Reads the grid, so it cannot disagree with the table beneath it, and formats through the column's own type, so the tile and the table cannot drift.

MemberTypeDescription
gridGrid(optional)
containerHTMLElement | stringAn element, or a CSS selector resolved against the grid's document.
titlestring(optional)
valueunknown | StatValueSpec | ((grid: Grid) => unknown)A literal value, a spec to reduce, or a function of the grid. (optional)
footerstring | ((value: unknown, grid: Grid) => string)Text under the value, or a function of it. (optional)
baselinenumber | ((grid: Grid) => number)What the value is compared against, for the change indicator. (optional)
goodWhen'up' | 'down' | 'neither'Whether a rise is good news. `up` by default. (optional)
bands{ good?: number; warn?: number; direction?: 'up' | 'down' }Thresholds the value itself is judged against, setting `data-tone` on the tile. Separate from `goodWhen`, which judges the *change*: a Cpk of 0.9 is bad news whether it rose or fell to get there. (optional)
interval(value: unknown, grid: Grid) =>An interval to show under the value: how much to trust it. Return whichever of the grid's intervals belongs to this tile. (optional)
scope'filtered' | 'all' | 'selected'Which rows feed the value. `filtered` by default. (optional)
liveboolean`false` stops the tile following the grid; `refresh()` still works. (optional)
format(value: unknown, grid: Grid) => stringOverride the formatting the column's type would apply. (optional)
emptystringShown when there is no value. `, ` by default. (optional)
decimalsnumberFraction digits for a value whose reduction changed the unit. 2 by default. (optional)
classstringExtra class names for the tile's root. (optional)

StateApi

MemberTypeDescription
get(): GridState
apply(state: GridState, opts?: { skip?: (keyof GridState)[] }): StateApplyReport
baseline(): GridState | nullThe state the grid started in, captured once after `config.state`.
reset(): StateApplyReport | nullPut the grid back the way it started, as one undoable step.
modified(): booleanWhether anything has changed since construction.

StateApplyReport

MemberTypeDescription
appliedstring[]
skipped{ key: string; reason: string }[]

StatisticsApi

MemberTypeDescription
shadow(colId: string, kind: ShadowKind, rowKey: string, scope?: 'all' | 'filtered'): unknownOne shadow value for one row, by the column it shadows and the kind.
running(colId: string, kind: 'total' | 'percent', rowKey: string): number | nullA running total at one row, down the grid as it is currently ordered.
rebase(colId?: string): voidMake the current values the new baseline: "mark all".
tracking(): { columns: string[]; rows: number; forgotten: number }What the shadow histories are costing.
reduce(colId: string, fn: string): unknownReduce a column by a named kernel over the filtered rows.
profile(colId: string): ColumnProfile | nullEverything worth knowing about one column, in one pass each.
correlation(a: string, b: string): number | nullPearson's correlation between two columns.
covariance(a: string, b: string, opts?: { population?: boolean }): number | nullCovariance, a correlation before the scales are divided out.
regression(a: string, b: string): RegressionFit | nullLeast-squares fit of `b` on `a`: in finance, beta and alpha.
spearman(a: string, b: string): number | nullSpearman's rank correlation, which one outlier cannot drag.
kendall(a: string, b: string): number | nullKendall's tau-b. Null past 5,000 rows: it is quadratic.
weightedQuantile(colId: string, weightId: string, p?: number): number | nullA quantile of one column weighted by another; the median by default.
capability(colId: string, opts?: {Process capability against the column's `spec`, with control limits and the Western Electric rule breaks. `baseline` fixes the limits over the first N readings, which is how a shift is found rather than hidden by the limits it widened.
interval(colId: string, opts?: {A confidence interval for what a column measures, the range the estimate pins the figure down to, not a verdict about it. Reads the rows the filters left, so an interval narrows as the grid does: it describes the filtered population, not the whole table.
series(colId: string, opts: { by: string; periodsPerYear?: number }): SeriesStats | nullHow a column varies along an ordering. `by` is required and never guessed: kernels see rows in the order they arrived, which is not the grid's sort.
weightedAverage(colId: string, weightId: string): number | nullA weighted average of one column by another.
keyOf(data: unknown): string | nullThe key a row's data resolves to.
maintenanceReadonly<Record<string, 'maintained' | 'rescan'>>Which reductions can be maintained against a change, and which rescan. (read-only)

StatValueSpec

How a statistic block finds the number it reports.

MemberTypeDescription
ofstringThe column to reduce, as a field name or a dotted path. Omit for `count`. (optional)
fnTotalNameA key of `TOTAL_FNS`: `sum`, `avg`, `median`, `p95`, `gini` and the rest. (optional)
showstringReport this column from the row holding the extreme, rather than the extreme itself: `{ of: 'sales', fn: 'max', show: 'rep' }` is the *name* of the best rep. Needs `min` or `max`, no single row holds an average. (optional)

StreamSourceConfig

MemberTypeDescription
mode'stream'
open(req: {
maxRowsnumberThe most rows to keep. A stream has no end, so an unbounded grid dies overnight; this makes it a sliding window and the oldest rows are dropped. Omit for no limit. Set on the source, not passed to `open`, it bounds what the grid retains rather than what the producer sends. (optional)
promoteToMemoryBelownumber(optional)
coalesceMsnumber(optional)

TextFormat

MemberTypeDescription
type'text'
transform'none' | 'upper' | 'lower' | 'title'(optional)
truncatenumber | { chars: number; ellipsis?: string }(optional)
nullDisplaystring(optional)
emptyDisplaystring(optional)

TimelineApi

Moving the grid through recent data changes. Reads the change log rather than the undo history: history records what the *user* did, and the question on a live grid is what the *data* did. Nothing is scrubbable until `attach()`: what a value used to be is not recoverable after the fact.

MemberTypeDescription
attachedboolean(read-only)
liveboolean(read-only)
positionnumber(read-only)
depthnumber(read-only)
attach(): void
detach(): void
seek(steps: number): number
step(by: number): number
toLive(): number
at(): number | null
span(): { from: number; to: number } | null

TreeConfig

MemberTypeDescription
path(row: unknown) => string[](optional)
parentKeystring | ((row: unknown) => unknown)(optional)
orphans'root' | string(optional)
hasChildren(row: unknown) => boolean(optional)
loadChildren(row: Row, signal: AbortSignal) => Promise<unknown[]>(optional)
labelstring | ((data: unknown, row: Row) => unknown)Where the generated tree column takes its text from: a field or a function. (optional)
titlestringThe tree column's heading. Defaults to the label column's own title. (optional)

UnitConfig

How a column stores, parses and renders a quantity.

MemberTypeDescription
systemstring(optional)
unitstring(optional)
binaryboolean(optional)
decimalsnumber(optional)
minDecimalsnumber(optional)
maxDecimalsnumber(optional)
displaystring(optional)
localestring(optional)
groupboolean(optional)
spacestring(optional)
placement'suffix' | 'prefix'(optional)

UnitDescriptor

One unit descriptor: a symbol and how many base quantities it is worth.

MemberTypeDescription
symbolstring
factornumber
aliasesreadonly string[]
binaryboolean
prefixstring | null
autoboolean

UpdatesApi

MemberTypeDescription
pausedboolean(read-only)
pause(): boolean
resume(): ChangeResult
flush(): ChangeResult
stats(): {
log(opts?: { since?: number }): { at: number; change: RowChange; rows: number }[]

ValueParams

MemberTypeDescription
valueunknown
dataunknown
rowRow
columnColumn
colIdstring
gridGrid
contextunknown

VariantDefinition

MemberTypeDescription
light{ fill: string; text: string; border: string }
dark{ fill: string; text: string; border: string }

ViewChange

MemberTypeDescription
reason'save' | 'update' | 'rename' | 'remove' | 'default' | 'import' | 'seed' | 'replace'
viewSavedView | nullThe view the change concerns; null for a bulk replace.

ViewsApi

MemberTypeDescription
list(): SavedView[]
get(id: string): SavedView | undefined
activeIdstring | null(read-only)
save(name: string, opts?: { id?: string; overwrite?: boolean }): SavedView
apply(id: string): SavedView | null
rename(id: string, name: string): SavedView | null
duplicate(id: string, name?: string): SavedView | null
remove(id: string): boolean
setDefault(id: string | null): SavedView | nullMark the view applied on load; null clears it.
defaultView(): SavedView | null
diff(id: string): Record<string, unknown> | nullWhat applying the view would change, without applying it.
export(id: string): string
import(json: string): SavedView
reload(): voidRe-read from storage, after another tab or the server changed it.

ViewStorage

MemberTypeDescription
read(): SavedView[]Load the user's views. Called at construction and by `views.reload()`.
write(views: SavedView[], change: ViewChange): voidMirror the views somewhere synchronous: `localStorage`, an in-memory cache. For a server, listen for `view:saved` / `view:removed` and do the write yourself: the grid does not make network calls and does not want to know whether yours succeeded.