Open History to see the last commit
1import type { PreviewFailure } from "./previewFailure";
2export const LARGE_TEXT_MAX_BYTES = 256 * 1024 * 1024;
3export const LARGE_TEXT_MAX_ROWS = 5_000_000;
4export const LARGE_TEXT_MAX_COLUMNS = 1024;
5export const PREVIEW_PAGE_ROWS = 32;
6export type TextPreviewRequest =
7 | { type: "open"; src?: string; text?: string; sizeBytes?: number; delimiter: "," | "\t" | null }
8 | { type: "page"; index: number }
9 | { type: "copy" };
10export type TextPreviewResult =
11 | { type: "meta"; count: number; columns: number; complete: boolean; sizeBytes?: number }
12 | { type: "page"; index: number; rows: string[][] }
13 | { type: "copy"; text: string }
14 | ({ type: "error"; operation: TextPreviewRequest["type"] } & PreviewFailure);