@ant-design/agentic-ui 2.21.0 → 2.22.0
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/MarkdownEditor/editor/elements/TagPopup/index.js +4 -4
- package/dist/MarkdownEditor/editor/elements/TagPopup/style.js +14 -12
- package/dist/MarkdownEditor/editor/parser/parse/applyContextPropsAndConfig.d.ts +8 -0
- package/dist/MarkdownEditor/editor/parser/parse/applyContextPropsAndConfig.js +58 -0
- package/dist/MarkdownEditor/editor/parser/parse/parseBlockElements.d.ts +67 -0
- package/dist/MarkdownEditor/editor/parser/parse/parseBlockElements.js +289 -0
- package/dist/MarkdownEditor/editor/parser/parse/parseElements.d.ts +27 -0
- package/dist/MarkdownEditor/editor/parser/parse/parseElements.js +83 -0
- package/dist/MarkdownEditor/editor/parser/parse/parseEmptyLines.d.ts +9 -0
- package/dist/MarkdownEditor/editor/parser/parse/parseEmptyLines.js +60 -0
- package/dist/MarkdownEditor/editor/parser/parse/parseFootnote.d.ts +10 -0
- package/dist/MarkdownEditor/editor/parser/parse/parseFootnote.js +12 -0
- package/dist/MarkdownEditor/editor/parser/parse/parseHtml.d.ts +63 -0
- package/dist/MarkdownEditor/editor/parser/parse/parseHtml.js +759 -0
- package/dist/MarkdownEditor/editor/parser/parse/parseMath.d.ts +24 -0
- package/dist/MarkdownEditor/editor/parser/parse/parseMath.js +58 -0
- package/dist/MarkdownEditor/editor/parser/parse/parseMedia.d.ts +27 -0
- package/dist/MarkdownEditor/editor/parser/parse/parseMedia.js +127 -0
- package/dist/MarkdownEditor/editor/parser/parse/parseTable.js +36 -3
- package/dist/MarkdownEditor/editor/parser/parse/parseText.d.ts +26 -0
- package/dist/MarkdownEditor/editor/parser/parse/parseText.js +304 -0
- package/dist/MarkdownEditor/editor/parser/parserMarkdownToSlateNode.d.ts +3 -40
- package/dist/MarkdownEditor/editor/parser/parserMarkdownToSlateNode.js +128 -1855
- package/dist/MarkdownEditor/editor/parser/parserSlateNodeToMarkdown.js +131 -18
- package/dist/MarkdownEditor/editor/parser/remarkParse.js +24 -17
- package/dist/MarkdownEditor/editor/plugins/elements.js +1 -1
- package/dist/Plugins/code/components/CodeToolbar.js +3 -16
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 处理脚注引用
|
|
3
|
+
* @param currentElement - 当前处理的脚注引用元素
|
|
4
|
+
* @returns 返回格式化的脚注引用节点对象
|
|
5
|
+
*/ export var handleFootnoteReference = function(currentElement) {
|
|
6
|
+
var _currentElement_identifier;
|
|
7
|
+
return {
|
|
8
|
+
text: "".concat((_currentElement_identifier = currentElement.identifier) === null || _currentElement_identifier === void 0 ? void 0 : _currentElement_identifier.toUpperCase()),
|
|
9
|
+
identifier: currentElement.identifier,
|
|
10
|
+
type: 'footnoteReference'
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 解码 URI 组件,处理错误情况
|
|
3
|
+
*/
|
|
4
|
+
export declare const decodeURIComponentUrl: (url: string) => string;
|
|
5
|
+
/**
|
|
6
|
+
* 查找并解析媒体元素(img/video/iframe)
|
|
7
|
+
*/
|
|
8
|
+
export declare const findImageElement: (str: string) => any;
|
|
9
|
+
/**
|
|
10
|
+
* 根据媒体元素信息创建编辑器节点
|
|
11
|
+
*/
|
|
12
|
+
export declare const createMediaNodeFromElement: (mediaElement: ReturnType<typeof findImageElement>) => import("../../../..").CardNode | {
|
|
13
|
+
text: string;
|
|
14
|
+
} | null;
|
|
15
|
+
/**
|
|
16
|
+
* 标准 HTML 元素列表
|
|
17
|
+
* 这些标签会被正常解析为 HTML,其他标签会被当作普通文本处理
|
|
18
|
+
*/
|
|
19
|
+
export declare const STANDARD_HTML_ELEMENTS: Set<string>;
|
|
20
|
+
/**
|
|
21
|
+
* 检查 HTML 标签是否为标准元素
|
|
22
|
+
* @param htmlString - HTML 字符串
|
|
23
|
+
* @returns 是否为标准 HTML 元素
|
|
24
|
+
*/
|
|
25
|
+
export declare function isStandardHtmlElement(htmlString: string): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* 查找附件链接
|
|
28
|
+
*/
|
|
29
|
+
export declare const findAttachment: (str: string) => {
|
|
30
|
+
url: string;
|
|
31
|
+
size: number;
|
|
32
|
+
} | null;
|
|
33
|
+
/**
|
|
34
|
+
* 处理HTML节点
|
|
35
|
+
* @param currentElement - 当前处理的HTML元素
|
|
36
|
+
* @param parent - 父级元素,用于判断上下文
|
|
37
|
+
* @param htmlTag - HTML标签栈,用于跟踪嵌套的HTML标签
|
|
38
|
+
* @returns 返回包含解析后元素和上下文属性的对象
|
|
39
|
+
*/
|
|
40
|
+
export declare const handleHtml: (currentElement: any, parent: any, htmlTag: any[]) => {
|
|
41
|
+
el: any;
|
|
42
|
+
contextProps: any;
|
|
43
|
+
htmlTag: any[];
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* 预处理特殊标签(think/answer),将其转换为代码块格式
|
|
47
|
+
* @param markdown - 原始 Markdown 字符串
|
|
48
|
+
* @param tagName - 标签名称(think 或 answer)
|
|
49
|
+
* @returns 处理后的 Markdown 字符串
|
|
50
|
+
*/
|
|
51
|
+
export declare function preprocessSpecialTags(markdown: string, tagName: 'think' | 'answer'): string;
|
|
52
|
+
/**
|
|
53
|
+
* 预处理 <think> 标签,将其转换为 ```think 代码块格式
|
|
54
|
+
* @param markdown - 原始 Markdown 字符串
|
|
55
|
+
* @returns 处理后的 Markdown 字符串
|
|
56
|
+
*/
|
|
57
|
+
export declare function preprocessThinkTags(markdown: string): string;
|
|
58
|
+
/**
|
|
59
|
+
* 预处理所有非标准 HTML 标签,提取其内容(删除标签本身)
|
|
60
|
+
* @param markdown - 原始 Markdown 字符串
|
|
61
|
+
* @returns 处理后的 Markdown 字符串
|
|
62
|
+
*/
|
|
63
|
+
export declare function preprocessNonStandardHtmlTags(markdown: string): string;
|