@erdoai/ui 0.1.105 → 0.1.106
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/iframe.global.js +17 -17
- package/dist/index.cjs +11 -11
- package/dist/index.d.cts +43 -1
- package/dist/index.d.ts +43 -1
- package/dist/index.js +11 -11
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -182,6 +182,48 @@ declare function useErdoConfig(): ErdoProviderConfig;
|
|
|
182
182
|
*/
|
|
183
183
|
declare function useErdoConfigOptional(): ErdoProviderConfig | null;
|
|
184
184
|
|
|
185
|
+
interface DatasetMetricProps {
|
|
186
|
+
/** Metric label (e.g. "Total Revenue") */
|
|
187
|
+
label: string;
|
|
188
|
+
/** Dataset slug to query */
|
|
189
|
+
datasetSlug: string;
|
|
190
|
+
/** Invocation/thread ID for data fetching context */
|
|
191
|
+
invocationId: string;
|
|
192
|
+
/** SQL query that returns a single row with the metric value.
|
|
193
|
+
* e.g. "SELECT SUM(revenue) as total FROM data" */
|
|
194
|
+
sqlQuery: string;
|
|
195
|
+
/** Column key to read the value from (must match a column in the query result) */
|
|
196
|
+
valueKey: string;
|
|
197
|
+
/** Optional resource key for Excel files */
|
|
198
|
+
resourceKey?: string;
|
|
199
|
+
/** d3-format string for value display (e.g. ",.0f" for thousands, ".1%" for percent) */
|
|
200
|
+
format?: string;
|
|
201
|
+
/** Optional prefix (e.g. "$") */
|
|
202
|
+
prefix?: string;
|
|
203
|
+
/** Optional suffix (e.g. "%", " users") */
|
|
204
|
+
suffix?: string;
|
|
205
|
+
/** Optional subtitle/description shown below the value */
|
|
206
|
+
description?: string;
|
|
207
|
+
/** Class for the outer container */
|
|
208
|
+
className?: string;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* A single KPI/metric card that fetches one value from a dataset.
|
|
212
|
+
* Handles loading, error, and empty states automatically.
|
|
213
|
+
*
|
|
214
|
+
* @example
|
|
215
|
+
* <DatasetMetric
|
|
216
|
+
* label="Total Revenue"
|
|
217
|
+
* datasetSlug="org.sales-data"
|
|
218
|
+
* invocationId="iframe"
|
|
219
|
+
* sqlQuery="SELECT SUM(CAST(revenue AS DOUBLE)) as total FROM data"
|
|
220
|
+
* valueKey="total"
|
|
221
|
+
* prefix="$"
|
|
222
|
+
* format=",.0f"
|
|
223
|
+
* />
|
|
224
|
+
*/
|
|
225
|
+
declare function DatasetMetric({ label, datasetSlug, invocationId, sqlQuery, valueKey, resourceKey, format, prefix, suffix, description, className, }: DatasetMetricProps): react_jsx_runtime.JSX.Element;
|
|
226
|
+
|
|
185
227
|
declare const THEMES: {
|
|
186
228
|
readonly light: "";
|
|
187
229
|
readonly dark: ".dark";
|
|
@@ -2057,4 +2099,4 @@ declare function useInvocationState(invocationId: string | undefined): AgentStre
|
|
|
2057
2099
|
*/
|
|
2058
2100
|
declare function useAgentStreamGlobalState(): AgentStreamState;
|
|
2059
2101
|
|
|
2060
|
-
export { type AgentStreamStore, AgentStreamStoreProvider, type AgentStreamStoreProviderProps, BarChart, type BaseChartProps, type BotInvocation, BotInvocationContent, type BotInvocationContentData, type BotInvocationContentProps, type BotInvocationData, type BotInvocationEventInfo, type BotInvocationStatusInfo, Chart, type ChartConfig, ChartContainer, ChartContent, type ChartContentProps, ChartLegend, ChartLegendContent, ChartNode, type ChartNodeContent, ChartStyle, ChartTooltip, ChartTooltipContent, CodeexecContent, type CodeexecContentProps, CodegenContent, type CodegenContentProps, CollapsibleCodeBlock, type CollapsibleCodeBlockProps, Content, type ContentChartConfig, type ContentChunk, type ContentComponentProps, type ContentProps, type ContentType, type DataFetcher, DatasetChart, type DatasetChartProps, type DatasetDetails, DatasetDownload, type DatasetDownloadProps, type DatasetFetchRequest, type DatasetFilter, DatasetTable, type DatasetTableProps, DownloadButtonNode, type DownloadButtonNodeContent, type Entity, type EntityType, ErdoProvider, type ErdoProviderConfig, type ErdoProviderProps, type ErdoToolRenderType, ErdoToolResult, type ErdoToolResultProps, ErdoUI, type ErdoUIProps, ErrorBoundary, ExecutionStatus, ExpandableOutputContent, type ExpandableOutputContentProps, FileDownloadsNode, type FileDownloadsNodeContent, type GeneratedFile, HeatmapChart, InvocationEvent, type InvocationEventProps, InvocationEvents, type InvocationEventsProps, InvocationStatus, JSONStreamParser, type JSONValue, JsonContent, type JsonContentProps, LineChart, Loader, Log, LogContent, type LogContentProps, type LogProps, MarkdownContent, type MarkdownContentProps, type Memory, MemoryContent, type MemoryContentProps, type Message, type MessageContent, type MessageStreamingState, type MessageWithContents, type NodeRendererProps, type NullString, Output, type OutputContent, type OutputProps, type OutputWithContents, PieChart, type RawApiContent, type ResolvedBotInvocation, type ResultHandler, type SSEEventData, ScatterChart, type SpinnerStatus, SqlContent, type SqlContentProps, type Status, type StatusEvent, StatusSpinner, type StatusSpinnerProps, StderrText, StdoutText, StdwarnText, type Step, StepInvocation, type StepInvocationProps, StepInvocationStatus, type StepInvocationStatusProps, StepTreeContent, type StepTreeContentProps, SuggestionsNode, type SuggestionsNodeContent, TableContent, type TableContentProps, TableNode, type TableNodeContent, TextContent, type TextContentProps, TextMarkdownNode, type TextMarkdownNodeContent, ThinkingContent, type ThinkingContentProps, ToolGroupContent, type ToolGroupContentProps, UIGenerationNodes, type UIGenerationNodesProps, type UINode, type UseDatasetContentsResult, type UseThreadOptions, type UseThreadReturn, WebParseContent, type WebParseContentProps, WebSearchContent, type WebSearchContentProps, type WrapperType, WritingLoader, agentStateToContents, cn, completeStreamingContent, createAgentStreamStore, createInitialAgentState, extractContentItems, formatValue, getErdoToolName, getErdoToolRenderType, handleAgentEvent, handleIncrementalMixedJsonParsing, handleSSEEvent, hasRenderableAssistantOutput, isErdoTool, isJsonLike, isNullString, isParsingComplete, isParsingInProgress, isWhitespaceChar, nodeComponents, normalizeContent, normalizeContents, normalizeUIGenerationChunks, normalizeUINodes, parseCompleteJson, parseMixedJson, parseToDate, resolveKeyFromData, sliceAgentStateToRoot, toSnakeCase, unwrapNullString, unwrapNullStringOr, useAgentStreamGlobalState, useAgentStreamStoreOptional, useChartZoom, useDatasetContents, useErdoConfig, useErdoConfigOptional, useInvocationState, useMultipleDatasetContents, useMultipleDatasetRequests, useThread };
|
|
2102
|
+
export { type AgentStreamStore, AgentStreamStoreProvider, type AgentStreamStoreProviderProps, BarChart, type BaseChartProps, type BotInvocation, BotInvocationContent, type BotInvocationContentData, type BotInvocationContentProps, type BotInvocationData, type BotInvocationEventInfo, type BotInvocationStatusInfo, Chart, type ChartConfig, ChartContainer, ChartContent, type ChartContentProps, ChartLegend, ChartLegendContent, ChartNode, type ChartNodeContent, ChartStyle, ChartTooltip, ChartTooltipContent, CodeexecContent, type CodeexecContentProps, CodegenContent, type CodegenContentProps, CollapsibleCodeBlock, type CollapsibleCodeBlockProps, Content, type ContentChartConfig, type ContentChunk, type ContentComponentProps, type ContentProps, type ContentType, type DataFetcher, DatasetChart, type DatasetChartProps, type DatasetDetails, DatasetDownload, type DatasetDownloadProps, type DatasetFetchRequest, type DatasetFilter, DatasetMetric, type DatasetMetricProps, DatasetTable, type DatasetTableProps, DownloadButtonNode, type DownloadButtonNodeContent, type Entity, type EntityType, ErdoProvider, type ErdoProviderConfig, type ErdoProviderProps, type ErdoToolRenderType, ErdoToolResult, type ErdoToolResultProps, ErdoUI, type ErdoUIProps, ErrorBoundary, ExecutionStatus, ExpandableOutputContent, type ExpandableOutputContentProps, FileDownloadsNode, type FileDownloadsNodeContent, type GeneratedFile, HeatmapChart, InvocationEvent, type InvocationEventProps, InvocationEvents, type InvocationEventsProps, InvocationStatus, JSONStreamParser, type JSONValue, JsonContent, type JsonContentProps, LineChart, Loader, Log, LogContent, type LogContentProps, type LogProps, MarkdownContent, type MarkdownContentProps, type Memory, MemoryContent, type MemoryContentProps, type Message, type MessageContent, type MessageStreamingState, type MessageWithContents, type NodeRendererProps, type NullString, Output, type OutputContent, type OutputProps, type OutputWithContents, PieChart, type RawApiContent, type ResolvedBotInvocation, type ResultHandler, type SSEEventData, ScatterChart, type SpinnerStatus, SqlContent, type SqlContentProps, type Status, type StatusEvent, StatusSpinner, type StatusSpinnerProps, StderrText, StdoutText, StdwarnText, type Step, StepInvocation, type StepInvocationProps, StepInvocationStatus, type StepInvocationStatusProps, StepTreeContent, type StepTreeContentProps, SuggestionsNode, type SuggestionsNodeContent, TableContent, type TableContentProps, TableNode, type TableNodeContent, TextContent, type TextContentProps, TextMarkdownNode, type TextMarkdownNodeContent, ThinkingContent, type ThinkingContentProps, ToolGroupContent, type ToolGroupContentProps, UIGenerationNodes, type UIGenerationNodesProps, type UINode, type UseDatasetContentsResult, type UseThreadOptions, type UseThreadReturn, WebParseContent, type WebParseContentProps, WebSearchContent, type WebSearchContentProps, type WrapperType, WritingLoader, agentStateToContents, cn, completeStreamingContent, createAgentStreamStore, createInitialAgentState, extractContentItems, formatValue, getErdoToolName, getErdoToolRenderType, handleAgentEvent, handleIncrementalMixedJsonParsing, handleSSEEvent, hasRenderableAssistantOutput, isErdoTool, isJsonLike, isNullString, isParsingComplete, isParsingInProgress, isWhitespaceChar, nodeComponents, normalizeContent, normalizeContents, normalizeUIGenerationChunks, normalizeUINodes, parseCompleteJson, parseMixedJson, parseToDate, resolveKeyFromData, sliceAgentStateToRoot, toSnakeCase, unwrapNullString, unwrapNullStringOr, useAgentStreamGlobalState, useAgentStreamStoreOptional, useChartZoom, useDatasetContents, useErdoConfig, useErdoConfigOptional, useInvocationState, useMultipleDatasetContents, useMultipleDatasetRequests, useThread };
|
package/dist/index.d.ts
CHANGED
|
@@ -182,6 +182,48 @@ declare function useErdoConfig(): ErdoProviderConfig;
|
|
|
182
182
|
*/
|
|
183
183
|
declare function useErdoConfigOptional(): ErdoProviderConfig | null;
|
|
184
184
|
|
|
185
|
+
interface DatasetMetricProps {
|
|
186
|
+
/** Metric label (e.g. "Total Revenue") */
|
|
187
|
+
label: string;
|
|
188
|
+
/** Dataset slug to query */
|
|
189
|
+
datasetSlug: string;
|
|
190
|
+
/** Invocation/thread ID for data fetching context */
|
|
191
|
+
invocationId: string;
|
|
192
|
+
/** SQL query that returns a single row with the metric value.
|
|
193
|
+
* e.g. "SELECT SUM(revenue) as total FROM data" */
|
|
194
|
+
sqlQuery: string;
|
|
195
|
+
/** Column key to read the value from (must match a column in the query result) */
|
|
196
|
+
valueKey: string;
|
|
197
|
+
/** Optional resource key for Excel files */
|
|
198
|
+
resourceKey?: string;
|
|
199
|
+
/** d3-format string for value display (e.g. ",.0f" for thousands, ".1%" for percent) */
|
|
200
|
+
format?: string;
|
|
201
|
+
/** Optional prefix (e.g. "$") */
|
|
202
|
+
prefix?: string;
|
|
203
|
+
/** Optional suffix (e.g. "%", " users") */
|
|
204
|
+
suffix?: string;
|
|
205
|
+
/** Optional subtitle/description shown below the value */
|
|
206
|
+
description?: string;
|
|
207
|
+
/** Class for the outer container */
|
|
208
|
+
className?: string;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* A single KPI/metric card that fetches one value from a dataset.
|
|
212
|
+
* Handles loading, error, and empty states automatically.
|
|
213
|
+
*
|
|
214
|
+
* @example
|
|
215
|
+
* <DatasetMetric
|
|
216
|
+
* label="Total Revenue"
|
|
217
|
+
* datasetSlug="org.sales-data"
|
|
218
|
+
* invocationId="iframe"
|
|
219
|
+
* sqlQuery="SELECT SUM(CAST(revenue AS DOUBLE)) as total FROM data"
|
|
220
|
+
* valueKey="total"
|
|
221
|
+
* prefix="$"
|
|
222
|
+
* format=",.0f"
|
|
223
|
+
* />
|
|
224
|
+
*/
|
|
225
|
+
declare function DatasetMetric({ label, datasetSlug, invocationId, sqlQuery, valueKey, resourceKey, format, prefix, suffix, description, className, }: DatasetMetricProps): react_jsx_runtime.JSX.Element;
|
|
226
|
+
|
|
185
227
|
declare const THEMES: {
|
|
186
228
|
readonly light: "";
|
|
187
229
|
readonly dark: ".dark";
|
|
@@ -2057,4 +2099,4 @@ declare function useInvocationState(invocationId: string | undefined): AgentStre
|
|
|
2057
2099
|
*/
|
|
2058
2100
|
declare function useAgentStreamGlobalState(): AgentStreamState;
|
|
2059
2101
|
|
|
2060
|
-
export { type AgentStreamStore, AgentStreamStoreProvider, type AgentStreamStoreProviderProps, BarChart, type BaseChartProps, type BotInvocation, BotInvocationContent, type BotInvocationContentData, type BotInvocationContentProps, type BotInvocationData, type BotInvocationEventInfo, type BotInvocationStatusInfo, Chart, type ChartConfig, ChartContainer, ChartContent, type ChartContentProps, ChartLegend, ChartLegendContent, ChartNode, type ChartNodeContent, ChartStyle, ChartTooltip, ChartTooltipContent, CodeexecContent, type CodeexecContentProps, CodegenContent, type CodegenContentProps, CollapsibleCodeBlock, type CollapsibleCodeBlockProps, Content, type ContentChartConfig, type ContentChunk, type ContentComponentProps, type ContentProps, type ContentType, type DataFetcher, DatasetChart, type DatasetChartProps, type DatasetDetails, DatasetDownload, type DatasetDownloadProps, type DatasetFetchRequest, type DatasetFilter, DatasetTable, type DatasetTableProps, DownloadButtonNode, type DownloadButtonNodeContent, type Entity, type EntityType, ErdoProvider, type ErdoProviderConfig, type ErdoProviderProps, type ErdoToolRenderType, ErdoToolResult, type ErdoToolResultProps, ErdoUI, type ErdoUIProps, ErrorBoundary, ExecutionStatus, ExpandableOutputContent, type ExpandableOutputContentProps, FileDownloadsNode, type FileDownloadsNodeContent, type GeneratedFile, HeatmapChart, InvocationEvent, type InvocationEventProps, InvocationEvents, type InvocationEventsProps, InvocationStatus, JSONStreamParser, type JSONValue, JsonContent, type JsonContentProps, LineChart, Loader, Log, LogContent, type LogContentProps, type LogProps, MarkdownContent, type MarkdownContentProps, type Memory, MemoryContent, type MemoryContentProps, type Message, type MessageContent, type MessageStreamingState, type MessageWithContents, type NodeRendererProps, type NullString, Output, type OutputContent, type OutputProps, type OutputWithContents, PieChart, type RawApiContent, type ResolvedBotInvocation, type ResultHandler, type SSEEventData, ScatterChart, type SpinnerStatus, SqlContent, type SqlContentProps, type Status, type StatusEvent, StatusSpinner, type StatusSpinnerProps, StderrText, StdoutText, StdwarnText, type Step, StepInvocation, type StepInvocationProps, StepInvocationStatus, type StepInvocationStatusProps, StepTreeContent, type StepTreeContentProps, SuggestionsNode, type SuggestionsNodeContent, TableContent, type TableContentProps, TableNode, type TableNodeContent, TextContent, type TextContentProps, TextMarkdownNode, type TextMarkdownNodeContent, ThinkingContent, type ThinkingContentProps, ToolGroupContent, type ToolGroupContentProps, UIGenerationNodes, type UIGenerationNodesProps, type UINode, type UseDatasetContentsResult, type UseThreadOptions, type UseThreadReturn, WebParseContent, type WebParseContentProps, WebSearchContent, type WebSearchContentProps, type WrapperType, WritingLoader, agentStateToContents, cn, completeStreamingContent, createAgentStreamStore, createInitialAgentState, extractContentItems, formatValue, getErdoToolName, getErdoToolRenderType, handleAgentEvent, handleIncrementalMixedJsonParsing, handleSSEEvent, hasRenderableAssistantOutput, isErdoTool, isJsonLike, isNullString, isParsingComplete, isParsingInProgress, isWhitespaceChar, nodeComponents, normalizeContent, normalizeContents, normalizeUIGenerationChunks, normalizeUINodes, parseCompleteJson, parseMixedJson, parseToDate, resolveKeyFromData, sliceAgentStateToRoot, toSnakeCase, unwrapNullString, unwrapNullStringOr, useAgentStreamGlobalState, useAgentStreamStoreOptional, useChartZoom, useDatasetContents, useErdoConfig, useErdoConfigOptional, useInvocationState, useMultipleDatasetContents, useMultipleDatasetRequests, useThread };
|
|
2102
|
+
export { type AgentStreamStore, AgentStreamStoreProvider, type AgentStreamStoreProviderProps, BarChart, type BaseChartProps, type BotInvocation, BotInvocationContent, type BotInvocationContentData, type BotInvocationContentProps, type BotInvocationData, type BotInvocationEventInfo, type BotInvocationStatusInfo, Chart, type ChartConfig, ChartContainer, ChartContent, type ChartContentProps, ChartLegend, ChartLegendContent, ChartNode, type ChartNodeContent, ChartStyle, ChartTooltip, ChartTooltipContent, CodeexecContent, type CodeexecContentProps, CodegenContent, type CodegenContentProps, CollapsibleCodeBlock, type CollapsibleCodeBlockProps, Content, type ContentChartConfig, type ContentChunk, type ContentComponentProps, type ContentProps, type ContentType, type DataFetcher, DatasetChart, type DatasetChartProps, type DatasetDetails, DatasetDownload, type DatasetDownloadProps, type DatasetFetchRequest, type DatasetFilter, DatasetMetric, type DatasetMetricProps, DatasetTable, type DatasetTableProps, DownloadButtonNode, type DownloadButtonNodeContent, type Entity, type EntityType, ErdoProvider, type ErdoProviderConfig, type ErdoProviderProps, type ErdoToolRenderType, ErdoToolResult, type ErdoToolResultProps, ErdoUI, type ErdoUIProps, ErrorBoundary, ExecutionStatus, ExpandableOutputContent, type ExpandableOutputContentProps, FileDownloadsNode, type FileDownloadsNodeContent, type GeneratedFile, HeatmapChart, InvocationEvent, type InvocationEventProps, InvocationEvents, type InvocationEventsProps, InvocationStatus, JSONStreamParser, type JSONValue, JsonContent, type JsonContentProps, LineChart, Loader, Log, LogContent, type LogContentProps, type LogProps, MarkdownContent, type MarkdownContentProps, type Memory, MemoryContent, type MemoryContentProps, type Message, type MessageContent, type MessageStreamingState, type MessageWithContents, type NodeRendererProps, type NullString, Output, type OutputContent, type OutputProps, type OutputWithContents, PieChart, type RawApiContent, type ResolvedBotInvocation, type ResultHandler, type SSEEventData, ScatterChart, type SpinnerStatus, SqlContent, type SqlContentProps, type Status, type StatusEvent, StatusSpinner, type StatusSpinnerProps, StderrText, StdoutText, StdwarnText, type Step, StepInvocation, type StepInvocationProps, StepInvocationStatus, type StepInvocationStatusProps, StepTreeContent, type StepTreeContentProps, SuggestionsNode, type SuggestionsNodeContent, TableContent, type TableContentProps, TableNode, type TableNodeContent, TextContent, type TextContentProps, TextMarkdownNode, type TextMarkdownNodeContent, ThinkingContent, type ThinkingContentProps, ToolGroupContent, type ToolGroupContentProps, UIGenerationNodes, type UIGenerationNodesProps, type UINode, type UseDatasetContentsResult, type UseThreadOptions, type UseThreadReturn, WebParseContent, type WebParseContentProps, WebSearchContent, type WebSearchContentProps, type WrapperType, WritingLoader, agentStateToContents, cn, completeStreamingContent, createAgentStreamStore, createInitialAgentState, extractContentItems, formatValue, getErdoToolName, getErdoToolRenderType, handleAgentEvent, handleIncrementalMixedJsonParsing, handleSSEEvent, hasRenderableAssistantOutput, isErdoTool, isJsonLike, isNullString, isParsingComplete, isParsingInProgress, isWhitespaceChar, nodeComponents, normalizeContent, normalizeContents, normalizeUIGenerationChunks, normalizeUINodes, parseCompleteJson, parseMixedJson, parseToDate, resolveKeyFromData, sliceAgentStateToRoot, toSnakeCase, unwrapNullString, unwrapNullStringOr, useAgentStreamGlobalState, useAgentStreamStoreOptional, useChartZoom, useDatasetContents, useErdoConfig, useErdoConfigOptional, useInvocationState, useMultipleDatasetContents, useMultipleDatasetRequests, useThread };
|