@perspective-dev/viewer
    Preparing search index...

    The state of an entire custom_elements::PerspectiveViewerElement component and its Plugin: the element-level settings flag plus the per-panel [PanelViewerConfig]. The split exists so the whole-element config format can serialize panel entries without a settings key (it is element-level state there, carried by the top-level active field instead), while the single-panel format flattens back to the legacy shape.

    type ViewerConfig<V = string> = {
        aggregates: { [key in string]?: Aggregate };
        columns: (string | null)[];
        columns_config: { [key in string]?: { [key in string]?: JsonValue } };
        expressions: Expressions;
        filter: Filter[];
        filter_op?: FilterReducer;
        group_by: string[];
        group_by_depth?: number | null;
        group_rollup_mode: GroupRollupMode;
        plugin: string;
        plugin_config: { [key in string]?: JsonValue };
        settings: boolean;
        sort: Sort[];
        split_by: string[];
        split_rollup_mode: SplitRollupMode;
        table: string;
        theme: string | null;
        title: string | null;
        version: V;
        windows?: Windows;
    }

    Type Parameters

    • V = string
    Index

    Properties

    aggregates: { [key in string]?: Aggregate }
    columns: (string | null)[]
    columns_config: { [key in string]?: { [key in string]?: JsonValue } }

    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().

    expressions: Expressions
    filter: Filter[]
    filter_op?: FilterReducer
    group_by: string[]
    group_by_depth?: number | null
    group_rollup_mode: GroupRollupMode
    plugin: string

    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_config: { [key in string]?: JsonValue }

    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.

    settings: boolean
    sort: Sort[]
    split_by: string[]
    split_rollup_mode: SplitRollupMode
    table: string

    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.

    theme: string | null

    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.

    title: string | null

    Panel title, shown in its tab. None renders the default title.

    version: V

    The @perspective-dev/viewer version that wrote this config, stamped on save and used to migrate older tokens. Callers do not set it.

    windows?: Windows