@ant-design/agentic-ui 2.29.24 → 2.29.25

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 (162) hide show
  1. package/dist/AILabel/index.js +1 -1
  2. package/dist/AgentRunBar/Robot.js +1 -1
  3. package/dist/AgentRunBar/index.js +1 -1
  4. package/dist/AgenticLayout/index.js +1 -1
  5. package/dist/AnswerAlert/index.js +1 -1
  6. package/dist/BackTo/ScrollVisibleButton.js +1 -1
  7. package/dist/Bubble/AIBubble.js +1 -1
  8. package/dist/Bubble/Avatar/index.js +1 -1
  9. package/dist/Bubble/List/PureBubbleList.d.ts +4 -4
  10. package/dist/Bubble/List/PureBubbleList.js +1 -1
  11. package/dist/Bubble/List/index.d.ts +5 -5
  12. package/dist/Bubble/List/index.js +1 -1
  13. package/dist/Bubble/MessagesContent/BubbleExtra.js +1 -1
  14. package/dist/Bubble/MessagesContent/CopyButton/index.js +1 -1
  15. package/dist/Bubble/MessagesContent/DocInfo.js +1 -1
  16. package/dist/Bubble/MessagesContent/VoiceButton/index.js +1 -1
  17. package/dist/Bubble/MessagesContent/index.js +1 -1
  18. package/dist/Bubble/PureBubble.js +1 -1
  19. package/dist/Bubble/Title.js +1 -1
  20. package/dist/Bubble/UserBubble.js +1 -1
  21. package/dist/Bubble/type.d.ts +96 -8
  22. package/dist/Bubble/types/BubbleExtra.d.ts +6 -4
  23. package/dist/ChatBootPage/ButtonTab.js +1 -1
  24. package/dist/ChatBootPage/CaseReply.js +1 -1
  25. package/dist/ChatBootPage/Title.js +1 -1
  26. package/dist/ChatLayout/index.js +1 -1
  27. package/dist/Components/ActionIconBox/index.d.ts +1 -1
  28. package/dist/Components/ActionIconBox/index.js +2 -2
  29. package/dist/Components/ActionItemBox/ActionItemBox.js +1 -1
  30. package/dist/Components/Button/IconButton/index.d.ts +1 -1
  31. package/dist/Components/Button/IconButton/index.js +1 -1
  32. package/dist/Components/Button/SwitchButton/index.js +1 -1
  33. package/dist/Components/Button/ToggleButton/index.js +1 -1
  34. package/dist/Components/GradientText/index.js +1 -1
  35. package/dist/Components/LayoutHeader/index.js +1 -1
  36. package/dist/Components/Loading/Loading.js +2 -2
  37. package/dist/Components/Robot/index.js +1 -1
  38. package/dist/Components/SuggestionList/index.js +1 -1
  39. package/dist/Components/TextAnimate/index.js +2 -2
  40. package/dist/Components/TypingAnimation/index.js +2 -2
  41. package/dist/Components/VisualList/index.d.ts +1 -1
  42. package/dist/Components/VisualList/index.js +1 -1
  43. package/dist/Components/lotties/TextLoading/index.js +1 -1
  44. package/dist/Components/lotties/bubble-actions/Abstract/index.js +1 -1
  45. package/dist/History/components/NewChatComponent.d.ts +1 -1
  46. package/dist/History/components/NewChatComponent.js +1 -1
  47. package/dist/History/components/SearchComponent.d.ts +1 -1
  48. package/dist/History/components/SearchComponent.js +1 -1
  49. package/dist/History/index.js +1 -1
  50. package/dist/History/menu.js +1 -1
  51. package/dist/History/types/index.d.ts +5 -5
  52. package/dist/History/types/index.js +1 -1
  53. package/dist/Hooks/useLanguage.d.ts +16 -0
  54. package/dist/I18n/locales.d.ts +16 -0
  55. package/dist/I18n/locales.js +43 -5
  56. package/dist/MarkdownEditor/BaseMarkdownEditor.js +1 -1
  57. package/dist/MarkdownEditor/editor/Editor.js +1 -1
  58. package/dist/MarkdownEditor/editor/components/CommentList/index.js +6 -4
  59. package/dist/MarkdownEditor/editor/components/ContributorAvatar/index.js +1 -1
  60. package/dist/MarkdownEditor/editor/components/fntTag/index.js +1 -1
  61. package/dist/MarkdownEditor/editor/elements/Comment/index.js +1 -1
  62. package/dist/MarkdownEditor/editor/elements/FncLeaf/index.js +1 -1
  63. package/dist/MarkdownEditor/editor/elements/Head/ReadonlyHead.js +1 -1
  64. package/dist/MarkdownEditor/editor/elements/Head/index.js +1 -1
  65. package/dist/MarkdownEditor/editor/elements/LinkCard/ReadonlyLinkCard.js +1 -1
  66. package/dist/MarkdownEditor/editor/elements/LinkCard/index.js +1 -1
  67. package/dist/MarkdownEditor/editor/elements/List/List.js +1 -1
  68. package/dist/MarkdownEditor/editor/elements/List/ListItem.js +1 -1
  69. package/dist/MarkdownEditor/editor/elements/List/ReadonlyList.js +1 -1
  70. package/dist/MarkdownEditor/editor/elements/List/ReadonlyListItem.js +1 -1
  71. package/dist/MarkdownEditor/editor/elements/Mermaid/ReadonlyMermaid.js +1 -1
  72. package/dist/MarkdownEditor/editor/elements/Mermaid/index.js +1 -1
  73. package/dist/MarkdownEditor/editor/elements/Paragraph/ReadonlyParagraph.js +1 -1
  74. package/dist/MarkdownEditor/editor/elements/Paragraph/index.js +1 -1
  75. package/dist/MarkdownEditor/editor/elements/Table/ReadonlyTableComponent.js +1 -1
  76. package/dist/MarkdownEditor/editor/elements/Table/SimpleTable.js +1 -1
  77. package/dist/MarkdownEditor/editor/elements/Table/Table.js +1 -1
  78. package/dist/MarkdownEditor/editor/elements/Table/TableCellIndex/index.js +7 -5
  79. package/dist/MarkdownEditor/editor/elements/Table/TableCellIndexSpacer/index.js +7 -5
  80. package/dist/MarkdownEditor/editor/elements/Table/TableRowIndex/index.js +1 -1
  81. package/dist/MarkdownEditor/editor/elements/Table/Td/index.js +1 -1
  82. package/dist/MarkdownEditor/editor/elements/TagPopup/index.js +1 -1
  83. package/dist/MarkdownEditor/editor/elements/index.js +1 -1
  84. package/dist/MarkdownEditor/editor/parser/parse/parseTable.js +1 -1
  85. package/dist/MarkdownEditor/editor/tools/DragHandle.js +4 -2
  86. package/dist/MarkdownEditor/editor/tools/InsertAutocomplete.js +1 -1
  87. package/dist/MarkdownEditor/editor/tools/ToolBar/BaseBar.js +3 -2
  88. package/dist/MarkdownEditor/editor/tools/ToolBar/FloatBar.js +1 -1
  89. package/dist/MarkdownEditor/editor/tools/ToolBar/ReadonlyBaseBar.js +1 -1
  90. package/dist/MarkdownEditor/editor/tools/ToolBar/ToolBar.js +1 -1
  91. package/dist/MarkdownEditor/editor/tools/ToolBar/components/ClearFormatButton.js +1 -1
  92. package/dist/MarkdownEditor/editor/tools/ToolBar/components/ColorPickerButton.js +1 -1
  93. package/dist/MarkdownEditor/editor/tools/ToolBar/components/FormatButton.js +1 -1
  94. package/dist/MarkdownEditor/editor/tools/ToolBar/components/FormattingTools.js +1 -1
  95. package/dist/MarkdownEditor/editor/tools/ToolBar/components/HeadingDropdown.js +1 -1
  96. package/dist/MarkdownEditor/editor/tools/ToolBar/components/LinkButton.js +1 -1
  97. package/dist/MarkdownEditor/editor/tools/ToolBar/components/UndoRedoButtons.js +1 -1
  98. package/dist/MarkdownEditor/el.d.ts +1 -1
  99. package/dist/MarkdownEditor/types.d.ts +103 -3
  100. package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileListItem.js +10 -7
  101. package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/index.js +1 -1
  102. package/dist/MarkdownInputField/AttachmentButton/index.js +1 -1
  103. package/dist/MarkdownInputField/BeforeToolContainer/BeforeToolContainer.js +1 -1
  104. package/dist/MarkdownInputField/FileMapView/FileMapViewItem.js +2 -2
  105. package/dist/MarkdownInputField/FileMapView/index.js +1 -1
  106. package/dist/MarkdownInputField/MarkdownInputField.js +1 -1
  107. package/dist/MarkdownInputField/QuickActions/index.js +1 -1
  108. package/dist/MarkdownInputField/SendActions/index.js +1 -1
  109. package/dist/MarkdownInputField/SendButton/index.js +1 -1
  110. package/dist/MarkdownInputField/SkillModeBar/index.js +1 -1
  111. package/dist/MarkdownInputField/TopOperatingArea/index.js +1 -1
  112. package/dist/MarkdownInputField/VoiceInput/index.js +1 -1
  113. package/dist/Plugins/chart/AreaChart/index.js +1 -1
  114. package/dist/Plugins/chart/BarChart/index.js +1 -1
  115. package/dist/Plugins/chart/DonutChart/index.js +1 -1
  116. package/dist/Plugins/chart/FunnelChart/index.js +1 -1
  117. package/dist/Plugins/chart/LineChart/index.js +1 -1
  118. package/dist/Plugins/chart/RadarChart/index.js +1 -1
  119. package/dist/Plugins/chart/ScatterChart/index.js +1 -1
  120. package/dist/Plugins/chart/components/ChartContainer/ChartContainer.js +1 -1
  121. package/dist/Plugins/chart/components/ChartContainer/ChartErrorBoundary.d.ts +736 -0
  122. package/dist/Plugins/chart/components/ChartContainer/ChartErrorBoundary.js +23 -5
  123. package/dist/Plugins/code/CodeUI/Katex/Katex.js +1 -1
  124. package/dist/Plugins/code/components/CodeContainer.js +1 -1
  125. package/dist/Plugins/katex/InlineKatex.js +1 -1
  126. package/dist/Plugins/katex/Katex.js +1 -1
  127. package/dist/Plugins/mermaid/MermaidFallback.js +1 -1
  128. package/dist/Plugins/mermaid/MermaidRendererImpl.js +1 -1
  129. package/dist/Plugins/mermaid/index.js +3 -2
  130. package/dist/Quote/index.js +1 -1
  131. package/dist/Schema/SchemaEditor/index.js +1 -1
  132. package/dist/TaskList/index.d.ts +6 -2
  133. package/dist/TaskList/index.js +1 -1
  134. package/dist/ThoughtChainList/DeepThink.d.ts +1 -1
  135. package/dist/ThoughtChainList/DotAni/index.js +1 -1
  136. package/dist/ThoughtChainList/FlipText/index.js +1 -1
  137. package/dist/ThoughtChainList/TableSql.d.ts +1 -1
  138. package/dist/ThoughtChainList/ThoughtChainListItem.js +1 -1
  139. package/dist/ThoughtChainList/TitleInfo.js +1 -1
  140. package/dist/ThoughtChainList/ToolCall.d.ts +1 -1
  141. package/dist/ThoughtChainList/WebSearch.d.ts +1 -1
  142. package/dist/ThoughtChainList/index.js +7 -18
  143. package/dist/ThoughtChainList/style.js +11 -0
  144. package/dist/ThoughtChainList/types.d.ts +11 -1
  145. package/dist/ToolUseBar/BarItem/Content.js +1 -1
  146. package/dist/ToolUseBar/BarItem/index.js +1 -1
  147. package/dist/ToolUseBar/index.js +1 -1
  148. package/dist/ToolUseBarThink/index.js +1 -1
  149. package/dist/Types/message.d.ts +12 -3
  150. package/dist/WelcomeMessage/index.js +1 -1
  151. package/dist/Workspace/Browser/index.js +1 -1
  152. package/dist/Workspace/File/FileComponent.d.ts +1 -1
  153. package/dist/Workspace/File/FileComponent.js +1 -1
  154. package/dist/Workspace/File/PreviewComponent.js +2 -2
  155. package/dist/Workspace/HtmlPreview/index.js +1 -1
  156. package/dist/Workspace/RealtimeFollow/index.js +1 -1
  157. package/dist/Workspace/Task/index.js +1 -1
  158. package/dist/Workspace/index.js +1 -1
  159. package/dist/Workspace/types.d.ts +2 -2
  160. package/dist/index.d.ts +68 -62
  161. package/dist/index.js +84 -79
  162. package/package.json +2 -6
@@ -133,7 +133,7 @@ function _unsupported_iterable_to_array(o, minLen) {
133
133
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
134
134
  }
135
135
  import { ConfigProvider, Tooltip } from "antd";
136
- import classNames from "classnames";
136
+ import classNames from "clsx";
137
137
  import React, { memo, useContext, useMemo, useState } from "react";
138
138
  import { AIGraphic } from "./AIGraphic";
139
139
  import { AIGraphicDisabled } from "./AIGraphicDisabled";
@@ -26,7 +26,7 @@ function _object_spread(target) {
26
26
  }
27
27
  return target;
28
28
  }
29
- import classNames from "classnames";
29
+ import classNames from "clsx";
30
30
  import { isString } from "lodash-es";
31
31
  import React from "react";
32
32
  import RobotIcon from "../Components/Robot";
@@ -13,7 +13,7 @@ function _define_property(obj, key, value) {
13
13
  }
14
14
  import { PlusOutlined } from "@ant-design/icons";
15
15
  import { Button, ConfigProvider, Tooltip, Typography } from "antd";
16
- import classNames from "classnames";
16
+ import classNames from "clsx";
17
17
  import { motion } from "framer-motion";
18
18
  import React, { memo, useContext, useMemo } from "react";
19
19
  import { I18nContext } from "../I18n";
@@ -97,7 +97,7 @@ function _unsupported_iterable_to_array(o, minLen) {
97
97
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
98
98
  }
99
99
  import { ConfigProvider } from "antd";
100
- import classNames from "classnames";
100
+ import classNames from "clsx";
101
101
  import React, { memo, useCallback, useContext, useEffect, useRef, useState } from "react";
102
102
  import { LayoutHeader } from "../Components/LayoutHeader";
103
103
  import { useAgenticLayoutStyle } from "./style";
@@ -58,7 +58,7 @@ function _unsupported_iterable_to_array(o, minLen) {
58
58
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
59
59
  }
60
60
  import { ConfigProvider } from "antd";
61
- import classNames from "classnames";
61
+ import classNames from "clsx";
62
62
  import React, { isValidElement, memo, useCallback, useContext, useState } from "react";
63
63
  import { CloseIcon } from "./components/CloseIcon";
64
64
  import { ErrorIcon } from "./components/ErrorIcon";
@@ -115,7 +115,7 @@ function _unsupported_iterable_to_array(o, minLen) {
115
115
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
116
116
  }
117
117
  import { ConfigProvider, Tooltip } from "antd";
118
- import classNames from "classnames";
118
+ import classNames from "clsx";
119
119
  import { AnimatePresence, motion } from "framer-motion";
120
120
  import { isObject } from "lodash-es";
121
121
  import React, { forwardRef, isValidElement, useContext, useImperativeHandle } from "react";
@@ -214,7 +214,7 @@ function _ts_generator(thisArg, body) {
214
214
  }
215
215
  import { memo, useContext } from "react";
216
216
  import { ConfigProvider, Flex } from "antd";
217
- import cx from "classnames";
217
+ import cx from "clsx";
218
218
  import React from "react";
219
219
  import { BubbleAvatar } from "./Avatar";
220
220
  import { BubbleBeforeNode } from "./BubbleBeforeNode";
@@ -87,7 +87,7 @@ function _object_without_properties_loose(source, excluded) {
87
87
  return target;
88
88
  }
89
89
  import { Avatar, theme } from "antd";
90
- import cx from "classnames";
90
+ import cx from "clsx";
91
91
  import React from "react";
92
92
  import { isEmoji } from "./isEmoji";
93
93
  /**
@@ -1,11 +1,11 @@
1
1
  import { MutableRefObject } from 'react';
2
- import type { BubbleMetaData, BubbleProps, MessageBubbleData } from '../type';
2
+ import type { BubbleImperativeHandle, BubbleMetaData, BubbleProps, MessageBubbleData } from '../type';
3
3
  import React from 'react';
4
4
  export interface PureBubbleListProps {
5
5
  bubbleList: MessageBubbleData[];
6
6
  readonly?: boolean;
7
7
  bubbleListRef?: MutableRefObject<HTMLDivElement | null>;
8
- bubbleRef?: MutableRefObject<any | undefined>;
8
+ bubbleRef?: MutableRefObject<BubbleImperativeHandle | null | undefined>;
9
9
  isLoading?: boolean;
10
10
  className?: string;
11
11
  bubbleRenderConfig?: BubbleProps['bubbleRenderConfig'];
@@ -17,14 +17,14 @@ export interface PureBubbleListProps {
17
17
  markdownRenderConfig?: BubbleProps['markdownRenderConfig'];
18
18
  docListProps?: BubbleProps['docListProps'];
19
19
  /**
20
- * @deprecated 请使用 onDislike 替代(符合命名规范)
20
+ * @deprecated @since 2.29.0 请使用 onDislike 替代(符合命名规范)
21
21
  */
22
22
  onDisLike?: BubbleProps['onDisLike'];
23
23
  /** 不喜欢回调 */
24
24
  onDislike?: BubbleProps['onDislike'];
25
25
  onLike?: BubbleProps['onLike'];
26
26
  /**
27
- * @deprecated 请使用 onLikeCancel 替代(符合命名规范)
27
+ * @deprecated @since 2.29.0 请使用 onLikeCancel 替代(符合命名规范)
28
28
  */
29
29
  onCancelLike?: BubbleProps['onCancelLike'];
30
30
  /** Like 子组件取消事件 */
@@ -53,7 +53,7 @@ function _object_spread_props(target, source) {
53
53
  import SkeletonList from "./SkeletonList";
54
54
  import { useContext, useMemo, useRef } from "react";
55
55
  import { ConfigProvider } from "antd";
56
- import cx from "classnames";
56
+ import cx from "clsx";
57
57
  import { nanoid } from "nanoid";
58
58
  import React from "react";
59
59
  import { LazyElement } from "../../MarkdownEditor/editor/components/LazyElement";
@@ -1,6 +1,6 @@
1
1
  export { PureBubbleList } from './PureBubbleList';
2
2
  import { MutableRefObject } from 'react';
3
- import type { BubbleMetaData, BubbleProps, MessageBubbleData } from '../type';
3
+ import type { BubbleImperativeHandle, BubbleMetaData, BubbleProps, MessageBubbleData } from '../type';
4
4
  import React from 'react';
5
5
  export type BubbleListProps = {
6
6
  /**
@@ -12,9 +12,9 @@ export type BubbleListProps = {
12
12
  * 聊天列表的引用
13
13
  */
14
14
  bubbleListRef?: MutableRefObject<HTMLDivElement | null>;
15
- bubbleRef?: MutableRefObject<any | undefined>;
15
+ bubbleRef?: MutableRefObject<BubbleImperativeHandle | null | undefined>;
16
16
  /**
17
- * @deprecated 请使用 isLoading 代替
17
+ * @deprecated @since 2.29.0 请使用 isLoading 代替
18
18
  * @description 已废弃,将在未来版本移除
19
19
  */
20
20
  loading?: boolean;
@@ -148,14 +148,14 @@ export type BubbleListProps = {
148
148
  bubbleListItemAvatarClassName?: string;
149
149
  };
150
150
  /**
151
- * @deprecated 请使用 onDislike 替代(符合命名规范)
151
+ * @deprecated @since 2.29.0 请使用 onDislike 替代(符合命名规范)
152
152
  */
153
153
  onDisLike?: BubbleProps['onDisLike'];
154
154
  /** 不喜欢回调 */
155
155
  onDislike?: BubbleProps['onDislike'];
156
156
  onLike?: BubbleProps['onLike'];
157
157
  /**
158
- * @deprecated 请使用 onLikeCancel 替代(符合命名规范)
158
+ * @deprecated @since 2.29.0 请使用 onLikeCancel 替代(符合命名规范)
159
159
  */
160
160
  onCancelLike?: BubbleProps['onCancelLike'];
161
161
  /** Like 子组件取消事件 */
@@ -54,7 +54,7 @@ import SkeletonList from "./SkeletonList";
54
54
  export { PureBubbleList } from "./PureBubbleList";
55
55
  import { useContext, useMemo, useRef } from "react";
56
56
  import { ConfigProvider } from "antd";
57
- import cx from "classnames";
57
+ import cx from "clsx";
58
58
  import { nanoid } from "nanoid";
59
59
  import React from "react";
60
60
  import { LazyElement } from "../../MarkdownEditor/editor/components/LazyElement";
@@ -263,7 +263,7 @@ function _ts_generator(thisArg, body) {
263
263
  import { CopyLottie, DislikeLottie, LikeLottie, RefreshLottie } from "../..";
264
264
  import { DislikeFilled, LikeFilled } from "@ant-design/icons";
265
265
  import { ConfigProvider, Divider } from "antd";
266
- import classNames from "classnames";
266
+ import classNames from "clsx";
267
267
  import copy from "copy-to-clipboard";
268
268
  import { motion } from "framer-motion";
269
269
  import React, { useContext, useEffect, useMemo, useState } from "react";
@@ -216,7 +216,7 @@ function _ts_generator(thisArg, body) {
216
216
  }
217
217
  import { memo, useContext } from "react";
218
218
  import { CheckCircleFilled } from "@ant-design/icons";
219
- import { isFunction } from "lodash";
219
+ import { isFunction } from "lodash-es";
220
220
  import React from "react";
221
221
  import { ActionIconBox } from "../../../Components/ActionIconBox";
222
222
  import { useCopied } from "../../../Hooks/useCopied";
@@ -95,7 +95,7 @@ function _unsupported_iterable_to_array(o, minLen) {
95
95
  }
96
96
  import { ExportOutlined, RightOutlined } from "@ant-design/icons";
97
97
  import { ConfigProvider, Descriptions, Drawer, Popover } from "antd";
98
- import classNames from "classnames";
98
+ import classNames from "clsx";
99
99
  import dayjs from "dayjs";
100
100
  import { motion } from "framer-motion";
101
101
  import React, { useContext } from "react";
@@ -59,7 +59,7 @@ function _unsupported_iterable_to_array(o, minLen) {
59
59
  import { PlayLottie } from "../../..";
60
60
  import { ChevronDown, Pause } from "@sofa-design/icons";
61
61
  import { ConfigProvider, Dropdown, Flex, Tooltip } from "antd";
62
- import classNames from "classnames";
62
+ import classNames from "clsx";
63
63
  import React, { useMemo, useState } from "react";
64
64
  import { useSpeechSynthesis } from "../../../Hooks/useSpeechSynthesis";
65
65
  import VoicingLottie from "../../../Icons/animated/VoicingLottie";
@@ -262,7 +262,7 @@ function _ts_generator(thisArg, body) {
262
262
  }
263
263
  import { ExportOutlined } from "@ant-design/icons";
264
264
  import { ConfigProvider, Popover, Tooltip, Typography } from "antd";
265
- import classNames from "classnames";
265
+ import classNames from "clsx";
266
266
  import React, { useContext, useMemo } from "react";
267
267
  import { ActionIconBox } from "../../Components/ActionIconBox";
268
268
  import { I18nContext } from "../../I18n";
@@ -262,7 +262,7 @@ function _ts_generator(thisArg, body) {
262
262
  }
263
263
  import { memo, useContext } from "react";
264
264
  import { ConfigProvider, Flex } from "antd";
265
- import cx from "classnames";
265
+ import cx from "clsx";
266
266
  import React from "react";
267
267
  import { BaseMarkdownEditor } from "../MarkdownEditor/BaseMarkdownEditor";
268
268
  import { runRender } from "./AIBubble";
@@ -51,7 +51,7 @@ function _object_spread_props(target, source) {
51
51
  return target;
52
52
  }
53
53
  import { Flex } from "antd";
54
- import cx from "classnames";
54
+ import cx from "clsx";
55
55
  import React from "react";
56
56
  import { resetComponent, useEditorStyleRegister } from "../Hooks/useStyle";
57
57
  import { formatTime } from "../Utils/formatTime";
@@ -74,7 +74,7 @@ function _unsupported_iterable_to_array(o, minLen) {
74
74
  }
75
75
  import { memo, useContext } from "react";
76
76
  import { ConfigProvider, Flex } from "antd";
77
- import cx from "classnames";
77
+ import cx from "clsx";
78
78
  import React from "react";
79
79
  import { Quote } from "../Quote";
80
80
  import { BubbleConfigContext } from "./BubbleConfigProvide";
@@ -6,17 +6,81 @@ import { BaseStyleProps, BubbleMetaData, MessageBubbleData, MultiClassNameProps,
6
6
  import type { UseSpeechAdapter } from './MessagesContent/VoiceButton';
7
7
  import { BubbleExtraProps } from './types/BubbleExtra';
8
8
  import { DocInfoListProps } from './types/DocInfo';
9
+ /**
10
+ * 气泡命令式操作句柄
11
+ * @description 通过 bubbleRef 暴露给父组件的命令式方法
12
+ */
13
+ export interface BubbleImperativeHandle {
14
+ /** 更新消息项数据 */
15
+ setMessageItem?: (id: string, data: Partial<MessageBubbleData>) => void;
16
+ }
9
17
  /**
10
18
  * 基础样式属性
11
- * @deprecated 请使用 BaseStyleProps from '../Types'
19
+ * @deprecated @since 2.29.0 请使用 BaseStyleProps from '../Types'
12
20
  */
13
21
  export type BubbleStyleProps = BaseStyleProps;
22
+ /**
23
+ * 气泡样式配置(简洁版)
24
+ * @description 推荐使用的气泡样式配置接口,属性名不带 bubble 前缀
25
+ */
26
+ export interface BubbleSlotStyles {
27
+ /** 气泡根容器 */
28
+ root?: React.CSSProperties;
29
+ /** 头像标题区域 */
30
+ avatarTitle?: React.CSSProperties;
31
+ /** 主容器 */
32
+ container?: React.CSSProperties;
33
+ /** 加载图标 */
34
+ loadingIcon?: React.CSSProperties;
35
+ /** 名称区域 */
36
+ name?: React.CSSProperties;
37
+ /** 内容 */
38
+ content?: React.CSSProperties;
39
+ /** 内容前置区域 */
40
+ before?: React.CSSProperties;
41
+ /** 内容后置区域 */
42
+ after?: React.CSSProperties;
43
+ /** 标题 */
44
+ title?: React.CSSProperties;
45
+ /** 头像 */
46
+ avatar?: React.CSSProperties;
47
+ /** 额外内容 */
48
+ extra?: React.CSSProperties;
49
+ }
50
+ /**
51
+ * 气泡类名配置(简洁版)
52
+ * @description 推荐使用的气泡类名配置接口,属性名不带 bubble 前缀
53
+ */
54
+ export interface BubbleSlotClassNames {
55
+ /** 气泡根容器 */
56
+ root?: string;
57
+ /** 头像标题区域 */
58
+ avatarTitle?: string;
59
+ /** 主容器 */
60
+ container?: string;
61
+ /** 加载图标 */
62
+ loadingIcon?: string;
63
+ /** 名称区域 */
64
+ name?: string;
65
+ /** 内容 */
66
+ content?: string;
67
+ /** 内容前置区域 */
68
+ before?: string;
69
+ /** 内容后置区域 */
70
+ after?: string;
71
+ /** 标题 */
72
+ title?: string;
73
+ /** 头像 */
74
+ avatar?: string;
75
+ /** 额外内容 */
76
+ extra?: string;
77
+ }
14
78
  /**
15
79
  * 气泡样式配置
16
80
  * @description 气泡组件各部分的样式配置
81
+ * @deprecated @since 2.30.0 属性名带有冗余的 bubble 前缀,建议使用 BubbleSlotStyles 替代
17
82
  */
18
83
  export interface BubbleStyles {
19
- [key: string]: React.CSSProperties | undefined;
20
84
  /**
21
85
  * 气泡根容器的自定义样式
22
86
  */
@@ -61,13 +125,25 @@ export interface BubbleStyles {
61
125
  * 额外内容的自定义样式
62
126
  */
63
127
  bubbleListItemExtraStyle?: React.CSSProperties;
128
+ /**
129
+ * 气泡列表项的自定义样式
130
+ */
131
+ bubbleListItemStyle?: React.CSSProperties;
132
+ /**
133
+ * 左侧气泡内容的自定义样式
134
+ */
135
+ bubbleListLeftItemContentStyle?: React.CSSProperties;
136
+ /**
137
+ * 右侧气泡内容的自定义样式
138
+ */
139
+ bubbleListRightItemContentStyle?: React.CSSProperties;
64
140
  }
65
141
  /**
66
142
  * 气泡类名配置
67
143
  * @description 气泡组件各部分的类名配置
144
+ * @deprecated @since 2.30.0 属性名带有冗余的 bubble 前缀,建议使用 BubbleSlotClassNames 替代
68
145
  */
69
146
  export interface BubbleClassNames {
70
- [key: string]: string | undefined;
71
147
  /**
72
148
  * 气泡根容器的自定义类名
73
149
  */
@@ -112,6 +188,10 @@ export interface BubbleClassNames {
112
188
  * 额外内容的自定义类名
113
189
  */
114
190
  bubbleListItemExtraClassName?: string;
191
+ /**
192
+ * 气泡列表项的自定义类名
193
+ */
194
+ bubbleListItemClassName?: string;
115
195
  }
116
196
  /**
117
197
  * 气泡项样式属性
@@ -208,7 +288,7 @@ export interface BubbleProps<T = Record<string, any>> extends BubbleItemStylePro
208
288
  /**
209
289
  * 列表引用
210
290
  */
211
- bubbleListRef?: any;
291
+ bubbleListRef?: React.RefObject<HTMLDivElement>;
212
292
  /**
213
293
  * 是否只读
214
294
  */
@@ -224,10 +304,10 @@ export interface BubbleProps<T = Record<string, any>> extends BubbleItemStylePro
224
304
  /**
225
305
  * 依赖项数组
226
306
  */
227
- deps?: any[];
307
+ deps?: unknown[];
228
308
  /**
229
309
  * 不喜欢回调
230
- * @deprecated 请使用 onDislike 替代(符合命名规范),但为保持兼容性暂时保留
310
+ * @deprecated @since 2.29.0 请使用 onDislike 替代(符合命名规范),但为保持兼容性暂时保留
231
311
  */
232
312
  onDisLike?: (bubble: MessageBubbleData<Record<string, any>>) => Promise<void> | void;
233
313
  /** 不喜欢回调 */
@@ -239,7 +319,7 @@ export interface BubbleProps<T = Record<string, any>> extends BubbleItemStylePro
239
319
  /**
240
320
  * 取消点赞的回调函数
241
321
  * @description 当用户点击取消点赞按钮时触发
242
- * @deprecated 请使用 onLikeCancel 替代(符合命名规范),但为保持兼容性暂时保留
322
+ * @deprecated @since 2.29.0 请使用 onLikeCancel 替代(符合命名规范),但为保持兼容性暂时保留
243
323
  * @callback
244
324
  * @optional
245
325
  */
@@ -261,8 +341,9 @@ export interface BubbleProps<T = Record<string, any>> extends BubbleItemStylePro
261
341
  };
262
342
  /**
263
343
  * 气泡引用
344
+ * @description 支持命令式操作的气泡实例引用,包含 setMessageItem 等方法
264
345
  */
265
- bubbleRef?: any;
346
+ bubbleRef?: React.MutableRefObject<BubbleImperativeHandle | null | undefined>;
266
347
  /**
267
348
  * 控制复制按钮的显示
268
349
  * @description 控制复制按钮是否显示的函数或布尔值
@@ -331,5 +412,12 @@ export interface BubbleProps<T = Record<string, any>> extends BubbleItemStylePro
331
412
  renderFileMoreAction?: React.ReactNode | ((file: AttachmentFile) => React.ReactNode) | (() => React.ReactNode) | (() => (file: AttachmentFile) => React.ReactNode);
332
413
  };
333
414
  userBubbleProps?: BubbleProps;
415
+ /**
416
+ * AI 气泡的属性配置
417
+ */
418
+ aiBubbleProps?: BubbleProps;
419
+ /**
420
+ * @deprecated @since 2.30.0 请使用 aiBubbleProps 替代(符合命名规范)
421
+ */
334
422
  aIBubbleProps?: BubbleProps;
335
423
  }
@@ -2,7 +2,9 @@ import React from 'react';
2
2
  import { MessageBubbleData, WithFalse } from '../../Types';
3
3
  export interface SimpleBubbleProps<T = Record<string, any>> {
4
4
  originData?: T & MessageBubbleData;
5
- [key: string]: any;
5
+ id?: string;
6
+ placement?: 'left' | 'right';
7
+ readonly?: boolean;
6
8
  }
7
9
  /**
8
10
  * 聊天项额外操作组件的属性接口
@@ -20,7 +22,7 @@ export type BubbleExtraProps = {
20
22
  /**
21
23
  * 点踩的回调函数
22
24
  * @description 当用户点击点踩按钮时触发
23
- * @deprecated 请使用 onDislike 替代(符合命名规范),但为保持兼容性暂时保留
25
+ * @deprecated @since 2.29.0 请使用 onDislike 替代(符合命名规范),但为保持兼容性暂时保留
24
26
  * @callback
25
27
  * @optional
26
28
  */
@@ -37,7 +39,7 @@ export type BubbleExtraProps = {
37
39
  /**
38
40
  * 取消点赞的回调函数
39
41
  * @description 当用户点击取消点赞按钮时触发
40
- * @deprecated 请使用 onLikeCancel 替代(符合命名规范),但为保持兼容性暂时保留
42
+ * @deprecated @since 2.29.0 请使用 onLikeCancel 替代(符合命名规范),但为保持兼容性暂时保留
41
43
  * @callback
42
44
  * @optional
43
45
  */
@@ -129,7 +131,7 @@ export type BubbleExtraProps = {
129
131
  * @param defaultDoms - 默认的操作按钮 DOM 节点
130
132
  * @returns 自定义的额外操作区域 React 节点
131
133
  * @optional
132
- * @deprecated 此属性当前未被使用,extraRender 功能在 MessagesContent 层级处理
134
+ * @deprecated @since 2.29.0 此属性当前未被使用,extraRender 功能在 MessagesContent 层级处理
133
135
  */
134
136
  render?: WithFalse<(props: SimpleBubbleProps<Record<string, any>>, defaultDoms: React.ReactNode) => React.ReactNode>;
135
137
  pure?: boolean;
@@ -11,7 +11,7 @@ function _define_property(obj, key, value) {
11
11
  }
12
12
  return obj;
13
13
  }
14
- import classNames from "classnames";
14
+ import classNames from "clsx";
15
15
  import React, { memo, useCallback } from "react";
16
16
  import { useStyle } from "./ButtonTabStyle";
17
17
  var ButtonTabComponent = function ButtonTabComponent(param) {
@@ -46,7 +46,7 @@ function _unsupported_iterable_to_array(o, minLen) {
46
46
  }
47
47
  import { ArrowRight } from "@sofa-design/icons";
48
48
  import { ConfigProvider } from "antd";
49
- import classNames from "classnames";
49
+ import classNames from "clsx";
50
50
  import React, { memo, useCallback, useContext, useState } from "react";
51
51
  import { useStyle } from "./CaseReplyStyle";
52
52
  var CaseReplyComponent = function CaseReplyComponent(param) {
@@ -1,5 +1,5 @@
1
1
  import { ConfigProvider } from "antd";
2
- import classNames from "classnames";
2
+ import classNames from "clsx";
3
3
  import React, { memo, useContext } from "react";
4
4
  import { useStyle } from "./style";
5
5
  var TitleComponent = function TitleComponent(param) {
@@ -27,7 +27,7 @@ function _object_spread(target) {
27
27
  return target;
28
28
  }
29
29
  import { ConfigProvider } from "antd";
30
- import clsx from "classnames";
30
+ import clsx from "clsx";
31
31
  import React, { forwardRef, memo, useContext, useImperativeHandle, useRef } from "react";
32
32
  import { LayoutHeader } from "../Components/LayoutHeader";
33
33
  import useAutoScroll from "../Hooks/useAutoScroll";
@@ -11,7 +11,7 @@ export type ActionIconBoxProps = {
11
11
  className?: string;
12
12
  borderLess?: boolean;
13
13
  /**
14
- * @deprecated 请使用 isLoading 代替
14
+ * @deprecated @since 2.29.0 请使用 isLoading 代替
15
15
  * @description 已废弃,将在未来版本移除
16
16
  */
17
17
  loading?: boolean;
@@ -226,8 +226,8 @@ function _ts_generator(thisArg, body) {
226
226
  }
227
227
  import { LoadingOutlined } from "@ant-design/icons";
228
228
  import { ConfigProvider, Tooltip } from "antd";
229
- import cx from "classnames";
230
- import { isFunction } from "lodash";
229
+ import cx from "clsx";
230
+ import { isFunction } from "lodash-es";
231
231
  import { useMergedState } from "rc-util";
232
232
  import React, { useContext, useEffect, useMemo, useState } from "react";
233
233
  import { useStyle } from "./style";
@@ -27,7 +27,7 @@ function _object_spread(target) {
27
27
  return target;
28
28
  }
29
29
  import { ConfigProvider } from "antd";
30
- import classNames from "classnames";
30
+ import classNames from "clsx";
31
31
  import { motion } from "framer-motion";
32
32
  import React, { useContext, useEffect } from "react";
33
33
  import { useStyle } from "./style";
@@ -8,7 +8,7 @@ export interface IconButtonProps {
8
8
  elevated?: boolean;
9
9
  size?: 'base' | 'sm' | 'xs';
10
10
  /**
11
- * @deprecated 请使用 isLoading 代替
11
+ * @deprecated @since 2.29.0 请使用 isLoading 代替
12
12
  * @description 已废弃,将在未来版本移除
13
13
  */
14
14
  loading?: boolean;
@@ -12,7 +12,7 @@ function _define_property(obj, key, value) {
12
12
  return obj;
13
13
  }
14
14
  import { Button, ConfigProvider, Tooltip } from "antd";
15
- import classNames from "classnames";
15
+ import classNames from "clsx";
16
16
  import React, { useContext } from "react";
17
17
  import { useStyle } from "./style";
18
18
  export var IconButton = function IconButton(param) {
@@ -187,7 +187,7 @@ function _ts_generator(thisArg, body) {
187
187
  }
188
188
  import { ChevronDown, ChevronUp } from "@sofa-design/icons";
189
189
  import { Button, ConfigProvider } from "antd";
190
- import classNames from "classnames";
190
+ import classNames from "clsx";
191
191
  import React, { useContext, useEffect, useState } from "react";
192
192
  import { useStyle } from "./style";
193
193
  export var SwitchButton = function SwitchButton(param) {
@@ -12,7 +12,7 @@ function _define_property(obj, key, value) {
12
12
  return obj;
13
13
  }
14
14
  import { Button, ConfigProvider } from "antd";
15
- import classNames from "classnames";
15
+ import classNames from "clsx";
16
16
  import React, { useContext } from "react";
17
17
  import { useStyle } from "./style";
18
18
  export var ToggleButton = function ToggleButton(param) {
@@ -1,5 +1,5 @@
1
1
  import { ConfigProvider } from "antd";
2
- import classNames from "classnames";
2
+ import classNames from "clsx";
3
3
  import React, { useContext } from "react";
4
4
  import { useGradientTextStyle } from "./style";
5
5
  export function GradientText(param) {
@@ -46,7 +46,7 @@ function _unsupported_iterable_to_array(o, minLen) {
46
46
  }
47
47
  import { LaptopMinimal, PanelLeftFill, PanelLeftFillFold, SquareArrowOutUpRight } from "@sofa-design/icons";
48
48
  import { Button, ConfigProvider } from "antd";
49
- import classNames from "classnames";
49
+ import classNames from "clsx";
50
50
  import { useMergedState } from "rc-util";
51
51
  import React, { useContext } from "react";
52
52
  import { I18nContext } from "../../I18n";
@@ -27,8 +27,8 @@ function _object_spread(target) {
27
27
  return target;
28
28
  }
29
29
  import { ConfigProvider } from "antd";
30
- import classNames from "classnames";
31
- import { isString } from "lodash";
30
+ import classNames from "clsx";
31
+ import { isString } from "lodash-es";
32
32
  import React, { useContext } from "react";
33
33
  import { TextLoading } from "../lotties";
34
34
  import Indicator from "./Indicator";
@@ -26,7 +26,7 @@ function _object_spread(target) {
26
26
  }
27
27
  return target;
28
28
  }
29
- import classNames from "classnames";
29
+ import classNames from "clsx";
30
30
  import { isString } from "lodash-es";
31
31
  import React from "react";
32
32
  import { DazingLottie, ThinkingLottie } from "./lotties";
@@ -187,7 +187,7 @@ function _ts_generator(thisArg, body) {
187
187
  }
188
188
  import { RefreshCcw, SwapRight } from "@sofa-design/icons";
189
189
  import { ConfigProvider, Tooltip } from "antd";
190
- import classNames from "classnames";
190
+ import classNames from "clsx";
191
191
  import React, { useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
192
192
  import { I18nContext } from "../../I18n";
193
193
  import { useStyle } from "./style";
@@ -112,9 +112,9 @@ function _unsupported_iterable_to_array(o, minLen) {
112
112
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
113
113
  }
114
114
  import { ConfigProvider } from "antd";
115
- import classNames from "classnames";
115
+ import classNames from "clsx";
116
116
  import { AnimatePresence, motion } from "framer-motion";
117
- import { isNumber, isObject, isString } from "lodash";
117
+ import { isNumber, isObject, isString } from "lodash-es";
118
118
  import toArray from "rc-util/lib/Children/toArray";
119
119
  import React, { memo, useContext } from "react";
120
120
  import { useTextAnimateStyle } from "./style";