@perspective-dev/viewer 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-viewer.js +12 -12
- package/dist/cdn/perspective-viewer.js.map +4 -4
- package/dist/css/blueprint.css +1 -1
- package/dist/css/botanical.css +1 -1
- package/dist/css/dracula.css +1 -1
- package/dist/css/eggplant.css +1 -1
- package/dist/css/gruvbox-dark.css +1 -1
- package/dist/css/gruvbox.css +1 -1
- package/dist/css/ledger.css +1 -1
- package/dist/css/monokai.css +1 -1
- package/dist/css/nord.css +1 -1
- package/dist/css/phosphor.css +1 -1
- package/dist/css/pro-dark.css +1 -1
- package/dist/css/pro-light.css +1 -0
- package/dist/css/pro.css +1 -1
- package/dist/css/solarized-dark.css +1 -1
- package/dist/css/solarized.css +1 -1
- package/dist/css/themes.css +1 -1
- package/dist/css/vaporwave.css +1 -1
- package/dist/css/velvet.css +1 -1
- package/dist/custom-elements.json +206 -75
- 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 +150 -143
- package/dist/esm/perspective-viewer.js.map +4 -4
- 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 +74 -61
- package/dist/wasm/perspective-viewer.js +221 -169
- package/dist/wasm/perspective-viewer.wasm +0 -0
- package/dist/wasm/perspective-viewer.wasm.d.ts +16 -16
- package/package.json +6 -6
- /package/dist/wasm/snippets/{perspective-viewer-941ba6dae7521dbe → perspective-viewer-659c02666b5f5853}/inline0.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-941ba6dae7521dbe → perspective-viewer-659c02666b5f5853}/inline1.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-941ba6dae7521dbe → perspective-viewer-659c02666b5f5853}/inline2.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-941ba6dae7521dbe → perspective-viewer-659c02666b5f5853}/inline3.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-941ba6dae7521dbe → perspective-viewer-659c02666b5f5853}/inline4.js +0 -0
- /package/dist/wasm/snippets/{perspective-viewer-941ba6dae7521dbe → perspective-viewer-659c02666b5f5853}/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
|
/**
|
|
@@ -192,6 +192,13 @@ export type * from "../ts-rs/DatetimeFormat.d.ts";
|
|
|
192
192
|
export type * from "../ts-rs/ConfigDefaultsOptions.d.ts";
|
|
193
193
|
export type * from "../ts-rs/ColumnConfigDefaultsOptions.d.ts";
|
|
194
194
|
|
|
195
|
+
export type ExportData =
|
|
196
|
+
| string
|
|
197
|
+
| ArrayBuffer
|
|
198
|
+
| Blob
|
|
199
|
+
| Record<string, unknown[]>
|
|
200
|
+
| ViewerConfig;
|
|
201
|
+
|
|
195
202
|
import type {GetTableOptions} from "../ts-rs/GetTableOptions.d.ts";
|
|
196
203
|
import type {PanelOptions} from "../ts-rs/PanelOptions.d.ts";
|
|
197
204
|
import type {RestoreOptions} from "../ts-rs/RestoreOptions.d.ts";
|
|
@@ -574,9 +581,9 @@ export class GenericSQLVirtualServerModel {
|
|
|
574
581
|
export class PerspectiveDebugPluginElement {
|
|
575
582
|
free(): void;
|
|
576
583
|
[Symbol.dispose](): void;
|
|
577
|
-
clear(): Promise<
|
|
584
|
+
clear(): Promise<void>;
|
|
578
585
|
connectedCallback(): void;
|
|
579
|
-
delete(): Promise<
|
|
586
|
+
delete(): Promise<void>;
|
|
580
587
|
/**
|
|
581
588
|
* # Notes
|
|
582
589
|
*
|
|
@@ -584,9 +591,9 @@ export class PerspectiveDebugPluginElement {
|
|
|
584
591
|
* move. Ergo, if you replace the `&` in the `view` argument, the JS copy
|
|
585
592
|
* of the `View` will be invalid
|
|
586
593
|
*/
|
|
587
|
-
draw(view: View): Promise<
|
|
594
|
+
draw(view: View): Promise<void>;
|
|
588
595
|
constructor(elem: HTMLElement);
|
|
589
|
-
resize(): Promise<
|
|
596
|
+
resize(): Promise<void>;
|
|
590
597
|
restore(_config?: any | null): void;
|
|
591
598
|
restyle(): void;
|
|
592
599
|
save(): any;
|
|
@@ -594,7 +601,7 @@ export class PerspectiveDebugPluginElement {
|
|
|
594
601
|
* Delegates to `draw()` VIRTUALLY — through the JS element's `draw`
|
|
595
602
|
* property, never `self.draw(view)` (Rust static dispatch).
|
|
596
603
|
*/
|
|
597
|
-
update(view: View): Promise<
|
|
604
|
+
update(view: View): Promise<void>;
|
|
598
605
|
readonly config_column_names: any;
|
|
599
606
|
readonly min_config_columns: any;
|
|
600
607
|
readonly name: string;
|
|
@@ -653,7 +660,7 @@ export class PerspectiveViewerElement {
|
|
|
653
660
|
* hosts yet creates the panel empty and pending until the table is
|
|
654
661
|
* created, instead of the default rejection.
|
|
655
662
|
*/
|
|
656
|
-
addPanel(config: ViewerConfigInitial, options?: AddPanelOptions | null): Promise<
|
|
663
|
+
addPanel(config: ViewerConfigInitial, options?: AddPanelOptions | null): Promise<string>;
|
|
657
664
|
/**
|
|
658
665
|
* Configure the embedded LLM agent (see `prompt()`), replacing any prior
|
|
659
666
|
* configuration and conversation.
|
|
@@ -753,7 +760,7 @@ export class PerspectiveViewerElement {
|
|
|
753
760
|
* })
|
|
754
761
|
* ```
|
|
755
762
|
*/
|
|
756
|
-
copy(options?: ExportOptions | null): Promise<
|
|
763
|
+
copy(options?: ExportOptions | null): Promise<void>;
|
|
757
764
|
/**
|
|
758
765
|
* Delete all internal [`View`]s and all associated state, rendering this
|
|
759
766
|
* `<perspective-viewer>` unusable and freeing all associated resources.
|
|
@@ -777,7 +784,7 @@ export class PerspectiveViewerElement {
|
|
|
777
784
|
* await viewer.delete();
|
|
778
785
|
* ```
|
|
779
786
|
*/
|
|
780
|
-
delete(): Promise<
|
|
787
|
+
delete(): Promise<void>;
|
|
781
788
|
/**
|
|
782
789
|
* Download this viewer's internal [`View`] data via a browser download
|
|
783
790
|
* event.
|
|
@@ -794,7 +801,7 @@ export class PerspectiveViewerElement {
|
|
|
794
801
|
* })
|
|
795
802
|
* ```
|
|
796
803
|
*/
|
|
797
|
-
download(options?: ExportOptions | null): Promise<
|
|
804
|
+
download(options?: ExportOptions | null): Promise<void>;
|
|
798
805
|
/**
|
|
799
806
|
* Remove a [`Client`] from this `<perspective-viewer>` and dispose every
|
|
800
807
|
* panel bound to it (each panel's `View` is deleted and its `Table`
|
|
@@ -812,7 +819,7 @@ export class PerspectiveViewerElement {
|
|
|
812
819
|
* await viewer.eject({client: "remote"});
|
|
813
820
|
* ```
|
|
814
821
|
*/
|
|
815
|
-
eject(options?: ClientOptions | null): Promise<
|
|
822
|
+
eject(options?: ClientOptions | null): Promise<void>;
|
|
816
823
|
/**
|
|
817
824
|
* Exports this viewer's internal [`View`] as a JavaSript data, the
|
|
818
825
|
* exact type of which depends on the `method` but defaults to `String`
|
|
@@ -833,7 +840,7 @@ export class PerspectiveViewerElement {
|
|
|
833
840
|
* const data = await viewer.export("plugin");
|
|
834
841
|
* ```
|
|
835
842
|
*/
|
|
836
|
-
export(options?: ExportOptions | null): Promise<
|
|
843
|
+
export(options?: ExportOptions | null): Promise<ExportData>;
|
|
837
844
|
/**
|
|
838
845
|
* Flush any pending modifications to this `<perspective-viewer>`. Since
|
|
839
846
|
* `<perspective-viewer>`'s API is almost entirely `async`, it may take
|
|
@@ -854,7 +861,7 @@ export class PerspectiveViewerElement {
|
|
|
854
861
|
* await viewer.flush();
|
|
855
862
|
* ```
|
|
856
863
|
*/
|
|
857
|
-
flush(): Promise<
|
|
864
|
+
flush(): Promise<void>;
|
|
858
865
|
/**
|
|
859
866
|
* The id of the active panel — the one the settings panel and status-bar
|
|
860
867
|
* toolbar target — or `null` when the element has zero panels.
|
|
@@ -883,7 +890,7 @@ export class PerspectiveViewerElement {
|
|
|
883
890
|
* const client = await viewer.getClient();
|
|
884
891
|
* ```
|
|
885
892
|
*/
|
|
886
|
-
getClient(options?: GetClientOptions | null): Promise<
|
|
893
|
+
getClient(options?: GetClientOptions | null): Promise<Client>;
|
|
887
894
|
/**
|
|
888
895
|
* Get this viewer's edit port for the named panel's [`Table`] (see
|
|
889
896
|
* [`Table::update`] for details on ports), or the active panel when
|
|
@@ -938,8 +945,8 @@ export class PerspectiveViewerElement {
|
|
|
938
945
|
* const table = await viewer.getTable();
|
|
939
946
|
* ```
|
|
940
947
|
*/
|
|
941
|
-
getTable(options?: GetTableOptions | null): Promise<
|
|
942
|
-
getThemes(): Promise<
|
|
948
|
+
getTable(options?: GetTableOptions | null): Promise<Table>;
|
|
949
|
+
getThemes(): Promise<string[]>;
|
|
943
950
|
/**
|
|
944
951
|
* Get a [`View`] for a panel of this viewer, as currently configured by
|
|
945
952
|
* the user.
|
|
@@ -980,7 +987,7 @@ export class PerspectiveViewerElement {
|
|
|
980
987
|
* }
|
|
981
988
|
* ```
|
|
982
989
|
*/
|
|
983
|
-
getView(options?: GetViewOptions | null): Promise<
|
|
990
|
+
getView(options?: GetViewOptions | null): Promise<View>;
|
|
984
991
|
/**
|
|
985
992
|
* Get a copy of the [`ViewConfig`] for the current [`View`]. This is
|
|
986
993
|
* non-blocking as it does not need to access the plugin (unlike
|
|
@@ -988,7 +995,7 @@ export class PerspectiveViewerElement {
|
|
|
988
995
|
* server (unlike [`PerspectiveViewerElement::getView`] followed by
|
|
989
996
|
* [`View::get_config`])
|
|
990
997
|
*/
|
|
991
|
-
getViewConfig(options?: PanelOptions | null): Promise<
|
|
998
|
+
getViewConfig(options?: PanelOptions | null): Promise<ViewConfig>;
|
|
992
999
|
/**
|
|
993
1000
|
* Loads a [`Client`], or optionally [`Table`], or optionally a Javascript
|
|
994
1001
|
* `Promise` which returns a [`Client`] or [`Table`], in this viewer.
|
|
@@ -1065,7 +1072,7 @@ export class PerspectiveViewerElement {
|
|
|
1065
1072
|
* await viewer.load(table);
|
|
1066
1073
|
* ```
|
|
1067
1074
|
*/
|
|
1068
|
-
load(client: Client | Table | Promise<Client | Table>): Promise<
|
|
1075
|
+
load(client: Client | Table | Promise<Client | Table>): Promise<void>;
|
|
1069
1076
|
constructor(elem: HTMLElement);
|
|
1070
1077
|
/**
|
|
1071
1078
|
* Remove the panel with id `name` from the layout, disposing its engines
|
|
@@ -1075,7 +1082,7 @@ export class PerspectiveViewerElement {
|
|
|
1075
1082
|
* error — previously fire-and-forget and silently dropped (invariant
|
|
1076
1083
|
* I6). See also [`Self::addPanel`].
|
|
1077
1084
|
*/
|
|
1078
|
-
removePanel(name: string): Promise<
|
|
1085
|
+
removePanel(name: string): Promise<void>;
|
|
1079
1086
|
/**
|
|
1080
1087
|
* Reset a panel's `ViewerConfig` to its data-relative default.
|
|
1081
1088
|
*
|
|
@@ -1101,13 +1108,13 @@ export class PerspectiveViewerElement {
|
|
|
1101
1108
|
* await viewer.reset(true, {panel: "p1"}); // just "p1", + expressions
|
|
1102
1109
|
* ```
|
|
1103
1110
|
*/
|
|
1104
|
-
reset(reset_all?: boolean | null, options?: PanelOptions | null): Promise<
|
|
1111
|
+
reset(reset_all?: boolean | null, options?: PanelOptions | null): Promise<void>;
|
|
1105
1112
|
/**
|
|
1106
1113
|
* If this element is in an _errored_ state, this method will clear it and
|
|
1107
1114
|
* re-render. Calling this method is equivalent to clicking the error reset
|
|
1108
1115
|
* button in the UI.
|
|
1109
1116
|
*/
|
|
1110
|
-
resetError(): Promise<
|
|
1117
|
+
resetError(): Promise<void>;
|
|
1111
1118
|
/**
|
|
1112
1119
|
* Set the available theme names available in the status bar UI.
|
|
1113
1120
|
*
|
|
@@ -1124,7 +1131,7 @@ export class PerspectiveViewerElement {
|
|
|
1124
1131
|
* viewer.resetThemes(["Pro Light", "Pro Dark"])
|
|
1125
1132
|
* ```
|
|
1126
1133
|
*/
|
|
1127
|
-
resetThemes(themes?: any[] | null): Promise<
|
|
1134
|
+
resetThemes(themes?: any[] | null): Promise<void>;
|
|
1128
1135
|
/**
|
|
1129
1136
|
* Recalculate the viewer's dimensions and redraw.
|
|
1130
1137
|
*
|
|
@@ -1148,7 +1155,7 @@ export class PerspectiveViewerElement {
|
|
|
1148
1155
|
* await viewer.resize({dimensions: {width: 800, height: 600}})
|
|
1149
1156
|
* ```
|
|
1150
1157
|
*/
|
|
1151
|
-
resize(options?: any | null): Promise<
|
|
1158
|
+
resize(options?: any | null): Promise<void>;
|
|
1152
1159
|
/**
|
|
1153
1160
|
* Restore a single panel from a full/partial
|
|
1154
1161
|
* [`perspective_js::JsViewConfig`] (its user-configurable state, including
|
|
@@ -1242,7 +1249,8 @@ export class PerspectiveViewerElement {
|
|
|
1242
1249
|
*
|
|
1243
1250
|
* [`Self::restyleElement`] _must_ be called for many runtime changes to
|
|
1244
1251
|
* CSS properties to be reflected in an already-rendered
|
|
1245
|
-
* `<perspective-viewer
|
|
1252
|
+
* `<perspective-viewer>`, including a `prefers-color-scheme` change
|
|
1253
|
+
* under a preference-aware theme such as `"Pro"`.
|
|
1246
1254
|
*
|
|
1247
1255
|
* </div>
|
|
1248
1256
|
*
|
|
@@ -1253,7 +1261,7 @@ export class PerspectiveViewerElement {
|
|
|
1253
1261
|
* await viewer.restyleElement();
|
|
1254
1262
|
* ```
|
|
1255
1263
|
*/
|
|
1256
|
-
restyleElement(): Promise<
|
|
1264
|
+
restyleElement(): Promise<void>;
|
|
1257
1265
|
/**
|
|
1258
1266
|
* Save a single panel's user-configurable state as a [`ViewerConfig`], one
|
|
1259
1267
|
* which can be restored via [`Self::restore`] — the active panel, or a
|
|
@@ -1308,7 +1316,7 @@ export class PerspectiveViewerElement {
|
|
|
1308
1316
|
* activation-chrome redraws on both sides of the switch have completed
|
|
1309
1317
|
* (invariant I6).
|
|
1310
1318
|
*/
|
|
1311
|
-
setActivePanel(name: string): Promise<
|
|
1319
|
+
setActivePanel(name: string): Promise<void>;
|
|
1312
1320
|
/**
|
|
1313
1321
|
* Sets the auto-pause behavior of this component.
|
|
1314
1322
|
*
|
|
@@ -1330,7 +1338,7 @@ export class PerspectiveViewerElement {
|
|
|
1330
1338
|
* viewer.setAutoPause(false);
|
|
1331
1339
|
* ```
|
|
1332
1340
|
*/
|
|
1333
|
-
setAutoPause(autopause: boolean): Promise<
|
|
1341
|
+
setAutoPause(autopause: boolean): Promise<void>;
|
|
1334
1342
|
/**
|
|
1335
1343
|
* Sets the auto-size behavior of this component.
|
|
1336
1344
|
*
|
|
@@ -1387,7 +1395,7 @@ export class PerspectiveViewerElement {
|
|
|
1387
1395
|
* string}`. The CustomEvent is also fired whenever the user toggles the
|
|
1388
1396
|
* sidebar manually.
|
|
1389
1397
|
*/
|
|
1390
|
-
toggleColumnSettings(column_name: string, options?: PanelOptions | null): Promise<
|
|
1398
|
+
toggleColumnSettings(column_name: string, options?: PanelOptions | null): Promise<void>;
|
|
1391
1399
|
/**
|
|
1392
1400
|
* Toggle (or force) the config panel open/closed.
|
|
1393
1401
|
*
|
|
@@ -1402,7 +1410,7 @@ export class PerspectiveViewerElement {
|
|
|
1402
1410
|
* await viewer.toggleConfig();
|
|
1403
1411
|
* ```
|
|
1404
1412
|
*/
|
|
1405
|
-
toggleConfig(force?: boolean | null): Promise<
|
|
1413
|
+
toggleConfig(force?: boolean | null): Promise<void>;
|
|
1406
1414
|
}
|
|
1407
1415
|
|
|
1408
1416
|
export class ProxySession {
|
|
@@ -1529,7 +1537,7 @@ export class Table {
|
|
|
1529
1537
|
* [`Table::on_delete`] resolves when the subscription message is sent, not
|
|
1530
1538
|
* when the _delete_ event occurs.
|
|
1531
1539
|
*/
|
|
1532
|
-
on_delete(on_delete: Function): Promise<
|
|
1540
|
+
on_delete(on_delete: Function): Promise<number>;
|
|
1533
1541
|
/**
|
|
1534
1542
|
* Removes rows from this [`Table`] with the `index` column values
|
|
1535
1543
|
* supplied.
|
|
@@ -1552,7 +1560,7 @@ export class Table {
|
|
|
1552
1560
|
* Removes a listener with a given ID, as returned by a previous call to
|
|
1553
1561
|
* [`Table::on_delete`].
|
|
1554
1562
|
*/
|
|
1555
|
-
remove_delete(callback_id: number): Promise<
|
|
1563
|
+
remove_delete(callback_id: number): Promise<void>;
|
|
1556
1564
|
/**
|
|
1557
1565
|
* Replace all rows in this [`Table`] with the input data, coerced to this
|
|
1558
1566
|
* [`Table`]'s existing [`perspective_client::Schema`], notifying any
|
|
@@ -1620,7 +1628,7 @@ export class Table {
|
|
|
1620
1628
|
* await table.update("x,y\n1,2");
|
|
1621
1629
|
* ```
|
|
1622
1630
|
*/
|
|
1623
|
-
update(input: string | ArrayBuffer | Record<string, unknown[]> | Record<string, unknown>[] | Record<string, ColumnType>, options?: UpdateOptions | null): Promise<
|
|
1631
|
+
update(input: string | ArrayBuffer | Record<string, unknown[]> | Record<string, unknown>[] | Record<string, ColumnType>, options?: UpdateOptions | null): Promise<void>;
|
|
1624
1632
|
/**
|
|
1625
1633
|
* Validates the given expressions.
|
|
1626
1634
|
*/
|
|
@@ -1758,26 +1766,31 @@ export class View {
|
|
|
1758
1766
|
* Register a callback with this [`View`]. Whenever the [`View`] is
|
|
1759
1767
|
* deleted, this callback will be invoked.
|
|
1760
1768
|
*/
|
|
1761
|
-
on_delete(on_delete: Function): Promise<
|
|
1769
|
+
on_delete(on_delete: Function): Promise<number>;
|
|
1762
1770
|
/**
|
|
1763
|
-
* Register a callback which is invoked whenever rows
|
|
1764
|
-
*
|
|
1765
|
-
*
|
|
1766
|
-
*
|
|
1771
|
+
* Register a callback which is invoked whenever rows leave this
|
|
1772
|
+
* [`View`], with an object containing `port_id`, `indices` (their keys
|
|
1773
|
+
* as an Arrow of one column per key column named after it) and `cause`,
|
|
1774
|
+
* one of `"key"`, `"filter"` or `"group"`.
|
|
1767
1775
|
*
|
|
1768
|
-
* [`
|
|
1769
|
-
* [`Table
|
|
1770
|
-
* [`Table`]
|
|
1776
|
+
* For a [`View`] without `group_by` the keys are the `index` columns of
|
|
1777
|
+
* the [`Table`], which must have one: `"key"` when [`Table::remove`]
|
|
1778
|
+
* removed them ([`Table::replace`] reports the keys it does not
|
|
1779
|
+
* re-supply and [`Table::clear`] every key) and `"filter"` when
|
|
1780
|
+
* [`Table::update`] moved them outside the [`View`]'s `filter`. For a
|
|
1781
|
+
* [`View`] with `group_by` the keys are the `group_by` columns of each
|
|
1782
|
+
* group which no longer has any rows, `"group"`, `null` below the
|
|
1783
|
+
* group's depth. It fires once per cause per update step.
|
|
1771
1784
|
*
|
|
1772
1785
|
* # JavaScript Examples
|
|
1773
1786
|
*
|
|
1774
1787
|
* ```javascript
|
|
1775
|
-
* const id = await view.on_remove(({ indices, port_id }) => {
|
|
1788
|
+
* const id = await view.on_remove(({ indices, port_id, cause }) => {
|
|
1776
1789
|
* replica.remove(indices);
|
|
1777
1790
|
* });
|
|
1778
1791
|
* ```
|
|
1779
1792
|
*/
|
|
1780
|
-
on_remove(on_remove_js: (data: OnRemoveData) => void): Promise<
|
|
1793
|
+
on_remove(on_remove_js: (data: OnRemoveData) => void): Promise<number>;
|
|
1781
1794
|
/**
|
|
1782
1795
|
* Register a callback with this [`View`]. Whenever the view's underlying
|
|
1783
1796
|
* table emits an update, this callback will be invoked with an object
|
|
@@ -1804,11 +1817,11 @@ export class View {
|
|
|
1804
1817
|
* view.on_update((updated) => console.log(updated.delta), { mode: "row" });
|
|
1805
1818
|
* ```
|
|
1806
1819
|
*/
|
|
1807
|
-
on_update(on_update_js: (data: OnUpdateData) => void, options?: OnUpdateOptions | null): Promise<
|
|
1820
|
+
on_update(on_update_js: (data: OnUpdateData) => void, options?: OnUpdateOptions | null): Promise<number>;
|
|
1808
1821
|
/**
|
|
1809
1822
|
* Unregister a previously registered [`View::on_delete`] callback.
|
|
1810
1823
|
*/
|
|
1811
|
-
remove_delete(callback_id: number): Promise<
|
|
1824
|
+
remove_delete(callback_id: number): Promise<void>;
|
|
1812
1825
|
/**
|
|
1813
1826
|
* Unregister a previously registered [`View::on_remove`] callback.
|
|
1814
1827
|
*
|
|
@@ -1920,7 +1933,7 @@ export class VirtualDataSlice {
|
|
|
1920
1933
|
export class VirtualServer {
|
|
1921
1934
|
free(): void;
|
|
1922
1935
|
[Symbol.dispose](): void;
|
|
1923
|
-
handleRequest(bytes: Uint8Array): Promise<
|
|
1936
|
+
handleRequest(bytes: Uint8Array): Promise<Uint8Array>;
|
|
1924
1937
|
constructor(handler: VirtualServerHandler);
|
|
1925
1938
|
}
|
|
1926
1939
|
|
|
@@ -2168,22 +2181,22 @@ export interface InitOutput {
|
|
|
2168
2181
|
readonly virtualdataslice_setStringCol: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
2169
2182
|
readonly virtualserver_handleRequest: (a: number, b: number, c: number) => number;
|
|
2170
2183
|
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
|
|
2184
|
+
readonly __wasm_bindgen_func_elem_7566: (a: number, b: number) => void;
|
|
2185
|
+
readonly __wasm_bindgen_func_elem_20655: (a: number, b: number) => void;
|
|
2186
|
+
readonly __wasm_bindgen_func_elem_21269: (a: number, b: number) => void;
|
|
2187
|
+
readonly __wasm_bindgen_func_elem_22680: (a: number, b: number) => void;
|
|
2188
|
+
readonly __wasm_bindgen_func_elem_27384: (a: number, b: number) => void;
|
|
2189
|
+
readonly __wasm_bindgen_func_elem_36185: (a: number, b: number, c: number, d: number) => void;
|
|
2190
|
+
readonly __wasm_bindgen_func_elem_8643: (a: number, b: number, c: number) => void;
|
|
2191
|
+
readonly __wasm_bindgen_func_elem_8644: (a: number, b: number, c: number) => void;
|
|
2192
|
+
readonly __wasm_bindgen_func_elem_8645: (a: number, b: number, c: number) => void;
|
|
2193
|
+
readonly __wasm_bindgen_func_elem_8641: (a: number, b: number, c: number) => void;
|
|
2194
|
+
readonly __wasm_bindgen_func_elem_20678: (a: number, b: number, c: number) => void;
|
|
2195
|
+
readonly __wasm_bindgen_func_elem_21273: (a: number, b: number, c: number) => void;
|
|
2196
|
+
readonly __wasm_bindgen_func_elem_27386: (a: number, b: number, c: number) => void;
|
|
2197
|
+
readonly __wasm_bindgen_func_elem_23327: (a: number, b: number) => number;
|
|
2198
|
+
readonly __wasm_bindgen_func_elem_21272: (a: number, b: number) => void;
|
|
2199
|
+
readonly __wasm_bindgen_func_elem_23328: (a: number, b: number) => void;
|
|
2187
2200
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
2188
2201
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
2189
2202
|
readonly __wbindgen_export3: (a: number) => void;
|