@ant-design/agentic-ui 2.29.31 → 2.29.32
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/Bubble/AIBubble.d.ts +2 -0
- package/dist/Bubble/AIBubble.js +11 -11
- package/dist/Bubble/Avatar/index.js +3 -3
- package/dist/Bubble/List/PureBubbleList.js +3 -3
- package/dist/Bubble/List/index.js +3 -3
- package/dist/Bubble/PureBubble.js +9 -9
- package/dist/Bubble/Title.js +3 -3
- package/dist/Bubble/UserBubble.js +9 -9
- package/dist/Components/ActionIconBox/index.js +3 -3
- package/dist/Components/TextAnimate/index.js +1 -0
- package/dist/Components/lotties/TextLoading/index.js +2 -2
- package/dist/MarkdownEditor/editor/elements/CommentLeaf/index.d.ts +5 -0
- package/dist/MarkdownEditor/editor/elements/CommentLeaf/index.js +2 -1
- package/dist/MarkdownEditor/editor/plugins/elements.js +34 -1
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/arrow.js +3 -3
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/backspace.js +2 -2
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/match.js +2 -1
- package/dist/MarkdownEditor/editor/plugins/useHighlight.js +2 -1
- package/dist/MarkdownEditor/editor/tools/InsertAutocomplete.js +5 -4
- package/dist/MarkdownEditor/editor/tools/ToolBar/BaseBar.js +5 -5
- package/dist/MarkdownEditor/editor/tools/ToolBar/FloatBar.js +3 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/ReadonlyBaseBar.js +4 -4
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/ClearFormatButton.js +2 -2
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/ColorPickerButton.js +2 -2
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/FormatButton.js +2 -2
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/FormattingTools.js +2 -2
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/HeadingDropdown.js +2 -2
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/LinkButton.js +2 -2
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/UndoRedoButtons.js +3 -3
- package/dist/MarkdownEditor/editor/tools/ToolBar/floatBarStyle.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/toolBarStyle.js +1 -1
- package/dist/MarkdownEditor/editor/utils/editorUtils.js +8 -6
- package/dist/MarkdownEditor/editor/utils/isMarkdown.js +4 -4
- package/dist/MarkdownEditor/editor/utils/keyboard.js +3 -2
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileListItem.js +11 -42
- package/dist/MarkdownInputField/QuickActions/index.js +2 -2
- package/dist/MarkdownInputField/RefinePromptButton/env.d.ts +4 -0
- package/dist/MarkdownInputField/RefinePromptButton/env.js +5 -0
- package/dist/MarkdownInputField/RefinePromptButton/index.js +2 -1
- package/dist/Plugins/chart/BarChart/index.js +6 -6
- package/dist/Plugins/chart/ChartMark/Area.js +2 -1
- package/dist/Plugins/chart/ChartMark/Bar.js +2 -1
- package/dist/Plugins/chart/ChartMark/Column.js +2 -1
- package/dist/Plugins/chart/ChartMark/Line.js +2 -1
- package/dist/Plugins/chart/ChartMark/Pie.js +2 -1
- package/dist/Plugins/chart/ChartRender.js +9 -1
- package/dist/Plugins/chart/DonutChart/index.js +2 -1
- package/dist/Plugins/chart/env.d.ts +4 -0
- package/dist/Plugins/chart/env.js +5 -0
- package/dist/Plugins/code/components/AceEditor.js +2 -0
- package/dist/Plugins/code/index.d.ts +1 -0
- package/dist/Plugins/code/index.js +1 -1
- package/dist/Plugins/mermaid/Mermaid.js +2 -2
- package/dist/Plugins/mermaid/env.d.ts +4 -0
- package/dist/Plugins/mermaid/env.js +5 -0
- package/dist/ToolUseBar/BarItem/Content.js +13 -13
- package/dist/ToolUseBar/BarItem/index.js +7 -7
- package/dist/WelcomeMessage/index.js +4 -4
- package/package.json +1 -1
|
@@ -31,7 +31,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
31
31
|
import { BaseMarkdownEditor } from "../../MarkdownEditor";
|
|
32
32
|
import { useEditorStore } from "../../MarkdownEditor/editor/store";
|
|
33
33
|
import { CodeRenderer } from "./components";
|
|
34
|
-
function csvToMarkdownTable(csv) {
|
|
34
|
+
export function csvToMarkdownTable(csv) {
|
|
35
35
|
if (!csv) return '';
|
|
36
36
|
// 处理不同换行符
|
|
37
37
|
var lines = csv.replace(/\r\n/g, '\n').replace(/\r/g, '\n').split('\n');
|
|
@@ -127,6 +127,7 @@ function _ts_generator(thisArg, body) {
|
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
import React, { lazy, Suspense } from "react";
|
|
130
|
+
import { isBrowser } from "./env";
|
|
130
131
|
import { MermaidFallback } from "./MermaidFallback";
|
|
131
132
|
import { MermaidRendererImpl } from "./MermaidRendererImpl";
|
|
132
133
|
import { loadMermaid } from "./utils";
|
|
@@ -190,8 +191,7 @@ import { loadMermaid } from "./utils";
|
|
|
190
191
|
* - 居中显示图表
|
|
191
192
|
* - 自动生成唯一ID
|
|
192
193
|
*/ export var Mermaid = function Mermaid(props) {
|
|
193
|
-
|
|
194
|
-
if (!isBrowser) {
|
|
194
|
+
if (!isBrowser()) {
|
|
195
195
|
return null;
|
|
196
196
|
}
|
|
197
197
|
return /*#__PURE__*/ React.createElement(Suspense, {
|
|
@@ -27,7 +27,7 @@ function _object_spread(target) {
|
|
|
27
27
|
return target;
|
|
28
28
|
}
|
|
29
29
|
import { Api, ChevronUp, X } from "@sofa-design/icons";
|
|
30
|
-
import
|
|
30
|
+
import classNames from "clsx";
|
|
31
31
|
import { AnimatePresence, motion } from "framer-motion";
|
|
32
32
|
import React, { memo, useMemo } from "react";
|
|
33
33
|
import { useRefFunction } from "../../Hooks/useRefFunction";
|
|
@@ -35,14 +35,14 @@ var ToolImageComponent = function ToolImageComponent(param) {
|
|
|
35
35
|
var tool = param.tool, prefixCls = param.prefixCls, hashId = param.hashId;
|
|
36
36
|
var toolImageWrapperClassName = useMemo(function() {
|
|
37
37
|
var _obj;
|
|
38
|
-
return
|
|
38
|
+
return classNames("".concat(prefixCls, "-tool-image-wrapper"), hashId, (_obj = {}, _define_property(_obj, "".concat(prefixCls, "-tool-image-wrapper-rotating"), tool.status === 'loading'), _define_property(_obj, "".concat(prefixCls, "-tool-image-wrapper-loading"), tool.status === 'loading'), _obj));
|
|
39
39
|
}, [
|
|
40
40
|
prefixCls,
|
|
41
41
|
hashId,
|
|
42
42
|
tool.status
|
|
43
43
|
]);
|
|
44
44
|
var toolImageClassName = useMemo(function() {
|
|
45
|
-
return
|
|
45
|
+
return classNames("".concat(prefixCls, "-tool-image"), hashId);
|
|
46
46
|
}, [
|
|
47
47
|
prefixCls,
|
|
48
48
|
hashId
|
|
@@ -98,14 +98,14 @@ export var ToolImage = /*#__PURE__*/ memo(ToolImageComponent);
|
|
|
98
98
|
var ToolHeaderRightComponent = function ToolHeaderRightComponent(param) {
|
|
99
99
|
var tool = param.tool, prefixCls = param.prefixCls, hashId = param.hashId, light = param.light;
|
|
100
100
|
var toolHeaderRightClassName = useMemo(function() {
|
|
101
|
-
return
|
|
101
|
+
return classNames("".concat(prefixCls, "-tool-header-right"), _define_property({}, "".concat(prefixCls, "-tool-header-right-light"), light), hashId);
|
|
102
102
|
}, [
|
|
103
103
|
prefixCls,
|
|
104
104
|
hashId,
|
|
105
105
|
light
|
|
106
106
|
]);
|
|
107
107
|
var toolNameClassName = useMemo(function() {
|
|
108
|
-
return
|
|
108
|
+
return classNames("".concat(prefixCls, "-tool-name"), hashId, _define_property({}, "".concat(prefixCls, "-tool-name-loading"), tool.status === 'loading'));
|
|
109
109
|
}, [
|
|
110
110
|
prefixCls,
|
|
111
111
|
hashId,
|
|
@@ -113,7 +113,7 @@ var ToolHeaderRightComponent = function ToolHeaderRightComponent(param) {
|
|
|
113
113
|
]);
|
|
114
114
|
var toolTargetClassName = useMemo(function() {
|
|
115
115
|
var _obj;
|
|
116
|
-
return
|
|
116
|
+
return classNames("".concat(prefixCls, "-tool-target"), hashId, (_obj = {}, _define_property(_obj, "".concat(prefixCls, "-tool-target-loading"), tool.status === 'loading'), _define_property(_obj, "".concat(prefixCls, "-tool-target-light"), light), _obj));
|
|
117
117
|
}, [
|
|
118
118
|
prefixCls,
|
|
119
119
|
hashId,
|
|
@@ -175,7 +175,7 @@ export var ToolHeaderRight = /*#__PURE__*/ memo(ToolHeaderRightComponent);
|
|
|
175
175
|
var ToolTimeComponent = function ToolTimeComponent(param) {
|
|
176
176
|
var tool = param.tool, prefixCls = param.prefixCls, hashId = param.hashId;
|
|
177
177
|
var toolTimeClassName = useMemo(function() {
|
|
178
|
-
return
|
|
178
|
+
return classNames("".concat(prefixCls, "-tool-time"), hashId);
|
|
179
179
|
}, [
|
|
180
180
|
prefixCls,
|
|
181
181
|
hashId
|
|
@@ -195,7 +195,7 @@ export var ToolTime = /*#__PURE__*/ memo(ToolTimeComponent);
|
|
|
195
195
|
var ToolExpandComponent = function ToolExpandComponent(param) {
|
|
196
196
|
var showContent = param.showContent, expanded = param.expanded, prefixCls = param.prefixCls, hashId = param.hashId, onExpandClick = param.onExpandClick;
|
|
197
197
|
var toolExpandClassName = useMemo(function() {
|
|
198
|
-
return
|
|
198
|
+
return classNames("".concat(prefixCls, "-tool-expand"), hashId);
|
|
199
199
|
}, [
|
|
200
200
|
prefixCls,
|
|
201
201
|
hashId
|
|
@@ -234,7 +234,7 @@ export var ToolExpand = /*#__PURE__*/ memo(ToolExpandComponent);
|
|
|
234
234
|
var ToolContentComponent = function ToolContentComponent(param) {
|
|
235
235
|
var tool = param.tool, prefixCls = param.prefixCls, hashId = param.hashId, light = param.light, showContent = param.showContent, expanded = param.expanded;
|
|
236
236
|
var toolContainerClassName = useMemo(function() {
|
|
237
|
-
return
|
|
237
|
+
return classNames("".concat(prefixCls, "-tool-container"), hashId, _define_property({}, "".concat(prefixCls, "-tool-container-light"), light));
|
|
238
238
|
}, [
|
|
239
239
|
prefixCls,
|
|
240
240
|
hashId,
|
|
@@ -242,25 +242,25 @@ var ToolContentComponent = function ToolContentComponent(param) {
|
|
|
242
242
|
]);
|
|
243
243
|
// 缓存错误样式类名
|
|
244
244
|
var errorClassName = useMemo(function() {
|
|
245
|
-
return
|
|
245
|
+
return classNames("".concat(prefixCls, "-tool-content-error"), hashId);
|
|
246
246
|
}, [
|
|
247
247
|
prefixCls,
|
|
248
248
|
hashId
|
|
249
249
|
]);
|
|
250
250
|
var errorIconClassName = useMemo(function() {
|
|
251
|
-
return
|
|
251
|
+
return classNames("".concat(prefixCls, "-tool-content-error-icon"), hashId);
|
|
252
252
|
}, [
|
|
253
253
|
prefixCls,
|
|
254
254
|
hashId
|
|
255
255
|
]);
|
|
256
256
|
var errorTextClassName = useMemo(function() {
|
|
257
|
-
return
|
|
257
|
+
return classNames("".concat(prefixCls, "-tool-content-error-text"), hashId);
|
|
258
258
|
}, [
|
|
259
259
|
prefixCls,
|
|
260
260
|
hashId
|
|
261
261
|
]);
|
|
262
262
|
var contentClassName = useMemo(function() {
|
|
263
|
-
return
|
|
263
|
+
return classNames("".concat(prefixCls, "-tool-content"), hashId);
|
|
264
264
|
}, [
|
|
265
265
|
prefixCls,
|
|
266
266
|
hashId
|
|
@@ -64,7 +64,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
64
64
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
65
65
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
66
66
|
}
|
|
67
|
-
import
|
|
67
|
+
import classNames from "clsx";
|
|
68
68
|
import { useMergedState } from "rc-util";
|
|
69
69
|
import React, { memo, useMemo } from "react";
|
|
70
70
|
import { useRefFunction } from "../../Hooks/useRefFunction";
|
|
@@ -88,7 +88,7 @@ var ToolUseBarItemComponent = function ToolUseBarItemComponent(param) {
|
|
|
88
88
|
// 使用 useMemo 优化样式类名
|
|
89
89
|
var toolClassName = useMemo(function() {
|
|
90
90
|
var _obj;
|
|
91
|
-
return
|
|
91
|
+
return classNames("".concat(prefixCls, "-tool ").concat(hashId), (_obj = {}, _define_property(_obj, "".concat(prefixCls, "-tool-success"), tool.status === 'success'), _define_property(_obj, "".concat(prefixCls, "-tool-loading"), tool.status === 'loading'), _define_property(_obj, "".concat(prefixCls, "-tool-loading-light"), tool.status === 'loading' && light), _define_property(_obj, "".concat(prefixCls, "-tool-error"), tool.status === 'error'), _define_property(_obj, "".concat(prefixCls, "-tool-idle"), tool.status === 'idle'), _define_property(_obj, "".concat(prefixCls, "-tool-active"), isActive && !expanded), _define_property(_obj, "".concat(prefixCls, "-tool-expanded"), expanded), _define_property(_obj, "".concat(prefixCls, "-tool-light"), light), _obj));
|
|
92
92
|
}, [
|
|
93
93
|
prefixCls,
|
|
94
94
|
hashId,
|
|
@@ -98,13 +98,13 @@ var ToolUseBarItemComponent = function ToolUseBarItemComponent(param) {
|
|
|
98
98
|
expanded
|
|
99
99
|
]);
|
|
100
100
|
var toolBarClassName = useMemo(function() {
|
|
101
|
-
return
|
|
101
|
+
return classNames("".concat(prefixCls, "-tool-bar"), hashId);
|
|
102
102
|
}, [
|
|
103
103
|
prefixCls,
|
|
104
104
|
hashId
|
|
105
105
|
]);
|
|
106
106
|
var toolHeaderClassName = useMemo(function() {
|
|
107
|
-
return
|
|
107
|
+
return classNames("".concat(prefixCls, "-tool-header"), hashId);
|
|
108
108
|
}, [
|
|
109
109
|
prefixCls,
|
|
110
110
|
hashId
|
|
@@ -152,9 +152,9 @@ var ToolUseBarItemComponent = function ToolUseBarItemComponent(param) {
|
|
|
152
152
|
return /*#__PURE__*/ React.createElement("div", {
|
|
153
153
|
key: tool.id,
|
|
154
154
|
"data-testid": "ToolUserItem",
|
|
155
|
-
className:
|
|
155
|
+
className: classNames(toolClassName, _define_property({}, "".concat(prefixCls, "-tool-collapsed"), !showContent))
|
|
156
156
|
}, /*#__PURE__*/ React.createElement("div", {
|
|
157
|
-
className:
|
|
157
|
+
className: classNames(toolBarClassName, _define_property({}, "".concat(prefixCls, "-tool-bar-collapsed"), !showContent)),
|
|
158
158
|
"data-testid": "tool-user-item-tool-bar",
|
|
159
159
|
onClick: handleClick
|
|
160
160
|
}, /*#__PURE__*/ React.createElement("div", {
|
|
@@ -170,7 +170,7 @@ var ToolUseBarItemComponent = function ToolUseBarItemComponent(param) {
|
|
|
170
170
|
hashId: hashId,
|
|
171
171
|
light: light
|
|
172
172
|
}), tool.time || showContent ? /*#__PURE__*/ React.createElement("div", {
|
|
173
|
-
className:
|
|
173
|
+
className: classNames("".concat(prefixCls, "-tool-time-expand"), hashId)
|
|
174
174
|
}, /*#__PURE__*/ React.createElement(ToolTime, {
|
|
175
175
|
tool: tool,
|
|
176
176
|
prefixCls: prefixCls,
|
|
@@ -69,7 +69,7 @@ function _object_spread_props(target, source) {
|
|
|
69
69
|
return target;
|
|
70
70
|
}
|
|
71
71
|
import { ConfigProvider } from "antd";
|
|
72
|
-
import
|
|
72
|
+
import clsx from "clsx";
|
|
73
73
|
import React, { useContext } from "react";
|
|
74
74
|
import { TextAnimate } from "../Components/TextAnimate";
|
|
75
75
|
import { TypingAnimation } from "../Components/TypingAnimation";
|
|
@@ -120,18 +120,18 @@ import { useStyle } from "./style";
|
|
|
120
120
|
var _useStyle = useStyle(prefixCls), wrapSSR = _useStyle.wrapSSR, hashId = _useStyle.hashId;
|
|
121
121
|
var _ref = customStyle || {}, ref = _object_destructuring_empty(_ref), restStyle = _extends({}, _ref);
|
|
122
122
|
return wrapSSR(/*#__PURE__*/ React.createElement("div", {
|
|
123
|
-
className:
|
|
123
|
+
className: clsx(prefixCls, hashId, rootClassName),
|
|
124
124
|
style: restStyle
|
|
125
125
|
}, title && /*#__PURE__*/ React.createElement(TypingAnimation, _object_spread_props(_object_spread({
|
|
126
126
|
as: "div"
|
|
127
127
|
}, titleAnimateProps), {
|
|
128
|
-
className:
|
|
128
|
+
className: clsx("".concat(prefixCls, "-title"), classNames === null || classNames === void 0 ? void 0 : classNames.title)
|
|
129
129
|
}), title), description && /*#__PURE__*/ React.createElement(TextAnimate, _object_spread_props(_object_spread({
|
|
130
130
|
as: "div",
|
|
131
131
|
animation: "blurInUp",
|
|
132
132
|
by: "character",
|
|
133
133
|
once: true
|
|
134
134
|
}, descriptionAnimateProps), {
|
|
135
|
-
className:
|
|
135
|
+
className: clsx("".concat(prefixCls, "-description"), classNames === null || classNames === void 0 ? void 0 : classNames.description)
|
|
136
136
|
}), description)));
|
|
137
137
|
};
|