@ant-design/agentic-ui 2.2.0 → 2.4.0

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,17 @@
1
+ import React from 'react';
2
+ /**
3
+ * HistoryEmpty 组件 - 历史记录空状态展示
4
+ *
5
+ * 当历史记录列表为空时显示的占位组件,提供友好的空状态提示
6
+ *
7
+ * @component
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * // 使用默认配置
12
+ * <HistoryEmpty />
13
+ * ```
14
+ *
15
+ * @returns {React.ReactElement} 渲染的空状态组件
16
+ */
17
+ export declare const HistoryEmpty: React.FC;
@@ -0,0 +1,50 @@
1
+ // src/History/components/HistoryEmpty.tsx
2
+ import React, { useContext } from "react";
3
+ import { I18nContext } from "../../I18n";
4
+ import { HistoryEmptyIcon } from "./HistoryEmptyIcon";
5
+ var HistoryEmpty = () => {
6
+ const { locale } = useContext(I18nContext);
7
+ const defaultTitle = (locale == null ? void 0 : locale["chat.history.empty.chat.title"]) || "找不到相关结果";
8
+ const defaultDescription = (locale == null ? void 0 : locale["chat.history.empty.chat.description"]) || "换个关键词试试吧";
9
+ return /* @__PURE__ */ React.createElement(
10
+ "div",
11
+ {
12
+ style: {
13
+ display: "flex",
14
+ flexDirection: "column",
15
+ alignItems: "center",
16
+ justifyContent: "center",
17
+ padding: "16px 24px",
18
+ textAlign: "center",
19
+ marginTop: 12
20
+ }
21
+ },
22
+ /* @__PURE__ */ React.createElement(HistoryEmptyIcon, null),
23
+ /* @__PURE__ */ React.createElement(
24
+ "div",
25
+ {
26
+ style: {
27
+ font: "var(--font-text-h5-base)",
28
+ color: "var(--color-gray-text-default)",
29
+ letterSpacing: "var(--letter-spacing-h5-base, normal)",
30
+ marginBottom: 2
31
+ }
32
+ },
33
+ defaultTitle
34
+ ),
35
+ /* @__PURE__ */ React.createElement(
36
+ "div",
37
+ {
38
+ style: {
39
+ font: "var(--font-text-body-base)",
40
+ letterSpacing: "var(--letter-spacing-body-base, normal)",
41
+ color: "var(--color-gray-text-light)"
42
+ }
43
+ },
44
+ defaultDescription
45
+ )
46
+ );
47
+ };
48
+ export {
49
+ HistoryEmpty
50
+ };
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ /**
3
+ * 空状态图标
4
+ */
5
+ export declare const HistoryEmptyIcon: React.FC<React.SVGProps<SVGSVGElement>>;