Chart theming: custom named themes + Theme Builder

This commit is contained in:
2026-06-12 18:15:54 +03:00
parent 44a601affd
commit b193464f55
32 changed files with 2220 additions and 70 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
import { create } from 'zustand';
import type { FitMode } from '@core/rendering';
import type { UiTheme } from '@core/theme';
import type { ChartThemeId } from '@core/vega-themes';
import type { ChartThemeSelection } from '@core/vega-themes';
import type { ModalName } from '../modals/types';
/**
@@ -25,7 +25,7 @@ export interface AppState {
/** Preview sizing mode (spec §04); persisted to Settings as `previewFitMode`. */
previewFitMode: FitMode;
/** Chart theme selection (spec §04); persisted to Settings as `chartTheme`. */
chartTheme: ChartThemeId;
chartTheme: ChartThemeSelection;
/** The currently open modal, or null. */
activeModal: ModalName | null;
@@ -35,7 +35,7 @@ export interface AppState {
/** Set the preview fit mode — the Live Preview Fit control's action. */
setPreviewFitMode: (mode: FitMode) => void;
/** Set the chart theme — the Live Preview settings cluster's action. */
setChartTheme: (theme: ChartThemeId) => void;
setChartTheme: (theme: ChartThemeSelection) => void;
/**
* Low-level modal setter — the single primitive that mutates `activeModal`.
* High-level open/close (snapshot for unsaved-change detection, URL sync,