import type { ChartPendingConfig, IChartBuilderAdapter, IChartCreateConfig, IChartData, IChartDescription, IChartLiveAdapter, IUniverDataSet } from '@univerjs-pro/engine-chart'; import type { ArrangeTypeEnum, Injector } from '@univerjs/core'; import type { ISheetChartSourceHeaderTitles } from '../models/types'; import type { ISheetChartDescriptionExtension } from './sheet-chart-description'; import type { ChartSourceSpec, IChartLayoutPatch, ISheetChartInfo } from './types'; /** Sheet-owned changes committed alongside engine chart configuration. */ export interface ISheetChartHostPatch { source?: ChartSourceSpec; layout?: IChartLayoutPatch; } /** Persistence seam required by a Sheet chart builder. */ export interface ISheetChartConfigAdapter extends IChartBuilderAdapter { commitHost(patch: ISheetChartHostPatch): void; resolveData(config: ChartPendingConfig, source?: ChartSourceSpec): IChartData; resolveSource(source: ChartSourceSpec): { dataSet: IUniverDataSet; isRowDirection: boolean; }; } /** Stable Sheet identity and services used by the builder adapter. */ export interface ISheetChartConfigAdapterContext { unitId: string; subUnitId: string; chartId: string; injector: Injector; } /** Commits Sheet chart changes using raw identity and package-owned commands. */ export declare class SheetChartConfigAdapter implements ISheetChartConfigAdapter, IChartLiveAdapter { private readonly _context; private readonly _injector; constructor(_context: ISheetChartConfigAdapterContext); describe(config?: ChartPendingConfig, dataSet?: IUniverDataSet): IChartDescription & ISheetChartDescriptionExtension; getInfo(): ISheetChartInfo; getPlotVisibleOnly(): boolean; commit(configChange: ChartPendingConfig): void; update(info: ISheetChartInfo): Promise; commitChanges(source: ChartSourceSpec, config: IChartCreateConfig, layout: IChartLayoutPatch): Promise; private _replaceConfig; setDataSource(source: ChartSourceSpec): void; setHeader(titles: ISheetChartSourceHeaderTitles): void; setAbsolutePosition(x: number, y: number): void; setSize(width: number, height: number): void; arrange(type: ArrangeTypeEnum): void; setZOrder(zOrder: number): void; resolveData(configChange: ChartPendingConfig, source?: ChartSourceSpec): IChartData; private _readConfigDataSet; resolveSource(source: ChartSourceSpec): { dataSet: IUniverDataSet; isRowDirection: boolean; }; private _getChartSource; private _readSource; commitHost(patch: ISheetChartHostPatch): void; remove(): Promise; private _resolveSourceRange; private _getChartModel; }