@ant-design/agentic-ui 2.0.25 → 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;
@@ -126,6 +126,7 @@ export declare function useLanguage(): {
126
126
  'think.deepThinking': string;
127
127
  'think.deepThinkingInProgress': string;
128
128
  switchLanguage: string;
129
+ welcome: string;
129
130
  insertLink: string;
130
131
  clearFormatting: string;
131
132
  undo: string;
@@ -90,6 +90,7 @@ export declare const cnLabels: {
90
90
  'think.deepThinking': string;
91
91
  'think.deepThinkingInProgress': string;
92
92
  switchLanguage: string;
93
+ welcome: string;
93
94
  insertLink: string;
94
95
  clearFormatting: string;
95
96
  undo: string;
@@ -84,6 +84,7 @@ var cnLabels = {
84
84
  "think.deepThinking": "深度思考",
85
85
  "think.deepThinkingInProgress": "深度思考...",
86
86
  switchLanguage: "切换语言",
87
+ welcome: "欢迎使用多语言支持",
87
88
  insertLink: "插入链接",
88
89
  clearFormatting: "清除格式",
89
90
  undo: "撤销",
@@ -354,6 +355,7 @@ var enLabels = {
354
355
  undo: "Undo",
355
356
  redo: "Redo",
356
357
  switchLanguage: "Switch Language",
358
+ welcome: "Welcome to Multilingual Support",
357
359
  insertLink: "Insert Link",
358
360
  attachmentSupportedFormats: "Supported file types and formats:",
359
361
  clearFormatting: "Clear Formatting",
@@ -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",
@@ -237,6 +237,9 @@ var BarChart = ({
237
237
  const neg = color[1] || color[0] || baseColor;
238
238
  base2 = value2 >= 0 ? pos : neg;
239
239
  }
240
+ if (value2 === 0) {
241
+ return hexToRgba(base2, 0.75);
242
+ }
240
243
  const x0 = xScale.getPixelForValue(0);
241
244
  const x1 = xScale.getPixelForValue(value2);
242
245
  if (!Number.isFinite(x0) || !Number.isFinite(x1)) {
@@ -256,6 +259,9 @@ var BarChart = ({
256
259
  const neg = color[1] || color[0] || baseColor;
257
260
  base = value >= 0 ? pos : neg;
258
261
  }
262
+ if (value === 0) {
263
+ return hexToRgba(base, 0.75);
264
+ }
259
265
  const y0 = yScale.getPixelForValue(0);
260
266
  const y1 = yScale.getPixelForValue(value);
261
267
  if (!Number.isFinite(y0) || !Number.isFinite(y1)) {
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.25",
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",