@perspective-dev/client 4.0.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/perspective-server.worker.js +1 -1
- package/dist/cdn/perspective-server.worker.js.map +3 -3
- package/dist/cdn/perspective.js +2 -2
- package/dist/cdn/perspective.js.map +4 -4
- package/dist/esm/perspective.browser.d.ts +5 -1
- package/dist/esm/perspective.inline.js +2 -2
- package/dist/esm/perspective.inline.js.map +4 -4
- package/dist/esm/perspective.js +2 -2
- package/dist/esm/perspective.js.map +4 -4
- package/dist/esm/perspective.node.d.ts +6 -1
- package/dist/esm/perspective.node.js +722 -353
- package/dist/esm/perspective.node.js.map +4 -4
- package/dist/esm/ts-rs/ColumnType.d.ts +4 -0
- package/dist/esm/ts-rs/ViewConfig.d.ts +18 -0
- package/dist/esm/ts-rs/ViewWindow.d.ts +9 -9
- package/dist/esm/virtual_server.d.ts +47 -0
- package/dist/esm/virtual_servers/duckdb.d.ts +39 -0
- package/dist/esm/virtual_servers/duckdb.js +12 -0
- package/dist/esm/virtual_servers/duckdb.js.map +7 -0
- package/dist/esm/wasm/browser.d.ts +1 -1
- package/dist/wasm/perspective-js.d.ts +52 -13
- package/dist/wasm/perspective-js.js +680 -399
- package/dist/wasm/perspective-js.wasm +0 -0
- package/dist/wasm/perspective-js.wasm.d.ts +20 -8
- package/package.json +4 -1
- package/src/rust/client.rs +14 -5
- package/src/rust/lib.rs +11 -1
- package/src/rust/table.rs +3 -2
- package/src/rust/table_data.rs +19 -14
- package/src/rust/utils/browser.rs +0 -4
- package/src/rust/utils/console_logger.rs +3 -2
- package/src/rust/utils/errors.rs +10 -28
- package/src/rust/utils/futures.rs +3 -3
- package/src/rust/utils/json.rs +4 -4
- package/src/rust/virtual_server.rs +746 -0
- package/src/ts/perspective-server.worker.ts +33 -23
- package/src/ts/perspective.browser.ts +17 -2
- package/src/ts/perspective.node.ts +46 -11
- package/src/ts/ts-rs/ColumnType.ts +6 -0
- package/src/ts/ts-rs/ViewConfig.ts +8 -0
- package/src/ts/ts-rs/ViewWindow.ts +3 -3
- package/src/ts/virtual_server.ts +126 -0
- package/src/ts/virtual_servers/duckdb.ts +511 -0
- package/src/ts/wasm/browser.ts +17 -9
- package/tsconfig.json +1 -0
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export type * from "../../dist/wasm/perspective-js.d.ts";
|
|
2
|
+
export type * from "./virtual_server.ts";
|
|
2
3
|
import { WebSocketServer as HttpWebSocketServer } from "ws";
|
|
3
4
|
import http from "node:http";
|
|
4
5
|
import * as perspective_client from "../../dist/wasm/perspective-js.js";
|
|
5
6
|
import * as engine from "./wasm/engine.ts";
|
|
7
|
+
import * as virtual_server from "./virtual_server.ts";
|
|
6
8
|
export declare class PerspectiveServer extends engine.PerspectiveServer {
|
|
7
9
|
constructor(options?: engine.PerspectiveServerOptions);
|
|
8
10
|
}
|
|
@@ -27,7 +29,7 @@ export declare class WebSocketServer {
|
|
|
27
29
|
});
|
|
28
30
|
close(): Promise<void>;
|
|
29
31
|
}
|
|
30
|
-
export declare function get_hosted_table_names(): Promise<
|
|
32
|
+
export declare function get_hosted_table_names(): Promise<string[]>;
|
|
31
33
|
export declare function on_hosted_tables_update(cb: () => void): Promise<number>;
|
|
32
34
|
export declare function remove_hosted_tables_update(id: number): Promise<void>;
|
|
33
35
|
export declare function system_info(): Promise<perspective_client.SystemInfo>;
|
|
@@ -47,9 +49,12 @@ export declare function table(init_data: string | ArrayBuffer | Record<string, a
|
|
|
47
49
|
* @returns
|
|
48
50
|
*/
|
|
49
51
|
export declare function websocket(url: string): Promise<perspective_client.Client>;
|
|
52
|
+
export declare function worker(worker: Promise<MessagePort>): Promise<perspective_client.Client>;
|
|
53
|
+
export declare function createMessageHandler(handler: virtual_server.VirtualServerHandler): MessagePort;
|
|
50
54
|
declare const _default: {
|
|
51
55
|
table: typeof table;
|
|
52
56
|
websocket: typeof websocket;
|
|
57
|
+
worker: typeof worker;
|
|
53
58
|
get_hosted_table_names: typeof get_hosted_table_names;
|
|
54
59
|
on_hosted_tables_update: typeof on_hosted_tables_update;
|
|
55
60
|
remove_hosted_tables_update: typeof remove_hosted_tables_update;
|