@mxmweb/rtext 1.5.3 → 1.5.6
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/adopters/ChatMessageAdapter.d.ts +6 -6
- package/assets/style.css +1 -1
- package/containers/ThoughtChainContainer.d.ts +1 -1
- package/core/UnifiedRichText.d.ts +4 -4
- package/core/converters/slateConverters.d.ts +0 -5
- package/core/richElements/styles.d.ts +0 -1
- package/elements/ThoughtChainSection.d.ts +0 -10
- package/index.js +8353 -9117
- package/lib_enter.d.ts +0 -2
- package/mockserverdata.d.ts +93 -3
- package/package.json +1 -1
- package/stats.html +1 -1
- package/thought_chain_types.d.ts +6 -4
- package/utils/thought_chain_mapper.d.ts +8 -3
|
@@ -14,7 +14,7 @@ export interface ThoughtChainContainerProps {
|
|
|
14
14
|
simpleThinkOnly?: boolean;
|
|
15
15
|
/**
|
|
16
16
|
* 思维链总耗时(毫秒),从后端 SSE 流中的 chainRespTime 字段获取
|
|
17
|
-
* 2026-01-
|
|
17
|
+
* 2026-01-08 新增:用于在头部显示总用时,优先使用此字段。
|
|
18
18
|
*/
|
|
19
19
|
chainRespTime?: number;
|
|
20
20
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { RenderElementProps, RenderLeafProps } from 'slate-react';
|
|
2
|
+
import { BaseEditor } from 'slate';
|
|
3
|
+
import { RenderElementProps, RenderLeafProps, ReactEditor } from 'slate-react';
|
|
4
4
|
export declare enum DataType {
|
|
5
5
|
SLATE = "slate",
|
|
6
6
|
MARKDOWN = "markdown",
|
|
@@ -55,8 +55,8 @@ export interface UnifiedRichTextProps {
|
|
|
55
55
|
onRetriveTagClick?: (leaf: any, attributes: any) => void;
|
|
56
56
|
/** 事件发射器 */
|
|
57
57
|
eventsEmit?: (event: string, data: any) => void;
|
|
58
|
-
/**
|
|
59
|
-
onEditorReady?: (editor:
|
|
58
|
+
/** 编辑器就绪回调 */
|
|
59
|
+
onEditorReady?: (editor: BaseEditor & ReactEditor) => void;
|
|
60
60
|
/** 额外的 props,会传递给 renderElement */
|
|
61
61
|
extraProps?: Record<string, any>;
|
|
62
62
|
/** 自定义样式 */
|
|
@@ -51,10 +51,5 @@ export interface BlockQuoteElement extends BaseElement {
|
|
|
51
51
|
type: 'block-quote';
|
|
52
52
|
}
|
|
53
53
|
export type CustomElement = ParagraphElement | HeadingOneElement | HeadingTwoElement | HeadingThreeElement | ListElement | ListItemElement | TableElement | TableRowElement | TableCellElement | ImageElement | CodeBlockElement | BlockQuoteElement;
|
|
54
|
-
/**
|
|
55
|
-
* 将 Slate 节点序列化为 Markdown 格式
|
|
56
|
-
* @param nodes - Slate 节点数组
|
|
57
|
-
* @returns Markdown 字符串
|
|
58
|
-
*/
|
|
59
54
|
export declare const serializeToMarkdown: (nodes: CustomElement[]) => string;
|
|
60
55
|
export declare const serializeToHtml: (nodes: CustomElement[]) => string;
|
|
@@ -9,16 +9,6 @@ export interface ThoughtChainSectionProps {
|
|
|
9
9
|
nodes: ThoughtNode[];
|
|
10
10
|
/** 渲染模式:实时 / 历史,只影响细节样式与动效 */
|
|
11
11
|
mode?: ThoughtChainRenderMode;
|
|
12
|
-
/**
|
|
13
|
-
* 是否展示时间轴 UI(竖线等)
|
|
14
|
-
* 2026-01-06 新增:用于在 enableCot = 0 时只展示「模型思考」内容,而不展示时间轴。
|
|
15
|
-
*/
|
|
16
|
-
showTimeline?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* 是否展示区块头部(图标 + “模型思考完成”这一行)
|
|
19
|
-
* 2026-01-06 新增:在 enableCot = 0 的简单模式下关闭,直接输出内容。
|
|
20
|
-
*/
|
|
21
|
-
showHeader?: boolean;
|
|
22
12
|
}
|
|
23
13
|
declare const ThoughtChainSection: React.FC<ThoughtChainSectionProps>;
|
|
24
14
|
export default ThoughtChainSection;
|