@iquji-web/web-component 0.1.10 → 0.1.11

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.
@@ -0,0 +1,53 @@
1
+ import { type ReactNode } from "react";
2
+ import { type IqujiTone } from "./feedback.js";
3
+ import { type IqujiLogEntry } from "./log-viewer.js";
4
+ import { type IqujiDialogProps } from "./overlays.js";
5
+ export type IqujiDiagnosticBannerProps = {
6
+ title: ReactNode;
7
+ description?: ReactNode | undefined;
8
+ errorCode?: string | undefined;
9
+ tone?: IqujiTone | undefined;
10
+ action?: ReactNode | undefined;
11
+ className?: string | undefined;
12
+ };
13
+ export declare function IqujiDiagnosticBanner({ action, className, description, errorCode, title, tone, }: IqujiDiagnosticBannerProps): import("react/jsx-runtime").JSX.Element;
14
+ export type IqujiDiagnosticPanelProps = {
15
+ /** 操作标识,如 "install_docker_swarm" */
16
+ action?: string | undefined;
17
+ /** 任务 ID,如 "task_fbf71b2ef4727e1e36d09a7db5ba9abd" */
18
+ taskId?: string | undefined;
19
+ /** 状态文本:"failed" | "running" | "succeeded" | "cancelled" 等 */
20
+ status?: string | undefined;
21
+ /** 失败标题,默认 "操作未完成" */
22
+ errorTitle?: ReactNode | undefined;
23
+ /** 失败原因/详细说明 */
24
+ errorMessage?: ReactNode | undefined;
25
+ /** 错误代码,如 "SWARM_WORKER_JOIN_FAILED" */
26
+ errorCode?: string | undefined;
27
+ /** 日志数据列表,支持字符串数组或结构化日志对象 */
28
+ logs?: ReadonlyArray<IqujiLogEntry | string> | undefined;
29
+ /** 日志是否加载中 */
30
+ logsLoading?: boolean | undefined;
31
+ /** 日志读取错误信息(若有) */
32
+ logsError?: ReactNode | undefined;
33
+ /** 刷新日志回调 */
34
+ onRefreshLogs?: (() => void) | undefined;
35
+ /** 最大高度,默认 360px */
36
+ maxHeight?: number | string | undefined;
37
+ className?: string | undefined;
38
+ };
39
+ export declare function IqujiDiagnosticPanel({ action, className, errorCode, errorMessage, errorTitle, logs, logsError, logsLoading, maxHeight, onRefreshLogs, status, taskId, }: IqujiDiagnosticPanelProps): import("react/jsx-runtime").JSX.Element;
40
+ export type IqujiDiagnosticDialogProps = Omit<IqujiDialogProps, "actions" | "children"> & {
41
+ action?: string | undefined;
42
+ taskId?: string | undefined;
43
+ status?: string | undefined;
44
+ errorTitle?: ReactNode | undefined;
45
+ errorMessage?: ReactNode | undefined;
46
+ errorCode?: string | undefined;
47
+ logs?: ReadonlyArray<IqujiLogEntry | string> | undefined;
48
+ logsLoading?: boolean | undefined;
49
+ logsError?: ReactNode | undefined;
50
+ onRefreshLogs?: (() => void) | undefined;
51
+ diagnosticText?: string | undefined;
52
+ };
53
+ export declare function IqujiDiagnosticDialog({ action, closeLabel, diagnosticText, errorCode, errorMessage, errorTitle, logs, logsError, logsLoading, onOpenChange, onRefreshLogs, open, size, status, taskId, title, ...dialogProps }: IqujiDiagnosticDialogProps): import("react/jsx-runtime").JSX.Element;
package/dist/index.d.ts CHANGED
@@ -138,3 +138,5 @@ export * from "./tooltip.js";
138
138
  export * from "./tour.js";
139
139
  export * from "./workbench.js";
140
140
  export * from "./emoji-picker.js";
141
+ export * from "./log-viewer.js";
142
+ export * from "./diagnostic.js";