@glyphtek/unspecd
Version:
A declarative UI framework for building internal tools and dashboards with TypeScript. Create interactive tables, forms, and dashboards using simple specifications.
60 lines • 1.91 kB
TypeScript
/**
* Streaming Table Component for Unspec'd Framework
*
* This component handles real-time data streams and updates the table DOM
* dynamically as new events arrive. It manages internal state for efficient
* lookups and provides smooth visual updates for streaming data.
*/
declare global {
interface Window {
__UNSPECD_TOOLS_DATA__: {
tools: Array<{
id: string;
title: string;
inputs: any;
content: any;
functionNames: string[];
filePath?: string;
}>;
toolCount: number;
focusMode: boolean;
title?: string;
} | undefined;
}
}
/**
* Interface for streaming table configuration.
* This matches the conceptual design from live-orders-dashboard.ts
*/
interface StreamingTableContent {
type: 'streamingTable';
dataSource: {
type: 'stream';
functionName: string;
};
tableConfig: {
rowIdentifier: string;
columns: Array<{
field: string;
label: string;
formatter?: string;
width?: string;
}>;
streamingOptions?: {
highlightNewRows?: boolean;
showUpdateAnimations?: boolean;
maxRows?: number;
};
};
}
/**
* Main renderer for streamingTable content type.
* Manages real-time data streams and updates the table DOM dynamically.
*
* @param content - The streamingTable content configuration
* @param specFunctions - The functions record from the ToolSpec
* @param targetElement - The HTML element to render into
*/
export declare function renderStreamingTableComponent(content: StreamingTableContent, _specFunctions: Record<string, (params: any) => Promise<any>>, targetElement: HTMLElement): Promise<void>;
export {};
//# sourceMappingURL=streaming-table.d.ts.map