@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.
- package/dist/Bubble/type.d.ts +1 -1
- package/dist/Bubble/types/BubbleExtra.d.ts +1 -1
- package/dist/Hooks/useLanguage.d.ts +1 -0
- package/dist/I18n/locales.d.ts +1 -0
- package/dist/I18n/locales.js +2 -0
- package/dist/MarkdownInputField/AttachmentButton/index.js +4 -5
- package/dist/Plugins/chart/BarChart/index.js +6 -0
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/Bubble/type.d.ts
CHANGED
|
@@ -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 {
|
|
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;
|
package/dist/I18n/locales.d.ts
CHANGED
package/dist/I18n/locales.js
CHANGED
|
@@ -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
|
-
|
|
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:
|
|
216
|
+
children: buttonWithStyle,
|
|
218
217
|
supportedFormat: format
|
|
219
|
-
}) : /* @__PURE__ */ React.createElement(AttachmentButtonPopover, { supportedFormat: format },
|
|
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,
|
|
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';
|