@ant-design/agentic-ui 2.0.26 → 2.0.27

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.
@@ -2,10 +2,10 @@ import { TooltipProps } from 'antd';
2
2
  import { ReactNode } from 'react';
3
3
  import { MarkdownEditorProps } from '../MarkdownEditor/types';
4
4
  import { AttachmentFile } from '../MarkdownInputField/AttachmentButton/types';
5
+ import { BaseStyleProps, BubbleMetaData, MessageBubbleData, MultiClassNameProps, MultiStyleProps, WithFalse } from '../Types';
5
6
  import type { UseSpeechAdapter } from './MessagesContent/VoiceButton';
6
7
  import { BubbleExtraProps } from './types/BubbleExtra';
7
8
  import { DocInfoListProps } from './types/DocInfo';
8
- import { BaseStyleProps, WithFalse, MessageBubbleData, BubbleMetaData, MultiStyleProps, MultiClassNameProps } from '../Types';
9
9
  /**
10
10
  * 基础样式属性
11
11
  * @deprecated 请使用 BaseStyleProps from '../Types'
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { WithFalse, MessageBubbleData } from '../../Types';
2
+ import { MessageBubbleData, WithFalse } from '../../Types';
3
3
  export interface SimpleBubbleProps<T = Record<string, any>> {
4
4
  originData?: T & MessageBubbleData;
5
5
  [key: string]: any;
@@ -199,9 +199,7 @@ var BUTTON_TITLE_STYLE = {
199
199
  color: "var(--color-gray-text-default)"
200
200
  };
201
201
  var ButtonContent = ({ title }) => {
202
- if (!title)
203
- return /* @__PURE__ */ React.createElement(Paperclip, null);
204
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Paperclip, null), /* @__PURE__ */ React.createElement("div", { style: BUTTON_TITLE_STYLE }, title));
202
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Paperclip, null), title !== null && /* @__PURE__ */ React.createElement("div", { style: BUTTON_TITLE_STYLE }, title));
205
203
  };
206
204
  var AttachmentButton = ({ disabled, uploadImage, title, supportedFormat, render }) => {
207
205
  const context = useContext(ConfigProvider.ConfigContext);
@@ -213,10 +211,11 @@ var AttachmentButton = ({ disabled, uploadImage, title, supportedFormat, render
213
211
  return;
214
212
  uploadImage == null ? void 0 : uploadImage();
215
213
  };
214
+ const buttonWithStyle = /* @__PURE__ */ React.createElement("div", { style: BUTTON_WITH_TITLE_STYLE }, /* @__PURE__ */ React.createElement(ButtonContent, { title }));
216
215
  const wrapper = render ? render({
217
- children: /* @__PURE__ */ React.createElement("div", { style: BUTTON_WITH_TITLE_STYLE }, /* @__PURE__ */ React.createElement(ButtonContent, { title })),
216
+ children: buttonWithStyle,
218
217
  supportedFormat: format
219
- }) : /* @__PURE__ */ React.createElement(AttachmentButtonPopover, { supportedFormat: format }, /* @__PURE__ */ React.createElement("div", { style: BUTTON_WITH_TITLE_STYLE }, /* @__PURE__ */ React.createElement(ButtonContent, { title })));
218
+ }) : /* @__PURE__ */ React.createElement(AttachmentButtonPopover, { supportedFormat: format }, buttonWithStyle);
220
219
  return wrapSSR(
221
220
  /* @__PURE__ */ React.createElement(
222
221
  "div",
package/dist/index.d.ts CHANGED
@@ -57,7 +57,7 @@ export { default as Quote } from './Quote';
57
57
  export * from './Plugins/chart';
58
58
  export * from './Plugins/mermaid';
59
59
  export * from './MarkdownEditor/types';
60
- export type { BubbleClassNames, BubbleItemStyleProps, BubbleRenderConfig, BubbleStyles, BubbleStyleProps, CustomConfig, WithFalse, } from './Bubble/type';
60
+ export type { BubbleClassNames, BubbleItemStyleProps, BubbleRenderConfig, BubbleStyleProps, BubbleStyles, CustomConfig, WithFalse, } from './Bubble/type';
61
61
  export type { CustomConfig as BubbleCustomConfig } from './Bubble/type';
62
62
  export * from './Bubble/types/DocInfo';
63
63
  export * from './ThoughtChainList/types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ant-design/agentic-ui",
3
- "version": "2.0.26",
3
+ "version": "2.0.27",
4
4
  "description": "面向智能体的 UI 组件库,提供多步推理可视化、工具调用展示、任务执行协同等 Agentic UI 能力",
5
5
  "repository": "git@github.com:ant-design/agentic-ui.git",
6
6
  "license": "MIT",