@perspective-dev/viewer 5.7.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-viewer.js +10 -10
- package/dist/cdn/perspective-viewer.js.map +4 -4
- package/dist/custom-elements.json +60 -3
- package/dist/docs/perspective-docs.json +1 -1
- package/dist/esm/bootstrap.d.ts +33 -4
- package/dist/esm/perspective-viewer.d.ts +5 -3
- package/dist/esm/perspective-viewer.js +124 -120
- package/dist/esm/perspective-viewer.js.map +3 -3
- package/dist/ts-rs/Layout.d.ts +1 -1
- package/dist/ts-rs/OptionalUpdate.d.ts +4 -0
- package/dist/ts-rs/PanelViewerConfig.d.ts +3 -3
- package/dist/ts-rs/SplitLayout.d.ts +2 -1
- package/dist/ts-rs/ViewOnUpdateResp.d.ts +1 -1
- package/dist/ts-rs/ViewerConfig.d.ts +14 -10
- package/dist/ts-rs/ViewerConfigInitial.d.ts +2 -2
- package/dist/ts-rs/ViewerConfigUpdate.d.ts +4 -0
- package/dist/ts-rs/WorkspaceConfig.d.ts +16 -2
- package/dist/ts-rs/WorkspaceConfigUpdate.d.ts +7 -6
- package/dist/wasm/perspective-viewer.d.ts +44 -28
- package/dist/wasm/perspective-viewer.js +187 -129
- package/dist/wasm/perspective-viewer.wasm +0 -0
- package/dist/wasm/perspective-viewer.wasm.d.ts +20 -18
- package/package.json +5 -5
- /package/dist/wasm/snippets/{perspective-viewer-c26bfdc60d367a99 → perspective-viewer-d50f032e5aa67e6f}/inline0.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-c26bfdc60d367a99 → perspective-viewer-d50f032e5aa67e6f}/inline1.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-c26bfdc60d367a99 → perspective-viewer-d50f032e5aa67e6f}/inline2.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-c26bfdc60d367a99 → perspective-viewer-d50f032e5aa67e6f}/inline3.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-c26bfdc60d367a99 → perspective-viewer-d50f032e5aa67e6f}/inline4.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-c26bfdc60d367a99 → perspective-viewer-d50f032e5aa67e6f}/inline5.js +0 -0
package/dist/ts-rs/Layout.d.ts
CHANGED
|
@@ -4,6 +4,6 @@ import type { TabLayout } from "./TabLayout.d.ts";
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* A dashboard's panel arrangement: nested splits whose leaves are tab stacks
|
|
7
|
-
* of panel ids, naming
|
|
7
|
+
* of panel ids, naming each panel at most once.
|
|
8
8
|
*/
|
|
9
9
|
export type Layout = { "type": "split-layout" } & SplitLayout | { "type": "tab-layout" } & TabLayout;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* One field of a field-wise update: absent leaves the field unchanged,
|
|
5
|
+
* `null` resets it to its default and a value replaces it.
|
|
6
|
+
*/
|
|
3
7
|
export type OptionalUpdate<T> = null | T;
|
|
@@ -46,9 +46,9 @@ plugin: string,
|
|
|
46
46
|
plugin_config: { [key in string]?: JsonValue },
|
|
47
47
|
/**
|
|
48
48
|
* The `Table` this panel renders: its hosted name in a
|
|
49
|
-
* [`WorkspaceConfig`] `panels` entry
|
|
50
|
-
* [`TableRef`] — a name, or a recursively inlined
|
|
51
|
-
* definition — in the single-panel `save()` format.
|
|
49
|
+
* [`WorkspaceConfig`](super::WorkspaceConfig) `panels` entry
|
|
50
|
+
* (`T = String`), and a [`TableRef`] — a name, or a recursively inlined
|
|
51
|
+
* derived-table definition — in the single-panel `save()` format.
|
|
52
52
|
*/
|
|
53
53
|
table: T,
|
|
54
54
|
/**
|
|
@@ -11,7 +11,8 @@ export type SplitLayout = {
|
|
|
11
11
|
*/
|
|
12
12
|
children: Array<Layout>,
|
|
13
13
|
/**
|
|
14
|
-
* Each child's
|
|
14
|
+
* Each child's share of the split, one per child, as a proportion of
|
|
15
|
+
* their total.
|
|
15
16
|
*/
|
|
16
17
|
sizes: Array<number>,
|
|
17
18
|
/**
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
2
2
|
|
|
3
|
-
export type ViewOnUpdateResp = { delta: Uint8Array | undefined, port_id: number, };
|
|
3
|
+
export type ViewOnUpdateResp = { delta: Uint8Array | undefined, port_id: number, reset: boolean, };
|
|
@@ -11,14 +11,18 @@ import type { Windows } from "./Windows.d.ts";
|
|
|
11
11
|
import type { JsonValue } from "./serde_json/JsonValue.d.ts";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* The state of an entire
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
14
|
+
* The state of an entire `<perspective-viewer>` element and its plugin: the
|
|
15
|
+
* element-level `settings` flag plus the per-panel [`PanelViewerConfig`].
|
|
16
|
+
* The split exists so the workspace config format can serialize panel
|
|
17
|
+
* entries *without* a `settings` key (it is element-level state there,
|
|
18
|
+
* carried by the top-level `active` field instead), while the single-panel
|
|
19
|
+
* format flattens back to the legacy shape.
|
|
20
20
|
*/
|
|
21
|
-
export type ViewerConfig<V = string, T = TableRef> = {
|
|
21
|
+
export type ViewerConfig<V = string, T = TableRef> = {
|
|
22
|
+
/**
|
|
23
|
+
* Whether the settings sidebar is open.
|
|
24
|
+
*/
|
|
25
|
+
settings: boolean,
|
|
22
26
|
/**
|
|
23
27
|
* The `@perspective-dev/viewer` version that wrote this config,
|
|
24
28
|
* stamped on save and named in the error when such a config is rejected.
|
|
@@ -49,9 +53,9 @@ plugin: string,
|
|
|
49
53
|
plugin_config: { [key in string]?: JsonValue },
|
|
50
54
|
/**
|
|
51
55
|
* The `Table` this panel renders: its hosted name in a
|
|
52
|
-
* [`WorkspaceConfig`] `panels` entry
|
|
53
|
-
* [`TableRef`] — a name, or a recursively inlined
|
|
54
|
-
* definition — in the single-panel `save()` format.
|
|
56
|
+
* [`WorkspaceConfig`](super::WorkspaceConfig) `panels` entry
|
|
57
|
+
* (`T = String`), and a [`TableRef`] — a name, or a recursively inlined
|
|
58
|
+
* derived-table definition — in the single-panel `save()` format.
|
|
55
59
|
*/
|
|
56
60
|
table: T,
|
|
57
61
|
/**
|
|
@@ -42,13 +42,13 @@ plugin?: string,
|
|
|
42
42
|
/**
|
|
43
43
|
* Panel title, shown in its tab. Absent renders the default title.
|
|
44
44
|
*/
|
|
45
|
-
title?: string,
|
|
45
|
+
title?: string | null,
|
|
46
46
|
/**
|
|
47
47
|
* Theme NAME (e.g. `"Pro Dark"`) — not a CSS value. Valid names are
|
|
48
48
|
* the Perspective themes loaded on the page. Absent uses the
|
|
49
49
|
* default.
|
|
50
50
|
*/
|
|
51
|
-
theme?: string,
|
|
51
|
+
theme?: string | null,
|
|
52
52
|
/**
|
|
53
53
|
* Plugin-wide settings (as opposed to the per-column
|
|
54
54
|
* [`Self::columns_config`]). Opaque to the viewer and defined by
|
|
@@ -11,6 +11,10 @@ import type { TableRef } from "./TableRef.d.ts";
|
|
|
11
11
|
import type { Windows } from "./Windows.d.ts";
|
|
12
12
|
import type { JsonValue } from "./serde_json/JsonValue.d.ts";
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* The `restore()` argument: a field-wise update of a panel's state, where an
|
|
16
|
+
* absent key is unchanged, `null` resets and a value replaces.
|
|
17
|
+
*/
|
|
14
18
|
export type ViewerConfigUpdate = {
|
|
15
19
|
/**
|
|
16
20
|
* The `@perspective-dev/viewer` version a saved config was written
|
|
@@ -7,14 +7,28 @@ import type { PanelViewerConfig } from "./PanelViewerConfig.d.ts";
|
|
|
7
7
|
/**
|
|
8
8
|
* The workspace config format (`{version, active?, layout, panels}`) —
|
|
9
9
|
* the multi-panel counterpart of the single-panel [`ViewerConfig`] — as
|
|
10
|
-
* emitted by
|
|
10
|
+
* emitted by `saveWorkspace()`.
|
|
11
11
|
*
|
|
12
12
|
* - `panels` entries are [`PanelViewerConfig`]s: per-panel state only, no
|
|
13
13
|
* `settings` key (element-level state).
|
|
14
14
|
* - `active` names the panel targeted by the *open* settings sidebar; it is
|
|
15
15
|
* omitted when the sidebar is closed.
|
|
16
|
+
*
|
|
17
|
+
* [`ViewerConfig`]: super::ViewerConfig
|
|
18
|
+
*/
|
|
19
|
+
export type WorkspaceConfig = {
|
|
20
|
+
/**
|
|
21
|
+
* The `@perspective-dev/viewer` version that wrote this workspace.
|
|
22
|
+
*/
|
|
23
|
+
version: string,
|
|
24
|
+
/**
|
|
25
|
+
* The panel targeted by the open settings sidebar.
|
|
26
|
+
*/
|
|
27
|
+
active?: string,
|
|
28
|
+
/**
|
|
29
|
+
* The panel arrangement.
|
|
16
30
|
*/
|
|
17
|
-
|
|
31
|
+
layout: Layout | null,
|
|
18
32
|
/**
|
|
19
33
|
* `BTreeMap` (not `HashMap`) so `save()` serializes panels in a
|
|
20
34
|
* DETERMINISTIC (sorted) key order — a fresh `HashMap` per call
|
|
@@ -6,10 +6,11 @@ import type { OptionalUpdate } from "./OptionalUpdate.d.ts";
|
|
|
6
6
|
import type { ViewerConfigInitial } from "./ViewerConfigInitial.d.ts";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* The
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* The `restoreWorkspace()` argument: a field-wise update of the element's
|
|
10
|
+
* workspace state, like [`ViewerConfigUpdate`] for a panel, where an absent
|
|
11
|
+
* key is unchanged, `null` resets and a value replaces.
|
|
12
|
+
*
|
|
13
|
+
* [`ViewerConfigUpdate`]: super::ViewerConfigUpdate
|
|
13
14
|
*/
|
|
14
15
|
export type WorkspaceConfigUpdate = {
|
|
15
16
|
/**
|
|
@@ -23,8 +24,8 @@ version?: string,
|
|
|
23
24
|
*/
|
|
24
25
|
active?: OptionalUpdate<string>,
|
|
25
26
|
/**
|
|
26
|
-
* The layout tree to stage, naming
|
|
27
|
-
*
|
|
27
|
+
* The layout tree to stage, naming `panels` keys (or, without `panels`,
|
|
28
|
+
* existing panel ids) at most once; a panel it omits is dropped.
|
|
28
29
|
*/
|
|
29
30
|
layout?: Layout,
|
|
30
31
|
/**
|
|
@@ -481,18 +481,27 @@ export class GenericSQLVirtualServerModel {
|
|
|
481
481
|
* Creates a new `JsDuckDBSqlBuilder` instance.
|
|
482
482
|
*/
|
|
483
483
|
constructor(args?: any | null);
|
|
484
|
+
/**
|
|
485
|
+
* Returns the SQL relation reference for an entity id.
|
|
486
|
+
*/
|
|
487
|
+
quoteEntity(entity_id: string): string;
|
|
484
488
|
/**
|
|
485
489
|
* Returns the SQL query that plans the view `config` would build and
|
|
486
490
|
* reports its result columns without materializing it (`split_by` folded
|
|
487
491
|
* into `group_by`, no `PIVOT`), or `undefined` when the config selects no
|
|
488
492
|
* columns.
|
|
489
493
|
*/
|
|
490
|
-
tableDescribe(table_id: string, config: any, schema: any): string;
|
|
494
|
+
tableDescribe(table_id: string, config: any, schema: any, unordered?: boolean | null): string;
|
|
491
495
|
/**
|
|
492
496
|
* Returns the SQL query to create a view from a table with the given
|
|
493
497
|
* configuration.
|
|
494
498
|
*/
|
|
495
|
-
tableMakeView(table_id: string, view_id: string, config: any, schema: any): string;
|
|
499
|
+
tableMakeView(table_id: string, view_id: string, config: any, schema: any, unordered?: boolean | null): string;
|
|
500
|
+
/**
|
|
501
|
+
* Returns the entity id of the hosted table at relation path `parts`,
|
|
502
|
+
* each part quoted only when it is not a bare identifier.
|
|
503
|
+
*/
|
|
504
|
+
tablePath(parts: string[]): string;
|
|
496
505
|
/**
|
|
497
506
|
* Returns the SQL query to describe a table's schema.
|
|
498
507
|
*/
|
|
@@ -1751,19 +1760,24 @@ export class View {
|
|
|
1751
1760
|
*/
|
|
1752
1761
|
on_delete(on_delete: Function): Promise<any>;
|
|
1753
1762
|
/**
|
|
1754
|
-
* Register a callback which is invoked whenever rows
|
|
1755
|
-
*
|
|
1756
|
-
*
|
|
1757
|
-
*
|
|
1763
|
+
* Register a callback which is invoked whenever rows leave this
|
|
1764
|
+
* [`View`], with an object containing `port_id`, `indices` (their keys
|
|
1765
|
+
* as an Arrow of one column per key column named after it) and `cause`,
|
|
1766
|
+
* one of `"key"`, `"filter"` or `"group"`.
|
|
1758
1767
|
*
|
|
1759
|
-
* [`
|
|
1760
|
-
* [`Table
|
|
1761
|
-
* [`Table`]
|
|
1768
|
+
* For a [`View`] without `group_by` the keys are the `index` columns of
|
|
1769
|
+
* the [`Table`], which must have one: `"key"` when [`Table::remove`]
|
|
1770
|
+
* removed them ([`Table::replace`] reports the keys it does not
|
|
1771
|
+
* re-supply and [`Table::clear`] every key) and `"filter"` when
|
|
1772
|
+
* [`Table::update`] moved them outside the [`View`]'s `filter`. For a
|
|
1773
|
+
* [`View`] with `group_by` the keys are the `group_by` columns of each
|
|
1774
|
+
* group which no longer has any rows, `"group"`, `null` below the
|
|
1775
|
+
* group's depth. It fires once per cause per update step.
|
|
1762
1776
|
*
|
|
1763
1777
|
* # JavaScript Examples
|
|
1764
1778
|
*
|
|
1765
1779
|
* ```javascript
|
|
1766
|
-
* const id = await view.on_remove(({ indices, port_id }) => {
|
|
1780
|
+
* const id = await view.on_remove(({ indices, port_id, cause }) => {
|
|
1767
1781
|
* replica.remove(indices);
|
|
1768
1782
|
* });
|
|
1769
1783
|
* ```
|
|
@@ -2082,8 +2096,10 @@ export interface InitOutput {
|
|
|
2082
2096
|
readonly genericsqlvirtualservermodel_expressionsDescribe: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
2083
2097
|
readonly genericsqlvirtualservermodel_getHostedTables: (a: number, b: number) => void;
|
|
2084
2098
|
readonly genericsqlvirtualservermodel_new: (a: number, b: number) => void;
|
|
2085
|
-
readonly
|
|
2086
|
-
readonly
|
|
2099
|
+
readonly genericsqlvirtualservermodel_quoteEntity: (a: number, b: number, c: number, d: number) => void;
|
|
2100
|
+
readonly genericsqlvirtualservermodel_tableDescribe: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
2101
|
+
readonly genericsqlvirtualservermodel_tableMakeView: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
2102
|
+
readonly genericsqlvirtualservermodel_tablePath: (a: number, b: number, c: number, d: number) => void;
|
|
2087
2103
|
readonly genericsqlvirtualservermodel_tableSchema: (a: number, b: number, c: number, d: number) => void;
|
|
2088
2104
|
readonly genericsqlvirtualservermodel_tableSize: (a: number, b: number, c: number, d: number) => void;
|
|
2089
2105
|
readonly genericsqlvirtualservermodel_viewCollapse: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
@@ -2157,22 +2173,22 @@ export interface InitOutput {
|
|
|
2157
2173
|
readonly virtualdataslice_setStringCol: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
2158
2174
|
readonly virtualserver_handleRequest: (a: number, b: number, c: number) => number;
|
|
2159
2175
|
readonly virtualserver_new: (a: number, b: number) => void;
|
|
2160
|
-
readonly
|
|
2161
|
-
readonly
|
|
2162
|
-
readonly
|
|
2163
|
-
readonly
|
|
2164
|
-
readonly
|
|
2165
|
-
readonly
|
|
2166
|
-
readonly
|
|
2167
|
-
readonly
|
|
2168
|
-
readonly
|
|
2169
|
-
readonly
|
|
2170
|
-
readonly
|
|
2171
|
-
readonly
|
|
2172
|
-
readonly
|
|
2173
|
-
readonly
|
|
2174
|
-
readonly
|
|
2175
|
-
readonly
|
|
2176
|
+
readonly __wasm_bindgen_func_elem_20596: (a: number, b: number) => void;
|
|
2177
|
+
readonly __wasm_bindgen_func_elem_7550: (a: number, b: number) => void;
|
|
2178
|
+
readonly __wasm_bindgen_func_elem_21211: (a: number, b: number) => void;
|
|
2179
|
+
readonly __wasm_bindgen_func_elem_22623: (a: number, b: number) => void;
|
|
2180
|
+
readonly __wasm_bindgen_func_elem_27298: (a: number, b: number) => void;
|
|
2181
|
+
readonly __wasm_bindgen_func_elem_36104: (a: number, b: number, c: number, d: number) => void;
|
|
2182
|
+
readonly __wasm_bindgen_func_elem_20619: (a: number, b: number, c: number) => void;
|
|
2183
|
+
readonly __wasm_bindgen_func_elem_8627: (a: number, b: number, c: number) => void;
|
|
2184
|
+
readonly __wasm_bindgen_func_elem_8628: (a: number, b: number, c: number) => void;
|
|
2185
|
+
readonly __wasm_bindgen_func_elem_8629: (a: number, b: number, c: number) => void;
|
|
2186
|
+
readonly __wasm_bindgen_func_elem_8625: (a: number, b: number, c: number) => void;
|
|
2187
|
+
readonly __wasm_bindgen_func_elem_21215: (a: number, b: number, c: number) => void;
|
|
2188
|
+
readonly __wasm_bindgen_func_elem_27300: (a: number, b: number, c: number) => void;
|
|
2189
|
+
readonly __wasm_bindgen_func_elem_23270: (a: number, b: number) => number;
|
|
2190
|
+
readonly __wasm_bindgen_func_elem_21214: (a: number, b: number) => void;
|
|
2191
|
+
readonly __wasm_bindgen_func_elem_23271: (a: number, b: number) => void;
|
|
2176
2192
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
2177
2193
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
2178
2194
|
readonly __wbindgen_export3: (a: number) => void;
|