@ant-design/agentic-ui 2.30.0 → 2.30.2
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/List/index.d.ts +4 -0
- package/dist/Bubble/List/index.js +8 -5
- package/dist/Bubble/MessagesContent/EXCEPTION.js +11 -2
- package/dist/Bubble/MessagesContent/MarkdownPreview.js +13 -7
- package/dist/Bubble/MessagesContent/index.js +39 -10
- package/dist/Bubble/MessagesContent/style.js +55 -22
- package/dist/Bubble/type.d.ts +4 -0
- package/dist/I18n/locales.js +2 -2
- package/dist/MarkdownEditor/BaseMarkdownEditor.js +37 -5
- package/dist/MarkdownEditor/editor/elements/AgenticUiBlocks/AgenticUiTaskBlock.d.ts +4 -0
- package/dist/MarkdownEditor/editor/elements/AgenticUiBlocks/AgenticUiTaskBlock.js +74 -0
- package/dist/MarkdownEditor/editor/elements/AgenticUiBlocks/AgenticUiToolUseBarBlock.d.ts +4 -0
- package/dist/MarkdownEditor/editor/elements/AgenticUiBlocks/AgenticUiToolUseBarBlock.js +114 -0
- package/dist/MarkdownEditor/editor/elements/AgenticUiBlocks/agenticUiEmbedUtils.d.ts +20 -0
- package/dist/MarkdownEditor/editor/elements/AgenticUiBlocks/agenticUiEmbedUtils.js +169 -0
- package/dist/MarkdownEditor/editor/elements/Table/EditableTable.d.ts +11 -0
- package/dist/MarkdownEditor/editor/elements/Table/EditableTable.js +207 -0
- package/dist/MarkdownEditor/editor/elements/Table/Table.js +10 -276
- package/dist/MarkdownEditor/editor/elements/Table/TableCellIndex/index.js +7 -227
- package/dist/MarkdownEditor/editor/elements/Table/TableCellIndexSpacer/index.js +20 -229
- package/dist/MarkdownEditor/editor/elements/Table/commands/tableCommands.d.ts +9 -0
- package/dist/MarkdownEditor/editor/elements/Table/commands/tableCommands.js +242 -0
- package/dist/MarkdownEditor/editor/elements/Table/utils/editableTableWidth.d.ts +20 -0
- package/dist/MarkdownEditor/editor/elements/Table/utils/editableTableWidth.js +60 -0
- package/dist/MarkdownEditor/editor/elements/Table/utils/useEditableTableColWidths.d.ts +6 -0
- package/dist/MarkdownEditor/editor/elements/Table/utils/useEditableTableColWidths.js +20 -0
- package/dist/MarkdownEditor/editor/elements/Table/utils/useEditableTableContentWidth.d.ts +10 -0
- package/dist/MarkdownEditor/editor/elements/Table/utils/useEditableTableContentWidth.js +103 -0
- package/dist/MarkdownEditor/editor/elements/index.js +7 -0
- package/dist/MarkdownEditor/editor/parser/constants.d.ts +2 -1
- package/dist/MarkdownEditor/editor/parser/constants.js +86 -8
- package/dist/MarkdownEditor/editor/parser/parse/parseCode.js +33 -2
- package/dist/MarkdownEditor/editor/parser/parserSlateNodeToMarkdown.js +3 -0
- package/dist/MarkdownEditor/editor/plugins/handlePaste.js +4 -1
- package/dist/MarkdownEditor/editor/store.d.ts +1 -2
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/ToolBarItem.js +6 -4
- package/dist/MarkdownEditor/style.js +109 -7
- package/dist/MarkdownEditor/types.d.ts +5 -0
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileIcon.js +2 -2
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileListItem.js +11 -8
- package/dist/MarkdownInputField/AttachmentButton/index.js +7 -2
- package/dist/MarkdownInputField/AttachmentButton/types.d.ts +5 -1
- package/dist/MarkdownInputField/AttachmentButton/utils.d.ts +7 -0
- package/dist/MarkdownInputField/AttachmentButton/utils.js +9 -1
- package/dist/MarkdownInputField/FileMapView/FileMapViewItem.js +10 -5
- package/dist/MarkdownInputField/FileUploadManager/index.d.ts +9 -0
- package/dist/MarkdownInputField/FileUploadManager/index.js +20 -4
- package/dist/MarkdownInputField/MarkdownInputField.js +5 -3
- package/dist/MarkdownInputField/SendActions/index.d.ts +9 -0
- package/dist/MarkdownInputField/SendActions/index.js +3 -2
- package/dist/MarkdownInputField/utils/renderHelpers.d.ts +8 -1
- package/dist/MarkdownInputField/utils/renderHelpers.js +5 -1
- package/dist/MarkdownRenderer/AnimationText.d.ts +4 -7
- package/dist/MarkdownRenderer/AnimationText.js +117 -15
- package/dist/MarkdownRenderer/MarkdownRenderer.js +15 -1
- package/dist/MarkdownRenderer/index.d.ts +2 -2
- package/dist/MarkdownRenderer/index.js +1 -1
- package/dist/MarkdownRenderer/renderers/AgenticUiTaskBlockRenderer.d.ts +6 -0
- package/dist/MarkdownRenderer/renderers/AgenticUiTaskBlockRenderer.js +66 -0
- package/dist/MarkdownRenderer/renderers/AgenticUiToolUseBarBlockRenderer.d.ts +6 -0
- package/dist/MarkdownRenderer/renderers/AgenticUiToolUseBarBlockRenderer.js +134 -0
- package/dist/MarkdownRenderer/renderers/ChartRenderer.js +13 -4
- package/dist/MarkdownRenderer/style.js +7 -6
- package/dist/MarkdownRenderer/useMarkdownToReact.js +37 -18
- package/dist/MarkdownRenderer/useStreaming.js +8 -1
- package/dist/Plugins/chart/BarChart/index.js +5 -5
- package/dist/Plugins/chart/ChartRender.js +1 -0
- package/dist/Plugins/chart/index.js +3 -1
- package/dist/Plugins/chart/utils.d.ts +14 -0
- package/dist/Plugins/chart/utils.js +49 -2
- package/dist/Schema/SchemaEditor/index.js +12 -5
- package/package.json +6 -5
|
@@ -166,7 +166,7 @@ var DEFAULT_MESSAGES = {
|
|
|
166
166
|
return "至少需要上传 ".concat(count, " 个文件");
|
|
167
167
|
},
|
|
168
168
|
fileSizeExceeded: function fileSizeExceeded(size) {
|
|
169
|
-
return "
|
|
169
|
+
return "超过 ".concat(size, " KB");
|
|
170
170
|
}
|
|
171
171
|
};
|
|
172
172
|
var waitTime = function waitTime(ms) {
|
|
@@ -271,11 +271,12 @@ var handleUploadSuccess = function handleUploadSuccess(file, url, map, props) {
|
|
|
271
271
|
};
|
|
272
272
|
var handleUploadError = function handleUploadError(file, errorMsg, map, props) {
|
|
273
273
|
file.status = 'error';
|
|
274
|
+
if (errorMsg !== null) file.errorMessage = errorMsg;
|
|
274
275
|
updateFileMap(map, file, props.onFileMapChange);
|
|
275
276
|
};
|
|
276
277
|
var processFile = function processFile(file, index, map, props) {
|
|
277
278
|
return _async_to_generator(function() {
|
|
278
|
-
var _ref, url, isSuccess, errorMsg, error, errorMessage;
|
|
279
|
+
var maxSizeKb, raw, _ref, url, isSuccess, errorMsg, error, errorMessage;
|
|
279
280
|
return _ts_generator(this, function(_state) {
|
|
280
281
|
switch(_state.label){
|
|
281
282
|
case 0:
|
|
@@ -286,6 +287,10 @@ var processFile = function processFile(file, index, map, props) {
|
|
|
286
287
|
case 1:
|
|
287
288
|
_state.sent();
|
|
288
289
|
if (!validateFileSize(file, props)) {
|
|
290
|
+
maxSizeKb = Math.round((props.maxFileSize || 0) / 1024);
|
|
291
|
+
raw = getLocaleMessage(props.locale, 'markdownInput.fileSizeExceeded', DEFAULT_MESSAGES.fileSizeExceeded(maxSizeKb));
|
|
292
|
+
file.errorMessage = raw.includes('${maxSize}') ? raw.replace(/\$\{maxSize\}/g, String(maxSizeKb)) : raw;
|
|
293
|
+
file.errorCode = 'FILE_SIZE_EXCEEDED';
|
|
289
294
|
file.status = 'error';
|
|
290
295
|
updateFileMap(map, file, props.onFileMapChange);
|
|
291
296
|
return [
|
|
@@ -13,10 +13,14 @@ export type UploadResponse = {
|
|
|
13
13
|
};
|
|
14
14
|
export type AttachmentFile = File & {
|
|
15
15
|
url?: string;
|
|
16
|
-
status?: 'error' | 'uploading' | 'done';
|
|
16
|
+
status?: 'error' | 'uploading' | 'pending' | 'done';
|
|
17
17
|
uuid?: string;
|
|
18
18
|
size?: number | null;
|
|
19
19
|
previewUrl?: string;
|
|
20
|
+
/** 错误信息(如文件超限、上传失败等),在 status 为 error 时展示 */
|
|
21
|
+
errorMessage?: string | null;
|
|
22
|
+
/** 错误类型,如 FILE_SIZE_EXCEEDED 表示因大小超限不可重试 */
|
|
23
|
+
errorCode?: string | null;
|
|
20
24
|
/** 上传响应数据(使用 uploadWithResponse 时会填充此字段) */
|
|
21
25
|
uploadResponse?: UploadResponse;
|
|
22
26
|
};
|
|
@@ -40,6 +40,13 @@ export declare const isMediaFile: (file: File) => boolean;
|
|
|
40
40
|
/**
|
|
41
41
|
* 是否为「仅元信息占位」状态:有 status 但无 url/previewUrl,内容未拿到时整行以 FileMetaPlaceholder 风格展示
|
|
42
42
|
*/
|
|
43
|
+
export declare const isAttachmentFileLoading: (status?: string | null) => boolean;
|
|
44
|
+
/**
|
|
45
|
+
* 是否应该展示 FileMetaPlaceholder:
|
|
46
|
+
* - 有状态
|
|
47
|
+
* - 非 loading(uploading/pending)
|
|
48
|
+
* - 且没有可预览 URL
|
|
49
|
+
*/
|
|
43
50
|
export declare const isFileMetaPlaceholderState: (file: File & {
|
|
44
51
|
status?: string;
|
|
45
52
|
url?: string;
|
|
@@ -109,8 +109,16 @@ var hasVideoExtension = function hasVideoExtension(pathOrName) {
|
|
|
109
109
|
};
|
|
110
110
|
/**
|
|
111
111
|
* 是否为「仅元信息占位」状态:有 status 但无 url/previewUrl,内容未拿到时整行以 FileMetaPlaceholder 风格展示
|
|
112
|
+
*/ export var isAttachmentFileLoading = function isAttachmentFileLoading(status) {
|
|
113
|
+
return status === 'uploading' || status === 'pending';
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* 是否应该展示 FileMetaPlaceholder:
|
|
117
|
+
* - 有状态
|
|
118
|
+
* - 非 loading(uploading/pending)
|
|
119
|
+
* - 且没有可预览 URL
|
|
112
120
|
*/ export var isFileMetaPlaceholderState = function isFileMetaPlaceholderState(file) {
|
|
113
|
-
return file.status !== undefined && file.status !== null && !file.url && !file.previewUrl;
|
|
121
|
+
return file.status !== undefined && file.status !== null && !isAttachmentFileLoading(file.status) && !file.url && !file.previewUrl;
|
|
114
122
|
};
|
|
115
123
|
/**
|
|
116
124
|
* 设备品牌匹配列表
|
|
@@ -117,14 +117,14 @@ import { isFileMetaPlaceholderState, kbToSize } from "../AttachmentButton/utils"
|
|
|
117
117
|
var lastDotIndex = fileName.lastIndexOf('.');
|
|
118
118
|
var displayName = lastDotIndex > 0 ? fileName.slice(0, lastDotIndex) : fileName;
|
|
119
119
|
var displayExtension = lastDotIndex > 0 && lastDotIndex < fileName.length - 1 ? fileName.slice(lastDotIndex + 1) : '';
|
|
120
|
-
// 有 status 但无 url/previewUrl
|
|
121
|
-
if (file
|
|
120
|
+
// 有 status 但无 url/previewUrl:文件内容未拿到,展示大小与格式占位块(loading 状态除外)
|
|
121
|
+
if (isFileMetaPlaceholderState(file)) {
|
|
122
122
|
return /*#__PURE__*/ React.createElement(FileMetaPlaceholder, {
|
|
123
123
|
file: file
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
126
|
return /*#__PURE__*/ React.createElement(Tooltip, {
|
|
127
|
-
title: /*#__PURE__*/ React.createElement("div", null, locale === null || locale === void 0 ? void 0 : locale.clickToPreview),
|
|
127
|
+
title: file.status === 'error' && file.errorMessage ? /*#__PURE__*/ React.createElement("div", null, file.errorMessage) : /*#__PURE__*/ React.createElement("div", null, locale === null || locale === void 0 ? void 0 : locale.clickToPreview),
|
|
128
128
|
placement: "topLeft",
|
|
129
129
|
arrow: false
|
|
130
130
|
}, /*#__PURE__*/ React.createElement(motion.div, {
|
|
@@ -175,7 +175,12 @@ import { isFileMetaPlaceholderState, kbToSize } from "../AttachmentButton/utils"
|
|
|
175
175
|
title: file === null || file === void 0 ? void 0 : file.name
|
|
176
176
|
}, displayName)), /*#__PURE__*/ React.createElement("div", {
|
|
177
177
|
className: classNames("".concat(props.prefixCls, "-file-name-extension-container"), props.hashId)
|
|
178
|
-
}, /*#__PURE__*/ React.createElement("span", {
|
|
178
|
+
}, file.status === 'error' && file.errorMessage ? /*#__PURE__*/ React.createElement("span", {
|
|
179
|
+
className: classNames("".concat(props.prefixCls, "-file-error-msg"), props.hashId),
|
|
180
|
+
style: {
|
|
181
|
+
color: 'var(--color-red-text-secondary)'
|
|
182
|
+
}
|
|
183
|
+
}, file.errorMessage) : /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement("span", {
|
|
179
184
|
className: classNames("".concat(props.prefixCls, "-file-name-extension"), props.hashId)
|
|
180
185
|
}, displayExtension), /*#__PURE__*/ React.createElement("span", {
|
|
181
186
|
className: classNames("".concat(props.prefixCls, "-separator"), props.hashId)
|
|
@@ -183,7 +188,7 @@ import { isFileMetaPlaceholderState, kbToSize } from "../AttachmentButton/utils"
|
|
|
183
188
|
className: classNames("".concat(props.prefixCls, "-file-size"), props.hashId)
|
|
184
189
|
}, kbToSize(file.size / 1024)), /*#__PURE__*/ React.createElement("span", {
|
|
185
190
|
className: classNames("".concat(props.prefixCls, "-separator"), props.hashId)
|
|
186
|
-
}, "|"), /*#__PURE__*/ React.createElement("div", null, (file === null || file === void 0 ? void 0 : file.lastModified) ? dayjs(file === null || file === void 0 ? void 0 : file.lastModified).format('HH:mm') : ''))), hovered ? /*#__PURE__*/ React.createElement("div", {
|
|
191
|
+
}, "|"), /*#__PURE__*/ React.createElement("div", null, (file === null || file === void 0 ? void 0 : file.lastModified) ? dayjs(file === null || file === void 0 ? void 0 : file.lastModified).format('HH:mm') : '')))), hovered ? /*#__PURE__*/ React.createElement("div", {
|
|
187
192
|
className: classNames("".concat(props.prefixCls, "-action-bar"), props.hashId)
|
|
188
193
|
}, props.customSlot ? /*#__PURE__*/ React.createElement(ActionIconBox, {
|
|
189
194
|
title: '更多',
|
|
@@ -18,6 +18,15 @@ export interface FileUploadManagerReturn {
|
|
|
18
18
|
fileMap?: Map<string, AttachmentFile>;
|
|
19
19
|
/** 文件上传是否完成 */
|
|
20
20
|
fileUploadDone: boolean;
|
|
21
|
+
/** 文件上传状态 */
|
|
22
|
+
fileUploadStatus: 'uploading' | 'done' | 'error';
|
|
23
|
+
/** 文件上传状态统计 */
|
|
24
|
+
fileUploadSummary: {
|
|
25
|
+
totalCount: number;
|
|
26
|
+
doneCount: number;
|
|
27
|
+
uploadingCount: number;
|
|
28
|
+
errorCount: number;
|
|
29
|
+
};
|
|
21
30
|
/** 支持的文件格式 */
|
|
22
31
|
supportedFormat: SupportedFileFormatsType;
|
|
23
32
|
/** 上传图片 */
|
|
@@ -191,10 +191,24 @@ import { isMobileDevice, isVivoOrOppoDevice, isWeChat } from "../AttachmentButto
|
|
|
191
191
|
*/ export var useFileUploadManager = function useFileUploadManager(param) {
|
|
192
192
|
var attachment = param.attachment, fileMap = param.fileMap, onFileMapChange = param.onFileMapChange;
|
|
193
193
|
var locale = useContext(I18nContext).locale;
|
|
194
|
-
|
|
195
|
-
var
|
|
196
|
-
return file.status === '
|
|
197
|
-
})
|
|
194
|
+
var fileList = Array.from((fileMap === null || fileMap === void 0 ? void 0 : fileMap.values()) || []);
|
|
195
|
+
var uploadingCount = fileList.filter(function(file) {
|
|
196
|
+
return file.status === 'uploading';
|
|
197
|
+
}).length;
|
|
198
|
+
var errorCount = fileList.filter(function(file) {
|
|
199
|
+
return file.status === 'error';
|
|
200
|
+
}).length;
|
|
201
|
+
var totalCount = fileList.length;
|
|
202
|
+
var fileUploadSummary = {
|
|
203
|
+
totalCount: totalCount,
|
|
204
|
+
uploadingCount: uploadingCount,
|
|
205
|
+
errorCount: errorCount,
|
|
206
|
+
// 兜底把未知状态也按完成态处理,避免统计缺口
|
|
207
|
+
doneCount: Math.max(0, totalCount - uploadingCount - errorCount)
|
|
208
|
+
};
|
|
209
|
+
var fileUploadStatus = fileUploadSummary.errorCount > 0 ? 'error' : fileUploadSummary.uploadingCount > 0 ? 'uploading' : 'done';
|
|
210
|
+
// 向后兼容:无文件时视为已完成
|
|
211
|
+
var fileUploadDone = fileUploadSummary.totalCount > 0 ? fileUploadStatus === 'done' : true;
|
|
198
212
|
// 默认支持的文件格式
|
|
199
213
|
var supportedFormat = (attachment === null || attachment === void 0 ? void 0 : attachment.supportedFormat) || SupportedFileFormats.image;
|
|
200
214
|
/**
|
|
@@ -507,6 +521,8 @@ import { isMobileDevice, isVivoOrOppoDevice, isWeChat } from "../AttachmentButto
|
|
|
507
521
|
return {
|
|
508
522
|
fileMap: fileMap,
|
|
509
523
|
fileUploadDone: fileUploadDone,
|
|
524
|
+
fileUploadStatus: fileUploadStatus,
|
|
525
|
+
fileUploadSummary: fileUploadSummary,
|
|
510
526
|
supportedFormat: supportedFormat,
|
|
511
527
|
uploadImage: uploadImage,
|
|
512
528
|
updateAttachmentFiles: updateAttachmentFiles,
|
|
@@ -258,7 +258,7 @@ var MarkdownInputFieldComponent = function MarkdownInputFieldComponent(_0) {
|
|
|
258
258
|
attachment: attachment,
|
|
259
259
|
fileMap: fileMap,
|
|
260
260
|
onFileMapChange: setFileMap
|
|
261
|
-
}), fileUploadDone = _useFileUploadManager.fileUploadDone, supportedFormat = _useFileUploadManager.supportedFormat, uploadImage = _useFileUploadManager.uploadImage, updateAttachmentFiles = _useFileUploadManager.updateAttachmentFiles, handleFileRemoval = _useFileUploadManager.handleFileRemoval, handleFileRetry = _useFileUploadManager.handleFileRetry;
|
|
261
|
+
}), fileUploadDone = _useFileUploadManager.fileUploadDone, fileUploadStatus = _useFileUploadManager.fileUploadStatus, fileUploadSummary = _useFileUploadManager.fileUploadSummary, supportedFormat = _useFileUploadManager.supportedFormat, uploadImage = _useFileUploadManager.uploadImage, updateAttachmentFiles = _useFileUploadManager.updateAttachmentFiles, handleFileRemoval = _useFileUploadManager.handleFileRemoval, handleFileRetry = _useFileUploadManager.handleFileRetry;
|
|
262
262
|
// 语音输入管理
|
|
263
263
|
var _useVoiceInputManager = useVoiceInputManager({
|
|
264
264
|
voiceRecognizer: props.voiceRecognizer,
|
|
@@ -322,6 +322,8 @@ var MarkdownInputFieldComponent = function MarkdownInputFieldComponent(_0) {
|
|
|
322
322
|
setFileMap: setFileMap,
|
|
323
323
|
supportedFormat: supportedFormat,
|
|
324
324
|
fileUploadDone: fileUploadDone,
|
|
325
|
+
fileUploadStatus: fileUploadStatus,
|
|
326
|
+
fileUploadSummary: fileUploadSummary,
|
|
325
327
|
recording: recording,
|
|
326
328
|
isLoading: isLoading,
|
|
327
329
|
collapseSendActions: collapseSendActions,
|
|
@@ -473,7 +475,7 @@ var MarkdownInputFieldComponent = function MarkdownInputFieldComponent(_0) {
|
|
|
473
475
|
isHover: isHover,
|
|
474
476
|
isLoading: isLoading,
|
|
475
477
|
disabled: props.disabled,
|
|
476
|
-
fileUploadStatus:
|
|
478
|
+
fileUploadStatus: fileUploadStatus,
|
|
477
479
|
refinePrompt: props.refinePrompt,
|
|
478
480
|
editorRef: markdownEditorRef,
|
|
479
481
|
onValueChange: function onValueChange(text) {
|
|
@@ -507,7 +509,7 @@ var MarkdownInputFieldComponent = function MarkdownInputFieldComponent(_0) {
|
|
|
507
509
|
}, props), {
|
|
508
510
|
isHover: isHover,
|
|
509
511
|
isLoading: isLoading,
|
|
510
|
-
fileUploadStatus:
|
|
512
|
+
fileUploadStatus: fileUploadStatus
|
|
511
513
|
}))), sendActionsNode) : sendActionsNode))));
|
|
512
514
|
};
|
|
513
515
|
MarkdownInputFieldComponent.displayName = 'MarkdownInputField';
|
|
@@ -25,6 +25,15 @@ export interface SendActionsProps {
|
|
|
25
25
|
isLoading?: boolean;
|
|
26
26
|
/** 文件上传是否完成 */
|
|
27
27
|
fileUploadDone?: boolean;
|
|
28
|
+
/** 文件上传状态 */
|
|
29
|
+
fileUploadStatus?: 'uploading' | 'done' | 'error';
|
|
30
|
+
/** 文件上传状态统计 */
|
|
31
|
+
fileUploadSummary?: {
|
|
32
|
+
totalCount: number;
|
|
33
|
+
doneCount: number;
|
|
34
|
+
uploadingCount: number;
|
|
35
|
+
errorCount: number;
|
|
36
|
+
};
|
|
28
37
|
/** 是否正在录音 */
|
|
29
38
|
recording?: boolean;
|
|
30
39
|
/** 是否折叠操作按钮 */
|
|
@@ -66,7 +66,7 @@ import { MARKDOWN_INPUT_FIELD_TEST_IDS } from "../testIds";
|
|
|
66
66
|
*
|
|
67
67
|
* @description 封装发送操作相关的按钮,包括附件上传、语音输入、发送按钮等
|
|
68
68
|
*/ export var SendActions = function SendActions(param) {
|
|
69
|
-
var attachment = param.attachment, voiceRecognizer = param.voiceRecognizer, value = param.value, disabled = param.disabled, typing = param.typing, isLoading = param.isLoading, _param_fileUploadDone = param.fileUploadDone, fileUploadDone = _param_fileUploadDone === void 0 ? true : _param_fileUploadDone, _param_recording = param.recording, recording = _param_recording === void 0 ? false : _param_recording, _param_collapseSendActions = param.collapseSendActions, collapseSendActions = _param_collapseSendActions === void 0 ? false : _param_collapseSendActions, _param_allowEmptySubmit = param.allowEmptySubmit, allowEmptySubmit = _param_allowEmptySubmit === void 0 ? false : _param_allowEmptySubmit, uploadImage = param.uploadImage, onStartRecording = param.onStartRecording, onStopRecording = param.onStopRecording, onSend = param.onSend, onStop = param.onStop, actionsRender = param.actionsRender, _param_prefixCls = param.prefixCls, prefixCls = _param_prefixCls === void 0 ? 'ant-agentic-md-input-field' : _param_prefixCls, _param_hashId = param.hashId, hashId = _param_hashId === void 0 ? '' : _param_hashId, _param_hasTools = param.hasTools, hasTools = _param_hasTools === void 0 ? false : _param_hasTools, onResize = param.onResize, sendButtonProps = param.sendButtonProps, triggerSendKey = param.triggerSendKey;
|
|
69
|
+
var attachment = param.attachment, voiceRecognizer = param.voiceRecognizer, value = param.value, disabled = param.disabled, typing = param.typing, isLoading = param.isLoading, _param_fileUploadDone = param.fileUploadDone, fileUploadDone = _param_fileUploadDone === void 0 ? true : _param_fileUploadDone, _param_fileUploadStatus = param.fileUploadStatus, fileUploadStatus = _param_fileUploadStatus === void 0 ? fileUploadDone ? 'done' : 'uploading' : _param_fileUploadStatus, fileUploadSummary = param.fileUploadSummary, _param_recording = param.recording, recording = _param_recording === void 0 ? false : _param_recording, _param_collapseSendActions = param.collapseSendActions, collapseSendActions = _param_collapseSendActions === void 0 ? false : _param_collapseSendActions, _param_allowEmptySubmit = param.allowEmptySubmit, allowEmptySubmit = _param_allowEmptySubmit === void 0 ? false : _param_allowEmptySubmit, uploadImage = param.uploadImage, onStartRecording = param.onStartRecording, onStopRecording = param.onStopRecording, onSend = param.onSend, onStop = param.onStop, actionsRender = param.actionsRender, _param_prefixCls = param.prefixCls, prefixCls = _param_prefixCls === void 0 ? 'ant-agentic-md-input-field' : _param_prefixCls, _param_hashId = param.hashId, hashId = _param_hashId === void 0 ? '' : _param_hashId, _param_hasTools = param.hasTools, hasTools = _param_hasTools === void 0 ? false : _param_hasTools, onResize = param.onResize, sendButtonProps = param.sendButtonProps, triggerSendKey = param.triggerSendKey;
|
|
70
70
|
var fileMap = attachment === null || attachment === void 0 ? void 0 : attachment.fileMap;
|
|
71
71
|
var defaultActionsLen = [
|
|
72
72
|
(attachment === null || attachment === void 0 ? void 0 : attachment.enable) ? '()' : null,
|
|
@@ -155,7 +155,8 @@ import { MARKDOWN_INPUT_FIELD_TEST_IDS } from "../testIds";
|
|
|
155
155
|
onStopRecording: onStopRecording,
|
|
156
156
|
onSend: onSend,
|
|
157
157
|
onStop: onStop,
|
|
158
|
-
fileUploadStatus:
|
|
158
|
+
fileUploadStatus: fileUploadStatus,
|
|
159
|
+
fileUploadSummary: fileUploadSummary
|
|
159
160
|
}, defaultActions) : defaultActions;
|
|
160
161
|
return /*#__PURE__*/ React.createElement(RcResizeObserver, {
|
|
161
162
|
onResize: function onResize1(e) {
|
|
@@ -29,6 +29,13 @@ interface UseSendActionsNodeParams {
|
|
|
29
29
|
setFileMap?: (fileMap?: Map<string, AttachmentFile>) => void;
|
|
30
30
|
supportedFormat: AttachmentButtonProps['supportedFormat'];
|
|
31
31
|
fileUploadDone: boolean;
|
|
32
|
+
fileUploadStatus: 'uploading' | 'done' | 'error';
|
|
33
|
+
fileUploadSummary: {
|
|
34
|
+
totalCount: number;
|
|
35
|
+
doneCount: number;
|
|
36
|
+
uploadingCount: number;
|
|
37
|
+
errorCount: number;
|
|
38
|
+
};
|
|
32
39
|
recording: boolean;
|
|
33
40
|
isLoading: boolean;
|
|
34
41
|
collapseSendActions: boolean;
|
|
@@ -45,5 +52,5 @@ interface UseSendActionsNodeParams {
|
|
|
45
52
|
/**
|
|
46
53
|
* SendActions 节点渲染 Hook
|
|
47
54
|
*/
|
|
48
|
-
export declare const useSendActionsNode: ({ props: sendProps, fileMap, setFileMap, supportedFormat, fileUploadDone, recording, isLoading, collapseSendActions, uploadImage, startRecording, stopRecording, sendMessage, setIsLoading, onStop, setRightPadding, baseCls, hashId, }: UseSendActionsNodeParams) => React.ReactElement;
|
|
55
|
+
export declare const useSendActionsNode: ({ props: sendProps, fileMap, setFileMap, supportedFormat, fileUploadDone, fileUploadStatus, fileUploadSummary, recording, isLoading, collapseSendActions, uploadImage, startRecording, stopRecording, sendMessage, setIsLoading, onStop, setRightPadding, baseCls, hashId, }: UseSendActionsNodeParams) => React.ReactElement;
|
|
49
56
|
export {};
|
|
@@ -99,7 +99,7 @@ import { MARKDOWN_INPUT_FIELD_TEST_IDS } from "../testIds";
|
|
|
99
99
|
/**
|
|
100
100
|
* SendActions 节点渲染 Hook
|
|
101
101
|
*/ export var useSendActionsNode = function useSendActionsNode(param) {
|
|
102
|
-
var sendProps = param.props, fileMap = param.fileMap, setFileMap = param.setFileMap, supportedFormat = param.supportedFormat, fileUploadDone = param.fileUploadDone, recording = param.recording, isLoading = param.isLoading, collapseSendActions = param.collapseSendActions, uploadImage = param.uploadImage, startRecording = param.startRecording, stopRecording = param.stopRecording, sendMessage = param.sendMessage, setIsLoading = param.setIsLoading, onStop = param.onStop, setRightPadding = param.setRightPadding, baseCls = param.baseCls, hashId = param.hashId;
|
|
102
|
+
var sendProps = param.props, fileMap = param.fileMap, setFileMap = param.setFileMap, supportedFormat = param.supportedFormat, fileUploadDone = param.fileUploadDone, fileUploadStatus = param.fileUploadStatus, fileUploadSummary = param.fileUploadSummary, recording = param.recording, isLoading = param.isLoading, collapseSendActions = param.collapseSendActions, uploadImage = param.uploadImage, startRecording = param.startRecording, stopRecording = param.stopRecording, sendMessage = param.sendMessage, setIsLoading = param.setIsLoading, onStop = param.onStop, setRightPadding = param.setRightPadding, baseCls = param.baseCls, hashId = param.hashId;
|
|
103
103
|
return useMemo(function() {
|
|
104
104
|
var _sendProps_attachment;
|
|
105
105
|
return React.createElement(SendActions, {
|
|
@@ -117,6 +117,8 @@ import { MARKDOWN_INPUT_FIELD_TEST_IDS } from "../testIds";
|
|
|
117
117
|
typing: sendProps.typing,
|
|
118
118
|
isLoading: isLoading,
|
|
119
119
|
fileUploadDone: fileUploadDone,
|
|
120
|
+
fileUploadStatus: fileUploadStatus,
|
|
121
|
+
fileUploadSummary: fileUploadSummary,
|
|
120
122
|
recording: recording,
|
|
121
123
|
collapseSendActions: collapseSendActions,
|
|
122
124
|
allowEmptySubmit: sendProps.allowEmptySubmit,
|
|
@@ -151,6 +153,8 @@ import { MARKDOWN_INPUT_FIELD_TEST_IDS } from "../testIds";
|
|
|
151
153
|
setFileMap,
|
|
152
154
|
supportedFormat,
|
|
153
155
|
fileUploadDone,
|
|
156
|
+
fileUploadStatus,
|
|
157
|
+
fileUploadSummary,
|
|
154
158
|
recording,
|
|
155
159
|
isLoading,
|
|
156
160
|
collapseSendActions,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export interface AnimationConfig {
|
|
3
|
-
/** 淡入动画持续时间(ms),默认
|
|
3
|
+
/** 淡入动画持续时间(ms),默认 250 */
|
|
4
4
|
fadeDuration?: number;
|
|
5
|
-
/** 缓动函数,默认 ease-
|
|
5
|
+
/** 缓动函数,默认 ease-out */
|
|
6
6
|
easing?: string;
|
|
7
7
|
}
|
|
8
8
|
export interface AnimationTextProps {
|
|
@@ -12,11 +12,8 @@ export interface AnimationTextProps {
|
|
|
12
12
|
/**
|
|
13
13
|
* 流式文字淡入动画组件。
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* 已有的部分保持不动——不会触发整段重绘。
|
|
18
|
-
*
|
|
19
|
-
* 仅对纯文本增量有效;如果内容不是简单追加(删除/替换),直接替换所有 chunks。
|
|
15
|
+
* 采用 opacity + translateY(GPU 硬件加速),清爽流派。
|
|
16
|
+
* 动画结束后通过 animationend 标记 done,仍用 span 包裹以保持布局稳定。
|
|
20
17
|
*/
|
|
21
18
|
declare const AnimationText: React.NamedExoticComponent<AnimationTextProps>;
|
|
22
19
|
export default AnimationText;
|
|
@@ -9,6 +9,19 @@ function _array_with_holes(arr) {
|
|
|
9
9
|
function _array_without_holes(arr) {
|
|
10
10
|
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
11
11
|
}
|
|
12
|
+
function _define_property(obj, key, value) {
|
|
13
|
+
if (key in obj) {
|
|
14
|
+
Object.defineProperty(obj, key, {
|
|
15
|
+
value: value,
|
|
16
|
+
enumerable: true,
|
|
17
|
+
configurable: true,
|
|
18
|
+
writable: true
|
|
19
|
+
});
|
|
20
|
+
} else {
|
|
21
|
+
obj[key] = value;
|
|
22
|
+
}
|
|
23
|
+
return obj;
|
|
24
|
+
}
|
|
12
25
|
function _iterable_to_array(iter) {
|
|
13
26
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
14
27
|
}
|
|
@@ -42,6 +55,45 @@ function _non_iterable_rest() {
|
|
|
42
55
|
function _non_iterable_spread() {
|
|
43
56
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
44
57
|
}
|
|
58
|
+
function _object_spread(target) {
|
|
59
|
+
for(var i = 1; i < arguments.length; i++){
|
|
60
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
61
|
+
var ownKeys = Object.keys(source);
|
|
62
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
63
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
64
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
ownKeys.forEach(function(key) {
|
|
68
|
+
_define_property(target, key, source[key]);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
return target;
|
|
72
|
+
}
|
|
73
|
+
function ownKeys(object, enumerableOnly) {
|
|
74
|
+
var keys = Object.keys(object);
|
|
75
|
+
if (Object.getOwnPropertySymbols) {
|
|
76
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
77
|
+
if (enumerableOnly) {
|
|
78
|
+
symbols = symbols.filter(function(sym) {
|
|
79
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
keys.push.apply(keys, symbols);
|
|
83
|
+
}
|
|
84
|
+
return keys;
|
|
85
|
+
}
|
|
86
|
+
function _object_spread_props(target, source) {
|
|
87
|
+
source = source != null ? source : {};
|
|
88
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
89
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
90
|
+
} else {
|
|
91
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
92
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
return target;
|
|
96
|
+
}
|
|
45
97
|
function _sliced_to_array(arr, i) {
|
|
46
98
|
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
47
99
|
}
|
|
@@ -69,55 +121,105 @@ import React, { useEffect, useMemo, useRef, useState } from "react";
|
|
|
69
121
|
}
|
|
70
122
|
return '';
|
|
71
123
|
};
|
|
124
|
+
/**
|
|
125
|
+
* 识别 children 中是否包含 React 元素节点。
|
|
126
|
+
* 富文本结构(链接、脚注、图片等)在纯文本差分下会丢失结构信息,直接透传更安全。
|
|
127
|
+
*/ var hasElementNode = function hasElementNode1(children) {
|
|
128
|
+
if (children === null || children === undefined || typeof children === 'boolean') return false;
|
|
129
|
+
if (typeof children === 'string' || typeof children === 'number') return false;
|
|
130
|
+
if (Array.isArray(children)) return children.some(hasElementNode);
|
|
131
|
+
return /*#__PURE__*/ React.isValidElement(children);
|
|
132
|
+
};
|
|
72
133
|
/**
|
|
73
134
|
* 流式文字淡入动画组件。
|
|
74
135
|
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
* 已有的部分保持不动——不会触发整段重绘。
|
|
78
|
-
*
|
|
79
|
-
* 仅对纯文本增量有效;如果内容不是简单追加(删除/替换),直接替换所有 chunks。
|
|
136
|
+
* 采用 opacity + translateY(GPU 硬件加速),清爽流派。
|
|
137
|
+
* 动画结束后通过 animationend 标记 done,仍用 span 包裹以保持布局稳定。
|
|
80
138
|
*/ var AnimationText = /*#__PURE__*/ React.memo(function(param) {
|
|
81
139
|
var children = param.children, animationConfig = param.animationConfig;
|
|
82
|
-
var _ref = animationConfig || {}, _ref_fadeDuration = _ref.fadeDuration, fadeDuration = _ref_fadeDuration === void 0 ? 200 : _ref_fadeDuration, _ref_easing = _ref.easing, easing = _ref_easing === void 0 ? 'ease-
|
|
140
|
+
var _ref = animationConfig || {}, _ref_fadeDuration = _ref.fadeDuration, fadeDuration = _ref_fadeDuration === void 0 ? 200 : _ref_fadeDuration, _ref_easing = _ref.easing, easing = _ref_easing === void 0 ? 'ease-out' : _ref_easing;
|
|
83
141
|
var _useState = _sliced_to_array(useState([]), 2), chunks = _useState[0], setChunks = _useState[1];
|
|
84
142
|
var prevTextRef = useRef('');
|
|
85
143
|
var text = extractText(children);
|
|
144
|
+
var hasElementContent = hasElementNode(children);
|
|
86
145
|
useEffect(function() {
|
|
146
|
+
if (hasElementContent) {
|
|
147
|
+
prevTextRef.current = text;
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
87
150
|
if (text === prevTextRef.current) return;
|
|
88
151
|
if (!prevTextRef.current || !text.startsWith(prevTextRef.current)) {
|
|
89
152
|
setChunks([
|
|
90
|
-
|
|
153
|
+
{
|
|
154
|
+
key: '0',
|
|
155
|
+
text: text,
|
|
156
|
+
content: children,
|
|
157
|
+
done: false
|
|
158
|
+
}
|
|
91
159
|
]);
|
|
92
160
|
prevTextRef.current = text;
|
|
93
161
|
return;
|
|
94
162
|
}
|
|
95
163
|
var prevLen = prevTextRef.current.length;
|
|
164
|
+
var newText = text.slice(prevLen);
|
|
165
|
+
var newKey = "anim-".concat(Date.now(), "-").concat(prevLen);
|
|
96
166
|
setChunks(function(prev) {
|
|
97
167
|
return _to_consumable_array(prev).concat([
|
|
98
|
-
|
|
168
|
+
{
|
|
169
|
+
key: newKey,
|
|
170
|
+
text: newText,
|
|
171
|
+
done: false
|
|
172
|
+
}
|
|
99
173
|
]);
|
|
100
174
|
});
|
|
101
175
|
prevTextRef.current = text;
|
|
102
176
|
}, [
|
|
103
177
|
text,
|
|
104
|
-
children
|
|
178
|
+
children,
|
|
179
|
+
hasElementContent
|
|
105
180
|
]);
|
|
181
|
+
var handleAnimationEnd = function handleAnimationEnd(key) {
|
|
182
|
+
setChunks(function(prev) {
|
|
183
|
+
return prev.map(function(c) {
|
|
184
|
+
return c.key === key ? _object_spread_props(_object_spread({}, c), {
|
|
185
|
+
done: true
|
|
186
|
+
}) : c;
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
};
|
|
106
190
|
var animationStyle = useMemo(function() {
|
|
107
191
|
return {
|
|
108
|
-
|
|
109
|
-
|
|
192
|
+
display: 'inline-block',
|
|
193
|
+
animation: "markdownRendererSlideFadeIn ".concat(fadeDuration, "ms ").concat(easing, " forwards"),
|
|
194
|
+
willChange: 'opacity, transform',
|
|
110
195
|
color: 'inherit'
|
|
111
196
|
};
|
|
112
197
|
}, [
|
|
113
198
|
fadeDuration,
|
|
114
199
|
easing
|
|
115
200
|
]);
|
|
116
|
-
|
|
117
|
-
return
|
|
201
|
+
/** 动画结束后仍用 inline-block 包裹,避免从 span 变为裸内容时的宽度重排 */ var doneChunkStyle = useMemo(function() {
|
|
202
|
+
return {
|
|
203
|
+
display: 'inline-block',
|
|
204
|
+
color: 'inherit'
|
|
205
|
+
};
|
|
206
|
+
}, []);
|
|
207
|
+
if (hasElementContent) {
|
|
208
|
+
return /*#__PURE__*/ React.createElement(React.Fragment, null, children);
|
|
209
|
+
}
|
|
210
|
+
return /*#__PURE__*/ React.createElement(React.Fragment, null, chunks.map(function(chunk) {
|
|
211
|
+
var _chunk_content;
|
|
212
|
+
var rendered = (_chunk_content = chunk.content) !== null && _chunk_content !== void 0 ? _chunk_content : chunk.text;
|
|
213
|
+
return chunk.done ? /*#__PURE__*/ React.createElement("span", {
|
|
214
|
+
key: chunk.key,
|
|
215
|
+
style: doneChunkStyle
|
|
216
|
+
}, rendered) : /*#__PURE__*/ React.createElement("span", {
|
|
217
|
+
key: chunk.key,
|
|
118
218
|
style: animationStyle,
|
|
119
|
-
|
|
120
|
-
|
|
219
|
+
onAnimationEnd: function onAnimationEnd() {
|
|
220
|
+
return handleAnimationEnd(chunk.key);
|
|
221
|
+
}
|
|
222
|
+
}, rendered);
|
|
121
223
|
}));
|
|
122
224
|
});
|
|
123
225
|
AnimationText.displayName = 'AnimationText';
|
|
@@ -138,13 +138,15 @@ import React, { forwardRef, useContext, useEffect, useImperativeHandle, useMemo,
|
|
|
138
138
|
import { useStyle as useContentStyle } from "../MarkdownEditor/editor/style";
|
|
139
139
|
import { useStyle as useEditorStyle } from "../MarkdownEditor/style";
|
|
140
140
|
import { CharacterQueue } from "./CharacterQueue";
|
|
141
|
+
import { AgenticUiTaskBlockRenderer } from "./renderers/AgenticUiTaskBlockRenderer";
|
|
142
|
+
import { AgenticUiToolUseBarBlockRenderer } from "./renderers/AgenticUiToolUseBarBlockRenderer";
|
|
141
143
|
import { ChartBlockRenderer } from "./renderers/ChartRenderer";
|
|
142
144
|
import { CodeBlockRenderer } from "./renderers/CodeRenderer";
|
|
143
145
|
import { MermaidBlockRenderer } from "./renderers/MermaidRenderer";
|
|
144
146
|
import { SchemaBlockRenderer } from "./renderers/SchemaRenderer";
|
|
145
147
|
import { useRendererVarStyle } from "./style";
|
|
146
|
-
import { useStreaming } from "./useStreaming";
|
|
147
148
|
import { useMarkdownToReact } from "./useMarkdownToReact";
|
|
149
|
+
import { useStreaming } from "./useStreaming";
|
|
148
150
|
var SCHEMA_LANGUAGES = new Set([
|
|
149
151
|
'schema',
|
|
150
152
|
'apaasify',
|
|
@@ -201,6 +203,18 @@ var SCHEMA_LANGUAGES = new Set([
|
|
|
201
203
|
language: language
|
|
202
204
|
}));
|
|
203
205
|
}
|
|
206
|
+
if (language === 'agentic-ui-task') {
|
|
207
|
+
var TaskComp = pluginComponents['agentic-ui-task'] || AgenticUiTaskBlockRenderer;
|
|
208
|
+
return /*#__PURE__*/ React.createElement(TaskComp, _object_spread_props(_object_spread({}, rest), {
|
|
209
|
+
language: language
|
|
210
|
+
}));
|
|
211
|
+
}
|
|
212
|
+
if (language === 'agentic-ui-toolusebar' || language === 'agentic-ui-usertoolbar') {
|
|
213
|
+
var ToolbarComp = pluginComponents['agentic-ui-toolusebar'] || pluginComponents['agentic-ui-usertoolbar'] || AgenticUiToolUseBarBlockRenderer;
|
|
214
|
+
return /*#__PURE__*/ React.createElement(ToolbarComp, _object_spread_props(_object_spread({}, rest), {
|
|
215
|
+
language: language
|
|
216
|
+
}));
|
|
217
|
+
}
|
|
204
218
|
if (SCHEMA_LANGUAGES.has(language)) {
|
|
205
219
|
var SchemaComp = pluginComponents.schema || SchemaBlockRenderer;
|
|
206
220
|
return /*#__PURE__*/ React.createElement(SchemaComp, _object_spread_props(_object_spread({}, rest), {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { default as AnimationText } from './AnimationText';
|
|
2
|
+
export type { AnimationConfig, AnimationTextProps } from './AnimationText';
|
|
1
3
|
export { CharacterQueue } from './CharacterQueue';
|
|
2
4
|
export { default as MarkdownRenderer } from './MarkdownRenderer';
|
|
3
5
|
export { ChartBlockRenderer } from './renderers/ChartRenderer';
|
|
@@ -5,7 +7,5 @@ export { CodeBlockRenderer } from './renderers/CodeRenderer';
|
|
|
5
7
|
export { MermaidBlockRenderer } from './renderers/MermaidRenderer';
|
|
6
8
|
export { SchemaBlockRenderer } from './renderers/SchemaRenderer';
|
|
7
9
|
export type { CharacterQueueOptions, MarkdownRendererProps, MarkdownRendererRef, RenderMode, RendererBlockProps, } from './types';
|
|
8
|
-
export { default as AnimationText } from './AnimationText';
|
|
9
|
-
export type { AnimationConfig, AnimationTextProps } from './AnimationText';
|
|
10
10
|
export { markdownToReactSync, useMarkdownToReact } from './useMarkdownToReact';
|
|
11
11
|
export { useStreaming } from './useStreaming';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
export { default as AnimationText } from "./AnimationText";
|
|
1
2
|
export { CharacterQueue } from "./CharacterQueue";
|
|
2
3
|
export { default as MarkdownRenderer } from "./MarkdownRenderer";
|
|
3
4
|
export { ChartBlockRenderer } from "./renderers/ChartRenderer";
|
|
4
5
|
export { CodeBlockRenderer } from "./renderers/CodeRenderer";
|
|
5
6
|
export { MermaidBlockRenderer } from "./renderers/MermaidRenderer";
|
|
6
7
|
export { SchemaBlockRenderer } from "./renderers/SchemaRenderer";
|
|
7
|
-
export { default as AnimationText } from "./AnimationText";
|
|
8
8
|
export { markdownToReactSync, useMarkdownToReact } from "./useMarkdownToReact";
|
|
9
9
|
export { useStreaming } from "./useStreaming";
|