import type { View } from "@perspective-dev/client"; export interface ColumnData { type: "float32" | "float64" | "int32" | "string"; values?: Float32Array | Float64Array | Int32Array; /** * Dictionary key indices for string columns. */ indices?: Int32Array; /** * Dictionary values for string columns. */ dictionary?: string[]; /** * Arrow validity bitfield (1 bit per row). */ valid?: Uint8Array; } export type ColumnDataMap = Map; export interface TypedArrayWindowOptions { start_row?: number; end_row?: number; start_col?: number; end_col?: number; float32?: boolean; } /** * Fetches all columns from a View using `with_typed_arrays` and * builds a `ColumnDataMap`. The `values` typed arrays and `valid` * bitmaps are zero-copy views into WASM memory and remain valid only * for the duration of the `render` callback — if `render` returns a * `Promise`, the underlying `with_typed_arrays` call awaits it before * releasing the backing Arrow buffer. Callers must not retain any * `ColumnData` reference past `render`'s resolution. */ export declare function viewToColumnDataMap(view: View, render: (data: ColumnDataMap) => void | Promise, options?: TypedArrayWindowOptions): Promise;