Skip to content
Sheetwrite

Sheetwrite / Documentation

VisibleWindowView@sheetwrite/core

One rectangular window of resolved cells, returned by Store.getVisibleWindow in a single call.

One rectangular window of resolved cells, returned by Store.getVisibleWindow in a single call. The renderer paints from this view and MUST NOT call Store.getCell per cell. styleIds are view-local indices into this view's compact styles dictionary; on the worker renderer path, styleIds.buffer is transferred during paint, so main-thread code must not read it after paint.

Lifetime: valid until the next store mutation or window refresh.

Members 14

sheet
sheet: SheetId;
rows end-exclusive row range
rows: { start: number; end: number };
cols visible column indices, in paint order
cols: readonly number[];
values row-major resolved values, length (end-start) cols.length
values: ArrayLike<CellScalar>;

row-major resolved values, length `(end-start) * cols.length`

styleIds row-major view-local style ids, same length as values
styleIds: Uint32Array;
styles compact window style dictionary indexed by styleIds
styles: readonly CellStyle[];
valueKinds Raw cell tags for worker transfer; internal fast path.
valueKinds?: Uint8Array;
numberValues Raw numeric payloads for worker transfer; internal fast path.
numberValues?: Float64Array;
stringPoolIds Raw global string-pool ids for worker transfer; 0xffffffff means none.
stringPoolIds?: Uint32Array;
stringLocalIds Raw local-string indices for formula errors; -1 means none.
stringLocalIds?: Int32Array;
stringPoolUpdateIds String-pool ids resolved by this window and safe for worker cache updates.
stringPoolUpdateIds?: Uint32Array;
stringPoolUpdateValues String values parallel to stringPoolUpdateIds.
stringPoolUpdateValues?: readonly string[];
localStrings Local non-pooled strings, currently formula error sentinels.
localStrings?: readonly string[];
ffiCalls Internal count of WASM boundary calls used to produce this window.
ffiCalls?: number;

Declaration

View full TypeScript declaration
export interface VisibleWindowView {
sheet: SheetId;
rows: {
start: number;
end: number;
};
cols: readonly number[];
values: ArrayLike<CellScalar>;
styleIds: Uint32Array;
styles: readonly CellStyle[];
valueKinds?: Uint8Array;
numberValues?: Float64Array;
stringPoolIds?: Uint32Array;
stringLocalIds?: Int32Array;
stringPoolUpdateIds?: Uint32Array;
stringPoolUpdateValues?: readonly string[];
localStrings?: readonly string[];
ffiCalls?: number;
}