@perspective-dev/client 5.8.0 → 5.9.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.
- package/dist/cdn/perspective.js +3 -3
- package/dist/cdn/perspective.js.map +3 -3
- package/dist/esm/perspective.browser.d.ts +34 -4
- package/dist/esm/perspective.js +2 -2
- package/dist/esm/perspective.js.map +3 -3
- package/dist/esm/perspective.node.d.ts +34 -4
- package/dist/esm/perspective.node.js +69 -77
- package/dist/esm/perspective.node.js.map +3 -3
- package/dist/esm/public_types.d.ts +1 -1
- package/dist/esm/wasm/migrate.d.ts +39 -11
- package/dist/esm/wasm/registry.d.ts +5 -11
- package/dist/esm/wasm/registry.js +2 -2
- package/dist/esm/wasm/registry.js.map +3 -3
- package/dist/ts-rs/OnRemoveData.d.ts +4 -4
- package/dist/ts-rs/RemoveCause.d.ts +7 -0
- package/dist/wasm/perspective-js.d.ts +20 -15
- package/dist/wasm/perspective-js.js +28 -23
- package/dist/wasm/perspective-js.wasm +0 -0
- package/dist/wasm/perspective-js.wasm.d.ts +6 -6
- package/dist/wasm/perspective-migrate.d.ts +7 -0
- package/dist/wasm/perspective-migrate.js +23 -0
- package/dist/wasm/perspective-migrate.wasm +0 -0
- package/dist/wasm/perspective-migrate.wasm.d.ts +1 -0
- package/package.json +5 -5
- package/dist/ts-rs/ViewOnRemoveResp.d.ts +0 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
|
-
import type {
|
|
2
|
+
import type { RemoveCause } from "./RemoveCause.d.ts";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
* to the callback argument to [`View::on_remove`].
|
|
5
|
+
* The keys of rows which left a [`View`], the port ID and the [`RemoveCause`]
|
|
6
|
+
* they left under, provided to the callback argument to [`View::on_remove`].
|
|
7
7
|
*/
|
|
8
|
-
export type OnRemoveData =
|
|
8
|
+
export type OnRemoveData = { port_id: number, indices: Uint8Array | undefined, cause: RemoveCause, };
|
|
@@ -152,7 +152,7 @@ export type * from "../ts-rs/ColumnWindow.d.ts";
|
|
|
152
152
|
export type * from "../ts-rs/TableInitOptions.d.ts";
|
|
153
153
|
export type * from "../ts-rs/ViewConfigUpdate.d.ts";
|
|
154
154
|
export type * from "../ts-rs/ViewOnUpdateResp.d.ts";
|
|
155
|
-
export type * from "../ts-rs/
|
|
155
|
+
export type * from "../ts-rs/RemoveCause.d.ts";
|
|
156
156
|
export type * from "../ts-rs/OnRemoveData.d.ts";
|
|
157
157
|
export type * from "../ts-rs/OnUpdateData.d.ts";
|
|
158
158
|
export type * from "../ts-rs/OnUpdateOptions.d.ts";
|
|
@@ -889,19 +889,24 @@ export class View {
|
|
|
889
889
|
*/
|
|
890
890
|
on_delete(on_delete: Function): Promise<any>;
|
|
891
891
|
/**
|
|
892
|
-
* Register a callback which is invoked whenever rows
|
|
893
|
-
*
|
|
894
|
-
*
|
|
895
|
-
*
|
|
892
|
+
* Register a callback which is invoked whenever rows leave this
|
|
893
|
+
* [`View`], with an object containing `port_id`, `indices` (their keys
|
|
894
|
+
* as an Arrow of one column per key column named after it) and `cause`,
|
|
895
|
+
* one of `"key"`, `"filter"` or `"group"`.
|
|
896
896
|
*
|
|
897
|
-
* [`
|
|
898
|
-
* [`Table
|
|
899
|
-
* [`Table`]
|
|
897
|
+
* For a [`View`] without `group_by` the keys are the `index` columns of
|
|
898
|
+
* the [`Table`], which must have one: `"key"` when [`Table::remove`]
|
|
899
|
+
* removed them ([`Table::replace`] reports the keys it does not
|
|
900
|
+
* re-supply and [`Table::clear`] every key) and `"filter"` when
|
|
901
|
+
* [`Table::update`] moved them outside the [`View`]'s `filter`. For a
|
|
902
|
+
* [`View`] with `group_by` the keys are the `group_by` columns of each
|
|
903
|
+
* group which no longer has any rows, `"group"`, `null` below the
|
|
904
|
+
* group's depth. It fires once per cause per update step.
|
|
900
905
|
*
|
|
901
906
|
* # JavaScript Examples
|
|
902
907
|
*
|
|
903
908
|
* ```javascript
|
|
904
|
-
* const id = await view.on_remove(({ indices, port_id }) => {
|
|
909
|
+
* const id = await view.on_remove(({ indices, port_id, cause }) => {
|
|
905
910
|
* replica.remove(indices);
|
|
906
911
|
* });
|
|
907
912
|
* ```
|
|
@@ -1163,12 +1168,12 @@ export interface InitOutput {
|
|
|
1163
1168
|
readonly virtualdataslice_setStringCol: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
1164
1169
|
readonly virtualserver_handleRequest: (a: number, b: number, c: number) => number;
|
|
1165
1170
|
readonly virtualserver_new: (a: number, b: number) => void;
|
|
1166
|
-
readonly
|
|
1167
|
-
readonly
|
|
1168
|
-
readonly
|
|
1169
|
-
readonly
|
|
1170
|
-
readonly
|
|
1171
|
-
readonly
|
|
1171
|
+
readonly __wasm_bindgen_func_elem_1751: (a: number, b: number) => void;
|
|
1172
|
+
readonly __wasm_bindgen_func_elem_4765: (a: number, b: number) => void;
|
|
1173
|
+
readonly __wasm_bindgen_func_elem_13332: (a: number, b: number, c: number, d: number) => void;
|
|
1174
|
+
readonly __wasm_bindgen_func_elem_4767: (a: number, b: number, c: number) => void;
|
|
1175
|
+
readonly __wasm_bindgen_func_elem_2093: (a: number, b: number) => number;
|
|
1176
|
+
readonly __wasm_bindgen_func_elem_2094: (a: number, b: number) => void;
|
|
1172
1177
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
1173
1178
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
1174
1179
|
readonly __wbindgen_export3: (a: number) => void;
|
|
@@ -1557,19 +1557,24 @@ export class View {
|
|
|
1557
1557
|
return takeObject(ret);
|
|
1558
1558
|
}
|
|
1559
1559
|
/**
|
|
1560
|
-
* Register a callback which is invoked whenever rows
|
|
1561
|
-
*
|
|
1562
|
-
*
|
|
1563
|
-
*
|
|
1564
|
-
*
|
|
1565
|
-
* [`
|
|
1566
|
-
* [`Table
|
|
1567
|
-
* [`Table`]
|
|
1560
|
+
* Register a callback which is invoked whenever rows leave this
|
|
1561
|
+
* [`View`], with an object containing `port_id`, `indices` (their keys
|
|
1562
|
+
* as an Arrow of one column per key column named after it) and `cause`,
|
|
1563
|
+
* one of `"key"`, `"filter"` or `"group"`.
|
|
1564
|
+
*
|
|
1565
|
+
* For a [`View`] without `group_by` the keys are the `index` columns of
|
|
1566
|
+
* the [`Table`], which must have one: `"key"` when [`Table::remove`]
|
|
1567
|
+
* removed them ([`Table::replace`] reports the keys it does not
|
|
1568
|
+
* re-supply and [`Table::clear`] every key) and `"filter"` when
|
|
1569
|
+
* [`Table::update`] moved them outside the [`View`]'s `filter`. For a
|
|
1570
|
+
* [`View`] with `group_by` the keys are the `group_by` columns of each
|
|
1571
|
+
* group which no longer has any rows, `"group"`, `null` below the
|
|
1572
|
+
* group's depth. It fires once per cause per update step.
|
|
1568
1573
|
*
|
|
1569
1574
|
* # JavaScript Examples
|
|
1570
1575
|
*
|
|
1571
1576
|
* ```javascript
|
|
1572
|
-
* const id = await view.on_remove(({ indices, port_id }) => {
|
|
1577
|
+
* const id = await view.on_remove(({ indices, port_id, cause }) => {
|
|
1573
1578
|
* replica.remove(indices);
|
|
1574
1579
|
* });
|
|
1575
1580
|
* ```
|
|
@@ -2342,7 +2347,7 @@ function __wbg_get_imports() {
|
|
|
2342
2347
|
const a = state0.a;
|
|
2343
2348
|
state0.a = 0;
|
|
2344
2349
|
try {
|
|
2345
|
-
return
|
|
2350
|
+
return __wasm_bindgen_func_elem_13332(a, state0.b, arg0, arg1);
|
|
2346
2351
|
} finally {
|
|
2347
2352
|
state0.a = a;
|
|
2348
2353
|
}
|
|
@@ -2417,7 +2422,7 @@ function __wbg_get_imports() {
|
|
|
2417
2422
|
const ret = Promise.resolve(getObject(arg0));
|
|
2418
2423
|
return addHeapObject(ret);
|
|
2419
2424
|
},
|
|
2420
|
-
|
|
2425
|
+
__wbg_run_ce6bcc7f4952334e: function() { return handleError(function (arg0, arg1) {
|
|
2421
2426
|
const ret = getObject(arg0).run(getObject(arg1));
|
|
2422
2427
|
return addHeapObject(ret);
|
|
2423
2428
|
}, arguments); },
|
|
@@ -2509,17 +2514,17 @@ function __wbg_get_imports() {
|
|
|
2509
2514
|
},
|
|
2510
2515
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
2511
2516
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 12, function: Function { arguments: [], shim_idx: 34, ret: NamedExternref("Promise<any>"), inner_ret: Some(NamedExternref("Promise<any>")) }, mutable: false }) -> Externref`.
|
|
2512
|
-
const ret = makeClosure(arg0, arg1, wasm.
|
|
2517
|
+
const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1751, __wasm_bindgen_func_elem_2093);
|
|
2513
2518
|
return addHeapObject(ret);
|
|
2514
2519
|
},
|
|
2515
2520
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
2516
2521
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 12, function: Function { arguments: [], shim_idx: 35, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
|
|
2517
|
-
const ret = makeClosure(arg0, arg1, wasm.
|
|
2522
|
+
const ret = makeClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_1751, __wasm_bindgen_func_elem_2094);
|
|
2518
2523
|
return addHeapObject(ret);
|
|
2519
2524
|
},
|
|
2520
2525
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
2521
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
2522
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
2526
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 635, function: Function { arguments: [Externref], shim_idx: 636, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2527
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_4765, __wasm_bindgen_func_elem_4767);
|
|
2523
2528
|
return addHeapObject(ret);
|
|
2524
2529
|
},
|
|
2525
2530
|
__wbindgen_cast_0000000000000004: function(arg0) {
|
|
@@ -2596,21 +2601,21 @@ function __wbg_get_imports() {
|
|
|
2596
2601
|
};
|
|
2597
2602
|
}
|
|
2598
2603
|
|
|
2599
|
-
function
|
|
2600
|
-
wasm.
|
|
2604
|
+
function __wasm_bindgen_func_elem_2094(arg0, arg1) {
|
|
2605
|
+
wasm.__wasm_bindgen_func_elem_2094(arg0, arg1);
|
|
2601
2606
|
}
|
|
2602
2607
|
|
|
2603
|
-
function
|
|
2604
|
-
const ret = wasm.
|
|
2608
|
+
function __wasm_bindgen_func_elem_2093(arg0, arg1) {
|
|
2609
|
+
const ret = wasm.__wasm_bindgen_func_elem_2093(arg0, arg1);
|
|
2605
2610
|
return takeObject(ret);
|
|
2606
2611
|
}
|
|
2607
2612
|
|
|
2608
|
-
function
|
|
2609
|
-
wasm.
|
|
2613
|
+
function __wasm_bindgen_func_elem_4767(arg0, arg1, arg2) {
|
|
2614
|
+
wasm.__wasm_bindgen_func_elem_4767(arg0, arg1, addHeapObject(arg2));
|
|
2610
2615
|
}
|
|
2611
2616
|
|
|
2612
|
-
function
|
|
2613
|
-
wasm.
|
|
2617
|
+
function __wasm_bindgen_func_elem_13332(arg0, arg1, arg2, arg3) {
|
|
2618
|
+
wasm.__wasm_bindgen_func_elem_13332(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
2614
2619
|
}
|
|
2615
2620
|
|
|
2616
2621
|
const ClientFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
Binary file
|
|
@@ -105,12 +105,12 @@ export const virtualdataslice_setIntegerCol: (a: number, b: number, c: number, d
|
|
|
105
105
|
export const virtualdataslice_setStringCol: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
106
106
|
export const virtualserver_handleRequest: (a: number, b: number, c: number) => number;
|
|
107
107
|
export const virtualserver_new: (a: number, b: number) => void;
|
|
108
|
-
export const
|
|
109
|
-
export const
|
|
110
|
-
export const
|
|
111
|
-
export const
|
|
112
|
-
export const
|
|
113
|
-
export const
|
|
108
|
+
export const __wasm_bindgen_func_elem_1751: (a: number, b: number) => void;
|
|
109
|
+
export const __wasm_bindgen_func_elem_4765: (a: number, b: number) => void;
|
|
110
|
+
export const __wasm_bindgen_func_elem_13332: (a: number, b: number, c: number, d: number) => void;
|
|
111
|
+
export const __wasm_bindgen_func_elem_4767: (a: number, b: number, c: number) => void;
|
|
112
|
+
export const __wasm_bindgen_func_elem_2093: (a: number, b: number) => number;
|
|
113
|
+
export const __wasm_bindgen_func_elem_2094: (a: number, b: number) => void;
|
|
114
114
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
115
115
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
116
116
|
export const __wbindgen_export3: (a: number) => void;
|
|
@@ -7,11 +7,18 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export function migrate(kind: string, from: string | null | undefined, value: any): any;
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Check that a config is valid for the current schema without migrating it,
|
|
12
|
+
* where `strict` requires the complete `save()` form.
|
|
13
|
+
*/
|
|
14
|
+
export function validate_config(kind: string, value: any, strict?: boolean | null): void;
|
|
15
|
+
|
|
10
16
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
11
17
|
|
|
12
18
|
export interface InitOutput {
|
|
13
19
|
readonly memory: WebAssembly.Memory;
|
|
14
20
|
readonly migrate: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
21
|
+
readonly validate_config: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
15
22
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
16
23
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
17
24
|
readonly __wbindgen_export3: (a: number) => void;
|
|
@@ -28,6 +28,29 @@ export function migrate(kind, from, value) {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Check that a config is valid for the current schema without migrating it,
|
|
33
|
+
* where `strict` requires the complete `save()` form.
|
|
34
|
+
* @param {string} kind
|
|
35
|
+
* @param {any} value
|
|
36
|
+
* @param {boolean | null} [strict]
|
|
37
|
+
*/
|
|
38
|
+
export function validate_config(kind, value, strict) {
|
|
39
|
+
try {
|
|
40
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
41
|
+
const ptr0 = passStringToWasm0(kind, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
42
|
+
const len0 = WASM_VECTOR_LEN;
|
|
43
|
+
wasm.validate_config(retptr, ptr0, len0, addHeapObject(value), isLikeNone(strict) ? 0xFFFFFF : strict ? 1 : 0);
|
|
44
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
45
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
46
|
+
if (r1) {
|
|
47
|
+
throw takeObject(r0);
|
|
48
|
+
}
|
|
49
|
+
} finally {
|
|
50
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
31
54
|
function __wbg_get_imports() {
|
|
32
55
|
const import0 = {
|
|
33
56
|
__proto__: null,
|
|
Binary file
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const migrate: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
5
|
+
export const validate_config: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
5
6
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
6
7
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
7
8
|
export const __wbindgen_export3: (a: number) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perspective-dev/client",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.9.0",
|
|
4
4
|
"description": "Streaming query engine for data grids, pivot tables and charts over large, real-time datasets — WebAssembly in the browser, native in Node.js, or remote over WebSocket.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"perspective",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@perspective-dev/server": "^5.
|
|
71
|
+
"@perspective-dev/server": "^5.9.0",
|
|
72
72
|
"stoppable": "=1.1.0",
|
|
73
73
|
"ws": "^8.17.0"
|
|
74
74
|
},
|
|
@@ -88,9 +88,9 @@
|
|
|
88
88
|
}
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
|
-
"@perspective-dev/esbuild-plugin": "^5.
|
|
92
|
-
"@perspective-dev/metadata": "^5.
|
|
93
|
-
"@perspective-dev/test": "^5.
|
|
91
|
+
"@perspective-dev/esbuild-plugin": "^5.9.0",
|
|
92
|
+
"@perspective-dev/metadata": "^5.9.0",
|
|
93
|
+
"@perspective-dev/test": "^5.9.0",
|
|
94
94
|
"@clickhouse/client-web": "^1.12.0",
|
|
95
95
|
"@duckdb/duckdb-wasm": "^1.32.0",
|
|
96
96
|
"@playwright/experimental-ct-react": "=1.62.0",
|