Skip to content

VisibleWindowView@sheetwrite/core

On this page

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 19

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;
stringPoolEpoch Store-wide u32 epoch issuing the raw IDs; clear ID caches whenever it changes.
stringPoolEpoch: number;
stringPoolIds Raw string-pool ids valid only in stringPoolEpoch; 0xffffffff means none.
stringPoolIds?: Uint32Array;
stringLocalIds Raw local-string indices for formula errors; -1 means none.
stringLocalIds?: Int32Array;
stringPoolUpdateIds IDs resolved in stringPoolEpoch, safe for cache updates after epoch invalidation.
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;
ffiBoundaryCalls Every wasm-bindgen method/accessor/free crossing used by diagnostics.
ffiBoundaryCalls?: number;
ffiInputBytes Exact copied input bytes for this packed boundary operation.
ffiInputBytes?: number;
ffiOutputBytes Exact copied output bytes for this packed boundary operation.
ffiOutputBytes?: number;
ffiLargestTransferBytes Largest individual copied buffer/string payload in this operation.
ffiLargestTransferBytes?: 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;
stringPoolEpoch: number;
stringPoolIds?: Uint32Array;
stringLocalIds?: Int32Array;
stringPoolUpdateIds?: Uint32Array;
stringPoolUpdateValues?: readonly string[];
localStrings?: readonly string[];
ffiCalls?: number;
ffiBoundaryCalls?: number;
ffiInputBytes?: number;
ffiOutputBytes?: number;
ffiLargestTransferBytes?: number;
}

Referenced by

Workspace packages depending on @sheetwrite/core

  • @sheetwrite/benchdependency
  • @sheetwrite/docs-startdependency
  • @sheetwrite/reactdependency
  • @sheetwrite/sveltedependency
  • @sheetwrite/vuedependency
  • @sheetwrite/xlsxdependency

Public exports naming VisibleWindowView

Documentation