UNPKG

@llamaindex/ui

Version:

A comprehensive UI component library built with React, TypeScript, and Tailwind CSS for LlamaIndex applications

61 lines (55 loc) 2.62 kB
import * as react_jsx_runtime from 'react/jsx-runtime'; import { ReactNode } from 'react'; import { client } from 'llama-cloud-services/api'; export { client as cloudApiClient } from 'llama-cloud-services/api'; import { Client } from '@llamaindex/workflows-client'; export { Client as WorkflowsClient, createClient as createWorkflowsClient, createConfig as createWorkflowsConfig, client as workflowsClient } from '@llamaindex/workflows-client'; import { AgentClient } from 'llama-cloud-services/beta/agent'; export { AgentClient as CloudAgentClient, createAgentDataClient as createCloudAgentClient } from 'llama-cloud-services/beta/agent'; export { c as SharedStreamingManager, b as StreamExecutor, S as StreamOperation, a as StreamSubscriber } from '../shared-streaming-Bb5S8Tx3.js'; export { c as JSONValue, J as JsonObject, b as JsonShape, a as JsonValue, P as PrimitiveValue } from '../json-types-CmrC0JAm.js'; type CloudApiClient = typeof client; interface ApiClients { workflowsClient?: Client; cloudApiClient?: CloudApiClient; agentDataClient?: AgentClient; } interface ApiProviderProps { children: ReactNode; clients: ApiClients; project?: { id?: string | null; }; } declare function ApiProvider({ children, clients, project }: ApiProviderProps): react_jsx_runtime.JSX.Element; declare function createMockClients(): ApiClients; declare function useWorkflowsClient(): Client; declare function useCloudApiClient(): CloudApiClient; declare function useAgentDataClient(): AgentClient; declare function useApiClients(): ApiClients; /** * CSV utility functions for converting arrays to CSV format */ /** * Converts an array of values to a CSV-formatted string. * Handles proper escaping of values containing commas, quotes, or newlines. * * @param array - The array to convert to CSV format * @returns A comma-separated string representation of the array * * @example * ```ts * arrayToCsv([1, 2, 3]) // "1, 2, 3" * arrayToCsv(["hello", "world"]) // "hello, world" * arrayToCsv(["a,b", 'c"d']) // '"a,b", "c""d"' * arrayToCsv([null, undefined, ""]) // ", , " * ``` */ declare function arrayToCsv(array: unknown[]): string; interface StreamEventBatcher<T> { items: T[]; push: (item: T) => void; clear: () => void; } declare function useStreamEventBatcher<T>(pushIntervalMs?: number, sort?: (a: T, b: T) => number): StreamEventBatcher<T>; export { type ApiClients, ApiProvider, type ApiProviderProps, type CloudApiClient, arrayToCsv, createMockClients, useAgentDataClient, useApiClients, useCloudApiClient, useStreamEventBatcher, useWorkflowsClient };