@sciol/xyzen 0.3.4 → 0.3.6
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/app/App.d.ts +1 -1
- package/dist/app/AppSide.d.ts +6 -0
- package/dist/components/animate-ui/components/buttons/button.d.ts +9 -0
- package/dist/components/animate-ui/primitives/animate/slot.d.ts +17 -0
- package/dist/components/animate-ui/primitives/buttons/button.d.ts +8 -0
- package/dist/components/animate-ui/primitives/buttons/liquid.d.ts +10 -0
- package/dist/components/animate-ui/primitives/effects/auto-height.d.ts +11 -0
- package/dist/components/animate-ui/primitives/effects/highlight.d.ts +92 -0
- package/dist/components/animate-ui/primitives/headless/dialog.d.ts +42 -0
- package/dist/components/{base/Modal.d.ts → animate-ui/primitives/headless/modal.d.ts} +1 -1
- package/dist/components/animate-ui/primitives/radix/tabs.d.ts +32 -0
- package/dist/components/charts/ChartDisplay.d.ts +16 -0
- package/dist/components/charts/ChartRenderer.d.ts +6 -0
- package/dist/components/charts/index.d.ts +5 -0
- package/dist/components/features/CenteredInput.d.ts +1 -0
- package/dist/components/features/index.d.ts +1 -0
- package/dist/components/layouts/ActivityBar.d.ts +8 -0
- package/dist/components/layouts/AgentExplorer.d.ts +1 -0
- package/dist/components/layouts/Explorer.d.ts +1 -0
- package/dist/components/layouts/McpListModal.d.ts +1 -0
- package/dist/components/layouts/Workshop.d.ts +1 -0
- package/dist/components/layouts/WorkshopChat.d.ts +1 -0
- package/dist/components/layouts/XyzenAgent.d.ts +17 -2
- package/dist/components/layouts/components/ChatInput.d.ts +1 -0
- package/dist/components/shared/JsonDisplay.d.ts +11 -0
- package/dist/configs/chatThemes.d.ts +9 -0
- package/dist/hooks/use-auto-height.d.ts +10 -0
- package/dist/hooks/use-controlled-state.d.ts +8 -0
- package/dist/hooks/useWorkShopChat.d.ts +69 -0
- package/dist/hooks/useXyzenChat.d.ts +69 -0
- package/dist/lib/get-strict-context.d.ts +9 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/main.d.ts +1 -0
- package/dist/store/slices/agentSlice.d.ts +17 -0
- package/dist/store/slices/uiSlice.d.ts +12 -0
- package/dist/store/types.d.ts +5 -1
- package/dist/types/chartTypes.d.ts +78 -0
- package/dist/utils/chartDetection.d.ts +13 -0
- package/dist/utils/chartThemes.d.ts +18 -0
- package/dist/xyzen.css +1 -1
- package/dist/xyzen.es.js +110214 -50925
- package/dist/xyzen.umd.js +192 -94
- package/package.json +16 -4
- package/dist/app/LlmProviders.d.ts +0 -1
- package/dist/app/Mcp.d.ts +0 -1
package/dist/store/types.d.ts
CHANGED
|
@@ -5,7 +5,11 @@ export interface ToolCall {
|
|
|
5
5
|
description?: string;
|
|
6
6
|
arguments: Record<string, unknown>;
|
|
7
7
|
status: "pending" | "waiting_confirmation" | "executing" | "completed" | "failed";
|
|
8
|
-
result?: string
|
|
8
|
+
result?: string | {
|
|
9
|
+
type: string;
|
|
10
|
+
content: unknown;
|
|
11
|
+
raw: string;
|
|
12
|
+
};
|
|
9
13
|
error?: string;
|
|
10
14
|
timestamp: string;
|
|
11
15
|
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { EChartsOption } from 'echarts';
|
|
2
|
+
export interface ChartDataPoint {
|
|
3
|
+
x: string | number;
|
|
4
|
+
y: number;
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
}
|
|
7
|
+
export interface SeriesData {
|
|
8
|
+
name: string;
|
|
9
|
+
data: number[] | ChartDataPoint[];
|
|
10
|
+
type?: "line" | "bar" | "pie" | "scatter" | "area";
|
|
11
|
+
}
|
|
12
|
+
export interface TimeSeriesPoint {
|
|
13
|
+
timestamp: string | Date;
|
|
14
|
+
value: number;
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
}
|
|
17
|
+
export interface ChartConfig {
|
|
18
|
+
type: "line" | "bar" | "pie" | "scatter" | "area" | "heatmap";
|
|
19
|
+
title?: string;
|
|
20
|
+
data: ChartDataPoint[] | SeriesData[] | TimeSeriesPoint[] | number[];
|
|
21
|
+
labels?: string[];
|
|
22
|
+
xAxis?: {
|
|
23
|
+
type?: "category" | "value" | "time";
|
|
24
|
+
name?: string;
|
|
25
|
+
};
|
|
26
|
+
yAxis?: {
|
|
27
|
+
type?: "category" | "value" | "log";
|
|
28
|
+
name?: string;
|
|
29
|
+
};
|
|
30
|
+
options?: Partial<EChartsOption>;
|
|
31
|
+
}
|
|
32
|
+
export interface ChartableOutput {
|
|
33
|
+
echarts?: EChartsOption;
|
|
34
|
+
chart?: ChartConfig;
|
|
35
|
+
data?: unknown[];
|
|
36
|
+
chart_type?: string;
|
|
37
|
+
visualization?: string;
|
|
38
|
+
title?: string;
|
|
39
|
+
description?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface ChartDetectionResult {
|
|
42
|
+
isChartable: boolean;
|
|
43
|
+
chartType: ChartConfig["type"] | null;
|
|
44
|
+
confidence: number;
|
|
45
|
+
data: ChartConfig | null;
|
|
46
|
+
reason?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface ChartTheme {
|
|
49
|
+
backgroundColor: string;
|
|
50
|
+
textColor: string;
|
|
51
|
+
axisColor: string;
|
|
52
|
+
gridColor: string;
|
|
53
|
+
colorPalette: string[];
|
|
54
|
+
}
|
|
55
|
+
export interface ChartRendererProps {
|
|
56
|
+
data: ChartConfig | EChartsOption;
|
|
57
|
+
theme?: "light" | "dark";
|
|
58
|
+
height?: string | number;
|
|
59
|
+
width?: string | number;
|
|
60
|
+
className?: string;
|
|
61
|
+
onChartReady?: (chart: unknown) => void;
|
|
62
|
+
}
|
|
63
|
+
export interface ChartDisplayProps {
|
|
64
|
+
data: unknown;
|
|
65
|
+
compact?: boolean;
|
|
66
|
+
variant?: "default" | "success" | "error";
|
|
67
|
+
className?: string;
|
|
68
|
+
fallbackToJson?: boolean;
|
|
69
|
+
}
|
|
70
|
+
export type ChartableData = ChartDataPoint[] | SeriesData[] | TimeSeriesPoint[] | number[] | {
|
|
71
|
+
[key: string]: number;
|
|
72
|
+
}[] | EChartsOption;
|
|
73
|
+
export type DetectionPattern = {
|
|
74
|
+
name: string;
|
|
75
|
+
test: (data: unknown) => boolean;
|
|
76
|
+
transform: (data: unknown) => ChartConfig | null;
|
|
77
|
+
confidence: number;
|
|
78
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ChartDetectionResult, ChartConfig } from '../types/chartTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Detects if data can be rendered as a chart and transforms it accordingly
|
|
4
|
+
*/
|
|
5
|
+
export declare function detectChart(data: unknown): ChartDetectionResult;
|
|
6
|
+
/**
|
|
7
|
+
* Validate that chart data is safe to render
|
|
8
|
+
*/
|
|
9
|
+
export declare function validateChartData(config: ChartConfig): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Get chart type suggestions based on data characteristics
|
|
12
|
+
*/
|
|
13
|
+
export declare function suggestChartType(data: unknown): ChartConfig["type"][];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ChartTheme } from '../types/chartTypes';
|
|
2
|
+
import { EChartsOption } from 'echarts';
|
|
3
|
+
/**
|
|
4
|
+
* Chart themes matching the application's design system
|
|
5
|
+
*/
|
|
6
|
+
export declare const chartThemes: Record<"light" | "dark", ChartTheme>;
|
|
7
|
+
/**
|
|
8
|
+
* Generate ECharts theme configuration
|
|
9
|
+
*/
|
|
10
|
+
export declare function createEChartsTheme(theme: "light" | "dark"): Partial<EChartsOption>;
|
|
11
|
+
/**
|
|
12
|
+
* Hook to detect system theme preference
|
|
13
|
+
*/
|
|
14
|
+
export declare function useSystemTheme(): "light" | "dark";
|
|
15
|
+
/**
|
|
16
|
+
* Detect theme from DOM classes (common pattern in Tailwind apps)
|
|
17
|
+
*/
|
|
18
|
+
export declare function detectThemeFromDOM(): "light" | "dark";
|