// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { Aggregate } from "./Aggregate.js"; import type { Expressions } from "./Expressions.js"; import type { Filter } from "./Filter.js"; import type { FilterReducer } from "./FilterReducer.js"; import type { GroupRollupMode } from "./GroupRollupMode.js"; import type { Sort } from "./Sort.js"; import type { SplitRollupMode } from "./SplitRollupMode.js"; import type { Windows } from "./Windows.js"; import type { JsonValue } from "./serde_json/JsonValue.js"; /** * The per-panel state of a [`ViewerConfig`] — everything except the * element-level `settings` flag. This is the `panels` entry type of the * whole-element config format. */ export type PanelViewerConfig = { /** * The `@perspective-dev/viewer` version that wrote this config, * stamped on save and used to migrate older tokens. Callers do not * set it. */ version: V, /** * Per-column styling, keyed by column name. The viewer treats the * values as opaque — their shape is defined by the ACTIVE plugin, * so a config written for one plugin may carry keys another * ignores. Query the live shape with the `get_style_schema` agent * tool, or the plugin's `column_config_schema()`. */ columns_config: { [key in string]?: { [key in string]?: JsonValue } }, /** * Name of the visualization plugin, from the set registered on the * page (the `list_plugins` agent tool, or the plugin picker). This * also decides what the view fields MEAN visually: `columns` is * positional and each plugin reads the positions differently, and * `group_by`/`split_by` draw different things per plugin. */ plugin: string, /** * Plugin-wide settings (as opposed to the per-column * [`Self::columns_config`]). Opaque to the viewer and defined by * the active plugin; see `get_style_schema`. */ plugin_config: { [key in string]?: JsonValue }, /** * Name of the `Table` this panel renders, as hosted on the panel's * `Client`. Every placed panel has a table binding (creation * requires one by type — [`ViewerConfigInitial`]), so the saved * config carries it unconditionally. */ table: string, /** * Selected theme NAME (e.g. `"Pro Dark"`) — not a CSS value. Valid * names are the Perspective themes loaded on the page, which * `resetThemes()` re-scans. `None` selects the first available. */ theme: string | null, /** * Panel title, shown in its tab. `None` renders the default title. */ title: string | null, group_by: Array, split_by: Array, sort: Array, filter: Array, group_rollup_mode: GroupRollupMode, split_rollup_mode: SplitRollupMode, filter_op?: FilterReducer, expressions: Expressions, windows?: Windows, columns: Array, aggregates: { [key in string]?: Aggregate }, group_by_depth?: number | null, };