@erdoai/ui 0.1.28 → 0.1.31
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/index.cjs +12 -7
- package/dist/index.d.cts +35 -1
- package/dist/index.d.ts +35 -1
- package/dist/index.js +12 -7
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1374,6 +1374,40 @@ declare function formatValue(value: any, format?: string | null, valueType?: 'nu
|
|
|
1374
1374
|
*/
|
|
1375
1375
|
declare function parseToDate(value: any): Date | null;
|
|
1376
1376
|
|
|
1377
|
+
/**
|
|
1378
|
+
* Utilities for handling NullString wrapper types from the backend.
|
|
1379
|
+
*
|
|
1380
|
+
* The backend sends nullable strings in the format: { String: "value", Valid: true }
|
|
1381
|
+
* These utilities help unwrap them to plain strings.
|
|
1382
|
+
*/
|
|
1383
|
+
interface NullString {
|
|
1384
|
+
String: string;
|
|
1385
|
+
Valid: boolean;
|
|
1386
|
+
}
|
|
1387
|
+
/**
|
|
1388
|
+
* Check if a value is a NullString wrapper.
|
|
1389
|
+
*/
|
|
1390
|
+
declare function isNullString(value: unknown): value is NullString;
|
|
1391
|
+
/**
|
|
1392
|
+
* Unwrap a value that may be a NullString wrapper from the backend.
|
|
1393
|
+
* Returns the string value if valid, undefined otherwise.
|
|
1394
|
+
*
|
|
1395
|
+
* @example
|
|
1396
|
+
* unwrapNullString("hello") // "hello"
|
|
1397
|
+
* unwrapNullString({ String: "hello", Valid: true }) // "hello"
|
|
1398
|
+
* unwrapNullString({ String: "", Valid: false }) // undefined
|
|
1399
|
+
* unwrapNullString(undefined) // undefined
|
|
1400
|
+
*/
|
|
1401
|
+
declare function unwrapNullString(value: unknown): string | undefined;
|
|
1402
|
+
/**
|
|
1403
|
+
* Unwrap a NullString with a default value.
|
|
1404
|
+
*
|
|
1405
|
+
* @example
|
|
1406
|
+
* unwrapNullStringOr({ String: "", Valid: false }, "default") // "default"
|
|
1407
|
+
* unwrapNullStringOr({ String: "hello", Valid: true }, "default") // "hello"
|
|
1408
|
+
*/
|
|
1409
|
+
declare function unwrapNullStringOr(value: unknown, defaultValue: string): string;
|
|
1410
|
+
|
|
1377
1411
|
declare function cn(...inputs: ClassValue[]): string;
|
|
1378
1412
|
|
|
1379
1413
|
/**
|
|
@@ -1461,4 +1495,4 @@ declare function handleIncrementalMixedJsonParsing(outputContent: MessageContent
|
|
|
1461
1495
|
*/
|
|
1462
1496
|
declare function handleSSEEvent(eventType: string, event: SSEEventData, path: string[], threadID: string, activeMessagesByID: Record<string, MessageWithContents>, currentEntity?: Entity | null, parents?: Entity[], entityIds?: Record<string, string>): Entity | null;
|
|
1463
1497
|
|
|
1464
|
-
export { 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, 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, DatasetTable, type DatasetTableProps, type Entity, type EntityType, ErdoProvider, type ErdoProviderConfig, type ErdoProviderProps, ErdoUI, type ErdoUIProps, ErrorBoundary, ExecutionStatus, ExpandableOutputContent, type ExpandableOutputContentProps, HeatmapChart, InvocationEvent, type InvocationEventProps, InvocationEvents, type InvocationEventsProps, InvocationStatus, JSONStreamParser, type JSONValue, JsonContent, type JsonContentProps, LineChart, Log, LogContent, type LogContentProps, type LogProps, MarkdownContent, type MarkdownContentProps, type Message, type MessageContent, type MessageStreamingState, type MessageWithContents, Output, type OutputContent, type OutputProps, type OutputWithContents, PieChart, 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, StreamingLoader, TableContent, type TableContentProps, TextContent, type TextContentProps, ThinkingContent, type ThinkingContentProps, ToolGroupContent, type ToolGroupContentProps, type UseThreadOptions, type UseThreadReturn, WebParseContent, type WebParseContentProps, WebSearchContent, type WebSearchContentProps, type WrapperType, WritingLoader, cn, extractContentItems, formatValue, handleIncrementalMixedJsonParsing, handleSSEEvent, isJsonLike, isParsingComplete, isParsingInProgress, isWhitespaceChar, parseCompleteJson, parseMixedJson, parseToDate, resolveKeyFromData, toSnakeCase, useChartZoom, useDatasetContents, useErdoConfig, useErdoConfigOptional, useMultipleDatasetContents, useThread };
|
|
1498
|
+
export { 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, 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, DatasetTable, type DatasetTableProps, type Entity, type EntityType, ErdoProvider, type ErdoProviderConfig, type ErdoProviderProps, ErdoUI, type ErdoUIProps, ErrorBoundary, ExecutionStatus, ExpandableOutputContent, type ExpandableOutputContentProps, HeatmapChart, InvocationEvent, type InvocationEventProps, InvocationEvents, type InvocationEventsProps, InvocationStatus, JSONStreamParser, type JSONValue, JsonContent, type JsonContentProps, LineChart, Log, LogContent, type LogContentProps, type LogProps, MarkdownContent, type MarkdownContentProps, type Message, type MessageContent, type MessageStreamingState, type MessageWithContents, type NullString, Output, type OutputContent, type OutputProps, type OutputWithContents, PieChart, 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, StreamingLoader, TableContent, type TableContentProps, TextContent, type TextContentProps, ThinkingContent, type ThinkingContentProps, ToolGroupContent, type ToolGroupContentProps, type UseThreadOptions, type UseThreadReturn, WebParseContent, type WebParseContentProps, WebSearchContent, type WebSearchContentProps, type WrapperType, WritingLoader, cn, extractContentItems, formatValue, handleIncrementalMixedJsonParsing, handleSSEEvent, isJsonLike, isNullString, isParsingComplete, isParsingInProgress, isWhitespaceChar, parseCompleteJson, parseMixedJson, parseToDate, resolveKeyFromData, toSnakeCase, unwrapNullString, unwrapNullStringOr, useChartZoom, useDatasetContents, useErdoConfig, useErdoConfigOptional, useMultipleDatasetContents, useThread };
|
package/dist/index.d.ts
CHANGED
|
@@ -1374,6 +1374,40 @@ declare function formatValue(value: any, format?: string | null, valueType?: 'nu
|
|
|
1374
1374
|
*/
|
|
1375
1375
|
declare function parseToDate(value: any): Date | null;
|
|
1376
1376
|
|
|
1377
|
+
/**
|
|
1378
|
+
* Utilities for handling NullString wrapper types from the backend.
|
|
1379
|
+
*
|
|
1380
|
+
* The backend sends nullable strings in the format: { String: "value", Valid: true }
|
|
1381
|
+
* These utilities help unwrap them to plain strings.
|
|
1382
|
+
*/
|
|
1383
|
+
interface NullString {
|
|
1384
|
+
String: string;
|
|
1385
|
+
Valid: boolean;
|
|
1386
|
+
}
|
|
1387
|
+
/**
|
|
1388
|
+
* Check if a value is a NullString wrapper.
|
|
1389
|
+
*/
|
|
1390
|
+
declare function isNullString(value: unknown): value is NullString;
|
|
1391
|
+
/**
|
|
1392
|
+
* Unwrap a value that may be a NullString wrapper from the backend.
|
|
1393
|
+
* Returns the string value if valid, undefined otherwise.
|
|
1394
|
+
*
|
|
1395
|
+
* @example
|
|
1396
|
+
* unwrapNullString("hello") // "hello"
|
|
1397
|
+
* unwrapNullString({ String: "hello", Valid: true }) // "hello"
|
|
1398
|
+
* unwrapNullString({ String: "", Valid: false }) // undefined
|
|
1399
|
+
* unwrapNullString(undefined) // undefined
|
|
1400
|
+
*/
|
|
1401
|
+
declare function unwrapNullString(value: unknown): string | undefined;
|
|
1402
|
+
/**
|
|
1403
|
+
* Unwrap a NullString with a default value.
|
|
1404
|
+
*
|
|
1405
|
+
* @example
|
|
1406
|
+
* unwrapNullStringOr({ String: "", Valid: false }, "default") // "default"
|
|
1407
|
+
* unwrapNullStringOr({ String: "hello", Valid: true }, "default") // "hello"
|
|
1408
|
+
*/
|
|
1409
|
+
declare function unwrapNullStringOr(value: unknown, defaultValue: string): string;
|
|
1410
|
+
|
|
1377
1411
|
declare function cn(...inputs: ClassValue[]): string;
|
|
1378
1412
|
|
|
1379
1413
|
/**
|
|
@@ -1461,4 +1495,4 @@ declare function handleIncrementalMixedJsonParsing(outputContent: MessageContent
|
|
|
1461
1495
|
*/
|
|
1462
1496
|
declare function handleSSEEvent(eventType: string, event: SSEEventData, path: string[], threadID: string, activeMessagesByID: Record<string, MessageWithContents>, currentEntity?: Entity | null, parents?: Entity[], entityIds?: Record<string, string>): Entity | null;
|
|
1463
1497
|
|
|
1464
|
-
export { 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, 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, DatasetTable, type DatasetTableProps, type Entity, type EntityType, ErdoProvider, type ErdoProviderConfig, type ErdoProviderProps, ErdoUI, type ErdoUIProps, ErrorBoundary, ExecutionStatus, ExpandableOutputContent, type ExpandableOutputContentProps, HeatmapChart, InvocationEvent, type InvocationEventProps, InvocationEvents, type InvocationEventsProps, InvocationStatus, JSONStreamParser, type JSONValue, JsonContent, type JsonContentProps, LineChart, Log, LogContent, type LogContentProps, type LogProps, MarkdownContent, type MarkdownContentProps, type Message, type MessageContent, type MessageStreamingState, type MessageWithContents, Output, type OutputContent, type OutputProps, type OutputWithContents, PieChart, 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, StreamingLoader, TableContent, type TableContentProps, TextContent, type TextContentProps, ThinkingContent, type ThinkingContentProps, ToolGroupContent, type ToolGroupContentProps, type UseThreadOptions, type UseThreadReturn, WebParseContent, type WebParseContentProps, WebSearchContent, type WebSearchContentProps, type WrapperType, WritingLoader, cn, extractContentItems, formatValue, handleIncrementalMixedJsonParsing, handleSSEEvent, isJsonLike, isParsingComplete, isParsingInProgress, isWhitespaceChar, parseCompleteJson, parseMixedJson, parseToDate, resolveKeyFromData, toSnakeCase, useChartZoom, useDatasetContents, useErdoConfig, useErdoConfigOptional, useMultipleDatasetContents, useThread };
|
|
1498
|
+
export { 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, 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, DatasetTable, type DatasetTableProps, type Entity, type EntityType, ErdoProvider, type ErdoProviderConfig, type ErdoProviderProps, ErdoUI, type ErdoUIProps, ErrorBoundary, ExecutionStatus, ExpandableOutputContent, type ExpandableOutputContentProps, HeatmapChart, InvocationEvent, type InvocationEventProps, InvocationEvents, type InvocationEventsProps, InvocationStatus, JSONStreamParser, type JSONValue, JsonContent, type JsonContentProps, LineChart, Log, LogContent, type LogContentProps, type LogProps, MarkdownContent, type MarkdownContentProps, type Message, type MessageContent, type MessageStreamingState, type MessageWithContents, type NullString, Output, type OutputContent, type OutputProps, type OutputWithContents, PieChart, 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, StreamingLoader, TableContent, type TableContentProps, TextContent, type TextContentProps, ThinkingContent, type ThinkingContentProps, ToolGroupContent, type ToolGroupContentProps, type UseThreadOptions, type UseThreadReturn, WebParseContent, type WebParseContentProps, WebSearchContent, type WebSearchContentProps, type WrapperType, WritingLoader, cn, extractContentItems, formatValue, handleIncrementalMixedJsonParsing, handleSSEEvent, isJsonLike, isNullString, isParsingComplete, isParsingInProgress, isWhitespaceChar, parseCompleteJson, parseMixedJson, parseToDate, resolveKeyFromData, toSnakeCase, unwrapNullString, unwrapNullStringOr, useChartZoom, useDatasetContents, useErdoConfig, useErdoConfigOptional, useMultipleDatasetContents, useThread };
|