@ant-design/agentic-ui 2.14.1 → 2.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/Bubble/BubbleBeforeNode.js +9 -9
  2. package/dist/Bubble/List/PureBubbleList.js +1 -1
  3. package/dist/Bubble/MessagesContent/EXCEPTION.js +1 -1
  4. package/dist/ChatLayout/style.js +16 -17
  5. package/dist/Constants/mobile.d.ts +3 -0
  6. package/dist/Constants/mobile.js +7 -0
  7. package/dist/Hooks/useLanguage.d.ts +2 -0
  8. package/dist/I18n/locales.d.ts +2 -0
  9. package/dist/I18n/locales.js +4 -0
  10. package/dist/MarkdownEditor/BaseMarkdownEditor.js +1 -1
  11. package/dist/MarkdownEditor/editor/Editor.js +16 -8
  12. package/dist/MarkdownEditor/editor/code.css +2 -2
  13. package/dist/MarkdownEditor/editor/elements/FootnoteDefinition.js +2 -1
  14. package/dist/MarkdownEditor/editor/elements/FootnoteReference.js +2 -1
  15. package/dist/MarkdownEditor/editor/elements/Head.d.ts +1 -0
  16. package/dist/MarkdownEditor/editor/elements/Head.js +1 -1
  17. package/dist/MarkdownEditor/editor/elements/Image/index.js +19 -7
  18. package/dist/MarkdownEditor/editor/elements/LinkCard/index.js +2 -1
  19. package/dist/MarkdownEditor/editor/elements/LinkCard/style.js +1 -1
  20. package/dist/MarkdownEditor/editor/elements/List/ListItem.js +1 -0
  21. package/dist/MarkdownEditor/editor/elements/List/style.js +2 -2
  22. package/dist/MarkdownEditor/editor/elements/Media.js +22 -10
  23. package/dist/MarkdownEditor/editor/elements/Paragraph.js +2 -1
  24. package/dist/MarkdownEditor/editor/elements/Schema.js +1 -1
  25. package/dist/MarkdownEditor/editor/elements/Table/ReadonlyTableComponent.js +1 -1
  26. package/dist/MarkdownEditor/editor/elements/Table/Table.js +25 -16
  27. package/dist/MarkdownEditor/editor/elements/Table/Td/style.js +5 -2
  28. package/dist/MarkdownEditor/editor/elements/Table/index.js +0 -2
  29. package/dist/MarkdownEditor/editor/elements/Table/style.js +7 -8
  30. package/dist/MarkdownEditor/editor/elements/TagPopup/index.js +5 -3
  31. package/dist/MarkdownEditor/editor/elements/TagPopup/style.js +2 -2
  32. package/dist/MarkdownEditor/editor/plugins/useKeyboard.js +8 -19
  33. package/dist/MarkdownEditor/editor/store.js +3 -3
  34. package/dist/MarkdownEditor/editor/style.js +41 -6
  35. package/dist/MarkdownEditor/editor/tools/DragHandle.js +3 -3
  36. package/dist/MarkdownEditor/style.js +8 -2
  37. package/dist/MarkdownEditor/types.d.ts +1 -1
  38. package/dist/MarkdownEditor/utils/exportHtml.js +1 -1
  39. package/dist/MarkdownInputField/MarkdownInputField.d.ts +7 -7
  40. package/dist/MarkdownInputField/MarkdownInputField.js +11 -35
  41. package/dist/MarkdownInputField/SendButton/index.js +17 -3
  42. package/dist/MarkdownInputField/style.js +23 -2
  43. package/dist/Plugins/chart/components/ChartContainer/ChartErrorBoundaryExample.js +1 -1
  44. package/dist/Plugins/chart/index.js +2 -2
  45. package/dist/Plugins/code/components/CodeContainer.js +2 -3
  46. package/dist/Plugins/katex/InlineKatex.js +1 -1
  47. package/dist/Plugins/katex/Katex.js +1 -1
  48. package/dist/Plugins/mermaid/index.js +1 -1
  49. package/dist/ThoughtChainList/index.js +21 -2
  50. package/dist/ThoughtChainList/style.js +1 -0
  51. package/dist/Utils/loadCSS.js +6 -6
  52. package/dist/WelcomeMessage/index.js +21 -2
  53. package/dist/Workspace/Task/index.js +1 -1
  54. package/package.json +2 -2
@@ -41,8 +41,7 @@ export function CodeContainer(param) {
41
41
  height: hide ? 0 : 'auto',
42
42
  opacity: hide ? 0 : 1
43
43
  },
44
- className: classNames('ace-container', 'code-editor-container', 'drag-el', {
45
- frontmatter: safeElement.frontmatter
46
- })
44
+ "data-frontmatter": safeElement.frontmatter ? '' : undefined,
45
+ className: classNames('ace-container', 'code-editor-container', 'drag-el')
47
46
  }, children));
48
47
  }
@@ -221,7 +221,7 @@ function _ts_generator(thisArg, body) {
221
221
  }
222
222
  }
223
223
  import classNames from "classnames";
224
- import React, { useEffect, useRef, useState, startTransition } from "react";
224
+ import React, { startTransition, useEffect, useRef, useState } from "react";
225
225
  import { Editor, Node, Transforms } from "slate";
226
226
  import { useEditorStore } from "../../MarkdownEditor/editor/store";
227
227
  import { useSelStatus } from "../../MarkdownEditor/hooks/editor";
@@ -169,7 +169,7 @@ function _ts_generator(thisArg, body) {
169
169
  }
170
170
  }
171
171
  import classNames from "classnames";
172
- import React, { useEffect, useRef, useState, startTransition } from "react";
172
+ import React, { startTransition, useEffect, useRef, useState } from "react";
173
173
  import { useGetSetState } from "react-use";
174
174
  import { loadKatex } from "./loadKatex";
175
175
  /**
@@ -253,7 +253,7 @@ import { Mermaid } from "./Mermaid";
253
253
  } catch (error) {}
254
254
  }
255
255
  }, /*#__PURE__*/ React.createElement(Copy, null)))), /*#__PURE__*/ React.createElement("div", {
256
- className: 'ant-agentic-md-editor-hidden'
256
+ "data-hidden": true
257
257
  }, props.children)), /*#__PURE__*/ React.createElement(Mermaid, {
258
258
  element: props.element
259
259
  }));
@@ -19,6 +19,20 @@ function _define_property(obj, key, value) {
19
19
  }
20
20
  return obj;
21
21
  }
22
+ function _extends() {
23
+ _extends = Object.assign || function(target) {
24
+ for(var i = 1; i < arguments.length; i++){
25
+ var source = arguments[i];
26
+ for(var key in source){
27
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
28
+ target[key] = source[key];
29
+ }
30
+ }
31
+ }
32
+ return target;
33
+ };
34
+ return _extends.apply(this, arguments);
35
+ }
22
36
  function _iterable_to_array_limit(arr, i) {
23
37
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
24
38
  if (_i == null) return;
@@ -46,6 +60,10 @@ function _iterable_to_array_limit(arr, i) {
46
60
  function _non_iterable_rest() {
47
61
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
48
62
  }
63
+ function _object_destructuring_empty(o) {
64
+ if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
65
+ return o;
66
+ }
49
67
  function _object_spread(target) {
50
68
  for(var i = 1; i < arguments.length; i++){
51
69
  var source = arguments[i] != null ? arguments[i] : {};
@@ -375,11 +393,12 @@ var ThoughtChainContent = /*#__PURE__*/ React.memo(function(_param) {
375
393
  var _thoughtChainList_at, _thoughtChainList_at1;
376
394
  var locale = useContext(I18nContext).locale;
377
395
  var thoughtChainList = props.thoughtChainList, loading = props.loading, _props_bubble = props.//@ts-ignore
378
- bubble, bubble = _props_bubble === void 0 ? props.chatItem : _props_bubble, style = props.style, compact = props.compact, markdownRenderProps = props.markdownRenderProps, _props_finishAutoCollapse = props.finishAutoCollapse, finishAutoCollapse = _props_finishAutoCollapse === void 0 ? true : _props_finishAutoCollapse, onDocMetaClick = props.onDocMetaClick;
396
+ bubble, bubble = _props_bubble === void 0 ? props.chatItem : _props_bubble, customStyle = props.style, compact = props.compact, markdownRenderProps = props.markdownRenderProps, _props_finishAutoCollapse = props.finishAutoCollapse, finishAutoCollapse = _props_finishAutoCollapse === void 0 ? true : _props_finishAutoCollapse, onDocMetaClick = props.onDocMetaClick;
379
397
  var context = useContext(ConfigProvider.ConfigContext);
380
398
  var _React_useState = _sliced_to_array(React.useState(false), 2), collapse = _React_useState[0], setCollapse = _React_useState[1];
381
399
  var prefixCls = context === null || context === void 0 ? void 0 : context.getPrefixCls('thought-chain-list');
382
400
  var _useStyle = useStyle(prefixCls), wrapSSR = _useStyle.wrapSSR, hashId = _useStyle.hashId;
401
+ var restStyle = _extends({}, _object_destructuring_empty(customStyle || {}));
383
402
  var _React_useState1 = _sliced_to_array(React.useState(null), 2), docMeta = _React_useState1[0], setDocMeta = _React_useState1[1];
384
403
  // 为组件实例生成唯一ID,避免多个实例间的key冲突
385
404
  var instanceId = 'ThoughtChainList';
@@ -458,7 +477,7 @@ var ThoughtChainContent = /*#__PURE__*/ React.memo(function(_param) {
458
477
  locale: locale
459
478
  }), /*#__PURE__*/ React.createElement("div", {
460
479
  className: classNames("".concat(prefixCls), hashId),
461
- style: style
480
+ style: restStyle
462
481
  }, /*#__PURE__*/ React.createElement(motion.div, {
463
482
  transition: {
464
483
  duration: 0.3
@@ -53,6 +53,7 @@ function _object_spread_props(target, source) {
53
53
  import { resetComponent, useEditorStyleRegister } from "../Hooks/useStyle";
54
54
  var genStyle = function(token) {
55
55
  return _define_property({}, token.componentCls, {
56
+ padding: '12px',
56
57
  '*': {
57
58
  boxSizing: 'border-box'
58
59
  },
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @fileoverview CSS 异步加载工具
3
- *
3
+ *
4
4
  * 提供动态加载 CSS 文件的功能,支持按需加载和缓存
5
5
  */ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
6
6
  try {
@@ -129,18 +129,18 @@ function _ts_generator(thisArg, body) {
129
129
  var loadedCSS = new Set();
130
130
  /**
131
131
  * 异步加载 CSS 文件
132
- *
132
+ *
133
133
  * 对于 webpack 处理的 CSS 文件,应该使用动态 import 函数形式
134
134
  * webpack 会自动处理 CSS 的提取和加载
135
- *
135
+ *
136
136
  * @param cssPath - CSS 文件路径(推荐使用函数形式的动态 import)
137
137
  * @returns Promise<void> 加载完成的 Promise
138
- *
138
+ *
139
139
  * @example
140
140
  * ```typescript
141
141
  * // 推荐:使用动态 import 加载 CSS 模块(webpack 会自动处理)
142
142
  * await loadCSS(() => import('./katex.min.css'));
143
- *
143
+ *
144
144
  * // 不推荐:直接使用字符串路径(仅适用于外部 URL)
145
145
  * await loadCSS('https://example.com/style.css');
146
146
  * ```
@@ -247,7 +247,7 @@ var loadedCSS = new Set();
247
247
  /**
248
248
  * 预加载 CSS 文件
249
249
  * 使用低优先级加载,不阻塞当前执行
250
- *
250
+ *
251
251
  * @param cssPath - CSS 文件路径
252
252
  */ export var preloadCSS = function(cssPath) {
253
253
  if (typeof window === 'undefined') {
@@ -11,6 +11,24 @@ function _define_property(obj, key, value) {
11
11
  }
12
12
  return obj;
13
13
  }
14
+ function _extends() {
15
+ _extends = Object.assign || function(target) {
16
+ for(var i = 1; i < arguments.length; i++){
17
+ var source = arguments[i];
18
+ for(var key in source){
19
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
20
+ target[key] = source[key];
21
+ }
22
+ }
23
+ }
24
+ return target;
25
+ };
26
+ return _extends.apply(this, arguments);
27
+ }
28
+ function _object_destructuring_empty(o) {
29
+ if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
30
+ return o;
31
+ }
14
32
  function _object_spread(target) {
15
33
  for(var i = 1; i < arguments.length; i++){
16
34
  var source = arguments[i] != null ? arguments[i] : {};
@@ -96,13 +114,14 @@ import { useStyle } from "./style";
96
114
  * - 集成 Ant Design 主题系统
97
115
  * - 响应式布局适配
98
116
  */ export var WelcomeMessage = function(param) {
99
- var title = param.title, description = param.description, classNames = param.classNames, titleAnimateProps = param.titleAnimateProps, descriptionAnimateProps = param.descriptionAnimateProps, style = param.style, rootClassName = param.rootClassName;
117
+ var title = param.title, description = param.description, classNames = param.classNames, titleAnimateProps = param.titleAnimateProps, descriptionAnimateProps = param.descriptionAnimateProps, customStyle = param.style, rootClassName = param.rootClassName;
100
118
  var getPrefixCls = useContext(ConfigProvider.ConfigContext).getPrefixCls;
101
119
  var prefixCls = getPrefixCls('agentic-welcome');
102
120
  var _useStyle = useStyle(prefixCls), wrapSSR = _useStyle.wrapSSR, hashId = _useStyle.hashId;
121
+ var restStyle = _extends({}, _object_destructuring_empty(customStyle || {}));
103
122
  return wrapSSR(/*#__PURE__*/ React.createElement("div", {
104
123
  className: classnames(prefixCls, hashId, rootClassName),
105
- style: style
124
+ style: restStyle
106
125
  }, title && /*#__PURE__*/ React.createElement(TypingAnimation, _object_spread_props(_object_spread({
107
126
  as: "div"
108
127
  }, titleAnimateProps), {
@@ -1,8 +1,8 @@
1
- import { Loading } from "../../Components/Loading";
2
1
  import { Check, CircleDashed, OctagonX } from "@sofa-design/icons";
3
2
  import { ConfigProvider } from "antd";
4
3
  import classNames from "classnames";
5
4
  import React, { useContext } from "react";
5
+ import { Loading } from "../../Components/Loading";
6
6
  import { useTaskStyle } from "./style";
7
7
  var StatusIcon = function(param) {
8
8
  var status = param.status;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ant-design/agentic-ui",
3
- "version": "2.14.1",
3
+ "version": "2.16.0",
4
4
  "description": "面向智能体的 UI 组件库,提供多步推理可视化、工具调用展示、任务执行协同等 Agentic UI 能力",
5
5
  "repository": "git@github.com:ant-design/agentic-ui.git",
6
6
  "license": "MIT",
@@ -165,4 +165,4 @@
165
165
  "authors": [
166
166
  "qixian.cs@outlook.com"
167
167
  ]
168
- }
168
+ }