@quantumwake/terminal-ux-dashboard-components 0.1.15 → 0.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -32,6 +32,12 @@ interface DashboardCapabilities {
32
32
  removePanel?: (panelId: string) => void;
33
33
  persistPanelData?: (panelId: string, rows: QueryResult['rows'], refreshedAt: string) => void;
34
34
  persistLayout?: (items: PanelLayout[]) => void;
35
+ panelHeaderExtra?: (panel: PanelRef) => ReactNode;
36
+ }
37
+ interface PanelRef {
38
+ id: string;
39
+ type: string;
40
+ title?: string;
35
41
  }
36
42
  interface PanelLayout {
37
43
  id: string;
@@ -116,6 +122,11 @@ interface ChartStyle {
116
122
  xTickRotation: number;
117
123
  yTickRotation: number;
118
124
  tickTruncate: number;
125
+ tickWrap: boolean;
126
+ tickWrapWidth: number;
127
+ cellWrap: boolean;
128
+ cellPrecision: number;
129
+ cellTruncate: number;
119
130
  legendAnchor: LegendAnchor;
120
131
  titleAlign: TitleAlign;
121
132
  titleBold: boolean;
@@ -376,6 +387,7 @@ interface PanelConfig {
376
387
  text?: string;
377
388
  label?: string;
378
389
  column?: string;
390
+ fill?: boolean;
379
391
  data?: Row[];
380
392
  refreshedAt?: string;
381
393
  [key: string]: unknown;
@@ -402,6 +414,19 @@ interface DashboardRendererProps {
402
414
  records?: Row[];
403
415
  columns?: ColumnDef[];
404
416
  }
417
+ interface PanelContentProps {
418
+ panel: DashboardPanel$1;
419
+ records?: Row[];
420
+ columns?: ColumnDef[];
421
+ }
422
+ /**
423
+ * Renders a single dashboard panel based on its type and config.
424
+ * Panels saved with a SQL query render server-side (full dataset); the rest
425
+ * fall back to client-side aggregation over the loaded records.
426
+ */
427
+ declare function PanelContent({ panel, records, columns }: PanelContentProps): react.JSX.Element | null;
428
+ declare const PanelChart: typeof PanelContent;
429
+ type PanelChartProps = PanelContentProps;
405
430
  /**
406
431
  * DashboardRenderer — renders a grid of AI-generated or manually configured
407
432
  * panels via react-grid-layout. Editing is capability-gated:
@@ -514,4 +539,4 @@ interface DataExplorerProps {
514
539
  }
515
540
  declare function DataExplorer({ records, columns, states, activeStateId, profile, dashboard, dashboardId, savedDashboards, loading, analyzing, defaultMode, tabs, onSelectState, onRefreshStates, }: DataExplorerProps): react.JSX.Element;
516
541
 
517
- export { type AggFn, type BarDatum, BarView, type BarViewProps, ChartBuilder, type ChartBuilderColumn, type ChartBuilderProps, type ChartConfig, type ChartField, type ChartFilter, type ChartPanel, type ChartStyle, ChartStyleControls, type ChartStyleControlsProps, type ChartType, DEFAULT_CHART_STYLE, type Dashboard$1 as Dashboard, type DashboardCapabilities, type DashboardContextValue, type DashboardPanel$1 as DashboardPanel, DashboardProvider, type DashboardProviderProps, DashboardRenderer, type DashboardRendererProps, type DashboardTheme, DataExplorer, type DataExplorerProps, type HeatmapSerie, HeatmapView, type HeatmapViewProps, type InsightConfig, InsightView, type InsightViewProps, LEGEND_ANCHORS, type LegendAnchor, type LegendPosition, type LineSerie, LineView, type LineViewProps, type MetricConfig, MetricView, type MetricViewProps, type PanelInput, type PanelLayout, type PieDatum, PieView, type PieViewProps, PivotView, type PivotViewProps, type QueryResult, type Row, type SavedDashboard, type ScatterSerie, ScatterView, type ScatterViewProps, SqlConsole, type SqlConsoleColumn, type SqlConsoleProps, type TitleAlign, aggExpr, aggregate, axisLegend, buildChartSQL, buildNivoTheme, compileWhere, groupBy, legendConfig, qIdent, qLit, shapeChartData, useCapabilities, useDashboard, withStyleDefaults };
542
+ export { type AggFn, type BarDatum, BarView, type BarViewProps, ChartBuilder, type ChartBuilderColumn, type ChartBuilderProps, type ChartConfig, type ChartField, type ChartFilter, type ChartPanel, type ChartStyle, ChartStyleControls, type ChartStyleControlsProps, type ChartType, DEFAULT_CHART_STYLE, type Dashboard$1 as Dashboard, type DashboardCapabilities, type DashboardContextValue, type DashboardPanel$1 as DashboardPanel, DashboardProvider, type DashboardProviderProps, DashboardRenderer, type DashboardRendererProps, type DashboardTheme, DataExplorer, type DataExplorerProps, type HeatmapSerie, HeatmapView, type HeatmapViewProps, type InsightConfig, InsightView, type InsightViewProps, LEGEND_ANCHORS, type LegendAnchor, type LegendPosition, type LineSerie, LineView, type LineViewProps, type MetricConfig, MetricView, type MetricViewProps, PanelChart, type PanelChartProps, type PanelInput, type PanelLayout, type PanelRef, type PieDatum, PieView, type PieViewProps, PivotView, type PivotViewProps, type QueryResult, type Row, type SavedDashboard, type ScatterSerie, ScatterView, type ScatterViewProps, SqlConsole, type SqlConsoleColumn, type SqlConsoleProps, type TitleAlign, aggExpr, aggregate, axisLegend, buildChartSQL, buildNivoTheme, compileWhere, groupBy, legendConfig, qIdent, qLit, shapeChartData, useCapabilities, useDashboard, withStyleDefaults };
package/dist/index.d.ts CHANGED
@@ -32,6 +32,12 @@ interface DashboardCapabilities {
32
32
  removePanel?: (panelId: string) => void;
33
33
  persistPanelData?: (panelId: string, rows: QueryResult['rows'], refreshedAt: string) => void;
34
34
  persistLayout?: (items: PanelLayout[]) => void;
35
+ panelHeaderExtra?: (panel: PanelRef) => ReactNode;
36
+ }
37
+ interface PanelRef {
38
+ id: string;
39
+ type: string;
40
+ title?: string;
35
41
  }
36
42
  interface PanelLayout {
37
43
  id: string;
@@ -116,6 +122,11 @@ interface ChartStyle {
116
122
  xTickRotation: number;
117
123
  yTickRotation: number;
118
124
  tickTruncate: number;
125
+ tickWrap: boolean;
126
+ tickWrapWidth: number;
127
+ cellWrap: boolean;
128
+ cellPrecision: number;
129
+ cellTruncate: number;
119
130
  legendAnchor: LegendAnchor;
120
131
  titleAlign: TitleAlign;
121
132
  titleBold: boolean;
@@ -376,6 +387,7 @@ interface PanelConfig {
376
387
  text?: string;
377
388
  label?: string;
378
389
  column?: string;
390
+ fill?: boolean;
379
391
  data?: Row[];
380
392
  refreshedAt?: string;
381
393
  [key: string]: unknown;
@@ -402,6 +414,19 @@ interface DashboardRendererProps {
402
414
  records?: Row[];
403
415
  columns?: ColumnDef[];
404
416
  }
417
+ interface PanelContentProps {
418
+ panel: DashboardPanel$1;
419
+ records?: Row[];
420
+ columns?: ColumnDef[];
421
+ }
422
+ /**
423
+ * Renders a single dashboard panel based on its type and config.
424
+ * Panels saved with a SQL query render server-side (full dataset); the rest
425
+ * fall back to client-side aggregation over the loaded records.
426
+ */
427
+ declare function PanelContent({ panel, records, columns }: PanelContentProps): react.JSX.Element | null;
428
+ declare const PanelChart: typeof PanelContent;
429
+ type PanelChartProps = PanelContentProps;
405
430
  /**
406
431
  * DashboardRenderer — renders a grid of AI-generated or manually configured
407
432
  * panels via react-grid-layout. Editing is capability-gated:
@@ -514,4 +539,4 @@ interface DataExplorerProps {
514
539
  }
515
540
  declare function DataExplorer({ records, columns, states, activeStateId, profile, dashboard, dashboardId, savedDashboards, loading, analyzing, defaultMode, tabs, onSelectState, onRefreshStates, }: DataExplorerProps): react.JSX.Element;
516
541
 
517
- export { type AggFn, type BarDatum, BarView, type BarViewProps, ChartBuilder, type ChartBuilderColumn, type ChartBuilderProps, type ChartConfig, type ChartField, type ChartFilter, type ChartPanel, type ChartStyle, ChartStyleControls, type ChartStyleControlsProps, type ChartType, DEFAULT_CHART_STYLE, type Dashboard$1 as Dashboard, type DashboardCapabilities, type DashboardContextValue, type DashboardPanel$1 as DashboardPanel, DashboardProvider, type DashboardProviderProps, DashboardRenderer, type DashboardRendererProps, type DashboardTheme, DataExplorer, type DataExplorerProps, type HeatmapSerie, HeatmapView, type HeatmapViewProps, type InsightConfig, InsightView, type InsightViewProps, LEGEND_ANCHORS, type LegendAnchor, type LegendPosition, type LineSerie, LineView, type LineViewProps, type MetricConfig, MetricView, type MetricViewProps, type PanelInput, type PanelLayout, type PieDatum, PieView, type PieViewProps, PivotView, type PivotViewProps, type QueryResult, type Row, type SavedDashboard, type ScatterSerie, ScatterView, type ScatterViewProps, SqlConsole, type SqlConsoleColumn, type SqlConsoleProps, type TitleAlign, aggExpr, aggregate, axisLegend, buildChartSQL, buildNivoTheme, compileWhere, groupBy, legendConfig, qIdent, qLit, shapeChartData, useCapabilities, useDashboard, withStyleDefaults };
542
+ export { type AggFn, type BarDatum, BarView, type BarViewProps, ChartBuilder, type ChartBuilderColumn, type ChartBuilderProps, type ChartConfig, type ChartField, type ChartFilter, type ChartPanel, type ChartStyle, ChartStyleControls, type ChartStyleControlsProps, type ChartType, DEFAULT_CHART_STYLE, type Dashboard$1 as Dashboard, type DashboardCapabilities, type DashboardContextValue, type DashboardPanel$1 as DashboardPanel, DashboardProvider, type DashboardProviderProps, DashboardRenderer, type DashboardRendererProps, type DashboardTheme, DataExplorer, type DataExplorerProps, type HeatmapSerie, HeatmapView, type HeatmapViewProps, type InsightConfig, InsightView, type InsightViewProps, LEGEND_ANCHORS, type LegendAnchor, type LegendPosition, type LineSerie, LineView, type LineViewProps, type MetricConfig, MetricView, type MetricViewProps, PanelChart, type PanelChartProps, type PanelInput, type PanelLayout, type PanelRef, type PieDatum, PieView, type PieViewProps, PivotView, type PivotViewProps, type QueryResult, type Row, type SavedDashboard, type ScatterSerie, ScatterView, type ScatterViewProps, SqlConsole, type SqlConsoleColumn, type SqlConsoleProps, type TitleAlign, aggExpr, aggregate, axisLegend, buildChartSQL, buildNivoTheme, compileWhere, groupBy, legendConfig, qIdent, qLit, shapeChartData, useCapabilities, useDashboard, withStyleDefaults };