import type { ChartData, ChartOptions, ChartType } from 'chart.js'; /** * Supported chart types for the XML tag parser */ export type SupportedChartType = 'line' | 'bar' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter'; /** * Chart configuration parsed from XML tag */ export interface ChartConfig { id: string; type: SupportedChartType; title?: string; unit?: string; data: ChartData; options?: ChartOptions; } /** * Result from processing a token through the chart parser */ export interface ChartParseResult { /** Regular text content to render (non-chart content) */ textContent: string; /** IDs of chart placeholders that were added */ chartPlaceholders: string[]; /** Fully parsed chart configurations ready to render */ completedCharts: ChartConfig[]; } /** * Parser state machine states */ export declare enum ChartParserState { /** Normal text parsing mode */ IDLE = "IDLE", /** Detected potential opening tag, buffering */ OPENING_TAG = "OPENING_TAG", /** Inside chart tag, buffering JSON content */ INSIDE_TAG = "INSIDE_TAG", /** Detected potential closing tag */ CLOSING_TAG = "CLOSING_TAG" } /** * Chart tag attributes extracted from opening tag */ export interface ChartTagAttributes { type: SupportedChartType; title?: string; unit?: string; } /** * Partial chart config for pending charts (streaming) */ export interface PendingChart { id: string; attributes?: ChartTagAttributes; buffer?: string; } /** * Props for ChartBubble component */ export interface ChartBubbleProps { config: ChartConfig; backgroundColor?: string; textColor?: string; /** Enable zoom/pan interactivity (used in popup modal) */ enableZoom?: boolean; /** Callback to open chart in fullscreen popup */ onOpenFullscreen?: () => void; } /** * Props for ChartLoadingPlaceholder component */ export interface ChartLoadingPlaceholderProps { chartId: string; backgroundColor?: string; } /** * Props for ChartPopupModal component */ export interface ChartPopupModalProps { isOpen: boolean; config: ChartConfig; onClose: () => void; backgroundColor?: string; textColor?: string; } //# sourceMappingURL=chart.d.ts.map