tabulark 0.0.4 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +215 -110
  3. package/THIRD_PARTY_NOTICES.md +37 -0
  4. package/dist/adapters.d.ts +62 -0
  5. package/dist/arrow.d.ts +3 -0
  6. package/dist/arrow.js +2 -0
  7. package/dist/arrow.js.map +7 -0
  8. package/dist/client.d.ts +76 -0
  9. package/dist/errors.d.ts +19 -0
  10. package/dist/excel.d.ts +3 -0
  11. package/dist/excel.js +2 -0
  12. package/dist/excel.js.map +7 -0
  13. package/dist/experimental.d.ts +13 -0
  14. package/dist/experimental.js +2 -0
  15. package/dist/experimental.js.map +7 -0
  16. package/dist/index.d.ts +10 -0
  17. package/dist/index.js +2 -0
  18. package/dist/index.js.map +7 -0
  19. package/dist/model.d.ts +389 -0
  20. package/dist/official-adapter-manifest.d.ts +31 -0
  21. package/dist/parquet.d.ts +3 -0
  22. package/dist/parquet.js +2 -0
  23. package/dist/parquet.js.map +7 -0
  24. package/dist/protocol.d.ts +54 -0
  25. package/dist/range-cache.d.ts +28 -0
  26. package/dist/rpc-client.d.ts +18 -0
  27. package/dist/view/accessible-grid.d.ts +36 -0
  28. package/dist/view/canvas-painter.d.ts +91 -0
  29. package/dist/view/canvas-table-view-public.d.ts +58 -0
  30. package/dist/view/canvas-table-view.d.ts +32 -0
  31. package/dist/view/controller.d.ts +34 -0
  32. package/dist/view/layout.d.ts +34 -0
  33. package/dist/view/selection.d.ts +7 -0
  34. package/dist/view/types.d.ts +184 -0
  35. package/dist/wasm/arrow/tabulark_arrow.d.ts +126 -0
  36. package/dist/wasm/arrow/tabulark_arrow.js +771 -0
  37. package/dist/wasm/arrow/tabulark_arrow_bg.wasm +0 -0
  38. package/dist/wasm/arrow/tabulark_arrow_bg.wasm.d.ts +25 -0
  39. package/dist/wasm/delimited/tabulark_delimited.d.ts +131 -0
  40. package/dist/wasm/delimited/tabulark_delimited.js +845 -0
  41. package/dist/wasm/delimited/tabulark_delimited_bg.wasm +0 -0
  42. package/dist/wasm/delimited/tabulark_delimited_bg.wasm.d.ts +26 -0
  43. package/dist/wasm/excel/tabulark_excel.d.ts +121 -0
  44. package/dist/wasm/excel/tabulark_excel.js +766 -0
  45. package/dist/wasm/excel/tabulark_excel_bg.wasm +0 -0
  46. package/dist/wasm/excel/tabulark_excel_bg.wasm.d.ts +25 -0
  47. package/dist/wasm/parquet/tabulark_parquet.d.ts +121 -0
  48. package/dist/wasm/parquet/tabulark_parquet.js +754 -0
  49. package/dist/wasm/parquet/tabulark_parquet_bg.wasm +0 -0
  50. package/dist/wasm/parquet/tabulark_parquet_bg.wasm.d.ts +25 -0
  51. package/dist/worker/wasm-adapter.d.ts +57 -0
  52. package/dist/worker/worker-errors.d.ts +9 -0
  53. package/dist/worker.d.ts +1 -0
  54. package/dist/worker.js +2 -0
  55. package/dist/worker.js.map +7 -0
  56. package/package.json +55 -12
  57. package/js/index.d.ts +0 -18
  58. package/js/index.js +0 -26
@@ -0,0 +1,58 @@
1
+ import type { TableHandle } from "../client.js";
2
+ /** Stable, high-level sizing and cache controls for the Canvas table view. */
3
+ export interface CanvasTableViewControllerOptions {
4
+ readonly rowHeight?: number;
5
+ readonly headerHeight?: number;
6
+ readonly rowHeaderWidth?: number;
7
+ readonly columnWidth?: number;
8
+ readonly minColumnWidth?: number;
9
+ readonly maxColumnWidth?: number;
10
+ readonly columnWidths?: Readonly<Record<string, number>>;
11
+ readonly scrollPixelLimit?: number;
12
+ readonly overscanRows?: number;
13
+ readonly overscanColumns?: number;
14
+ /** Hard bound for decoded render/cache cells. */
15
+ readonly maxWindowCells?: number;
16
+ }
17
+ /** Stable theme tokens accepted by the high-level Canvas table view. */
18
+ export interface CanvasTableViewTheme {
19
+ readonly background: string;
20
+ readonly foreground: string;
21
+ readonly mutedForeground: string;
22
+ readonly headerBackground: string;
23
+ readonly headerForeground: string;
24
+ readonly alternateRowBackground: string;
25
+ readonly gridLine: string;
26
+ readonly selectionBackground: string;
27
+ readonly selectionBorder: string;
28
+ readonly activeCellBorder: string;
29
+ readonly loadingBackground: string;
30
+ readonly font: string;
31
+ readonly headerFont: string;
32
+ }
33
+ /** Stable options for mounting a Canvas preview from a logical table handle. */
34
+ export interface CanvasTableViewOptions {
35
+ readonly container: HTMLElement;
36
+ readonly table: TableHandle;
37
+ readonly controllerOptions?: CanvasTableViewControllerOptions;
38
+ /**
39
+ * Applies static spreadsheet presentation metadata when available.
40
+ * Workbook colors never override the system palette in forced-colors mode.
41
+ */
42
+ readonly presentation?: "auto" | "ignore";
43
+ readonly ariaLabel?: string;
44
+ readonly theme?: Partial<CanvasTableViewTheme>;
45
+ readonly maxDevicePixelRatio?: number;
46
+ /** Testable clipboard seam; navigator.clipboard.writeText is used by default. */
47
+ readonly writeClipboard?: (text: string) => Promise<void> | void;
48
+ readonly onError?: (error: unknown) => void;
49
+ }
50
+ /** Stable lifecycle surface for a mounted Canvas table view. */
51
+ export interface CanvasTableView {
52
+ readonly element: HTMLDivElement;
53
+ focus(options?: FocusOptions): void;
54
+ destroy(): void;
55
+ dispose(): void;
56
+ }
57
+ /** Mounts an accessible, viewport-driven Canvas preview. */
58
+ export declare function createCanvasTableView(options: CanvasTableViewOptions): CanvasTableView;
@@ -0,0 +1,32 @@
1
+ import type { TableHandle } from "../client.js";
2
+ import { type CanvasTableTheme } from "./canvas-painter.js";
3
+ import { type TableViewController } from "./controller.js";
4
+ import type { TableControllerOptions } from "./types.js";
5
+ export interface CanvasTableViewOptions {
6
+ readonly container: HTMLElement;
7
+ /** Provide either a table or a preconfigured controller, never both. */
8
+ readonly table?: TableHandle;
9
+ /** Provide either a controller or a table, never both. */
10
+ readonly controller?: TableViewController;
11
+ readonly controllerOptions?: TableControllerOptions;
12
+ /**
13
+ * Applies static spreadsheet sizing metadata when a TableHandle provides it.
14
+ * Workbook colors never override the system palette in forced-colors mode.
15
+ */
16
+ readonly presentation?: "auto" | "ignore";
17
+ readonly ariaLabel?: string;
18
+ readonly theme?: Partial<CanvasTableTheme>;
19
+ readonly maxDevicePixelRatio?: number;
20
+ /** Testable clipboard seam; navigator.clipboard.writeText is used by default. */
21
+ readonly writeClipboard?: (text: string) => Promise<void> | void;
22
+ readonly onError?: (error: unknown) => void;
23
+ }
24
+ export interface CanvasTableView {
25
+ readonly element: HTMLDivElement;
26
+ readonly controller: TableViewController;
27
+ focus(options?: FocusOptions): void;
28
+ destroy(): void;
29
+ dispose(): void;
30
+ }
31
+ /** Mounts an accessible, viewport-driven Canvas preview. */
32
+ export declare function createCanvasTableView(options: CanvasTableViewOptions): CanvasTableView;
@@ -0,0 +1,34 @@
1
+ import type { TableHandle, Unsubscribe } from "../client.js";
2
+ import { type MergedCellRegion, type SpreadsheetPresentation } from "../model.js";
3
+ import { type CellLoadState, type CellPosition, type HitTestResult, type MoveActiveCellOptions, type NavigationCommand, type PixelRect, type SetActiveCellOptions, type TableControllerOptions, type TableSelection, type TableViewSnapshot, type ViewportUpdate } from "./types.js";
4
+ export interface TableViewController {
5
+ readonly metadata: TableHandle["metadata"];
6
+ readonly columnWidths: readonly number[];
7
+ readonly minColumnWidth: number;
8
+ readonly maxColumnWidth: number;
9
+ getSnapshot(): Readonly<TableViewSnapshot>;
10
+ subscribe(listener: (snapshot: Readonly<TableViewSnapshot>) => void): Unsubscribe;
11
+ updateViewport(viewport: ViewportUpdate): void;
12
+ setActiveCell(cell: CellPosition, options?: SetActiveCellOptions): void;
13
+ extendSelection(cell: CellPosition, options?: Omit<SetActiveCellOptions, "extendSelection">): void;
14
+ setSelection(anchor: CellPosition, focus?: CellPosition): void;
15
+ clearSelection(): void;
16
+ moveActive(command: NavigationCommand, options?: MoveActiveCellOptions): void;
17
+ ensureCellVisible(cell: CellPosition): void;
18
+ ensureColumnVisible(columnIndex: number): void;
19
+ resizeColumn(columnIndex: number, width: number): void;
20
+ autosizeColumn(columnIndex: number, measuredWidth: number): void;
21
+ /** Applies validated static worksheet geometry in one controller generation. */
22
+ applySpreadsheetPresentation(presentation: SpreadsheetPresentation): void;
23
+ /** Updates merge interaction geometry for the currently loaded presentation window. */
24
+ setMergedCells(regions: readonly MergedCellRegion[]): void;
25
+ hitTest(x: number, y: number, resizeHandleWidth?: number): HitTestResult;
26
+ cellRect(cell: CellPosition): Readonly<PixelRect>;
27
+ selectionRect(selection?: TableSelection | null): Readonly<PixelRect> | null;
28
+ getCell(rowIndex: number, columnIndex: number): CellLoadState;
29
+ copySelection(options?: {
30
+ readonly signal?: AbortSignal;
31
+ }): Promise<string>;
32
+ dispose(): void;
33
+ }
34
+ export declare function createTableController(table: TableHandle, options?: TableControllerOptions): TableViewController;
@@ -0,0 +1,34 @@
1
+ import type { PresentationAxisEntry, TableMetadata } from "../model.js";
2
+ import { type GridRange, type HitTestResult, type PixelRect, type ScrollAxisLayout, type SparseAxisGeometry, type TableLayout, type ViewportUpdate } from "./types.js";
3
+ export interface LayoutOptions {
4
+ readonly rowHeight?: number;
5
+ readonly headerHeight?: number;
6
+ readonly rowHeaderWidth?: number;
7
+ readonly scrollPixelLimit?: number;
8
+ readonly overscanRows?: number;
9
+ readonly overscanColumns?: number;
10
+ readonly rowEntries?: readonly PresentationAxisEntry[];
11
+ readonly hiddenColumns?: readonly boolean[];
12
+ readonly frozenRows?: number;
13
+ readonly frozenColumns?: number;
14
+ }
15
+ export declare function createTableLayout(metadata: Readonly<TableMetadata>, columnWidths: readonly number[], viewport: ViewportUpdate, options?: LayoutOptions): Readonly<TableLayout>;
16
+ export declare function createScrollAxis(logicalContentSize: number, logicalViewportSize: number, physicalOffset: number, pixelLimit?: number): Readonly<ScrollAxisLayout>;
17
+ export declare function logicalToPhysicalOffset(axis: ScrollAxisLayout, logicalOffset: number): number;
18
+ export declare function physicalToLogicalOffset(axis: ScrollAxisLayout, physicalOffset: number): number;
19
+ export declare function hitTest(layout: TableLayout, x: number, y: number, _columnWidths: readonly number[], resizeHandleWidth?: number): HitTestResult;
20
+ export declare function cellRect(layout: TableLayout, _columnWidths: readonly number[], rowIndex: number, columnIndex: number): Readonly<PixelRect>;
21
+ export declare function columnHeaderRect(layout: TableLayout, _columnWidths: readonly number[], columnIndex: number): Readonly<PixelRect>;
22
+ export declare function rowHeaderRect(layout: TableLayout, rowIndex: number): Readonly<PixelRect>;
23
+ export declare function selectionRect(layout: TableLayout, _columnWidths: readonly number[], range: GridRange): Readonly<PixelRect> | null;
24
+ export declare function columnOffsets(columnWidths: readonly number[]): readonly number[];
25
+ export declare function extentValue(extent: TableMetadata["extent"]["rows"]): number;
26
+ /** Builds a compact sparse axis without allocating one entry per worksheet row. */
27
+ export declare function createSparseAxisGeometry(count: number, defaultSize: number, entries?: readonly PresentationAxisEntry[]): Readonly<SparseAxisGeometry>;
28
+ /** Logical offset at the start of an axis index. */
29
+ export declare function axisPosition(geometry: SparseAxisGeometry, index: number): number;
30
+ /** Effective axis extent, zero when a row/column is hidden. */
31
+ export declare function axisSize(geometry: SparseAxisGeometry, index: number): number;
32
+ /** Finds the visible axis index containing a logical pixel offset. */
33
+ export declare function axisIndexAtOffset(geometry: SparseAxisGeometry, offset: number): number | null;
34
+ export declare function nextVisibleAxisIndex(geometry: SparseAxisGeometry, from: number, direction?: -1 | 1): number | null;
@@ -0,0 +1,7 @@
1
+ import type { CellPosition, GridRange, NavigationCommand, TableSelection } from "./types.js";
2
+ export declare function createSelection(anchor: CellPosition, focus?: CellPosition): Readonly<TableSelection>;
3
+ export declare function selectionRange(anchor: CellPosition, focus: CellPosition): Readonly<GridRange>;
4
+ export declare function containsCell(range: GridRange, cell: CellPosition): boolean;
5
+ export declare function clampCell(cell: CellPosition, rowCount: number, columnCount: number): Readonly<CellPosition> | null;
6
+ export declare function moveCell(cell: CellPosition, command: NavigationCommand, rowCount: number, columnCount: number, pageRowCount: number): Readonly<CellPosition> | null;
7
+ export declare function assertCellPosition(value: CellPosition, name: string): void;
@@ -0,0 +1,184 @@
1
+ import type { TableMetadata } from "../model.js";
2
+ export declare const DEFAULT_ROW_HEIGHT = 28;
3
+ export declare const DEFAULT_HEADER_HEIGHT = 36;
4
+ export declare const DEFAULT_ROW_HEADER_WIDTH = 64;
5
+ export declare const DEFAULT_COLUMN_WIDTH = 160;
6
+ export declare const DEFAULT_MIN_COLUMN_WIDTH = 64;
7
+ export declare const DEFAULT_MAX_COLUMN_WIDTH = 640;
8
+ export declare const DEFAULT_SCROLL_PIXEL_LIMIT = 16000000;
9
+ export declare const DEFAULT_OVERSCAN_ROWS = 8;
10
+ export declare const DEFAULT_OVERSCAN_COLUMNS = 1;
11
+ /** A zero-based table coordinate. */
12
+ export interface CellPosition {
13
+ readonly rowIndex: number;
14
+ readonly columnIndex: number;
15
+ }
16
+ /** A zero-based, half-open rectangular table range. */
17
+ export interface GridRange {
18
+ readonly rowStart: number;
19
+ readonly rowEnd: number;
20
+ readonly columnStart: number;
21
+ readonly columnEnd: number;
22
+ }
23
+ export interface TableSelection {
24
+ readonly anchor: Readonly<CellPosition>;
25
+ readonly focus: Readonly<CellPosition>;
26
+ readonly range: Readonly<GridRange>;
27
+ }
28
+ export interface PixelRect {
29
+ readonly x: number;
30
+ readonly y: number;
31
+ readonly width: number;
32
+ readonly height: number;
33
+ }
34
+ export interface IndexRange {
35
+ readonly start: number;
36
+ readonly end: number;
37
+ }
38
+ export interface ScrollAxisLayout {
39
+ readonly logicalContentSize: number;
40
+ readonly logicalViewportSize: number;
41
+ readonly logicalOffset: number;
42
+ readonly logicalMaxOffset: number;
43
+ readonly physicalContentSize: number;
44
+ readonly physicalOffset: number;
45
+ readonly physicalMaxOffset: number;
46
+ readonly compressed: boolean;
47
+ }
48
+ export interface VisibleColumn {
49
+ readonly index: number;
50
+ readonly id: string;
51
+ readonly name: string;
52
+ /** Viewport-relative left edge in CSS pixels. */
53
+ readonly x: number;
54
+ readonly width: number;
55
+ /** True when the column is pinned at the workbook's frozen boundary. */
56
+ readonly frozen: boolean;
57
+ }
58
+ export interface VisibleRow {
59
+ readonly index: number;
60
+ /** Viewport-relative top edge in CSS pixels. */
61
+ readonly y: number;
62
+ readonly height: number;
63
+ /** True when the row is pinned at the workbook's frozen boundary. */
64
+ readonly frozen: boolean;
65
+ }
66
+ export interface SparseAxisOverride {
67
+ readonly index: number;
68
+ readonly size: number;
69
+ /** Cumulative size delta through and including this override. */
70
+ readonly cumulativeDelta: number;
71
+ }
72
+ /** Compact geometry for a potentially million-row spreadsheet axis. */
73
+ export interface SparseAxisGeometry {
74
+ readonly count: number;
75
+ readonly defaultSize: number;
76
+ readonly contentSize: number;
77
+ readonly overrides: readonly Readonly<SparseAxisOverride>[];
78
+ }
79
+ export interface TableLayout {
80
+ readonly width: number;
81
+ readonly height: number;
82
+ readonly devicePixelRatio: number;
83
+ readonly rowHeight: number;
84
+ readonly headerHeight: number;
85
+ readonly rowHeaderWidth: number;
86
+ readonly bodyWidth: number;
87
+ readonly bodyHeight: number;
88
+ readonly rowCount: number;
89
+ readonly columnCount: number;
90
+ readonly rows: Readonly<{
91
+ readonly visible: Readonly<IndexRange>;
92
+ readonly overscan: Readonly<IndexRange>;
93
+ }>;
94
+ readonly columns: Readonly<{
95
+ readonly visible: Readonly<IndexRange>;
96
+ readonly overscan: Readonly<IndexRange>;
97
+ }>;
98
+ readonly visibleColumns: readonly Readonly<VisibleColumn>[];
99
+ readonly overscanColumns: readonly Readonly<VisibleColumn>[];
100
+ readonly visibleRows: readonly Readonly<VisibleRow>[];
101
+ readonly overscanRows: readonly Readonly<VisibleRow>[];
102
+ /** Effective widths use zero for workbook-hidden columns. */
103
+ readonly effectiveColumnWidths: readonly number[];
104
+ readonly rowGeometry: Readonly<SparseAxisGeometry>;
105
+ readonly frozenRowCount: number;
106
+ readonly frozenColumnCount: number;
107
+ readonly frozenRowExtent: number;
108
+ readonly frozenColumnExtent: number;
109
+ /** Frozen segments are loaded separately when the scroll window is distant. */
110
+ readonly frozenRowRange: Readonly<IndexRange>;
111
+ readonly frozenColumnRange: Readonly<IndexRange>;
112
+ readonly horizontal: Readonly<ScrollAxisLayout>;
113
+ readonly vertical: Readonly<ScrollAxisLayout>;
114
+ /** Spacer dimensions for a native scroll host, including sticky headers. */
115
+ readonly spacerWidth: number;
116
+ readonly spacerHeight: number;
117
+ }
118
+ export type HitTestResult = Readonly<{
119
+ kind: "outside";
120
+ }> | Readonly<{
121
+ kind: "corner";
122
+ }> | Readonly<{
123
+ kind: "column-header";
124
+ columnIndex: number;
125
+ }> | Readonly<{
126
+ kind: "column-resize";
127
+ columnIndex: number;
128
+ boundaryX: number;
129
+ }> | Readonly<{
130
+ kind: "row-header";
131
+ rowIndex: number;
132
+ }> | Readonly<{
133
+ kind: "cell";
134
+ rowIndex: number;
135
+ columnIndex: number;
136
+ }>;
137
+ export type CellLoadState = Readonly<{
138
+ status: "loading";
139
+ }> | Readonly<{
140
+ status: "unavailable";
141
+ }> | Readonly<{
142
+ status: "loaded";
143
+ value: string | null;
144
+ }>;
145
+ export type TableViewStatus = "loading" | "ready" | "error" | "closed";
146
+ export interface TableViewSnapshot {
147
+ readonly generation: number;
148
+ readonly status: TableViewStatus;
149
+ readonly metadata: Readonly<TableMetadata>;
150
+ readonly layout: Readonly<TableLayout>;
151
+ readonly activeCell: Readonly<CellPosition> | null;
152
+ readonly selection: Readonly<TableSelection> | null;
153
+ readonly error?: unknown;
154
+ }
155
+ export interface ViewportUpdate {
156
+ readonly width: number;
157
+ readonly height: number;
158
+ /** Native scroll-host offset in CSS pixels. */
159
+ readonly scrollLeft: number;
160
+ /** Native scroll-host offset in CSS pixels. */
161
+ readonly scrollTop: number;
162
+ readonly devicePixelRatio?: number;
163
+ }
164
+ export interface TableControllerOptions {
165
+ readonly rowHeight?: number;
166
+ readonly headerHeight?: number;
167
+ readonly rowHeaderWidth?: number;
168
+ readonly columnWidth?: number;
169
+ readonly minColumnWidth?: number;
170
+ readonly maxColumnWidth?: number;
171
+ readonly columnWidths?: Readonly<Record<string, number>>;
172
+ readonly scrollPixelLimit?: number;
173
+ readonly overscanRows?: number;
174
+ readonly overscanColumns?: number;
175
+ /** Hard bound for decoded render/cache cells. */
176
+ readonly maxWindowCells?: number;
177
+ }
178
+ export type NavigationCommand = "left" | "right" | "up" | "down" | "page-up" | "page-down" | "row-start" | "row-end" | "table-start" | "table-end";
179
+ export interface SetActiveCellOptions {
180
+ readonly extendSelection?: boolean;
181
+ readonly scrollIntoView?: boolean;
182
+ }
183
+ export interface MoveActiveCellOptions extends SetActiveCellOptions {
184
+ }
@@ -0,0 +1,126 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Dedicated Arrow IPC runtime artifact implementing adapter ABI v2.
5
+ */
6
+ export class WasmRuntime {
7
+ free(): void;
8
+ /**
9
+ * Returns the frozen official adapter ID.
10
+ */
11
+ adapterId(): string;
12
+ /**
13
+ * Begins an open without copying the full source into WebAssembly.
14
+ *
15
+ * IPC Files request only their trailer, footer, and record metadata here.
16
+ * IPC Streams request bounded sequential chunks.
17
+ */
18
+ beginOpen(options: any, source_length: number): any;
19
+ /**
20
+ * Starts a range read. Streams complete from retained decoded batches;
21
+ * Files request only dictionaries and intersecting record blocks.
22
+ */
23
+ beginRead(table_handle: number, request: any): any;
24
+ /**
25
+ * Opens the source's single logical table.
26
+ */
27
+ openTable(source_handle: number, table_id: string): any;
28
+ /**
29
+ * Idempotently closes one table and its in-flight reads.
30
+ */
31
+ closeTable(table_handle: number): boolean;
32
+ /**
33
+ * Idempotently closes one source, its tables, and all child reads.
34
+ */
35
+ closeSource(source_handle: number): boolean;
36
+ /**
37
+ * Returns no static presentation for Arrow IPC tables.
38
+ */
39
+ presentation(table_handle: number): any;
40
+ /**
41
+ * Cancels and releases a pending adapter operation.
42
+ */
43
+ cancelOperation(operation_handle: number): boolean;
44
+ /**
45
+ * Returns the Worker protocol version.
46
+ */
47
+ protocolVersion(): number;
48
+ /**
49
+ * Supplies exactly one requested source byte range and advances an open
50
+ * or File range-read operation.
51
+ */
52
+ continueOperation(operation_handle: number, absolute_offset: number, bytes: Uint8Array, eof: boolean): any;
53
+ /**
54
+ * Returns the official adapter ABI version.
55
+ */
56
+ adapterApiVersion(): number;
57
+ /**
58
+ * Returns typed-buffer layout version one.
59
+ */
60
+ batchLayoutVersion(): number;
61
+ /**
62
+ * Returns no range presentation for Arrow IPC tables.
63
+ */
64
+ readPresentationRange(table_handle: number, request: any): any;
65
+ /**
66
+ * Creates an empty Arrow adapter runtime.
67
+ */
68
+ constructor(config: any);
69
+ /**
70
+ * Returns the latest table metadata.
71
+ */
72
+ metadata(table_handle: number): any;
73
+ /**
74
+ * Releases all operations, tables, and sources.
75
+ */
76
+ shutdown(): void;
77
+ }
78
+
79
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
80
+
81
+ export interface InitOutput {
82
+ readonly memory: WebAssembly.Memory;
83
+ readonly __wbg_wasmruntime_free: (a: number, b: number) => void;
84
+ readonly wasmruntime_adapterApiVersion: (a: number) => number;
85
+ readonly wasmruntime_adapterId: (a: number, b: number) => void;
86
+ readonly wasmruntime_batchLayoutVersion: (a: number) => number;
87
+ readonly wasmruntime_beginOpen: (a: number, b: number, c: number, d: number) => void;
88
+ readonly wasmruntime_beginRead: (a: number, b: number, c: number, d: number) => void;
89
+ readonly wasmruntime_cancelOperation: (a: number, b: number) => number;
90
+ readonly wasmruntime_closeSource: (a: number, b: number) => number;
91
+ readonly wasmruntime_closeTable: (a: number, b: number) => number;
92
+ readonly wasmruntime_continueOperation: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
93
+ readonly wasmruntime_metadata: (a: number, b: number, c: number) => void;
94
+ readonly wasmruntime_new: (a: number, b: number) => void;
95
+ readonly wasmruntime_openTable: (a: number, b: number, c: number, d: number, e: number) => void;
96
+ readonly wasmruntime_presentation: (a: number, b: number, c: number) => void;
97
+ readonly wasmruntime_protocolVersion: (a: number) => number;
98
+ readonly wasmruntime_readPresentationRange: (a: number, b: number, c: number, d: number) => void;
99
+ readonly wasmruntime_shutdown: (a: number) => void;
100
+ readonly __wbindgen_export_0: (a: number, b: number) => number;
101
+ readonly __wbindgen_export_1: (a: number, b: number, c: number, d: number) => number;
102
+ readonly __wbindgen_export_2: (a: number) => void;
103
+ readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
104
+ readonly __wbindgen_export_3: (a: number, b: number, c: number) => void;
105
+ }
106
+
107
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
108
+ /**
109
+ * Instantiates the given `module`, which can either be bytes or
110
+ * a precompiled `WebAssembly.Module`.
111
+ *
112
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
113
+ *
114
+ * @returns {InitOutput}
115
+ */
116
+ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
117
+
118
+ /**
119
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
120
+ * for everything else, calls `WebAssembly.instantiate` directly.
121
+ *
122
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
123
+ *
124
+ * @returns {Promise<InitOutput>}
125
+ */
126
+ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;