Everything you pass to createGrid(host, opts) lives in GridOptions. This page
lists every field with its type and default, the optional toolbar GridConfig,
and the Grid instance API.
Sheets, columns, row counts, and the activeSheet id.
presentation
"spreadsheet" | "data-grid"
"spreadsheet"
Positional A/B/C headers or semantic Column.header labels. Addressing and data rows are unchanged.
data
ColumnarData
undefined
Eager, in-memory, column-major values. Pass this ordatasource.
datasource
DataSource
undefined
Lazy, paged async source; rows fetched per visible window.
datasourceStorage
DataSourceStorageOptions
{ mode: "dense" }
Use { mode: "paged", chunkRows?, cacheBytes? } for allocation-lazy datasource storage.
renderer
"canvas" | "worker"
"canvas"
"worker" paints off-thread via OffscreenCanvas, falling back to canvas. See Worker rendering.
workerUrl
string | URL
undefined
Browser-fetchable module URL, e.g. "/sheetwrite/worker.js" after copying the package dist/; Vite can import @sheetwrite/core/worker?worker&url. See Worker rendering.
theme
Partial<Theme>
undefined
Overrides merged over DEFAULT_THEME and any --sheetwrite-* CSS vars. See Styling.
readOnly
boolean
false
When true, all mutating interactions (edit, clear, fill, paste, restyle) are disabled and the host gets aria-readonly="true".
protectionResolver
ProtectionResolver
undefined
Host callback for protected local mutations; no resolver means deny. Client-side UX policy only, never server authorization.
mutationPolicy
"atomic" | "partial"
"atomic"
Reject the whole local transaction on a denied protected operation, or apply allowed operations and report denied ones.
renderers
Record<string, CellRenderer>
{}
Custom cell renderers registered up front; reference one by name via Column.renderer. Also see defineCellRenderer.
editors
Record<string, CellEditor>
{}
Host-owned cell editors registered up front; reference one by name via Column.editor.
overscan
number
6
Row and visible-column positions painted on each viewport edge; 0 disables the buffer.
minColumns
number
workbook width
Minimum rendered/store column count. A spreadsheet also adds empty columns to fill the host width; a data-grid shows only its own columns unless you set minColumns.
config
GridConfig
undefined
Presence opts into the built-in toolbar (see below). Omit for no toolbar.
Framework adapters classify every GridOptions field centrally. workbook,
data, datasource, datasourceStorage, presentation, editors,
protectionResolver, mutationPolicy, and transactionResourceLimits create
an input-reset; renderer, workerUrl, and renderers create a
renderer-reset. theme, readOnly, config, overscan, and minColumns
update the existing grid live. Readiness includes the resulting generation and
reset reason.
Framework adapters also accept wasmSource. Initialization is process-wide and
first-source-wins: concurrent calls using the same source share one attempt, while
a different source rejects until that attempt settles. If the winning attempt
succeeds, every still-mounted adapter becomes ready even when its prop changed
during the attempt. Changing wasmSource after readiness warns and keeps the live
grid, selection, edits, generation, and ready-event count unchanged. A true
initialization failure remains observable through onInitializationError and a
later source can retry it.
Spreadsheet and data-grid presentation
presentation: "spreadsheet" is the backward-compatible default. It paints and
announces positional column headers (A, B, C, …). Use
presentation: "data-grid" when the columns describe row-object fields:
The semantic header occupies the same header band as A/B/C; it does not
consume row 0. Cell addresses, formulas, selections, row numbers, clipboard
payloads, CSV/XLSX schema labels, mutation events, and datasource ranges keep
their existing zero-based data coordinates. Table exports use Column.header
in both presentation modes. The data-first Sheetwrite components select
"data-grid" automatically because every SimpleColumn requires a title.
Presentation is construction-bound. Changing it through a framework adapter
replaces the grid with reason: "input-reset" rather than renaming columns or
moving data in place.
Host-supplied editors
Set Column.editor to a key in GridOptions.editors. A custom editor takes
precedence over the built-in validation-list editor. If the key is absent,
Sheetwrite falls back to validation editing or its stock text/date editor.
The returned value is parsed with the column's normal type and committed through
the same document transaction as stock editing. That preserves protection,
validation, mutation policy, undo/redo, change events, and edit-commit events.
An asynchronous commit remains bound to the data row captured at mount, even
when sorting or clearView() moves that row before the promise settles. If a
filter removes the row from the view, Sheetwrite cancels and aborts the pending
edit instead of retargeting another row. Returning a rejected promise,
undefined, or a non-string value from untyped JavaScript cancels without a
mutation. Enter commits and moves down, Tab/Shift+Tab commit and move
horizontally, and Escape cancels. Focus returns to the grid after commit or
cancel.
For remote choices, use the editor-owned AbortSignal; never let a late request
write into a destroyed editor:
One retained wrapper and one CellEditorInstance exist per active edit:
Hook / value
Guarantee
mount(host, context)
Runs once. The host is positioned over the active cell.
context.address / viewAddress
Canonical data-row and current displayed-row snapshots. They are readonly and mutating a JavaScript object received by the editor cannot retarget the edit.
context.value / text / initialInput
Resolved scalar, formatted text, and optional typed character.
context.label
Accessible name derived from semantic/positional header plus row number.
context.signal
Aborted before the editor's cancel() or destroy() hook on cancel, commit, reset, or unmount.
context.commit() / cancel()
Optional editor-driven completion using the canonical path. A non-string commit from untyped JavaScript cancels safely.
update(context)
External value, theme, zoom, view permutation, or geometry-sensitive state changed without replacing ownership.
reposition(rect)
The active cell moved or resized.
commit()
May return input synchronously or asynchronously; duplicate completion is ignored.
cancel()
Notification before a host-requested cancellation; the signal is already aborted.
destroy()
Runs exactly once; late async work must observe the aborted signal. A thrown hook error is reported without interrupting Sheetwrite's DOM, listener, or store cleanup.
editors is construction-bound so React/Vue/Svelte resets safely abort and
destroy an active editor before publishing the new grid generation. All adapters
accept the same registry:
The cancellable request API owns one visible-window generation. Pages can carry
authoritative formula source and style rather than only resolved scalars:
rows may contain scalars, CellValue objects, or
{ value: CellValue, style?: CellStyle } wrappers. Hydrated formulas,
references, and styles do not emit user change events. Short pages mark only the
returned rows loaded; malformed ranges emit datasource-error and remain
retryable. Resetting or destroying the grid aborts outstanding requests, and a
late page never overwrites a cell edited after that request began.
Dense storage is the default. { mode: "paged" } allocates
power-of-two row chunks only for loaded or locally edited areas; cacheBytes
bounds clean cached chunks, while dirty chunks remain pinned until
acknowledgement. Full-sheet queries and exports report incomplete data until all
required pages are loaded. Store.queryCapability(sheet) and
getCellLoadState(addr) expose that state.
Default chunk/cache values and eviction behavior are listed in Compatibility and limits.
Cells that visible formulas read
A visible formula can read cells outside the visible window, for example a
variance column that reads a plan column far to the right. The Grid asks the
engine which same-sheet cells the painted formulas read, also through other
formulas, and requests those cells with the window. This includes frozen bands,
overscan, and merge anchors reached by the paint plan. The formula then resolves
instead of staying #LOADING!. One shared 32,768-cell budget bounds dependency
loading across these roots, so a whole-column read does not load the full column
in one window. The painted cells and their bounded dependency closure remain
protected from clean-cache eviction while visible. Bulk reads such as exports
and search use separate, transient protection and do not replace the viewport's
pins. Reads from other sheets are not loaded this way; return those values
from the datasource or keep that sheet dense.
Serializable documents
Use WorkbookSnapshot plus validateWorkbookSnapshot() at persistence
boundaries. schemaVersion: 1 rejects unsupported future schemas with
structured errors. DocumentOp is the exhaustive reducer operation union,
including metadata and sheet lifecycle operations.
Session-only grid options such as renderer, readOnly, local zoom, selection,
scroll, search, and temporary highlights never belong in a snapshot.
createGridFromSnapshot(host, snapshot, options) validates and hydrates every
sheet before mounting. Hydration emits no change event or undo entry.
grid.exportSnapshot() uses bulk sheet reads and returns deterministic sparse
blocks. grid.applyRemoteOperations(operations) emits a change with
source: "remote" while remaining outside local undo history and
SyncCoordinator's outgoing queue. SyncCoordinator queues each non-empty local
transaction as an immutable mutation record. Its serverVersion option is
required and should come from the loaded snapshot.
sendNext() and retry(id) are host-controlled; retries retain the original
ID. subscribe(source) accepts a transport-neutral callback source and validates
strict version order. Use MemoryPersistenceAdapter as an executable,
server-sequenced reference—not as durable storage. Adapter methods accept
AbortSignal; transport failures use PersistenceError, while version
conflicts are typed commit responses that retain local work.
A CellRenderer paints or retains a DOM node for each cell in the rendered
window. When dom is present, it owns the cell content (the canvas still paints
the cell background, border, headers, and grid lines):
dom creates an element when a cell enters the bounded rendered window.
update receives that same element after values, styles, theme, zoom, size, or
scroll geometry change. destroy runs immediately before the element leaves
the window, is replaced by a newly registered renderer, or its grid is reset or
destroyed. Implement update to preserve focus and element-local state. A
legacy renderer with only dom is recreated when its value, style, theme, or
size changes, but not for a pure scroll.
DOM cells are clipped to the viewport and frozen pane that owns them. A merged
range produces one node for its anchor, not one node per covered cell. Plain
renderer output stays hidden from assistive technology because the compact ARIA
mirror already exposes its cell value. To make a renderer explicitly
interactive, return a native control (or add a non-negative tabindex), give it
an accessible name, and set element.style.pointerEvents = "auto". Keyboard
events from that control stay with the control instead of moving the grid.
With renderer: "worker", canvas hooks cannot cross the Worker boundary.
dom, update, and destroy still run on the main thread in the retained
overlay.
GridConfig (toolbar)
Set config to show the built-in toolbar. Each flag toggles one control; all
flags default to true when config is present. The one special case is
toolbar: false, which suppresses the toolbar entirely.
Undo / redo buttons (also bound to Ctrl+Z / Ctrl+Shift+Z).
¹ "Default true" means: when you supply a config object at all. With no
config there is no toolbar.
The export flag always enables CSV. Its XLSX button requires an explicit
optional installation and import "@sheetwrite/xlsx/register" before use; the
framework packages do not install an XLSX backend.
Direct grid.exportXlsx(...) calls reject on failure. Built-in toolbar and
context-menu actions show an alert and emit one export-error event for CSV or
XLSX failures. grid.actions.exportXlsx() returns a promise that does not reject.
Built-in buttons show a busy state and ignore repeated starts while their
command is pending.
Every control acts on the current selection — see Interaction.
Host-owned command state
Host chrome can use grid.actions without duplicating selection/history logic.
Query one command with grid.getCommandState(name) or subscribe to the complete
snapshot through command-state-change (onCommandStateChange in React/Svelte,
@command-state-change in Vue):
disabled accounts for read-only mode, empty selections, and undo/redo history.
Formatting commands report activity: "inactive" | "active" | "mixed" across
the current selection. The built-in toolbar uses the same contract, including
native disabled and aria-pressed="mixed". Aggregation is bounded; very large
selections conservatively report mixed rather than forcing an unbounded cell
walk.
Feature flags
Three GridConfig fields enable behavior that lives outside the toolbar row:
Field
Type
Default
Effect
find
boolean
true
Built-in Ctrl+F search box, next/previous controls, and live match count.
contextMenu
boolean | ContextMenuItems
true
Built-in right-click menu, disabled menu, static readonly rows, or a context-aware row factory.
icons
Partial<Record<ToolbarActionName, ToolbarIcon>>
undefined
Built-in toolbar icon overrides. Strings render as text; a DOM Node or () => Node supports SVG/HTML without innerHTML.
Context-menu items
The default menu contains copy, cut, paste, clear contents, row
insert/delete/hide/show/auto-fit, column insert/delete/hide/show/auto-fit,
clear column filter, merge, and unmerge actions, with separators between
groups. exportCsv and exportXlsx are also valid built-in actions in a
custom list.
ContextMenuItems is either a readonly ContextMenuItem[] or a factory
evaluated for each ContextMenuContext. An item may set a stable id,
built-in action, visible label, shortcut hint, and static or
context-aware visible/disabled policy. The lean context carries only
cell, clientX, and clientY. onClick(grid, cell) overrides action;
hidden separators are normalized.
For fully host-owned UI, set contextMenu: false, listen for the DOM
contextmenu event on the host, call
grid.getCellAtPoint(event.clientX, event.clientY), update selection, and
invoke grid.actions from the host menu. Sheetwrite does not prescribe the
host's event lifecycle:
Undo/redo and find are keyboard-driven and work without the toolbar: Ctrl+Z
undoes the last edit, Ctrl+Shift+Z redoes it, and Ctrl+F opens the find
widget (unless find: false).
grid.search(query, opts?) scans cells, highlights every match, scrolls the first
match into view, and emits a search event. findNext() / findPrev()
move the active match; clearSearch() clears the highlights. The built-in Ctrl+F
find widget (gated by config.find, on by default) drives this same API.
interface HTMLElementinterfaceHTMLElementinterfaceHTMLElementThe HTMLElement interface represents any HTML element. MDN Referenceinterface GridOptionsinterfaceGridOptionsinterfaceGridOptionsWorkbook, data, rendering, policy, and built-in UI options used to create a Grid.@example import type { GridOptions } from "@sheetwrite/core"; const options: GridOptions = { workbook: { activeSheet: "sheet1", sheets: [ { id: "sheet1", name: "Sheet 1", rowCount: 1, columns: [{ key: "name", header: "Name", type: "text", width: 120 }] }, ] }, data: { rowCount: 1, columns: { name: ["Ada"] } }, config: { toolbar: true, contextMenu: true, keyboard: true }, };@see createGrid *@see GridConfigAPI reference →interface GridinterfaceGridinterfaceGridImperative grid handle for document commands, events, rendering, and teardown.@example import type { Grid } from "@sheetwrite/core"; function updateTotal(grid: Grid) { const sheet = grid.getActiveSheet(); const result = grid.applyTransaction({ patches: [{ op: "set", addr: { sheet, row: 0, col: 0 }, value: { kind: "literal", value: 42 } }], }); if (result.status === "applied") grid.scrollToCell({ sheet, row: 0, col: 0 }); return grid.aggregate(0, "sum"); }@see createGrid *@see Grid.applyTransactionAPI reference →const workbook: Workbookconstworkbook:Workbookconstworkbook:WorkbookLive workbook schema adopted by the store and updated by document operations.API reference →interface WorkbookinterfaceWorkbookinterfaceWorkbookLive workbook schema containing ordered sheets and the active sheet ID.API reference →Workbook.activeSheet: stringinterfaceWorkbook {activeSheet:string;}interfaceWorkbook {activeSheet:string;}Active sheet ID and initial tab presented when the grid is created.API reference →Workbook.sheets: Sheet[]interfaceWorkbook {sheets:Sheet[];}interfaceWorkbook {sheets:Sheet[];}Sheets in display/tab order.API reference →Sheet.id: stringinterfaceSheet {id:string;}interfaceSheet {id:string;}Stable identifier, unique within the workbook and used by every cell address.API reference →Sheet.name: stringinterfaceSheet {name:string;}interfaceSheet {name:string;}User-facing sheet name shown in tabs and workbook exports.API reference →Sheet.rowCount: numberinterfaceSheet {rowCount:number;}interfaceSheet {rowCount:number;}Row count for both in-memory and datasource-backed sheets.API reference →const people: readonly Record<string, CellScalar>[]constpeople:readonlyRecord<string, CellScalar>[]constpeople:readonlyRecord<string,CellScalar>[]API reference →ReadonlyArray<Record<string, CellScalar>>.length: numberReadonlyArray<Record<string, CellScalar>>.length: numberReadonlyArray<Record<string, CellScalar>>.length: numberGets the length of the array. This is a number one higher than the highest element defined in an array.API reference →Sheet.columns: Column[]interfaceSheet {columns:Column[];}interfaceSheet {columns:Column[];}Ordered schema; array positions are the zero-based column coordinates.API reference →Column.key: stringinterfaceColumn {key:string;}interfaceColumn {key:string;}Non-empty key, unique within the sheet, used to map input and datasource values.API reference →Column.header: stringinterfaceColumn {header:string;}interfaceColumn {header:string;}Schema label used by table exports and data-grid presentation headers.API reference →Column.width: numberinterfaceColumn {width:number;}interfaceColumn {width:number;}Unzoomed column width in CSS pixels.API reference →Column.type: CellFormatinterfaceColumn {type:CellFormat;}interfaceColumn {type:CellFormat;}Controls cell input parsing and default value formatting for this column.API reference →const grid: Gridconstgrid:Gridconstgrid:GridThe imperative core grid this controller owns.API reference →function createGrid(host: HTMLElement, opts: GridOptions): GridfunctioncreateGrid(host:HTMLElement,opts:GridOptions,):GridfunctioncreateGrid(host:HTMLElement,opts:GridOptions,):GridCreates and mounts an imperative Grid in the supplied host element.@example import { createGrid, initSheetwrite } from "@sheetwrite/core"; await initSheetwrite(); const host = document.createElement("div"); host.style.height = "400px"; document.body.append(host); const grid = createGrid(host, { workbook: { activeSheet: "sales", sheets: [{ id: "sales", name: "Sales", rowCount: 2, columns: [{ key: "amount", header: "Amount", type: "number", width: 120 }] }], }, data: { rowCount: 2, columns: { amount: [12, 18] } }, }); grid.scrollToCell({ sheet: "sales", row: 1, col: 0 }); // Call when the host view is removed. grid.destroy();@see Grid *@see GridOptionsAPI reference →const host: HTMLElementconsthost:HTMLElementconsthost:HTMLElementGridOptions.workbook: WorkbookinterfaceGridOptions {workbook:Workbook;}interfaceGridOptions {workbook:Workbook;}Live workbook schema adopted by the store and updated by document operations.API reference →GridOptions.data?: ColumnarData | undefinedinterfaceGridOptions {data?:ColumnarData|undefined;}interfaceGridOptions {data?:ColumnarData|undefined;}Eager column-major values loaded into workbook.activeSheet; use instead of datasource.API reference →GridOptions.presentation?: GridPresentation | undefinedinterfaceGridOptions {presentation?:GridPresentation|undefined;}interfaceGridOptions {presentation?:GridPresentation|undefined;}Header presentation. Spreadsheet mode (default) paints positional A/B/C labels; data-grid mode paints each column's semantic header. Cell addressing, row indices, clipboard values, formulas, and exports are unchanged in both modes.API reference →interface CellEditorinterfaceCellEditorinterfaceCellEditorFramework-neutral named editor definition registered through GridOptions.editors.API reference →CellEditor.mount(host: HTMLElement, context: CellEditorContext): CellEditorInstanceCellEditor.mount(host: HTMLElement, context: CellEditorContext): CellEditorInstanceCellEditor.mount(host: HTMLElement, context: CellEditorContext): CellEditorInstancehost: HTMLElementlet host:HTMLElementlet host:HTMLElementcontext: CellEditorContextlet context:CellEditorContextlet context:CellEditorContextAPI reference →const select: HTMLSelectElementconstselect:HTMLSelectElementconstselect:HTMLSelectElementvar document: Documentvar document:Documentvar document:Documentwindow.document returns a reference to the document contained in the window. MDN ReferenceDocument.createElement<"select">(tagName: "select", options?: ElementCreationOptions): HTMLSelectElement (+2 overloads)Document.createElement<"select">(tagName: "select", options?: ElementCreationOptions): HTMLSelectElement (+2 overloads)Document.createElement<"select">(tagName: "select", options?: ElementCreationOptions): HTMLSelectElement (+2 overloads)In an HTML document, the document.createElement() method creates the HTML element specified by localName, or an HTMLUnknownElement if localName isn't recognized. MDN ReferenceElement.setAttribute(qualifiedName: string, value: string): voidElement.setAttribute(qualifiedName: string, value: string): voidElement.setAttribute(qualifiedName: string, value: string): voidThe setAttribute() method of the Element interface sets the value of an attribute on the specified element. MDN ReferenceCellEditorContext.label: stringinterfaceCellEditorContext {label:string;}interfaceCellEditorContext {label:string;}Menu row text. Defaults per action.API reference →const value: stringconstvalue:stringconstvalue:stringHTMLSelectElement.add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number | null): voidHTMLSelectElement.add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number |null): voidHTMLSelectElement.add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number |null): voidThe HTMLSelectElement.add() method adds an element to the collection of option elements for this select element. MDN Referencevar Option: new (text?: string, value?: string, defaultSelected?: boolean, selected?: boolean) => HTMLOptionElementvar Option:new (text?:string,value?:string,defaultSelected?:boolean,selected?:boolean,) =>HTMLOptionElementvar Option:new (text?:string,value?:string,defaultSelected?:boolean,selected?:boolean,) =>HTMLOptionElementHTMLSelectElement.value: stringinterfaceHTMLSelectElement {value:string;}interfaceHTMLSelectElement {value:string;}The HTMLSelectElement.value property contains the value of the first selected option element associated with this select element. MDN ReferenceCellEditorContext.text: stringinterfaceCellEditorContext {text:string;}interfaceCellEditorContext {text:string;}Formula source when the cell is a formula, else the literal display text.API reference →Node.appendChild<HTMLSelectElement>(node: HTMLSelectElement): HTMLSelectElementNode.appendChild<HTMLSelectElement>(node: HTMLSelectElement): HTMLSelectElementNode.appendChild<HTMLSelectElement>(node: HTMLSelectElement): HTMLSelectElementThe appendChild() method of the Node interface adds a node to the end of the list of children of a specified parent node. MDN ReferenceHTMLOrSVGElement.focus(options?: FocusOptions): voidHTMLOrSVGElement.focus(options?: FocusOptions): voidHTMLOrSVGElement.focus(options?: FocusOptions): voidMDN ReferenceCellEditorInstance.update(context: CellEditorContext): voidCellEditorInstance.update(context: CellEditorContext): voidCellEditorInstance.update(context: CellEditorContext): voidUpdates a retained element after its value, style, theme, or geometry changes.API reference →next: CellEditorContextlet next:CellEditorContextlet next:CellEditorContextAPI reference →CellEditorInstance.reposition(rect: CellEditorRect): voidCellEditorInstance.reposition(rect: CellEditorRect): voidCellEditorInstance.reposition(rect: CellEditorRect): voidrect: CellEditorRectlet rect:CellEditorRectlet rect:CellEditorRectAPI reference →ElementCSSInlineStyle.style: CSSStyleDeclarationinterfaceElementCSSInlineStyle {style:CSSStyleDeclaration;}interfaceElementCSSInlineStyle {style:CSSStyleDeclaration;}MDN ReferenceAPI reference →CSSStyleDeclaration.width: stringinterfaceCSSStyleDeclaration {width:string;}interfaceCSSStyleDeclaration {width:string;}MDN ReferenceAPI reference →CellEditorRect.width: numberinterfaceCellEditorRect {width:number;}interfaceCellEditorRect {width:number;}Unzoomed column width in CSS pixels.API reference →CSSStyleDeclaration.height: stringinterfaceCSSStyleDeclaration {height:string;}interfaceCSSStyleDeclaration {height:string;}MDN ReferenceAPI reference →CellEditorRect.height: numberinterfaceCellEditorRect {height:number;}interfaceCellEditorRect {height:number;}Host height in CSS pixels for numbers or any CSS length string.API reference →CellEditorInstance.commit(navigation: CellEditorNavigation): string | undefined | Promise<string | undefined>CellEditorInstance.commit(navigation: CellEditorNavigation): string |undefined|Promise<string |undefined>CellEditorInstance.commit(navigation: CellEditorNavigation): string |undefined|Promise<string |undefined>CellEditorInstance.cancel(): voidCellEditorInstance.cancel(): voidCellEditorInstance.cancel(): voidAPI reference →CellEditorInstance.destroy(): voidCellEditorInstance.destroy(): voidCellEditorInstance.destroy(): voidRuns immediately before a retained element is removed or replaced.API reference →HTMLSelectElement.remove(): void (+1 overload)HTMLSelectElement.remove(): void (+1 overload)HTMLSelectElement.remove(): void (+1 overload)The HTMLSelectElement.remove() method removes the element at the specified index from the options collection for this select element. MDN ReferenceGridOptions.editors?: Record<string, CellEditor> | undefinedinterfaceGridOptions {editors?:Record<string, CellEditor> |undefined;}interfaceGridOptions {editors?:|Record<string, CellEditor>|undefined;}Named custom editors resolved from each column's editor field.API reference →status: CellEditorlet status:CellEditorlet status:CellEditorAPI reference →const statusEditor: CellEditorconststatusEditor:CellEditorconststatusEditor:CellEditorAPI reference →const input: HTMLInputElementconstinput:HTMLInputElementconstinput:HTMLInputElementDocument.createElement<"input">(tagName: "input", options?: ElementCreationOptions): HTMLInputElement (+2 overloads)Document.createElement<"input">(tagName: "input", options?: ElementCreationOptions): HTMLInputElement (+2 overloads)Document.createElement<"input">(tagName: "input", options?: ElementCreationOptions): HTMLInputElement (+2 overloads)In an HTML document, the document.createElement() method creates the HTML element specified by localName, or an HTMLUnknownElement if localName isn't recognized. MDN Referenceconst list: HTMLDataListElementconstlist:HTMLDataListElementconstlist:HTMLDataListElementDocument.createElement<"datalist">(tagName: "datalist", options?: ElementCreationOptions): HTMLDataListElement (+2 overloads)Document.createElement<"datalist">(tagName: "datalist", options?: ElementCreationOptions): HTMLDataListElement (+2 overloads)Document.createElement<"datalist">(tagName: "datalist", options?: ElementCreationOptions): HTMLDataListElement (+2 overloads)In an HTML document, the document.createElement() method creates the HTML element specified by localName, or an HTMLUnknownElement if localName isn't recognized. MDN ReferenceElement.id: stringinterfaceElement {id:string;}interfaceElement {id:string;}The id property of the Element interface represents the element's identifier, reflecting the id global attribute. MDN ReferenceAPI reference →CellEditorContext.address: Readonly<CellAddress>interfaceCellEditorContext {address:Readonly<CellAddress>;}interfaceCellEditorContext {address:Readonly<CellAddress>;}Underlying data address, suitable for a set patch.API reference →row: numberlet row:numberlet row:numbercol: numberlet col:numberlet col:numberHTMLInputElement.value: stringinterfaceHTMLInputElement {value:string;}interfaceHTMLInputElement {value:string;}The value property of the HTMLInputElement interface represents the current value of the input element as a string. MDN ReferenceCellEditorContext.initialInput: string | undefinedinterfaceCellEditorContext {initialInput:string|undefined;}interfaceCellEditorContext {initialInput:string|undefined;}API reference →ParentNode.append(...nodes: (Node | string)[]): voidParentNode.append(...nodes: (Node | string)[]): voidParentNode.append(...nodes: (Node | string)[]): voidInserts nodes after the last child of node, while replacing strings in nodes with equivalent Text nodes. Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated. MDN Referencefunction fetch(input: string | URL | Request, init?: RequestInit): Promise<Response> (+2 overloads)
namespace fetchfunctionfetch(input:string|URL|Request, init?:RequestInit):Promise<Response> (+2overloads)namespacefetchfunctionfetch(input:string|URL|Request, init?:RequestInit):Promise<Response> (+2overloads)namespacefetchMDN Referencefunction encodeURIComponent(uriComponent: string | number | boolean): stringfunctionencodeURIComponent(uriComponent:string|number|boolean,):stringfunctionencodeURIComponent(uriComponent:string|number|boolean,):stringEncodes a text string as a valid component of a Uniform Resource Identifier (URI).@param uriComponent A value representing an unencoded URI component.RequestInit.signal?: AbortSignal | null | undefinedinterfaceRequestInit {signal?:AbortSignal|null|undefined;}interfaceRequestInit {signal?:|AbortSignal|null|undefined;}An AbortSignal to set request's signal.API reference →CellEditorContext.signal: AbortSignalinterfaceCellEditorContext {signal:AbortSignal;}interfaceCellEditorContext {signal:AbortSignal;}Abort before or between bounded codec operations.API reference →Promise<Response>.then<{
id: string;
name: string;
}[], never>(onfulfilled?: ((value: Response) => {
id: string;
name: string;
}[] | PromiseLike<{
id: string;
name: string;
}[]>) | null | undefined, onrejected?: ((reason: any) => PromiseLike<never>) | null | undefined): Promise<{
id: string;
name: string;
}[]>Promise<Response>.then<{id:string;name:string;}[], never>(onfulfilled?: ((value:Response) => {id: string;name: string;}[] |PromiseLike<{id:string;name:string;}[]>) |null|undefined, onrejected?: ((reason:any) => PromiseLike<never>) |null|undefined): Promise<{id:string;name:string;}[]>Promise<Response>.then<{id:string;name:string;}[], never>(onfulfilled?: ((value:Response) => {id: string;name: string;}[] |PromiseLike<{id:string;name:string;}[]>) |null|undefined, onrejected?: ((reason:any) => PromiseLike<never>) |null|undefined): Promise<{id:string;name:string;}[]>Attaches callbacks for the resolution and/or rejection of the Promise.@param onfulfilled The callback to execute when the Promise is resolved.@param onrejected The callback to execute when the Promise is rejected.@returns A Promise for the completion of which ever callback is executed.response: Responselet response:Responselet response:ResponseBody.json(): Promise<any>Body.json(): Promise<any>Body.json(): Promise<any>MDN Referenceinterface Promise<T>interfacePromise<T>interfacePromise<T>Represents the completion of an asynchronous operationinterface Array<T>interfaceArray<T>interfaceArray<T>id: stringlet id:stringlet id:stringStable identity used by operations, history, and collaboration rebase.API reference →name: stringlet name:stringlet name:stringUser-facing sheet name shown in tabs and workbook exports.API reference →Promise<{ id: string; name: string; }[]>.then<void, never>(onfulfilled?: ((value: {
id: string;
name: string;
}[]) => void | PromiseLike<void>) | null | undefined, onrejected?: ((reason: any) => PromiseLike<never>) | null | undefined): Promise<void>Promise<{ id: string; name: string; }[]>.then<void, never>(onfulfilled?: ((value: {id:string;name:string;}[]) =>void| PromiseLike<void>) |null|undefined, onrejected?: ((reason:any) => PromiseLike<never>) |null|undefined): Promise<void>Promise<{ id: string; name: string; }[]>.then<void, never>(onfulfilled?: ((value: {id:string;name:string;}[]) =>void| PromiseLike<void>) |null|undefined, onrejected?: ((reason:any) => PromiseLike<never>) |null|undefined): Promise<void>Attaches callbacks for the resolution and/or rejection of the Promise.@param onfulfilled The callback to execute when the Promise is resolved.@param onrejected The callback to execute when the Promise is rejected.@returns A Promise for the completion of which ever callback is executed.people: {
id: string;
name: string;
}[]let people: {id:string;name:string;}[]let people: {id:string;name:string;}[]AbortSignal.aborted: booleaninterfaceAbortSignal {aborted:boolean;}interfaceAbortSignal {aborted:boolean;}The aborted read-only property returns a value that indicates whether the asynchronous operations the signal is communicating with are aborted (true) or not (false). MDN ReferenceParentNode.replaceChildren(...nodes: (Node | string)[]): voidParentNode.replaceChildren(...nodes: (Node | string)[]): voidParentNode.replaceChildren(...nodes: (Node | string)[]): voidReplace all children of node with nodes, while replacing strings in nodes with equivalent Text nodes. Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated. MDN ReferenceArray<{ id: string; name: string; }>.map<HTMLOptionElement>(callbackfn: (value: {
id: string;
name: string;
}, index: number, array: {
id: string;
name: string;
}[]) => HTMLOptionElement, thisArg?: any): HTMLOptionElement[]Array<{ id: string; name: string; }>.map<HTMLOptionElement>(callbackfn: (value: {id:string;name:string;}, index:number, array: {id:string;name:string;}[]) => HTMLOptionElement, thisArg?: any): HTMLOptionElement[]Array<{ id: string; name: string; }>.map<HTMLOptionElement>(callbackfn: (value: {id:string;name:string;}, index:number, array: {id:string;name:string;}[]) => HTMLOptionElement, thisArg?: any): HTMLOptionElement[]Calls a defined callback function on each element of an array, and returns an array that contains the results.@param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.@param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.person: {
id: string;
name: string;
}let person: {id:string;name:string;}let person: {id:string;name:string;}const option: HTMLOptionElementconstoption:HTMLOptionElementconstoption:HTMLOptionElementDocument.createElement<"option">(tagName: "option", options?: ElementCreationOptions): HTMLOptionElement (+2 overloads)Document.createElement<"option">(tagName: "option", options?: ElementCreationOptions): HTMLOptionElement (+2 overloads)Document.createElement<"option">(tagName: "option", options?: ElementCreationOptions): HTMLOptionElement (+2 overloads)In an HTML document, the document.createElement() method creates the HTML element specified by localName, or an HTMLUnknownElement if localName isn't recognized. MDN ReferenceHTMLOptionElement.value: stringinterfaceHTMLOptionElement {value:string;}interfaceHTMLOptionElement {value:string;}The value property of the HTMLOptionElement interface represents the value of the option element as a string, or the empty string if no value is set. MDN ReferenceHTMLOrSVGElement.dataset: DOMStringMapinterfaceHTMLOrSVGElement {dataset:DOMStringMap;}interfaceHTMLOrSVGElement {dataset:DOMStringMap;}MDN ReferenceDOMStringMap[string]: string | undefinedDOMStringMap[string]: string |undefinedDOMStringMap[string]: string |undefinedStable identity used by operations, history, and collaboration rebase.API reference →Promise<void>.catch<void>(onrejected?: ((reason: any) => void | PromiseLike<void>) | null | undefined): Promise<void>Promise<void>.catch<void>(onrejected?: ((reason:any) =>void| PromiseLike<void>) |null|undefined): Promise<void>Promise<void>.catch<void>(onrejected?: ((reason:any) =>void| PromiseLike<void>) |null|undefined): Promise<void>Attaches a callback for only the rejection of the Promise.@param onrejected The callback to execute when the Promise is rejected.@returns A Promise for the completion of the callback.error: unknownlet error:unknownlet error:unknownvar DOMException: {
new (message?: string, name?: string): DOMException;
prototype: DOMException;
readonly INDEX_SIZE_ERR: 1;
readonly DOMSTRING_SIZE_ERR: 2;
readonly HIERARCHY_REQUEST_ERR: 3;
readonly WRONG_DOCUMENT_ERR: 4;
readonly INVALID_CHARACTER_ERR: 5;
readonly NO_DATA_ALLOWED_ERR: 6;
readonly NO_MODIFICATION_ALLOWED_ERR: 7;
readonly NOT_FOUND_ERR: 8;
readonly NOT_SUPPORTED_ERR: 9;
readonly INUSE_ATTRIBUTE_ERR: 10;
readonly INVALID_STATE_ERR: 11;
readonly SYNTAX_ERR: 12;
readonly INVALID_MODIFICATION_ERR: 13;
readonly NAMESPACE_ERR: 14;
readonly INVALID_ACCESS_ERR: 15;
... 9 more ...;
readonly DATA_CLONE_ERR: 25;
}var DOMException: {new (message?:string, name?:string):DOMException;prototype:DOMException;readonlyINDEX_SIZE_ERR:1;readonlyDOMSTRING_SIZE_ERR:2;readonlyHIERARCHY_REQUEST_ERR:3;readonlyWRONG_DOCUMENT_ERR:4;readonlyINVALID_CHARACTER_ERR:5;readonlyNO_DATA_ALLOWED_ERR:6;readonlyNO_MODIFICATION_ALLOWED_ERR:7;readonlyNOT_FOUND_ERR:8;readonlyNOT_SUPPORTED_ERR:9;readonlyINUSE_ATTRIBUTE_ERR:10;readonlyINVALID_STATE_ERR:11;readonlySYNTAX_ERR:12;readonlyINVALID_MODIFICATION_ERR:13;readonlyNAMESPACE_ERR:14;readonlyINVALID_ACCESS_ERR:15;...9more ...;readonlyDATA_CLONE_ERR:25;}var DOMException: {new (message?:string, name?:string):DOMException;prototype:DOMException;readonlyINDEX_SIZE_ERR:1;readonlyDOMSTRING_SIZE_ERR:2;readonlyHIERARCHY_REQUEST_ERR:3;readonlyWRONG_DOCUMENT_ERR:4;readonlyINVALID_CHARACTER_ERR:5;readonlyNO_DATA_ALLOWED_ERR:6;readonlyNO_MODIFICATION_ALLOWED_ERR:7;readonlyNOT_FOUND_ERR:8;readonlyNOT_SUPPORTED_ERR:9;readonlyINUSE_ATTRIBUTE_ERR:10;readonlyINVALID_STATE_ERR:11;readonlySYNTAX_ERR:12;readonlyINVALID_MODIFICATION_ERR:13;readonlyNAMESPACE_ERR:14;readonlyINVALID_ACCESS_ERR:15;...9more ...;readonlyDATA_CLONE_ERR:25;}The DOMException interface represents an abnormal event (called an exception) that occurs as a result of calling a method or accessing a property of a web API. MDN Reference An abnormal event (called an exception) that occurs when calling a method or accessing a property of a web APIerror: DOMExceptionlet error:DOMExceptionlet error:DOMExceptionDOMException.name: stringinterfaceDOMException {name:string;}interfaceDOMException {name:string;}The name read-only property of the one of the strings associated with an error name. MDN ReferenceAPI reference →var Promise: PromiseConstructorvar Promise:PromiseConstructorvar Promise:PromiseConstructorRepresents the completion of an asynchronous operationPromiseConstructor.resolve(): Promise<void> (+2 overloads)PromiseConstructor.resolve(): Promise<void> (+2 overloads)PromiseConstructor.resolve(): Promise<void> (+2 overloads)Creates a new resolved promise.@returns A resolved promise.ChildNode.remove(): voidChildNode.remove(): voidChildNode.remove(): voidRemoves node. MDN Referenceconst SheetwriteGrid: <Id extends RowBridgeId = RowBridgeId>(props: SheetwriteGridProps<Id> & {
ref?: ForwardedRef<Grid>;
}) => ReactElementconstSheetwriteGrid: <IdextendsRowBridgeId=RowBridgeId,>(props:SheetwriteGridProps<Id> & {ref?:ForwardedRef<Grid>;},) =>ReactElementconstSheetwriteGrid: <IdextendsRowBridgeId=RowBridgeId,>(props:SheetwriteGridProps<Id> & {ref?:ForwardedRef<Grid>;},) =>ReactElementAdvanced framework component with inferred row-bridge identity.@example import { SheetwriteGrid } from "@sheetwrite/react"; import type { Workbook } from "@sheetwrite/core"; export function WorkbookView({ workbook }: { workbook: Workbook }) { return <SheetwriteGrid workbook={workbook} height={400} />; }@see Sheetwrite *@see /docs/frameworks/react/API reference →ref?: ForwardedRef<Grid> | undefinedref?: ForwardedRef<Grid>|undefinedref?: ForwardedRef<Grid>|undefinedAPI reference →const gridRef: Grid | nullconstgridRef:Grid|nullconstgridRef:Grid|nullAPI reference →const data: ColumnarDataconstdata:ColumnarDataconstdata:ColumnarDataEager column-major values loaded into workbook.activeSheet; use instead of datasource.API reference →assignee: CellEditorlet assignee:CellEditorlet assignee:CellEditorAPI reference →const assigneeAutocomplete: CellEditorconstassigneeAutocomplete:CellEditorconstassigneeAutocomplete:CellEditorAPI reference →GridAdapterEventHandlers<RowBridgeId>.onCommandStateChange?: ((event: GridEvents["command-state-change"]) => void) | undefinedinterfaceGridAdapterEventHandlers<RowBridgeId> {onCommandStateChange?:| ((event:GridEvents["command-state-change"]) =>void)|undefined;}interfaceGridAdapterEventHandlers<RowBridgeId,> {onCommandStateChange?:| ((event:GridEvents["command-state-change"],) =>void)|undefined;}Receives observable undo/redo and formatting command state.API reference →states: Readonly<Record<GridCommandName, GridCommandState>>let states:Readonly<Record<GridCommandName, GridCommandState>>let states:Readonly<Record<GridCommandName,GridCommandState>>const setCommandStates: (states: Readonly<Record<GridCommandName, GridCommandState>>) => voidconstsetCommandStates: (states:Readonly<Record<GridCommandName, GridCommandState>>,) =>voidconstsetCommandStates: (states:Readonly<Record<GridCommandName,GridCommandState>>,) =>voidconst SheetwriteGrid: Component<SheetwriteGridProps<RowBridgeId>, {}, "grid">constSheetwriteGrid:Component<SheetwriteGridProps<RowBridgeId>,{},"grid">constSheetwriteGrid:Component<SheetwriteGridProps<RowBridgeId>,{},"grid">Advanced framework component for workbook data or datasource input.API reference →grid: Gridlet grid:Gridlet grid:GridThe imperative core grid this controller owns.API reference →workbook: Workbooklet workbook:Workbooklet workbook:WorkbookLive workbook schema adopted by the store and updated by document operations.API reference →data: ColumnarDatalet data:ColumnarDatalet data:ColumnarDataEager column-major values loaded into workbook.activeSheet; use instead of datasource.API reference →event: GridCommandStateChangeEventlet event:GridCommandStateChangeEventlet event:GridCommandStateChangeEventAPI reference →interface GridEventsinterfaceGridEventsinterfaceGridEventsPayload map for events emitted by a Grid.API reference →let commandStates: Readonly<Record<GridCommandName, GridCommandState>>let commandStates:Readonly<Record<GridCommandName, GridCommandState>>let commandStates:Readonly<Record<GridCommandName,GridCommandState>>GridCommandStateChangeEvent.states: Readonly<Record<GridCommandName, GridCommandState>>interfaceGridCommandStateChangeEvent {states:Readonly<Record<GridCommandName, GridCommandState>>;}interfaceGridCommandStateChangeEvent {states:Readonly<Record<GridCommandName,GridCommandState>>;}interface DataSourceinterfaceDataSourceinterfaceDataSourceHost callback that asynchronously loads cancellable rectangular pages.@example import type { DataSource, RowData } from "@sheetwrite/core"; const rows: RowData[] = [{ amount: 12 }, { amount: 18 }]; const datasource: DataSource = { capabilities: { protocol: 2, columns: "windowed" }, async getRows(request) { request.signal.throwIfAborted(); return { protocol: 2, start: request.start, columns: request.columns, rows: rows.slice(request.start, request.end).map((row) => Object.fromEntries(request.columns.flatMap((band) => band.keys.map((key) => [key, row[key] ?? null])))), }; }, };@see GridOptions.datasource *@see DataSourceRequestAPI reference →ApiRow.label: stringinterfaceApiRow {label:string;}interfaceApiRow {label:string;}Menu row text. Defaults per action.API reference →ApiRow.quantity: numberinterfaceApiRow {quantity:number;}interfaceApiRow {quantity:number;}ApiRow.price: numberinterfaceApiRow {price:number;}interfaceApiRow {price:number;}const datasource: DataSourceconstdatasource:DataSourceconstdatasource:DataSourceLazy row provider requested for visible windows; use instead of eager data.API reference →DataSource.getRows(request: DataSourceRequest): Promise<DataSourcePage>DataSource.getRows(request: DataSourceRequest): Promise<DataSourcePage>DataSource.getRows(request: DataSourceRequest): Promise<DataSourcePage>Loads the requested rows and columns; implementations should stop work when its signal aborts.API reference →sheet: stringlet sheet:stringlet sheet:stringSheet identity used by the simple data-first adapter. Defaults to sheet1.API reference →start: numberlet start:numberlet start:numberInclusive row index.API reference →end: numberlet end:numberlet end:numberExclusive row index.API reference →signal: AbortSignallet signal:AbortSignallet signal:AbortSignalAbort before or between bounded codec operations.API reference →revision: numberlet revision:numberlet revision:numberconst response: Responseconstresponse:Responseconstresponse:ResponseResponse.ok: booleaninterfaceResponse {ok:boolean;}interfaceResponse {ok:boolean;}The ok read-only property of the Response interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not. MDN Referencevar Error: ErrorConstructor
new (message?: string, options?: ErrorOptions) => Error (+2 overloads)var Error:ErrorConstructornew (message?:string, options?:ErrorOptions) =>Error (+2 overloads)var Error:ErrorConstructornew (message?:string, options?:ErrorOptions) =>Error (+2 overloads)Response.status: numberinterfaceResponse {status:number;}interfaceResponse {status:number;}The status read-only property of the Response interface contains the HTTP status codes of the response. MDN Referenceconst records: ApiRow[]constrecords:ApiRow[]constrecords:ApiRow[]interface ApiRowinterfaceApiRowinterfaceApiRowDataSourcePage.start: numberinterfaceDataSourcePage {start:number;}interfaceDataSourcePage {start:number;}Inclusive row index of the first returned row.API reference →DataSourcePage.revision?: string | number | undefinedinterfaceDataSourcePage {revision?:string|number|undefined;}interfaceDataSourcePage {revision?:string|number|undefined;}API reference →Response.headers: HeadersinterfaceResponse {headers:Headers;}interfaceResponse {headers:Headers;}The headers read-only property of the with the response. MDN ReferenceHeaders.get(name: string): string | nullHeaders.get(name: string): string |nullHeaders.get(name: string): string |nullThe get() method of the Headers interface returns a byte string of all the values of a header within a Headers object with a given name. MDN ReferenceDataSourcePage.rows: RowData[]interfaceDataSourcePage {rows:RowData[];}interfaceDataSourcePage {rows:RowData[];}end-exclusive row rangeAPI reference →Array<ApiRow>.map<{
label: string;
quantity: number;
price: number;
total: {
value: {
kind: "formula";
src: string;
};
style: {
numberFormat: string;
bold: true;
};
};
}>(callbackfn: (value: ApiRow, index: number, array: ApiRow[]) => {
label: string;
quantity: number;
price: number;
total: {
value: {
kind: "formula";
src: string;
};
style: {
numberFormat: string;
bold: true;
};
};
}, thisArg?: any): {
label: string;
quantity: number;
price: number;
total: {
value: {
kind: "formula";
src: string;
};
style: {
numberFormat: string;
bold: true;
};
};
}[]Array<ApiRow>.map<{label:string;quantity:number;price:number;total: {value: {kind:"formula";src:string;};style: {numberFormat:string;bold:true;};};}>(callbackfn: (value:ApiRow, index:number, array:ApiRow[]) => {label:string;quantity:number;price:number;total: {value: {kind:"formula";src:string;};style: {numberFormat:string;bold:true;};};}, thisArg?:any): {label:string;quantity:number;price:number;total: {value: {kind:"formula";src:string;};style: {numberFormat:string;bold:true;};};}[]Array<ApiRow>.map<{label:string;quantity:number;price:number;total: {value: {kind:"formula";src:string;};style: {numberFormat:string;bold:true;};};}>(callbackfn: (value:ApiRow, index:number, array:ApiRow[]) => {label:string;quantity:number;price:number;total: {value: {kind:"formula";src:string;};style: {numberFormat:string;bold:true;};};}, thisArg?:any): {label:string;quantity:number;price:number;total: {value: {kind:"formula";src:string;};style: {numberFormat:string;bold:true;};};}[]Calls a defined callback function on each element of an array, and returns an array that contains the results.@param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.@param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.record: ApiRowlet record:ApiRowlet record:ApiRowindex: numberlet index:numberlet index:numberZero-based position of this version in the batch.API reference →label: stringlet label:stringlet label:stringMenu row text. Defaults per action.API reference →quantity: numberlet quantity:numberlet quantity:numberprice: numberlet price:numberlet price:numbertotal: {
value: {
kind: "formula";
src: string;
};
style: {
numberFormat: string;
bold: true;
};
}let total: {value: {kind:"formula";src:string;};style: {numberFormat:string;bold:true;};}let total: {value: {kind:"formula";src:string;};style: {numberFormat:string;bold:true;};}value: {
kind: "formula";
src: string;
}let value: {kind:"formula";src:string;}let value: {kind:"formula";src:string;}src: stringlet src:stringlet src:stringstyle: {
numberFormat: string;
bold: true;
}let style: {numberFormat:string;bold:true;}let style: {numberFormat:string;bold:true;}Optional override merged over the deterministic blue/underline link style.API reference →numberFormat: stringlet numberFormat:stringlet numberFormat:stringExcel number-format code, e.g. "#,##0.00"API reference →bold: truelet bold:truelet bold:trueUses the bold variant of the theme font.API reference →interface CellRenderer
interface CellRendererinterfaceCellRendererinterfaceCellRendererinterfaceCellRendererinterfaceCellRendererCustom cell renderer hooks for the main-thread canvas or retained DOM overlay.API reference →CellRenderer.canvas?(ctx: CanvasRenderingContext2D, c: CellPaintContext): voidCellRenderer.canvas?(ctx:CanvasRenderingContext2D, c:CellPaintContext):voidCellRenderer.canvas?(ctx:CanvasRenderingContext2D, c:CellPaintContext):voidinterface CanvasRenderingContext2DinterfaceCanvasRenderingContext2DinterfaceCanvasRenderingContext2DThe CanvasRenderingContext2D interface, part of the Canvas API, provides the 2D rendering context for the drawing surface of a canvas element. MDN Referenceinterface CellPaintContextinterfaceCellPaintContextinterfaceCellPaintContextRead-only cell value and screen geometry supplied to a custom renderer.API reference →CellRenderer.dom?(c: CellPaintContext): HTMLElementCellRenderer.dom?(c:CellPaintContext):HTMLElementCellRenderer.dom?(c:CellPaintContext):HTMLElementCreates a fresh, detached element uniquely owned by one retained DOM cell.API reference →CellRenderer.update?(element: HTMLElement, c: CellPaintContext): voidCellRenderer.update?(element:HTMLElement, c:CellPaintContext):voidCellRenderer.update?(element:HTMLElement, c:CellPaintContext):voidUpdates a retained element after its value, style, theme, or geometry changes.API reference →element: HTMLElementlet element:HTMLElementlet element:HTMLElementThe shell's root element (already appended to the mount host).API reference →CellRenderer.destroy?(element: HTMLElement): voidCellRenderer.destroy?(element:HTMLElement):voidCellRenderer.destroy?(element:HTMLElement):voidRuns immediately before a retained element is removed or replaced.API reference →GridOptions.config?: GridConfig | undefinedinterfaceGridOptions {config?:GridConfig|undefined;}interfaceGridOptions {config?:GridConfig|undefined;}Built-in UI controls; providing an object enables the toolbar unless toolbar is false.API reference →GridConfig.sort?: boolean | undefinedinterfaceGridConfig {sort?:boolean|undefined;}interfaceGridConfig {sort?:boolean|undefined;}Show ascending and descending sort controls in the default toolbar (default true).API reference →GridConfig.toolbar?: boolean | ToolbarItem[] | undefinedinterfaceGridConfig {toolbar?:boolean|ToolbarItem[] |undefined;}interfaceGridConfig {toolbar?:|boolean|ToolbarItem[]|undefined;}Show the built-in toolbar (true), hide it (false), or supply a custom item list.API reference →const update: (bold: GridCommandState, undo: GridCommandState) => voidconstupdate: (bold:GridCommandState,undo:GridCommandState,) =>voidconstupdate: (bold:GridCommandState,undo:GridCommandState,) =>voidUpdates a retained element after its value, style, theme, or geometry changes.API reference →bold: GridCommandStatelet bold:GridCommandStatelet bold:GridCommandStateUses the bold variant of the theme font.API reference →interface GridCommandStateinterfaceGridCommandStateinterfaceGridCommandStateObservable availability and selection-derived activity for one command.API reference →undo: GridCommandStatelet undo:GridCommandStatelet undo:GridCommandStateUndo the last recorded cell edit. If the restored data is above the transaction resource limits, nothing changes: the Grid emits mutation-rejected and removes that entry, so older edits stay undoable. @example import type { Grid } from "@sheetwrite/core"; function undoAndRestore(grid: Grid) { grid.undo(); grid.redo(); } @see Grid.redoAPI reference →const undoButton: HTMLButtonElementconstundoButton:HTMLButtonElementconstundoButton:HTMLButtonElementHTMLButtonElement.disabled: booleaninterfaceHTMLButtonElement {disabled:boolean;}interfaceHTMLButtonElement {disabled:boolean;}The HTMLButtonElement.disabled property indicates whether the control is disabled, meaning that it does not accept any clicks. MDN ReferenceAPI reference →GridCommandState.disabled: booleaninterfaceGridCommandState {disabled:boolean;}interfaceGridCommandState {disabled:boolean;}Static or context-aware disabled state.API reference →const boldButton: HTMLButtonElementconstboldButton:HTMLButtonElementconstboldButton:HTMLButtonElementGridCommandState.activity: "inactive" | "active" | "mixed"interfaceGridCommandState {activity:"inactive"|"active"|"mixed";}interfaceGridCommandState {activity:|"inactive"|"active"|"mixed";}API reference →var String: StringConstructor
(value?: any) => stringvar String:StringConstructor;(value?:any) => stringvar String:StringConstructor;(value?:any) => stringAllows manipulation and formatting of text strings and determination and location of substrings within strings.GridCommandState.activity: "inactive" | "active"interfaceGridCommandState {activity:"inactive"|"active";}interfaceGridCommandState {activity:"inactive"|"active";}API reference →Grid.getCommandState(command: GridCommandName): GridCommandStateGrid.getCommandState(command: GridCommandName): GridCommandStateGrid.getCommandState(command: GridCommandName): GridCommandStateQuery undo/redo availability and formatting active/mixed/disabled state.API reference →const stop: () => voidconststop: () =>voidconststop: () =>voidGrid.on<"command-state-change">(evt: "command-state-change", fn: (e: GridCommandStateChangeEvent) => void): () => voidGrid.on<"command-state-change">(evt: "command-state-change", fn: (e:GridCommandStateChangeEvent) =>void): () =>voidGrid.on<"command-state-change">(evt: "command-state-change", fn: (e:GridCommandStateChangeEvent) =>void): () =>voidHTMLButtonElement.addEventListener<"click">(type: "click", listener: (this: HTMLButtonElement, ev: PointerEvent) => any, options?: boolean | AddEventListenerOptions): void (+1 overload)HTMLButtonElement.addEventListener<"click">(type: "click", listener: (this:HTMLButtonElement, ev:PointerEvent) => any, options?: boolean | AddEventListenerOptions): void (+1 overload)HTMLButtonElement.addEventListener<"click">(type: "click", listener: (this:HTMLButtonElement, ev:PointerEvent) => any, options?: boolean | AddEventListenerOptions): void (+1 overload)The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target. MDN Reference The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target. MDN ReferenceGrid.actions: GridActionsinterfaceGrid {actions:GridActions;}interfaceGrid {actions:GridActions;}Imperative action surface for binding custom toolbars/menus.API reference →GridActions.toggleBold(): voidGridActions.toggleBold(): voidGridActions.toggleBold(): voidAPI reference →GridActions.undo(): voidGridActions.undo(): voidGridActions.undo(): voidUndo the last recorded cell edit. If the restored data is above the transaction resource limits, nothing changes: the Grid emits mutation-rejected and removes that entry, so older edits stay undoable. @example import type { Grid } from "@sheetwrite/core"; function undoAndRestore(grid: Grid) { grid.undo(); grid.redo(); } @see Grid.redoAPI reference →const config: {
contextMenu: (context: ContextMenuContext) => ({
id: string;
action: "copy";
label: string;
shortcut: "copy";
visible?: undefined;
disabled?: undefined;
onClick?: undefined;
} | {
action: "separator";
id?: undefined;
label?: undefined;
shortcut?: undefined;
visible?: undefined;
disabled?: undefined;
onClick?: undefined;
} | {
id: string;
label: string;
visible: boolean;
disabled: ({ cell }: ContextMenuContext) => boolean;
onClick(grid: Grid, cell: CellAddress | null): void;
action?: undefined;
shortcut?: undefined;
} | {
action: "exportCsv";
... 5 more ...;
onClick?: undefined;
})[];
}constconfig: {contextMenu: (context:ContextMenuContext) => ({id:string;action:"copy";label:string;shortcut:"copy";visible?:undefined;disabled?:undefined;onClick?:undefined;} | {action:"separator";id?:undefined;label?:undefined;shortcut?:undefined;visible?:undefined;disabled?:undefined;onClick?:undefined;} | {id:string;label:string;visible:boolean;disabled: ({ cell }:ContextMenuContext) =>boolean;onClick(grid:Grid, cell:CellAddress|null):void;action?:undefined;shortcut?:undefined;} | {action:"exportCsv";...5more ...;onClick?:undefined;})[];}constconfig: {contextMenu: (context:ContextMenuContext) => ({id:string;action:"copy";label:string;shortcut:"copy";visible?:undefined;disabled?:undefined;onClick?:undefined;} | {action:"separator";id?:undefined;label?:undefined;shortcut?:undefined;visible?:undefined;disabled?:undefined;onClick?:undefined;} | {id:string;label:string;visible:boolean;disabled: ({ cell }:ContextMenuContext) =>boolean;onClick(grid:Grid, cell:CellAddress|null):void;action?:undefined;shortcut?:undefined;} | {action:"exportCsv";...5more ...;onClick?:undefined;})[];}Built-in UI controls; providing an object enables the toolbar unless toolbar is false.API reference →GridConfig.contextMenu?: boolean | ContextMenuItems | undefinedinterfaceGridConfig {contextMenu?:boolean|ContextMenuItems|undefined;}interfaceGridConfig {contextMenu?:|boolean|ContextMenuItems|undefined;}Built-in menu, disabled menu, static rows, or a request-aware row factory.API reference →context: ContextMenuContextlet context:ContextMenuContextlet context:ContextMenuContextAPI reference →ContextMenuItem.id?: string | undefinedinterfaceContextMenuItem {id?:string|undefined;}interfaceContextMenuItem {id?:string|undefined;}Stable host identifier, exposed as data-context-menu-item.API reference →ContextMenuItem.action?: ContextMenuActionName | undefinedinterfaceContextMenuItem {action?:ContextMenuActionName|undefined;}interfaceContextMenuItem {action?:|ContextMenuActionName|undefined;}Built-in action to bind (or "separator"). Omit when supplying onClick.API reference →ContextMenuItem.label?: string | undefinedinterfaceContextMenuItem {label?:string|undefined;}interfaceContextMenuItem {label?:string|undefined;}Menu row text. Defaults per action.API reference →ContextMenuItem.shortcut?: KeyboardAction | KeyShortcut | undefinedinterfaceContextMenuItem {shortcut?:KeyboardAction|KeyShortcut|undefined;}interfaceContextMenuItem {shortcut?:|KeyboardAction|KeyShortcut|undefined;}A bound action name or a custom key combination. An explicit combination registers onClick as a keyboard command; action names only reference the existing built-in binding. Both forms display platform-aware labels. For example, shortcut: "copy" follows the configured Copy binding, while shortcut: "Mod+Shift+K" binds this item's onClick callback. See KeyboardOptions for built-in action overrides.API reference →ContextMenuItem.visible?: boolean | ((context: ContextMenuContext) => boolean) | undefinedinterfaceContextMenuItem {visible?:|boolean| ((context:ContextMenuContext) =>boolean)|undefined;}interfaceContextMenuItem {visible?:|boolean| ((context:ContextMenuContext,) =>boolean)|undefined;}Static or request-aware visibility. Hidden separators are normalized.API reference →ContextMenuContext.cell: CellAddress | nullinterfaceContextMenuContext {cell:CellAddress|null;}interfaceContextMenuContext {cell:CellAddress|null;}Right-clicked cell, or null when the pointer is outside the cell body.API reference →ContextMenuItem.disabled?: boolean | ((context: ContextMenuContext) => boolean) | undefinedinterfaceContextMenuItem {disabled?:|boolean| ((context:ContextMenuContext) =>boolean)|undefined;}interfaceContextMenuItem {disabled?:|boolean| ((context:ContextMenuContext,) =>boolean)|undefined;}Static or context-aware disabled state.API reference →cell: CellAddress | nulllet cell:CellAddress|nulllet cell:CellAddress|nullRight-clicked cell, or null when the pointer is outside the cell body.API reference →ContextMenuItem.onClick?: ((grid: Grid, cell: CellAddress | null) => void) | undefinedinterfaceContextMenuItem {onClick?:((grid:Grid, cell:CellAddress|null) =>void) |undefined;}interfaceContextMenuItem {onClick?:| ((grid:Grid,cell:CellAddress|null,) =>void)|undefined;}Custom click handler; receives the grid and the right-clicked cell (null if none).API reference →var console: Consolevar console:Consolevar console:ConsoleConsole.log(...data: any[]): void (+1 overload)Console.log(...data: any[]): void (+1 overload)Console.log(...data: any[]): void (+1 overload)The console.log() static method outputs a message to the console. MDN ReferenceGrid.store: StoreinterfaceGrid {store:Store;}interfaceGrid {store:Store;}Store.getCell(addr: CellAddress): ResolvedCellStore.getCell(addr: CellAddress): ResolvedCellStore.getCell(addr: CellAddress): ResolvedCellSingle-cell read for interactions, API reads, and tests. NOT for the render hot path — renderers use getVisibleWindow.API reference →cell: CellAddresslet cell:CellAddresslet cell:CellAddressRight-clicked cell, or null when the pointer is outside the cell body.API reference →interface GridConfiginterfaceGridConfiginterfaceGridConfigToolbar / feature configuration. When config is set the built-in toolbar is shown; control flags default to true except the opt-in export flag.@example import type { GridConfig } from "@sheetwrite/core"; const config: GridConfig = { toolbar: true, contextMenu: [{ action: "copy" }, { action: "paste" }], keyboard(event, grid) { if (event.altKey && event.key === "b") { grid.actions.toggleBold(); return true; } return false; }, };@see Grid.setConfig *@see ContextMenuItemAPI reference →HTMLElement.addEventListener<"contextmenu">(type: "contextmenu", listener: (this: HTMLElement, ev: PointerEvent) => any, options?: boolean | AddEventListenerOptions): void (+1 overload)HTMLElement.addEventListener<"contextmenu">(type: "contextmenu", listener: (this:HTMLElement, ev:PointerEvent) => any, options?: boolean | AddEventListenerOptions): void (+1 overload)HTMLElement.addEventListener<"contextmenu">(type: "contextmenu", listener: (this:HTMLElement, ev:PointerEvent) => any, options?: boolean | AddEventListenerOptions): void (+1 overload)The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target. MDN Reference The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target. MDN Referenceevent: PointerEventlet event:PointerEventlet event:PointerEventEvent.preventDefault(): voidEvent.preventDefault(): voidEvent.preventDefault(): voidThe preventDefault() method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be. MDN Referenceconst cell: CellAddress | nullconstcell:CellAddress|nullconstcell:CellAddress|nullRight-clicked cell, or null when the pointer is outside the cell body.API reference →Grid.getCellAtPoint(clientX: number, clientY: number): CellAddress | nullGrid.getCellAtPoint(clientX: number, clientY: number): CellAddress |nullGrid.getCellAtPoint(clientX: number, clientY: number): CellAddress |nullResolve browser viewport coordinates to an active-sheet cell for host-owned menus and interactions. Returns null outside the cell body.API reference →MouseEvent.clientX: numberinterfaceMouseEvent {clientX:number;}interfaceMouseEvent {clientX:number;}The clientX read-only property of the MouseEvent interface provides the horizontal coordinate within the application's viewport at which the event occurred (as opposed to the coordinate within the page). MDN ReferenceAPI reference →MouseEvent.clientY: numberinterfaceMouseEvent {clientY:number;}interfaceMouseEvent {clientY:number;}The clientY read-only property of the MouseEvent interface provides the vertical coordinate within the application's viewport at which the event occurred (as opposed to the coordinate within the page). MDN ReferenceAPI reference →Grid.setSelection(sel: Selection | null): voidGrid.setSelection(sel: Selection |null): voidGrid.setSelection(sel: Selection |null): voidkind: "cell"let kind:"cell"let kind:"cell"Selects one addressed cell.addr: CellAddresslet addr:CellAddresslet addr:CellAddressZero-based data address of the selected cell.API reference →const cell: CellAddressconstcell:CellAddressconstcell:CellAddressRight-clicked cell, or null when the pointer is outside the cell body.API reference →EventTarget.dispatchEvent(event: Event): booleanEventTarget.dispatchEvent(event: Event): booleanEventTarget.dispatchEvent(event: Event): booleanThe dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. MDN Referencevar CustomEvent: new <{
cell: CellAddress | null;
x: number;
y: number;
actions: GridActions;
}>(type: string, eventInitDict?: CustomEventInit<{
cell: CellAddress | null;
x: number;
y: number;
actions: GridActions;
}> | undefined) => CustomEvent<{
cell: CellAddress | null;
x: number;
y: number;
actions: GridActions;
}>var CustomEvent:new <{cell:CellAddress|null;x:number;y:number;actions:GridActions;}>(type:string, eventInitDict?:CustomEventInit<{cell:CellAddress|null;x:number;y:number;actions:GridActions;}> |undefined) =>CustomEvent<{cell:CellAddress|null;x:number;y:number;actions:GridActions;}>var CustomEvent:new <{cell:CellAddress|null;x:number;y:number;actions:GridActions;}>(type:string, eventInitDict?:CustomEventInit<{cell:CellAddress|null;x:number;y:number;actions:GridActions;}> |undefined) =>CustomEvent<{cell:CellAddress|null;x:number;y:number;actions:GridActions;}>The CustomEvent interface represents events initialized by an application for any purpose. MDN ReferenceCustomEventInit<{ cell: CellAddress | null; x: number; y: number; actions: GridActions; }>.detail?: {
cell: CellAddress | null;
x: number;
y: number;
actions: GridActions;
} | undefinedinterfaceCustomEventInit<{ cell:CellAddress|null; x:number; y:number; actions:GridActions; }> { detail?: {cell:CellAddress|null;x:number;y:number;actions:GridActions;} |undefined }interfaceCustomEventInit<{ cell:CellAddress|null; x:number; y:number; actions:GridActions; }> { detail?: {cell:CellAddress|null;x:number;y:number;actions:GridActions;} |undefined }x: numberlet x:numberlet x:numbery: numberlet y:numberlet y:numberactions: GridActionslet actions:GridActionslet actions:GridActionsImperative action surface for binding custom toolbars/menus.API reference →interface Grid
interface GridinterfaceGridinterfaceGridinterfaceGridinterfaceGridImperative grid handle for document commands, events, rendering, and teardown.@example import type { Grid } from "@sheetwrite/core"; function updateTotal(grid: Grid) { const sheet = grid.getActiveSheet(); const result = grid.applyTransaction({ patches: [{ op: "set", addr: { sheet, row: 0, col: 0 }, value: { kind: "literal", value: 42 } }], }); if (result.status === "applied") grid.scrollToCell({ sheet, row: 0, col: 0 }); return grid.aggregate(0, "sum"); }@see createGrid *@see Grid.applyTransactionAPI reference →interface StoreinterfaceStoreinterfaceStoreColumnar workbook storage, query, transaction, and subscription contract.API reference →interface GridActionsinterfaceGridActionsinterfaceGridActionsImperative operations the toolbar and context menu bind to; also exposed as Grid.actions.API reference →Grid.setActiveSheet(id: SheetId): voidGrid.setActiveSheet(id: SheetId): voidGrid.setActiveSheet(id: SheetId): voidtype SheetId = stringtypeSheetId=string;typeSheetId=string;Stable identifier used to address a workbook sheet.API reference →Grid.scrollToCell(addr: CellAddress): voidGrid.scrollToCell(addr: CellAddress): voidGrid.scrollToCell(addr: CellAddress): voidinterface CellAddressinterfaceCellAddressinterfaceCellAddressZero-based address of one cell on a stable sheet ID.API reference →Grid.getSelection(): Selection | nullGrid.getSelection(): Selection |nullGrid.getSelection(): Selection |nulltype Selection = {
kind: "cell";
addr: CellAddress;
} | {
kind: "range";
range: Range;
} | {
kind: "row";
sheet: SheetId;
row: number;
} | {
kind: "column";
sheet: SheetId;
col: number;
} | {
kind: "multi";
ranges: Range[];
}typeSelection=| {kind:"cell";addr:CellAddress;}| {kind:"range";range:Range;}| {kind:"row";sheet:SheetId;row:number;}| {kind:"column";sheet:SheetId;col:number;}| {kind:"multi";ranges:Range[];};typeSelection=| {kind:"cell";addr:CellAddress;}| {kind:"range";range:Range;}| {kind:"row";sheet:SheetId;row:number;}| {kind:"column";sheet:SheetId;col:number;}| {kind:"multi";ranges:Range[];};Current cell, range, row, column, or multi-range selection.API reference →Grid.setTheme(theme: Partial<Theme>): voidGrid.setTheme(theme: Partial<Theme>): voidGrid.setTheme(theme: Partial<Theme>): voidImperative patch: merge theme into the accumulated base theme.API reference →theme: Partial<Theme>let theme:Partial<Theme>let theme:Partial<Theme>Overrides merged over the default theme and host CSS custom properties.API reference →type Partial<T> = { [P in keyof T]?: T[P] | undefined; }typePartial<T> = { [PinkeyofT]?:T[P] |undefined };typePartial<T> = {[PinkeyofT]?:T[P] |undefined;};Make all properties in T optionalinterface ThemeinterfaceThemeinterfaceThemeResolved canvas colors, typography, and geometry used for painting.API reference →Grid.defineCellRenderer(name: string, renderer: CellRenderer): voidGrid.defineCellRenderer(name: string, renderer: CellRenderer): voidGrid.defineCellRenderer(name: string, renderer: CellRenderer): voidrenderer: CellRendererlet renderer:CellRendererlet renderer:CellRendererName of a registered custom cell renderer (see Grid.defineCellRenderer).API reference →interface CellRendererinterfaceCellRendererinterfaceCellRendererCustom cell renderer hooks for the main-thread canvas or retained DOM overlay.API reference →Grid.aggregate(col: number, op: AggregateOp): numberGrid.aggregate(col: number, op: AggregateOp): numberGrid.aggregate(col: number, op: AggregateOp): numberColumn aggregate over the active sheet's data. @example import type { Grid } from "@sheetwrite/core"; function total(grid: Grid) { return grid.aggregate(1, "sum"); } @see SheetwriteStore.aggregateAPI reference →type AggregateOp = "sum" | "avg" | "min" | "max" | "count"typeAggregateOp="sum"|"avg"|"min"|"max"|"count";typeAggregateOp=|"sum"|"avg"|"min"|"max"|"count";Column aggregate operation for Grid.aggregate / Store data ops.API reference →Grid.sortBy(col: number, ascending?: boolean): voidGrid.sortBy(col: number, ascending?: boolean): voidGrid.sortBy(col: number, ascending?: boolean): voidSort the displayed rows by a column (does not mutate stored data). @example import type { Grid } from "@sheetwrite/core"; function showLargestFirst(grid: Grid) { grid.sortBy(1, false); } @see Grid.clearViewAPI reference →ascending: boolean | undefinedlet ascending:boolean|undefinedlet ascending:boolean|undefinedGrid.sortByMulti(keys: readonly SortKey[]): voidGrid.sortByMulti(keys: readonly SortKey[]): voidGrid.sortByMulti(keys: readonly SortKey[]): voidMulti-key sort of the displayed rows (first key primary; stable).API reference →keys: readonly SortKey[]let keys:readonlySortKey[]let keys:readonlySortKey[]Stable workbook column keys for every index in [start, end).API reference →interface SortKeyinterfaceSortKeyinterfaceSortKeyOne key of a multi-column sort, applied in array order (first = primary).API reference →Grid.filterBy(col: number, needle: string): voidGrid.filterBy(col: number, needle: string): voidGrid.filterBy(col: number, needle: string): voidFilter the displayed rows to those whose column text contains needle. @example import type { Grid } from "@sheetwrite/core"; function showOpenRows(grid: Grid) { grid.filterBy(0, "Open"); } @see Grid.clearViewAPI reference →Grid.setColumnFilter(col: number, filter: ColumnFilter | null): voidGrid.setColumnFilter(col: number, filter: ColumnFilter |null): voidGrid.setColumnFilter(col: number, filter: ColumnFilter |null): voidSet or clear (null) one column's filter. All column filters AND together and compose with the active sort and hidden rows.API reference →type ColumnFilter = {
kind: "values";
values: readonly CellScalar[];
} | {
kind: "contains";
text: string;
matchCase?: boolean;
} | {
kind: "compare";
op: "gt" | "gte" | "lt" | "lte" | "eq" | "neq";
value: number;
} | {
kind: "empty";
} | {
kind: "nonEmpty";
}typeColumnFilter=| {kind:"values";values:readonlyCellScalar[];}| {kind:"contains";text:string;matchCase?:boolean;}| {kind:"compare";op:"gt"|"gte"|"lt"|"lte"|"eq"|"neq";value:number;}| {kind:"empty";}| {kind:"nonEmpty";};typeColumnFilter=| {kind:"values";values:readonlyCellScalar[];}| {kind:"contains";text:string;matchCase?:boolean;}| {kind:"compare";op:|"gt"|"gte"|"lt"|"lte"|"eq"|"neq";value:number;}| {kind:"empty";}| {kind:"nonEmpty";};One column's filter predicate. All active column filters AND together; matching is against the cell's resolved value (text or number).API reference →Grid.getColumnFilters(): ReadonlyMap<number, ColumnFilter>Grid.getColumnFilters(): ReadonlyMap<number, ColumnFilter>Grid.getColumnFilters(): ReadonlyMap<number, ColumnFilter>Active column filters on the active sheet, keyed by column index.API reference →interface ReadonlyMap<K, V>interfaceReadonlyMap<K, V>interfaceReadonlyMap<K, V>Grid.distinctValues(col: number, limit?: number): CellScalar[]Grid.distinctValues(col: number, limit?: number): CellScalar[]Grid.distinctValues(col: number, limit?: number): CellScalar[]Distinct resolved values of a column in first-seen order. Defaults to 1,000 values for bounded filter menus; pass 0 to request an uncapped scan.API reference →limit: number | undefinedlet limit:number|undefinedlet limit:number|undefinedtype CellScalar = string | number | boolean | nulltypeCellScalar=string|number|boolean|null;typeCellScalar=|string|number|boolean|null;A scalar that can be displayed directly.API reference →Grid.hideRows(rows: readonly number[]): voidGrid.hideRows(rows: readonly number[]): voidGrid.hideRows(rows: readonly number[]): voidHide the given data rows (composes with filters/sort).API reference →rows: readonly number[]let rows:readonlynumber[]let rows:readonlynumber[]end-exclusive row rangeAPI reference →Grid.showRows(rows?: readonly number[]): voidGrid.showRows(rows?: readonly number[]): voidGrid.showRows(rows?: readonly number[]): voidShow the given data rows again, or every hidden row when omitted.API reference →rows: readonly number[] | undefinedlet rows:readonlynumber[] |undefinedlet rows:readonlynumber[] |undefinedend-exclusive row rangeAPI reference →Grid.hiddenRows(): readonly number[]Grid.hiddenRows(): readonly number[]Grid.hiddenRows(): readonly number[]Currently hidden data rows on the active sheet.API reference →Grid.hideColumns(cols?: readonly number[]): voidGrid.hideColumns(cols?: readonly number[]): voidGrid.hideColumns(cols?: readonly number[]): voidHide columns through one bulk-safe metadata transaction.API reference →cols: readonly number[] | undefinedlet cols:readonlynumber[] |undefinedlet cols:readonlynumber[] |undefinedvisible column indices, in paint orderAPI reference →Grid.showColumns(cols?: readonly number[]): voidGrid.showColumns(cols?: readonly number[]): voidGrid.showColumns(cols?: readonly number[]): voidShow columns through one bulk-safe metadata transaction.API reference →Grid.hiddenColumns(): readonly number[]Grid.hiddenColumns(): readonly number[]Grid.hiddenColumns(): readonly number[]Currently hidden columns on the active sheet.API reference →Grid.groupRows(start: number, end: number): voidGrid.groupRows(start: number, end: number): voidGrid.groupRows(start: number, end: number): voidDefine a collapsible row group over a data-row range (end-inclusive).API reference →start: numberlet start:numberlet start:numberZero-based workbook column index of the first key.API reference →end: numberlet end:numberlet end:numberExclusive workbook column index after the last key.API reference →Grid.ungroupRows(start: number, end: number): voidGrid.ungroupRows(start: number, end: number): voidGrid.ungroupRows(start: number, end: number): voidRemove a row group (rows become visible if the group was collapsed).API reference →Grid.setGroupCollapsed(start: number, collapsed: boolean): voidGrid.setGroupCollapsed(start: number, collapsed: boolean): voidGrid.setGroupCollapsed(start: number, collapsed: boolean): voidCollapse/expand a row group; collapsing hides its rows.API reference →Grid.rowGroups(): readonly RowGroup[]Grid.rowGroups(): readonly RowGroup[]Grid.rowGroups(): readonly RowGroup[]Row groups on the active sheet.API reference →interface RowGroupinterfaceRowGroupinterfaceRowGroupA collapsible row group (data-row range, end-inclusive), Sheets-style.API reference →Grid.clearView(): voidGrid.clearView(): voidGrid.clearView(): voidClear any active sort/filter view.API reference →Grid.undo(): voidGrid.undo(): voidGrid.undo(): voidUndo the last recorded cell edit. If the restored data is above the transaction resource limits, nothing changes: the Grid emits mutation-rejected and removes that entry, so older edits stay undoable. @example import type { Grid } from "@sheetwrite/core"; function undoAndRestore(grid: Grid) { grid.undo(); grid.redo(); } @see Grid.redoAPI reference →Grid.redo(): voidGrid.redo(): voidGrid.redo(): voidRedo the last undone cell edit.API reference →Grid.exportCsv(filename: string): voidGrid.exportCsv(filename: string): voidGrid.exportCsv(filename: string): voidDownload the active sheet as CSV. @example import type { Grid } from "@sheetwrite/core"; function downloadCsv(grid: Grid) { grid.exportCsv("sales.csv"); }API reference →Grid.exportXlsx(filename: string): Promise<void>Grid.exportXlsx(filename: string): Promise<void>Grid.exportXlsx(filename: string): Promise<void>Download the active sheet through the registered XLSX backend. @example import type { Grid } from "@sheetwrite/core"; import { registerXlsxBackends } from "@sheetwrite/xlsx"; async function downloadXlsx(grid: Grid) { await registerXlsxBackends(); await grid.exportXlsx("sales.xlsx"); } @see toXlsxWorkbookAPI reference →Grid.search(query: string, opts?: SearchOptions): SearchResultGrid.search(query: string, opts?: SearchOptions): SearchResultGrid.search(query: string, opts?: SearchOptions): SearchResultFind cells matching query; highlights matches, emits search, returns the result.API reference →query: stringlet query:stringlet query:stringQuery string retained for navigation and subsequent replacement.API reference →opts: SearchOptions | undefinedlet opts:SearchOptions|undefinedlet opts:SearchOptions|undefinedAPI reference →interface SearchOptionsinterfaceSearchOptionsinterfaceSearchOptionsCase, whole-cell, sheet, and column constraints for grid search.API reference →interface SearchResultinterfaceSearchResultinterfaceSearchResultOrdered matches and active index produced by a grid search.API reference →Grid.findNext(): SearchResultGrid.findNext(): SearchResultGrid.findNext(): SearchResultMove the active match to the next match and scroll it into view.API reference →Grid.findPrev(): SearchResultGrid.findPrev(): SearchResultGrid.findPrev(): SearchResultMove the active match to the previous match and scroll it into view.API reference →Grid.clearSearch(): voidGrid.clearSearch(): voidGrid.clearSearch(): voidClear the current search and its highlights.API reference →Grid.replaceCurrent(replacement: string): SearchResultGrid.replaceCurrent(replacement: string): SearchResultGrid.replaceCurrent(replacement: string): SearchResultReplace the active match with replacement, then advance to the next match (re-scanning against the new data). Only literal text/number cells are eligible; formula and ref cells are skipped (formula source is never rewritten). Honors the active SearchOptions (matchCase; wholeCell swaps the entire cell). The write flows through the grid's commit path as one undoable step. No-op when read-only or when there is no active match.API reference →Grid.replaceAll(replacement: string): ReplaceResultGrid.replaceAll(replacement: string): ReplaceResultGrid.replaceAll(replacement: string): ReplaceResultReplace every current match in a single undoable transaction (one undo() restores them all), then re-scan. Formula/ref cells are skipped and not counted. No-op when read-only.API reference →interface ReplaceResultinterfaceReplaceResultinterfaceReplaceResultReplacement count and refreshed search state returned by replace-all.API reference →Grid.insertRows(at: number, count?: number): voidGrid.insertRows(at: number, count?: number): voidGrid.insertRows(at: number, count?: number): voidAPI reference →count: number | undefinedlet count:number|undefinedlet count:number|undefinedNumber of consecutive versions in the batch; at least 2.API reference →Grid.removeRows(at: number, count?: number): voidGrid.removeRows(at: number, count?: number): voidGrid.removeRows(at: number, count?: number): voidAPI reference →Grid.insertColumns(at: number, count?: number): voidGrid.insertColumns(at: number, count?: number): voidGrid.insertColumns(at: number, count?: number): voidAPI reference →Grid.removeColumns(at: number, count?: number): voidGrid.removeColumns(at: number, count?: number): voidGrid.removeColumns(at: number, count?: number): voidAPI reference →Grid.highlightCells(ranges: readonly HighlightRange[] | null, color?: string): voidGrid.highlightCells(ranges: readonly HighlightRange[] |null, color?: string): voidGrid.highlightCells(ranges: readonly HighlightRange[] |null, color?: string): voidDraw temporary highlights outside document history. Pass null to clear all highlights: grid.highlightCells(null). Per-range color wins over the call color. Undo does not clear highlights; use styleRange for persistent cell fills.API reference →interface HighlightRangeinterfaceHighlightRangeinterfaceHighlightRangeA highlight target: a range plus an optional per-range color override.API reference →color: string | undefinedlet color:string|undefinedlet color:string|undefinedhex color, e.g. "#111111"API reference →Grid.styleRange(range: Range, style: Partial<CellStyle> | null): voidGrid.styleRange(range: Range, style: Partial<CellStyle>|null): voidGrid.styleRange(range: Range, style: Partial<CellStyle>|null): voidMerge style into every cell of range (null clears cell styles) as one undoable transaction. Styles land in the store and paint in the canvas — unlike highlightCells, which draws a translucent overlay above it.API reference →range: Rangelet range:Rangelet range:RangeInclusive table rectangle on one stable sheet ID.API reference →interface RangeinterfaceRangeinterfaceRangeThe Range interface represents a fragment of a document that can contain nodes and parts of text nodes. MDN ReferenceAPI reference →style: Partial<CellStyle> | nulllet style:Partial<CellStyle> |nulllet style:Partial<CellStyle> |nullOptional override merged over the deterministic blue/underline link style.API reference →interface CellStyleinterfaceCellStyleinterfaceCellStyleSerializable formatting applied to a cell or used as a column default.API reference →Grid.setValidationRule(rule: DataValidationRule): ApplyTransactionResultGrid.setValidationRule(rule: DataValidationRule): ApplyTransactionResultGrid.setValidationRule(rule: DataValidationRule): ApplyTransactionResultinterface DataValidationRuleinterfaceDataValidationRuleinterfaceDataValidationRuleOne stable, range-scoped data-entry rule. Blank cells are allowed unless disabled.API reference →type ApplyTransactionResult = {
status: "applied";
epoch: number;
transaction: Transaction;
warnings?: MutationIssue[];
rejections?: MutationIssue[];
} | {
status: "conflict";
expectedEpoch: number;
actualEpoch: number;
} | {
status: "rejected";
epoch: number;
issues: MutationIssue[];
} | {
status: "noop";
epoch: number;
reason: "empty" | "out-of-bounds" | "incomplete-data" | "read-only";
}typeApplyTransactionResult=| {status:"applied";epoch:number;transaction:Transaction;warnings?:MutationIssue[];rejections?:MutationIssue[];}| {status:"conflict";expectedEpoch:number;actualEpoch:number;}| {status:"rejected";epoch:number;issues:MutationIssue[];}| {status:"noop";epoch:number;reason:"empty"|"out-of-bounds"|"incomplete-data"|"read-only";};typeApplyTransactionResult=| {status:"applied";epoch:number;transaction:Transaction;warnings?:MutationIssue[];rejections?:MutationIssue[];}| {status:"conflict";expectedEpoch:number;actualEpoch:number;}| {status:"rejected";epoch:number;issues:MutationIssue[];}| {status:"noop";epoch:number;reason:|"empty"|"out-of-bounds"|"incomplete-data"|"read-only";};Outcome of applying a document transaction, including conflict, rejection, and no-op states.API reference →Grid.removeValidationRule(id: string): ApplyTransactionResultGrid.removeValidationRule(id: string): ApplyTransactionResultGrid.removeValidationRule(id: string): ApplyTransactionResultGrid.setProtectedRange(range: ProtectedRange): ApplyTransactionResultGrid.setProtectedRange(range: ProtectedRange): ApplyTransactionResultGrid.setProtectedRange(range: ProtectedRange): ApplyTransactionResultrange: ProtectedRangelet range:ProtectedRangelet range:ProtectedRangeInclusive table rectangle on one stable sheet ID.API reference →interface ProtectedRangeinterfaceProtectedRangeinterfaceProtectedRangeSerializable client UX policy. A host resolver decides whether a local mutation may proceed.API reference →Grid.removeProtectedRange(id: string): ApplyTransactionResultGrid.removeProtectedRange(id: string): ApplyTransactionResultGrid.removeProtectedRange(id: string): ApplyTransactionResultGrid.setProtectionResolver(resolver?: ProtectionResolver, mode?: MutationPolicyMode): voidGrid.setProtectionResolver(resolver?: ProtectionResolver, mode?: MutationPolicyMode): voidGrid.setProtectionResolver(resolver?: ProtectionResolver, mode?: MutationPolicyMode): voidConfigure host-owned protected-range permissions. The resolver is synchronous so every local mutation ingress shares one atomic commit barrier.API reference →resolver: ProtectionResolver | undefinedlet resolver:ProtectionResolver|undefinedlet resolver:ProtectionResolver|undefinedAPI reference →type ProtectionResolver = (request: ProtectionRequest) => "allow" | "deny"typeProtectionResolver= (request:ProtectionRequest,) =>"allow"|"deny";typeProtectionResolver= (request:ProtectionRequest,) =>"allow"|"deny";Host-owned client UX permission callback for protected mutations.API reference →mode: MutationPolicyMode | undefinedlet mode:MutationPolicyMode|undefinedlet mode:MutationPolicyMode|undefinedStorage engine. Dense is the default.API reference →type MutationPolicyMode = "atomic" | "partial"typeMutationPolicyMode="atomic"|"partial";typeMutationPolicyMode="atomic"|"partial";Atomic or partial handling for locally denied operations.API reference →Grid.setNote(addr: CellAddress, text: string | null): ApplyTransactionResultGrid.setNote(addr: CellAddress, text: string |null): ApplyTransactionResultGrid.setNote(addr: CellAddress, text: string |null): ApplyTransactionResulttext: string | nulllet text:string|nulllet text:string|nullFormula source when the cell is a formula, else the literal display text.API reference →Grid.getNote(addr: CellAddress): string | nullGrid.getNote(addr: CellAddress): string |nullGrid.getNote(addr: CellAddress): string |nullGrid.beginEdit(row: number, col: number, initial?: string, selectAll?: boolean): voidGrid.beginEdit(row: number, col: number, initial?: string, selectAll?: boolean): voidGrid.beginEdit(row: number, col: number, initial?: string, selectAll?: boolean): voidOpen the cell editor at a view cell, optionally seeding text / selecting all.API reference →initial: string | undefinedlet initial:string|undefinedlet initial:string|undefinedselectAll: boolean | undefinedlet selectAll:boolean|undefinedlet selectAll:boolean|undefinedGrid.dataEdge(row: number, col: number, dRow: number, dCol: number): number | nullGrid.dataEdge(row: number, col: number, dRow: number, dCol: number): number |nullGrid.dataEdge(row: number, col: number, dRow: number, dCol: number): number |nullCtrl+Arrow-style jump target: the data-run edge from (row, col) on the moved axis (row for vertical moves, col for horizontal), or null when the store is not columnar. Under an active sort/filter view, row is a view position and vertical moves return view positions. For hosts building their own keymaps (config.keyboard).API reference →Grid.setRowHeight(row: number, height: number): voidGrid.setRowHeight(row: number, height: number): voidGrid.setRowHeight(row: number, height: number): voidSet one row's persistent display height through document history.API reference →height: numberlet height:numberlet height:numberHost height in CSS pixels for numbers or any CSS length string.API reference →Grid.setColumnWidth(col: number, width: number): voidGrid.setColumnWidth(col: number, width: number): voidGrid.setColumnWidth(col: number, width: number): voidSet one column's width via an undoable setColumn patch.API reference →width: numberlet width:numberlet width:numberUnzoomed column width in CSS pixels.API reference →Grid.autoFitRows(range?: Range): voidGrid.autoFitRows(range?: Range): voidGrid.autoFitRows(range?: Range): voidExplicitly resize rows to fit wrapped content; never runs during paint.API reference →range: Range | undefinedlet range:Range|undefinedlet range:Range|undefinedInclusive table rectangle on one stable sheet ID.API reference →Grid.autoFitColumns(cols?: readonly number[]): voidGrid.autoFitColumns(cols?: readonly number[]): voidGrid.autoFitColumns(cols?: readonly number[]): voidExplicitly resize columns from a bulk worksheet read.API reference →Grid.setFrozen(rows: number, cols?: number): voidGrid.setFrozen(rows: number, cols?: number): voidGrid.setFrozen(rows: number, cols?: number): voidPin the first rows view rows and cols columns; they stay visible while the body scrolls (0 = unfreeze that axis). Persisted on the active sheet.API reference →rows: numberlet rows:numberlet rows:numberend-exclusive row rangeAPI reference →cols: number | undefinedlet cols:number|undefinedlet cols:number|undefinedvisible column indices, in paint orderAPI reference →Grid.setZoom(zoom: number): voidGrid.setZoom(zoom: number): voidGrid.setZoom(zoom: number): voidContent zoom factor (0.5–2): scales row/column geometry and fonts.API reference →Grid.getZoom(): numberGrid.getZoom(): numberGrid.getZoom(): numberAPI reference →Grid.on<E extends keyof GridEvents>(evt: E, fn: (e: GridEvents[E]) => void): () => voidGrid.on<EextendskeyofGridEvents>(evt:E, fn: (e:GridEvents[E]) =>void): () =>voidGrid.on<EextendskeyofGridEvents>(evt:E, fn: (e:GridEvents[E]) =>void): () =>void(type parameter) E in Grid.on<E extends keyof GridEvents>(evt: E, fn: (e: GridEvents[E]) => void): () => void(type parameter) Ein Grid.on<EextendskeyofGridEvents>(evt:E, fn: (e:GridEvents[E]) =>void): () =>void(type parameter) Ein Grid.on<EextendskeyofGridEvents>(evt:E, fn: (e:GridEvents[E]) =>void): () =>voidevt: E extends keyof GridEventslet evt:EextendskeyofGridEventslet evt:EextendskeyofGridEventsAPI reference →Grid.refresh(): voidGrid.refresh(): voidGrid.refresh(): voidAPI reference →Grid.destroy(): voidGrid.destroy(): voidGrid.destroy(): voidRuns immediately before a retained element is removed or replaced.API reference →interface SearchOptions
interface SearchOptionsinterfaceSearchOptionsinterfaceSearchOptionsinterfaceSearchOptionsinterfaceSearchOptionsCase, whole-cell, sheet, and column constraints for grid search.API reference →SearchOptions.matchCase?: boolean | undefinedinterfaceSearchOptions {matchCase?:boolean|undefined;}interfaceSearchOptions {matchCase?:boolean|undefined;}Case-sensitive match (default false).API reference →SearchOptions.wholeCell?: boolean | undefinedinterfaceSearchOptions {wholeCell?:boolean|undefined;}interfaceSearchOptions {wholeCell?:boolean|undefined;}Match only when the whole cell text equals the query (default false: substring).API reference →SearchOptions.sheet?: string | undefinedinterfaceSearchOptions {sheet?:string|undefined;}interfaceSearchOptions {sheet?:string|undefined;}Sheet identity used by the simple data-first adapter. Defaults to sheet1.API reference →SearchOptions.columns?: number[] | undefinedinterfaceSearchOptions {columns?:number[] |undefined;}interfaceSearchOptions {columns?:number[] |undefined;}Exact column runs represented by every returned row.API reference →interface SearchResult
interface SearchResultinterfaceSearchResultinterfaceSearchResultinterfaceSearchResultinterfaceSearchResultOrdered matches and active index produced by a grid search.API reference →SearchResult.query: stringinterfaceSearchResult {query:string;}interfaceSearchResult {query:string;}Query string retained for navigation and subsequent replacement.API reference →SearchResult.matches: CellAddress[]interfaceSearchResult {matches:CellAddress[];}interfaceSearchResult {matches:CellAddress[];}Matching cells in row-major order.API reference →SearchResult.active: numberinterfaceSearchResult {active:number;}interfaceSearchResult {active:number;}Index of the active match within matches, or -1 when there are none.API reference →const result: SearchResultconstresult:SearchResultconstresult:SearchResultSearch state after the replacement (matches re-scanned against the new data).API reference →Array<CellAddress>.length: numberinterfaceArray<CellAddress> {length:number;}interfaceArray<CellAddress> {length:number;}Gets or sets the length of the array. This is a number one higher than the highest index in the array.API reference →const sync: SyncCoordinatorconstsync:SyncCoordinatorconstsync:SyncCoordinatorAPI reference →new SyncCoordinator(grid: Grid, adapter: PersistenceAdapter, options: SyncCoordinatorOptions): SyncCoordinatornewSyncCoordinator(grid: Grid, adapter: PersistenceAdapter, options: SyncCoordinatorOptions): SyncCoordinatornewSyncCoordinator(grid: Grid, adapter: PersistenceAdapter, options: SyncCoordinatorOptions): SyncCoordinatorDeterministic, transport-neutral optimistic sync. Local rendering is never blocked: changes queue immediately, while hosts explicitly call sendNext or retry to perform network work.@example import { SyncCoordinator, type Grid, type PersistenceAdapter } from "@sheetwrite/core"; async function connect(grid: Grid, adapter: PersistenceAdapter, documentId: string, serverVersion: number) { const sync = new SyncCoordinator(grid, adapter, { documentId, serverVersion }); await sync.ready(); await sync.flush(); return sync; // Call sync.destroy() before removing the Grid. }@see PersistenceAdapter *@see SyncCoordinator.recoverConflictAPI reference →const adapter: PersistenceAdapterconstadapter:PersistenceAdapterconstadapter:PersistenceAdapterAPI reference →SyncCoordinatorOptions.documentId: stringinterfaceSyncCoordinatorOptions {documentId:string;}interfaceSyncCoordinatorOptions {documentId:string;}API reference →SyncCoordinatorOptions.serverVersion: numberinterfaceSyncCoordinatorOptions {serverVersion:number;}interfaceSyncCoordinatorOptions {serverVersion:number;}Last accepted contiguous remote server version.API reference →const loadedSnapshot: WorkbookSnapshotconstloadedSnapshot:WorkbookSnapshotconstloadedSnapshot:WorkbookSnapshotAPI reference →WorkbookSnapshot.version?: number | undefinedinterfaceWorkbookSnapshot {version?:number|undefined;}interfaceWorkbookSnapshot {version?:number|undefined;}API reference →const off: () => voidconstoff: () =>voidconstoff: () =>voidSyncCoordinator.on(listener: SyncListener): () => voidSyncCoordinator.on(listener: SyncListener): () =>voidSyncCoordinator.on(listener: SyncListener): () =>voidAPI reference →event: SyncCoordinatorEventlet event:SyncCoordinatorEventlet event:SyncCoordinatorEventAPI reference →type: "conflict" | "state" | "restored" | "persisting" | "pending" | "sending" | "acknowledged" | "remote-applied" | "reload-required" | "reloaded" | "recovered" | "storage-error" | "error"let type:|"conflict"|"state"|"restored"|"persisting"|"pending"|"sending"|"acknowledged"|"remote-applied"|"reload-required"|"reloaded"|"recovered"|"storage-error"|"error"let type:|"conflict"|"state"|"restored"|"persisting"|"pending"|"sending"|"acknowledged"|"remote-applied"|"reload-required"|"reloaded"|"recovered"|"storage-error"|"error"Controls cell input parsing and default value formatting for this column.API reference →const showConflict: (conflict: unknown) => voidconstshowConflict: (conflict:unknown) =>voidconstshowConflict: (conflict:unknown,) =>voidevent: {
type: "conflict";
mutation: SyncMutationRecord;
response: Extract<PersistenceCommitResponse, {
status: "conflict";
}>;
}let event: {type:"conflict";mutation:SyncMutationRecord;response:Extract<PersistenceCommitResponse,{status:"conflict";}>;}let event: {type:"conflict";mutation:SyncMutationRecord;response:Extract<PersistenceCommitResponse,{status:"conflict";}>;}response: {
status: "conflict";
currentVersion: number;
operationsSinceBase?: readonly VersionedOperation[];
snapshot?: WorkbookSnapshot;
}let response: {status:"conflict";currentVersion:number;operationsSinceBase?:readonlyVersionedOperation[];snapshot?:WorkbookSnapshot;}let response: {status:"conflict";currentVersion:number;operationsSinceBase?:readonlyVersionedOperation[];snapshot?:WorkbookSnapshot;}const requestFreshSnapshot: () => Promise<void>constrequestFreshSnapshot: () =>Promise<void>constrequestFreshSnapshot: () =>Promise<void>const saveButton: HTMLButtonElementconstsaveButton:HTMLButtonElementconstsaveButton:HTMLButtonElementGlobalEventHandlers.onclick: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | nullinterfaceGlobalEventHandlers {onclick:((this:GlobalEventHandlers, ev:PointerEvent) =>any) |null;}interfaceGlobalEventHandlers {onclick:| ((this:GlobalEventHandlers,ev:PointerEvent,) =>any)|null;}MDN ReferenceSyncCoordinator.sendNext(): Promise<PersistenceCommitResponse | null>SyncCoordinator.sendNext(): Promise<PersistenceCommitResponse |null>SyncCoordinator.sendNext(): Promise<PersistenceCommitResponse |null>SyncCoordinator.destroy(): voidSyncCoordinator.destroy(): voidSyncCoordinator.destroy(): voidRuns immediately before a retained element is removed or replaced.API reference →