UNPKG

@fusedashlabs/ui9000-workspace

Version:

UI9000 workspace MCP. One tool, show_workspace, draws a chart from your table. Set TYPESAFE_API_KEY to let Jev choose the chart.

35 lines (34 loc) • 1.23 kB
const CHART_TYPE_BY_COMPONENT = { 'band-utilization-chart': 'bandUtilizationChart', 'bar-chart': 'barChart', 'histogram-chart': 'histogramChart', 'map-chart': 'mapChart', 'kpi-widget': 'KPI', 'status-gauge-widget': 'statusGaugeWidget', 'loss-indicator': 'lossIndicator', 'network-graph': 'networkGraphChart', table: 'customWidget', text: 'customWidget', image: 'customWidget', 'event-timeline': 'customWidget', 'evidence-panel': 'customWidget', 'entity-detail': 'customWidget', 'text-input': 'customWidget', 'number-input': 'customWidget', select: 'customWidget', 'multi-select': 'customWidget', checkbox: 'customWidget', 'date-input': 'customWidget', button: 'customWidget', form: 'customWidget', 'approval-bar': 'customWidget', }; export function catalogChartTypeKey(chartTypeKeys) { return chartTypeKeys?.find((key) => key.trim().length > 0 && key !== '*'); } /** Always a FuseDash chartType so the MCP App View never receives a blank type. */ export function chartTypeForComponent(component, chartTypeKeys) { return (catalogChartTypeKey(chartTypeKeys) ?? CHART_TYPE_BY_COMPONENT[component] ?? 'customWidget'); }