@perspective-dev/client 5.8.0 → 5.9.1
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 +77 -85
- 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 +10 -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 +28 -23
- package/dist/wasm/perspective-js.js +35 -30
- 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
|
@@ -1186,7 +1186,7 @@ export class Table {
|
|
|
1186
1186
|
* [`Table::on_delete`] resolves when the subscription message is sent, not
|
|
1187
1187
|
* when the _delete_ event occurs.
|
|
1188
1188
|
* @param {Function} on_delete
|
|
1189
|
-
* @returns {Promise<
|
|
1189
|
+
* @returns {Promise<number>}
|
|
1190
1190
|
*/
|
|
1191
1191
|
on_delete(on_delete) {
|
|
1192
1192
|
const ret = wasm.table_on_delete(this.__wbg_ptr, addHeapObject(on_delete));
|
|
@@ -1220,7 +1220,7 @@ export class Table {
|
|
|
1220
1220
|
* Removes a listener with a given ID, as returned by a previous call to
|
|
1221
1221
|
* [`Table::on_delete`].
|
|
1222
1222
|
* @param {number} callback_id
|
|
1223
|
-
* @returns {Promise<
|
|
1223
|
+
* @returns {Promise<void>}
|
|
1224
1224
|
*/
|
|
1225
1225
|
remove_delete(callback_id) {
|
|
1226
1226
|
const ret = wasm.table_remove_delete(this.__wbg_ptr, callback_id);
|
|
@@ -1308,7 +1308,7 @@ export class Table {
|
|
|
1308
1308
|
* ```
|
|
1309
1309
|
* @param {string | ArrayBuffer | Record<string, unknown[]> | Record<string, unknown>[] | Record<string, ColumnType>} input
|
|
1310
1310
|
* @param {UpdateOptions | null} [options]
|
|
1311
|
-
* @returns {Promise<
|
|
1311
|
+
* @returns {Promise<void>}
|
|
1312
1312
|
*/
|
|
1313
1313
|
update(input, options) {
|
|
1314
1314
|
const ret = wasm.table_update(this.__wbg_ptr, addHeapObject(input), isLikeNone(options) ? 0 : addHeapObject(options));
|
|
@@ -1550,31 +1550,36 @@ export class View {
|
|
|
1550
1550
|
* Register a callback with this [`View`]. Whenever the [`View`] is
|
|
1551
1551
|
* deleted, this callback will be invoked.
|
|
1552
1552
|
* @param {Function} on_delete
|
|
1553
|
-
* @returns {Promise<
|
|
1553
|
+
* @returns {Promise<number>}
|
|
1554
1554
|
*/
|
|
1555
1555
|
on_delete(on_delete) {
|
|
1556
1556
|
const ret = wasm.view_on_delete(this.__wbg_ptr, addHeapObject(on_delete));
|
|
1557
1557
|
return takeObject(ret);
|
|
1558
1558
|
}
|
|
1559
1559
|
/**
|
|
1560
|
-
* Register a callback which is invoked whenever rows
|
|
1561
|
-
*
|
|
1562
|
-
*
|
|
1563
|
-
*
|
|
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
1564
|
*
|
|
1565
|
-
* [`
|
|
1566
|
-
* [`Table
|
|
1567
|
-
* [`Table`]
|
|
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
|
* ```
|
|
1576
1581
|
* @param {(data: OnRemoveData) => void} on_remove_js
|
|
1577
|
-
* @returns {Promise<
|
|
1582
|
+
* @returns {Promise<number>}
|
|
1578
1583
|
*/
|
|
1579
1584
|
on_remove(on_remove_js) {
|
|
1580
1585
|
const ret = wasm.view_on_remove(this.__wbg_ptr, addHeapObject(on_remove_js));
|
|
@@ -1607,7 +1612,7 @@ export class View {
|
|
|
1607
1612
|
* ```
|
|
1608
1613
|
* @param {(data: OnUpdateData) => void} on_update_js
|
|
1609
1614
|
* @param {OnUpdateOptions | null} [options]
|
|
1610
|
-
* @returns {Promise<
|
|
1615
|
+
* @returns {Promise<number>}
|
|
1611
1616
|
*/
|
|
1612
1617
|
on_update(on_update_js, options) {
|
|
1613
1618
|
const ret = wasm.view_on_update(this.__wbg_ptr, addHeapObject(on_update_js), isLikeNone(options) ? 0 : addHeapObject(options));
|
|
@@ -1616,7 +1621,7 @@ export class View {
|
|
|
1616
1621
|
/**
|
|
1617
1622
|
* Unregister a previously registered [`View::on_delete`] callback.
|
|
1618
1623
|
* @param {number} callback_id
|
|
1619
|
-
* @returns {Promise<
|
|
1624
|
+
* @returns {Promise<void>}
|
|
1620
1625
|
*/
|
|
1621
1626
|
remove_delete(callback_id) {
|
|
1622
1627
|
const ret = wasm.view_remove_delete(this.__wbg_ptr, callback_id);
|
|
@@ -1966,7 +1971,7 @@ export class VirtualServer {
|
|
|
1966
1971
|
}
|
|
1967
1972
|
/**
|
|
1968
1973
|
* @param {Uint8Array} bytes
|
|
1969
|
-
* @returns {Promise<
|
|
1974
|
+
* @returns {Promise<Uint8Array>}
|
|
1970
1975
|
*/
|
|
1971
1976
|
handleRequest(bytes) {
|
|
1972
1977
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
|
|
@@ -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_13335(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_748b6920eb34b566: 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_1727, __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_1727, __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_4768, __wasm_bindgen_func_elem_4770);
|
|
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_4770(arg0, arg1, arg2) {
|
|
2614
|
+
wasm.__wasm_bindgen_func_elem_4770(arg0, arg1, addHeapObject(arg2));
|
|
2610
2615
|
}
|
|
2611
2616
|
|
|
2612
|
-
function
|
|
2613
|
-
wasm.
|
|
2617
|
+
function __wasm_bindgen_func_elem_13335(arg0, arg1, arg2, arg3) {
|
|
2618
|
+
wasm.__wasm_bindgen_func_elem_13335(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_1727: (a: number, b: number) => void;
|
|
109
|
+
export const __wasm_bindgen_func_elem_4768: (a: number, b: number) => void;
|
|
110
|
+
export const __wasm_bindgen_func_elem_13335: (a: number, b: number, c: number, d: number) => void;
|
|
111
|
+
export const __wasm_bindgen_func_elem_4770: (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.1",
|
|
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.1",
|
|
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.1",
|
|
92
|
+
"@perspective-dev/metadata": "^5.9.1",
|
|
93
|
+
"@perspective-dev/test": "^5.9.1",
|
|
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",
|