@erdoai/ui 0.1.46 → 0.1.48

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.d.cts CHANGED
@@ -255,6 +255,16 @@ interface BaseChartProps {
255
255
  onDownloadSuccess?: (fileName: string) => void;
256
256
  /** Callback when download fails */
257
257
  onDownloadError?: (error: string) => void;
258
+ /** Class for the outer wrapper */
259
+ className?: string;
260
+ /** Class for the chart container */
261
+ chartContainerClassName?: string;
262
+ /** Class for the download button */
263
+ downloadButtonClassName?: string;
264
+ /** Class for the reset zoom button */
265
+ resetZoomButtonClassName?: string;
266
+ /** Class for the error fallback */
267
+ errorClassName?: string;
258
268
  }
259
269
  interface ChartProps extends BaseChartProps {
260
270
  ChartComponent: React__default.ComponentType<any>;
@@ -316,6 +326,10 @@ interface DatasetChartProps {
316
326
  onScrollUpdate?: () => void;
317
327
  /** Enable download button (default: true) */
318
328
  enableDownload?: boolean;
329
+ /** Class for the outer wrapper */
330
+ className?: string;
331
+ /** Class for the chart container */
332
+ chartContainerClassName?: string;
319
333
  }
320
334
  declare const DatasetChart: React__default.NamedExoticComponent<DatasetChartProps>;
321
335
 
@@ -332,7 +346,16 @@ interface DatasetTableProps {
332
346
  datasetSlug: string;
333
347
  columns?: TableColumn$1[];
334
348
  maxRows?: number;
349
+ /** Class for the outer container */
335
350
  className?: string;
351
+ /** Class for the table wrapper (border, rounded corners) */
352
+ tableWrapperClassName?: string;
353
+ /** Class for the table header row */
354
+ headerClassName?: string;
355
+ /** Class for loading state message */
356
+ loadingClassName?: string;
357
+ /** Class for empty/no data state messages */
358
+ emptyClassName?: string;
336
359
  /** Optional callback for scroll updates when table loads */
337
360
  onScrollUpdate?: () => void;
338
361
  }
@@ -340,7 +363,7 @@ interface DatasetTableProps {
340
363
  * A table component that fetches data from a dataset and renders it.
341
364
  * Requires ErdoProvider to be set up with data fetching capabilities.
342
365
  */
343
- declare function DatasetTable({ title, invocationId, datasetSlug, columns, maxRows, className, onScrollUpdate, }: DatasetTableProps): react_jsx_runtime.JSX.Element;
366
+ declare function DatasetTable({ title, invocationId, datasetSlug, columns, maxRows, className, tableWrapperClassName, headerClassName, loadingClassName, emptyClassName, onScrollUpdate, }: DatasetTableProps): react_jsx_runtime.JSX.Element;
344
367
 
345
368
  /**
346
369
  * JSON streaming parser utilities.
@@ -931,8 +954,12 @@ interface ChartContentProps {
931
954
  config: ContentChartConfig;
932
955
  data: any[];
933
956
  className?: string;
957
+ /** Class for error state messages */
958
+ errorClassName?: string;
959
+ /** Class for empty/no data state messages */
960
+ emptyClassName?: string;
934
961
  }
935
- declare function ChartContent({ config, data, className }: ChartContentProps): react_jsx_runtime.JSX.Element;
962
+ declare function ChartContent({ config, data, className, errorClassName, emptyClassName }: ChartContentProps): react_jsx_runtime.JSX.Element;
936
963
 
937
964
  interface ThinkingContentProps {
938
965
  item: ContentItem;
@@ -1055,11 +1082,13 @@ interface ToolGroupContentProps {
1055
1082
  className?: string;
1056
1083
  }>;
1057
1084
  className?: string;
1085
+ /** Class for the fallback JSON pre element when no ContentComponent is available */
1086
+ fallbackClassName?: string;
1058
1087
  }
1059
1088
  /**
1060
1089
  * Renders tool invocations and their results in a collapsible format.
1061
1090
  */
1062
- declare function ToolGroupContent({ toolGroup, ContentComponent, className, }: ToolGroupContentProps): react_jsx_runtime.JSX.Element;
1091
+ declare function ToolGroupContent({ toolGroup, ContentComponent, className, fallbackClassName, }: ToolGroupContentProps): react_jsx_runtime.JSX.Element;
1063
1092
 
1064
1093
  /** Content data for a bot invocation (passed in ContentItem.content) */
1065
1094
  interface BotInvocationContentData {
@@ -1188,6 +1217,10 @@ interface NodeRendererProps {
1188
1217
  className?: string;
1189
1218
  invocationId?: string;
1190
1219
  onSuggestionClick?: (suggestion: string) => void;
1220
+ /** Class for warning/error messages */
1221
+ warningClassName?: string;
1222
+ /** Class for suggestion buttons */
1223
+ suggestionButtonClassName?: string;
1191
1224
  }
1192
1225
  /** Chart node content structure */
1193
1226
  interface ChartNodeContent {
@@ -1219,15 +1252,15 @@ interface SuggestionsNodeContent {
1219
1252
  suggestions?: string[];
1220
1253
  }
1221
1254
  /** Chart node renderer - fetches data via DatasetChart */
1222
- declare function ChartNode({ node, invocationId }: NodeRendererProps): react_jsx_runtime.JSX.Element | null;
1255
+ declare function ChartNode({ node, invocationId, warningClassName }: NodeRendererProps): react_jsx_runtime.JSX.Element | null;
1223
1256
  /** Table node renderer - fetches data via DatasetTable */
1224
- declare function TableNode({ node, className, invocationId }: NodeRendererProps): react_jsx_runtime.JSX.Element | null;
1257
+ declare function TableNode({ node, className, invocationId, warningClassName }: NodeRendererProps): react_jsx_runtime.JSX.Element | null;
1225
1258
  /** TextMarkdown node renderer */
1226
1259
  declare function TextMarkdownNode({ node, className }: NodeRendererProps): react_jsx_runtime.JSX.Element;
1227
1260
  /** DownloadButton node renderer */
1228
1261
  declare function DownloadButtonNode({ node, className, invocationId }: NodeRendererProps): react_jsx_runtime.JSX.Element | null;
1229
1262
  /** Suggestions node renderer */
1230
- declare function SuggestionsNode({ node, onSuggestionClick }: NodeRendererProps): react_jsx_runtime.JSX.Element | null;
1263
+ declare function SuggestionsNode({ node, onSuggestionClick, suggestionButtonClassName }: NodeRendererProps): react_jsx_runtime.JSX.Element | null;
1231
1264
  /** Node components map */
1232
1265
  declare const nodeComponents: Record<string, React__default.ComponentType<NodeRendererProps>>;
1233
1266
  interface UIGenerationNodesProps {
@@ -1241,6 +1274,10 @@ interface UIGenerationNodesProps {
1241
1274
  onSuggestionClick?: (suggestion: string) => void;
1242
1275
  /** Override node renderers by type */
1243
1276
  customNodeComponents?: Record<string, React__default.ComponentType<NodeRendererProps>>;
1277
+ /** Class for warning/error messages */
1278
+ warningClassName?: string;
1279
+ /** Class for suggestion buttons */
1280
+ suggestionButtonClassName?: string;
1244
1281
  }
1245
1282
  /**
1246
1283
  * Renders UI generation nodes with support for custom node renderers.
@@ -1266,7 +1303,7 @@ interface UIGenerationNodesProps {
1266
1303
  * />
1267
1304
  * ```
1268
1305
  */
1269
- declare function UIGenerationNodes({ nodes, className, invocationId, onSuggestionClick, customNodeComponents, }: UIGenerationNodesProps): react_jsx_runtime.JSX.Element | null;
1306
+ declare function UIGenerationNodes({ nodes, className, invocationId, onSuggestionClick, customNodeComponents, warningClassName, suggestionButtonClassName, }: UIGenerationNodesProps): react_jsx_runtime.JSX.Element | null;
1270
1307
 
1271
1308
  interface ZoomState {
1272
1309
  refAreaLeft: number | null;
package/dist/index.d.ts CHANGED
@@ -255,6 +255,16 @@ interface BaseChartProps {
255
255
  onDownloadSuccess?: (fileName: string) => void;
256
256
  /** Callback when download fails */
257
257
  onDownloadError?: (error: string) => void;
258
+ /** Class for the outer wrapper */
259
+ className?: string;
260
+ /** Class for the chart container */
261
+ chartContainerClassName?: string;
262
+ /** Class for the download button */
263
+ downloadButtonClassName?: string;
264
+ /** Class for the reset zoom button */
265
+ resetZoomButtonClassName?: string;
266
+ /** Class for the error fallback */
267
+ errorClassName?: string;
258
268
  }
259
269
  interface ChartProps extends BaseChartProps {
260
270
  ChartComponent: React__default.ComponentType<any>;
@@ -316,6 +326,10 @@ interface DatasetChartProps {
316
326
  onScrollUpdate?: () => void;
317
327
  /** Enable download button (default: true) */
318
328
  enableDownload?: boolean;
329
+ /** Class for the outer wrapper */
330
+ className?: string;
331
+ /** Class for the chart container */
332
+ chartContainerClassName?: string;
319
333
  }
320
334
  declare const DatasetChart: React__default.NamedExoticComponent<DatasetChartProps>;
321
335
 
@@ -332,7 +346,16 @@ interface DatasetTableProps {
332
346
  datasetSlug: string;
333
347
  columns?: TableColumn$1[];
334
348
  maxRows?: number;
349
+ /** Class for the outer container */
335
350
  className?: string;
351
+ /** Class for the table wrapper (border, rounded corners) */
352
+ tableWrapperClassName?: string;
353
+ /** Class for the table header row */
354
+ headerClassName?: string;
355
+ /** Class for loading state message */
356
+ loadingClassName?: string;
357
+ /** Class for empty/no data state messages */
358
+ emptyClassName?: string;
336
359
  /** Optional callback for scroll updates when table loads */
337
360
  onScrollUpdate?: () => void;
338
361
  }
@@ -340,7 +363,7 @@ interface DatasetTableProps {
340
363
  * A table component that fetches data from a dataset and renders it.
341
364
  * Requires ErdoProvider to be set up with data fetching capabilities.
342
365
  */
343
- declare function DatasetTable({ title, invocationId, datasetSlug, columns, maxRows, className, onScrollUpdate, }: DatasetTableProps): react_jsx_runtime.JSX.Element;
366
+ declare function DatasetTable({ title, invocationId, datasetSlug, columns, maxRows, className, tableWrapperClassName, headerClassName, loadingClassName, emptyClassName, onScrollUpdate, }: DatasetTableProps): react_jsx_runtime.JSX.Element;
344
367
 
345
368
  /**
346
369
  * JSON streaming parser utilities.
@@ -931,8 +954,12 @@ interface ChartContentProps {
931
954
  config: ContentChartConfig;
932
955
  data: any[];
933
956
  className?: string;
957
+ /** Class for error state messages */
958
+ errorClassName?: string;
959
+ /** Class for empty/no data state messages */
960
+ emptyClassName?: string;
934
961
  }
935
- declare function ChartContent({ config, data, className }: ChartContentProps): react_jsx_runtime.JSX.Element;
962
+ declare function ChartContent({ config, data, className, errorClassName, emptyClassName }: ChartContentProps): react_jsx_runtime.JSX.Element;
936
963
 
937
964
  interface ThinkingContentProps {
938
965
  item: ContentItem;
@@ -1055,11 +1082,13 @@ interface ToolGroupContentProps {
1055
1082
  className?: string;
1056
1083
  }>;
1057
1084
  className?: string;
1085
+ /** Class for the fallback JSON pre element when no ContentComponent is available */
1086
+ fallbackClassName?: string;
1058
1087
  }
1059
1088
  /**
1060
1089
  * Renders tool invocations and their results in a collapsible format.
1061
1090
  */
1062
- declare function ToolGroupContent({ toolGroup, ContentComponent, className, }: ToolGroupContentProps): react_jsx_runtime.JSX.Element;
1091
+ declare function ToolGroupContent({ toolGroup, ContentComponent, className, fallbackClassName, }: ToolGroupContentProps): react_jsx_runtime.JSX.Element;
1063
1092
 
1064
1093
  /** Content data for a bot invocation (passed in ContentItem.content) */
1065
1094
  interface BotInvocationContentData {
@@ -1188,6 +1217,10 @@ interface NodeRendererProps {
1188
1217
  className?: string;
1189
1218
  invocationId?: string;
1190
1219
  onSuggestionClick?: (suggestion: string) => void;
1220
+ /** Class for warning/error messages */
1221
+ warningClassName?: string;
1222
+ /** Class for suggestion buttons */
1223
+ suggestionButtonClassName?: string;
1191
1224
  }
1192
1225
  /** Chart node content structure */
1193
1226
  interface ChartNodeContent {
@@ -1219,15 +1252,15 @@ interface SuggestionsNodeContent {
1219
1252
  suggestions?: string[];
1220
1253
  }
1221
1254
  /** Chart node renderer - fetches data via DatasetChart */
1222
- declare function ChartNode({ node, invocationId }: NodeRendererProps): react_jsx_runtime.JSX.Element | null;
1255
+ declare function ChartNode({ node, invocationId, warningClassName }: NodeRendererProps): react_jsx_runtime.JSX.Element | null;
1223
1256
  /** Table node renderer - fetches data via DatasetTable */
1224
- declare function TableNode({ node, className, invocationId }: NodeRendererProps): react_jsx_runtime.JSX.Element | null;
1257
+ declare function TableNode({ node, className, invocationId, warningClassName }: NodeRendererProps): react_jsx_runtime.JSX.Element | null;
1225
1258
  /** TextMarkdown node renderer */
1226
1259
  declare function TextMarkdownNode({ node, className }: NodeRendererProps): react_jsx_runtime.JSX.Element;
1227
1260
  /** DownloadButton node renderer */
1228
1261
  declare function DownloadButtonNode({ node, className, invocationId }: NodeRendererProps): react_jsx_runtime.JSX.Element | null;
1229
1262
  /** Suggestions node renderer */
1230
- declare function SuggestionsNode({ node, onSuggestionClick }: NodeRendererProps): react_jsx_runtime.JSX.Element | null;
1263
+ declare function SuggestionsNode({ node, onSuggestionClick, suggestionButtonClassName }: NodeRendererProps): react_jsx_runtime.JSX.Element | null;
1231
1264
  /** Node components map */
1232
1265
  declare const nodeComponents: Record<string, React__default.ComponentType<NodeRendererProps>>;
1233
1266
  interface UIGenerationNodesProps {
@@ -1241,6 +1274,10 @@ interface UIGenerationNodesProps {
1241
1274
  onSuggestionClick?: (suggestion: string) => void;
1242
1275
  /** Override node renderers by type */
1243
1276
  customNodeComponents?: Record<string, React__default.ComponentType<NodeRendererProps>>;
1277
+ /** Class for warning/error messages */
1278
+ warningClassName?: string;
1279
+ /** Class for suggestion buttons */
1280
+ suggestionButtonClassName?: string;
1244
1281
  }
1245
1282
  /**
1246
1283
  * Renders UI generation nodes with support for custom node renderers.
@@ -1266,7 +1303,7 @@ interface UIGenerationNodesProps {
1266
1303
  * />
1267
1304
  * ```
1268
1305
  */
1269
- declare function UIGenerationNodes({ nodes, className, invocationId, onSuggestionClick, customNodeComponents, }: UIGenerationNodesProps): react_jsx_runtime.JSX.Element | null;
1306
+ declare function UIGenerationNodes({ nodes, className, invocationId, onSuggestionClick, customNodeComponents, warningClassName, suggestionButtonClassName, }: UIGenerationNodesProps): react_jsx_runtime.JSX.Element | null;
1270
1307
 
1271
1308
  interface ZoomState {
1272
1309
  refAreaLeft: number | null;