@ant-design/agentic-ui 2.31.3 → 2.31.5
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/AILabel/style.js +3 -3
- package/dist/AgenticLayout/style.js +1 -1
- package/dist/AnswerAlert/style.js +2 -2
- package/dist/Bubble/MessagesContent/VoiceButton/style.js +1 -1
- package/dist/Bubble/MessagesContent/index.js +2 -1
- package/dist/Bubble/MessagesContent/style.js +2 -2
- package/dist/Components/ActionIconBox/style.js +3 -3
- package/dist/Components/ActionItemBox/style.js +16 -16
- package/dist/Components/Button/IconButton/style.js +33 -33
- package/dist/Components/Button/ToggleButton/style.js +33 -33
- package/dist/Components/Loading/style.js +5 -5
- package/dist/Components/VisualList/style.js +5 -5
- package/dist/Components/lotties/TextLoading/style.js +2 -2
- package/dist/History/components/HistoryActionsBox.js +1 -1
- package/dist/History/hooks/useHistory.js +1 -1
- package/dist/History/index.js +2 -1
- package/dist/Hooks/useLanguage.d.ts +0 -1
- package/dist/I18n/locales.d.ts +0 -1
- package/dist/I18n/locales.js +0 -2
- package/dist/MarkdownEditor/editor/components/CommentList/style.js +3 -3
- package/dist/MarkdownEditor/editor/parser/parse/parseTable.js +2 -1
- package/dist/MarkdownEditor/editor/style.js +4 -4
- package/dist/MarkdownEditor/editor/utils/index.d.ts +1 -8
- package/dist/MarkdownEditor/editor/utils/index.js +3 -29
- package/dist/MarkdownEditor/editor/utils/markdownToHtml.js +2 -1
- package/dist/MarkdownEditor/editor/utils/sideEffects.d.ts +9 -0
- package/dist/MarkdownEditor/editor/utils/sideEffects.js +27 -0
- package/dist/MarkdownEditor/style.js +26 -26
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/style.js +1 -1
- package/dist/MarkdownInputField/AttachmentButton/style.js +5 -5
- package/dist/MarkdownInputField/FileMapView/style.js +2 -2
- package/dist/MarkdownInputField/style.js +6 -6
- package/dist/MarkdownInputField/types/MarkdownInputFieldProps.d.ts +10 -0
- package/dist/MarkdownRenderer/markdownReactShared.js +2 -1
- package/dist/MarkdownRenderer/renderers/CodeRenderer.js +10 -17
- package/dist/Plugins/chart/ChartStatistic/style.js +9 -9
- package/dist/Plugins/chart/DonutChart/style.js +3 -3
- package/dist/Plugins/chart/components/ChartContainer/ChartErrorBoundary.d.ts +0 -2
- package/dist/Plugins/chart/components/ChartContainer/style.js +3 -3
- package/dist/Plugins/chart/components/ChartFilter/style.js +22 -22
- package/dist/Plugins/chart/components/ChartToolBar/style.js +4 -4
- package/dist/Plugins/code/components/CodeContainer.d.ts +1 -2
- package/dist/Plugins/code/components/CodeContainer.js +3 -3
- package/dist/Plugins/code/components/CodeRenderer.js +8 -7
- package/dist/Plugins/code/components/CodeToolbar.d.ts +0 -1
- package/dist/Plugins/code/components/CodeToolbar.js +7 -13
- package/dist/Schema/SchemaEditor/style.js +26 -26
- package/dist/TaskList/TaskList.js +2 -1
- package/dist/ThoughtChainList/TableSql.js +1 -1
- package/dist/ThoughtChainList/TitleInfo.js +1 -1
- package/dist/ThoughtChainList/ToolCall.js +1 -1
- package/dist/ThoughtChainList/style.js +5 -5
- package/dist/ToolUseBar/style.js +8 -8
- package/dist/ToolUseBarThink/style.js +1 -1
- package/dist/Utils/rehypeSanitizeUserHtml.d.ts +11 -0
- package/dist/Utils/rehypeSanitizeUserHtml.js +182 -0
- package/dist/Workspace/RealtimeFollow/style.js +11 -11
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +5 -2
|
@@ -85,7 +85,7 @@ var genStyle = function genStyle(token) {
|
|
|
85
85
|
textDecoration: 'none',
|
|
86
86
|
color: 'inherit',
|
|
87
87
|
'&:focus': {
|
|
88
|
-
outline: '2px solid
|
|
88
|
+
outline: '2px solid var(--color-primary-control-fill-primary)',
|
|
89
89
|
outlineOffset: '2px'
|
|
90
90
|
}
|
|
91
91
|
}), _define_property(_obj, "".concat(token.componentCls, "-image"), {
|
|
@@ -101,7 +101,7 @@ var genStyle = function genStyle(token) {
|
|
|
101
101
|
alignItems: 'center',
|
|
102
102
|
justifyContent: 'center',
|
|
103
103
|
minHeight: '40px',
|
|
104
|
-
color: '
|
|
104
|
+
color: 'var(--color-gray-text-secondary)',
|
|
105
105
|
fontSize: '14px'
|
|
106
106
|
}), _define_property(_obj, "".concat(token.componentCls, "-empty"), {
|
|
107
107
|
display: 'flex',
|
|
@@ -111,7 +111,7 @@ var genStyle = function genStyle(token) {
|
|
|
111
111
|
alignItems: 'center',
|
|
112
112
|
justifyContent: 'center',
|
|
113
113
|
minHeight: '40px',
|
|
114
|
-
color: '
|
|
114
|
+
color: 'var(--color-gray-text-disabled)',
|
|
115
115
|
fontSize: '14px',
|
|
116
116
|
fontStyle: 'italic'
|
|
117
117
|
}), // 圆形头像样式
|
|
@@ -131,7 +131,7 @@ var genStyle = function genStyle(token) {
|
|
|
131
131
|
gap: 6,
|
|
132
132
|
width: 'max-content',
|
|
133
133
|
padding: '0 8px',
|
|
134
|
-
background: '
|
|
134
|
+
background: 'var(--color-gray-bg-card-white)',
|
|
135
135
|
boxShadow: 'var(--shadow-control-base)'
|
|
136
136
|
}), // 描述文字样式
|
|
137
137
|
_define_property(_obj1, "".concat(token.componentCls, "-description"), {
|
|
@@ -139,7 +139,7 @@ var genStyle = function genStyle(token) {
|
|
|
139
139
|
fontWeight: 'normal',
|
|
140
140
|
lineHeight: '22px',
|
|
141
141
|
letterSpacing: 'normal',
|
|
142
|
-
color: '
|
|
142
|
+
color: 'var(--color-gray-text-secondary)'
|
|
143
143
|
}), _obj1;
|
|
144
144
|
};
|
|
145
145
|
export function useStyle(prefixCls) {
|
|
@@ -70,7 +70,7 @@ var genStyle = function genStyle(token) {
|
|
|
70
70
|
animationIterationCount: 'infinite',
|
|
71
71
|
// 亮色主题:深色文字 + 亮色光泽(适用于白色背景)
|
|
72
72
|
'&-light': {
|
|
73
|
-
color: '
|
|
73
|
+
color: 'var(--color-gray-text-default)',
|
|
74
74
|
backgroundImage: "linear-gradient(\n 120deg,\n rgba(255, 255, 255, 0.8) 40%,\n rgba(15, 14, 14, 0.8) 50%,\n rgba(255, 255, 255, 0.8) 60%\n )",
|
|
75
75
|
backgroundSize: '200% 100%',
|
|
76
76
|
WebkitBackgroundClip: 'text',
|
|
@@ -78,7 +78,7 @@ var genStyle = function genStyle(token) {
|
|
|
78
78
|
},
|
|
79
79
|
// 暗色主题:浅色文字 + 深色光泽(适用于黑色背景)
|
|
80
80
|
'&-dark': {
|
|
81
|
-
color: '
|
|
81
|
+
color: 'var(--color-gray-text-light)',
|
|
82
82
|
backgroundImage: "linear-gradient(\n 120deg,\n rgba(255, 255, 255, 0) 40%,\n rgba(255, 255, 255, 0.8) 50%,\n rgba(255, 255, 255, 0) 60%\n )",
|
|
83
83
|
backgroundSize: '200% 100%',
|
|
84
84
|
WebkitBackgroundClip: 'text',
|
|
@@ -176,7 +176,7 @@ import { Star, StarFill, Trash2 } from "@sofa-design/icons";
|
|
|
176
176
|
import { ConfigProvider, Popconfirm, Space } from "antd";
|
|
177
177
|
import React, { useContext, useState } from "react";
|
|
178
178
|
import { I18nContext } from "../../I18n";
|
|
179
|
-
import { ActionIconBox } from "../../
|
|
179
|
+
import { ActionIconBox } from "../../Components/ActionIconBox";
|
|
180
180
|
/**
|
|
181
181
|
* HistoryActionsBox 组件 - 历史记录操作按钮容器组件
|
|
182
182
|
*
|
|
@@ -237,7 +237,7 @@ function _ts_generator(thisArg, body) {
|
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
240
|
-
import { useRefFunction } from "../../
|
|
240
|
+
import { useRefFunction } from "../../Hooks/useRefFunction";
|
|
241
241
|
/**
|
|
242
242
|
* 根据关键词从列表中过滤
|
|
243
243
|
*/ function filterListByKeyword(list, keyword) {
|
package/dist/History/index.js
CHANGED
|
@@ -131,7 +131,8 @@ import { ConfigProvider, Popover } from "antd";
|
|
|
131
131
|
import classNames from "clsx";
|
|
132
132
|
import React, { memo, useContext, useMemo, useRef } from "react";
|
|
133
133
|
import useClickAway from "../Hooks/useClickAway";
|
|
134
|
-
import { ActionIconBox
|
|
134
|
+
import { ActionIconBox } from "../Components/ActionIconBox";
|
|
135
|
+
import { I18nContext } from "../I18n";
|
|
135
136
|
import { HistoryEmpty, HistoryLoadMore, HistoryNewChat, HistorySearch, generateHistoryItems } from "./components";
|
|
136
137
|
import { useHistory } from "./hooks/useHistory";
|
|
137
138
|
import GroupMenu from "./menu";
|
package/dist/I18n/locales.d.ts
CHANGED
package/dist/I18n/locales.js
CHANGED
|
@@ -382,7 +382,6 @@
|
|
|
382
382
|
'browser.totalResults': '共${count}个结果',
|
|
383
383
|
'browser.searching': '搜索中...',
|
|
384
384
|
'layout.header.title': 'AI 助手',
|
|
385
|
-
theme: '主题',
|
|
386
385
|
localPreview: '本地预览',
|
|
387
386
|
expandCollapse: '展开/收起',
|
|
388
387
|
moreActions: '更多操作',
|
|
@@ -844,7 +843,6 @@
|
|
|
844
843
|
'browser.totalResults': 'Total ${count} results',
|
|
845
844
|
'browser.searching': 'Searching...',
|
|
846
845
|
'layout.header.title': 'AI Assistant',
|
|
847
|
-
theme: 'Theme',
|
|
848
846
|
localPreview: 'Local Preview',
|
|
849
847
|
expandCollapse: 'Expand/Collapse',
|
|
850
848
|
moreActions: 'More Actions',
|
|
@@ -65,7 +65,7 @@ var genStyle = function genStyle(token) {
|
|
|
65
65
|
gap: 8,
|
|
66
66
|
borderLeft: '1px solid rgba(0,0,0,0.04)',
|
|
67
67
|
maxWidth: '300px',
|
|
68
|
-
backgroundColor: '
|
|
68
|
+
backgroundColor: 'var(--color-gray-bg-card-white)',
|
|
69
69
|
height: '100vh',
|
|
70
70
|
'&-item': {
|
|
71
71
|
padding: '12px',
|
|
@@ -76,7 +76,7 @@ var genStyle = function genStyle(token) {
|
|
|
76
76
|
flexDirection: 'column',
|
|
77
77
|
gap: 8,
|
|
78
78
|
'&:hover': {
|
|
79
|
-
backgroundColor: '
|
|
79
|
+
backgroundColor: 'var(--color-gray-bg-page-light)'
|
|
80
80
|
},
|
|
81
81
|
'&-header': {
|
|
82
82
|
display: 'flex',
|
|
@@ -94,7 +94,7 @@ var genStyle = function genStyle(token) {
|
|
|
94
94
|
alignItems: 'center'
|
|
95
95
|
},
|
|
96
96
|
'&-time': {
|
|
97
|
-
color: '
|
|
97
|
+
color: 'var(--color-gray-text-disabled)',
|
|
98
98
|
fontSize: '12px'
|
|
99
99
|
},
|
|
100
100
|
'&-action': {
|
|
@@ -60,6 +60,7 @@ import remarkGfm from "remark-gfm";
|
|
|
60
60
|
import remarkMath from "remark-math";
|
|
61
61
|
import remarkParse from "remark-parse";
|
|
62
62
|
import remarkRehype from "remark-rehype";
|
|
63
|
+
import { rehypeSanitizeUserHtml } from "../../../../Utils/rehypeSanitizeUserHtml";
|
|
63
64
|
import { convertParagraphToImage, fixStrongWithSpecialChars } from "../remarkParse";
|
|
64
65
|
//@ts-ignore
|
|
65
66
|
import rehypeKatex from "rehype-katex";
|
|
@@ -75,7 +76,7 @@ var stringifyObj = remark().use(remarkParse).use(fixStrongWithSpecialChars).use(
|
|
|
75
76
|
}).use(remarkRehype, {
|
|
76
77
|
allowDangerousHtml: true,
|
|
77
78
|
handlers: REMARK_REHYPE_DIRECTIVE_HANDLERS
|
|
78
|
-
}).use(rehypeRaw).use(rehypeKatex).use(remarkGfm, {
|
|
79
|
+
}).use(rehypeRaw).use(rehypeSanitizeUserHtml).use(rehypeKatex).use(remarkGfm, {
|
|
79
80
|
singleTilde: false
|
|
80
81
|
}) // 禁用单波浪线删除线
|
|
81
82
|
.use(remarkFrontmatter, [
|
|
@@ -199,7 +199,7 @@ var genStyle = function genStyle(token) {
|
|
|
199
199
|
wordWrap: 'break-word',
|
|
200
200
|
fontSize: '15px'
|
|
201
201
|
}, // Jinja 语法高亮,仅通过 CSS 变量定制(在 .ant-agentic-md-editor-content 上覆盖)
|
|
202
|
-
_define_property(_obj, JINJA_CSS_VAR.variable, 'var(--color-primary-control-fill-primary
|
|
202
|
+
_define_property(_obj, JINJA_CSS_VAR.variable, 'var(--color-primary-control-fill-primary)'), _define_property(_obj, JINJA_CSS_VAR.tag, 'var(--color-orange-6, #d46b08)'), _define_property(_obj, JINJA_CSS_VAR.comment, 'var(--color-text-tertiary, rgba(0,0,0,0.25))'), _define_property(_obj, JINJA_CSS_VAR.keyword, '#5c4033'), _define_property(_obj, JINJA_CSS_VAR.string, 'var(--color-green-10, #10af74)'), _define_property(_obj, JINJA_CSS_VAR.number, 'var(--color-primary-10, #066ced)'), _define_property(_obj, JINJA_CSS_VAR.filter, 'var(--color-primary-8, #689ef0)'), _define_property(_obj, JINJA_CSS_VAR.variableName, 'var(--color-green-10, #10af74)'), _define_property(_obj, JINJA_CSS_VAR.placeholder, 'var(--color-primary-control-fill-primary)'), _define_property(_obj, JINJA_CSS_VAR.placeholderBg, 'var(--color-primary-bg-tip, rgba(0,102,255,0.08))'), _define_property(_obj, JINJA_CSS_VAR.delimiter, '#d4b84b'), _define_property(_obj, '::-webkit-scrollbar', {
|
|
203
203
|
width: '8px',
|
|
204
204
|
height: '8px'
|
|
205
205
|
}), _define_property(_obj, '::-webkit-scrollbar-thumb', {
|
|
@@ -430,7 +430,7 @@ var genStyle = function genStyle(token) {
|
|
|
430
430
|
marginBottom: '8px'
|
|
431
431
|
},
|
|
432
432
|
'&.info': {
|
|
433
|
-
borderLeftColor: 'var(--color-
|
|
433
|
+
borderLeftColor: 'var(--color-primary-control-fill-primary)',
|
|
434
434
|
backgroundColor: 'var(--color-info-bg, rgba(22, 119, 255, 0.08))'
|
|
435
435
|
},
|
|
436
436
|
'&.warning': {
|
|
@@ -438,7 +438,7 @@ var genStyle = function genStyle(token) {
|
|
|
438
438
|
backgroundColor: 'var(--color-warning-bg, rgba(250, 173, 20, 0.08))'
|
|
439
439
|
},
|
|
440
440
|
'&.success': {
|
|
441
|
-
borderLeftColor: 'var(--color-
|
|
441
|
+
borderLeftColor: 'var(--color-green-text-default)',
|
|
442
442
|
backgroundColor: 'var(--color-success-bg, rgba(82, 196, 26, 0.08))'
|
|
443
443
|
},
|
|
444
444
|
'&.error': {
|
|
@@ -446,7 +446,7 @@ var genStyle = function genStyle(token) {
|
|
|
446
446
|
backgroundColor: 'var(--color-error-bg, rgba(255, 77, 79, 0.08))'
|
|
447
447
|
},
|
|
448
448
|
'&.tip': {
|
|
449
|
-
borderLeftColor: 'var(--color-
|
|
449
|
+
borderLeftColor: 'var(--color-primary-control-fill-primary)',
|
|
450
450
|
backgroundColor: 'var(--color-info-bg, rgba(22, 119, 255, 0.08))'
|
|
451
451
|
}
|
|
452
452
|
}), _define_property(_obj, '[data-be="media-container"], [data-be="image-container"]', {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { HookAPI } from 'antd/es/modal/useModal';
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import { Subject } from 'rxjs';
|
|
4
2
|
export declare const nid: (size?: number | undefined) => string;
|
|
5
3
|
export declare const sizeUnit: (size: number) => string;
|
|
6
4
|
export declare const copy: <T = any>(data: T) => T;
|
|
@@ -8,12 +6,7 @@ export declare const isMod: (e: MouseEvent | KeyboardEvent | React.KeyboardEvent
|
|
|
8
6
|
export declare function base64ToArrayBuffer(base64: string): ArrayBufferLike;
|
|
9
7
|
export declare const getImageData: (filePath?: string) => string;
|
|
10
8
|
export declare function toArrayBuffer(buffer: any): ArrayBuffer;
|
|
11
|
-
export
|
|
12
|
-
type ModalEvent<K extends keyof HookAPI> = {
|
|
13
|
-
type: K;
|
|
14
|
-
params: Parameters<HookAPI[K]>[0];
|
|
15
|
-
};
|
|
16
|
-
export declare const modal$: Subject<ModalEvent<"warning" | "info" | "error" | "success" | "confirm">>;
|
|
9
|
+
export { download, modal$ } from './sideEffects';
|
|
17
10
|
export declare const encodeHtml: (str: string) => string;
|
|
18
11
|
export { isMarkdown } from './isMarkdown';
|
|
19
12
|
export declare function debounce(func: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
function _array_like_to_array(arr, len) {
|
|
2
2
|
if (len == null || len > arr.length) len = arr.length;
|
|
3
3
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4
4
|
return arr2;
|
|
@@ -22,13 +22,6 @@ function _define_property(obj, key, value) {
|
|
|
22
22
|
}
|
|
23
23
|
return obj;
|
|
24
24
|
}
|
|
25
|
-
function _instanceof(left, right) {
|
|
26
|
-
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
27
|
-
return !!right[Symbol.hasInstance](left);
|
|
28
|
-
} else {
|
|
29
|
-
return left instanceof right;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
25
|
function _iterable_to_array(iter) {
|
|
33
26
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
34
27
|
}
|
|
@@ -95,8 +88,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
95
88
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
96
89
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
97
90
|
}
|
|
98
|
-
import { customAlphabet } from "nanoid";
|
|
99
|
-
import { Subject } from "rxjs";
|
|
91
|
+
/* eslint-disable @typescript-eslint/no-this-alias */ /* eslint-disable @typescript-eslint/ban-types */ /* eslint-disable @typescript-eslint/no-unused-expressions */ /* eslint-disable no-param-reassign */ import { customAlphabet } from "nanoid";
|
|
100
92
|
export var nid = customAlphabet('1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', 13);
|
|
101
93
|
var kb = 1024;
|
|
102
94
|
var mb = kb * 1024;
|
|
@@ -136,25 +128,7 @@ export function toArrayBuffer(buffer) {
|
|
|
136
128
|
}
|
|
137
129
|
return arrayBuffer;
|
|
138
130
|
}
|
|
139
|
-
export
|
|
140
|
-
data = _instanceof(data, Uint8Array) ? new Blob([
|
|
141
|
-
data
|
|
142
|
-
]) : data;
|
|
143
|
-
var link = document.createElement('a');
|
|
144
|
-
if (link.download !== undefined) {
|
|
145
|
-
var url = URL.createObjectURL(data);
|
|
146
|
-
link.addEventListener('click', function(e) {
|
|
147
|
-
return e.stopPropagation();
|
|
148
|
-
});
|
|
149
|
-
link.setAttribute('href', url);
|
|
150
|
-
link.setAttribute('download', fileName);
|
|
151
|
-
link.style.visibility = 'hidden';
|
|
152
|
-
document.body.appendChild(link);
|
|
153
|
-
link.click();
|
|
154
|
-
document.body.removeChild(link);
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
export var modal$ = new Subject();
|
|
131
|
+
export { download, modal$ } from "./sideEffects";
|
|
158
132
|
export var encodeHtml = function encodeHtml(str) {
|
|
159
133
|
var encodeHTMLRules = {
|
|
160
134
|
'&': '&',
|
|
@@ -174,6 +174,7 @@ import remarkParse from "remark-parse";
|
|
|
174
174
|
import remarkRehype from "remark-rehype";
|
|
175
175
|
import { unified } from "unified";
|
|
176
176
|
import { visit } from "unist-util-visit";
|
|
177
|
+
import { rehypeSanitizeUserHtml } from "../../../Utils/rehypeSanitizeUserHtml";
|
|
177
178
|
import { JINJA_DOLLAR_PLACEHOLDER, preprocessNormalizeLeafToContainerDirective } from "../parser/constants";
|
|
178
179
|
import { remarkDirectiveContainer } from "../parser/remarkDirectiveContainer";
|
|
179
180
|
import remarkDirectiveContainersOnly from "../parser/remarkDirectiveContainersOnly";
|
|
@@ -412,7 +413,7 @@ var createMarkdownProcessor = function createMarkdownProcessor(plugins, config)
|
|
|
412
413
|
var processor = unified();
|
|
413
414
|
var remarkPlugins = resolveRemarkPlugins(plugins);
|
|
414
415
|
applyPlugins(processor, remarkPlugins);
|
|
415
|
-
processor.use(rehypeRaw).use(rehypeKatex);
|
|
416
|
+
processor.use(rehypeRaw).use(rehypeSanitizeUserHtml).use(rehypeKatex);
|
|
416
417
|
// 应用配置选项
|
|
417
418
|
if (config === null || config === void 0 ? void 0 : config.openLinksInNewTab) {
|
|
418
419
|
processor.use(rehypeLinkTarget());
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HookAPI } from 'antd/es/modal/useModal';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
type ModalEvent<K extends keyof HookAPI> = {
|
|
4
|
+
type: K;
|
|
5
|
+
params: Parameters<HookAPI[K]>[0];
|
|
6
|
+
};
|
|
7
|
+
export declare const modal$: Subject<ModalEvent<"warning" | "info" | "error" | "success" | "confirm">>;
|
|
8
|
+
export declare const download: (data: Blob | Uint8Array, fileName: string) => void;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
function _instanceof(left, right) {
|
|
2
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
3
|
+
return !!right[Symbol.hasInstance](left);
|
|
4
|
+
} else {
|
|
5
|
+
return left instanceof right;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
import { Subject } from "rxjs";
|
|
9
|
+
export var modal$ = new Subject();
|
|
10
|
+
export var download = function download(data, fileName) {
|
|
11
|
+
data = _instanceof(data, Uint8Array) ? new Blob([
|
|
12
|
+
data
|
|
13
|
+
]) : data;
|
|
14
|
+
var link = document.createElement('a');
|
|
15
|
+
if (link.download !== undefined) {
|
|
16
|
+
var url = URL.createObjectURL(data);
|
|
17
|
+
link.addEventListener('click', function(e) {
|
|
18
|
+
return e.stopPropagation();
|
|
19
|
+
});
|
|
20
|
+
link.setAttribute('href', url);
|
|
21
|
+
link.setAttribute('download', fileName);
|
|
22
|
+
link.style.visibility = 'hidden';
|
|
23
|
+
document.body.appendChild(link);
|
|
24
|
+
link.click();
|
|
25
|
+
document.body.removeChild(link);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
@@ -164,7 +164,7 @@ var genTableStyle = function genTableStyle(token, mobileBreakpoint, mobilePaddin
|
|
|
164
164
|
}), _define_property(_obj, 'tbody tr:not(.config-tr)', {
|
|
165
165
|
animation: 'agenticTableRowFadeIn 0.3s ease both'
|
|
166
166
|
}), _define_property(_obj, 'tbody tr:not(.config-tr):hover', {
|
|
167
|
-
background: 'linear-gradient(var(--agentic-ui-table-hover-bg, rgba(0, 0, 0, 0.04)), var(--agentic-ui-table-hover-bg, rgba(0, 0, 0, 0.04))), linear-gradient(var(--agentic-ui-table-cell-bg,
|
|
167
|
+
background: 'linear-gradient(var(--agentic-ui-table-hover-bg, rgba(0, 0, 0, 0.04)), var(--agentic-ui-table-hover-bg, rgba(0, 0, 0, 0.04))), linear-gradient(var(--agentic-ui-table-cell-bg, var(--color-gray-bg-card-white)), var(--agentic-ui-table-cell-bg, var(--color-gray-bg-card-white)))'
|
|
168
168
|
}), _define_property(_obj, "@media (max-width: ".concat(mobileBreakpoint, ")"), {
|
|
169
169
|
'th, td': {
|
|
170
170
|
padding: mobilePadding
|
|
@@ -236,20 +236,20 @@ var genTableStyle = function genTableStyle(token, mobileBreakpoint, mobilePaddin
|
|
|
236
236
|
boxShadow: 'var(--shadow-border-base)',
|
|
237
237
|
color: 'var(--color-gray-text-secondary)',
|
|
238
238
|
'&:hover': {
|
|
239
|
-
backgroundColor: '
|
|
239
|
+
backgroundColor: 'var(--color-gray-bg-card-white)',
|
|
240
240
|
boxShadow: 'var(--shadow-control-lg)'
|
|
241
241
|
}
|
|
242
242
|
}), _define_property(_obj1, "".concat(token.componentCls, "-table-cell-index-delete-icon"), {
|
|
243
243
|
'&:hover': {
|
|
244
|
-
color: '
|
|
244
|
+
color: 'var(--color-red-text-default)'
|
|
245
245
|
}
|
|
246
246
|
}), _define_property(_obj1, "".concat(token.componentCls, "-table-cell-index-insert-row-before"), {
|
|
247
247
|
'&:hover': {
|
|
248
|
-
color: '
|
|
248
|
+
color: 'var(--color-green-text-default)'
|
|
249
249
|
}
|
|
250
250
|
}), _define_property(_obj1, "".concat(token.componentCls, "-table-cell-index-insert-row-after"), {
|
|
251
251
|
'&:hover': {
|
|
252
|
-
color: '
|
|
252
|
+
color: 'var(--color-green-text-default)'
|
|
253
253
|
}
|
|
254
254
|
}), _define_property(_obj1, "".concat(token.componentCls, "-table-cell-index-spacer"), {
|
|
255
255
|
cursor: 'pointer',
|
|
@@ -288,20 +288,20 @@ var genTableStyle = function genTableStyle(token, mobileBreakpoint, mobilePaddin
|
|
|
288
288
|
boxShadow: 'var(--shadow-border-base)',
|
|
289
289
|
color: 'var(--color-gray-text-secondary)',
|
|
290
290
|
'&:hover': {
|
|
291
|
-
backgroundColor: '
|
|
291
|
+
backgroundColor: 'var(--color-gray-bg-card-white)',
|
|
292
292
|
boxShadow: 'var(--shadow-control-lg)'
|
|
293
293
|
}
|
|
294
294
|
}), _define_property(_obj1, "".concat(token.componentCls, "-table-cell-index-spacer-delete-icon"), {
|
|
295
295
|
'&:hover': {
|
|
296
|
-
color: '
|
|
296
|
+
color: 'var(--color-red-text-default)'
|
|
297
297
|
}
|
|
298
298
|
}), _define_property(_obj1, "".concat(token.componentCls, "-table-cell-index-spacer-insert-column-before"), {
|
|
299
299
|
'&:hover': {
|
|
300
|
-
color: '
|
|
300
|
+
color: 'var(--color-green-text-default)'
|
|
301
301
|
}
|
|
302
302
|
}), _define_property(_obj1, "".concat(token.componentCls, "-table-cell-index-spacer-insert-column-after"), {
|
|
303
303
|
'&:hover': {
|
|
304
|
-
color: '
|
|
304
|
+
color: 'var(--color-green-text-default)'
|
|
305
305
|
}
|
|
306
306
|
}), _define_property(_obj1, '@keyframes agenticTableRowFadeIn', {
|
|
307
307
|
from: {
|
|
@@ -452,7 +452,7 @@ var genStyle = function genStyle(token) {
|
|
|
452
452
|
alignItems: 'center'
|
|
453
453
|
}), _define_property(_obj1, "".concat(token.componentCls, "-link-card__container"), {
|
|
454
454
|
padding: 12,
|
|
455
|
-
border: '1px solid
|
|
455
|
+
border: '1px solid var(--color-gray-border-light)',
|
|
456
456
|
borderRadius: '0.5em',
|
|
457
457
|
margin: '8px 0',
|
|
458
458
|
width: '100%',
|
|
@@ -463,21 +463,21 @@ var genStyle = function genStyle(token) {
|
|
|
463
463
|
display: 'flex',
|
|
464
464
|
alignItems: 'center',
|
|
465
465
|
gap: 12,
|
|
466
|
-
color: '
|
|
466
|
+
color: 'var(--color-gray-text-default)',
|
|
467
467
|
justifyContent: 'space-between',
|
|
468
468
|
'& [data-icon-box]': {
|
|
469
469
|
padding: '0 18px',
|
|
470
|
-
color: '
|
|
470
|
+
color: 'var(--color-gray-text-light)',
|
|
471
471
|
cursor: 'pointer',
|
|
472
472
|
'&:hover': {
|
|
473
|
-
color: '
|
|
473
|
+
color: 'var(--color-primary-control-fill-primary)'
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
476
|
}), _define_property(_obj1, "".concat(token.componentCls, "-link-card__content"), {
|
|
477
477
|
display: 'flex',
|
|
478
478
|
alignItems: 'center',
|
|
479
479
|
gap: 12,
|
|
480
|
-
color: '
|
|
480
|
+
color: 'var(--color-gray-text-default)',
|
|
481
481
|
fontSize: 16,
|
|
482
482
|
flex: 1,
|
|
483
483
|
minWidth: 0
|
|
@@ -487,7 +487,7 @@ var genStyle = function genStyle(token) {
|
|
|
487
487
|
textWrap: 'nowrap',
|
|
488
488
|
textDecoration: 'none',
|
|
489
489
|
display: 'block',
|
|
490
|
-
color: '
|
|
490
|
+
color: 'var(--color-gray-text-default)'
|
|
491
491
|
}), _define_property(_obj1, "".concat(token.componentCls, "-link-card__description"), {
|
|
492
492
|
flex: 1,
|
|
493
493
|
minWidth: 0,
|
|
@@ -575,47 +575,47 @@ var genStyle = function genStyle(token) {
|
|
|
575
575
|
fontFamily: "'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",
|
|
576
576
|
wordWrap: 'break-word',
|
|
577
577
|
borderRadius: '12px',
|
|
578
|
-
background: '
|
|
578
|
+
background: 'var(--color-gray-bg-card-white)',
|
|
579
579
|
boxShadow: 'var(--shadow-control-base)',
|
|
580
580
|
// SVG 渲染优化
|
|
581
581
|
'& svg': {
|
|
582
582
|
// 节点样式
|
|
583
583
|
'& .node': {
|
|
584
584
|
'& rect, & circle, & ellipse, & polygon': {
|
|
585
|
-
stroke: '
|
|
585
|
+
stroke: 'var(--color-gray-text-default)',
|
|
586
586
|
strokeWidth: '1px',
|
|
587
|
-
fill: '
|
|
587
|
+
fill: 'var(--color-gray-bg-card-white)'
|
|
588
588
|
}
|
|
589
589
|
},
|
|
590
590
|
// 节点标签 - 更大的字体
|
|
591
591
|
'& .nodeLabel': {
|
|
592
592
|
fontWeight: 500,
|
|
593
|
-
fill: '
|
|
593
|
+
fill: 'var(--color-gray-text-default) !important'
|
|
594
594
|
},
|
|
595
595
|
// 边标签 - 稍小一些但仍然清晰
|
|
596
596
|
'& .edgeLabel': {
|
|
597
|
-
fill: '
|
|
597
|
+
fill: 'var(--color-gray-text-secondary) !important'
|
|
598
598
|
},
|
|
599
599
|
// 专门针对流程图的文字
|
|
600
600
|
'& .flowchart-label': {
|
|
601
|
-
fill: '
|
|
601
|
+
fill: 'var(--color-gray-text-default) !important'
|
|
602
602
|
},
|
|
603
603
|
// 针对不同类型的标签
|
|
604
604
|
'& .label': {
|
|
605
|
-
fill: '
|
|
605
|
+
fill: 'var(--color-gray-text-default) !important'
|
|
606
606
|
}
|
|
607
607
|
},
|
|
608
608
|
// 错误状态样式
|
|
609
609
|
'&-error': {
|
|
610
|
-
color: '
|
|
611
|
-
background: '
|
|
612
|
-
border: '1px solid
|
|
610
|
+
color: 'var(--color-red-text-default)',
|
|
611
|
+
background: 'var(--color-red-bg-page-light)',
|
|
612
|
+
border: '1px solid var(--color-red-border-default)',
|
|
613
613
|
padding: '12px',
|
|
614
614
|
borderRadius: '4px',
|
|
615
615
|
textAlign: 'left',
|
|
616
616
|
'& pre': {
|
|
617
617
|
margin: '8px 0 0',
|
|
618
|
-
background: '
|
|
618
|
+
background: 'var(--color-gray-bg-page-light)',
|
|
619
619
|
padding: '8px',
|
|
620
620
|
borderRadius: '4px',
|
|
621
621
|
fontSize: '12px'
|
|
@@ -271,7 +271,7 @@ var genStyle = function genStyle(token) {
|
|
|
271
271
|
}
|
|
272
272
|
},
|
|
273
273
|
'&-item-meta-placeholder': (_obj = {
|
|
274
|
-
background: 'var(--color-gray-bg-card-light
|
|
274
|
+
background: 'var(--color-gray-bg-card-light) !important'
|
|
275
275
|
}, _define_property(_obj, "".concat(token.componentCls, "-item-file-name-text"), {
|
|
276
276
|
color: 'var(--color-gray-text-light, rgba(80, 94, 119, 0.53)) !important'
|
|
277
277
|
}), _define_property(_obj, "".concat(token.componentCls, "-item-file-size"), {
|
|
@@ -74,9 +74,9 @@ var genStyle = function genStyle(token) {
|
|
|
74
74
|
height: '56px',
|
|
75
75
|
borderRadius: '12px',
|
|
76
76
|
opacity: 1,
|
|
77
|
-
background: '
|
|
77
|
+
background: 'var(--color-gray-bg-card-white)',
|
|
78
78
|
boxSizing: 'border-box',
|
|
79
|
-
border: '1px solid
|
|
79
|
+
border: '1px solid var(--color-gray-border-light)',
|
|
80
80
|
padding: '8px',
|
|
81
81
|
display: 'flex',
|
|
82
82
|
flexDirection: 'row',
|
|
@@ -108,7 +108,7 @@ var genStyle = function genStyle(token) {
|
|
|
108
108
|
}
|
|
109
109
|
},
|
|
110
110
|
'&-file-size': {
|
|
111
|
-
color: '
|
|
111
|
+
color: 'var(--color-gray-text-light)',
|
|
112
112
|
fontSize: '12px'
|
|
113
113
|
}
|
|
114
114
|
},
|
|
@@ -116,13 +116,13 @@ var genStyle = function genStyle(token) {
|
|
|
116
116
|
width: '16px',
|
|
117
117
|
height: '16px',
|
|
118
118
|
opacity: 1,
|
|
119
|
-
background: '
|
|
119
|
+
background: 'var(--color-gray-bg-page-dark)',
|
|
120
120
|
fontSize: 12,
|
|
121
121
|
position: 'absolute',
|
|
122
122
|
top: 2,
|
|
123
123
|
borderRadius: '50%',
|
|
124
124
|
right: 2,
|
|
125
|
-
color: '
|
|
125
|
+
color: 'var(--color-gray-bg-card-white)',
|
|
126
126
|
display: 'flex',
|
|
127
127
|
justifyContent: 'center',
|
|
128
128
|
alignItems: 'center',
|
|
@@ -104,7 +104,7 @@ var genStyle = function genStyle(token) {
|
|
|
104
104
|
boxShadow: 'var(--shadow-control-base)',
|
|
105
105
|
border: 'var(--color-gray-border-light)',
|
|
106
106
|
'&:hover': {
|
|
107
|
-
background: '
|
|
107
|
+
background: 'var(--color-gray-bg-page)',
|
|
108
108
|
transform: 'scale(1.05)'
|
|
109
109
|
},
|
|
110
110
|
'&-icon': {
|
|
@@ -184,7 +184,7 @@ var genStyle = function genStyle(token) {
|
|
|
184
184
|
'& svg': {
|
|
185
185
|
width: 48,
|
|
186
186
|
height: 48,
|
|
187
|
-
color: '
|
|
187
|
+
color: 'var(--color-gray-bg-card-white)'
|
|
188
188
|
}
|
|
189
189
|
}), _define_property(_obj1, '&-image-list-view', {
|
|
190
190
|
background: 'var(--color-gray-bg-tip)',
|
|
@@ -120,7 +120,7 @@ var genStyle = function genStyle(token) {
|
|
|
120
120
|
alignItems: 'center',
|
|
121
121
|
justifyContent: 'center',
|
|
122
122
|
padding: INPUT_FIELD_PADDING.NONE,
|
|
123
|
-
background: 'var(--color-gray-bg-card-white
|
|
123
|
+
background: 'var(--color-gray-bg-card-white)',
|
|
124
124
|
borderRadius: '12px',
|
|
125
125
|
minHeight: '48px',
|
|
126
126
|
maxWidth: 980,
|
|
@@ -159,7 +159,7 @@ var genStyle = function genStyle(token) {
|
|
|
159
159
|
boxSizing: 'border-box'
|
|
160
160
|
},
|
|
161
161
|
'&-content-wrapper': {
|
|
162
|
-
backgroundColor: 'var(--color-gray-bg-card-white
|
|
162
|
+
backgroundColor: 'var(--color-gray-bg-card-white)',
|
|
163
163
|
display: 'flex',
|
|
164
164
|
flexDirection: 'column',
|
|
165
165
|
width: '100%',
|
|
@@ -169,14 +169,14 @@ var genStyle = function genStyle(token) {
|
|
|
169
169
|
'&-editor': {
|
|
170
170
|
boxSizing: 'border-box',
|
|
171
171
|
borderRadius: 'inherit',
|
|
172
|
-
backgroundColor: 'var(--color-gray-bg-card-white
|
|
172
|
+
backgroundColor: 'var(--color-gray-bg-card-white)',
|
|
173
173
|
width: '100%',
|
|
174
174
|
zIndex: 9,
|
|
175
175
|
maxHeight: 400,
|
|
176
176
|
height: '100%',
|
|
177
177
|
overflowY: 'visible',
|
|
178
178
|
cursor: 'text',
|
|
179
|
-
scrollbarColor: 'var(--color-gray-text-
|
|
179
|
+
scrollbarColor: 'var(--color-gray-text-secondary) transparent',
|
|
180
180
|
scrollbarWidth: 'thin',
|
|
181
181
|
'&&-disabled': {
|
|
182
182
|
backgroundColor: 'rgba(0,0,0,0.04)',
|
|
@@ -193,7 +193,7 @@ var genStyle = function genStyle(token) {
|
|
|
193
193
|
minHeight: "".concat(DEFAULT_INPUT_CODE_BLOCK_HEIGHT, "px !important")
|
|
194
194
|
},
|
|
195
195
|
'& [data-be="code"]': {
|
|
196
|
-
background: 'var(--color-gray-bg-card-light
|
|
196
|
+
background: 'var(--color-gray-bg-card-light) !important',
|
|
197
197
|
color: 'var(--color-gray-text-default, rgba(20, 22, 28, 0.88)) !important'
|
|
198
198
|
},
|
|
199
199
|
'&-editor-content': _define_property({
|
|
@@ -257,7 +257,7 @@ var genStyle = function genStyle(token) {
|
|
|
257
257
|
// 使用 minHeight,避免在 border-box 下固定 height 与 paddingBottom
|
|
258
258
|
// 争用导致内容区 < 32px、Toggle 工具与发送区纵向错位
|
|
259
259
|
minHeight: '32px',
|
|
260
|
-
backgroundColor: 'var(--color-gray-bg-card-white
|
|
260
|
+
backgroundColor: 'var(--color-gray-bg-card-white)',
|
|
261
261
|
display: 'flex',
|
|
262
262
|
boxSizing: 'border-box',
|
|
263
263
|
borderRadius: 0,
|
|
@@ -449,4 +449,14 @@ export type MarkdownInputFieldProps = {
|
|
|
449
449
|
* ```
|
|
450
450
|
*/
|
|
451
451
|
disableHoverAnimation?: boolean;
|
|
452
|
+
/**
|
|
453
|
+
* 主题模式
|
|
454
|
+
* @description 控制组件的明暗主题样式
|
|
455
|
+
* @default 'light'
|
|
456
|
+
* @example
|
|
457
|
+
* ```tsx
|
|
458
|
+
* <MarkdownInputField theme="dark" />
|
|
459
|
+
* ```
|
|
460
|
+
*/
|
|
461
|
+
theme?: 'light' | 'dark';
|
|
452
462
|
};
|