@seed-ship/mcp-ui-solid 1.0.2
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/CHANGELOG.md +36 -0
- package/LICENSE +21 -0
- package/README.md +55 -0
- package/dist/StreamingUIRenderer-DQ1WoVV6.cjs +5 -0
- package/dist/StreamingUIRenderer-DQ1WoVV6.cjs.map +1 -0
- package/dist/StreamingUIRenderer-oyg_cKKl.js +757 -0
- package/dist/StreamingUIRenderer-oyg_cKKl.js.map +1 -0
- package/dist/components.cjs +2 -0
- package/dist/components.cjs.map +1 -0
- package/dist/components.js +7 -0
- package/dist/components.js.map +1 -0
- package/dist/hooks.cjs +2 -0
- package/dist/hooks.cjs.map +1 -0
- package/dist/hooks.js +5 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +296 -0
- package/dist/index.js.map +1 -0
- package/dist/types.cjs +2 -0
- package/dist/types.cjs.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/useStreamingUI-BL0nh13E.js +187 -0
- package/dist/useStreamingUI-BL0nh13E.js.map +1 -0
- package/dist/useStreamingUI-CXmvpRhz.cjs +3 -0
- package/dist/useStreamingUI-CXmvpRhz.cjs.map +1 -0
- package/package.json +86 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StreamingUIRenderer-oyg_cKKl.js","sources":["../src/services/validation.ts","../src/components/GenerativeUIErrorBoundary.tsx","../src/components/UIResourceRenderer.tsx","../src/components/StreamingUIRenderer.tsx"],"sourcesContent":["/**\n * Component Validation Service\n * Phase 0: Resource Limits & Schema Validation\n *\n * Validates LLM-generated components against:\n * - JSON schema\n * - Resource limits (data points, payload size, grid bounds)\n * - Security constraints (domain whitelist, XSS prevention)\n */\n\nimport type {\n UIComponent,\n UILayout,\n ValidationResult,\n ResourceLimits,\n ChartComponentParams,\n TableComponentParams,\n} from '../types'\n\n/**\n * Default resource limits (configurable via env)\n */\nexport const DEFAULT_RESOURCE_LIMITS: ResourceLimits = {\n maxDataPoints: 1000,\n maxTableRows: 100,\n maxPayloadSize: 50 * 1024, // 50KB\n renderTimeout: 5000, // 5 seconds\n}\n\n/**\n * Allowed iframe domains (whitelist)\n * Must match CSP frame-src directive\n */\nconst ALLOWED_IFRAME_DOMAINS = [\n 'quickchart.io',\n 'www.quickchart.io',\n 'deposium.com',\n 'deposium.vip',\n 'localhost',\n]\n\n/**\n * Validate grid position bounds (1-12 columns)\n */\nexport function validateGridPosition(position: UIComponent['position']): ValidationResult {\n const errors: ValidationResult['errors'] = []\n\n if (position.colStart < 1 || position.colStart > 12) {\n errors.push({\n path: 'position.colStart',\n message: 'Column start must be between 1 and 12',\n code: 'INVALID_GRID_COL_START',\n })\n }\n\n if (position.colSpan < 1 || position.colSpan > 12) {\n errors.push({\n path: 'position.colSpan',\n message: 'Column span must be between 1 and 12',\n code: 'INVALID_GRID_COL_SPAN',\n })\n }\n\n if (position.colStart + position.colSpan - 1 > 12) {\n errors.push({\n path: 'position',\n message: 'Column start + span exceeds grid width (12)',\n code: 'GRID_OVERFLOW',\n })\n }\n\n if (position.rowStart !== undefined && position.rowStart < 1) {\n errors.push({\n path: 'position.rowStart',\n message: 'Row start must be >= 1',\n code: 'INVALID_GRID_ROW_START',\n })\n }\n\n if (position.rowSpan !== undefined && position.rowSpan < 1) {\n errors.push({\n path: 'position.rowSpan',\n message: 'Row span must be >= 1',\n code: 'INVALID_GRID_ROW_SPAN',\n })\n }\n\n return {\n valid: errors.length === 0,\n errors: errors.length > 0 ? errors : undefined,\n }\n}\n\n/**\n * Validate chart component against resource limits\n */\nexport function validateChartComponent(\n params: ChartComponentParams,\n limits: ResourceLimits = DEFAULT_RESOURCE_LIMITS\n): ValidationResult {\n const errors: ValidationResult['errors'] = []\n\n // Validate data points count\n const totalDataPoints = params.data.datasets.reduce(\n (sum, dataset) => sum + dataset.data.length,\n 0\n )\n\n if (totalDataPoints > limits.maxDataPoints) {\n errors.push({\n path: 'params.data',\n message: `Chart exceeds max data points: ${totalDataPoints} > ${limits.maxDataPoints}`,\n code: 'RESOURCE_LIMIT_EXCEEDED',\n })\n }\n\n // Validate labels match dataset length\n const expectedLength = params.data.labels.length\n for (const [index, dataset] of params.data.datasets.entries()) {\n if (dataset.data.length !== expectedLength) {\n errors.push({\n path: `params.data.datasets[${index}]`,\n message: `Dataset length mismatch: expected ${expectedLength}, got ${dataset.data.length}`,\n code: 'DATA_LENGTH_MISMATCH',\n })\n }\n }\n\n // Validate numeric data\n for (const [index, dataset] of params.data.datasets.entries()) {\n for (const [dataIndex, value] of dataset.data.entries()) {\n if (typeof value !== 'number' || !Number.isFinite(value)) {\n errors.push({\n path: `params.data.datasets[${index}].data[${dataIndex}]`,\n message: `Invalid data value: ${value} (must be finite number)`,\n code: 'INVALID_DATA_TYPE',\n })\n }\n }\n }\n\n return {\n valid: errors.length === 0,\n errors: errors.length > 0 ? errors : undefined,\n }\n}\n\n/**\n * Validate table component against resource limits\n */\nexport function validateTableComponent(\n params: TableComponentParams,\n limits: ResourceLimits = DEFAULT_RESOURCE_LIMITS\n): ValidationResult {\n const errors: ValidationResult['errors'] = []\n\n // Validate row count\n if (params.rows.length > limits.maxTableRows) {\n errors.push({\n path: 'params.rows',\n message: `Table exceeds max rows: ${params.rows.length} > ${limits.maxTableRows}`,\n code: 'RESOURCE_LIMIT_EXCEEDED',\n })\n }\n\n // Validate columns\n if (params.columns.length === 0) {\n errors.push({\n path: 'params.columns',\n message: 'Table must have at least one column',\n code: 'EMPTY_COLUMNS',\n })\n }\n\n // Validate column keys are unique\n const columnKeys = new Set<string>()\n for (const [index, column] of params.columns.entries()) {\n if (columnKeys.has(column.key)) {\n errors.push({\n path: `params.columns[${index}]`,\n message: `Duplicate column key: ${column.key}`,\n code: 'DUPLICATE_COLUMN_KEY',\n })\n }\n columnKeys.add(column.key)\n }\n\n // Validate rows have valid data for defined columns\n for (const [rowIndex, row] of params.rows.entries()) {\n for (const column of params.columns) {\n if (!(column.key in row)) {\n errors.push({\n path: `params.rows[${rowIndex}]`,\n message: `Missing column key: ${column.key}`,\n code: 'MISSING_COLUMN_DATA',\n })\n }\n }\n }\n\n return {\n valid: errors.length === 0,\n errors: errors.length > 0 ? errors : undefined,\n }\n}\n\n/**\n * Validate payload size\n */\nexport function validatePayloadSize(\n component: UIComponent,\n limits: ResourceLimits = DEFAULT_RESOURCE_LIMITS\n): ValidationResult {\n const payloadSize = JSON.stringify(component).length\n\n if (payloadSize > limits.maxPayloadSize) {\n return {\n valid: false,\n errors: [\n {\n path: 'component',\n message: `Payload size exceeds limit: ${payloadSize} > ${limits.maxPayloadSize} bytes`,\n code: 'PAYLOAD_TOO_LARGE',\n },\n ],\n }\n }\n\n return { valid: true }\n}\n\n/**\n * Sanitize string to prevent XSS\n * Basic implementation - DOMPurify used at render time\n */\nexport function sanitizeString(input: string): string {\n return input\n .replace(/<script\\b[^<]*(?:(?!<\\/script>)<[^<]*)*<\\/script>/gi, '')\n .replace(/on\\w+=\"[^\"]*\"/gi, '')\n .replace(/javascript:/gi, '')\n}\n\n/**\n * Validate iframe domain against whitelist\n */\nexport function validateIframeDomain(url: string): ValidationResult {\n try {\n const parsedUrl = new URL(url)\n const domain = parsedUrl.hostname\n\n const isAllowed = ALLOWED_IFRAME_DOMAINS.some(\n (allowed) => domain === allowed || domain.endsWith(`.${allowed}`) || allowed === 'localhost'\n )\n\n if (!isAllowed) {\n return {\n valid: false,\n errors: [\n {\n path: 'url',\n message: `Domain not whitelisted: ${domain}`,\n code: 'DOMAIN_NOT_WHITELISTED',\n },\n ],\n }\n }\n\n return { valid: true }\n } catch (error) {\n return {\n valid: false,\n errors: [\n {\n path: 'url',\n message: 'Invalid URL format',\n code: 'INVALID_URL',\n },\n ],\n }\n }\n}\n\n/**\n * Validate entire component\n */\nexport function validateComponent(\n component: UIComponent,\n limits: ResourceLimits = DEFAULT_RESOURCE_LIMITS\n): ValidationResult {\n const errors: ValidationResult['errors'] = []\n\n // Validate grid position\n const gridResult = validateGridPosition(component.position)\n if (!gridResult.valid) {\n errors.push(...(gridResult.errors || []))\n }\n\n // Validate payload size\n const sizeResult = validatePayloadSize(component, limits)\n if (!sizeResult.valid) {\n errors.push(...(sizeResult.errors || []))\n }\n\n // Type-specific validation\n switch (component.type) {\n case 'chart':\n const chartResult = validateChartComponent(component.params as ChartComponentParams, limits)\n if (!chartResult.valid) {\n errors.push(...(chartResult.errors || []))\n }\n break\n\n case 'table':\n const tableResult = validateTableComponent(component.params as TableComponentParams, limits)\n if (!tableResult.valid) {\n errors.push(...(tableResult.errors || []))\n }\n break\n\n case 'metric':\n // Basic validation for metrics\n const metricParams = component.params as any\n if (!metricParams.title || !metricParams.value) {\n errors.push({\n path: 'params',\n message: 'Metric must have title and value',\n code: 'INVALID_METRIC',\n })\n }\n break\n\n case 'text':\n // Basic validation for text\n const textParams = component.params as any\n if (!textParams.content) {\n errors.push({\n path: 'params',\n message: 'Text component must have content',\n code: 'INVALID_TEXT',\n })\n }\n break\n\n default:\n errors.push({\n path: 'type',\n message: `Unknown component type: ${component.type}`,\n code: 'UNKNOWN_COMPONENT_TYPE',\n })\n }\n\n return {\n valid: errors.length === 0,\n errors: errors.length > 0 ? errors : undefined,\n }\n}\n\n/**\n * Validate entire layout\n */\nexport function validateLayout(\n layout: UILayout,\n limits: ResourceLimits = DEFAULT_RESOURCE_LIMITS\n): ValidationResult {\n const errors: ValidationResult['errors'] = []\n\n // Validate component count\n if (layout.components.length === 0) {\n errors.push({\n path: 'components',\n message: 'Layout must have at least one component',\n code: 'EMPTY_LAYOUT',\n })\n }\n\n if (layout.components.length > 12) {\n errors.push({\n path: 'components',\n message: `Layout exceeds max components: ${layout.components.length} > 12`,\n code: 'TOO_MANY_COMPONENTS',\n })\n }\n\n // Validate each component\n for (const [index, component] of layout.components.entries()) {\n const result = validateComponent(component, limits)\n if (!result.valid) {\n errors.push(\n ...(result.errors?.map((error) => ({\n ...error,\n path: `components[${index}].${error.path}`,\n })) || [])\n )\n }\n }\n\n // Validate grid configuration\n if (layout.grid.columns !== 12) {\n errors.push({\n path: 'grid.columns',\n message: 'Grid must have 12 columns (Bootstrap-like)',\n code: 'INVALID_GRID_COLUMNS',\n })\n }\n\n return {\n valid: errors.length === 0,\n errors: errors.length > 0 ? errors : undefined,\n }\n}\n","/**\n * Generative UI Error Boundary with Telemetry\n * Phase 0: Error isolation + structured logging\n *\n * Features:\n * - Component-level error isolation\n * - Structured logging with context\n * - Performance timing\n * - Retry mechanism\n * - User-friendly fallback UI\n */\n\nimport { Component, ErrorBoundary, createSignal, Show } from 'solid-js'\nimport { createLogger } from '../utils/logger'\nimport type { RendererError } from '../types'\n\nconst logger = createLogger('generative-ui')\n\n/**\n * Props for GenerativeUIErrorBoundary\n */\nexport interface GenerativeUIErrorBoundaryProps {\n /**\n * Component identifier for telemetry\n */\n componentId: string\n\n /**\n * Component type for context\n */\n componentType: string\n\n /**\n * Error callback\n */\n onError?: (error: RendererError) => void\n\n /**\n * Allow retry on error\n */\n allowRetry?: boolean\n\n /**\n * Child components to wrap\n */\n children: any\n\n /**\n * Custom fallback UI (optional)\n */\n fallback?: (error: Error, retry?: () => void) => any\n}\n\n/**\n * Default fallback UI for errors\n */\nfunction DefaultErrorFallback(props: {\n error: Error\n componentId: string\n componentType: string\n allowRetry?: boolean\n onRetry?: () => void\n}) {\n return (\n <div class=\"w-full h-full bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4\">\n <div class=\"flex items-start gap-3\">\n <div class=\"flex-shrink-0\">\n <svg\n class=\"w-5 h-5 text-yellow-600 dark:text-yellow-400\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n />\n </svg>\n </div>\n <div class=\"flex-1 min-w-0\">\n <p class=\"text-sm font-medium text-yellow-900 dark:text-yellow-100\">\n Component Failed to Render\n </p>\n <p class=\"text-xs text-yellow-700 dark:text-yellow-300 mt-1\">\n Type: {props.componentType} | ID: {props.componentId.slice(0, 8)}...\n </p>\n <Show when={import.meta.env.DEV}>\n <p class=\"text-xs text-yellow-600 dark:text-yellow-400 mt-2 font-mono\">\n {props.error.message}\n </p>\n </Show>\n <Show when={props.allowRetry}>\n <button\n onClick={props.onRetry}\n class=\"mt-3 text-xs font-medium text-yellow-800 dark:text-yellow-200 hover:text-yellow-900 dark:hover:text-yellow-100 underline\"\n >\n Retry Rendering\n </button>\n </Show>\n </div>\n </div>\n </div>\n )\n}\n\n/**\n * Generative UI Error Boundary Component\n */\nexport const GenerativeUIErrorBoundary: Component<GenerativeUIErrorBoundaryProps> = (props) => {\n const [retryKey, setRetryKey] = createSignal(0)\n const [renderStartTime] = createSignal(performance.now())\n\n // Handle error with telemetry\n const handleError = (error: Error) => {\n const renderEndTime = performance.now()\n const renderDuration = renderEndTime - renderStartTime()\n\n // Structure error context\n const errorContext = {\n componentId: props.componentId,\n componentType: props.componentType,\n errorMessage: error.message,\n errorStack: error.stack,\n renderDuration,\n retryCount: retryKey(),\n timestamp: new Date().toISOString(),\n userAgent: navigator.userAgent,\n viewport: {\n width: window.innerWidth,\n height: window.innerHeight,\n },\n }\n\n // Log to structured logger\n logger.error(`Component render failed: ${props.componentType}`, errorContext)\n\n // Call error callback\n props.onError?.({\n type: 'render',\n message: error.message,\n componentId: props.componentId,\n details: errorContext,\n })\n\n // In production, send to monitoring service\n if (import.meta.env.PROD) {\n // Future: Send to Sentry or other APM\n // Sentry.captureException(error, { contexts: { component: errorContext } })\n }\n }\n\n // Retry mechanism\n const handleRetry = () => {\n const newRetryCount = retryKey() + 1\n logger.info(`Retrying component render: ${props.componentType}`, {\n componentId: props.componentId,\n retryCount: newRetryCount,\n })\n setRetryKey(newRetryCount)\n }\n\n return (\n <ErrorBoundary\n fallback={(error) => {\n handleError(error)\n\n // Use custom fallback if provided\n if (props.fallback) {\n return props.fallback(error, props.allowRetry ? handleRetry : undefined)\n }\n\n // Default fallback\n return (\n <DefaultErrorFallback\n error={error}\n componentId={props.componentId}\n componentType={props.componentType}\n allowRetry={props.allowRetry}\n onRetry={handleRetry}\n />\n )\n }}\n >\n {/* Key prop for forcing remount on retry */}\n {(() => {\n const _ = retryKey() // Access signal to track changes\n return <>{props.children}</>\n })()}\n </ErrorBoundary>\n )\n}\n\n/**\n * Performance monitoring wrapper\n * Logs render times for performance analysis\n */\nexport function withPerformanceMonitoring<P extends { componentId: string; componentType: string }>(\n WrappedComponent: Component<P>\n) {\n return (props: P) => {\n const renderStart = performance.now()\n\n // Log render start\n logger.debug(`Component render start: ${props.componentType}`, {\n componentId: props.componentId,\n timestamp: new Date().toISOString(),\n })\n\n // Measure on mount completion\n if (typeof window !== 'undefined') {\n requestAnimationFrame(() => {\n const renderEnd = performance.now()\n const duration = renderEnd - renderStart\n\n logger.info(`Component rendered: ${props.componentType}`, {\n componentId: props.componentId,\n renderDuration: duration,\n timestamp: new Date().toISOString(),\n })\n\n // Warn if render is slow (>50ms target)\n if (duration > 50) {\n logger.warn(`Slow component render: ${props.componentType}`, {\n componentId: props.componentId,\n renderDuration: duration,\n threshold: 50,\n })\n }\n })\n }\n\n return <WrappedComponent {...props} />\n }\n}\n\n/**\n * Hook to track component lifecycle events\n */\nexport function useComponentTelemetry(componentId: string, componentType: string) {\n const mountTime = performance.now()\n\n // Log mount\n logger.debug(`Component mounted: ${componentType}`, {\n componentId,\n timestamp: new Date().toISOString(),\n })\n\n // Return cleanup function for unmount\n return () => {\n const lifetime = performance.now() - mountTime\n logger.debug(`Component unmounted: ${componentType}`, {\n componentId,\n lifetime,\n timestamp: new Date().toISOString(),\n })\n }\n}\n","/**\n * UI Resource Renderer Component\n * Phase 0: Foundation with iframe sandbox and composite grid support\n *\n * Security features:\n * - Sandboxed iframes for untrusted content\n * - CSP enforcement via middleware\n * - XSS prevention with DOMPurify\n * - Domain whitelist validation\n *\n * Performance:\n * - Lazy loading with Intersection Observer\n * - Render timeout enforcement\n * - Error boundaries for isolation\n */\n\nimport { Component, createSignal, onMount, Show, For } from 'solid-js'\nimport type { UIComponent, UILayout, RendererError, ComponentType } from '../types'\nimport { validateComponent, DEFAULT_RESOURCE_LIMITS } from '../services/validation'\nimport { GenerativeUIErrorBoundary } from './GenerativeUIErrorBoundary'\n\n/**\n * Props for UIResourceRenderer\n */\nexport interface UIResourceRendererProps {\n /**\n * Single component or full layout to render\n */\n content: UIComponent | UILayout\n\n /**\n * Lazy loading (default: true)\n */\n lazyLoad?: boolean\n\n /**\n * Error callback\n */\n onError?: (error: RendererError) => void\n\n /**\n * Custom CSS class\n */\n class?: string\n}\n\n/**\n * Render a single chart component in a sandboxed iframe\n */\nfunction ChartRenderer(props: {\n component: UIComponent\n onError?: (error: RendererError) => void\n}) {\n const [iframeUrl, setIframeUrl] = createSignal<string>()\n const [isLoading, setIsLoading] = createSignal(true)\n const [error, setError] = createSignal<string>()\n\n onMount(() => {\n const chartParams = props.component.params as any\n\n // Build Quickchart URL\n const chartConfig = {\n type: chartParams.type,\n data: chartParams.data,\n options: {\n ...chartParams.options,\n responsive: true,\n maintainAspectRatio: false,\n },\n }\n\n // Encode chart configuration for Quickchart API\n const configStr = encodeURIComponent(JSON.stringify(chartConfig))\n const url = `https://quickchart.io/chart?c=${configStr}&width=500&height=300&devicePixelRatio=2`\n\n // Validate domain (should always pass for quickchart.io)\n setIframeUrl(url)\n setIsLoading(false)\n })\n\n return (\n <div class=\"relative w-full h-full min-h-[300px] bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden\">\n <Show when={isLoading()}>\n <div class=\"absolute inset-0 flex items-center justify-center\">\n <div class=\"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600\" />\n </div>\n </Show>\n\n <Show when={error()}>\n <div class=\"absolute inset-0 flex items-center justify-center p-4\">\n <div class=\"text-center\">\n <p class=\"text-red-600 dark:text-red-400 text-sm font-medium\">Chart Error</p>\n <p class=\"text-gray-600 dark:text-gray-400 text-xs mt-1\">{error()}</p>\n </div>\n </div>\n </Show>\n\n <Show when={iframeUrl() && !error()}>\n <div class=\"w-full h-full p-4\">\n <Show when={(props.component.params as any).title}>\n <h3 class=\"text-sm font-semibold text-gray-900 dark:text-white mb-3\">\n {(props.component.params as any).title}\n </h3>\n </Show>\n <div class=\"w-full h-full\">\n <img\n src={iframeUrl()}\n alt=\"Chart visualization\"\n class=\"w-full h-auto max-h-[300px] object-contain\"\n onError={() => {\n setError('Failed to load chart')\n props.onError?.({\n type: 'render',\n message: 'Chart rendering failed',\n componentId: props.component.id,\n })\n }}\n />\n </div>\n </div>\n </Show>\n </div>\n )\n}\n\n/**\n * Render a table component\n */\nfunction TableRenderer(props: {\n component: UIComponent\n onError?: (error: RendererError) => void\n}) {\n const tableParams = props.component.params as any\n\n return (\n <div class=\"w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden\">\n <div class=\"p-4\">\n <Show when={tableParams.title}>\n <h3 class=\"text-sm font-semibold text-gray-900 dark:text-white mb-3\">\n {tableParams.title}\n </h3>\n </Show>\n\n <div class=\"overflow-x-auto\">\n <table class=\"min-w-full divide-y divide-gray-200 dark:divide-gray-700\">\n <thead class=\"bg-gray-50 dark:bg-gray-900\">\n <tr>\n <For each={tableParams.columns}>\n {(column: any) => (\n <th\n scope=\"col\"\n class=\"px-4 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider\"\n style={column.width ? { width: column.width } : {}}\n >\n {column.label}\n </th>\n )}\n </For>\n </tr>\n </thead>\n <tbody class=\"bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700\">\n <For each={tableParams.rows.slice(0, DEFAULT_RESOURCE_LIMITS.maxTableRows)}>\n {(row: any) => (\n <tr class=\"hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors\">\n <For each={tableParams.columns}>\n {(column: any) => (\n <td class=\"px-4 py-3 text-sm text-gray-900 dark:text-gray-100 whitespace-nowrap\">\n {row[column.key] || '-'}\n </td>\n )}\n </For>\n </tr>\n )}\n </For>\n </tbody>\n </table>\n </div>\n\n <Show when={tableParams.pagination}>\n <div class=\"mt-3 flex items-center justify-between text-xs text-gray-500 dark:text-gray-400\">\n <span>\n Showing {tableParams.pagination.currentPage * tableParams.pagination.pageSize + 1} -{' '}\n {Math.min(\n (tableParams.pagination.currentPage + 1) * tableParams.pagination.pageSize,\n tableParams.pagination.totalRows\n )}{' '}\n of {tableParams.pagination.totalRows}\n </span>\n </div>\n </Show>\n </div>\n </div>\n )\n}\n\n/**\n * Render a metric card component\n */\nfunction MetricRenderer(props: { component: UIComponent }) {\n const metricParams = props.component.params as any\n\n return (\n <div class=\"w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 p-4\">\n <div class=\"flex flex-col h-full justify-between\">\n <div>\n <p class=\"text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide\">\n {metricParams.title}\n </p>\n <div class=\"mt-2 flex items-baseline\">\n <p class=\"text-2xl font-semibold text-gray-900 dark:text-white\">{metricParams.value}</p>\n <Show when={metricParams.unit}>\n <span class=\"ml-2 text-sm font-medium text-gray-500 dark:text-gray-400\">\n {metricParams.unit}\n </span>\n </Show>\n </div>\n </div>\n\n <Show when={metricParams.trend}>\n <div class=\"mt-3 flex items-center\">\n <span\n class={`text-sm font-medium ${\n metricParams.trend.direction === 'up'\n ? 'text-green-600 dark:text-green-400'\n : metricParams.trend.direction === 'down'\n ? 'text-red-600 dark:text-red-400'\n : 'text-gray-600 dark:text-gray-400'\n }`}\n >\n {metricParams.trend.direction === 'up'\n ? '�'\n : metricParams.trend.direction === 'down'\n ? '�'\n : '�'}{' '}\n {Math.abs(metricParams.trend.value)}%\n </span>\n </div>\n </Show>\n\n <Show when={metricParams.subtitle}>\n <p class=\"mt-2 text-xs text-gray-500 dark:text-gray-400\">{metricParams.subtitle}</p>\n </Show>\n </div>\n </div>\n )\n}\n\n/**\n * Render a text component (with optional markdown)\n */\nfunction TextRenderer(props: { component: UIComponent }) {\n const textParams = props.component.params as any\n\n return (\n <div class=\"w-full h-full bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 p-4\">\n <div\n class={`prose prose-sm dark:prose-invert max-w-none ${textParams.className || ''}`}\n innerHTML={textParams.content} // Note: Should be sanitized at generation time\n />\n </div>\n )\n}\n\n/**\n * Render a single component with error boundary\n */\nfunction ComponentRenderer(props: {\n component: UIComponent\n onError?: (error: RendererError) => void\n}) {\n // Validate component before rendering\n const validation = validateComponent(props.component)\n if (!validation.valid) {\n props.onError?.({\n type: 'validation',\n message: 'Component validation failed',\n componentId: props.component.id,\n details: validation.errors,\n })\n\n return (\n <div class=\"w-full h-full bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4\">\n <p class=\"text-sm font-medium text-red-900 dark:text-red-100\">Validation Error</p>\n <p class=\"text-xs text-red-700 dark:text-red-300 mt-1\">\n {validation.errors?.[0]?.message || 'Unknown validation error'}\n </p>\n </div>\n )\n }\n\n // Render based on component type with enhanced error boundary\n return (\n <GenerativeUIErrorBoundary\n componentId={props.component.id}\n componentType={props.component.type}\n onError={props.onError}\n allowRetry={true}\n >\n <Show when={props.component.type === 'chart'}>\n <ChartRenderer component={props.component} onError={props.onError} />\n </Show>\n <Show when={props.component.type === 'table'}>\n <TableRenderer component={props.component} onError={props.onError} />\n </Show>\n <Show when={props.component.type === 'metric'}>\n <MetricRenderer component={props.component} />\n </Show>\n <Show when={props.component.type === 'text'}>\n <TextRenderer component={props.component} />\n </Show>\n </GenerativeUIErrorBoundary>\n )\n}\n\n/**\n * Main UIResourceRenderer component\n */\nexport const UIResourceRenderer: Component<UIResourceRendererProps> = (props) => {\n const layout = () => {\n // Convert single component to layout\n if ('type' in props.content) {\n return {\n id: 'single-component',\n components: [props.content as UIComponent],\n grid: {\n columns: 12,\n gap: '1rem',\n },\n } as UILayout\n }\n return props.content as UILayout\n }\n\n // Grid position to CSS Grid styles\n const getGridStyles = (component: UIComponent) => {\n const { colStart, colSpan, rowStart, rowSpan = 1 } = component.position\n\n return {\n 'grid-column': `${colStart} / span ${colSpan}`,\n 'grid-row': rowStart ? `${rowStart} / span ${rowSpan}` : 'auto',\n }\n }\n\n return (\n <div class={`w-full ${props.class || ''}`}>\n <div\n class=\"grid gap-4\"\n style={{\n 'grid-template-columns': `repeat(${layout().grid.columns}, 1fr)`,\n gap: layout().grid.gap,\n }}\n >\n <For each={layout().components}>\n {(component) => (\n <div style={getGridStyles(component)}>\n <ComponentRenderer component={component} onError={props.onError} />\n </div>\n )}\n </For>\n </div>\n </div>\n )\n}\n","/**\n * StreamingUIRenderer Component - Phase 2\n *\n * Renders streaming dashboard components with skeleton states and progress indicators.\n * Uses the useStreamingUI hook for SSE connection and state management.\n *\n * Features:\n * - Skeleton loading states while components stream\n * - Progress bar and status messages\n * - Smooth component animations on arrival\n * - Error handling with retry capability\n * - Responsive 12-column grid layout\n *\n * Usage:\n * ```tsx\n * <StreamingUIRenderer\n * query=\"Show me revenue trends\"\n * spaceIds={['uuid1', 'uuid2']}\n * onComplete={(metadata) => console.log('Done!', metadata)}\n * />\n * ```\n */\n\nimport { Show, For, createSignal } from 'solid-js'\nimport { useStreamingUI, type UseStreamingUIOptions } from '../hooks/useStreamingUI'\nimport type { UIComponent, RendererError } from '../types'\nimport { validateComponent } from '../services/validation'\nimport { GenerativeUIErrorBoundary } from './GenerativeUIErrorBoundary'\n\nexport interface StreamingUIRendererProps extends UseStreamingUIOptions {\n class?: string\n showProgress?: boolean\n showMetadata?: boolean\n onRenderError?: (error: RendererError) => void\n}\n\n/**\n * Component Renderer - Inline lightweight version\n * (Full implementation in UIResourceRenderer)\n */\nfunction StreamingComponentRenderer(props: {\n component: UIComponent\n onError?: (error: RendererError) => void\n}) {\n // Validate component before rendering\n const validation = validateComponent(props.component)\n if (!validation.valid) {\n props.onError?.({\n type: 'validation',\n message: 'Component validation failed',\n componentId: props.component.id,\n details: validation.errors,\n })\n\n return (\n <div class=\"w-full bg-error-subtle border border-border-error rounded-lg p-4\">\n <p class=\"text-sm font-medium text-error-primary\">Validation Error</p>\n <p class=\"text-xs text-text-secondary mt-1\">\n {validation.errors?.[0]?.message || 'Unknown validation error'}\n </p>\n </div>\n )\n }\n\n // Simplified renderer - just show component type and title\n // Full rendering logic in UIResourceRenderer\n const params = props.component.params as any\n\n return (\n <GenerativeUIErrorBoundary\n componentId={props.component.id}\n componentType={props.component.type}\n onError={props.onError}\n allowRetry={false}\n >\n <div class=\"w-full bg-surface-secondary border border-border-subtle rounded-lg p-4\">\n <div class=\"flex items-center gap-2 mb-2\">\n <span class=\"text-xs font-medium text-text-tertiary uppercase\">\n {props.component.type}\n </span>\n </div>\n <Show when={params?.title}>\n <h3 class=\"text-sm font-semibold text-text-primary\">{params.title}</h3>\n </Show>\n <Show when={props.component.type === 'metric' && params?.value}>\n <div class=\"mt-2\">\n <p class=\"text-2xl font-semibold text-text-primary\">{params.value}</p>\n <Show when={params.unit}>\n <span class=\"text-sm text-text-secondary\">{params.unit}</span>\n </Show>\n </div>\n </Show>\n <div class=\"mt-3 text-xs text-text-tertiary\">\n Component ID: {props.component.id.slice(0, 8)}...\n </div>\n </div>\n </GenerativeUIErrorBoundary>\n )\n}\n\nexport function StreamingUIRenderer(props: StreamingUIRendererProps) {\n const { components, isLoading, isStreaming, error, progress, metadata, startStreaming } =\n useStreamingUI({\n query: props.query,\n spaceIds: props.spaceIds,\n sessionId: props.sessionId,\n options: props.options,\n onComplete: props.onComplete,\n onError: props.onError,\n onComponentReceived: props.onComponentReceived,\n })\n\n const [animatingComponents, setAnimatingComponents] = createSignal<Set<string>>(new Set())\n\n // Track new components for animation\n const handleComponentRender = (componentId: string) => {\n setAnimatingComponents((prev) => new Set([...prev, componentId]))\n\n // Remove from animating set after animation completes\n setTimeout(() => {\n setAnimatingComponents((prev) => {\n const next = new Set(prev)\n next.delete(componentId)\n return next\n })\n }, 500)\n }\n\n return (\n <div class={`streaming-ui-renderer ${props.class || ''}`}>\n {/* Progress Bar */}\n <Show when={props.showProgress !== false && (isLoading() || isStreaming())}>\n <div class=\"mb-4 rounded-lg border border-border-subtle bg-surface-secondary p-4\">\n {/* Status Message */}\n <div class=\"mb-2 flex items-center justify-between\">\n <span class=\"text-sm font-medium text-text-primary\">{progress().message}</span>\n <Show when={progress().totalCount !== null}>\n <span class=\"text-sm text-text-secondary\">\n {progress().receivedCount} / {progress().totalCount}\n </span>\n </Show>\n </div>\n\n {/* Progress Bar */}\n <div class=\"h-2 w-full overflow-hidden rounded-full bg-surface-tertiary\">\n <div\n class=\"h-full bg-brand-primary transition-all duration-300 ease-out\"\n style={{\n width:\n progress().totalCount !== null\n ? `${(progress().receivedCount / progress().totalCount!) * 100}%`\n : '0%',\n }}\n />\n </div>\n\n {/* Indeterminate Progress (when totalCount unknown) */}\n <Show when={progress().totalCount === null && isStreaming()}>\n <div class=\"mt-2\">\n <div class=\"h-1 w-full overflow-hidden rounded-full bg-surface-tertiary\">\n <div class=\"animate-progress-indeterminate h-full w-1/3 bg-brand-primary\" />\n </div>\n </div>\n </Show>\n </div>\n </Show>\n\n {/* Error State */}\n <Show when={error()}>\n <div class=\"mb-4 rounded-lg border border-border-error bg-error-subtle p-4\">\n <div class=\"mb-2 flex items-center gap-2\">\n <svg\n class=\"h-5 w-5 text-error-primary\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n />\n </svg>\n <span class=\"font-medium text-error-primary\">{error()?.error}</span>\n </div>\n <p class=\"text-sm text-text-secondary\">{error()?.message}</p>\n\n {/* Retry Button (if recoverable) */}\n <Show when={error()?.recoverable}>\n <button\n type=\"button\"\n class=\"mt-3 rounded-md bg-error-primary px-3 py-1.5 text-sm font-medium text-white hover:bg-error-hover\"\n onClick={() => startStreaming()}\n >\n Retry\n </button>\n </Show>\n </div>\n </Show>\n\n {/* Components Grid */}\n <div class=\"grid grid-cols-12 gap-4\">\n {/* Render received components */}\n <For each={components()}>\n {(component) => (\n <div\n ref={() => handleComponentRender(component.id)}\n class={`\n col-span-${component.position.colSpan}\n ${animatingComponents().has(component.id) ? 'animate-fade-in-up' : ''}\n `}\n style={{\n 'grid-column-start': component.position.colStart,\n 'grid-column-end': component.position.colStart + component.position.colSpan,\n }}\n >\n <StreamingComponentRenderer component={component} onError={props.onRenderError} />\n </div>\n )}\n </For>\n\n {/* Skeleton placeholders (if streaming and expecting more) */}\n <Show when={isStreaming() && progress().totalCount !== null}>\n <For\n each={Array.from({\n length: progress().totalCount! - progress().receivedCount,\n })}\n >\n {() => <SkeletonComponent />}\n </For>\n </Show>\n </div>\n\n {/* Metadata Display */}\n <Show when={props.showMetadata !== false && metadata()}>\n <div class=\"mt-6 rounded-lg border border-border-subtle bg-surface-secondary p-4 text-sm text-text-secondary\">\n <div class=\"grid grid-cols-2 gap-4 md:grid-cols-4\">\n <div>\n <div class=\"font-medium text-text-primary\">Provider</div>\n <div>{metadata()?.provider}</div>\n </div>\n <div>\n <div class=\"font-medium text-text-primary\">Model</div>\n <div>{metadata()?.model}</div>\n </div>\n <div>\n <div class=\"font-medium text-text-primary\">Execution Time</div>\n <div>{metadata()?.executionTimeMs}ms</div>\n </div>\n <Show when={metadata()?.costUSD !== undefined}>\n <div>\n <div class=\"font-medium text-text-primary\">Cost</div>\n <div>${metadata()?.costUSD?.toFixed(4)}</div>\n </div>\n </Show>\n <div>\n <div class=\"font-medium text-text-primary\">TTFB</div>\n <div>{metadata()?.firstTokenMs}ms</div>\n </div>\n <Show when={metadata()?.cached}>\n <div>\n <div class=\"font-medium text-text-primary\">Cached</div>\n <div class=\"text-success-primary\">Yes</div>\n </div>\n </Show>\n </div>\n </div>\n </Show>\n </div>\n )\n}\n\n/**\n * Skeleton Component - Placeholder while components load\n */\nfunction SkeletonComponent() {\n return (\n <div class=\"col-span-12 md:col-span-6 lg:col-span-4\">\n <div class=\"animate-pulse rounded-lg border border-border-subtle bg-surface-secondary p-4\">\n {/* Header skeleton */}\n <div class=\"mb-4 h-6 w-1/2 rounded bg-surface-tertiary\" />\n\n {/* Content skeleton */}\n <div class=\"space-y-3\">\n <div class=\"h-4 rounded bg-surface-tertiary\" />\n <div class=\"h-4 w-5/6 rounded bg-surface-tertiary\" />\n <div class=\"h-4 w-4/6 rounded bg-surface-tertiary\" />\n </div>\n\n {/* Chart/visual skeleton */}\n <div class=\"mt-4 h-32 rounded bg-surface-tertiary\" />\n </div>\n </div>\n )\n}\n\n// CSS Animations (add to global styles or Tailwind config)\n/*\n@keyframes fade-in-up {\n from {\n opacity: 0;\n transform: translateY(10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@keyframes progress-indeterminate {\n 0% {\n transform: translateX(-100%);\n }\n 100% {\n transform: translateX(400%);\n }\n}\n\n.animate-fade-in-up {\n animation: fade-in-up 0.5s ease-out;\n}\n\n.animate-progress-indeterminate {\n animation: progress-indeterminate 1.5s infinite ease-in-out;\n}\n*/\n"],"names":["DEFAULT_RESOURCE_LIMITS","validateGridPosition","position","errors","validateChartComponent","params","limits","totalDataPoints","sum","dataset","expectedLength","index","dataIndex","value","validateTableComponent","columnKeys","column","rowIndex","row","validatePayloadSize","component","payloadSize","validateComponent","gridResult","sizeResult","chartResult","tableResult","metricParams","validateLayout","layout","result","_a","error","logger","createLogger","DefaultErrorFallback","props","_el$","_tmpl$3","_el$2","firstChild","_el$3","_el$4","nextSibling","_el$5","_el$6","_el$7","_el$0","_el$8","_el$1","_$insert","componentType","componentId","slice","_$createComponent","Show","when","import","children","_el$10","_tmpl$","message","allowRetry","_el$11","_tmpl$2","_$addEventListener","onRetry","GenerativeUIErrorBoundary","retryKey","setRetryKey","createSignal","renderStartTime","performance","now","handleError","renderDuration","errorContext","errorMessage","errorStack","stack","retryCount","timestamp","Date","toISOString","userAgent","navigator","viewport","width","window","innerWidth","height","innerHeight","onError","type","details","handleRetry","newRetryCount","info","ErrorBoundary","fallback","undefined","_$memo","_$delegateEvents","ChartRenderer","iframeUrl","setIframeUrl","isLoading","setIsLoading","setError","onMount","chartParams","chartConfig","data","options","responsive","maintainAspectRatio","url","encodeURIComponent","JSON","stringify","_tmpl$5","_tmpl$4","_el$9","title","addEventListener","id","_$effect","_$setAttribute","TableRenderer","tableParams","_tmpl$7","_el$12","_el$13","_el$14","_el$15","_el$16","For","each","columns","_el$26","_tmpl$8","label","_$p","_$style","rows","maxTableRows","_el$27","_tmpl$9","_el$28","_tmpl$0","key","pagination","_el$17","_tmpl$6","_el$18","_el$19","_el$24","_el$20","_el$25","currentPage","pageSize","Math","min","totalRows","MetricRenderer","_el$29","_tmpl$12","_el$30","_el$31","_el$32","_el$33","_el$34","unit","_el$35","_tmpl$1","trend","_el$36","_tmpl$10","_el$37","_el$38","_el$40","_c$","direction","abs","_$className","subtitle","_el$41","_tmpl$11","TextRenderer","textParams","_el$42","_tmpl$13","_el$43","_p$","_v$","className","_v$2","content","e","t","innerHTML","ComponentRenderer","validation","valid","_el$44","_tmpl$14","_el$45","_el$46","UIResourceRenderer","components","grid","gap","getGridStyles","colStart","colSpan","rowStart","rowSpan","_el$47","_tmpl$15","_el$48","_el$49","_tmpl$16","_v$3","class","_v$4","_v$5","_$setStyleProperty","a","StreamingComponentRenderer","StreamingUIRenderer","isStreaming","progress","metadata","startStreaming","useStreamingUI","query","spaceIds","sessionId","onComplete","onComponentReceived","animatingComponents","setAnimatingComponents","Set","handleComponentRender","prev","setTimeout","next","delete","showProgress","totalCount","receivedCount","_el$22","_el$23","recoverable","$$click","_el$50","_$use","onRenderError","has","Array","from","length","SkeletonComponent","showMetadata","_el$39","provider","model","executionTimeMs","costUSD","toFixed","firstTokenMs","cached"],"mappings":";;;AAsBO,MAAMA,IAA0C;AAAA,EACrD,eAAe;AAAA,EACf,cAAc;AAAA,EACd,gBAAgB,KAAK;AAAA;AAAA,EACrB,eAAe;AAAA;AACjB;AAiBO,SAASC,GAAqBC,GAAqD;AACxF,QAAMC,IAAqC,CAAA;AAE3C,UAAID,EAAS,WAAW,KAAKA,EAAS,WAAW,OAC/CC,EAAO,KAAK;AAAA,IACV,MAAM;AAAA,IACN,SAAS;AAAA,IACT,MAAM;AAAA,EAAA,CACP,IAGCD,EAAS,UAAU,KAAKA,EAAS,UAAU,OAC7CC,EAAO,KAAK;AAAA,IACV,MAAM;AAAA,IACN,SAAS;AAAA,IACT,MAAM;AAAA,EAAA,CACP,GAGCD,EAAS,WAAWA,EAAS,UAAU,IAAI,MAC7CC,EAAO,KAAK;AAAA,IACV,MAAM;AAAA,IACN,SAAS;AAAA,IACT,MAAM;AAAA,EAAA,CACP,GAGCD,EAAS,aAAa,UAAaA,EAAS,WAAW,KACzDC,EAAO,KAAK;AAAA,IACV,MAAM;AAAA,IACN,SAAS;AAAA,IACT,MAAM;AAAA,EAAA,CACP,GAGCD,EAAS,YAAY,UAAaA,EAAS,UAAU,KACvDC,EAAO,KAAK;AAAA,IACV,MAAM;AAAA,IACN,SAAS;AAAA,IACT,MAAM;AAAA,EAAA,CACP,GAGI;AAAA,IACL,OAAOA,EAAO,WAAW;AAAA,IACzB,QAAQA,EAAO,SAAS,IAAIA,IAAS;AAAA,EAAA;AAEzC;AAKO,SAASC,GACdC,GACAC,IAAyBN,GACP;AAClB,QAAMG,IAAqC,CAAA,GAGrCI,IAAkBF,EAAO,KAAK,SAAS;AAAA,IAC3C,CAACG,GAAKC,MAAYD,IAAMC,EAAQ,KAAK;AAAA,IACrC;AAAA,EAAA;AAGF,EAAIF,IAAkBD,EAAO,iBAC3BH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,GAAI;AAAA,UAAA,IAACC,OAAI;;AAAA,oBAAEgL,IAAAA,QAAAA,gBAAAA,EAAYuC;AAAAA,UAAM;AAAA,UAAA,IAAArN,WAAA;AAAA,mBAAAuH,GAAAA;AAAAA,UAAA;AAAA,QAAA,CAAA,GAAA,IAAA,GAAAZ;AAAAA,MAAA;AAAA,IAAA,CAAA,GAAA,IAAA,GAAAvC,EAAA,MAAA0D,EAAApD,GAnI1B,yBAAyBhG,EAAM2L,SAAS,EAAE,EAAE,CAAA,GAAA3F;AAAAA,EAAA,GAAA;AA8I5D;AAKA,SAASkI,KAAoB;AAC3B,SAAAzD,GAAAA;AAkBF;AAGAvG,EAAA,CAAA,OAAA,CAAA;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./StreamingUIRenderer-DQ1WoVV6.cjs");exports.GenerativeUIErrorBoundary=e.GenerativeUIErrorBoundary;exports.StreamingUIRenderer=e.StreamingUIRenderer;exports.UIResourceRenderer=e.UIResourceRenderer;
|
|
2
|
+
//# sourceMappingURL=components.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/hooks.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/hooks.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./StreamingUIRenderer-DQ1WoVV6.cjs"),t=require("./useStreamingUI-CXmvpRhz.cjs"),r={type:"chart",name:"Quickchart",description:"Render charts using Quickchart.io API. Supports bar, line, pie, doughnut, radar, and scatter charts. Best for visualizing numerical data with 2-10 data series and up to 1000 data points.",schema:{type:"object",properties:{type:{type:"string",enum:["bar","line","pie","doughnut","radar","scatter"],description:"Chart type"},title:{type:"string",description:"Chart title (optional)"},data:{type:"object",properties:{labels:{type:"array",items:{type:"string"},description:"X-axis labels"},datasets:{type:"array",items:{type:"object",properties:{label:{type:"string"},data:{type:"array",items:{type:"number"}},backgroundColor:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},borderColor:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]},borderWidth:{type:"number"}},required:["label","data"]}}},required:["labels","datasets"]},options:{type:"object",description:"Chart.js options for customization"}},required:["type","data"]},examples:[{query:"Show me document types distribution",component:{id:"example-bar-1",type:"chart",position:{colStart:1,colSpan:6},params:{type:"bar",title:"Document Types",data:{labels:["PDF","DOCX","TXT","XLSX"],datasets:[{label:"Count",data:[245,189,123,98],backgroundColor:["rgba(59, 130, 246, 0.8)"]}]}}}},{query:"Display upload trends over the last week",component:{id:"example-line-1",type:"chart",position:{colStart:1,colSpan:6},params:{type:"line",title:"Upload Trends",data:{labels:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],datasets:[{label:"Uploads",data:[42,38,51,47,63,29,15],borderColor:"rgb(59, 130, 246)"}]},options:{tension:.4}}}}],limits:e.DEFAULT_RESOURCE_LIMITS},a={type:"table",name:"DataTable",description:"Render tabular data with sortable columns and pagination. Best for displaying structured records with up to 100 rows. Supports column width customization and cell formatting.",schema:{type:"object",properties:{title:{type:"string",description:"Table title (optional)"},columns:{type:"array",items:{type:"object",properties:{key:{type:"string",description:"Data key for this column"},label:{type:"string",description:"Column header label"},sortable:{type:"boolean",description:"Whether column is sortable"},width:{type:"string",description:'CSS width (e.g., "30%")'}},required:["key","label"]},minItems:1},rows:{type:"array",items:{type:"object",description:"Row data matching column keys"},maxItems:100},pagination:{type:"object",properties:{currentPage:{type:"number"},pageSize:{type:"number"},totalRows:{type:"number"}}}},required:["columns","rows"]},examples:[{query:"Show me the most recent documents",component:{id:"example-table-1",type:"table",position:{colStart:1,colSpan:8},params:{title:"Recent Documents",columns:[{key:"name",label:"Name",sortable:!0,width:"40%"},{key:"type",label:"Type",sortable:!0,width:"15%"},{key:"size",label:"Size",width:"15%"},{key:"modified",label:"Modified",sortable:!0,width:"30%"}],rows:[{name:"Report.pdf",type:"PDF",size:"2.4 MB",modified:"2 hours ago"},{name:"Slides.pptx",type:"PPTX",size:"8.7 MB",modified:"1 day ago"}]}}}],limits:e.DEFAULT_RESOURCE_LIMITS},i={type:"metric",name:"MetricCard",description:"Display a single metric with optional trend indicator. Best for KPIs, statistics, and summary numbers. Supports trend direction (up/down/neutral) and subtitles.",schema:{type:"object",properties:{title:{type:"string",description:"Metric title"},value:{oneOf:[{type:"string"},{type:"number"}],description:"Metric value"},unit:{type:"string",description:"Unit of measurement (optional)"},trend:{type:"object",properties:{value:{type:"number",description:"Percentage change"},direction:{type:"string",enum:["up","down","neutral"]}}},subtitle:{type:"string",description:"Additional context (optional)"}},required:["title","value"]},examples:[{query:"Show total document count",component:{id:"example-metric-1",type:"metric",position:{colStart:1,colSpan:3},params:{title:"Total Documents",value:"1,247",trend:{value:12.5,direction:"up"},subtitle:"+142 this month"}}}],limits:{maxDataPoints:1,maxTableRows:1,maxPayloadSize:5*1024,renderTimeout:1e3}},o={type:"text",name:"TextBlock",description:"Render text content with optional markdown support. Best for explanations, summaries, and context. Supports basic HTML formatting.",schema:{type:"object",properties:{content:{type:"string",description:"Text content (HTML allowed, will be sanitized)"},markdown:{type:"boolean",description:"Whether content is markdown (not yet implemented)"},className:{type:"string",description:"Custom CSS classes"}},required:["content"]},examples:[{query:"Explain the document distribution",component:{id:"example-text-1",type:"text",position:{colStart:1,colSpan:12},params:{content:"<p>Your document library contains <strong>1,247 files</strong> across 5 different formats. PDFs represent the largest category at 35% of total storage.</p>"}}}],limits:{maxDataPoints:1,maxTableRows:1,maxPayloadSize:10*1024,renderTimeout:1e3}},n=new Map([["chart",r],["table",a],["metric",i],["text",o]]);exports.DEFAULT_RESOURCE_LIMITS=e.DEFAULT_RESOURCE_LIMITS;exports.GenerativeUIErrorBoundary=e.GenerativeUIErrorBoundary;exports.StreamingUIRenderer=e.StreamingUIRenderer;exports.UIResourceRenderer=e.UIResourceRenderer;exports.validateComponent=e.validateComponent;exports.validateLayout=e.validateLayout;exports.useStreamingUI=t.useStreamingUI;exports.ComponentRegistry=n;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/services/component-registry.ts"],"sourcesContent":["/**\n * Component Registry Service\n * Phase 0: Static registry with Quickchart and Table definitions\n * Phase 1: Dynamic registry populated from /api/mcp/tools/list\n *\n * Provides component schemas for LLM prompt engineering\n */\n\nimport type { ComponentRegistryEntry, ComponentType } from '../types'\nimport { DEFAULT_RESOURCE_LIMITS } from './validation'\n\n/**\n * Quickchart Component Registry Entry\n * Based on Quickchart API documentation\n */\nexport const QuickchartRegistry: ComponentRegistryEntry = {\n type: 'chart',\n name: 'Quickchart',\n description:\n 'Render charts using Quickchart.io API. Supports bar, line, pie, doughnut, radar, and scatter charts. Best for visualizing numerical data with 2-10 data series and up to 1000 data points.',\n schema: {\n type: 'object',\n properties: {\n type: {\n type: 'string',\n enum: ['bar', 'line', 'pie', 'doughnut', 'radar', 'scatter'],\n description: 'Chart type',\n },\n title: {\n type: 'string',\n description: 'Chart title (optional)',\n },\n data: {\n type: 'object',\n properties: {\n labels: {\n type: 'array',\n items: { type: 'string' },\n description: 'X-axis labels',\n },\n datasets: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n label: { type: 'string' },\n data: {\n type: 'array',\n items: { type: 'number' },\n },\n backgroundColor: {\n oneOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }],\n },\n borderColor: {\n oneOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }],\n },\n borderWidth: { type: 'number' },\n },\n required: ['label', 'data'],\n },\n },\n },\n required: ['labels', 'datasets'],\n },\n options: {\n type: 'object',\n description: 'Chart.js options for customization',\n },\n },\n required: ['type', 'data'],\n },\n examples: [\n {\n query: 'Show me document types distribution',\n component: {\n id: 'example-bar-1',\n type: 'chart',\n position: { colStart: 1, colSpan: 6 },\n params: {\n type: 'bar',\n title: 'Document Types',\n data: {\n labels: ['PDF', 'DOCX', 'TXT', 'XLSX'],\n datasets: [\n {\n label: 'Count',\n data: [245, 189, 123, 98],\n backgroundColor: ['rgba(59, 130, 246, 0.8)'],\n },\n ],\n },\n },\n },\n },\n {\n query: 'Display upload trends over the last week',\n component: {\n id: 'example-line-1',\n type: 'chart',\n position: { colStart: 1, colSpan: 6 },\n params: {\n type: 'line',\n title: 'Upload Trends',\n data: {\n labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],\n datasets: [\n {\n label: 'Uploads',\n data: [42, 38, 51, 47, 63, 29, 15],\n borderColor: 'rgb(59, 130, 246)',\n },\n ],\n },\n options: {\n tension: 0.4,\n },\n },\n },\n },\n ],\n limits: DEFAULT_RESOURCE_LIMITS,\n}\n\n/**\n * Table Component Registry Entry\n */\nexport const TableRegistry: ComponentRegistryEntry = {\n type: 'table',\n name: 'DataTable',\n description:\n 'Render tabular data with sortable columns and pagination. Best for displaying structured records with up to 100 rows. Supports column width customization and cell formatting.',\n schema: {\n type: 'object',\n properties: {\n title: {\n type: 'string',\n description: 'Table title (optional)',\n },\n columns: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n key: { type: 'string', description: 'Data key for this column' },\n label: { type: 'string', description: 'Column header label' },\n sortable: { type: 'boolean', description: 'Whether column is sortable' },\n width: { type: 'string', description: 'CSS width (e.g., \"30%\")' },\n },\n required: ['key', 'label'],\n },\n minItems: 1,\n },\n rows: {\n type: 'array',\n items: {\n type: 'object',\n description: 'Row data matching column keys',\n },\n maxItems: 100,\n },\n pagination: {\n type: 'object',\n properties: {\n currentPage: { type: 'number' },\n pageSize: { type: 'number' },\n totalRows: { type: 'number' },\n },\n },\n },\n required: ['columns', 'rows'],\n },\n examples: [\n {\n query: 'Show me the most recent documents',\n component: {\n id: 'example-table-1',\n type: 'table',\n position: { colStart: 1, colSpan: 8 },\n params: {\n title: 'Recent Documents',\n columns: [\n { key: 'name', label: 'Name', sortable: true, width: '40%' },\n { key: 'type', label: 'Type', sortable: true, width: '15%' },\n { key: 'size', label: 'Size', width: '15%' },\n { key: 'modified', label: 'Modified', sortable: true, width: '30%' },\n ],\n rows: [\n { name: 'Report.pdf', type: 'PDF', size: '2.4 MB', modified: '2 hours ago' },\n { name: 'Slides.pptx', type: 'PPTX', size: '8.7 MB', modified: '1 day ago' },\n ],\n },\n },\n },\n ],\n limits: DEFAULT_RESOURCE_LIMITS,\n}\n\n/**\n * Metric Card Component Registry Entry\n */\nexport const MetricRegistry: ComponentRegistryEntry = {\n type: 'metric',\n name: 'MetricCard',\n description:\n 'Display a single metric with optional trend indicator. Best for KPIs, statistics, and summary numbers. Supports trend direction (up/down/neutral) and subtitles.',\n schema: {\n type: 'object',\n properties: {\n title: {\n type: 'string',\n description: 'Metric title',\n },\n value: {\n oneOf: [{ type: 'string' }, { type: 'number' }],\n description: 'Metric value',\n },\n unit: {\n type: 'string',\n description: 'Unit of measurement (optional)',\n },\n trend: {\n type: 'object',\n properties: {\n value: { type: 'number', description: 'Percentage change' },\n direction: { type: 'string', enum: ['up', 'down', 'neutral'] },\n },\n },\n subtitle: {\n type: 'string',\n description: 'Additional context (optional)',\n },\n },\n required: ['title', 'value'],\n },\n examples: [\n {\n query: 'Show total document count',\n component: {\n id: 'example-metric-1',\n type: 'metric',\n position: { colStart: 1, colSpan: 3 },\n params: {\n title: 'Total Documents',\n value: '1,247',\n trend: {\n value: 12.5,\n direction: 'up',\n },\n subtitle: '+142 this month',\n },\n },\n },\n ],\n limits: {\n maxDataPoints: 1,\n maxTableRows: 1,\n maxPayloadSize: 5 * 1024, // 5KB\n renderTimeout: 1000, // 1s\n },\n}\n\n/**\n * Text Component Registry Entry\n */\nexport const TextRegistry: ComponentRegistryEntry = {\n type: 'text',\n name: 'TextBlock',\n description:\n 'Render text content with optional markdown support. Best for explanations, summaries, and context. Supports basic HTML formatting.',\n schema: {\n type: 'object',\n properties: {\n content: {\n type: 'string',\n description: 'Text content (HTML allowed, will be sanitized)',\n },\n markdown: {\n type: 'boolean',\n description: 'Whether content is markdown (not yet implemented)',\n },\n className: {\n type: 'string',\n description: 'Custom CSS classes',\n },\n },\n required: ['content'],\n },\n examples: [\n {\n query: 'Explain the document distribution',\n component: {\n id: 'example-text-1',\n type: 'text',\n position: { colStart: 1, colSpan: 12 },\n params: {\n content:\n '<p>Your document library contains <strong>1,247 files</strong> across 5 different formats. PDFs represent the largest category at 35% of total storage.</p>',\n },\n },\n },\n ],\n limits: {\n maxDataPoints: 1,\n maxTableRows: 1,\n maxPayloadSize: 10 * 1024, // 10KB\n renderTimeout: 1000, // 1s\n },\n}\n\n/**\n * Component Registry - All components indexed by type\n */\nexport const ComponentRegistry: Map<ComponentType, ComponentRegistryEntry> = new Map([\n ['chart', QuickchartRegistry],\n ['table', TableRegistry],\n ['metric', MetricRegistry],\n ['text', TextRegistry],\n])\n\n/**\n * Get component registry entry by type\n */\nexport function getComponentEntry(type: ComponentType): ComponentRegistryEntry | undefined {\n return ComponentRegistry.get(type)\n}\n\n/**\n * Get all component types\n */\nexport function getAllComponentTypes(): ComponentType[] {\n return Array.from(ComponentRegistry.keys())\n}\n\n/**\n * Get registry as JSON for LLM context\n */\nexport function getRegistryForLLM(): string {\n const entries = Array.from(ComponentRegistry.values()).map((entry) => ({\n type: entry.type,\n name: entry.name,\n description: entry.description,\n schema: entry.schema,\n examples: entry.examples.map((ex) => ({\n query: ex.query,\n component: ex.component,\n })),\n limits: entry.limits,\n }))\n\n return JSON.stringify(entries, null, 2)\n}\n\n/**\n * Validate component against registry schema\n * (Future: Use Zod for runtime validation)\n */\nexport function validateAgainstRegistry(\n componentType: ComponentType,\n params: any\n): { valid: boolean; errors?: string[] } {\n const entry = getComponentEntry(componentType)\n if (!entry) {\n return { valid: false, errors: [`Unknown component type: ${componentType}`] }\n }\n\n // Basic validation (Phase 1 will add Zod schema validation)\n const required = entry.schema.required || []\n const missing = required.filter((key: string) => !(key in params))\n\n if (missing.length > 0) {\n return {\n valid: false,\n errors: missing.map((key: string) => `Missing required field: ${key}`),\n }\n }\n\n return { valid: true }\n}\n"],"names":["QuickchartRegistry","DEFAULT_RESOURCE_LIMITS","TableRegistry","MetricRegistry","TextRegistry","ComponentRegistry"],"mappings":"iLAeaA,EAA6C,CACxD,KAAM,QACN,KAAM,aACN,YACE,6LACF,OAAQ,CACN,KAAM,SACN,WAAY,CACV,KAAM,CACJ,KAAM,SACN,KAAM,CAAC,MAAO,OAAQ,MAAO,WAAY,QAAS,SAAS,EAC3D,YAAa,YAAA,EAEf,MAAO,CACL,KAAM,SACN,YAAa,wBAAA,EAEf,KAAM,CACJ,KAAM,SACN,WAAY,CACV,OAAQ,CACN,KAAM,QACN,MAAO,CAAE,KAAM,QAAA,EACf,YAAa,eAAA,EAEf,SAAU,CACR,KAAM,QACN,MAAO,CACL,KAAM,SACN,WAAY,CACV,MAAO,CAAE,KAAM,QAAA,EACf,KAAM,CACJ,KAAM,QACN,MAAO,CAAE,KAAM,QAAA,CAAS,EAE1B,gBAAiB,CACf,MAAO,CAAC,CAAE,KAAM,UAAY,CAAE,KAAM,QAAS,MAAO,CAAE,KAAM,QAAA,EAAY,CAAA,EAE1E,YAAa,CACX,MAAO,CAAC,CAAE,KAAM,UAAY,CAAE,KAAM,QAAS,MAAO,CAAE,KAAM,QAAA,EAAY,CAAA,EAE1E,YAAa,CAAE,KAAM,QAAA,CAAS,EAEhC,SAAU,CAAC,QAAS,MAAM,CAAA,CAC5B,CACF,EAEF,SAAU,CAAC,SAA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D,EAEF,SAAU,CACR,KAAM,SACN,YAAa,+BAAA,CACf,EAEF,SAAU,CAAC,QAAS,OAAO,CAAA,EAE7B,SAAU,CACR,CACE,MAAO,4BACP,UAAW,CACT,GAAI,mBACJ,KAAM,SACN,SAAU,CAAE,SAAU,EAAG,QAAS,CAAA,EAClC,OAAQ,CACN,MAAO,kBACP,MAAO,QACP,MAAO,CACL,MAAO,KACP,UAAW,IAAA,EAEb,SAAU,iBAAA,CACZ,CACF,CACF,EAEF,OAAQ,CACN,cAAe,EACf,aAAc,EACd,eAAgB,EAAI,KACpB,cAAe,GAAA,CAEnB,EAKaC,EAAuC,CAClD,KAAM,OACN,KAAM,YACN,YACE,qIACF,OAAQ,CACN,KAAM,SACN,WAAY,CACV,QAAS,CACP,KAAM,SACN,YAAa,gDAAA,EAEf,SAAU,CACR,KAAM,UACN,YAAa,mDAAA,EAEf,UAAW,CACT,KAAM,SACN,YAAa,oBAAA,CACf,EAEF,SAAU,CAAC,SAAS,CAAA,EAEtB,SAAU,CACR,CACE,MAAO,oCACP,UAAW,CACT,GAAI,iBACJ,KAAM,OACN,SAAU,CAAE,SAAU,EAAG,QAAS,EAAA,EAClC,OAAQ,CACN,QACE,6JAAA,CACJ,CACF,CACF,EAEF,OAAQ,CACN,cAAe,EACf,aAAc,EACd,eAAgB,GAAK,KACrB,cAAe,GAAA,CAEnB,EAKaC,MAAoE,IAAI,CACnF,CAAC,QAASL,CAAkB,EAC5B,CAAC,QAASE,CAAa,EACvB,CAAC,SAAUC,CAAc,EACzB,CAAC,OAAQC,CAAY,CACvB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { D as e } from "./StreamingUIRenderer-oyg_cKKl.js";
|
|
2
|
+
import { G as l, S as d, U as c, v as m, a as u } from "./StreamingUIRenderer-oyg_cKKl.js";
|
|
3
|
+
import { u as b } from "./useStreamingUI-BL0nh13E.js";
|
|
4
|
+
const t = {
|
|
5
|
+
type: "chart",
|
|
6
|
+
name: "Quickchart",
|
|
7
|
+
description: "Render charts using Quickchart.io API. Supports bar, line, pie, doughnut, radar, and scatter charts. Best for visualizing numerical data with 2-10 data series and up to 1000 data points.",
|
|
8
|
+
schema: {
|
|
9
|
+
type: "object",
|
|
10
|
+
properties: {
|
|
11
|
+
type: {
|
|
12
|
+
type: "string",
|
|
13
|
+
enum: ["bar", "line", "pie", "doughnut", "radar", "scatter"],
|
|
14
|
+
description: "Chart type"
|
|
15
|
+
},
|
|
16
|
+
title: {
|
|
17
|
+
type: "string",
|
|
18
|
+
description: "Chart title (optional)"
|
|
19
|
+
},
|
|
20
|
+
data: {
|
|
21
|
+
type: "object",
|
|
22
|
+
properties: {
|
|
23
|
+
labels: {
|
|
24
|
+
type: "array",
|
|
25
|
+
items: { type: "string" },
|
|
26
|
+
description: "X-axis labels"
|
|
27
|
+
},
|
|
28
|
+
datasets: {
|
|
29
|
+
type: "array",
|
|
30
|
+
items: {
|
|
31
|
+
type: "object",
|
|
32
|
+
properties: {
|
|
33
|
+
label: { type: "string" },
|
|
34
|
+
data: {
|
|
35
|
+
type: "array",
|
|
36
|
+
items: { type: "number" }
|
|
37
|
+
},
|
|
38
|
+
backgroundColor: {
|
|
39
|
+
oneOf: [{ type: "string" }, { type: "array", items: { type: "string" } }]
|
|
40
|
+
},
|
|
41
|
+
borderColor: {
|
|
42
|
+
oneOf: [{ type: "string" }, { type: "array", items: { type: "string" } }]
|
|
43
|
+
},
|
|
44
|
+
borderWidth: { type: "number" }
|
|
45
|
+
},
|
|
46
|
+
required: ["label", "data"]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
required: ["labels", "datasets"]
|
|
51
|
+
},
|
|
52
|
+
options: {
|
|
53
|
+
type: "object",
|
|
54
|
+
description: "Chart.js options for customization"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
required: ["type", "data"]
|
|
58
|
+
},
|
|
59
|
+
examples: [
|
|
60
|
+
{
|
|
61
|
+
query: "Show me document types distribution",
|
|
62
|
+
component: {
|
|
63
|
+
id: "example-bar-1",
|
|
64
|
+
type: "chart",
|
|
65
|
+
position: { colStart: 1, colSpan: 6 },
|
|
66
|
+
params: {
|
|
67
|
+
type: "bar",
|
|
68
|
+
title: "Document Types",
|
|
69
|
+
data: {
|
|
70
|
+
labels: ["PDF", "DOCX", "TXT", "XLSX"],
|
|
71
|
+
datasets: [
|
|
72
|
+
{
|
|
73
|
+
label: "Count",
|
|
74
|
+
data: [245, 189, 123, 98],
|
|
75
|
+
backgroundColor: ["rgba(59, 130, 246, 0.8)"]
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
query: "Display upload trends over the last week",
|
|
84
|
+
component: {
|
|
85
|
+
id: "example-line-1",
|
|
86
|
+
type: "chart",
|
|
87
|
+
position: { colStart: 1, colSpan: 6 },
|
|
88
|
+
params: {
|
|
89
|
+
type: "line",
|
|
90
|
+
title: "Upload Trends",
|
|
91
|
+
data: {
|
|
92
|
+
labels: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
|
|
93
|
+
datasets: [
|
|
94
|
+
{
|
|
95
|
+
label: "Uploads",
|
|
96
|
+
data: [42, 38, 51, 47, 63, 29, 15],
|
|
97
|
+
borderColor: "rgb(59, 130, 246)"
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
options: {
|
|
102
|
+
tension: 0.4
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
limits: e
|
|
109
|
+
}, a = {
|
|
110
|
+
type: "table",
|
|
111
|
+
name: "DataTable",
|
|
112
|
+
description: "Render tabular data with sortable columns and pagination. Best for displaying structured records with up to 100 rows. Supports column width customization and cell formatting.",
|
|
113
|
+
schema: {
|
|
114
|
+
type: "object",
|
|
115
|
+
properties: {
|
|
116
|
+
title: {
|
|
117
|
+
type: "string",
|
|
118
|
+
description: "Table title (optional)"
|
|
119
|
+
},
|
|
120
|
+
columns: {
|
|
121
|
+
type: "array",
|
|
122
|
+
items: {
|
|
123
|
+
type: "object",
|
|
124
|
+
properties: {
|
|
125
|
+
key: { type: "string", description: "Data key for this column" },
|
|
126
|
+
label: { type: "string", description: "Column header label" },
|
|
127
|
+
sortable: { type: "boolean", description: "Whether column is sortable" },
|
|
128
|
+
width: { type: "string", description: 'CSS width (e.g., "30%")' }
|
|
129
|
+
},
|
|
130
|
+
required: ["key", "label"]
|
|
131
|
+
},
|
|
132
|
+
minItems: 1
|
|
133
|
+
},
|
|
134
|
+
rows: {
|
|
135
|
+
type: "array",
|
|
136
|
+
items: {
|
|
137
|
+
type: "object",
|
|
138
|
+
description: "Row data matching column keys"
|
|
139
|
+
},
|
|
140
|
+
maxItems: 100
|
|
141
|
+
},
|
|
142
|
+
pagination: {
|
|
143
|
+
type: "object",
|
|
144
|
+
properties: {
|
|
145
|
+
currentPage: { type: "number" },
|
|
146
|
+
pageSize: { type: "number" },
|
|
147
|
+
totalRows: { type: "number" }
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
required: ["columns", "rows"]
|
|
152
|
+
},
|
|
153
|
+
examples: [
|
|
154
|
+
{
|
|
155
|
+
query: "Show me the most recent documents",
|
|
156
|
+
component: {
|
|
157
|
+
id: "example-table-1",
|
|
158
|
+
type: "table",
|
|
159
|
+
position: { colStart: 1, colSpan: 8 },
|
|
160
|
+
params: {
|
|
161
|
+
title: "Recent Documents",
|
|
162
|
+
columns: [
|
|
163
|
+
{ key: "name", label: "Name", sortable: !0, width: "40%" },
|
|
164
|
+
{ key: "type", label: "Type", sortable: !0, width: "15%" },
|
|
165
|
+
{ key: "size", label: "Size", width: "15%" },
|
|
166
|
+
{ key: "modified", label: "Modified", sortable: !0, width: "30%" }
|
|
167
|
+
],
|
|
168
|
+
rows: [
|
|
169
|
+
{ name: "Report.pdf", type: "PDF", size: "2.4 MB", modified: "2 hours ago" },
|
|
170
|
+
{ name: "Slides.pptx", type: "PPTX", size: "8.7 MB", modified: "1 day ago" }
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
limits: e
|
|
177
|
+
}, r = {
|
|
178
|
+
type: "metric",
|
|
179
|
+
name: "MetricCard",
|
|
180
|
+
description: "Display a single metric with optional trend indicator. Best for KPIs, statistics, and summary numbers. Supports trend direction (up/down/neutral) and subtitles.",
|
|
181
|
+
schema: {
|
|
182
|
+
type: "object",
|
|
183
|
+
properties: {
|
|
184
|
+
title: {
|
|
185
|
+
type: "string",
|
|
186
|
+
description: "Metric title"
|
|
187
|
+
},
|
|
188
|
+
value: {
|
|
189
|
+
oneOf: [{ type: "string" }, { type: "number" }],
|
|
190
|
+
description: "Metric value"
|
|
191
|
+
},
|
|
192
|
+
unit: {
|
|
193
|
+
type: "string",
|
|
194
|
+
description: "Unit of measurement (optional)"
|
|
195
|
+
},
|
|
196
|
+
trend: {
|
|
197
|
+
type: "object",
|
|
198
|
+
properties: {
|
|
199
|
+
value: { type: "number", description: "Percentage change" },
|
|
200
|
+
direction: { type: "string", enum: ["up", "down", "neutral"] }
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
subtitle: {
|
|
204
|
+
type: "string",
|
|
205
|
+
description: "Additional context (optional)"
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
required: ["title", "value"]
|
|
209
|
+
},
|
|
210
|
+
examples: [
|
|
211
|
+
{
|
|
212
|
+
query: "Show total document count",
|
|
213
|
+
component: {
|
|
214
|
+
id: "example-metric-1",
|
|
215
|
+
type: "metric",
|
|
216
|
+
position: { colStart: 1, colSpan: 3 },
|
|
217
|
+
params: {
|
|
218
|
+
title: "Total Documents",
|
|
219
|
+
value: "1,247",
|
|
220
|
+
trend: {
|
|
221
|
+
value: 12.5,
|
|
222
|
+
direction: "up"
|
|
223
|
+
},
|
|
224
|
+
subtitle: "+142 this month"
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
],
|
|
229
|
+
limits: {
|
|
230
|
+
maxDataPoints: 1,
|
|
231
|
+
maxTableRows: 1,
|
|
232
|
+
maxPayloadSize: 5 * 1024,
|
|
233
|
+
// 5KB
|
|
234
|
+
renderTimeout: 1e3
|
|
235
|
+
// 1s
|
|
236
|
+
}
|
|
237
|
+
}, i = {
|
|
238
|
+
type: "text",
|
|
239
|
+
name: "TextBlock",
|
|
240
|
+
description: "Render text content with optional markdown support. Best for explanations, summaries, and context. Supports basic HTML formatting.",
|
|
241
|
+
schema: {
|
|
242
|
+
type: "object",
|
|
243
|
+
properties: {
|
|
244
|
+
content: {
|
|
245
|
+
type: "string",
|
|
246
|
+
description: "Text content (HTML allowed, will be sanitized)"
|
|
247
|
+
},
|
|
248
|
+
markdown: {
|
|
249
|
+
type: "boolean",
|
|
250
|
+
description: "Whether content is markdown (not yet implemented)"
|
|
251
|
+
},
|
|
252
|
+
className: {
|
|
253
|
+
type: "string",
|
|
254
|
+
description: "Custom CSS classes"
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
required: ["content"]
|
|
258
|
+
},
|
|
259
|
+
examples: [
|
|
260
|
+
{
|
|
261
|
+
query: "Explain the document distribution",
|
|
262
|
+
component: {
|
|
263
|
+
id: "example-text-1",
|
|
264
|
+
type: "text",
|
|
265
|
+
position: { colStart: 1, colSpan: 12 },
|
|
266
|
+
params: {
|
|
267
|
+
content: "<p>Your document library contains <strong>1,247 files</strong> across 5 different formats. PDFs represent the largest category at 35% of total storage.</p>"
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
],
|
|
272
|
+
limits: {
|
|
273
|
+
maxDataPoints: 1,
|
|
274
|
+
maxTableRows: 1,
|
|
275
|
+
maxPayloadSize: 10 * 1024,
|
|
276
|
+
// 10KB
|
|
277
|
+
renderTimeout: 1e3
|
|
278
|
+
// 1s
|
|
279
|
+
}
|
|
280
|
+
}, n = /* @__PURE__ */ new Map([
|
|
281
|
+
["chart", t],
|
|
282
|
+
["table", a],
|
|
283
|
+
["metric", r],
|
|
284
|
+
["text", i]
|
|
285
|
+
]);
|
|
286
|
+
export {
|
|
287
|
+
n as ComponentRegistry,
|
|
288
|
+
e as DEFAULT_RESOURCE_LIMITS,
|
|
289
|
+
l as GenerativeUIErrorBoundary,
|
|
290
|
+
d as StreamingUIRenderer,
|
|
291
|
+
c as UIResourceRenderer,
|
|
292
|
+
b as useStreamingUI,
|
|
293
|
+
m as validateComponent,
|
|
294
|
+
u as validateLayout
|
|
295
|
+
};
|
|
296
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/services/component-registry.ts"],"sourcesContent":["/**\n * Component Registry Service\n * Phase 0: Static registry with Quickchart and Table definitions\n * Phase 1: Dynamic registry populated from /api/mcp/tools/list\n *\n * Provides component schemas for LLM prompt engineering\n */\n\nimport type { ComponentRegistryEntry, ComponentType } from '../types'\nimport { DEFAULT_RESOURCE_LIMITS } from './validation'\n\n/**\n * Quickchart Component Registry Entry\n * Based on Quickchart API documentation\n */\nexport const QuickchartRegistry: ComponentRegistryEntry = {\n type: 'chart',\n name: 'Quickchart',\n description:\n 'Render charts using Quickchart.io API. Supports bar, line, pie, doughnut, radar, and scatter charts. Best for visualizing numerical data with 2-10 data series and up to 1000 data points.',\n schema: {\n type: 'object',\n properties: {\n type: {\n type: 'string',\n enum: ['bar', 'line', 'pie', 'doughnut', 'radar', 'scatter'],\n description: 'Chart type',\n },\n title: {\n type: 'string',\n description: 'Chart title (optional)',\n },\n data: {\n type: 'object',\n properties: {\n labels: {\n type: 'array',\n items: { type: 'string' },\n description: 'X-axis labels',\n },\n datasets: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n label: { type: 'string' },\n data: {\n type: 'array',\n items: { type: 'number' },\n },\n backgroundColor: {\n oneOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }],\n },\n borderColor: {\n oneOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }],\n },\n borderWidth: { type: 'number' },\n },\n required: ['label', 'data'],\n },\n },\n },\n required: ['labels', 'datasets'],\n },\n options: {\n type: 'object',\n description: 'Chart.js options for customization',\n },\n },\n required: ['type', 'data'],\n },\n examples: [\n {\n query: 'Show me document types distribution',\n component: {\n id: 'example-bar-1',\n type: 'chart',\n position: { colStart: 1, colSpan: 6 },\n params: {\n type: 'bar',\n title: 'Document Types',\n data: {\n labels: ['PDF', 'DOCX', 'TXT', 'XLSX'],\n datasets: [\n {\n label: 'Count',\n data: [245, 189, 123, 98],\n backgroundColor: ['rgba(59, 130, 246, 0.8)'],\n },\n ],\n },\n },\n },\n },\n {\n query: 'Display upload trends over the last week',\n component: {\n id: 'example-line-1',\n type: 'chart',\n position: { colStart: 1, colSpan: 6 },\n params: {\n type: 'line',\n title: 'Upload Trends',\n data: {\n labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],\n datasets: [\n {\n label: 'Uploads',\n data: [42, 38, 51, 47, 63, 29, 15],\n borderColor: 'rgb(59, 130, 246)',\n },\n ],\n },\n options: {\n tension: 0.4,\n },\n },\n },\n },\n ],\n limits: DEFAULT_RESOURCE_LIMITS,\n}\n\n/**\n * Table Component Registry Entry\n */\nexport const TableRegistry: ComponentRegistryEntry = {\n type: 'table',\n name: 'DataTable',\n description:\n 'Render tabular data with sortable columns and pagination. Best for displaying structured records with up to 100 rows. Supports column width customization and cell formatting.',\n schema: {\n type: 'object',\n properties: {\n title: {\n type: 'string',\n description: 'Table title (optional)',\n },\n columns: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n key: { type: 'string', description: 'Data key for this column' },\n label: { type: 'string', description: 'Column header label' },\n sortable: { type: 'boolean', description: 'Whether column is sortable' },\n width: { type: 'string', description: 'CSS width (e.g., \"30%\")' },\n },\n required: ['key', 'label'],\n },\n minItems: 1,\n },\n rows: {\n type: 'array',\n items: {\n type: 'object',\n description: 'Row data matching column keys',\n },\n maxItems: 100,\n },\n pagination: {\n type: 'object',\n properties: {\n currentPage: { type: 'number' },\n pageSize: { type: 'number' },\n totalRows: { type: 'number' },\n },\n },\n },\n required: ['columns', 'rows'],\n },\n examples: [\n {\n query: 'Show me the most recent documents',\n component: {\n id: 'example-table-1',\n type: 'table',\n position: { colStart: 1, colSpan: 8 },\n params: {\n title: 'Recent Documents',\n columns: [\n { key: 'name', label: 'Name', sortable: true, width: '40%' },\n { key: 'type', label: 'Type', sortable: true, width: '15%' },\n { key: 'size', label: 'Size', width: '15%' },\n { key: 'modified', label: 'Modified', sortable: true, width: '30%' },\n ],\n rows: [\n { name: 'Report.pdf', type: 'PDF', size: '2.4 MB', modified: '2 hours ago' },\n { name: 'Slides.pptx', type: 'PPTX', size: '8.7 MB', modified: '1 day ago' },\n ],\n },\n },\n },\n ],\n limits: DEFAULT_RESOURCE_LIMITS,\n}\n\n/**\n * Metric Card Component Registry Entry\n */\nexport const MetricRegistry: ComponentRegistryEntry = {\n type: 'metric',\n name: 'MetricCard',\n description:\n 'Display a single metric with optional trend indicator. Best for KPIs, statistics, and summary numbers. Supports trend direction (up/down/neutral) and subtitles.',\n schema: {\n type: 'object',\n properties: {\n title: {\n type: 'string',\n description: 'Metric title',\n },\n value: {\n oneOf: [{ type: 'string' }, { type: 'number' }],\n description: 'Metric value',\n },\n unit: {\n type: 'string',\n description: 'Unit of measurement (optional)',\n },\n trend: {\n type: 'object',\n properties: {\n value: { type: 'number', description: 'Percentage change' },\n direction: { type: 'string', enum: ['up', 'down', 'neutral'] },\n },\n },\n subtitle: {\n type: 'string',\n description: 'Additional context (optional)',\n },\n },\n required: ['title', 'value'],\n },\n examples: [\n {\n query: 'Show total document count',\n component: {\n id: 'example-metric-1',\n type: 'metric',\n position: { colStart: 1, colSpan: 3 },\n params: {\n title: 'Total Documents',\n value: '1,247',\n trend: {\n value: 12.5,\n direction: 'up',\n },\n subtitle: '+142 this month',\n },\n },\n },\n ],\n limits: {\n maxDataPoints: 1,\n maxTableRows: 1,\n maxPayloadSize: 5 * 1024, // 5KB\n renderTimeout: 1000, // 1s\n },\n}\n\n/**\n * Text Component Registry Entry\n */\nexport const TextRegistry: ComponentRegistryEntry = {\n type: 'text',\n name: 'TextBlock',\n description:\n 'Render text content with optional markdown support. Best for explanations, summaries, and context. Supports basic HTML formatting.',\n schema: {\n type: 'object',\n properties: {\n content: {\n type: 'string',\n description: 'Text content (HTML allowed, will be sanitized)',\n },\n markdown: {\n type: 'boolean',\n description: 'Whether content is markdown (not yet implemented)',\n },\n className: {\n type: 'string',\n description: 'Custom CSS classes',\n },\n },\n required: ['content'],\n },\n examples: [\n {\n query: 'Explain the document distribution',\n component: {\n id: 'example-text-1',\n type: 'text',\n position: { colStart: 1, colSpan: 12 },\n params: {\n content:\n '<p>Your document library contains <strong>1,247 files</strong> across 5 different formats. PDFs represent the largest category at 35% of total storage.</p>',\n },\n },\n },\n ],\n limits: {\n maxDataPoints: 1,\n maxTableRows: 1,\n maxPayloadSize: 10 * 1024, // 10KB\n renderTimeout: 1000, // 1s\n },\n}\n\n/**\n * Component Registry - All components indexed by type\n */\nexport const ComponentRegistry: Map<ComponentType, ComponentRegistryEntry> = new Map([\n ['chart', QuickchartRegistry],\n ['table', TableRegistry],\n ['metric', MetricRegistry],\n ['text', TextRegistry],\n])\n\n/**\n * Get component registry entry by type\n */\nexport function getComponentEntry(type: ComponentType): ComponentRegistryEntry | undefined {\n return ComponentRegistry.get(type)\n}\n\n/**\n * Get all component types\n */\nexport function getAllComponentTypes(): ComponentType[] {\n return Array.from(ComponentRegistry.keys())\n}\n\n/**\n * Get registry as JSON for LLM context\n */\nexport function getRegistryForLLM(): string {\n const entries = Array.from(ComponentRegistry.values()).map((entry) => ({\n type: entry.type,\n name: entry.name,\n description: entry.description,\n schema: entry.schema,\n examples: entry.examples.map((ex) => ({\n query: ex.query,\n component: ex.component,\n })),\n limits: entry.limits,\n }))\n\n return JSON.stringify(entries, null, 2)\n}\n\n/**\n * Validate component against registry schema\n * (Future: Use Zod for runtime validation)\n */\nexport function validateAgainstRegistry(\n componentType: ComponentType,\n params: any\n): { valid: boolean; errors?: string[] } {\n const entry = getComponentEntry(componentType)\n if (!entry) {\n return { valid: false, errors: [`Unknown component type: ${componentType}`] }\n }\n\n // Basic validation (Phase 1 will add Zod schema validation)\n const required = entry.schema.required || []\n const missing = required.filter((key: string) => !(key in params))\n\n if (missing.length > 0) {\n return {\n valid: false,\n errors: missing.map((key: string) => `Missing required field: ${key}`),\n }\n }\n\n return { valid: true }\n}\n"],"names":["QuickchartRegistry","DEFAULT_RESOURCE_LIMITS","TableRegistry","MetricRegistry","TextRegistry","ComponentRegistry"],"mappings":";;;AAeO,MAAMA,IAA6C;AAAA,EACxD,MAAM;AAAA,EACN,MAAM;AAAA,EACN,aACE;AAAA,EACF,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,YAAY;AAAA,MACV,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,MAAM,CAAC,OAAO,QAAQ,OAAO,YAAY,SAAS,SAAS;AAAA,QAC3D,aAAa;AAAA,MAAA;AAAA,MAEf,OAAO;AAAA,QACL,MAAM;AAAA,QACN,aAAa;AAAA,MAAA;AAAA,MAEf,MAAM;AAAA,QACJ,MAAM;AAAA,QACN,YAAY;AAAA,UACV,QAAQ;AAAA,YACN,MAAM;AAAA,YACN,OAAO,EAAE,MAAM,SAAA;AAAA,YACf,aAAa;AAAA,UAAA;AAAA,UAEf,UAAU;AAAA,YACR,MAAM;AAAA,YACN,OAAO;AAAA,cACL,MAAM;AAAA,cACN,YAAY;AAAA,gBACV,OAAO,EAAE,MAAM,SAAA;AAAA,gBACf,MAAM;AAAA,kBACJ,MAAM;AAAA,kBACN,OAAO,EAAE,MAAM,SAAA;AAAA,gBAAS;AAAA,gBAE1B,iBAAiB;AAAA,kBACf,OAA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gBAAgB,KAAK;AAAA;AAAA,IACrB,eAAe;AAAA;AAAA,EAAA;AAEnB,GAKaC,wBAAoE,IAAI;AAAA,EACnF,CAAC,SAASL,CAAkB;AAAA,EAC5B,CAAC,SAASE,CAAa;AAAA,EACvB,CAAC,UAAUC,CAAc;AAAA,EACzB,CAAC,QAAQC,CAAY;AACvB,CAAC;"}
|
package/dist/types.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|