@ant-design/agentic-ui 2.0.21 → 2.0.22

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.
Files changed (29) hide show
  1. package/dist/Bubble/FileView.js +27 -31
  2. package/dist/Bubble/MessagesContent/VoiceButton/style.js +6 -3
  3. package/dist/ChatBootPage/ButtonTabStyle.js +2 -0
  4. package/dist/ChatBootPage/CaseReply.d.ts +0 -3
  5. package/dist/ChatBootPage/CaseReplyStyle.js +3 -4
  6. package/dist/Components/ActionIconBox/style.js +3 -1
  7. package/dist/Components/lotties/LoadingLottie/loading.json +1989 -1
  8. package/dist/Components/lotties/{ShinyText → TextLoading}/index.d.ts +9 -9
  9. package/dist/Components/lotties/{ShinyText → TextLoading}/index.js +7 -7
  10. package/dist/Components/lotties/{ShinyText → TextLoading}/style.js +4 -4
  11. package/dist/Components/lotties/index.d.ts +1 -1
  12. package/dist/Components/lotties/index.js +1 -1
  13. package/dist/History/components/HistoryItem.js +14 -6
  14. package/dist/History/types/HistoryData.d.ts +2 -0
  15. package/dist/MarkdownEditor/editor/components/ContributorAvatar/index.js +1 -1
  16. package/dist/MarkdownEditor/editor/elements/Table/TableRowIndex/index.js +3 -1
  17. package/dist/MarkdownEditor/editor/elements/TagPopup/index.js +6 -3
  18. package/dist/MarkdownEditor/editor/elements/TagPopup/style.js +5 -1
  19. package/dist/MarkdownInputField/AttachmentButton/style.js +1 -1
  20. package/dist/MarkdownInputField/BeforeToolContainer/BeforeToolContainer.js +2 -1
  21. package/dist/MarkdownInputField/MarkdownInputField.js +1 -1
  22. package/dist/MarkdownInputField/VoiceInput/style.js +1 -1
  23. package/dist/MarkdownInputField/style.js +2 -8
  24. package/dist/Plugins/chart/DonutChart/style.js +1 -0
  25. package/dist/Plugins/chart/LineChart/index.js +66 -55
  26. package/dist/Plugins/chart/LineChart/style.js +8 -0
  27. package/dist/Schema/SchemaRenderer/index.js +1 -1
  28. package/package.json +1 -1
  29. /package/dist/Components/lotties/{ShinyText → TextLoading}/style.d.ts +0 -0
@@ -4,9 +4,9 @@ import { FileMapView } from "../MarkdownInputField/FileMapView";
4
4
  var DEFAULT_DOWNLOAD_FILENAME = "download";
5
5
  var openFileInNewWindow = (file) => {
6
6
  const url = (file == null ? void 0 : file.previewUrl) || (file == null ? void 0 : file.url);
7
- if (url && typeof window !== "undefined") {
8
- window.open(url, "_blank");
9
- }
7
+ if (!url || typeof window === "undefined")
8
+ return;
9
+ window.open(url, "_blank");
10
10
  };
11
11
  var downloadFile = (file) => {
12
12
  const url = (file == null ? void 0 : file.url) || (file == null ? void 0 : file.previewUrl);
@@ -28,49 +28,45 @@ var defaultHandlers = {
28
28
  var renderMoreAction = (cfg, file) => {
29
29
  if (!cfg)
30
30
  return void 0;
31
- if (React.isValidElement(cfg) || typeof cfg !== "function") {
31
+ if (React.isValidElement(cfg))
32
+ return cfg;
33
+ if (typeof cfg !== "function")
32
34
  return cfg;
33
- }
34
35
  try {
35
- if (cfg.length === 0) {
36
- const result = cfg();
37
- return typeof result === "function" ? result(file) : result;
38
- }
39
- return cfg(file);
36
+ const result = cfg.length === 0 ? cfg() : cfg(file);
37
+ return typeof result === "function" ? result(file) : result;
40
38
  } catch (e) {
41
39
  return void 0;
42
40
  }
43
41
  };
44
- var createEventHandler = (handler) => {
45
- return handler ? (...args) => handler(...args) : void 0;
42
+ var createViewAllHandler = (handler) => {
43
+ if (!handler)
44
+ return void 0;
45
+ return (files) => {
46
+ handler(files);
47
+ return false;
48
+ };
46
49
  };
47
50
  var BubbleFileView = ({
48
51
  bubble,
49
52
  placement
50
53
  }) => {
51
- const { originData, fileViewEvents, fileViewConfig } = bubble;
52
- if (!(originData == null ? void 0 : originData.fileMap) || originData.fileMap.size === 0) {
54
+ const { originData, fileViewEvents, fileViewConfig = {} } = bubble;
55
+ if (!(originData == null ? void 0 : originData.fileMap) || originData.fileMap.size === 0)
53
56
  return null;
54
- }
55
- const allFiles = Array.from(originData.fileMap.values());
56
- const eventOverrides = (fileViewEvents == null ? void 0 : fileViewEvents(defaultHandlers)) || {};
57
- const config = fileViewConfig || {};
57
+ const events = (fileViewEvents == null ? void 0 : fileViewEvents(defaultHandlers)) || {};
58
58
  return /* @__PURE__ */ React.createElement(
59
59
  FileMapView,
60
60
  {
61
- className: config.className,
62
- style: config.style,
63
- maxDisplayCount: config.maxDisplayCount,
64
- showMoreButton: config.showMoreButton,
65
- onPreview: createEventHandler(eventOverrides.onPreview),
66
- onDownload: createEventHandler(eventOverrides.onDownload),
67
- onViewAll: eventOverrides.onViewAll ? (files) => {
68
- var _a;
69
- (_a = eventOverrides.onViewAll) == null ? void 0 : _a.call(eventOverrides, files);
70
- return false;
71
- } : void 0,
72
- renderMoreAction: config.renderFileMoreAction ? (file) => renderMoreAction(config.renderFileMoreAction, file) : void 0,
73
- customSlot: config.customSlot,
61
+ className: fileViewConfig.className,
62
+ style: fileViewConfig.style,
63
+ maxDisplayCount: fileViewConfig.maxDisplayCount,
64
+ showMoreButton: fileViewConfig.showMoreButton,
65
+ onPreview: events.onPreview,
66
+ onDownload: events.onDownload,
67
+ onViewAll: createViewAllHandler(events.onViewAll),
68
+ renderMoreAction: fileViewConfig.renderFileMoreAction ? (file) => renderMoreAction(fileViewConfig.renderFileMoreAction, file) : void 0,
69
+ customSlot: fileViewConfig.customSlot,
74
70
  placement,
75
71
  fileMap: originData.fileMap,
76
72
  "data-testid": "file-item"
@@ -43,7 +43,10 @@ var genStyle = (token) => {
43
43
  boxSizing: "border-box"
44
44
  },
45
45
  "&-playBox:hover": {
46
- background: "rgba(0, 28, 57, 0.0353)"
46
+ background: "var(--color-gray-control-fill-hover)",
47
+ borderRadius: "var(--radius-control-base)",
48
+ backdropFilter: "blur(20px)",
49
+ boxSizing: "border-box"
47
50
  },
48
51
  "&-playingWrap": {
49
52
  display: "flex",
@@ -68,7 +71,7 @@ var genStyle = (token) => {
68
71
  cursor: "pointer"
69
72
  },
70
73
  "&-playingBox:hover": {
71
- background: "rgba(0, 28, 57, 0.0353)"
74
+ background: "var(--color-gray-control-fill-hover)"
72
75
  },
73
76
  "&-rateBox": {
74
77
  display: "flex",
@@ -83,7 +86,7 @@ var genStyle = (token) => {
83
86
  borderRadius: 6
84
87
  },
85
88
  "&-rateBox:hover": {
86
- background: "rgba(0, 28, 57, 0.0353)"
89
+ background: "var(--color-gray-control-fill-hover)"
87
90
  },
88
91
  "&-rateItem": {
89
92
  display: "flex",
@@ -43,6 +43,8 @@ var genStyle = (token) => {
43
43
  color: "var(--color-gray-text-secondary)",
44
44
  outline: "none",
45
45
  userSelect: "none",
46
+ whiteSpace: "nowrap",
47
+ flexShrink: 0,
46
48
  "&:hover": {
47
49
  // borderColor: 'rgba(0, 0, 0, 0.3)',
48
50
  // color: 'rgba(0, 0, 0, 0.85)',
@@ -24,9 +24,6 @@ export interface CaseReplyProps {
24
24
  * 按钮文本(悬停时显示的按钮文字)
25
25
  */
26
26
  buttonText?: string;
27
- /**
28
- * 自定义按钮栏内容(优先于 buttonText)
29
- */
30
27
  buttonBar?: React.ReactNode;
31
28
  /**
32
29
  * 按钮点击事件
@@ -48,14 +48,13 @@ var genStyle = (token) => {
48
48
  width: "100%",
49
49
  height: 166,
50
50
  display: "flex",
51
- alignItems: "center",
52
51
  justifyContent: "center"
53
52
  },
54
53
  // coverContent 白色子卡片
55
54
  "&-cover-content": {
56
55
  width: "80%",
57
56
  marginTop: "32px",
58
- height: 124,
57
+ height: 144,
59
58
  borderRadius: "var(--radius-modal-base)",
60
59
  boxShadow: "0px 0px 1px 0px rgba(71, 98, 234, 0.05), 0px 6px 16px 0px rgba(71, 98, 234, 0.12)",
61
60
  background: "#ffffff",
@@ -100,7 +99,7 @@ var genStyle = (token) => {
100
99
  "&-title": {
101
100
  fontSize: "16px",
102
101
  fontWeight: 600,
103
- lineHeight: "24px",
102
+ lineHeight: "26px",
104
103
  color: "var(--color-gray-text-default)",
105
104
  marginTop: 0,
106
105
  marginBottom: "4px"
@@ -109,7 +108,7 @@ var genStyle = (token) => {
109
108
  "&-description": {
110
109
  fontSize: "13px",
111
110
  fontWeight: 400,
112
- lineHeight: "20px",
111
+ lineHeight: "22px",
113
112
  color: "var(--color-gray-text-secondary)",
114
113
  overflow: "hidden",
115
114
  textOverflow: "ellipsis",
@@ -46,7 +46,9 @@ var genStyle = (token) => {
46
46
  },
47
47
  "&-light": {
48
48
  "&:hover": {
49
- background: "var(--color-gray-control-fill-active)",
49
+ borderRadius: "var(--radius-control-base)",
50
+ background: "var(--color-gray-control-fill-hover)",
51
+ backdropFilter: "blur(20px)",
50
52
  boxSizing: "border-box"
51
53
  }
52
54
  },