@perspective-dev/viewer 5.4.0 → 5.5.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.
Files changed (142) hide show
  1. package/dist/cdn/perspective-viewer.js +4 -4
  2. package/dist/cdn/perspective-viewer.js.map +2 -2
  3. package/dist/css/blueprint.css +1 -1
  4. package/dist/css/botanical.css +1 -1
  5. package/dist/css/dracula.css +1 -1
  6. package/dist/css/eggplant.css +1 -1
  7. package/dist/css/gruvbox-dark.css +1 -1
  8. package/dist/css/gruvbox.css +1 -1
  9. package/dist/css/icons.css +1 -1
  10. package/dist/css/intl/ar.css +1 -1
  11. package/dist/css/intl/de.css +1 -1
  12. package/dist/css/intl/es.css +1 -1
  13. package/dist/css/intl/fr.css +1 -1
  14. package/dist/css/intl/ja.css +1 -1
  15. package/dist/css/intl/pt.css +1 -1
  16. package/dist/css/intl/zh.css +1 -1
  17. package/dist/css/intl.css +1 -1
  18. package/dist/css/ledger.css +1 -1
  19. package/dist/css/monokai.css +1 -1
  20. package/dist/css/nord.css +1 -1
  21. package/dist/css/phosphor.css +1 -1
  22. package/dist/css/pro-dark.css +1 -1
  23. package/dist/css/pro.css +1 -1
  24. package/dist/css/solarized-dark.css +1 -1
  25. package/dist/css/solarized.css +1 -1
  26. package/dist/css/themes.css +1 -1
  27. package/dist/css/vaporwave.css +1 -1
  28. package/dist/css/velvet.css +1 -1
  29. package/dist/docs/perspective-docs.json +1 -1
  30. package/dist/esm/perspective-viewer.d.ts +2 -0
  31. package/dist/esm/perspective-viewer.inline.js +9 -9
  32. package/dist/esm/perspective-viewer.inline.js.map +3 -3
  33. package/dist/esm/perspective-viewer.js +4 -4
  34. package/dist/esm/perspective-viewer.js.map +2 -2
  35. package/dist/esm/plugin.d.ts +9 -0
  36. package/dist/esm/ts-rs/AddPanelOptions.d.ts +9 -0
  37. package/dist/esm/ts-rs/ExportMethod.d.ts +1 -1
  38. package/dist/esm/ts-rs/GetViewMode.d.ts +4 -0
  39. package/dist/esm/ts-rs/GetViewOptions.d.ts +8 -0
  40. package/dist/esm/ts-rs/RestoreOptions.d.ts +6 -0
  41. package/dist/esm/ts-rs/RestoreWorkspaceOptions.d.ts +9 -0
  42. package/dist/esm/ts-rs/WorkspaceConfigUpdate.d.ts +30 -22
  43. package/dist/wasm/perspective-viewer.d.ts +102 -47
  44. package/dist/wasm/perspective-viewer.js +233 -142
  45. package/dist/wasm/perspective-viewer.wasm +0 -0
  46. package/dist/wasm/perspective-viewer.wasm.d.ts +18 -18
  47. package/package.json +7 -7
  48. package/src/css/column-selector.css +11 -3
  49. package/src/css/column-style.css +162 -0
  50. package/src/css/config-selector.css +1 -1
  51. package/src/css/form/debug.css +9 -0
  52. package/src/css/status-bar.css +11 -0
  53. package/src/css/ui/containers/tabs.css +2 -1
  54. package/src/rust/agent/tools.rs +80 -7
  55. package/src/rust/components/column_selector/active_column.rs +9 -0
  56. package/src/rust/components/column_selector.rs +11 -0
  57. package/src/rust/components/column_settings_sidebar/style_tab/alignment_field.rs +90 -0
  58. package/src/rust/components/column_settings_sidebar/style_tab/font_field.rs +267 -0
  59. package/src/rust/components/column_settings_sidebar/style_tab/primitive_field.rs +1 -1
  60. package/src/rust/components/column_settings_sidebar/style_tab.rs +68 -9
  61. package/src/rust/components/debug_panel.rs +107 -50
  62. package/src/rust/components/export_dropdown.rs +6 -0
  63. package/src/rust/components/main_panel/msg.rs +4 -0
  64. package/src/rust/components/main_panel.rs +14 -0
  65. package/src/rust/components/mod.rs +0 -1
  66. package/src/rust/components/plugin_tab.rs +57 -3
  67. package/src/rust/components/settings_panel.rs +6 -0
  68. package/src/rust/components/status_bar.rs +12 -3
  69. package/src/rust/components/status_indicator.rs +4 -0
  70. package/src/rust/components/viewer/filters.rs +2 -2
  71. package/src/rust/components/viewer/msg.rs +4 -0
  72. package/src/rust/components/viewer/panels.rs +6 -3
  73. package/src/rust/components/viewer/render.rs +1 -0
  74. package/src/rust/components/viewer/wiring.rs +14 -2
  75. package/src/rust/components/viewer.rs +2 -2
  76. package/src/rust/config/column_config_schema.rs +312 -8
  77. package/src/rust/config/datetime_column_style.rs +0 -11
  78. package/src/rust/config/export_method.rs +24 -0
  79. package/src/rust/config/mod.rs +0 -2
  80. package/src/rust/config/options.rs +50 -0
  81. package/src/rust/config/workspace_config.rs +69 -24
  82. package/src/rust/custom_elements/viewer.rs +214 -113
  83. package/src/rust/js/plugin.rs +3 -1
  84. package/src/rust/lib.rs +7 -3
  85. package/src/rust/queries/plugin_column_styles.rs +6 -5
  86. package/src/rust/renderer/plugin_config.rs +200 -41
  87. package/src/rust/renderer/plugin_store.rs +2 -1
  88. package/src/rust/renderer/props.rs +5 -0
  89. package/src/rust/renderer.rs +9 -0
  90. package/src/rust/session/metadata.rs +5 -10
  91. package/src/rust/session/props.rs +4 -0
  92. package/src/rust/session.rs +273 -195
  93. package/src/rust/tasks/copy_export.rs +67 -0
  94. package/src/rust/tasks/create_panel.rs +16 -13
  95. package/src/rust/tasks/pipeline.rs +26 -8
  96. package/src/rust/tasks/restore_panel.rs +129 -30
  97. package/src/rust/tasks/send_column_config.rs +3 -0
  98. package/src/rust/tasks/sync_update_panels.rs +148 -68
  99. package/src/rust/tasks/table_lifecycle.rs +7 -1
  100. package/src/rust/ui/containers/tab_list.rs +1 -1
  101. package/src/rust/ui/form/intl_label.rs +4 -23
  102. package/src/rust/ui/portal.rs +1 -0
  103. package/src/rust/utils/css_vars.rs +13 -0
  104. package/src/rust/{config/datetime_column_style/color_mode.rs → utils/in_flight.rs} +47 -35
  105. package/src/rust/utils/local_fonts.rs +395 -0
  106. package/src/rust/utils/mod.rs +4 -0
  107. package/src/rust/utils/pending_effects.rs +6 -30
  108. package/src/rust/workspace.rs +12 -0
  109. package/src/svg/status_pending.svg +3 -0
  110. package/src/themes/icons.css +1 -0
  111. package/src/themes/intl/ar.css +20 -7
  112. package/src/themes/intl/de.css +20 -7
  113. package/src/themes/intl/es.css +20 -7
  114. package/src/themes/intl/fr.css +20 -7
  115. package/src/themes/intl/ja.css +20 -7
  116. package/src/themes/intl/pt.css +20 -7
  117. package/src/themes/intl/zh.css +20 -7
  118. package/src/themes/intl.css +20 -7
  119. package/src/themes/monokai.css +1 -1
  120. package/src/themes/vaporwave.css +1 -1
  121. package/src/ts/perspective-viewer.ts +2 -0
  122. package/src/ts/plugin.ts +9 -0
  123. package/src/ts/ts-rs/AddPanelOptions.ts +10 -0
  124. package/src/ts/ts-rs/ExportMethod.ts +1 -1
  125. package/src/ts/ts-rs/{DatetimeColorMode.ts → GetViewMode.ts} +4 -1
  126. package/src/ts/ts-rs/GetViewOptions.ts +7 -0
  127. package/src/ts/ts-rs/RestoreOptions.ts +7 -1
  128. package/src/ts/ts-rs/RestoreWorkspaceOptions.ts +10 -0
  129. package/src/ts/ts-rs/WorkspaceConfigUpdate.ts +31 -20
  130. package/dist/esm/ts-rs/DatetimeColorMode.d.ts +0 -1
  131. package/dist/esm/ts-rs/FormatMode.d.ts +0 -1
  132. package/dist/esm/ts-rs/StringColorMode.d.ts +0 -1
  133. package/src/rust/components/string_column_style.rs +0 -120
  134. package/src/rust/config/string_column_style.rs +0 -135
  135. package/src/ts/ts-rs/FormatMode.ts +0 -3
  136. package/src/ts/ts-rs/StringColorMode.ts +0 -3
  137. /package/dist/wasm/snippets/{perspective-viewer-adc6f3f79141112b → perspective-viewer-6813b568219c6763}/inline0.js +0 -0
  138. /package/dist/wasm/snippets/{perspective-viewer-adc6f3f79141112b → perspective-viewer-6813b568219c6763}/inline1.js +0 -0
  139. /package/dist/wasm/snippets/{perspective-viewer-adc6f3f79141112b → perspective-viewer-6813b568219c6763}/inline2.js +0 -0
  140. /package/dist/wasm/snippets/{perspective-viewer-adc6f3f79141112b → perspective-viewer-6813b568219c6763}/inline3.js +0 -0
  141. /package/dist/wasm/snippets/{perspective-viewer-adc6f3f79141112b → perspective-viewer-6813b568219c6763}/inline4.js +0 -0
  142. /package/dist/wasm/snippets/{perspective-viewer-adc6f3f79141112b → perspective-viewer-6813b568219c6763}/inline5.js +0 -0
@@ -88,6 +88,15 @@ export interface IPerspectiveViewerPlugin {
88
88
  kind: string;
89
89
  }>;
90
90
  };
91
+ /**
92
+ * The plugin-level settings schema as it applies to `current_value`, the
93
+ * `plugin_config` state the schema should describe.
94
+ */
95
+ plugin_config_schema?(view_config?: Record<string, unknown>, current_value?: Record<string, unknown> | null): {
96
+ fields: Array<Record<string, unknown> & {
97
+ kind: string;
98
+ }>;
99
+ };
91
100
  /**
92
101
  * Render this plugin using the provided `View`. While there is no
93
102
  * provision to cancel a render in progress per se, calling a method on
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Options for the `addPanel()` method.
3
+ */
4
+ export type AddPanelOptions = {
5
+ /**
6
+ * As `RestoreOptions::wait_for_table`.
7
+ */
8
+ wait_for_table?: boolean;
9
+ };
@@ -1 +1 @@
1
- export type ExportMethod = "csv" | "csv-all" | "csv-selected" | "json" | "json-all" | "json-selected" | "ndjson" | "ndjson-all" | "ndjson-selected" | "html" | "plugin" | "arrow" | "arrow-selected" | "arrow-all" | "json-config";
1
+ export type ExportMethod = "csv" | "csv-all" | "csv-selected" | "json" | "json-all" | "json-selected" | "ndjson" | "ndjson-all" | "ndjson-selected" | "html" | "plugin" | "arrow" | "arrow-selected" | "arrow-all" | "arrow-lz4" | "arrow-lz4-selected" | "arrow-lz4-all" | "arrow-zstd" | "arrow-zstd-selected" | "arrow-zstd-all" | "json-config";
@@ -0,0 +1,4 @@
1
+ /**
2
+ * How `getView` resolves the `View` it returns.
3
+ */
4
+ export type GetViewMode = "live" | "clone" | "auto";
@@ -0,0 +1,8 @@
1
+ import type { GetViewMode } from "./GetViewMode.js";
2
+ /**
3
+ * The `getView` argument: the `mode` and the target panel.
4
+ */
5
+ export type GetViewOptions = {
6
+ mode?: GetViewMode;
7
+ panel?: string;
8
+ };
@@ -16,4 +16,10 @@ export type RestoreOptions = {
16
16
  * known-good config to recover exactly.
17
17
  */
18
18
  suppress_errors?: boolean;
19
+ /**
20
+ * When `true`, a `table` no loaded client hosts yet leaves the panel
21
+ * empty and pending until the table is created, instead of the default
22
+ * error.
23
+ */
24
+ wait_for_table?: boolean;
19
25
  };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Options for the `restoreWorkspace()` method.
3
+ */
4
+ export type RestoreWorkspaceOptions = {
5
+ /**
6
+ * As `RestoreOptions::wait_for_table`, applied to every panel entry.
7
+ */
8
+ wait_for_table?: boolean;
9
+ };
@@ -1,39 +1,47 @@
1
1
  import type { Filter } from "./Filter.js";
2
2
  import type { Layout } from "./Layout.js";
3
+ import type { OptionalUpdate } from "./OptionalUpdate.js";
3
4
  import type { ViewerConfigInitial } from "./ViewerConfigInitial.js";
4
5
  /**
5
- * The parse target of a workspace config in
6
- * [`PerspectiveViewerElement::restoreWorkspace`]. Mirrors
7
- * [`WorkspaceConfig`], but `panels` entries are [`ViewerConfigInitial`]s —
8
- * every entry creates a NEW panel, so `table` is required by type (a
9
- * stray per-panel `settings` key is ignored; it is element-level state,
10
- * carried by the top-level `active` field).
6
+ * The [`PerspectiveViewerElement::restoreWorkspace`] argument: a field-wise
7
+ * update of the element's workspace state, like [`ViewerConfigUpdate`] for a
8
+ * panel, where an absent key is unchanged, `null` resets and a value
9
+ * replaces.
11
10
  */
12
11
  export type WorkspaceConfigUpdate = {
13
- active?: string;
12
+ /**
13
+ * The panel to activate with the settings sidebar open, by `panels` key
14
+ * or existing panel id; `null` closes the sidebar.
15
+ */
16
+ active?: OptionalUpdate<string>;
17
+ /**
18
+ * The layout tree to stage, naming `panels` keys or existing panel ids.
19
+ */
14
20
  layout?: Layout;
15
- panels: {
21
+ /**
22
+ * The complete replacement panel set, each [`ViewerConfigInitial`] entry
23
+ * creating a new panel (`{}` empties the element); absent keeps the
24
+ * existing panels.
25
+ */
26
+ panels?: {
16
27
  [key in string]?: ViewerConfigInitial;
17
28
  };
18
29
  /**
19
- * The element-level global (master/detail cross-) filters to re-apply as
20
- * a transient overlay on every DETAIL panel. Restored as one
21
- * unattributed bucket: the next selection on any master replaces it.
22
- * `Option` so an explicit `undefined` property deserializes as
23
- * `None` like an absent key (also `masters` / `palette` below).
30
+ * The element-level cross-filter set applied to every detail panel as
31
+ * one unattributed bucket, replacing the current set; `null` clears it.
24
32
  */
25
- global_filters?: Array<Filter> | null;
33
+ global_filters?: OptionalUpdate<Array<Filter>>;
26
34
  /**
27
- * The master (filter-source) panels, by saved `panels` key. An id not in
28
- * `panels` warns and is dropped.
35
+ * The master (filter-source) panels by `panels` key or existing panel
36
+ * id, unknown ids dropped with a warning; `null` demotes every panel.
29
37
  */
30
- masters?: Array<string> | null;
38
+ masters?: OptionalUpdate<Array<string>>;
31
39
  /**
32
- * Named color-scale definitions to apply to the host (see
33
- * [`WorkspaceConfig::palette`]), replacing any previously restored
34
- * palette.
40
+ * Named color-scale definitions applied to the host (see
41
+ * [`WorkspaceConfig::palette`]), replacing the previous palette; `null`
42
+ * clears it.
35
43
  */
36
- palette?: {
44
+ palette?: OptionalUpdate<{
37
45
  [key in string]?: string;
38
- } | null;
46
+ }>;
39
47
  };
@@ -113,25 +113,29 @@ export type * from "../../src/ts/ts-rs/WorkspaceConfigUpdate.d.ts";
113
113
  export type * from "../../src/ts/ts-rs/ExportMethod.d.ts";
114
114
  export type * from "../../src/ts/ts-rs/PanelOptions.d.ts";
115
115
  export type * from "../../src/ts/ts-rs/RestoreOptions.d.ts";
116
+ export type * from "../../src/ts/ts-rs/RestoreWorkspaceOptions.d.ts";
117
+ export type * from "../../src/ts/ts-rs/AddPanelOptions.d.ts";
116
118
  export type * from "../../src/ts/ts-rs/SaveWorkspaceOptions.d.ts";
117
119
  export type * from "../../src/ts/ts-rs/ClientOptions.d.ts";
118
120
  export type * from "../../src/ts/ts-rs/ExportOptions.d.ts";
119
121
  export type * from "../../src/ts/ts-rs/GetTableOptions.d.ts";
120
122
  export type * from "../../src/ts/ts-rs/GetClientOptions.d.ts";
123
+ export type * from "../../src/ts/ts-rs/GetViewOptions.d.ts";
124
+ export type * from "../../src/ts/ts-rs/GetViewMode.d.ts";
121
125
  export type * from "../../src/ts/ts-rs/CustomNumberFormatConfig.d.ts";
122
126
  export type * from "../../src/ts/ts-rs/NumberFormatStyle.d.ts";
123
127
  export type * from "../../src/ts/ts-rs/Notation.d.ts";
124
128
  export type * from "../../src/ts/ts-rs/DatetimeFormatType.d.ts";
125
- export type * from "../../src/ts/ts-rs/StringColorMode.d.ts";
126
- export type * from "../../src/ts/ts-rs/DatetimeColorMode.d.ts";
127
- export type * from "../../src/ts/ts-rs/FormatMode.d.ts";
128
129
 
129
130
  import type {GetTableOptions} from "../../src/ts/ts-rs/GetTableOptions.d.ts";
130
131
  import type {PanelOptions} from "../../src/ts/ts-rs/PanelOptions.d.ts";
131
132
  import type {RestoreOptions} from "../../src/ts/ts-rs/RestoreOptions.d.ts";
133
+ import type {RestoreWorkspaceOptions} from "../../src/ts/ts-rs/RestoreWorkspaceOptions.d.ts";
134
+ import type {AddPanelOptions} from "../../src/ts/ts-rs/AddPanelOptions.d.ts";
132
135
  import type {SaveWorkspaceOptions} from "../../src/ts/ts-rs/SaveWorkspaceOptions.d.ts";
133
136
  import type {ExportOptions} from "../../src/ts/ts-rs/ExportOptions.d.ts";
134
137
  import type {GetClientOptions} from "../../src/ts/ts-rs/GetClientOptions.d.ts";
138
+ import type {GetViewOptions} from "../../src/ts/ts-rs/GetViewOptions.d.ts";
135
139
  import type {ClientOptions} from "../../src/ts/ts-rs/ClientOptions.d.ts";
136
140
  import type {ViewerConfig} from "../../src/ts/ts-rs/ViewerConfig.d.ts";
137
141
  import type {ViewerConfigUpdate} from "../../src/ts/ts-rs/ViewerConfigUpdate.d.ts";
@@ -525,8 +529,15 @@ export class PerspectiveViewerElement {
525
529
  *
526
530
  * The element-level `settings` field does not exist on the argument
527
531
  * type (it is shared across the element, not per-panel).
532
+ *
533
+ * # Arguments
534
+ *
535
+ * - `config` - The new panel's initial config, whose `table` is required.
536
+ * - `options.wait_for_table` - when `true`, a `table` no loaded client
537
+ * hosts yet creates the panel empty and pending until the table is
538
+ * created, instead of the default rejection.
528
539
  */
529
- addPanel(config: ViewerConfigInitial): Promise<any>;
540
+ addPanel(config: ViewerConfigInitial, options?: AddPanelOptions | null): Promise<any>;
530
541
  /**
531
542
  * Configure the embedded LLM agent (see `prompt()`), replacing any prior
532
543
  * configuration and conversation.
@@ -814,27 +825,46 @@ export class PerspectiveViewerElement {
814
825
  getTable(options?: GetTableOptions | null): Promise<any>;
815
826
  getThemes(): Promise<any>;
816
827
  /**
817
- * Get the underlying [`View`] for this viewer.
828
+ * Get a [`View`] for a panel of this viewer, as currently configured by
829
+ * the user.
818
830
  *
819
- * Use this method to get promgrammatic access to the [`View`] as currently
820
- * configured by the user, for e.g. serializing as an
821
- * [Apache Arrow](https://arrow.apache.org/) before passing to another
822
- * library.
831
+ * # Arguments
823
832
  *
824
- * The [`View`] returned by this method is owned by the
825
- * [`PerspectiveViewerElement`] and may be _invalidated_ by
826
- * [`View::delete`] at any time. Plugins which rely on this [`View`] for
827
- * their [`HTMLPerspectiveViewerPluginElement::draw`] implementations
828
- * should treat this condition as a _cancellation_ by silently aborting on
829
- * "View already deleted" errors from method calls.
833
+ * - `mode` - which [`View`] to return:
834
+ * - `"live"` (default) - the panel's own [`View`], which the viewer
835
+ * replaces on every config change and deletes when auto-paused or
836
+ * [`PerspectiveViewerElement::delete`]d, so calls on it may fail with
837
+ * "View already deleted", it must never be deleted by the caller, and
838
+ * it rejects with `No View for panel "<name>"` while none is bound
839
+ * (auto-paused or not yet rendered).
840
+ * - `"clone"` - a new [`View`] built from the panel's effective config
841
+ * (global filter included), independent of the render lifecycle, which
842
+ * the caller owns and must [`View::delete`].
843
+ * - `"auto"` - `"live"` when the panel has a bound [`View`], else
844
+ * `"clone"`.
845
+ * - `panel` - the target panel, or the active panel when omitted.
846
+ *
847
+ * Plugins which rely on the live [`View`] for their
848
+ * [`HTMLPerspectiveViewerPluginElement::draw`] implementations should
849
+ * treat "View already deleted" as a _cancellation_ by silently aborting.
830
850
  *
831
851
  * # JavaScript Examples
832
852
  *
833
853
  * ```javascript
834
854
  * const view = await viewer.getView();
835
855
  * ```
856
+ *
857
+ * Export every panel without borrowing the viewer's own [`View`]:
858
+ *
859
+ * ```javascript
860
+ * for (const panel of viewer.getPanelNames()) {
861
+ * const view = await viewer.getView({ panel, mode: "clone" });
862
+ * const arrow = await view.to_arrow();
863
+ * await view.delete();
864
+ * }
865
+ * ```
836
866
  */
837
- getView(options?: PanelOptions | null): Promise<any>;
867
+ getView(options?: GetViewOptions | null): Promise<any>;
838
868
  /**
839
869
  * Get a copy of the [`ViewConfig`] for the current [`View`]. This is
840
870
  * non-blocking as it does not need to access the plugin (unlike
@@ -1035,12 +1065,13 @@ export class PerspectiveViewerElement {
1035
1065
  * - `options.panel` - The panel to target, or the active panel when
1036
1066
  * omitted.
1037
1067
  * - `options.suppress_errors` - when `true`, a failed restore only rejects
1038
- * the returned `Promise`; the error is NOT committed to the viewer's
1039
- * visible error state and the session remains usable. The view config is
1040
- * rolled back to its pre-call value, so a rejected patch cannot re-merge
1041
- * into a later restore. Element-level state the call already applied
1042
- * (theme, title, a plugin swap) is NOT undone — restore a known-good
1043
- * config to recover those exactly.
1068
+ * the returned `Promise` and rolls the view config back, leaving the
1069
+ * viewer's visible error state and any element-level state the call
1070
+ * already applied (theme, title, plugin, a successful `table` change)
1071
+ * untouched.
1072
+ * - `options.wait_for_table` - when `true`, a `table` no loaded client
1073
+ * hosts yet leaves the panel empty and pending until the table is
1074
+ * created, instead of the default error.
1044
1075
  *
1045
1076
  * # JavaScript Examples
1046
1077
  *
@@ -1060,20 +1091,33 @@ export class PerspectiveViewerElement {
1060
1091
  */
1061
1092
  restore(update: ViewerConfigUpdate, options?: RestoreOptions | null): Promise<void>;
1062
1093
  /**
1063
- * Restore the ENTIRE element from a [`WorkspaceConfigUpdate`]
1064
- * (`{version, active?, layout, panels, ...}`) —
1065
- * the multi-panel counterpart of [`Self::restore`]. Every existing panel
1066
- * is replaced by the `panels` entries, and the layout tree + master/detail
1067
- * cross-filter state re-applied. Unlike [`Self::restore`], this never
1068
- * falls back to the single-panel path.
1094
+ * Apply a [`WorkspaceConfigUpdate`] to the element — the multi-panel
1095
+ * counterpart of [`Self::restore`] and like it a field-wise update, where
1096
+ * an absent field is unchanged, `null` resets and a value replaces.
1097
+ *
1098
+ * # Arguments
1099
+ *
1100
+ * - `update` - The workspace config update: a [`Self::saveWorkspace`]
1101
+ * token replaces every panel (`panels` is the whole set), while a token
1102
+ * without `panels` keeps them and `layout`, `active` and `masters` name
1103
+ * them by their existing ids.
1104
+ * - `options.wait_for_table` - when `true`, a panel whose `table` no
1105
+ * loaded client hosts yet is created empty and pending until the table
1106
+ * is created, instead of the default error.
1069
1107
  *
1070
1108
  * # JavaScript Examples
1071
1109
  *
1072
1110
  * ```javascript
1073
1111
  * await viewer.restoreWorkspace(await otherViewer.saveWorkspace());
1074
1112
  * ```
1113
+ *
1114
+ * Cross-filter the current panels without re-creating them:
1115
+ *
1116
+ * ```javascript
1117
+ * await viewer.restoreWorkspace({ global_filters: [["Region", "==", "West"]] });
1118
+ * ```
1075
1119
  */
1076
- restoreWorkspace(update: WorkspaceConfigUpdate): Promise<void>;
1120
+ restoreWorkspace(update: WorkspaceConfigUpdate, options?: RestoreWorkspaceOptions | null): Promise<void>;
1077
1121
  /**
1078
1122
  * Restyle all plugins from current document.
1079
1123
  *
@@ -1647,6 +1691,17 @@ export class View {
1647
1691
  set_depth(depth: number): Promise<void>;
1648
1692
  /**
1649
1693
  * Serializes a [`View`] to the Apache Arrow data format.
1694
+ *
1695
+ * # Arguments
1696
+ *
1697
+ * - `window` - a [`ViewWindow`]; its `compression` key selects Arrow IPC
1698
+ * body compression, `"lz4"` or `"zstd"` (uncompressed when omitted).
1699
+ *
1700
+ * # JavaScript Examples
1701
+ *
1702
+ * ```javascript
1703
+ * const arrow = await view.to_arrow({ compression: "zstd" });
1704
+ * ```
1650
1705
  */
1651
1706
  to_arrow(window?: ViewWindow | null): Promise<ArrayBuffer>;
1652
1707
  /**
@@ -1755,7 +1810,7 @@ export interface InitOutput {
1755
1810
  readonly perspectivedebugpluginelement_select_mode: (a: number, b: number) => void;
1756
1811
  readonly perspectivedebugpluginelement_update: (a: number, b: number) => number;
1757
1812
  readonly perspectiveviewerelement___get_model: (a: number) => number;
1758
- readonly perspectiveviewerelement_addPanel: (a: number, b: number) => number;
1813
+ readonly perspectiveviewerelement_addPanel: (a: number, b: number, c: number) => number;
1759
1814
  readonly perspectiveviewerelement_agentConfig: (a: number, b: number, c: number) => void;
1760
1815
  readonly perspectiveviewerelement_agentPrompt: (a: number, b: number, c: number) => number;
1761
1816
  readonly perspectiveviewerelement_agentReset: (a: number) => number;
@@ -1786,7 +1841,7 @@ export interface InitOutput {
1786
1841
  readonly perspectiveviewerelement_resetThemes: (a: number, b: number, c: number) => number;
1787
1842
  readonly perspectiveviewerelement_resize: (a: number, b: number) => number;
1788
1843
  readonly perspectiveviewerelement_restore: (a: number, b: number, c: number) => number;
1789
- readonly perspectiveviewerelement_restoreWorkspace: (a: number, b: number) => number;
1844
+ readonly perspectiveviewerelement_restoreWorkspace: (a: number, b: number, c: number) => number;
1790
1845
  readonly perspectiveviewerelement_restyleElement: (a: number) => number;
1791
1846
  readonly perspectiveviewerelement_save: (a: number, b: number) => number;
1792
1847
  readonly perspectiveviewerelement_saveWorkspace: (a: number, b: number) => number;
@@ -1895,22 +1950,22 @@ export interface InitOutput {
1895
1950
  readonly virtualdataslice_setStringCol: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1896
1951
  readonly virtualserver_handleRequest: (a: number, b: number, c: number) => number;
1897
1952
  readonly virtualserver_new: (a: number, b: number) => void;
1898
- readonly __wasm_bindgen_func_elem_18575: (a: number, b: number) => void;
1899
- readonly __wasm_bindgen_func_elem_19286: (a: number, b: number) => void;
1900
- readonly __wasm_bindgen_func_elem_20199: (a: number, b: number) => void;
1901
- readonly __wasm_bindgen_func_elem_4417: (a: number, b: number) => void;
1902
- readonly __wasm_bindgen_func_elem_24952: (a: number, b: number) => void;
1903
- readonly __wasm_bindgen_func_elem_33110: (a: number, b: number, c: number, d: number) => void;
1904
- readonly __wasm_bindgen_func_elem_18694: (a: number, b: number, c: number) => void;
1905
- readonly __wasm_bindgen_func_elem_19291: (a: number, b: number, c: number) => void;
1906
- readonly __wasm_bindgen_func_elem_7737: (a: number, b: number, c: number) => void;
1907
- readonly __wasm_bindgen_func_elem_7738: (a: number, b: number, c: number) => void;
1908
- readonly __wasm_bindgen_func_elem_7739: (a: number, b: number, c: number) => void;
1909
- readonly __wasm_bindgen_func_elem_7735: (a: number, b: number, c: number) => void;
1910
- readonly __wasm_bindgen_func_elem_24969: (a: number, b: number, c: number) => void;
1911
- readonly __wasm_bindgen_func_elem_21238: (a: number, b: number) => number;
1912
- readonly __wasm_bindgen_func_elem_19290: (a: number, b: number) => void;
1913
- readonly __wasm_bindgen_func_elem_21239: (a: number, b: number) => void;
1953
+ readonly __wasm_bindgen_func_elem_18919: (a: number, b: number) => void;
1954
+ readonly __wasm_bindgen_func_elem_4482: (a: number, b: number) => void;
1955
+ readonly __wasm_bindgen_func_elem_19628: (a: number, b: number) => void;
1956
+ readonly __wasm_bindgen_func_elem_20538: (a: number, b: number) => void;
1957
+ readonly __wasm_bindgen_func_elem_25347: (a: number, b: number) => void;
1958
+ readonly __wasm_bindgen_func_elem_33507: (a: number, b: number, c: number, d: number) => void;
1959
+ readonly __wasm_bindgen_func_elem_19039: (a: number, b: number, c: number) => void;
1960
+ readonly __wasm_bindgen_func_elem_7893: (a: number, b: number, c: number) => void;
1961
+ readonly __wasm_bindgen_func_elem_7894: (a: number, b: number, c: number) => void;
1962
+ readonly __wasm_bindgen_func_elem_7895: (a: number, b: number, c: number) => void;
1963
+ readonly __wasm_bindgen_func_elem_7891: (a: number, b: number, c: number) => void;
1964
+ readonly __wasm_bindgen_func_elem_19633: (a: number, b: number, c: number) => void;
1965
+ readonly __wasm_bindgen_func_elem_25364: (a: number, b: number, c: number) => void;
1966
+ readonly __wasm_bindgen_func_elem_21577: (a: number, b: number) => number;
1967
+ readonly __wasm_bindgen_func_elem_19632: (a: number, b: number) => void;
1968
+ readonly __wasm_bindgen_func_elem_21578: (a: number, b: number) => void;
1914
1969
  readonly __wbindgen_export: (a: number, b: number) => number;
1915
1970
  readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
1916
1971
  readonly __wbindgen_export3: (a: number) => void;