@perspective-dev/viewer 4.1.1 → 4.3.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 (62) hide show
  1. package/dist/cdn/perspective-viewer.js +2 -2
  2. package/dist/cdn/perspective-viewer.js.map +4 -4
  3. package/dist/css/botanical.css +1 -0
  4. package/dist/css/dracula.css +1 -1
  5. package/dist/css/gruvbox-dark.css +1 -1
  6. package/dist/css/gruvbox.css +1 -1
  7. package/dist/css/solarized.css +1 -1
  8. package/dist/css/themes.css +1 -1
  9. package/dist/css/vaporwave.css +1 -1
  10. package/dist/esm/extensions.d.ts +32 -1
  11. package/dist/esm/perspective-viewer.d.ts +1 -0
  12. package/dist/esm/perspective-viewer.inline.js +2 -2
  13. package/dist/esm/perspective-viewer.inline.js.map +4 -4
  14. package/dist/esm/perspective-viewer.js +2 -2
  15. package/dist/esm/perspective-viewer.js.map +4 -4
  16. package/dist/esm/ts-rs/GroupRollupMode.d.ts +1 -0
  17. package/dist/esm/ts-rs/ViewerConfigUpdate.d.ts +2 -0
  18. package/dist/wasm/perspective-viewer.d.ts +1403 -1319
  19. package/dist/wasm/perspective-viewer.js +3531 -3268
  20. package/dist/wasm/perspective-viewer.wasm +0 -0
  21. package/dist/wasm/perspective-viewer.wasm.d.ts +111 -99
  22. package/package.json +4 -3
  23. package/src/less/column-selector.less +2 -2
  24. package/src/less/config-selector.less +66 -4
  25. package/src/rust/components/column_dropdown.rs +8 -8
  26. package/src/rust/components/column_selector/config_selector.rs +102 -29
  27. package/src/rust/components/column_selector/filter_column.rs +12 -12
  28. package/src/rust/components/column_selector/pivot_column.rs +12 -7
  29. package/src/rust/components/column_selector.rs +27 -17
  30. package/src/rust/components/column_settings_sidebar/style_tab/symbol/row_selector.rs +5 -5
  31. package/src/rust/components/column_settings_sidebar.rs +2 -4
  32. package/src/rust/components/containers/dragdrop_list.rs +32 -10
  33. package/src/rust/components/containers/scroll_panel.rs +8 -1
  34. package/src/rust/components/containers/select.rs +9 -9
  35. package/src/rust/components/containers/split_panel.rs +2 -2
  36. package/src/rust/components/filter_dropdown.rs +8 -8
  37. package/src/rust/components/function_dropdown.rs +8 -8
  38. package/src/rust/components/modal.rs +4 -4
  39. package/src/rust/components/plugin_selector.rs +15 -5
  40. package/src/rust/components/status_indicator.rs +3 -0
  41. package/src/rust/custom_elements/filter_dropdown.rs +4 -4
  42. package/src/rust/custom_elements/viewer.rs +2 -7
  43. package/src/rust/js/plugin.rs +19 -0
  44. package/src/rust/model/copy_export.rs +2 -1
  45. package/src/rust/model/intersection_observer.rs +3 -1
  46. package/src/rust/presentation/sheets.rs +4 -1
  47. package/src/rust/presentation.rs +4 -4
  48. package/src/rust/renderer/registry.rs +8 -1
  49. package/src/rust/session/column_defaults_update.rs +18 -0
  50. package/src/rust/session/replace_expression_update.rs +1 -0
  51. package/src/themes/botanical.less +142 -0
  52. package/src/themes/themes.less +2 -1
  53. package/src/ts/extensions.ts +73 -2
  54. package/src/ts/perspective-viewer.ts +1 -0
  55. package/src/ts/ts-rs/GroupRollupMode.ts +3 -0
  56. package/src/ts/ts-rs/ViewerConfigUpdate.ts +2 -1
  57. package/tsconfig.json +1 -0
  58. /package/dist/wasm/snippets/{perspective-viewer-11a3c51b6310ee99 → perspective-viewer-d729f682ba5c19df}/inline0.js +0 -0
  59. /package/dist/wasm/snippets/{perspective-viewer-11a3c51b6310ee99/inline2.js → perspective-viewer-d729f682ba5c19df/inline1.js} +0 -0
  60. /package/dist/wasm/snippets/{perspective-viewer-11a3c51b6310ee99/inline1.js → perspective-viewer-d729f682ba5c19df/inline2.js} +0 -0
  61. /package/dist/wasm/snippets/{perspective-viewer-11a3c51b6310ee99 → perspective-viewer-d729f682ba5c19df}/inline3.js +0 -0
  62. /package/dist/wasm/snippets/{perspective-viewer-11a3c51b6310ee99 → perspective-viewer-d729f682ba5c19df}/inline4.js +0 -0
@@ -1,24 +1,11 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- /**
4
- * Register a plugin globally.
5
- */
6
- export function registerPlugin(name: string): void;
7
- /**
8
- * Register this crate's Custom Elements in the browser's current session.
9
- *
10
- * This must occur before calling any public API methods on these Custom
11
- * Elements from JavaScript, as the methods themselves won't be defined yet.
12
- * By default, this crate does not register `PerspectiveViewerElement` (as to
13
- * preserve backwards-compatible synchronous API).
14
- */
15
- export function init(): void;
16
3
 
17
4
  import type {
18
5
  ColumnType,
19
- TableInitOptions,
6
+ TableInitOptions,
20
7
  ColumnWindow,
21
- ViewWindow,
8
+ ViewWindow,
22
9
  OnUpdateOptions,
23
10
  UpdateOptions,
24
11
  DeleteOptions,
@@ -27,6 +14,7 @@ import type {
27
14
  } from "@perspective-dev/client";
28
15
 
29
16
 
17
+
30
18
  /**
31
19
  * An instance of a [`Client`] is a connection to a single
32
20
  * `perspective_server::Server`, whether locally in-memory or remote over some
@@ -66,213 +54,258 @@ import type {
66
54
  * ```
67
55
  */
68
56
  export class Client {
69
- free(): void;
70
- [Symbol.dispose](): void;
71
- __getClassname(): string;
72
- constructor(send_request: Function, close?: Function | null);
73
- new_proxy_session(on_response: Function): ProxySession;
74
- handle_response(value: any): Promise<void>;
75
- handle_error(error: string, reconnect?: Function | null): Promise<void>;
76
- on_error(callback: Function): Promise<number>;
77
- /**
78
- * Creates a new [`Table`] from either a _schema_ or _data_.
79
- *
80
- * The [`Client::table`] factory function can be initialized with either a
81
- * _schema_ (see [`Table::schema`]), or data in one of these formats:
82
- *
83
- * - Apache Arrow
84
- * - CSV
85
- * - JSON row-oriented
86
- * - JSON column-oriented
87
- * - NDJSON
88
- *
89
- * When instantiated with _data_, the schema is inferred from this data.
90
- * While this is convenient, inferrence is sometimes imperfect e.g.
91
- * when the input is empty, null or ambiguous. For these cases,
92
- * [`Client::table`] can first be instantiated with a explicit schema.
93
- *
94
- * When instantiated with a _schema_, the resulting [`Table`] is empty but
95
- * with known column names and column types. When subsqeuently
96
- * populated with [`Table::update`], these columns will be _coerced_ to
97
- * the schema's type. This behavior can be useful when
98
- * [`Client::table`]'s column type inferences doesn't work.
99
- *
100
- * The resulting [`Table`] is _virtual_, and invoking its methods
101
- * dispatches events to the `perspective_server::Server` this
102
- * [`Client`] connects to, where the data is stored and all calculation
103
- * occurs.
104
- *
105
- * # Arguments
106
- *
107
- * - `arg` - Either _schema_ or initialization _data_.
108
- * - `options` - Optional configuration which provides one of:
109
- * - `limit` - The max number of rows the resulting [`Table`] can
110
- * store.
111
- * - `index` - The column name to use as an _index_ column. If this
112
- * `Table` is being instantiated by _data_, this column name must be
113
- * present in the data.
114
- * - `name` - The name of the table. This will be generated if it is
115
- * not provided.
116
- * - `format` - The explicit format of the input data, can be one of
117
- * `"json"`, `"columns"`, `"csv"` or `"arrow"`. This overrides
118
- * language-specific type dispatch behavior, which allows stringified
119
- * and byte array alternative inputs.
120
- *
121
- * # JavaScript Examples
122
- *
123
- * Load a CSV from a `string`:
124
- *
125
- * ```javascript
126
- * const table = await client.table("x,y\n1,2\n3,4");
127
- * ```
128
- *
129
- * Load an Arrow from an `ArrayBuffer`:
130
- *
131
- * ```javascript
132
- * import * as fs from "node:fs/promises";
133
- * const table2 = await client.table(await fs.readFile("superstore.arrow"));
134
- * ```
135
- *
136
- * Load a CSV from a `UInt8Array` (the default for this type is Arrow)
137
- * using a format override:
138
- *
139
- * ```javascript
140
- * const enc = new TextEncoder();
141
- * const table = await client.table(enc.encode("x,y\n1,2\n3,4"), {
142
- * format: "csv",
143
- * });
144
- * ```
145
- *
146
- * Create a table with an `index`:
147
- *
148
- * ```javascript
149
- * const table = await client.table(data, { index: "Row ID" });
150
- * ```
151
- */
152
- table(value: string | ArrayBuffer | Record<string, unknown[]> | Record<string, unknown>[] | Record<string, ColumnType>, options?: TableInitOptions | null): Promise<Table>;
153
- /**
154
- * Terminates this [`Client`], cleaning up any [`crate::View`] handles the
155
- * [`Client`] has open as well as its callbacks.
156
- */
157
- terminate(): any;
158
- /**
159
- * Opens a [`Table`] that is hosted on the `perspective_server::Server`
160
- * that is connected to this [`Client`].
161
- *
162
- * The `name` property of [`TableInitOptions`] is used to identify each
163
- * [`Table`]. [`Table`] `name`s can be looked up for each [`Client`]
164
- * via [`Client::get_hosted_table_names`].
165
- *
166
- * # JavaScript Examples
167
- *
168
- * Get a virtual [`Table`] named "table_one" from this [`Client`]
169
- *
170
- * ```javascript
171
- * const tables = await client.open_table("table_one");
172
- * ```
173
- */
174
- open_table(entity_id: string): Promise<Table>;
175
- /**
176
- * Retrieves the names of all tables that this client has access to.
177
- *
178
- * `name` is a string identifier unique to the [`Table`] (per [`Client`]),
179
- * which can be used in conjunction with [`Client::open_table`] to get
180
- * a [`Table`] instance without the use of [`Client::table`]
181
- * constructor directly (e.g., one created by another [`Client`]).
182
- *
183
- * # JavaScript Examples
184
- *
185
- * ```javascript
186
- * const tables = await client.get_hosted_table_names();
187
- * ```
188
- */
189
- get_hosted_table_names(): Promise<string[]>;
190
- /**
191
- * Register a callback which is invoked whenever [`Client::table`] (on this
192
- * [`Client`]) or [`Table::delete`] (on a [`Table`] belinging to this
193
- * [`Client`]) are called.
194
- */
195
- on_hosted_tables_update(on_update_js: Function): Promise<number>;
196
- /**
197
- * Remove a callback previously registered via
198
- * `Client::on_hosted_tables_update`.
199
- */
200
- remove_hosted_tables_update(update_id: number): Promise<void>;
201
- /**
202
- * Provides the [`SystemInfo`] struct, implementation-specific metadata
203
- * about the [`perspective_server::Server`] runtime such as Memory and
204
- * CPU usage.
205
- *
206
- * For WebAssembly servers, this method includes the WebAssembly heap size.
207
- *
208
- * # JavaScript Examples
209
- *
210
- * ```javascript
211
- * const info = await client.system_info();
212
- * ```
213
- */
214
- system_info(): Promise<SystemInfo>;
57
+ free(): void;
58
+ [Symbol.dispose](): void;
59
+ __getClassname(): string;
60
+ /**
61
+ * Retrieves the names of all tables that this client has access to.
62
+ *
63
+ * `name` is a string identifier unique to the [`Table`] (per [`Client`]),
64
+ * which can be used in conjunction with [`Client::open_table`] to get
65
+ * a [`Table`] instance without the use of [`Client::table`]
66
+ * constructor directly (e.g., one created by another [`Client`]).
67
+ *
68
+ * # JavaScript Examples
69
+ *
70
+ * ```javascript
71
+ * const tables = await client.get_hosted_table_names();
72
+ * ```
73
+ */
74
+ get_hosted_table_names(): Promise<string[]>;
75
+ handle_error(error: string, reconnect?: Function | null): Promise<void>;
76
+ handle_response(value: any): Promise<void>;
77
+ constructor(send_request: Function, close?: Function | null);
78
+ new_proxy_session(on_response: Function): ProxySession;
79
+ on_error(callback: Function): Promise<number>;
80
+ /**
81
+ * Register a callback which is invoked whenever [`Client::table`] (on this
82
+ * [`Client`]) or [`Table::delete`] (on a [`Table`] belinging to this
83
+ * [`Client`]) are called.
84
+ */
85
+ on_hosted_tables_update(on_update_js: Function): Promise<number>;
86
+ /**
87
+ * Opens a [`Table`] that is hosted on the `perspective_server::Server`
88
+ * that is connected to this [`Client`].
89
+ *
90
+ * The `name` property of [`TableInitOptions`] is used to identify each
91
+ * [`Table`]. [`Table`] `name`s can be looked up for each [`Client`]
92
+ * via [`Client::get_hosted_table_names`].
93
+ *
94
+ * # JavaScript Examples
95
+ *
96
+ * Get a virtual [`Table`] named "table_one" from this [`Client`]
97
+ *
98
+ * ```javascript
99
+ * const tables = await client.open_table("table_one");
100
+ * ```
101
+ */
102
+ open_table(entity_id: string): Promise<Table>;
103
+ /**
104
+ * Remove a callback previously registered via
105
+ * `Client::on_hosted_tables_update`.
106
+ */
107
+ remove_hosted_tables_update(update_id: number): Promise<void>;
108
+ /**
109
+ * Provides the [`SystemInfo`] struct, implementation-specific metadata
110
+ * about the [`perspective_server::Server`] runtime such as Memory and
111
+ * CPU usage.
112
+ *
113
+ * For WebAssembly servers, this method includes the WebAssembly heap size.
114
+ *
115
+ * # JavaScript Examples
116
+ *
117
+ * ```javascript
118
+ * const info = await client.system_info();
119
+ * ```
120
+ */
121
+ system_info(): Promise<SystemInfo>;
122
+ /**
123
+ * Creates a new [`Table`] from either a _schema_ or _data_.
124
+ *
125
+ * The [`Client::table`] factory function can be initialized with either a
126
+ * _schema_ (see [`Table::schema`]), or data in one of these formats:
127
+ *
128
+ * - Apache Arrow
129
+ * - CSV
130
+ * - JSON row-oriented
131
+ * - JSON column-oriented
132
+ * - NDJSON
133
+ *
134
+ * When instantiated with _data_, the schema is inferred from this data.
135
+ * While this is convenient, inferrence is sometimes imperfect e.g.
136
+ * when the input is empty, null or ambiguous. For these cases,
137
+ * [`Client::table`] can first be instantiated with a explicit schema.
138
+ *
139
+ * When instantiated with a _schema_, the resulting [`Table`] is empty but
140
+ * with known column names and column types. When subsqeuently
141
+ * populated with [`Table::update`], these columns will be _coerced_ to
142
+ * the schema's type. This behavior can be useful when
143
+ * [`Client::table`]'s column type inferences doesn't work.
144
+ *
145
+ * The resulting [`Table`] is _virtual_, and invoking its methods
146
+ * dispatches events to the `perspective_server::Server` this
147
+ * [`Client`] connects to, where the data is stored and all calculation
148
+ * occurs.
149
+ *
150
+ * # Arguments
151
+ *
152
+ * - `arg` - Either _schema_ or initialization _data_.
153
+ * - `options` - Optional configuration which provides one of:
154
+ * - `limit` - The max number of rows the resulting [`Table`] can
155
+ * store.
156
+ * - `index` - The column name to use as an _index_ column. If this
157
+ * `Table` is being instantiated by _data_, this column name must be
158
+ * present in the data.
159
+ * - `name` - The name of the table. This will be generated if it is
160
+ * not provided.
161
+ * - `format` - The explicit format of the input data, can be one of
162
+ * `"json"`, `"columns"`, `"csv"` or `"arrow"`. This overrides
163
+ * language-specific type dispatch behavior, which allows stringified
164
+ * and byte array alternative inputs.
165
+ *
166
+ * # JavaScript Examples
167
+ *
168
+ * Load a CSV from a `string`:
169
+ *
170
+ * ```javascript
171
+ * const table = await client.table("x,y\n1,2\n3,4");
172
+ * ```
173
+ *
174
+ * Load an Arrow from an `ArrayBuffer`:
175
+ *
176
+ * ```javascript
177
+ * import * as fs from "node:fs/promises";
178
+ * const table2 = await client.table(await fs.readFile("superstore.arrow"));
179
+ * ```
180
+ *
181
+ * Load a CSV from a `UInt8Array` (the default for this type is Arrow)
182
+ * using a format override:
183
+ *
184
+ * ```javascript
185
+ * const enc = new TextEncoder();
186
+ * const table = await client.table(enc.encode("x,y\n1,2\n3,4"), {
187
+ * format: "csv",
188
+ * });
189
+ * ```
190
+ *
191
+ * Create a table with an `index`:
192
+ *
193
+ * ```javascript
194
+ * const table = await client.table(data, { index: "Row ID" });
195
+ * ```
196
+ */
197
+ table(value: string | ArrayBuffer | Record<string, unknown[]> | Record<string, unknown>[] | Record<string, ColumnType>, options?: TableInitOptions | null): Promise<Table>;
198
+ /**
199
+ * Terminates this [`Client`], cleaning up any [`crate::View`] handles the
200
+ * [`Client`] has open as well as its callbacks.
201
+ */
202
+ terminate(): any;
215
203
  }
204
+
216
205
  export class ColumnDropDownElement {
217
- private constructor();
218
- free(): void;
219
- [Symbol.dispose](): void;
206
+ private constructor();
207
+ free(): void;
208
+ [Symbol.dispose](): void;
220
209
  }
210
+
221
211
  export class CopyDropDownMenuElement {
222
- free(): void;
223
- [Symbol.dispose](): void;
224
- constructor(elem: HTMLElement);
225
- open(target: HTMLElement): void;
226
- hide(): void;
227
- /**
228
- * Internal Only.
229
- *
230
- * Set this custom element model's raw pointer.
231
- */
232
- __set_model(parent: PerspectiveViewerElement): void;
233
- connected_callback(): void;
212
+ free(): void;
213
+ [Symbol.dispose](): void;
214
+ /**
215
+ * Internal Only.
216
+ *
217
+ * Set this custom element model's raw pointer.
218
+ */
219
+ __set_model(parent: PerspectiveViewerElement): void;
220
+ connected_callback(): void;
221
+ hide(): void;
222
+ constructor(elem: HTMLElement);
223
+ open(target: HTMLElement): void;
234
224
  }
225
+
235
226
  export class ExportDropDownMenuElement {
236
- free(): void;
237
- [Symbol.dispose](): void;
238
- constructor(elem: HTMLElement);
239
- open(target: HTMLElement): void;
240
- hide(): void;
241
- /**
242
- * Internal Only.
243
- *
244
- * Set this custom element model's raw pointer.
245
- */
246
- __set_model(parent: PerspectiveViewerElement): void;
247
- connected_callback(): void;
227
+ free(): void;
228
+ [Symbol.dispose](): void;
229
+ /**
230
+ * Internal Only.
231
+ *
232
+ * Set this custom element model's raw pointer.
233
+ */
234
+ __set_model(parent: PerspectiveViewerElement): void;
235
+ connected_callback(): void;
236
+ hide(): void;
237
+ constructor(elem: HTMLElement);
238
+ open(target: HTMLElement): void;
248
239
  }
240
+
249
241
  export class FilterDropDownElement {
250
- private constructor();
251
- free(): void;
252
- [Symbol.dispose](): void;
242
+ private constructor();
243
+ free(): void;
244
+ [Symbol.dispose](): void;
253
245
  }
246
+
254
247
  export class FunctionDropDownElement {
255
- private constructor();
256
- free(): void;
257
- [Symbol.dispose](): void;
258
- }
259
- export class JsVirtualDataSlice {
260
- free(): void;
261
- [Symbol.dispose](): void;
262
- constructor();
263
- setCol(dtype: string, name: string, index: number, val: any, group_by_index?: number | null): void;
264
- setStringCol(name: string, index: number, val: any, group_by_index?: number | null): void;
265
- setIntegerCol(name: string, index: number, val: any, group_by_index?: number | null): void;
266
- setFloatCol(name: string, index: number, val: any, group_by_index?: number | null): void;
267
- setBooleanCol(name: string, index: number, val: any, group_by_index?: number | null): void;
268
- setDatetimeCol(name: string, index: number, val: any, group_by_index?: number | null): void;
248
+ private constructor();
249
+ free(): void;
250
+ [Symbol.dispose](): void;
269
251
  }
270
- export class JsVirtualServer {
271
- free(): void;
272
- [Symbol.dispose](): void;
273
- constructor(handler: object);
274
- handleRequest(bytes: Uint8Array): Promise<any>;
252
+
253
+ /**
254
+ * JavaScript-facing DuckDB SQL query builder.
255
+ *
256
+ * This struct wraps the Rust `DuckDBSqlBuilder` and exposes it to JavaScript
257
+ * via wasm_bindgen.
258
+ */
259
+ export class GenericSQLVirtualServerModel {
260
+ free(): void;
261
+ [Symbol.dispose](): void;
262
+ /**
263
+ * Returns the SQL query to list all hosted tables.
264
+ */
265
+ getHostedTables(): string;
266
+ /**
267
+ * Creates a new `JsDuckDBSqlBuilder` instance.
268
+ */
269
+ constructor(args?: any | null);
270
+ /**
271
+ * Returns the SQL query to create a view from a table with the given
272
+ * configuration.
273
+ */
274
+ tableMakeView(table_id: string, view_id: string, config: any): string;
275
+ /**
276
+ * Returns the SQL query to describe a table's schema.
277
+ */
278
+ tableSchema(table_id: string): string;
279
+ /**
280
+ * Returns the SQL query to get the row count of a table.
281
+ */
282
+ tableSize(table_id: string): string;
283
+ /**
284
+ * Returns the SQL query to validate an expression against a table.
285
+ */
286
+ tableValidateExpression(table_id: string, expression: string): string;
287
+ /**
288
+ * Returns the SQL query to get the column count of a view.
289
+ */
290
+ viewColumnSize(view_id: string): string;
291
+ /**
292
+ * Returns the SQL query to delete a view.
293
+ */
294
+ viewDelete(view_id: string): string;
295
+ /**
296
+ * Returns the SQL query to fetch data from a view with the given viewport.
297
+ */
298
+ viewGetData(view_id: string, config: any, viewport: any, schema: any): string;
299
+ /**
300
+ * Returns the SQL query to describe a view's schema.
301
+ */
302
+ viewSchema(view_id: string): string;
303
+ /**
304
+ * Returns the SQL query to get the row count of a view.
305
+ */
306
+ viewSize(view_id: string): string;
275
307
  }
308
+
276
309
  /**
277
310
  * The `<perspective-viewer-plugin>` element.
278
311
  *
@@ -290,30 +323,31 @@ export class JsVirtualServer {
290
323
  * ```
291
324
  */
292
325
  export class PerspectiveDebugPluginElement {
293
- free(): void;
294
- [Symbol.dispose](): void;
295
- constructor(elem: HTMLElement);
296
- update(view: View): Promise<any>;
297
- /**
298
- * # Notes
299
- *
300
- * When you pass a `wasm_bindgen` wrapped type _into_ Rust, it acts like a
301
- * move. Ergo, if you replace the `&` in the `view` argument, the JS copy
302
- * of the `View` will be invalid
303
- */
304
- draw(view: View): Promise<any>;
305
- clear(): Promise<any>;
306
- resize(): Promise<any>;
307
- restyle(): Promise<any>;
308
- save(): Promise<any>;
309
- restore(): Promise<any>;
310
- delete(): Promise<any>;
311
- connectedCallback(): void;
312
- readonly name: string;
313
- readonly select_mode: string;
314
- readonly min_config_columns: any;
315
- readonly config_column_names: any;
326
+ free(): void;
327
+ [Symbol.dispose](): void;
328
+ clear(): Promise<any>;
329
+ connectedCallback(): void;
330
+ delete(): Promise<any>;
331
+ /**
332
+ * # Notes
333
+ *
334
+ * When you pass a `wasm_bindgen` wrapped type _into_ Rust, it acts like a
335
+ * move. Ergo, if you replace the `&` in the `view` argument, the JS copy
336
+ * of the `View` will be invalid
337
+ */
338
+ draw(view: View): Promise<any>;
339
+ constructor(elem: HTMLElement);
340
+ resize(): Promise<any>;
341
+ restore(): Promise<any>;
342
+ restyle(): Promise<any>;
343
+ save(): Promise<any>;
344
+ update(view: View): Promise<any>;
345
+ readonly config_column_names: any;
346
+ readonly min_config_columns: any;
347
+ readonly name: string;
348
+ readonly select_mode: string;
316
349
  }
350
+
317
351
  /**
318
352
  * The `<perspective-viewer>` custom element.
319
353
  *
@@ -341,746 +375,749 @@ export class PerspectiveDebugPluginElement {
341
375
  * ```
342
376
  */
343
377
  export class PerspectiveViewerElement {
344
- free(): void;
345
- [Symbol.dispose](): void;
346
- constructor(elem: HTMLElement);
347
- connectedCallback(): void;
348
- /**
349
- * Loads a [`Client`], or optionally [`Table`], or optionally a Javascript
350
- * `Promise` which returns a [`Client`] or [`Table`], in this viewer.
351
- *
352
- * Loading a [`Client`] does not render, but subsequent calls to
353
- * [`PerspectiveViewerElement::restore`] will use this [`Client`] to look
354
- * up the proviced `table` name field for the provided
355
- * [`ViewerConfigUpdate`].
356
- *
357
- * Loading a [`Table`] is equivalent to subsequently calling
358
- * [`Self::restore`] with the `table` field set to [`Table::get_name`], and
359
- * will render the UI in its default state when [`Self::load`] resolves.
360
- * If you plan to call [`Self::restore`] anyway, prefer passing a
361
- * [`Client`] argument to [`Self::load`] as it will conserve one render.
362
- *
363
- * When [`PerspectiveViewerElement::load`] resolves, the first frame of the
364
- * UI + visualization is guaranteed to have been drawn. Awaiting the result
365
- * of this method in a `try`/`catch` block will capture any errors
366
- * thrown during the loading process, or from the [`Client`] `Promise`
367
- * itself.
368
- *
369
- * [`PerspectiveViewerElement::load`] may also be called with a [`Table`],
370
- * which is equivalent to:
371
- *
372
- * ```javascript
373
- * await viewer.load(await table.get_client());
374
- * await viewer.restore({name: await table.get_name()})
375
- * ```
376
- *
377
- * If you plan to call [`PerspectiveViewerElement::restore`] immediately
378
- * after [`PerspectiveViewerElement::load`] yourself, as is commonly
379
- * done when loading and configuring a new `<perspective-viewer>`, you
380
- * should use a [`Client`] as an argument and set the `table` field in the
381
- * restore call as
382
- *
383
- * A [`Table`] can be created using the
384
- * [`@perspective-dev/client`](https://www.npmjs.com/package/@perspective-dev/client)
385
- * library from NPM (see [`perspective_js`] documentation for details).
386
- *
387
- * # JavaScript Examples
388
- *
389
- * ```javascript
390
- * import perspective from "@perspective-dev/client";
391
- *
392
- * const worker = await perspective.worker();
393
- * viewer.load(worker);
394
- * ```
395
- *
396
- * ... or
397
- *
398
- * ```javascript
399
- * const table = await worker.table(data, {name: "superstore"});
400
- * viewer.load(table);
401
- * ```
402
- *
403
- * Complete example:
404
- *
405
- * ```javascript
406
- * const viewer = document.createElement("perspective-viewer");
407
- * const worker = await perspective.worker();
408
- *
409
- * await worker.table("x\n1", {name: "table_one"});
410
- * await viewer.load(worker);
411
- * await viewer.restore({table: "table_one", columns: ["x"]});
412
- * ```
413
- *
414
- * ... or, if you don't want to pass your own arguments to `restore`:
415
- *
416
- * ```javascript
417
- * const viewer = document.createElement("perspective-viewer");
418
- * const worker = await perspective.worker();
419
- *
420
- * const table = await worker.table("x\n1", {name: "table_one"});
421
- * await viewer.load(table);
422
- * ```
423
- */
424
- load(table: any): Promise<any>;
425
- /**
426
- * Delete the internal [`View`] and all associated state, rendering this
427
- * `<perspective-viewer>` unusable and freeing all associated resources.
428
- * Does not delete the supplied [`Table`] (as this is constructed by the
429
- * callee).
430
- *
431
- * Calling _any_ method on a `<perspective-viewer>` after [`Self::delete`]
432
- * will throw.
433
- *
434
- * <div class="warning">
435
- *
436
- * Allowing a `<perspective-viewer>` to be garbage-collected
437
- * without calling [`PerspectiveViewerElement::delete`] will leak WASM
438
- * memory!
439
- *
440
- * </div>
441
- *
442
- * # JavaScript Examples
443
- *
444
- * ```javascript
445
- * await viewer.delete();
446
- * ```
447
- */
448
- delete(): Promise<any>;
449
- /**
450
- * Restart this `<perspective-viewer>` to its initial state, before
451
- * `load()`.
452
- *
453
- * Use `Self::restart` if you plan to call `Self::load` on this viewer
454
- * again, or alternatively `Self::delete` if this viewer is no longer
455
- * needed.
456
- */
457
- eject(): Promise<any>;
458
- /**
459
- * Get the underlying [`View`] for this viewer.
460
- *
461
- * Use this method to get promgrammatic access to the [`View`] as currently
462
- * configured by the user, for e.g. serializing as an
463
- * [Apache Arrow](https://arrow.apache.org/) before passing to another
464
- * library.
465
- *
466
- * The [`View`] returned by this method is owned by the
467
- * [`PerspectiveViewerElement`] and may be _invalidated_ by
468
- * [`View::delete`] at any time. Plugins which rely on this [`View`] for
469
- * their [`HTMLPerspectiveViewerPluginElement::draw`] implementations
470
- * should treat this condition as a _cancellation_ by silently aborting on
471
- * "View already deleted" errors from method calls.
472
- *
473
- * # JavaScript Examples
474
- *
475
- * ```javascript
476
- * const view = await viewer.getView();
477
- * ```
478
- */
479
- getView(): Promise<any>;
480
- /**
481
- * Get a copy of the [`ViewConfig`] for the current [`View`]. This is
482
- * non-blocking as it does not need to access the plugin (unlike
483
- * [`PerspectiveViewerElement::save`]), and also makes no API calls to the
484
- * server (unlike [`PerspectiveViewerElement::getView`] followed by
485
- * [`View::get_config`])
486
- */
487
- getViewConfig(): Promise<any>;
488
- /**
489
- * Get the underlying [`Table`] for this viewer (as passed to
490
- * [`PerspectiveViewerElement::load`] or as the `table` field to
491
- * [`PerspectiveViewerElement::restore`]).
492
- *
493
- * # Arguments
494
- *
495
- * - `wait_for_table` - whether to wait for
496
- * [`PerspectiveViewerElement::load`] to be called, or fail immediately
497
- * if [`PerspectiveViewerElement::load`] has not yet been called.
498
- *
499
- * # JavaScript Examples
500
- *
501
- * ```javascript
502
- * const table = await viewer.getTable();
503
- * ```
504
- */
505
- getTable(wait_for_table?: boolean | null): Promise<any>;
506
- /**
507
- * Get the underlying [`Client`] for this viewer (as passed to, or
508
- * associated with the [`Table`] passed to,
509
- * [`PerspectiveViewerElement::load`]).
510
- *
511
- * # Arguments
512
- *
513
- * - `wait_for_client` - whether to wait for
514
- * [`PerspectiveViewerElement::load`] to be called, or fail immediately
515
- * if [`PerspectiveViewerElement::load`] has not yet been called.
516
- *
517
- * # JavaScript Examples
518
- *
519
- * ```javascript
520
- * const client = await viewer.getClient();
521
- * ```
522
- */
523
- getClient(wait_for_client?: boolean | null): Promise<any>;
524
- /**
525
- * Get render statistics. Some fields of the returned stats object are
526
- * relative to the last time [`PerspectiveViewerElement::getRenderStats`]
527
- * was called, ergo calling this method resets these fields.
528
- *
529
- * # JavaScript Examples
530
- *
531
- * ```javascript
532
- * const {virtual_fps, actual_fps} = await viewer.getRenderStats();
533
- * ```
534
- */
535
- getRenderStats(): any;
536
- /**
537
- * Flush any pending modifications to this `<perspective-viewer>`. Since
538
- * `<perspective-viewer>`'s API is almost entirely `async`, it may take
539
- * some milliseconds before any user-initiated changes to the [`View`]
540
- * affects the rendered element. If you want to make sure all pending
541
- * actions have been rendered, call and await [`Self::flush`].
542
- *
543
- * [`Self::flush`] will resolve immediately if there is no [`Table`] set.
544
- *
545
- * # JavaScript Examples
546
- *
547
- * In this example, [`Self::restore`] is called without `await`, but the
548
- * eventual render which results from this call can still be awaited by
549
- * immediately awaiting [`Self::flush`] instead.
550
- *
551
- * ```javascript
552
- * viewer.restore(config);
553
- * await viewer.flush();
554
- * ```
555
- */
556
- flush(): Promise<any>;
557
- /**
558
- * Restores this element from a full/partial
559
- * [`perspective_js::JsViewConfig`] (this element's user-configurable
560
- * state, including the `Table` name).
561
- *
562
- * One of the best ways to use [`Self::restore`] is by first configuring
563
- * a `<perspective-viewer>` as you wish, then using either the `Debug`
564
- * panel or "Copy" -> "config.json" from the toolbar menu to snapshot
565
- * the [`Self::restore`] argument as JSON.
566
- *
567
- * # Arguments
568
- *
569
- * - `update` - The config to restore to, as returned by [`Self::save`] in
570
- * either "json", "string" or "arraybuffer" format.
571
- *
572
- * # JavaScript Examples
573
- *
574
- * Loads a default plugin for the table named `"superstore"`:
575
- *
576
- * ```javascript
577
- * await viewer.restore({table: "superstore"});
578
- * ```
579
- *
580
- * Apply a `group_by` to the same `viewer` element, without
581
- * modifying/resetting other fields - you can omit the `table` field,
582
- * this has already been set once and is not modified:
583
- *
584
- * ```javascript
585
- * await viewer.restore({group_by: ["State"]});
586
- * ```
587
- */
588
- restore(update: any): Promise<any>;
589
- /**
590
- * If this element is in an _errored_ state, this method will clear it and
591
- * re-render. Calling this method is equivalent to clicking the error reset
592
- * button in the UI.
593
- */
594
- resetError(): Promise<any>;
595
- /**
596
- * Save this element's user-configurable state to a serialized state
597
- * object, one which can be restored via the [`Self::restore`] method.
598
- *
599
- * # JavaScript Examples
600
- *
601
- * Get the current `group_by` setting:
602
- *
603
- * ```javascript
604
- * const {group_by} = await viewer.restore();
605
- * ```
606
- *
607
- * Reset workflow attached to an external button `myResetButton`:
608
- *
609
- * ```javascript
610
- * const token = await viewer.save();
611
- * myResetButton.addEventListener("clien", async () => {
612
- * await viewer.restore(token);
613
- * });
614
- * ```
615
- */
616
- save(): Promise<any>;
617
- /**
618
- * Download this viewer's internal [`View`] data via a browser download
619
- * event.
620
- *
621
- * # Arguments
622
- *
623
- * - `method` - The `ExportMethod` to use to render the data to download.
624
- *
625
- * # JavaScript Examples
626
- *
627
- * ```javascript
628
- * myDownloadButton.addEventListener("click", async () => {
629
- * await viewer.download();
630
- * })
631
- * ```
632
- */
633
- download(method?: string | null): Promise<any>;
634
- /**
635
- * Exports this viewer's internal [`View`] as a JavaSript data, the
636
- * exact type of which depends on the `method` but defaults to `String`
637
- * in CSV format.
638
- *
639
- * This method is only really useful for the `"plugin"` method, which
640
- * will use the configured plugin's export (e.g. PNG for
641
- * `@perspective-dev/viewer-d3fc`). Otherwise, prefer to call the
642
- * equivalent method on the underlying [`View`] directly.
643
- *
644
- * # Arguments
645
- *
646
- * - `method` - The `ExportMethod` to use to render the data to download.
647
- *
648
- * # JavaScript Examples
649
- *
650
- * ```javascript
651
- * const data = await viewer.export("plugin");
652
- * ```
653
- */
654
- export(method?: string | null): Promise<any>;
655
- /**
656
- * Copy this viewer's `View` or `Table` data as CSV to the system
657
- * clipboard.
658
- *
659
- * # Arguments
660
- *
661
- * - `method` - The `ExportMethod` (serialized as a `String`) to use to
662
- * render the data to the Clipboard.
663
- *
664
- * # JavaScript Examples
665
- *
666
- * ```javascript
667
- * myDownloadButton.addEventListener("click", async () => {
668
- * await viewer.copy();
669
- * })
670
- * ```
671
- */
672
- copy(method?: string | null): Promise<any>;
673
- /**
674
- * Reset the viewer's `ViewerConfig` to the default.
675
- *
676
- * # Arguments
677
- *
678
- * - `reset_all` - If set, will clear expressions and column settings as
679
- * well.
680
- *
681
- * # JavaScript Examples
682
- *
683
- * ```javascript
684
- * await viewer.reset();
685
- * ```
686
- */
687
- reset(reset_all?: boolean | null): Promise<any>;
688
- /**
689
- * Recalculate the viewer's dimensions and redraw.
690
- *
691
- * Use this method to tell `<perspective-viewer>` its dimensions have
692
- * changed when auto-size mode has been disabled via [`Self::setAutoSize`].
693
- * [`Self::resize`] resolves when the resize-initiated redraw of this
694
- * element has completed.
695
- *
696
- * # Arguments
697
- *
698
- * - `force` - If [`Self::resize`] is called with `false` or without an
699
- * argument, and _auto-size_ mode is enabled via [`Self::setAutoSize`],
700
- * [`Self::resize`] will log a warning and auto-disable auto-size mode.
701
- *
702
- * # JavaScript Examples
703
- *
704
- * ```javascript
705
- * await viewer.resize(true)
706
- * ```
707
- */
708
- resize(force?: boolean | null): Promise<any>;
709
- /**
710
- * Sets the auto-size behavior of this component.
711
- *
712
- * When `true`, this `<perspective-viewer>` will register a
713
- * `ResizeObserver` on itself and call [`Self::resize`] whenever its own
714
- * dimensions change. However, when embedded in a larger application
715
- * context, you may want to call [`Self::resize`] manually to avoid
716
- * over-rendering; in this case auto-sizing can be disabled via this
717
- * method. Auto-size behavior is enabled by default.
718
- *
719
- * # Arguments
720
- *
721
- * - `autosize` - Whether to enable `auto-size` behavior or not.
722
- *
723
- * # JavaScript Examples
724
- *
725
- * Disable auto-size behavior:
726
- *
727
- * ```javascript
728
- * viewer.setAutoSize(false);
729
- * ```
730
- */
731
- setAutoSize(autosize: boolean): void;
732
- /**
733
- * Sets the auto-pause behavior of this component.
734
- *
735
- * When `true`, this `<perspective-viewer>` will register an
736
- * `IntersectionObserver` on itself and subsequently skip rendering
737
- * whenever its viewport visibility changes. Auto-pause is enabled by
738
- * default.
739
- *
740
- * # Arguments
741
- *
742
- * - `autopause` Whether to enable `auto-pause` behavior or not.
743
- *
744
- * # JavaScript Examples
745
- *
746
- * Disable auto-size behavior:
747
- *
748
- * ```javascript
749
- * viewer.setAutoPause(false);
750
- * ```
751
- */
752
- setAutoPause(autopause: boolean): void;
753
- /**
754
- * Return a [`perspective_js::JsViewWindow`] for the currently selected
755
- * region.
756
- */
757
- getSelection(): ViewWindow | undefined;
758
- /**
759
- * Set the selection [`perspective_js::JsViewWindow`] for this element.
760
- */
761
- setSelection(window?: ViewWindow | null): void;
762
- /**
763
- * Get this viewer's edit port for the currently loaded [`Table`] (see
764
- * [`Table::update`] for details on ports).
765
- */
766
- getEditPort(): number;
767
- /**
768
- * Restyle all plugins from current document.
769
- *
770
- * <div class="warning">
771
- *
772
- * [`Self::restyleElement`] _must_ be called for many runtime changes to
773
- * CSS properties to be reflected in an already-rendered
774
- * `<perspective-viewer>`.
775
- *
776
- * </div>
777
- *
778
- * # JavaScript Examples
779
- *
780
- * ```javascript
781
- * viewer.style = "--icon--color: red";
782
- * await viewer.restyleElement();
783
- * ```
784
- */
785
- restyleElement(): Promise<any>;
786
- /**
787
- * Set the available theme names available in the status bar UI.
788
- *
789
- * Calling [`Self::resetThemes`] may cause the current theme to switch,
790
- * if e.g. the new theme set does not contain the current theme.
791
- *
792
- * # JavaScript Examples
793
- *
794
- * Restrict `<perspective-viewer>` theme options to _only_ default light
795
- * and dark themes, regardless of what is auto-detected from the page's
796
- * CSS:
797
- *
798
- * ```javascript
799
- * viewer.resetThemes(["Pro Light", "Pro Dark"])
800
- * ```
801
- */
802
- resetThemes(themes?: any[] | null): Promise<any>;
803
- /**
804
- * Determines the render throttling behavior. Can be an integer, for
805
- * millisecond window to throttle render event; or, if `None`, adaptive
806
- * throttling will be calculated from the measured render time of the
807
- * last 5 frames.
808
- *
809
- * # Arguments
810
- *
811
- * - `throttle` - The throttle rate in milliseconds (f64), or `None` for
812
- * adaptive throttling.
813
- *
814
- * # JavaScript Examples
815
- *
816
- * Only draws at most 1 frame/sec:
817
- *
818
- * ```rust
819
- * viewer.setThrottle(1000);
820
- * ```
821
- */
822
- setThrottle(val?: number | null): void;
823
- /**
824
- * Toggle (or force) the config panel open/closed.
825
- *
826
- * # Arguments
827
- *
828
- * - `force` - Force the state of the panel open or closed, or `None` to
829
- * toggle.
830
- *
831
- * # JavaScript Examples
832
- *
833
- * ```javascript
834
- * await viewer.toggleConfig();
835
- * ```
836
- */
837
- toggleConfig(force?: boolean | null): Promise<any>;
838
- /**
839
- * Get an `Array` of all of the plugin custom elements registered for this
840
- * element. This may not include plugins which called
841
- * [`registerPlugin`] after the host has rendered for the first time.
842
- */
843
- getAllPlugins(): Array<any>;
844
- /**
845
- * Gets a plugin Custom Element with the `name` field, or get the active
846
- * plugin if no `name` is provided.
847
- *
848
- * # Arguments
849
- *
850
- * - `name` - The `name` property of a perspective plugin Custom Element,
851
- * or `None` for the active plugin's Custom Element.
852
- */
853
- getPlugin(name?: string | null): any;
854
- /**
855
- * Create a new JavaScript Heap reference for this model instance.
856
- */
857
- __get_model(): PerspectiveViewerElement;
858
- /**
859
- * Asynchronously opens the column settings for a specific column.
860
- * When finished, the `<perspective-viewer>` element will emit a
861
- * "perspective-toggle-column-settings" CustomEvent.
862
- * The event's details property has two fields: `{open: bool, column_name?:
863
- * string}`. The CustomEvent is also fired whenever the user toggles the
864
- * sidebar manually.
865
- */
866
- toggleColumnSettings(column_name: string): Promise<any>;
867
- /**
868
- * Force open the settings for a particular column. Pass `null` to close
869
- * the column settings panel. See [`Self::toggleColumnSettings`] for more.
870
- */
871
- openColumnSettings(column_name?: string | null, toggle?: boolean | null): Promise<any>;
378
+ free(): void;
379
+ [Symbol.dispose](): void;
380
+ /**
381
+ * Create a new JavaScript Heap reference for this model instance.
382
+ */
383
+ __get_model(): PerspectiveViewerElement;
384
+ connectedCallback(): void;
385
+ /**
386
+ * Copy this viewer's `View` or `Table` data as CSV to the system
387
+ * clipboard.
388
+ *
389
+ * # Arguments
390
+ *
391
+ * - `method` - The `ExportMethod` (serialized as a `String`) to use to
392
+ * render the data to the Clipboard.
393
+ *
394
+ * # JavaScript Examples
395
+ *
396
+ * ```javascript
397
+ * myDownloadButton.addEventListener("click", async () => {
398
+ * await viewer.copy();
399
+ * })
400
+ * ```
401
+ */
402
+ copy(method?: string | null): Promise<any>;
403
+ /**
404
+ * Delete the internal [`View`] and all associated state, rendering this
405
+ * `<perspective-viewer>` unusable and freeing all associated resources.
406
+ * Does not delete the supplied [`Table`] (as this is constructed by the
407
+ * callee).
408
+ *
409
+ * Calling _any_ method on a `<perspective-viewer>` after [`Self::delete`]
410
+ * will throw.
411
+ *
412
+ * <div class="warning">
413
+ *
414
+ * Allowing a `<perspective-viewer>` to be garbage-collected
415
+ * without calling [`PerspectiveViewerElement::delete`] will leak WASM
416
+ * memory!
417
+ *
418
+ * </div>
419
+ *
420
+ * # JavaScript Examples
421
+ *
422
+ * ```javascript
423
+ * await viewer.delete();
424
+ * ```
425
+ */
426
+ delete(): Promise<any>;
427
+ /**
428
+ * Download this viewer's internal [`View`] data via a browser download
429
+ * event.
430
+ *
431
+ * # Arguments
432
+ *
433
+ * - `method` - The `ExportMethod` to use to render the data to download.
434
+ *
435
+ * # JavaScript Examples
436
+ *
437
+ * ```javascript
438
+ * myDownloadButton.addEventListener("click", async () => {
439
+ * await viewer.download();
440
+ * })
441
+ * ```
442
+ */
443
+ download(method?: string | null): Promise<any>;
444
+ /**
445
+ * Restart this `<perspective-viewer>` to its initial state, before
446
+ * `load()`.
447
+ *
448
+ * Use `Self::restart` if you plan to call `Self::load` on this viewer
449
+ * again, or alternatively `Self::delete` if this viewer is no longer
450
+ * needed.
451
+ */
452
+ eject(): Promise<any>;
453
+ /**
454
+ * Exports this viewer's internal [`View`] as a JavaSript data, the
455
+ * exact type of which depends on the `method` but defaults to `String`
456
+ * in CSV format.
457
+ *
458
+ * This method is only really useful for the `"plugin"` method, which
459
+ * will use the configured plugin's export (e.g. PNG for
460
+ * `@perspective-dev/viewer-d3fc`). Otherwise, prefer to call the
461
+ * equivalent method on the underlying [`View`] directly.
462
+ *
463
+ * # Arguments
464
+ *
465
+ * - `method` - The `ExportMethod` to use to render the data to download.
466
+ *
467
+ * # JavaScript Examples
468
+ *
469
+ * ```javascript
470
+ * const data = await viewer.export("plugin");
471
+ * ```
472
+ */
473
+ export(method?: string | null): Promise<any>;
474
+ /**
475
+ * Flush any pending modifications to this `<perspective-viewer>`. Since
476
+ * `<perspective-viewer>`'s API is almost entirely `async`, it may take
477
+ * some milliseconds before any user-initiated changes to the [`View`]
478
+ * affects the rendered element. If you want to make sure all pending
479
+ * actions have been rendered, call and await [`Self::flush`].
480
+ *
481
+ * [`Self::flush`] will resolve immediately if there is no [`Table`] set.
482
+ *
483
+ * # JavaScript Examples
484
+ *
485
+ * In this example, [`Self::restore`] is called without `await`, but the
486
+ * eventual render which results from this call can still be awaited by
487
+ * immediately awaiting [`Self::flush`] instead.
488
+ *
489
+ * ```javascript
490
+ * viewer.restore(config);
491
+ * await viewer.flush();
492
+ * ```
493
+ */
494
+ flush(): Promise<any>;
495
+ /**
496
+ * Get an `Array` of all of the plugin custom elements registered for this
497
+ * element. This may not include plugins which called
498
+ * [`registerPlugin`] after the host has rendered for the first time.
499
+ */
500
+ getAllPlugins(): Array<any>;
501
+ /**
502
+ * Get the underlying [`Client`] for this viewer (as passed to, or
503
+ * associated with the [`Table`] passed to,
504
+ * [`PerspectiveViewerElement::load`]).
505
+ *
506
+ * # Arguments
507
+ *
508
+ * - `wait_for_client` - whether to wait for
509
+ * [`PerspectiveViewerElement::load`] to be called, or fail immediately
510
+ * if [`PerspectiveViewerElement::load`] has not yet been called.
511
+ *
512
+ * # JavaScript Examples
513
+ *
514
+ * ```javascript
515
+ * const client = await viewer.getClient();
516
+ * ```
517
+ */
518
+ getClient(wait_for_client?: boolean | null): Promise<any>;
519
+ /**
520
+ * Get this viewer's edit port for the currently loaded [`Table`] (see
521
+ * [`Table::update`] for details on ports).
522
+ */
523
+ getEditPort(): number;
524
+ /**
525
+ * Gets a plugin Custom Element with the `name` field, or get the active
526
+ * plugin if no `name` is provided.
527
+ *
528
+ * # Arguments
529
+ *
530
+ * - `name` - The `name` property of a perspective plugin Custom Element,
531
+ * or `None` for the active plugin's Custom Element.
532
+ */
533
+ getPlugin(name?: string | null): any;
534
+ /**
535
+ * Get render statistics. Some fields of the returned stats object are
536
+ * relative to the last time [`PerspectiveViewerElement::getRenderStats`]
537
+ * was called, ergo calling this method resets these fields.
538
+ *
539
+ * # JavaScript Examples
540
+ *
541
+ * ```javascript
542
+ * const {virtual_fps, actual_fps} = await viewer.getRenderStats();
543
+ * ```
544
+ */
545
+ getRenderStats(): any;
546
+ /**
547
+ * Return a [`perspective_js::JsViewWindow`] for the currently selected
548
+ * region.
549
+ */
550
+ getSelection(): ViewWindow | undefined;
551
+ /**
552
+ * Get the underlying [`Table`] for this viewer (as passed to
553
+ * [`PerspectiveViewerElement::load`] or as the `table` field to
554
+ * [`PerspectiveViewerElement::restore`]).
555
+ *
556
+ * # Arguments
557
+ *
558
+ * - `wait_for_table` - whether to wait for
559
+ * [`PerspectiveViewerElement::load`] to be called, or fail immediately
560
+ * if [`PerspectiveViewerElement::load`] has not yet been called.
561
+ *
562
+ * # JavaScript Examples
563
+ *
564
+ * ```javascript
565
+ * const table = await viewer.getTable();
566
+ * ```
567
+ */
568
+ getTable(wait_for_table?: boolean | null): Promise<any>;
569
+ /**
570
+ * Get the underlying [`View`] for this viewer.
571
+ *
572
+ * Use this method to get promgrammatic access to the [`View`] as currently
573
+ * configured by the user, for e.g. serializing as an
574
+ * [Apache Arrow](https://arrow.apache.org/) before passing to another
575
+ * library.
576
+ *
577
+ * The [`View`] returned by this method is owned by the
578
+ * [`PerspectiveViewerElement`] and may be _invalidated_ by
579
+ * [`View::delete`] at any time. Plugins which rely on this [`View`] for
580
+ * their [`HTMLPerspectiveViewerPluginElement::draw`] implementations
581
+ * should treat this condition as a _cancellation_ by silently aborting on
582
+ * "View already deleted" errors from method calls.
583
+ *
584
+ * # JavaScript Examples
585
+ *
586
+ * ```javascript
587
+ * const view = await viewer.getView();
588
+ * ```
589
+ */
590
+ getView(): Promise<any>;
591
+ /**
592
+ * Get a copy of the [`ViewConfig`] for the current [`View`]. This is
593
+ * non-blocking as it does not need to access the plugin (unlike
594
+ * [`PerspectiveViewerElement::save`]), and also makes no API calls to the
595
+ * server (unlike [`PerspectiveViewerElement::getView`] followed by
596
+ * [`View::get_config`])
597
+ */
598
+ getViewConfig(): Promise<any>;
599
+ /**
600
+ * Loads a [`Client`], or optionally [`Table`], or optionally a Javascript
601
+ * `Promise` which returns a [`Client`] or [`Table`], in this viewer.
602
+ *
603
+ * Loading a [`Client`] does not render, but subsequent calls to
604
+ * [`PerspectiveViewerElement::restore`] will use this [`Client`] to look
605
+ * up the proviced `table` name field for the provided
606
+ * [`ViewerConfigUpdate`].
607
+ *
608
+ * Loading a [`Table`] is equivalent to subsequently calling
609
+ * [`Self::restore`] with the `table` field set to [`Table::get_name`], and
610
+ * will render the UI in its default state when [`Self::load`] resolves.
611
+ * If you plan to call [`Self::restore`] anyway, prefer passing a
612
+ * [`Client`] argument to [`Self::load`] as it will conserve one render.
613
+ *
614
+ * When [`PerspectiveViewerElement::load`] resolves, the first frame of the
615
+ * UI + visualization is guaranteed to have been drawn. Awaiting the result
616
+ * of this method in a `try`/`catch` block will capture any errors
617
+ * thrown during the loading process, or from the [`Client`] `Promise`
618
+ * itself.
619
+ *
620
+ * [`PerspectiveViewerElement::load`] may also be called with a [`Table`],
621
+ * which is equivalent to:
622
+ *
623
+ * ```javascript
624
+ * await viewer.load(await table.get_client());
625
+ * await viewer.restore({name: await table.get_name()})
626
+ * ```
627
+ *
628
+ * If you plan to call [`PerspectiveViewerElement::restore`] immediately
629
+ * after [`PerspectiveViewerElement::load`] yourself, as is commonly
630
+ * done when loading and configuring a new `<perspective-viewer>`, you
631
+ * should use a [`Client`] as an argument and set the `table` field in the
632
+ * restore call as
633
+ *
634
+ * A [`Table`] can be created using the
635
+ * [`@perspective-dev/client`](https://www.npmjs.com/package/@perspective-dev/client)
636
+ * library from NPM (see [`perspective_js`] documentation for details).
637
+ *
638
+ * # JavaScript Examples
639
+ *
640
+ * ```javascript
641
+ * import perspective from "@perspective-dev/client";
642
+ *
643
+ * const worker = await perspective.worker();
644
+ * viewer.load(worker);
645
+ * ```
646
+ *
647
+ * ... or
648
+ *
649
+ * ```javascript
650
+ * const table = await worker.table(data, {name: "superstore"});
651
+ * viewer.load(table);
652
+ * ```
653
+ *
654
+ * Complete example:
655
+ *
656
+ * ```javascript
657
+ * const viewer = document.createElement("perspective-viewer");
658
+ * const worker = await perspective.worker();
659
+ *
660
+ * await worker.table("x\n1", {name: "table_one"});
661
+ * await viewer.load(worker);
662
+ * await viewer.restore({table: "table_one", columns: ["x"]});
663
+ * ```
664
+ *
665
+ * ... or, if you don't want to pass your own arguments to `restore`:
666
+ *
667
+ * ```javascript
668
+ * const viewer = document.createElement("perspective-viewer");
669
+ * const worker = await perspective.worker();
670
+ *
671
+ * const table = await worker.table("x\n1", {name: "table_one"});
672
+ * await viewer.load(table);
673
+ * ```
674
+ */
675
+ load(table: any): Promise<any>;
676
+ constructor(elem: HTMLElement);
677
+ /**
678
+ * Force open the settings for a particular column. Pass `null` to close
679
+ * the column settings panel. See [`Self::toggleColumnSettings`] for more.
680
+ */
681
+ openColumnSettings(column_name?: string | null, toggle?: boolean | null): Promise<any>;
682
+ /**
683
+ * Reset the viewer's `ViewerConfig` to the default.
684
+ *
685
+ * # Arguments
686
+ *
687
+ * - `reset_all` - If set, will clear expressions and column settings as
688
+ * well.
689
+ *
690
+ * # JavaScript Examples
691
+ *
692
+ * ```javascript
693
+ * await viewer.reset();
694
+ * ```
695
+ */
696
+ reset(reset_all?: boolean | null): Promise<any>;
697
+ /**
698
+ * If this element is in an _errored_ state, this method will clear it and
699
+ * re-render. Calling this method is equivalent to clicking the error reset
700
+ * button in the UI.
701
+ */
702
+ resetError(): Promise<any>;
703
+ /**
704
+ * Set the available theme names available in the status bar UI.
705
+ *
706
+ * Calling [`Self::resetThemes`] may cause the current theme to switch,
707
+ * if e.g. the new theme set does not contain the current theme.
708
+ *
709
+ * # JavaScript Examples
710
+ *
711
+ * Restrict `<perspective-viewer>` theme options to _only_ default light
712
+ * and dark themes, regardless of what is auto-detected from the page's
713
+ * CSS:
714
+ *
715
+ * ```javascript
716
+ * viewer.resetThemes(["Pro Light", "Pro Dark"])
717
+ * ```
718
+ */
719
+ resetThemes(themes?: any[] | null): Promise<any>;
720
+ /**
721
+ * Recalculate the viewer's dimensions and redraw.
722
+ *
723
+ * Use this method to tell `<perspective-viewer>` its dimensions have
724
+ * changed when auto-size mode has been disabled via [`Self::setAutoSize`].
725
+ * [`Self::resize`] resolves when the resize-initiated redraw of this
726
+ * element has completed.
727
+ *
728
+ * # Arguments
729
+ *
730
+ * - `force` - If [`Self::resize`] is called with `false` or without an
731
+ * argument, and _auto-size_ mode is enabled via [`Self::setAutoSize`],
732
+ * [`Self::resize`] will log a warning and auto-disable auto-size mode.
733
+ *
734
+ * # JavaScript Examples
735
+ *
736
+ * ```javascript
737
+ * await viewer.resize(true)
738
+ * ```
739
+ */
740
+ resize(force?: boolean | null): Promise<any>;
741
+ /**
742
+ * Restores this element from a full/partial
743
+ * [`perspective_js::JsViewConfig`] (this element's user-configurable
744
+ * state, including the `Table` name).
745
+ *
746
+ * One of the best ways to use [`Self::restore`] is by first configuring
747
+ * a `<perspective-viewer>` as you wish, then using either the `Debug`
748
+ * panel or "Copy" -> "config.json" from the toolbar menu to snapshot
749
+ * the [`Self::restore`] argument as JSON.
750
+ *
751
+ * # Arguments
752
+ *
753
+ * - `update` - The config to restore to, as returned by [`Self::save`] in
754
+ * either "json", "string" or "arraybuffer" format.
755
+ *
756
+ * # JavaScript Examples
757
+ *
758
+ * Loads a default plugin for the table named `"superstore"`:
759
+ *
760
+ * ```javascript
761
+ * await viewer.restore({table: "superstore"});
762
+ * ```
763
+ *
764
+ * Apply a `group_by` to the same `viewer` element, without
765
+ * modifying/resetting other fields - you can omit the `table` field,
766
+ * this has already been set once and is not modified:
767
+ *
768
+ * ```javascript
769
+ * await viewer.restore({group_by: ["State"]});
770
+ * ```
771
+ */
772
+ restore(update: any): Promise<any>;
773
+ /**
774
+ * Restyle all plugins from current document.
775
+ *
776
+ * <div class="warning">
777
+ *
778
+ * [`Self::restyleElement`] _must_ be called for many runtime changes to
779
+ * CSS properties to be reflected in an already-rendered
780
+ * `<perspective-viewer>`.
781
+ *
782
+ * </div>
783
+ *
784
+ * # JavaScript Examples
785
+ *
786
+ * ```javascript
787
+ * viewer.style = "--icon--color: red";
788
+ * await viewer.restyleElement();
789
+ * ```
790
+ */
791
+ restyleElement(): Promise<any>;
792
+ /**
793
+ * Save this element's user-configurable state to a serialized state
794
+ * object, one which can be restored via the [`Self::restore`] method.
795
+ *
796
+ * # JavaScript Examples
797
+ *
798
+ * Get the current `group_by` setting:
799
+ *
800
+ * ```javascript
801
+ * const {group_by} = await viewer.restore();
802
+ * ```
803
+ *
804
+ * Reset workflow attached to an external button `myResetButton`:
805
+ *
806
+ * ```javascript
807
+ * const token = await viewer.save();
808
+ * myResetButton.addEventListener("clien", async () => {
809
+ * await viewer.restore(token);
810
+ * });
811
+ * ```
812
+ */
813
+ save(): Promise<any>;
814
+ /**
815
+ * Sets the auto-pause behavior of this component.
816
+ *
817
+ * When `true`, this `<perspective-viewer>` will register an
818
+ * `IntersectionObserver` on itself and subsequently skip rendering
819
+ * whenever its viewport visibility changes. Auto-pause is enabled by
820
+ * default.
821
+ *
822
+ * # Arguments
823
+ *
824
+ * - `autopause` Whether to enable `auto-pause` behavior or not.
825
+ *
826
+ * # JavaScript Examples
827
+ *
828
+ * Disable auto-size behavior:
829
+ *
830
+ * ```javascript
831
+ * viewer.setAutoPause(false);
832
+ * ```
833
+ */
834
+ setAutoPause(autopause: boolean): void;
835
+ /**
836
+ * Sets the auto-size behavior of this component.
837
+ *
838
+ * When `true`, this `<perspective-viewer>` will register a
839
+ * `ResizeObserver` on itself and call [`Self::resize`] whenever its own
840
+ * dimensions change. However, when embedded in a larger application
841
+ * context, you may want to call [`Self::resize`] manually to avoid
842
+ * over-rendering; in this case auto-sizing can be disabled via this
843
+ * method. Auto-size behavior is enabled by default.
844
+ *
845
+ * # Arguments
846
+ *
847
+ * - `autosize` - Whether to enable `auto-size` behavior or not.
848
+ *
849
+ * # JavaScript Examples
850
+ *
851
+ * Disable auto-size behavior:
852
+ *
853
+ * ```javascript
854
+ * viewer.setAutoSize(false);
855
+ * ```
856
+ */
857
+ setAutoSize(autosize: boolean): void;
858
+ /**
859
+ * Set the selection [`perspective_js::JsViewWindow`] for this element.
860
+ */
861
+ setSelection(window?: ViewWindow | null): void;
862
+ /**
863
+ * Determines the render throttling behavior. Can be an integer, for
864
+ * millisecond window to throttle render event; or, if `None`, adaptive
865
+ * throttling will be calculated from the measured render time of the
866
+ * last 5 frames.
867
+ *
868
+ * # Arguments
869
+ *
870
+ * - `throttle` - The throttle rate in milliseconds (f64), or `None` for
871
+ * adaptive throttling.
872
+ *
873
+ * # JavaScript Examples
874
+ *
875
+ * Only draws at most 1 frame/sec:
876
+ *
877
+ * ```rust
878
+ * viewer.setThrottle(1000);
879
+ * ```
880
+ */
881
+ setThrottle(val?: number | null): void;
882
+ /**
883
+ * Asynchronously opens the column settings for a specific column.
884
+ * When finished, the `<perspective-viewer>` element will emit a
885
+ * "perspective-toggle-column-settings" CustomEvent.
886
+ * The event's details property has two fields: `{open: bool, column_name?:
887
+ * string}`. The CustomEvent is also fired whenever the user toggles the
888
+ * sidebar manually.
889
+ */
890
+ toggleColumnSettings(column_name: string): Promise<any>;
891
+ /**
892
+ * Toggle (or force) the config panel open/closed.
893
+ *
894
+ * # Arguments
895
+ *
896
+ * - `force` - Force the state of the panel open or closed, or `None` to
897
+ * toggle.
898
+ *
899
+ * # JavaScript Examples
900
+ *
901
+ * ```javascript
902
+ * await viewer.toggleConfig();
903
+ * ```
904
+ */
905
+ toggleConfig(force?: boolean | null): Promise<any>;
872
906
  }
907
+
873
908
  export class ProxySession {
874
- free(): void;
875
- [Symbol.dispose](): void;
876
- constructor(client: Client, on_response: Function);
877
- handle_request(value: any): Promise<void>;
878
- close(): Promise<void>;
909
+ free(): void;
910
+ [Symbol.dispose](): void;
911
+ close(): Promise<void>;
912
+ handle_request(value: any): Promise<void>;
913
+ constructor(client: Client, on_response: Function);
879
914
  }
915
+
880
916
  export class Table {
881
- private constructor();
882
- free(): void;
883
- [Symbol.dispose](): void;
884
- __getClassname(): string;
885
- /**
886
- * Returns the name of the index column for the table.
887
- *
888
- * # JavaScript Examples
889
- *
890
- * ```javascript
891
- * const table = await client.table("x,y\n1,2\n3,4", { index: "x" });
892
- * const index = table.get_index(); // "x"
893
- * ```
894
- */
895
- get_index(): Promise<string>;
896
- /**
897
- * Get a copy of the [`Client`] this [`Table`] came from.
898
- */
899
- get_client(): Promise<Client>;
900
- /**
901
- * Returns the user-specified name for this table, or the auto-generated
902
- * name if a name was not specified when the table was created.
903
- */
904
- get_name(): Promise<string>;
905
- /**
906
- * Returns the user-specified row limit for this table.
907
- */
908
- get_limit(): Promise<number | undefined>;
909
- /**
910
- * Removes all the rows in the [`Table`], but preserves everything else
911
- * including the schema, index, and any callbacks or registered
912
- * [`View`] instances.
913
- *
914
- * Calling [`Table::clear`], like [`Table::update`] and [`Table::remove`],
915
- * will trigger an update event to any registered listeners via
916
- * [`View::on_update`].
917
- */
918
- clear(): Promise<void>;
919
- /**
920
- * Delete this [`Table`] and cleans up associated resources.
921
- *
922
- * [`Table`]s do not stop consuming resources or processing updates when
923
- * they are garbage collected in their host language - you must call
924
- * this method to reclaim these.
925
- *
926
- * # Arguments
927
- *
928
- * - `options` An options dictionary.
929
- * - `lazy` Whether to delete this [`Table`] _lazily_. When false (the
930
- * default), the delete will occur immediately, assuming it has no
931
- * [`View`] instances registered to it (which must be deleted first,
932
- * otherwise this method will throw an error). When true, the
933
- * [`Table`] will only be marked for deltion once its [`View`]
934
- * dependency count reaches 0.
935
- *
936
- * # JavaScript Examples
937
- *
938
- * ```javascript
939
- * const table = await client.table("x,y\n1,2\n3,4");
940
- *
941
- * // ...
942
- *
943
- * await table.delete({ lazy: true });
944
- * ```
945
- */
946
- delete(options?: DeleteOptions | null): Promise<void>;
947
- /**
948
- * Returns the number of rows in a [`Table`].
949
- */
950
- size(): Promise<number>;
951
- /**
952
- * Returns a table's [`Schema`], a mapping of column names to column types.
953
- *
954
- * The mapping of a [`Table`]'s column names to data types is referred to
955
- * as a [`Schema`]. Each column has a unique name and a data type, one
956
- * of:
957
- *
958
- * - `"boolean"` - A boolean type
959
- * - `"date"` - A timesonze-agnostic date type (month/day/year)
960
- * - `"datetime"` - A millisecond-precision datetime type in the UTC
961
- * timezone
962
- * - `"float"` - A 64 bit float
963
- * - `"integer"` - A signed 32 bit integer (the integer type supported by
964
- * JavaScript)
965
- * - `"string"` - A [`String`] data type (encoded internally as a
966
- * _dictionary_)
967
- *
968
- * Note that all [`Table`] columns are _nullable_, regardless of the data
969
- * type.
970
- */
971
- schema(): Promise<Record<string, ColumnType>>;
972
- /**
973
- * Returns the column names of this [`Table`] in "natural" order (the
974
- * ordering implied by the input format).
975
- *
976
- * # JavaScript Examples
977
- *
978
- * ```javascript
979
- * const columns = await table.columns();
980
- * ```
981
- */
982
- columns(): Promise<any>;
983
- /**
984
- * Create a unique channel ID on this [`Table`], which allows
985
- * `View::on_update` callback calls to be associated with the
986
- * `Table::update` which caused them.
987
- */
988
- make_port(): Promise<number>;
989
- /**
990
- * Register a callback which is called exactly once, when this [`Table`] is
991
- * deleted with the [`Table::delete`] method.
992
- *
993
- * [`Table::on_delete`] resolves when the subscription message is sent, not
994
- * when the _delete_ event occurs.
995
- */
996
- on_delete(on_delete: Function): Promise<any>;
997
- /**
998
- * Removes a listener with a given ID, as returned by a previous call to
999
- * [`Table::on_delete`].
1000
- */
1001
- remove_delete(callback_id: number): Promise<any>;
1002
- /**
1003
- * Removes rows from this [`Table`] with the `index` column values
1004
- * supplied.
1005
- *
1006
- * # Arguments
1007
- *
1008
- * - `indices` - A list of `index` column values for rows that should be
1009
- * removed.
1010
- *
1011
- * # JavaScript Examples
1012
- *
1013
- * ```javascript
1014
- * await table.remove([1, 2, 3]);
1015
- * ```
1016
- */
1017
- remove(value: any, options?: UpdateOptions | null): Promise<void>;
1018
- /**
1019
- * Replace all rows in this [`Table`] with the input data, coerced to this
1020
- * [`Table`]'s existing [`perspective_client::Schema`], notifying any
1021
- * derived [`View`] and [`View::on_update`] callbacks.
1022
- *
1023
- * Calling [`Table::replace`] is an easy way to replace _all_ the data in a
1024
- * [`Table`] without losing any derived [`View`] instances or
1025
- * [`View::on_update`] callbacks. [`Table::replace`] does _not_ infer
1026
- * data types like [`Client::table`] does, rather it _coerces_ input
1027
- * data to the `Schema` like [`Table::update`]. If you need a [`Table`]
1028
- * with a different `Schema`, you must create a new one.
1029
- *
1030
- * # JavaScript Examples
1031
- *
1032
- * ```javascript
1033
- * await table.replace("x,y\n1,2");
1034
- * ```
1035
- */
1036
- replace(input: any, options?: UpdateOptions | null): Promise<void>;
1037
- /**
1038
- * Updates the rows of this table and any derived [`View`] instances.
1039
- *
1040
- * Calling [`Table::update`] will trigger the [`View::on_update`] callbacks
1041
- * register to derived [`View`], and the call itself will not resolve until
1042
- * _all_ derived [`View`]'s are notified.
1043
- *
1044
- * When updating a [`Table`] with an `index`, [`Table::update`] supports
1045
- * partial updates, by omitting columns from the update data.
1046
- *
1047
- * # Arguments
1048
- *
1049
- * - `input` - The input data for this [`Table`]. The schema of a [`Table`]
1050
- * is immutable after creation, so this method cannot be called with a
1051
- * schema.
1052
- * - `options` - Options for this update step - see [`UpdateOptions`].
1053
- *
1054
- * # JavaScript Examples
1055
- *
1056
- * ```javascript
1057
- * await table.update("x,y\n1,2");
1058
- * ```
1059
- */
1060
- update(input: string | ArrayBuffer | Record<string, unknown[]> | Record<string, unknown>[] | Record<string, ColumnType>, options?: UpdateOptions | null): Promise<any>;
1061
- /**
1062
- * Create a new [`View`] from this table with a specified
1063
- * [`ViewConfigUpdate`].
1064
- *
1065
- * See [`View`] struct.
1066
- *
1067
- * # JavaScript Examples
1068
- *
1069
- * ```javascript
1070
- * const view = await table.view({
1071
- * columns: ["Sales"],
1072
- * aggregates: { Sales: "sum" },
1073
- * group_by: ["Region", "Country"],
1074
- * filter: [["Category", "in", ["Furniture", "Technology"]]],
1075
- * });
1076
- * ```
1077
- */
1078
- view(config?: ViewConfigUpdate | null): Promise<View>;
1079
- /**
1080
- * Validates the given expressions.
1081
- */
1082
- validate_expressions(exprs: any): Promise<any>;
917
+ private constructor();
918
+ free(): void;
919
+ [Symbol.dispose](): void;
920
+ __getClassname(): string;
921
+ /**
922
+ * Removes all the rows in the [`Table`], but preserves everything else
923
+ * including the schema, index, and any callbacks or registered
924
+ * [`View`] instances.
925
+ *
926
+ * Calling [`Table::clear`], like [`Table::update`] and [`Table::remove`],
927
+ * will trigger an update event to any registered listeners via
928
+ * [`View::on_update`].
929
+ */
930
+ clear(): Promise<void>;
931
+ /**
932
+ * Returns the column names of this [`Table`] in "natural" order (the
933
+ * ordering implied by the input format).
934
+ *
935
+ * # JavaScript Examples
936
+ *
937
+ * ```javascript
938
+ * const columns = await table.columns();
939
+ * ```
940
+ */
941
+ columns(): Promise<any>;
942
+ /**
943
+ * Delete this [`Table`] and cleans up associated resources.
944
+ *
945
+ * [`Table`]s do not stop consuming resources or processing updates when
946
+ * they are garbage collected in their host language - you must call
947
+ * this method to reclaim these.
948
+ *
949
+ * # Arguments
950
+ *
951
+ * - `options` An options dictionary.
952
+ * - `lazy` Whether to delete this [`Table`] _lazily_. When false (the
953
+ * default), the delete will occur immediately, assuming it has no
954
+ * [`View`] instances registered to it (which must be deleted first,
955
+ * otherwise this method will throw an error). When true, the
956
+ * [`Table`] will only be marked for deltion once its [`View`]
957
+ * dependency count reaches 0.
958
+ *
959
+ * # JavaScript Examples
960
+ *
961
+ * ```javascript
962
+ * const table = await client.table("x,y\n1,2\n3,4");
963
+ *
964
+ * // ...
965
+ *
966
+ * await table.delete({ lazy: true });
967
+ * ```
968
+ */
969
+ delete(options?: DeleteOptions | null): Promise<void>;
970
+ /**
971
+ * Get a copy of the [`Client`] this [`Table`] came from.
972
+ */
973
+ get_client(): Promise<Client>;
974
+ /**
975
+ * Returns the name of the index column for the table.
976
+ *
977
+ * # JavaScript Examples
978
+ *
979
+ * ```javascript
980
+ * const table = await client.table("x,y\n1,2\n3,4", { index: "x" });
981
+ * const index = table.get_index(); // "x"
982
+ * ```
983
+ */
984
+ get_index(): Promise<string>;
985
+ /**
986
+ * Returns the user-specified row limit for this table.
987
+ */
988
+ get_limit(): Promise<number | undefined>;
989
+ /**
990
+ * Returns the user-specified name for this table, or the auto-generated
991
+ * name if a name was not specified when the table was created.
992
+ */
993
+ get_name(): Promise<string>;
994
+ /**
995
+ * Create a unique channel ID on this [`Table`], which allows
996
+ * `View::on_update` callback calls to be associated with the
997
+ * `Table::update` which caused them.
998
+ */
999
+ make_port(): Promise<number>;
1000
+ /**
1001
+ * Register a callback which is called exactly once, when this [`Table`] is
1002
+ * deleted with the [`Table::delete`] method.
1003
+ *
1004
+ * [`Table::on_delete`] resolves when the subscription message is sent, not
1005
+ * when the _delete_ event occurs.
1006
+ */
1007
+ on_delete(on_delete: Function): Promise<any>;
1008
+ /**
1009
+ * Removes rows from this [`Table`] with the `index` column values
1010
+ * supplied.
1011
+ *
1012
+ * # Arguments
1013
+ *
1014
+ * - `indices` - A list of `index` column values for rows that should be
1015
+ * removed.
1016
+ *
1017
+ * # JavaScript Examples
1018
+ *
1019
+ * ```javascript
1020
+ * await table.remove([1, 2, 3]);
1021
+ * ```
1022
+ */
1023
+ remove(value: any, options?: UpdateOptions | null): Promise<void>;
1024
+ /**
1025
+ * Removes a listener with a given ID, as returned by a previous call to
1026
+ * [`Table::on_delete`].
1027
+ */
1028
+ remove_delete(callback_id: number): Promise<any>;
1029
+ /**
1030
+ * Replace all rows in this [`Table`] with the input data, coerced to this
1031
+ * [`Table`]'s existing [`perspective_client::Schema`], notifying any
1032
+ * derived [`View`] and [`View::on_update`] callbacks.
1033
+ *
1034
+ * Calling [`Table::replace`] is an easy way to replace _all_ the data in a
1035
+ * [`Table`] without losing any derived [`View`] instances or
1036
+ * [`View::on_update`] callbacks. [`Table::replace`] does _not_ infer
1037
+ * data types like [`Client::table`] does, rather it _coerces_ input
1038
+ * data to the `Schema` like [`Table::update`]. If you need a [`Table`]
1039
+ * with a different `Schema`, you must create a new one.
1040
+ *
1041
+ * # JavaScript Examples
1042
+ *
1043
+ * ```javascript
1044
+ * await table.replace("x,y\n1,2");
1045
+ * ```
1046
+ */
1047
+ replace(input: any, options?: UpdateOptions | null): Promise<void>;
1048
+ /**
1049
+ * Returns a table's [`Schema`], a mapping of column names to column types.
1050
+ *
1051
+ * The mapping of a [`Table`]'s column names to data types is referred to
1052
+ * as a [`Schema`]. Each column has a unique name and a data type, one
1053
+ * of:
1054
+ *
1055
+ * - `"boolean"` - A boolean type
1056
+ * - `"date"` - A timesonze-agnostic date type (month/day/year)
1057
+ * - `"datetime"` - A millisecond-precision datetime type in the UTC
1058
+ * timezone
1059
+ * - `"float"` - A 64 bit float
1060
+ * - `"integer"` - A signed 32 bit integer (the integer type supported by
1061
+ * JavaScript)
1062
+ * - `"string"` - A [`String`] data type (encoded internally as a
1063
+ * _dictionary_)
1064
+ *
1065
+ * Note that all [`Table`] columns are _nullable_, regardless of the data
1066
+ * type.
1067
+ */
1068
+ schema(): Promise<Record<string, ColumnType>>;
1069
+ /**
1070
+ * Returns the number of rows in a [`Table`].
1071
+ */
1072
+ size(): Promise<number>;
1073
+ /**
1074
+ * Updates the rows of this table and any derived [`View`] instances.
1075
+ *
1076
+ * Calling [`Table::update`] will trigger the [`View::on_update`] callbacks
1077
+ * register to derived [`View`], and the call itself will not resolve until
1078
+ * _all_ derived [`View`]'s are notified.
1079
+ *
1080
+ * When updating a [`Table`] with an `index`, [`Table::update`] supports
1081
+ * partial updates, by omitting columns from the update data.
1082
+ *
1083
+ * # Arguments
1084
+ *
1085
+ * - `input` - The input data for this [`Table`]. The schema of a [`Table`]
1086
+ * is immutable after creation, so this method cannot be called with a
1087
+ * schema.
1088
+ * - `options` - Options for this update step - see [`UpdateOptions`].
1089
+ *
1090
+ * # JavaScript Examples
1091
+ *
1092
+ * ```javascript
1093
+ * await table.update("x,y\n1,2");
1094
+ * ```
1095
+ */
1096
+ update(input: string | ArrayBuffer | Record<string, unknown[]> | Record<string, unknown>[] | Record<string, ColumnType>, options?: UpdateOptions | null): Promise<any>;
1097
+ /**
1098
+ * Validates the given expressions.
1099
+ */
1100
+ validate_expressions(exprs: any): Promise<any>;
1101
+ /**
1102
+ * Create a new [`View`] from this table with a specified
1103
+ * [`ViewConfigUpdate`].
1104
+ *
1105
+ * See [`View`] struct.
1106
+ *
1107
+ * # JavaScript Examples
1108
+ *
1109
+ * ```javascript
1110
+ * const view = await table.view({
1111
+ * columns: ["Sales"],
1112
+ * aggregates: { Sales: "sum" },
1113
+ * group_by: ["Region", "Country"],
1114
+ * filter: [["Category", "in", ["Furniture", "Technology"]]],
1115
+ * });
1116
+ * ```
1117
+ */
1118
+ view(config?: ViewConfigUpdate | null): Promise<View>;
1083
1119
  }
1120
+
1084
1121
  /**
1085
1122
  * The [`View`] struct is Perspective's query and serialization interface. It
1086
1123
  * represents a query on the `Table`'s dataset and is always created from an
@@ -1097,367 +1134,414 @@ export class Table {
1097
1134
  * pivots, filters, etc. which can be applied.
1098
1135
  */
1099
1136
  export class View {
1100
- private constructor();
1101
- free(): void;
1102
- [Symbol.dispose](): void;
1103
- __get_model(): View;
1104
- /**
1105
- * Returns an array of strings containing the column paths of the [`View`]
1106
- * without any of the source columns.
1107
- *
1108
- * A column path shows the columns that a given cell belongs to after
1109
- * pivots are applied.
1110
- */
1111
- column_paths(window?: ColumnWindow | null): Promise<any>;
1112
- /**
1113
- * Delete this [`View`] and clean up all resources associated with it.
1114
- * [`View`] objects do not stop consuming resources or processing
1115
- * updates when they are garbage collected - you must call this method
1116
- * to reclaim these.
1117
- */
1118
- delete(): Promise<void>;
1119
- /**
1120
- * Returns this [`View`]'s _dimensions_, row and column count, as well as
1121
- * those of the [`crate::Table`] from which it was derived.
1122
- *
1123
- * - `num_table_rows` - The number of rows in the underlying
1124
- * [`crate::Table`].
1125
- * - `num_table_columns` - The number of columns in the underlying
1126
- * [`crate::Table`] (including the `index` column if this
1127
- * [`crate::Table`] was constructed with one).
1128
- * - `num_view_rows` - The number of rows in this [`View`]. If this
1129
- * [`View`] has a `group_by` clause, `num_view_rows` will also include
1130
- * aggregated rows.
1131
- * - `num_view_columns` - The number of columns in this [`View`]. If this
1132
- * [`View`] has a `split_by` clause, `num_view_columns` will include all
1133
- * _column paths_, e.g. the number of `columns` clause times the number
1134
- * of `split_by` groups.
1135
- */
1136
- dimensions(): Promise<any>;
1137
- /**
1138
- * The expression schema of this [`View`], which contains only the
1139
- * expressions created on this [`View`]. See [`View::schema`] for
1140
- * details.
1141
- */
1142
- expression_schema(): Promise<any>;
1143
- /**
1144
- * A copy of the config object passed to the [`Table::view`] method which
1145
- * created this [`View`].
1146
- */
1147
- get_config(): Promise<any>;
1148
- /**
1149
- * Calculates the [min, max] of the leaf nodes of a column `column_name`.
1150
- *
1151
- * # Returns
1152
- *
1153
- * A tuple of [min, max], whose types are column and aggregate dependent.
1154
- */
1155
- get_min_max(name: string): Promise<Array<any>>;
1156
- /**
1157
- * The number of aggregated rows in this [`View`]. This is affected by the
1158
- * "group_by" configuration parameter supplied to this view's contructor.
1159
- *
1160
- * # Returns
1161
- *
1162
- * The number of aggregated rows.
1163
- */
1164
- num_rows(): Promise<number>;
1165
- /**
1166
- * The schema of this [`View`].
1167
- *
1168
- * The [`View`] schema differs from the `schema` returned by
1169
- * [`Table::schema`]; it may have different column names due to
1170
- * `expressions` or `columns` configs, or it maye have _different
1171
- * column types_ due to the application og `group_by` and `aggregates`
1172
- * config. You can think of [`Table::schema`] as the _input_ schema and
1173
- * [`View::schema`] as the _output_ schema of a Perspective pipeline.
1174
- */
1175
- schema(): Promise<any>;
1176
- /**
1177
- * Serializes a [`View`] to the Apache Arrow data format.
1178
- */
1179
- to_arrow(window?: ViewWindow | null): Promise<ArrayBuffer>;
1180
- /**
1181
- * Serializes this [`View`] to a string of JSON data. Useful if you want to
1182
- * save additional round trip serialize/deserialize cycles.
1183
- */
1184
- to_columns_string(window?: ViewWindow | null): Promise<string>;
1185
- /**
1186
- * Serializes this [`View`] to JavaScript objects in a column-oriented
1187
- * format.
1188
- */
1189
- to_columns(window?: ViewWindow | null): Promise<object>;
1190
- /**
1191
- * Render this `View` as a JSON string.
1192
- */
1193
- to_json_string(window?: ViewWindow | null): Promise<string>;
1194
- /**
1195
- * Serializes this [`View`] to JavaScript objects in a row-oriented
1196
- * format.
1197
- */
1198
- to_json(window?: ViewWindow | null): Promise<Array<any>>;
1199
- /**
1200
- * Renders this [`View`] as an [NDJSON](https://github.com/ndjson/ndjson-spec)
1201
- * formatted [`String`].
1202
- */
1203
- to_ndjson(window?: ViewWindow | null): Promise<string>;
1204
- /**
1205
- * Serializes this [`View`] to CSV data in a standard format.
1206
- */
1207
- to_csv(window?: ViewWindow | null): Promise<string>;
1208
- /**
1209
- * Register a callback with this [`View`]. Whenever the view's underlying
1210
- * table emits an update, this callback will be invoked with an object
1211
- * containing `port_id`, indicating which port the update fired on, and
1212
- * optionally `delta`, which is the new data that was updated for each
1213
- * cell or each row.
1214
- *
1215
- * # Arguments
1216
- *
1217
- * - `on_update` - A callback function invoked on update, which receives an
1218
- * object with two keys: `port_id`, indicating which port the update was
1219
- * triggered on, and `delta`, whose value is dependent on the mode
1220
- * parameter.
1221
- * - `options` - If this is provided as `OnUpdateOptions { mode:
1222
- * Some(OnUpdateMode::Row) }`, then `delta` is an Arrow of the updated
1223
- * rows. Otherwise `delta` will be [`Option::None`].
1224
- *
1225
- * # JavaScript Examples
1226
- *
1227
- * ```javascript
1228
- * // Attach an `on_update` callback
1229
- * view.on_update((updated) => console.log(updated.port_id));
1230
- * ```
1231
- *
1232
- * ```javascript
1233
- * // `on_update` with row deltas
1234
- * view.on_update((updated) => console.log(updated.delta), { mode: "row" });
1235
- * ```
1236
- */
1237
- on_update(on_update_js: Function, options?: OnUpdateOptions | null): Promise<any>;
1238
- /**
1239
- * Unregister a previously registered update callback with this [`View`].
1240
- *
1241
- * # Arguments
1242
- *
1243
- * - `id` - A callback `id` as returned by a recipricol call to
1244
- * [`View::on_update`].
1245
- */
1246
- remove_update(callback_id: number): Promise<void>;
1247
- /**
1248
- * Register a callback with this [`View`]. Whenever the [`View`] is
1249
- * deleted, this callback will be invoked.
1250
- */
1251
- on_delete(on_delete: Function): Promise<any>;
1252
- /**
1253
- * The number of aggregated columns in this [`View`]. This is affected by
1254
- * the "split_by" configuration parameter supplied to this view's
1255
- * contructor.
1256
- *
1257
- * # Returns
1258
- *
1259
- * The number of aggregated columns.
1260
- */
1261
- num_columns(): Promise<number>;
1262
- /**
1263
- * Unregister a previously registered [`View::on_delete`] callback.
1264
- */
1265
- remove_delete(callback_id: number): Promise<any>;
1266
- /**
1267
- * Collapses the `group_by` row at `row_index`.
1268
- */
1269
- collapse(row_index: number): Promise<number>;
1270
- /**
1271
- * Expand the `group_by` row at `row_index`.
1272
- */
1273
- expand(row_index: number): Promise<number>;
1274
- /**
1275
- * Set expansion `depth` of the `group_by` tree.
1276
- */
1277
- set_depth(depth: number): Promise<void>;
1137
+ private constructor();
1138
+ free(): void;
1139
+ [Symbol.dispose](): void;
1140
+ __get_model(): View;
1141
+ /**
1142
+ * Collapses the `group_by` row at `row_index`.
1143
+ */
1144
+ collapse(row_index: number): Promise<number>;
1145
+ /**
1146
+ * Returns an array of strings containing the column paths of the [`View`]
1147
+ * without any of the source columns.
1148
+ *
1149
+ * A column path shows the columns that a given cell belongs to after
1150
+ * pivots are applied.
1151
+ */
1152
+ column_paths(window?: ColumnWindow | null): Promise<any>;
1153
+ /**
1154
+ * Delete this [`View`] and clean up all resources associated with it.
1155
+ * [`View`] objects do not stop consuming resources or processing
1156
+ * updates when they are garbage collected - you must call this method
1157
+ * to reclaim these.
1158
+ */
1159
+ delete(): Promise<void>;
1160
+ /**
1161
+ * Returns this [`View`]'s _dimensions_, row and column count, as well as
1162
+ * those of the [`crate::Table`] from which it was derived.
1163
+ *
1164
+ * - `num_table_rows` - The number of rows in the underlying
1165
+ * [`crate::Table`].
1166
+ * - `num_table_columns` - The number of columns in the underlying
1167
+ * [`crate::Table`] (including the `index` column if this
1168
+ * [`crate::Table`] was constructed with one).
1169
+ * - `num_view_rows` - The number of rows in this [`View`]. If this
1170
+ * [`View`] has a `group_by` clause, `num_view_rows` will also include
1171
+ * aggregated rows.
1172
+ * - `num_view_columns` - The number of columns in this [`View`]. If this
1173
+ * [`View`] has a `split_by` clause, `num_view_columns` will include all
1174
+ * _column paths_, e.g. the number of `columns` clause times the number
1175
+ * of `split_by` groups.
1176
+ */
1177
+ dimensions(): Promise<any>;
1178
+ /**
1179
+ * Expand the `group_by` row at `row_index`.
1180
+ */
1181
+ expand(row_index: number): Promise<number>;
1182
+ /**
1183
+ * The expression schema of this [`View`], which contains only the
1184
+ * expressions created on this [`View`]. See [`View::schema`] for
1185
+ * details.
1186
+ */
1187
+ expression_schema(): Promise<any>;
1188
+ /**
1189
+ * A copy of the config object passed to the [`Table::view`] method which
1190
+ * created this [`View`].
1191
+ */
1192
+ get_config(): Promise<any>;
1193
+ /**
1194
+ * Calculates the [min, max] of the leaf nodes of a column `column_name`.
1195
+ *
1196
+ * # Returns
1197
+ *
1198
+ * A tuple of [min, max], whose types are column and aggregate dependent.
1199
+ */
1200
+ get_min_max(name: string): Promise<Array<any>>;
1201
+ /**
1202
+ * The number of aggregated columns in this [`View`]. This is affected by
1203
+ * the "split_by" configuration parameter supplied to this view's
1204
+ * contructor.
1205
+ *
1206
+ * # Returns
1207
+ *
1208
+ * The number of aggregated columns.
1209
+ */
1210
+ num_columns(): Promise<number>;
1211
+ /**
1212
+ * The number of aggregated rows in this [`View`]. This is affected by the
1213
+ * "group_by" configuration parameter supplied to this view's contructor.
1214
+ *
1215
+ * # Returns
1216
+ *
1217
+ * The number of aggregated rows.
1218
+ */
1219
+ num_rows(): Promise<number>;
1220
+ /**
1221
+ * Register a callback with this [`View`]. Whenever the [`View`] is
1222
+ * deleted, this callback will be invoked.
1223
+ */
1224
+ on_delete(on_delete: Function): Promise<any>;
1225
+ /**
1226
+ * Register a callback with this [`View`]. Whenever the view's underlying
1227
+ * table emits an update, this callback will be invoked with an object
1228
+ * containing `port_id`, indicating which port the update fired on, and
1229
+ * optionally `delta`, which is the new data that was updated for each
1230
+ * cell or each row.
1231
+ *
1232
+ * # Arguments
1233
+ *
1234
+ * - `on_update` - A callback function invoked on update, which receives an
1235
+ * object with two keys: `port_id`, indicating which port the update was
1236
+ * triggered on, and `delta`, whose value is dependent on the mode
1237
+ * parameter.
1238
+ * - `options` - If this is provided as `OnUpdateOptions { mode:
1239
+ * Some(OnUpdateMode::Row) }`, then `delta` is an Arrow of the updated
1240
+ * rows. Otherwise `delta` will be [`Option::None`].
1241
+ *
1242
+ * # JavaScript Examples
1243
+ *
1244
+ * ```javascript
1245
+ * // Attach an `on_update` callback
1246
+ * view.on_update((updated) => console.log(updated.port_id));
1247
+ * ```
1248
+ *
1249
+ * ```javascript
1250
+ * // `on_update` with row deltas
1251
+ * view.on_update((updated) => console.log(updated.delta), { mode: "row" });
1252
+ * ```
1253
+ */
1254
+ on_update(on_update_js: Function, options?: OnUpdateOptions | null): Promise<any>;
1255
+ /**
1256
+ * Unregister a previously registered [`View::on_delete`] callback.
1257
+ */
1258
+ remove_delete(callback_id: number): Promise<any>;
1259
+ /**
1260
+ * Unregister a previously registered update callback with this [`View`].
1261
+ *
1262
+ * # Arguments
1263
+ *
1264
+ * - `id` - A callback `id` as returned by a recipricol call to
1265
+ * [`View::on_update`].
1266
+ */
1267
+ remove_update(callback_id: number): Promise<void>;
1268
+ /**
1269
+ * The schema of this [`View`].
1270
+ *
1271
+ * The [`View`] schema differs from the `schema` returned by
1272
+ * [`Table::schema`]; it may have different column names due to
1273
+ * `expressions` or `columns` configs, or it maye have _different
1274
+ * column types_ due to the application og `group_by` and `aggregates`
1275
+ * config. You can think of [`Table::schema`] as the _input_ schema and
1276
+ * [`View::schema`] as the _output_ schema of a Perspective pipeline.
1277
+ */
1278
+ schema(): Promise<any>;
1279
+ /**
1280
+ * Set expansion `depth` of the `group_by` tree.
1281
+ */
1282
+ set_depth(depth: number): Promise<void>;
1283
+ /**
1284
+ * Serializes a [`View`] to the Apache Arrow data format.
1285
+ */
1286
+ to_arrow(window?: ViewWindow | null): Promise<ArrayBuffer>;
1287
+ /**
1288
+ * Serializes this [`View`] to JavaScript objects in a column-oriented
1289
+ * format.
1290
+ */
1291
+ to_columns(window?: ViewWindow | null): Promise<object>;
1292
+ /**
1293
+ * Serializes this [`View`] to a string of JSON data. Useful if you want to
1294
+ * save additional round trip serialize/deserialize cycles.
1295
+ */
1296
+ to_columns_string(window?: ViewWindow | null): Promise<string>;
1297
+ /**
1298
+ * Serializes this [`View`] to CSV data in a standard format.
1299
+ */
1300
+ to_csv(window?: ViewWindow | null): Promise<string>;
1301
+ /**
1302
+ * Serializes this [`View`] to JavaScript objects in a row-oriented
1303
+ * format.
1304
+ */
1305
+ to_json(window?: ViewWindow | null): Promise<Array<any>>;
1306
+ /**
1307
+ * Render this `View` as a JSON string.
1308
+ */
1309
+ to_json_string(window?: ViewWindow | null): Promise<string>;
1310
+ /**
1311
+ * Renders this [`View`] as an [NDJSON](https://github.com/ndjson/ndjson-spec)
1312
+ * formatted [`String`].
1313
+ */
1314
+ to_ndjson(window?: ViewWindow | null): Promise<string>;
1315
+ }
1316
+
1317
+ export class VirtualDataSlice {
1318
+ free(): void;
1319
+ [Symbol.dispose](): void;
1320
+ constructor(config: ViewConfigUpdate);
1321
+ setBooleanCol(name: string, index: number, val: any, group_by_index?: number | null): void;
1322
+ setCol(dtype: string, name: string, index: number, val: any, group_by_index?: number | null): void;
1323
+ setDatetimeCol(name: string, index: number, val: any, group_by_index?: number | null): void;
1324
+ setFloatCol(name: string, index: number, val: any, group_by_index?: number | null): void;
1325
+ setIntegerCol(name: string, index: number, val: any, group_by_index?: number | null): void;
1326
+ setStringCol(name: string, index: number, val: any, group_by_index?: number | null): void;
1278
1327
  }
1279
1328
 
1329
+ export class VirtualServer {
1330
+ free(): void;
1331
+ [Symbol.dispose](): void;
1332
+ handleRequest(bytes: Uint8Array): Promise<any>;
1333
+ constructor(handler: object);
1334
+ }
1335
+
1336
+ /**
1337
+ * Register this crate's Custom Elements in the browser's current session.
1338
+ *
1339
+ * This must occur before calling any public API methods on these Custom
1340
+ * Elements from JavaScript, as the methods themselves won't be defined yet.
1341
+ * By default, this crate does not register `PerspectiveViewerElement` (as to
1342
+ * preserve backwards-compatible synchronous API).
1343
+ */
1344
+ export function init(): void;
1345
+
1346
+ /**
1347
+ * Register a plugin globally.
1348
+ */
1349
+ export function registerPlugin(name: string): void;
1350
+
1280
1351
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
1281
1352
 
1282
1353
  export interface InitOutput {
1283
- readonly memory: WebAssembly.Memory;
1284
- readonly __wbg_columndropdownelement_free: (a: number, b: number) => void;
1285
- readonly __wbg_copydropdownmenuelement_free: (a: number, b: number) => void;
1286
- readonly copydropdownmenuelement_new: (a: number) => number;
1287
- readonly copydropdownmenuelement_open: (a: number, b: number) => void;
1288
- readonly copydropdownmenuelement_hide: (a: number, b: number) => void;
1289
- readonly copydropdownmenuelement___set_model: (a: number, b: number) => void;
1290
- readonly copydropdownmenuelement_connected_callback: (a: number) => void;
1291
- readonly __wbg_perspectivedebugpluginelement_free: (a: number, b: number) => void;
1292
- readonly perspectivedebugpluginelement_new: (a: number) => number;
1293
- readonly perspectivedebugpluginelement_name: (a: number, b: number) => void;
1294
- readonly perspectivedebugpluginelement_select_mode: (a: number, b: number) => void;
1295
- readonly perspectivedebugpluginelement_config_column_names: (a: number) => number;
1296
- readonly perspectivedebugpluginelement_draw: (a: number, b: number) => number;
1297
- readonly perspectivedebugpluginelement_clear: (a: number) => number;
1298
- readonly perspectivedebugpluginelement_connectedCallback: (a: number) => void;
1299
- readonly exportdropdownmenuelement_open: (a: number, b: number) => void;
1300
- readonly exportdropdownmenuelement_hide: (a: number, b: number) => void;
1301
- readonly exportdropdownmenuelement___set_model: (a: number, b: number) => void;
1302
- readonly __wbg_filterdropdownelement_free: (a: number, b: number) => void;
1303
- readonly __wbg_functiondropdownelement_free: (a: number, b: number) => void;
1304
- readonly __wbg_perspectiveviewerelement_free: (a: number, b: number) => void;
1305
- readonly perspectiveviewerelement_new: (a: number) => number;
1306
- readonly perspectiveviewerelement_connectedCallback: (a: number, b: number) => void;
1307
- readonly perspectiveviewerelement_load: (a: number, b: number, c: number) => void;
1308
- readonly perspectiveviewerelement_delete: (a: number) => number;
1309
- readonly perspectiveviewerelement_eject: (a: number) => number;
1310
- readonly perspectiveviewerelement_getView: (a: number) => number;
1311
- readonly perspectiveviewerelement_getViewConfig: (a: number) => number;
1312
- readonly perspectiveviewerelement_getTable: (a: number, b: number) => number;
1313
- readonly perspectiveviewerelement_getClient: (a: number, b: number) => number;
1314
- readonly perspectiveviewerelement_getRenderStats: (a: number, b: number) => void;
1315
- readonly perspectiveviewerelement_flush: (a: number) => number;
1316
- readonly perspectiveviewerelement_restore: (a: number, b: number) => number;
1317
- readonly perspectiveviewerelement_resetError: (a: number) => number;
1318
- readonly perspectiveviewerelement_save: (a: number) => number;
1319
- readonly perspectiveviewerelement_download: (a: number, b: number) => number;
1320
- readonly perspectiveviewerelement_export: (a: number, b: number) => number;
1321
- readonly perspectiveviewerelement_copy: (a: number, b: number) => number;
1322
- readonly perspectiveviewerelement_reset: (a: number, b: number) => number;
1323
- readonly perspectiveviewerelement_resize: (a: number, b: number) => number;
1324
- readonly perspectiveviewerelement_setAutoSize: (a: number, b: number) => void;
1325
- readonly perspectiveviewerelement_setAutoPause: (a: number, b: number) => void;
1326
- readonly perspectiveviewerelement_getSelection: (a: number) => number;
1327
- readonly perspectiveviewerelement_setSelection: (a: number, b: number, c: number) => void;
1328
- readonly perspectiveviewerelement_getEditPort: (a: number, b: number) => void;
1329
- readonly perspectiveviewerelement_restyleElement: (a: number) => number;
1330
- readonly perspectiveviewerelement_resetThemes: (a: number, b: number, c: number) => number;
1331
- readonly perspectiveviewerelement_setThrottle: (a: number, b: number, c: number) => void;
1332
- readonly perspectiveviewerelement_toggleConfig: (a: number, b: number) => number;
1333
- readonly perspectiveviewerelement_getAllPlugins: (a: number) => number;
1334
- readonly perspectiveviewerelement_getPlugin: (a: number, b: number, c: number, d: number) => void;
1335
- readonly perspectiveviewerelement___get_model: (a: number) => number;
1336
- readonly perspectiveviewerelement_toggleColumnSettings: (a: number, b: number, c: number) => number;
1337
- readonly perspectiveviewerelement_openColumnSettings: (a: number, b: number, c: number, d: number) => number;
1338
- readonly registerPlugin: (a: number, b: number) => void;
1339
- readonly init: () => void;
1340
- readonly perspectivedebugpluginelement_min_config_columns: (a: number) => number;
1341
- readonly perspectivedebugpluginelement_update: (a: number, b: number) => number;
1342
- readonly perspectivedebugpluginelement_resize: (a: number) => number;
1343
- readonly perspectivedebugpluginelement_restyle: (a: number) => number;
1344
- readonly perspectivedebugpluginelement_save: (a: number) => number;
1345
- readonly perspectivedebugpluginelement_restore: (a: number) => number;
1346
- readonly perspectivedebugpluginelement_delete: (a: number) => number;
1347
- readonly exportdropdownmenuelement_new: (a: number) => number;
1348
- readonly __wbg_exportdropdownmenuelement_free: (a: number, b: number) => void;
1349
- readonly exportdropdownmenuelement_connected_callback: (a: number) => void;
1350
- readonly __wbg_proxysession_free: (a: number, b: number) => void;
1351
- readonly proxysession_handle_request: (a: number, b: number) => number;
1352
- readonly proxysession_close: (a: number) => number;
1353
- readonly __wbg_client_free: (a: number, b: number) => void;
1354
- readonly client___getClassname: (a: number, b: number) => void;
1355
- readonly client_new: (a: number, b: number, c: number) => void;
1356
- readonly client_new_proxy_session: (a: number, b: number) => number;
1357
- readonly client_handle_response: (a: number, b: number) => number;
1358
- readonly client_handle_error: (a: number, b: number, c: number, d: number) => number;
1359
- readonly client_on_error: (a: number, b: number) => number;
1360
- readonly client_table: (a: number, b: number, c: number) => number;
1361
- readonly client_terminate: (a: number, b: number) => void;
1362
- readonly client_open_table: (a: number, b: number, c: number) => number;
1363
- readonly client_get_hosted_table_names: (a: number) => number;
1364
- readonly client_on_hosted_tables_update: (a: number, b: number) => number;
1365
- readonly client_remove_hosted_tables_update: (a: number, b: number) => number;
1366
- readonly client_system_info: (a: number) => number;
1367
- readonly table___getClassname: (a: number, b: number) => void;
1368
- readonly __wbg_table_free: (a: number, b: number) => void;
1369
- readonly table_get_index: (a: number) => number;
1370
- readonly table_get_client: (a: number) => number;
1371
- readonly table_get_name: (a: number) => number;
1372
- readonly table_get_limit: (a: number) => number;
1373
- readonly table_clear: (a: number) => number;
1374
- readonly table_delete: (a: number, b: number) => number;
1375
- readonly table_size: (a: number) => number;
1376
- readonly table_schema: (a: number) => number;
1377
- readonly table_columns: (a: number) => number;
1378
- readonly table_make_port: (a: number) => number;
1379
- readonly table_on_delete: (a: number, b: number) => number;
1380
- readonly table_remove_delete: (a: number, b: number) => number;
1381
- readonly table_remove: (a: number, b: number, c: number) => number;
1382
- readonly table_replace: (a: number, b: number, c: number) => number;
1383
- readonly table_update: (a: number, b: number, c: number) => number;
1384
- readonly table_view: (a: number, b: number) => number;
1385
- readonly table_validate_expressions: (a: number, b: number) => number;
1386
- readonly __wbg_view_free: (a: number, b: number) => void;
1387
- readonly view___get_model: (a: number) => number;
1388
- readonly view_column_paths: (a: number, b: number) => number;
1389
- readonly view_delete: (a: number) => number;
1390
- readonly view_dimensions: (a: number) => number;
1391
- readonly view_expression_schema: (a: number) => number;
1392
- readonly view_get_config: (a: number) => number;
1393
- readonly view_get_min_max: (a: number, b: number, c: number) => number;
1394
- readonly view_num_rows: (a: number) => number;
1395
- readonly view_schema: (a: number) => number;
1396
- readonly view_to_arrow: (a: number, b: number) => number;
1397
- readonly view_to_columns_string: (a: number, b: number) => number;
1398
- readonly view_to_columns: (a: number, b: number) => number;
1399
- readonly view_to_json_string: (a: number, b: number) => number;
1400
- readonly view_to_json: (a: number, b: number) => number;
1401
- readonly view_to_ndjson: (a: number, b: number) => number;
1402
- readonly view_to_csv: (a: number, b: number) => number;
1403
- readonly view_on_update: (a: number, b: number, c: number) => number;
1404
- readonly view_remove_update: (a: number, b: number) => number;
1405
- readonly view_on_delete: (a: number, b: number) => number;
1406
- readonly view_num_columns: (a: number) => number;
1407
- readonly view_remove_delete: (a: number, b: number) => number;
1408
- readonly view_collapse: (a: number, b: number) => number;
1409
- readonly view_expand: (a: number, b: number) => number;
1410
- readonly view_set_depth: (a: number, b: number) => number;
1411
- readonly __wbg_jsvirtualdataslice_free: (a: number, b: number) => void;
1412
- readonly jsvirtualdataslice_new: () => number;
1413
- readonly jsvirtualdataslice_setCol: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
1414
- readonly jsvirtualdataslice_setStringCol: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1415
- readonly jsvirtualdataslice_setIntegerCol: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1416
- readonly jsvirtualdataslice_setFloatCol: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1417
- readonly jsvirtualdataslice_setBooleanCol: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1418
- readonly jsvirtualdataslice_setDatetimeCol: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1419
- readonly __wbg_jsvirtualserver_free: (a: number, b: number) => void;
1420
- readonly jsvirtualserver_new: (a: number, b: number) => void;
1421
- readonly jsvirtualserver_handleRequest: (a: number, b: number, c: number) => number;
1422
- readonly proxysession_new: (a: number, b: number) => number;
1423
- readonly __wasm_bindgen_func_elem_5618: (a: number, b: number, c: number) => void;
1424
- readonly __wasm_bindgen_func_elem_455: (a: number, b: number) => void;
1425
- readonly __wasm_bindgen_func_elem_18148: (a: number, b: number) => void;
1426
- readonly __wasm_bindgen_func_elem_18140: (a: number, b: number) => void;
1427
- readonly __wasm_bindgen_func_elem_5616: (a: number, b: number, c: number) => void;
1428
- readonly __wasm_bindgen_func_elem_5617: (a: number, b: number, c: number) => void;
1429
- readonly __wasm_bindgen_func_elem_13059: (a: number, b: number) => number;
1430
- readonly __wasm_bindgen_func_elem_12591: (a: number, b: number) => void;
1431
- readonly __wasm_bindgen_func_elem_18169: (a: number, b: number, c: number) => void;
1432
- readonly __wasm_bindgen_func_elem_18154: (a: number, b: number) => void;
1433
- readonly __wasm_bindgen_func_elem_452: (a: number, b: number) => void;
1434
- readonly __wasm_bindgen_func_elem_17223: (a: number, b: number, c: number) => void;
1435
- readonly __wasm_bindgen_func_elem_17151: (a: number, b: number) => void;
1436
- readonly __wasm_bindgen_func_elem_19856: (a: number, b: number, c: number, d: number) => void;
1437
- readonly __wbindgen_export: (a: number, b: number) => number;
1438
- readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
1439
- readonly __wbindgen_export3: (a: number) => void;
1440
- readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
1441
- readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
1354
+ readonly memory: WebAssembly.Memory;
1355
+ readonly __wbg_columndropdownelement_free: (a: number, b: number) => void;
1356
+ readonly __wbg_copydropdownmenuelement_free: (a: number, b: number) => void;
1357
+ readonly __wbg_filterdropdownelement_free: (a: number, b: number) => void;
1358
+ readonly __wbg_functiondropdownelement_free: (a: number, b: number) => void;
1359
+ readonly __wbg_perspectivedebugpluginelement_free: (a: number, b: number) => void;
1360
+ readonly __wbg_perspectiveviewerelement_free: (a: number, b: number) => void;
1361
+ readonly copydropdownmenuelement___set_model: (a: number, b: number) => void;
1362
+ readonly copydropdownmenuelement_connected_callback: (a: number) => void;
1363
+ readonly copydropdownmenuelement_hide: (a: number, b: number) => void;
1364
+ readonly copydropdownmenuelement_new: (a: number) => number;
1365
+ readonly copydropdownmenuelement_open: (a: number, b: number) => void;
1366
+ readonly exportdropdownmenuelement___set_model: (a: number, b: number) => void;
1367
+ readonly exportdropdownmenuelement_hide: (a: number, b: number) => void;
1368
+ readonly exportdropdownmenuelement_open: (a: number, b: number) => void;
1369
+ readonly init: () => void;
1370
+ readonly perspectivedebugpluginelement_clear: (a: number) => number;
1371
+ readonly perspectivedebugpluginelement_config_column_names: (a: number) => number;
1372
+ readonly perspectivedebugpluginelement_connectedCallback: (a: number) => void;
1373
+ readonly perspectivedebugpluginelement_draw: (a: number, b: number) => number;
1374
+ readonly perspectivedebugpluginelement_name: (a: number, b: number) => void;
1375
+ readonly perspectivedebugpluginelement_new: (a: number) => number;
1376
+ readonly perspectivedebugpluginelement_select_mode: (a: number, b: number) => void;
1377
+ readonly perspectiveviewerelement___get_model: (a: number) => number;
1378
+ readonly perspectiveviewerelement_connectedCallback: (a: number, b: number) => void;
1379
+ readonly perspectiveviewerelement_copy: (a: number, b: number) => number;
1380
+ readonly perspectiveviewerelement_delete: (a: number) => number;
1381
+ readonly perspectiveviewerelement_download: (a: number, b: number) => number;
1382
+ readonly perspectiveviewerelement_eject: (a: number) => number;
1383
+ readonly perspectiveviewerelement_export: (a: number, b: number) => number;
1384
+ readonly perspectiveviewerelement_flush: (a: number) => number;
1385
+ readonly perspectiveviewerelement_getAllPlugins: (a: number) => number;
1386
+ readonly perspectiveviewerelement_getClient: (a: number, b: number) => number;
1387
+ readonly perspectiveviewerelement_getEditPort: (a: number, b: number) => void;
1388
+ readonly perspectiveviewerelement_getPlugin: (a: number, b: number, c: number, d: number) => void;
1389
+ readonly perspectiveviewerelement_getRenderStats: (a: number, b: number) => void;
1390
+ readonly perspectiveviewerelement_getSelection: (a: number) => number;
1391
+ readonly perspectiveviewerelement_getTable: (a: number, b: number) => number;
1392
+ readonly perspectiveviewerelement_getView: (a: number) => number;
1393
+ readonly perspectiveviewerelement_getViewConfig: (a: number) => number;
1394
+ readonly perspectiveviewerelement_load: (a: number, b: number, c: number) => void;
1395
+ readonly perspectiveviewerelement_new: (a: number) => number;
1396
+ readonly perspectiveviewerelement_openColumnSettings: (a: number, b: number, c: number, d: number) => number;
1397
+ readonly perspectiveviewerelement_reset: (a: number, b: number) => number;
1398
+ readonly perspectiveviewerelement_resetError: (a: number) => number;
1399
+ readonly perspectiveviewerelement_resetThemes: (a: number, b: number, c: number) => number;
1400
+ readonly perspectiveviewerelement_resize: (a: number, b: number) => number;
1401
+ readonly perspectiveviewerelement_restore: (a: number, b: number) => number;
1402
+ readonly perspectiveviewerelement_restyleElement: (a: number) => number;
1403
+ readonly perspectiveviewerelement_save: (a: number) => number;
1404
+ readonly perspectiveviewerelement_setAutoPause: (a: number, b: number) => void;
1405
+ readonly perspectiveviewerelement_setAutoSize: (a: number, b: number) => void;
1406
+ readonly perspectiveviewerelement_setSelection: (a: number, b: number, c: number) => void;
1407
+ readonly perspectiveviewerelement_setThrottle: (a: number, b: number, c: number) => void;
1408
+ readonly perspectiveviewerelement_toggleColumnSettings: (a: number, b: number, c: number) => number;
1409
+ readonly perspectiveviewerelement_toggleConfig: (a: number, b: number) => number;
1410
+ readonly registerPlugin: (a: number, b: number) => void;
1411
+ readonly perspectivedebugpluginelement_update: (a: number, b: number) => number;
1412
+ readonly perspectivedebugpluginelement_min_config_columns: (a: number) => number;
1413
+ readonly perspectivedebugpluginelement_save: (a: number) => number;
1414
+ readonly perspectivedebugpluginelement_delete: (a: number) => number;
1415
+ readonly perspectivedebugpluginelement_resize: (a: number) => number;
1416
+ readonly perspectivedebugpluginelement_restore: (a: number) => number;
1417
+ readonly perspectivedebugpluginelement_restyle: (a: number) => number;
1418
+ readonly exportdropdownmenuelement_new: (a: number) => number;
1419
+ readonly __wbg_exportdropdownmenuelement_free: (a: number, b: number) => void;
1420
+ readonly exportdropdownmenuelement_connected_callback: (a: number) => void;
1421
+ readonly __wbg_client_free: (a: number, b: number) => void;
1422
+ readonly __wbg_genericsqlvirtualservermodel_free: (a: number, b: number) => void;
1423
+ readonly __wbg_proxysession_free: (a: number, b: number) => void;
1424
+ readonly __wbg_table_free: (a: number, b: number) => void;
1425
+ readonly __wbg_view_free: (a: number, b: number) => void;
1426
+ readonly __wbg_virtualdataslice_free: (a: number, b: number) => void;
1427
+ readonly __wbg_virtualserver_free: (a: number, b: number) => void;
1428
+ readonly client___getClassname: (a: number, b: number) => void;
1429
+ readonly client_get_hosted_table_names: (a: number) => number;
1430
+ readonly client_handle_error: (a: number, b: number, c: number, d: number) => number;
1431
+ readonly client_handle_response: (a: number, b: number) => number;
1432
+ readonly client_new: (a: number, b: number, c: number) => void;
1433
+ readonly client_new_proxy_session: (a: number, b: number) => number;
1434
+ readonly client_on_error: (a: number, b: number) => number;
1435
+ readonly client_on_hosted_tables_update: (a: number, b: number) => number;
1436
+ readonly client_open_table: (a: number, b: number, c: number) => number;
1437
+ readonly client_remove_hosted_tables_update: (a: number, b: number) => number;
1438
+ readonly client_system_info: (a: number) => number;
1439
+ readonly client_table: (a: number, b: number, c: number) => number;
1440
+ readonly client_terminate: (a: number, b: number) => void;
1441
+ readonly genericsqlvirtualservermodel_getHostedTables: (a: number, b: number) => void;
1442
+ readonly genericsqlvirtualservermodel_new: (a: number, b: number) => void;
1443
+ readonly genericsqlvirtualservermodel_tableMakeView: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1444
+ readonly genericsqlvirtualservermodel_tableSchema: (a: number, b: number, c: number, d: number) => void;
1445
+ readonly genericsqlvirtualservermodel_tableSize: (a: number, b: number, c: number, d: number) => void;
1446
+ readonly genericsqlvirtualservermodel_tableValidateExpression: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1447
+ readonly genericsqlvirtualservermodel_viewColumnSize: (a: number, b: number, c: number, d: number) => void;
1448
+ readonly genericsqlvirtualservermodel_viewDelete: (a: number, b: number, c: number, d: number) => void;
1449
+ readonly genericsqlvirtualservermodel_viewGetData: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1450
+ readonly genericsqlvirtualservermodel_viewSchema: (a: number, b: number, c: number, d: number) => void;
1451
+ readonly genericsqlvirtualservermodel_viewSize: (a: number, b: number, c: number, d: number) => void;
1452
+ readonly proxysession_close: (a: number) => number;
1453
+ readonly proxysession_handle_request: (a: number, b: number) => number;
1454
+ readonly proxysession_new: (a: number, b: number) => number;
1455
+ readonly table___getClassname: (a: number, b: number) => void;
1456
+ readonly table_clear: (a: number) => number;
1457
+ readonly table_columns: (a: number) => number;
1458
+ readonly table_delete: (a: number, b: number) => number;
1459
+ readonly table_get_client: (a: number) => number;
1460
+ readonly table_get_index: (a: number) => number;
1461
+ readonly table_get_limit: (a: number) => number;
1462
+ readonly table_get_name: (a: number) => number;
1463
+ readonly table_make_port: (a: number) => number;
1464
+ readonly table_on_delete: (a: number, b: number) => number;
1465
+ readonly table_remove: (a: number, b: number, c: number) => number;
1466
+ readonly table_remove_delete: (a: number, b: number) => number;
1467
+ readonly table_replace: (a: number, b: number, c: number) => number;
1468
+ readonly table_schema: (a: number) => number;
1469
+ readonly table_size: (a: number) => number;
1470
+ readonly table_update: (a: number, b: number, c: number) => number;
1471
+ readonly table_validate_expressions: (a: number, b: number) => number;
1472
+ readonly table_view: (a: number, b: number) => number;
1473
+ readonly view___get_model: (a: number) => number;
1474
+ readonly view_collapse: (a: number, b: number) => number;
1475
+ readonly view_column_paths: (a: number, b: number) => number;
1476
+ readonly view_delete: (a: number) => number;
1477
+ readonly view_dimensions: (a: number) => number;
1478
+ readonly view_expand: (a: number, b: number) => number;
1479
+ readonly view_expression_schema: (a: number) => number;
1480
+ readonly view_get_config: (a: number) => number;
1481
+ readonly view_get_min_max: (a: number, b: number, c: number) => number;
1482
+ readonly view_num_columns: (a: number) => number;
1483
+ readonly view_num_rows: (a: number) => number;
1484
+ readonly view_on_delete: (a: number, b: number) => number;
1485
+ readonly view_on_update: (a: number, b: number, c: number) => number;
1486
+ readonly view_remove_delete: (a: number, b: number) => number;
1487
+ readonly view_remove_update: (a: number, b: number) => number;
1488
+ readonly view_schema: (a: number) => number;
1489
+ readonly view_set_depth: (a: number, b: number) => number;
1490
+ readonly view_to_arrow: (a: number, b: number) => number;
1491
+ readonly view_to_columns: (a: number, b: number) => number;
1492
+ readonly view_to_columns_string: (a: number, b: number) => number;
1493
+ readonly view_to_csv: (a: number, b: number) => number;
1494
+ readonly view_to_json: (a: number, b: number) => number;
1495
+ readonly view_to_json_string: (a: number, b: number) => number;
1496
+ readonly view_to_ndjson: (a: number, b: number) => number;
1497
+ readonly virtualdataslice_new: (a: number) => number;
1498
+ readonly virtualdataslice_setBooleanCol: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1499
+ readonly virtualdataslice_setCol: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
1500
+ readonly virtualdataslice_setDatetimeCol: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1501
+ readonly virtualdataslice_setFloatCol: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1502
+ readonly virtualdataslice_setIntegerCol: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1503
+ readonly virtualdataslice_setStringCol: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1504
+ readonly virtualserver_handleRequest: (a: number, b: number, c: number) => number;
1505
+ readonly virtualserver_new: (a: number, b: number) => void;
1506
+ readonly __wasm_bindgen_func_elem_13482: (a: number, b: number) => void;
1507
+ readonly __wasm_bindgen_func_elem_3123: (a: number, b: number) => void;
1508
+ readonly __wasm_bindgen_func_elem_3124: (a: number, b: number) => void;
1509
+ readonly __wasm_bindgen_func_elem_18167: (a: number, b: number) => void;
1510
+ readonly __wasm_bindgen_func_elem_18937: (a: number, b: number) => void;
1511
+ readonly __wasm_bindgen_func_elem_18961: (a: number, b: number) => void;
1512
+ readonly __wasm_bindgen_func_elem_20888: (a: number, b: number, c: number, d: number) => void;
1513
+ readonly __wasm_bindgen_func_elem_5237: (a: number, b: number, c: number) => void;
1514
+ readonly __wasm_bindgen_func_elem_5238: (a: number, b: number, c: number) => void;
1515
+ readonly __wasm_bindgen_func_elem_5235: (a: number, b: number, c: number) => void;
1516
+ readonly __wasm_bindgen_func_elem_18286: (a: number, b: number, c: number) => void;
1517
+ readonly __wasm_bindgen_func_elem_18978: (a: number, b: number, c: number) => void;
1518
+ readonly __wasm_bindgen_func_elem_14371: (a: number, b: number) => number;
1519
+ readonly __wasm_bindgen_func_elem_18940: (a: number, b: number) => void;
1520
+ readonly __wbindgen_export: (a: number, b: number) => number;
1521
+ readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
1522
+ readonly __wbindgen_export3: (a: number) => void;
1523
+ readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
1524
+ readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
1442
1525
  }
1443
1526
 
1444
1527
  export type SyncInitInput = BufferSource | WebAssembly.Module;
1528
+
1445
1529
  /**
1446
- * Instantiates the given `module`, which can either be bytes or
1447
- * a precompiled `WebAssembly.Module`.
1448
- *
1449
- * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
1450
- *
1451
- * @returns {InitOutput}
1452
- */
1530
+ * Instantiates the given `module`, which can either be bytes or
1531
+ * a precompiled `WebAssembly.Module`.
1532
+ *
1533
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
1534
+ *
1535
+ * @returns {InitOutput}
1536
+ */
1453
1537
  export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
1454
1538
 
1455
1539
  /**
1456
- * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
1457
- * for everything else, calls `WebAssembly.instantiate` directly.
1458
- *
1459
- * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
1460
- *
1461
- * @returns {Promise<InitOutput>}
1462
- */
1540
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
1541
+ * for everything else, calls `WebAssembly.instantiate` directly.
1542
+ *
1543
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
1544
+ *
1545
+ * @returns {Promise<InitOutput>}
1546
+ */
1463
1547
  export default function __wbg_init (module_or_path: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;