@perspective-dev/viewer 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-viewer.js +10 -10
- package/dist/cdn/perspective-viewer.js.map +3 -3
- package/dist/custom-elements.json +59 -2
- package/dist/docs/perspective-docs.json +1 -1
- package/dist/esm/bootstrap.d.ts +32 -3
- package/dist/esm/perspective-viewer.d.ts +5 -3
- package/dist/esm/perspective-viewer.js +115 -111
- 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/ViewerConfig.d.ts +14 -10
- 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 +30 -25
- package/dist/wasm/perspective-viewer.js +126 -121
- package/dist/wasm/perspective-viewer.wasm +0 -0
- package/dist/wasm/perspective-viewer.wasm.d.ts +16 -16
- package/package.json +5 -5
- /package/dist/wasm/snippets/{perspective-viewer-941ba6dae7521dbe → perspective-viewer-d50f032e5aa67e6f}/inline0.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-941ba6dae7521dbe → perspective-viewer-d50f032e5aa67e6f}/inline1.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-941ba6dae7521dbe → perspective-viewer-d50f032e5aa67e6f}/inline2.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-941ba6dae7521dbe → perspective-viewer-d50f032e5aa67e6f}/inline3.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-941ba6dae7521dbe → perspective-viewer-d50f032e5aa67e6f}/inline4.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-941ba6dae7521dbe → 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
|
/**
|
|
@@ -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
|
/**
|
|
@@ -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
|
/**
|
|
@@ -1760,19 +1760,24 @@ export class View {
|
|
|
1760
1760
|
*/
|
|
1761
1761
|
on_delete(on_delete: Function): Promise<any>;
|
|
1762
1762
|
/**
|
|
1763
|
-
* Register a callback which is invoked whenever rows
|
|
1764
|
-
*
|
|
1765
|
-
*
|
|
1766
|
-
*
|
|
1767
|
-
*
|
|
1768
|
-
* [`
|
|
1769
|
-
* [`Table
|
|
1770
|
-
* [`Table`]
|
|
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"`.
|
|
1767
|
+
*
|
|
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.
|
|
1771
1776
|
*
|
|
1772
1777
|
* # JavaScript Examples
|
|
1773
1778
|
*
|
|
1774
1779
|
* ```javascript
|
|
1775
|
-
* const id = await view.on_remove(({ indices, port_id }) => {
|
|
1780
|
+
* const id = await view.on_remove(({ indices, port_id, cause }) => {
|
|
1776
1781
|
* replica.remove(indices);
|
|
1777
1782
|
* });
|
|
1778
1783
|
* ```
|
|
@@ -2168,22 +2173,22 @@ export interface InitOutput {
|
|
|
2168
2173
|
readonly virtualdataslice_setStringCol: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
2169
2174
|
readonly virtualserver_handleRequest: (a: number, b: number, c: number) => number;
|
|
2170
2175
|
readonly virtualserver_new: (a: number, b: number) => void;
|
|
2171
|
-
readonly
|
|
2172
|
-
readonly
|
|
2173
|
-
readonly
|
|
2174
|
-
readonly
|
|
2175
|
-
readonly
|
|
2176
|
-
readonly
|
|
2177
|
-
readonly
|
|
2178
|
-
readonly
|
|
2179
|
-
readonly
|
|
2180
|
-
readonly
|
|
2181
|
-
readonly
|
|
2182
|
-
readonly
|
|
2183
|
-
readonly
|
|
2184
|
-
readonly
|
|
2185
|
-
readonly
|
|
2186
|
-
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;
|
|
2187
2192
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
2188
2193
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
2189
2194
|
readonly __wbindgen_export3: (a: number) => void;
|