@antdv-next/x 1.1.3-beta.5 → 1.2.1-beta.1
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/actions/ActionsFeedback.js +1 -1
- package/dist/actions/ActionsItem.js +1 -1
- package/dist/bubble/hooks/useCompatibleScroll.js +1 -1
- package/dist/code-highlighter/CodeHighlighter.js +2 -1
- package/dist/code-highlighter/shiki.js +1 -1
- package/dist/code-highlighter/style/index.d.ts +40 -0
- package/dist/code-highlighter/style/index.js +25 -13
- package/dist/folder/Folder.js +2 -1
- package/dist/index.umd.js +91 -51
- package/dist/mermaid/Mermaid.js +1 -1
- package/dist/package.js +1 -1
- package/dist/sender/components/SlotTextArea.js +5 -4
- package/dist/sender/components/SpeechButton/RecordingIcon.js +1 -1
- package/dist/sender/hooks/use-speech.js +2 -1
- package/dist/suggestion/style/index.js +5 -1
- package/dist/suggestion/useActive.js +0 -2
- package/dist/theme/themes/seed.js +3 -0
- package/dist/theme/util/alias.js +5 -5
- package/dist/think/Think.d.ts +9 -0
- package/dist/think/Think.js +18 -9
- package/dist/think/interface.d.ts +6 -0
- package/dist/thought-chain/Node.js +11 -5
- package/dist/thought-chain/ThoughtChain.js +2 -2
- package/dist/thought-chain/interface.d.ts +6 -0
- package/dist/x-provider/index.js +3 -2
- package/es/Serializer-Sc9uEpQk.js +262 -0
- package/es/{_basePickBy-DFHEGO2M.js → _basePickBy-CrbncDqR.js} +2 -2
- package/es/{_baseUniq-BlS7rXTs.js → _baseUniq-B-qU_Imh.js} +9 -9
- package/es/antdv-next-x.esm.js +2910 -2885
- package/es/{arc-BuXEd18J.js → arc-NI3ROx5X.js} +2 -2
- package/es/architecture-PBZL5I3N-BRGGaMu3.js +3 -0
- package/es/{architectureDiagram-2XIMDMQ5-CmfsCwJk.js → architectureDiagram-2XIMDMQ5-OvuktNfv.js} +100 -110
- package/es/{blockDiagram-WCTKOSBZ-lJAan65A.js → blockDiagram-WCTKOSBZ-CS-kh74L.js} +42 -43
- package/es/{c4Diagram-IC4MRINW-B1c2x_1Q.js → c4Diagram-IC4MRINW-BZGIF4Dk.js} +17 -25
- package/es/{channel-DFgF_2F7.js → channel-DrSSYyxp.js} +1 -1
- package/es/{chunk-4BX2VUAB-J2N81Fpp.js → chunk-4BX2VUAB-Rm8-te6i.js} +1 -1
- package/es/{chunk-55IACEB6-DGtfGRgi.js → chunk-55IACEB6-Tre45n-8.js} +1 -1
- package/es/{chunk-7R4GIKGN-QT6IorJ_.js → chunk-7R4GIKGN-scch4dXY.js} +10 -10
- package/es/{chunk-FMBD7UC4-DCcRjunY.js → chunk-FMBD7UC4-JmekSPZP.js} +1 -1
- package/es/{chunk-GEFDOKGD-BWpC-zoH.js → chunk-GEFDOKGD-BEzc6NZw.js} +31 -71
- package/es/{chunk-JSJVCQXG-D8_heHOp.js → chunk-JSJVCQXG-_l_UVbaa.js} +3 -3
- package/es/{chunk-KX2RTZJC-D5cc4rj6.js → chunk-KX2RTZJC-BUWM8pJz.js} +2 -2
- package/es/{chunk-KYZI473N-BHJ3T5Zv.js → chunk-KYZI473N-BSgb_E0Q.js} +11 -11
- package/es/{chunk-MX3YWQON-BxE-Aq9c.js → chunk-MX3YWQON-D602L8pU.js} +1 -1
- package/es/{chunk-NQ4KR5QH-EYQBXkqP.js → chunk-NQ4KR5QH-BPQV0i93.js} +41 -45
- package/es/{chunk-O4XLMI2P-qjOoGpnx.js → chunk-O4XLMI2P-BMqc3iYa.js} +15 -14
- package/es/{chunk-PQ6SQG4A-D3jtNCWN.js → chunk-PQ6SQG4A-DcYrzB1X.js} +2 -2
- package/es/{chunk-PU5JKC2W-DdP8BS-S.js → chunk-PU5JKC2W-TuGY6X1n.js} +28 -24
- package/es/{chunk-QZHKN3VN-CW3cFN-h.js → chunk-QZHKN3VN-CKbD02cl.js} +1 -1
- package/es/{chunk-WL4C6EOR-BDbxJyGk.js → chunk-WL4C6EOR-B31ErTFp.js} +19 -17
- package/es/{chunk-XZSTWKYB-CucN1XvM.js → chunk-XZSTWKYB-DYKLwCEy.js} +1888 -1785
- package/es/{chunk-YBOYWFTD-CvaddD9G.js → chunk-YBOYWFTD-CRiKEIiS.js} +5 -5
- package/es/classDiagram-VBA2DB6C-BDqwxUdU.js +29 -0
- package/es/classDiagram-v2-RAHNMMFH-DdmOjeUb.js +29 -0
- package/es/{clone-r3YukIBB.js → clone-yzFtXY5G.js} +1 -1
- package/es/{cose-bilkent-S5V4N54A-B5OQuIhl.js → cose-bilkent-S5V4N54A-BM90wTBk.js} +43 -48
- package/es/css-CRY9BUqw.js +2 -0
- package/es/{cytoscape.esm-i2CZcWd-.js → cytoscape.esm-B_-hKv4-.js} +276 -321
- package/es/{dagre-5aGJFKmT.js → dagre-DCYVBij1.js} +25 -27
- package/es/{dagre-KLK3FWXG-BI5QQMXo.js → dagre-KLK3FWXG-Ced70SgJ.js} +21 -17
- package/es/{defaultLocale-bckJcYh1.js → defaultLocale-yzzuPw6P.js} +1 -4
- package/es/{diagram-E7M64L7V-Dz62Vz_a.js → diagram-E7M64L7V-xZCloH_i.js} +72 -70
- package/es/{diagram-IFDJBPK2-9fjvFkSc.js → diagram-IFDJBPK2-BTmFZhvz.js} +21 -21
- package/es/{diagram-P4PSJMXO-BlX6jFjZ.js → diagram-P4PSJMXO-DX_3B0LB.js} +16 -16
- package/es/{dist-BX_roQzC.js → dist-h4ggShny.js} +1 -1
- package/es/{erDiagram-INFDFZHY-BcRXu8Cp.js → erDiagram-INFDFZHY-MJ_HVY-7.js} +22 -22
- package/es/{flowDiagram-PKNHOUZH-UeyfgU8z.js → flowDiagram-PKNHOUZH-CQIRy1sx.js} +35 -42
- package/es/{ganttDiagram-A5KZAMGK-txCzqgQ5.js → ganttDiagram-A5KZAMGK-Dw9bjWjx.js} +39 -52
- package/es/gitGraph-HDMCJU4V-oForq_Vw.js +3 -0
- package/es/{gitGraphDiagram-K3NZZRJ6-DghWYaFU.js → gitGraphDiagram-K3NZZRJ6-Gk6FiGbZ.js} +21 -21
- package/es/{graphlib-dRkI1OCL.js → graphlib-BMvIh7N7.js} +4 -4
- package/es/{html-CWvNBSxv.js → html-C4rrmxbP.js} +2 -2
- package/es/info-3K5VOQVL-0F-ZLEMx.js +3 -0
- package/es/{infoDiagram-LFFYTUFH-CA-vlAvP.js → infoDiagram-LFFYTUFH-CS64-uil.js} +9 -9
- package/es/{init-B75p2clj.js → init-sjaVZO3f.js} +1 -3
- package/es/{isArrayLikeObject-jl2bjkAJ.js → isArrayLikeObject-Dqk_yOP-.js} +5 -4
- package/es/{ishikawaDiagram-PHBUUO56-DjdpS9Lb.js → ishikawaDiagram-PHBUUO56-C_Hw5UnV.js} +13 -13
- package/es/javascript--0qAxhnA.js +2 -0
- package/es/{journeyDiagram-4ABVD52K-CIJfC1fp.js → journeyDiagram-4ABVD52K-CFFyM4Ar.js} +16 -16
- package/es/{kanban-definition-K7BYSVSG-CC2vwGck.js → kanban-definition-K7BYSVSG-B_R-mA10.js} +27 -28
- package/es/{katex-DCMiIo1z.js → katex-C-qdUNlg.js} +78 -68
- package/es/{line-Cu9NTacD.js → line-D05MESIS.js} +3 -3
- package/es/{linear-C0rAYYmp.js → linear-B8tPH2Pw.js} +4 -6
- package/es/mermaid-parser.core-C_69nk7j.js +259 -0
- package/es/mermaid.core-BVGVwWcu.js +1914 -0
- package/es/{mindmap-definition-YRQLILUH-BzTYDYmK.js → mindmap-definition-YRQLILUH-qgGUYYe3.js} +26 -28
- package/es/{ordinal-F3U6aXtP.js → ordinal-CNQzPcrr.js} +1 -1
- package/es/packet-RMMSAZCW-CeqtQQ_e.js +3 -0
- package/es/{path-Dm3C8WEs.js → path-CqWAdh69.js} +4 -7
- package/es/pie-UPGHQEXC-BI60FhK4.js +3 -0
- package/es/{pieDiagram-SKSYHLDU-COvqE_C6.js → pieDiagram-SKSYHLDU-B8-AVOmP.js} +47 -47
- package/es/{quadrantDiagram-337W2JSQ-Dgv8ccjt.js → quadrantDiagram-337W2JSQ-C2Z0CN4Z.js} +10 -10
- package/es/radar-KQ55EAFF-CRwOOFw0.js +3 -0
- package/es/{requirementDiagram-Z7DCOOCP-B2NyhxO-.js → requirementDiagram-Z7DCOOCP-Cdj7PwWC.js} +19 -19
- package/es/{chunk-WQLz0Won.js → rolldown-runtime-CEY2VRuR.js} +10 -3
- package/es/{rough.esm-BhGP2Udb.js → rough.esm-D1ibUQD-.js} +1 -1
- package/es/{sankeyDiagram-WA2Y5GQK-BfnH_gpl.js → sankeyDiagram-WA2Y5GQK-BNmU-dM1.js} +10 -10
- package/es/{sequenceDiagram-2WXFIKYE-DXssVQOF.js → sequenceDiagram-2WXFIKYE-pj0uPf22.js} +114 -126
- package/es/{shiki-runtime-D0MO6er5.js → shiki-runtime-7QG17np_.js} +978 -983
- package/es/{src-CUQ6oOYk.js → src-Dynw_Lub.js} +26 -26
- package/es/{stateDiagram-RAJIS63D-DvDLfupV.js → stateDiagram-RAJIS63D-BgCfMnGb.js} +18 -18
- package/es/stateDiagram-v2-FVOUBMTO-ByMhP6Xo.js +27 -0
- package/es/{timeline-definition-YZTLITO2-ErcRjbZf.js → timeline-definition-YZTLITO2-Bj5QKnBI.js} +10 -10
- package/es/treemap-KZPCXAKY-BlOAFUbR.js +3 -0
- package/es/{vennDiagram-LZ73GAT5-CDTZUtc8.js → vennDiagram-LZ73GAT5-lpWcIvN6.js} +16 -16
- package/es/{xychartDiagram-JWTSCODW-Y21jBOTg.js → xychartDiagram-JWTSCODW-De1M-7Yz.js} +26 -30
- package/package.json +1 -1
- package/es/Serializer-D1JYN1kI.js +0 -262
- package/es/architecture-PBZL5I3N-D7tS55xM.js +0 -3
- package/es/chunk-7E7YKBS2-CL2d4WAf.js +0 -23
- package/es/chunk-C72U2L5F-OHTVpS-m.js +0 -23
- package/es/chunk-EGIJ26TM-DyMPGYrB.js +0 -23
- package/es/chunk-GLR3WWYH-DiXcKb5Y.js +0 -41
- package/es/chunk-HHEYEP7N-Cxc7E4dX.js +0 -9
- package/es/chunk-L3YUKLVL-7oGaUOdc.js +0 -23
- package/es/chunk-OZEHJAEY-D82nx27s.js +0 -64
- package/es/chunk-R5LLSJPH-CreI2kO9.js +0 -35
- package/es/chunk-XIRO2GV7-S5KkbVnN.js +0 -30
- package/es/chunk-XPW4576I-B0KVSHwE.js +0 -1146
- package/es/classDiagram-VBA2DB6C-Co3LMmg8.js +0 -29
- package/es/classDiagram-v2-RAHNMMFH-BZscgdF2.js +0 -29
- package/es/css-Bi5OTYo2.js +0 -2
- package/es/gitGraph-HDMCJU4V-CxsS0Qr1.js +0 -3
- package/es/info-3K5VOQVL-COqdvM99.js +0 -3
- package/es/isEmpty-CmA-HYrg.js +0 -35
- package/es/javascript-CjdDmufJ.js +0 -2
- package/es/mermaid-parser.core-7Wn2L29P.js +0 -59
- package/es/mermaid.core-Bvy_Q6Hu.js +0 -680
- package/es/packet-RMMSAZCW-2PTjWKLd.js +0 -3
- package/es/pie-UPGHQEXC-Du8-k-EA.js +0 -3
- package/es/radar-KQ55EAFF-jJOhyjxC.js +0 -3
- package/es/stateDiagram-v2-FVOUBMTO-DIXyaX9W.js +0 -27
- package/es/treemap-KZPCXAKY-CvZAIYVa.js +0 -3
- /package/es/{array-CWNufkl9.js → array-CApNbSU9.js} +0 -0
- /package/es/{css-v5r4VtJ6.js → css-DVAQAvTD.js} +0 -0
- /package/es/{javascript-o_jd8Ivw.js → javascript-Bk0bJ4nQ.js} +0 -0
- /package/es/{json-DqMXJlo0.js → json-CAwkMa5O.js} +0 -0
- /package/es/{math-CoDOuve-.js → math-BZ_bUCIA.js} +0 -0
- /package/es/{python-CQPNJfOt.js → python-D0AaDoWC.js} +0 -0
- /package/es/{typescript-Ck7Pr_E3.js → typescript-DWy2KXvB.js} +0 -0
|
@@ -3,7 +3,7 @@ import { computed, createVNode, defineComponent, mergeProps, useAttrs } from "vu
|
|
|
3
3
|
import { Tooltip } from "antdv-next";
|
|
4
4
|
import { DislikeFilled, DislikeOutlined, LikeFilled, LikeOutlined } from "@antdv-next/icons";
|
|
5
5
|
//#region components/actions/ActionsFeedback.tsx
|
|
6
|
-
var FEEDBACK_VALUE =
|
|
6
|
+
var FEEDBACK_VALUE = /*#__PURE__*/ function(FEEDBACK_VALUE) {
|
|
7
7
|
FEEDBACK_VALUE["like"] = "like";
|
|
8
8
|
FEEDBACK_VALUE["dislike"] = "dislike";
|
|
9
9
|
FEEDBACK_VALUE["default"] = "default";
|
|
@@ -3,7 +3,7 @@ import { computed, createVNode, defineComponent, mergeProps, useAttrs, useSlots
|
|
|
3
3
|
import { Tooltip } from "antdv-next";
|
|
4
4
|
import { CloseCircleOutlined, LoadingOutlined } from "@antdv-next/icons";
|
|
5
5
|
//#region components/actions/ActionsItem.tsx
|
|
6
|
-
var ACTIONS_ITEM_STATUS =
|
|
6
|
+
var ACTIONS_ITEM_STATUS = /*#__PURE__*/ function(ACTIONS_ITEM_STATUS) {
|
|
7
7
|
ACTIONS_ITEM_STATUS["LOADING"] = "loading";
|
|
8
8
|
ACTIONS_ITEM_STATUS["ERROR"] = "error";
|
|
9
9
|
ACTIONS_ITEM_STATUS["RUNNING"] = "running";
|
|
@@ -105,7 +105,7 @@ function useCompatibleScroll(scrollDomRef, contentDomRef) {
|
|
|
105
105
|
const contentDom = contentDomRef.value;
|
|
106
106
|
if (!scrollDom || !contentDom) return;
|
|
107
107
|
const { top, intoView, intoViewDom } = option || {};
|
|
108
|
-
if (isReverse(scrollDom)) if (top !== void 0 && top >= -
|
|
108
|
+
if (isReverse(scrollDom)) if (top !== void 0 && top >= -10) isScrollToBottom = true;
|
|
109
109
|
else if (intoViewDom && intoView?.block === "end") isScrollToBottom = contentDom.lastElementChild === intoViewDom;
|
|
110
110
|
else isScrollToBottom = false;
|
|
111
111
|
else if (top !== void 0 && top >= scrollDom.scrollHeight - scrollDom.clientHeight - sentinelHeight) isScrollToBottom = true;
|
|
@@ -89,10 +89,11 @@ var XCodeHighlighter = /* @__PURE__ */ defineComponent({
|
|
|
89
89
|
const highlightedHtml = shallowRef("");
|
|
90
90
|
const highlightCode = async () => {
|
|
91
91
|
try {
|
|
92
|
-
|
|
92
|
+
const html = await codeToHtml(props.content, {
|
|
93
93
|
lang: props.language,
|
|
94
94
|
theme: props.theme === "dark" ? "vitesse-dark" : "vitesse-light"
|
|
95
95
|
});
|
|
96
|
+
highlightedHtml.value = html;
|
|
96
97
|
} catch (e) {
|
|
97
98
|
console.error("Failed to highlight code:", e);
|
|
98
99
|
highlightedHtml.value = `<pre><code>${escapeHtml(props.content)}</code></pre>`;
|
|
@@ -8,6 +8,46 @@ export interface ComponentToken {
|
|
|
8
8
|
* 代码字体大小
|
|
9
9
|
*/
|
|
10
10
|
codeFontSize?: number;
|
|
11
|
+
/**
|
|
12
|
+
* 亮色主题下的代码文字颜色,用于语言未命中高亮时的降级文本
|
|
13
|
+
*/
|
|
14
|
+
codeColor?: string;
|
|
15
|
+
/**
|
|
16
|
+
* 暗色主题下的代码文字颜色,用于语言未命中高亮时的降级文本
|
|
17
|
+
*/
|
|
18
|
+
codeColorDark?: string;
|
|
19
|
+
/**
|
|
20
|
+
* 亮色主题下代码区与行号栏的背景色
|
|
21
|
+
*/
|
|
22
|
+
codeBg?: string;
|
|
23
|
+
/**
|
|
24
|
+
* 暗色主题下代码区与行号栏的背景色
|
|
25
|
+
*/
|
|
26
|
+
codeBgDark?: string;
|
|
27
|
+
/**
|
|
28
|
+
* 暗色主题下头部区域的背景色
|
|
29
|
+
*/
|
|
30
|
+
codeHeaderBgDark?: string;
|
|
31
|
+
/**
|
|
32
|
+
* 暗色主题下头部与行号栏的分隔线颜色
|
|
33
|
+
*/
|
|
34
|
+
codeBorderColorDark?: string;
|
|
35
|
+
/**
|
|
36
|
+
* 暗色主题下语言标签的文字颜色
|
|
37
|
+
*/
|
|
38
|
+
codeLangColorDark?: string;
|
|
39
|
+
/**
|
|
40
|
+
* 暗色主题下行号的文字颜色
|
|
41
|
+
*/
|
|
42
|
+
codeLineNumberColorDark?: string;
|
|
43
|
+
/**
|
|
44
|
+
* 暗色主题下头部操作按钮的文字颜色
|
|
45
|
+
*/
|
|
46
|
+
codeBtnColorDark?: string;
|
|
47
|
+
/**
|
|
48
|
+
* 暗色主题下头部操作按钮悬浮态的背景色
|
|
49
|
+
*/
|
|
50
|
+
codeBtnHoverBgDark?: string;
|
|
11
51
|
}
|
|
12
52
|
export interface CodeHighlighterToken extends FullToken<"CodeHighlighter"> {
|
|
13
53
|
}
|
|
@@ -35,14 +35,14 @@ var genCodeHighlighterStyle = (token) => {
|
|
|
35
35
|
[`${componentCls}-content`]: {
|
|
36
36
|
display: "flex",
|
|
37
37
|
overflow: "auto",
|
|
38
|
-
backgroundColor:
|
|
38
|
+
backgroundColor: token.codeBg,
|
|
39
39
|
alignItems: "stretch"
|
|
40
40
|
},
|
|
41
41
|
[`${componentCls}-line-numbers`]: {
|
|
42
42
|
paddingBlock: unit(token.paddingSM),
|
|
43
43
|
paddingInline: unit(token.paddingXS),
|
|
44
44
|
textAlign: "right",
|
|
45
|
-
backgroundColor:
|
|
45
|
+
backgroundColor: token.codeBg,
|
|
46
46
|
borderRight: `${unit(token.lineWidth)} ${token.lineType} ${token.colorBorderSecondary}`,
|
|
47
47
|
userSelect: "none",
|
|
48
48
|
flexShrink: 0,
|
|
@@ -63,6 +63,7 @@ var genCodeHighlighterStyle = (token) => {
|
|
|
63
63
|
[`${componentCls}-code`]: {
|
|
64
64
|
flex: 1,
|
|
65
65
|
overflow: "auto",
|
|
66
|
+
color: token.codeColor,
|
|
66
67
|
"& > pre": {
|
|
67
68
|
margin: 0,
|
|
68
69
|
padding: unit(token.paddingSM),
|
|
@@ -83,29 +84,40 @@ var genCodeHighlighterStyle = (token) => {
|
|
|
83
84
|
[`&${componentCls}-dark`]: {
|
|
84
85
|
borderColor: token.colorBorder,
|
|
85
86
|
[`${componentCls}-header`]: {
|
|
86
|
-
backgroundColor:
|
|
87
|
-
borderBottomColor:
|
|
87
|
+
backgroundColor: token.codeHeaderBgDark,
|
|
88
|
+
borderBottomColor: token.codeBorderColorDark
|
|
88
89
|
},
|
|
89
|
-
[`${componentCls}-lang`]: { color:
|
|
90
|
+
[`${componentCls}-lang`]: { color: token.codeLangColorDark },
|
|
90
91
|
[`${componentCls}-theme-btn, ${componentCls}-copy-btn`]: {
|
|
91
|
-
color:
|
|
92
|
+
color: `${token.codeBtnColorDark} !important`,
|
|
92
93
|
"&:hover, &:focus": {
|
|
93
|
-
color:
|
|
94
|
-
backgroundColor:
|
|
94
|
+
color: `${token.codeBtnColorDark} !important`,
|
|
95
|
+
backgroundColor: `${token.codeBtnHoverBgDark} !important`
|
|
95
96
|
}
|
|
96
97
|
},
|
|
97
|
-
[`${componentCls}-content`]: { backgroundColor:
|
|
98
|
+
[`${componentCls}-content`]: { backgroundColor: token.codeBgDark },
|
|
98
99
|
[`${componentCls}-line-numbers`]: {
|
|
99
|
-
backgroundColor:
|
|
100
|
-
borderRightColor:
|
|
100
|
+
backgroundColor: token.codeBgDark,
|
|
101
|
+
borderRightColor: token.codeBorderColorDark
|
|
101
102
|
},
|
|
102
|
-
[`${componentCls}-line-number`]: { color:
|
|
103
|
+
[`${componentCls}-line-number`]: { color: token.codeLineNumberColorDark },
|
|
104
|
+
[`${componentCls}-code`]: { color: token.codeColorDark }
|
|
103
105
|
}
|
|
104
106
|
} };
|
|
105
107
|
};
|
|
106
108
|
var prepareComponentToken = () => ({
|
|
107
109
|
codeFontFamily: "'Fira Code', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', 'Droid Sans Mono', 'Source Code Pro', monospace",
|
|
108
|
-
codeFontSize: 14
|
|
110
|
+
codeFontSize: 14,
|
|
111
|
+
codeColor: "#393a34",
|
|
112
|
+
codeColorDark: "#dbd7caee",
|
|
113
|
+
codeBg: "#fafafa",
|
|
114
|
+
codeBgDark: "#1e1e1e",
|
|
115
|
+
codeHeaderBgDark: "#252526",
|
|
116
|
+
codeBorderColorDark: "#3e3e42",
|
|
117
|
+
codeLangColorDark: "#cccccc",
|
|
118
|
+
codeLineNumberColorDark: "#858585",
|
|
119
|
+
codeBtnColorDark: "#ffffff",
|
|
120
|
+
codeBtnHoverBgDark: "#3e3e42"
|
|
109
121
|
});
|
|
110
122
|
var style_default = genStyleHooks("CodeHighlighter", (token) => {
|
|
111
123
|
return [genCodeHighlighterStyle(mergeToken(token, {}))];
|
package/dist/folder/Folder.js
CHANGED
|
@@ -195,7 +195,8 @@ var XFolder = /* @__PURE__ */ defineComponent({
|
|
|
195
195
|
if (props.fileContentService) {
|
|
196
196
|
loadingContent.value = true;
|
|
197
197
|
try {
|
|
198
|
-
|
|
198
|
+
const content = await props.fileContentService.loadFileContent(filePath);
|
|
199
|
+
fileContent.value = content;
|
|
199
200
|
} catch (error) {
|
|
200
201
|
fileContent.value = `// ${locale.value.loadError}: ${error instanceof Error ? error.message : "Unknown error"}`;
|
|
201
202
|
} finally {
|
package/dist/index.umd.js
CHANGED
|
@@ -29,7 +29,14 @@
|
|
|
29
29
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
30
30
|
var __getProtoOf = Object.getPrototypeOf;
|
|
31
31
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
32
|
-
var __esmMin = (fn, res) => () =>
|
|
32
|
+
var __esmMin = (fn, res, err) => () => {
|
|
33
|
+
if (err) throw err[0];
|
|
34
|
+
try {
|
|
35
|
+
return fn && (res = fn(fn = 0)), res;
|
|
36
|
+
} catch (e) {
|
|
37
|
+
throw err = [e], e;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
33
40
|
var __exportAll = (all, no_symbols) => {
|
|
34
41
|
let target = {};
|
|
35
42
|
for (var name in all) __defProp(target, name, {
|
|
@@ -49,17 +56,17 @@
|
|
|
49
56
|
}
|
|
50
57
|
return to;
|
|
51
58
|
};
|
|
52
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
59
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
53
60
|
value: mod,
|
|
54
61
|
enumerable: true
|
|
55
62
|
}) : target, mod));
|
|
56
63
|
//#endregion
|
|
57
|
-
_antdv_next_icons = __toESM(_antdv_next_icons);
|
|
58
|
-
antdv_next_dist_theme_useToken = __toESM(antdv_next_dist_theme_useToken);
|
|
59
|
-
shiki_dist_themes_vitesse_dark_mjs = __toESM(shiki_dist_themes_vitesse_dark_mjs);
|
|
60
|
-
shiki_dist_themes_vitesse_light_mjs = __toESM(shiki_dist_themes_vitesse_light_mjs);
|
|
64
|
+
_antdv_next_icons = __toESM(_antdv_next_icons, 1);
|
|
65
|
+
antdv_next_dist_theme_useToken = __toESM(antdv_next_dist_theme_useToken, 1);
|
|
66
|
+
shiki_dist_themes_vitesse_dark_mjs = __toESM(shiki_dist_themes_vitesse_dark_mjs, 1);
|
|
67
|
+
shiki_dist_themes_vitesse_light_mjs = __toESM(shiki_dist_themes_vitesse_light_mjs, 1);
|
|
61
68
|
//#region package.json
|
|
62
|
-
var version = "1.1
|
|
69
|
+
var version = "1.2.1-beta.1";
|
|
63
70
|
//#endregion
|
|
64
71
|
//#region components/x-provider/context.ts
|
|
65
72
|
var XProviderContextKey = Symbol("antdv-next-x-provider-context");
|
|
@@ -718,7 +725,7 @@
|
|
|
718
725
|
});
|
|
719
726
|
//#endregion
|
|
720
727
|
//#region components/actions/ActionsItem.tsx
|
|
721
|
-
var ACTIONS_ITEM_STATUS =
|
|
728
|
+
var ACTIONS_ITEM_STATUS = /*#__PURE__*/ function(ACTIONS_ITEM_STATUS) {
|
|
722
729
|
ACTIONS_ITEM_STATUS["LOADING"] = "loading";
|
|
723
730
|
ACTIONS_ITEM_STATUS["ERROR"] = "error";
|
|
724
731
|
ACTIONS_ITEM_STATUS["RUNNING"] = "running";
|
|
@@ -1008,7 +1015,7 @@
|
|
|
1008
1015
|
});
|
|
1009
1016
|
//#endregion
|
|
1010
1017
|
//#region components/actions/ActionsFeedback.tsx
|
|
1011
|
-
var FEEDBACK_VALUE =
|
|
1018
|
+
var FEEDBACK_VALUE = /*#__PURE__*/ function(FEEDBACK_VALUE) {
|
|
1012
1019
|
FEEDBACK_VALUE["like"] = "like";
|
|
1013
1020
|
FEEDBACK_VALUE["dislike"] = "dislike";
|
|
1014
1021
|
FEEDBACK_VALUE["default"] = "default";
|
|
@@ -4425,7 +4432,7 @@
|
|
|
4425
4432
|
const contentDom = contentDomRef.value;
|
|
4426
4433
|
if (!scrollDom || !contentDom) return;
|
|
4427
4434
|
const { top, intoView, intoViewDom } = option || {};
|
|
4428
|
-
if (isReverse(scrollDom)) if (top !== void 0 && top >= -
|
|
4435
|
+
if (isReverse(scrollDom)) if (top !== void 0 && top >= -10) isScrollToBottom = true;
|
|
4429
4436
|
else if (intoViewDom && intoView?.block === "end") isScrollToBottom = contentDom.lastElementChild === intoViewDom;
|
|
4430
4437
|
else isScrollToBottom = false;
|
|
4431
4438
|
else if (top !== void 0 && top >= scrollDom.scrollHeight - scrollDom.clientHeight - sentinelHeight) isScrollToBottom = true;
|
|
@@ -4776,7 +4783,7 @@
|
|
|
4776
4783
|
var init_shiki_runtime = __esmMin((() => {}));
|
|
4777
4784
|
//#endregion
|
|
4778
4785
|
//#region components/code-highlighter/shiki.ts
|
|
4779
|
-
var PLAIN_TEXT_LANGUAGES = new Set([
|
|
4786
|
+
var PLAIN_TEXT_LANGUAGES = /* @__PURE__ */ new Set([
|
|
4780
4787
|
"text",
|
|
4781
4788
|
"plaintext",
|
|
4782
4789
|
"txt",
|
|
@@ -4917,14 +4924,14 @@
|
|
|
4917
4924
|
[`${componentCls}-content`]: {
|
|
4918
4925
|
display: "flex",
|
|
4919
4926
|
overflow: "auto",
|
|
4920
|
-
backgroundColor:
|
|
4927
|
+
backgroundColor: token.codeBg,
|
|
4921
4928
|
alignItems: "stretch"
|
|
4922
4929
|
},
|
|
4923
4930
|
[`${componentCls}-line-numbers`]: {
|
|
4924
4931
|
paddingBlock: (0, _antdv_next_cssinjs.unit)(token.paddingSM),
|
|
4925
4932
|
paddingInline: (0, _antdv_next_cssinjs.unit)(token.paddingXS),
|
|
4926
4933
|
textAlign: "right",
|
|
4927
|
-
backgroundColor:
|
|
4934
|
+
backgroundColor: token.codeBg,
|
|
4928
4935
|
borderRight: `${(0, _antdv_next_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorderSecondary}`,
|
|
4929
4936
|
userSelect: "none",
|
|
4930
4937
|
flexShrink: 0,
|
|
@@ -4945,6 +4952,7 @@
|
|
|
4945
4952
|
[`${componentCls}-code`]: {
|
|
4946
4953
|
flex: 1,
|
|
4947
4954
|
overflow: "auto",
|
|
4955
|
+
color: token.codeColor,
|
|
4948
4956
|
"& > pre": {
|
|
4949
4957
|
margin: 0,
|
|
4950
4958
|
padding: (0, _antdv_next_cssinjs.unit)(token.paddingSM),
|
|
@@ -4965,29 +4973,40 @@
|
|
|
4965
4973
|
[`&${componentCls}-dark`]: {
|
|
4966
4974
|
borderColor: token.colorBorder,
|
|
4967
4975
|
[`${componentCls}-header`]: {
|
|
4968
|
-
backgroundColor:
|
|
4969
|
-
borderBottomColor:
|
|
4976
|
+
backgroundColor: token.codeHeaderBgDark,
|
|
4977
|
+
borderBottomColor: token.codeBorderColorDark
|
|
4970
4978
|
},
|
|
4971
|
-
[`${componentCls}-lang`]: { color:
|
|
4979
|
+
[`${componentCls}-lang`]: { color: token.codeLangColorDark },
|
|
4972
4980
|
[`${componentCls}-theme-btn, ${componentCls}-copy-btn`]: {
|
|
4973
|
-
color:
|
|
4981
|
+
color: `${token.codeBtnColorDark} !important`,
|
|
4974
4982
|
"&:hover, &:focus": {
|
|
4975
|
-
color:
|
|
4976
|
-
backgroundColor:
|
|
4983
|
+
color: `${token.codeBtnColorDark} !important`,
|
|
4984
|
+
backgroundColor: `${token.codeBtnHoverBgDark} !important`
|
|
4977
4985
|
}
|
|
4978
4986
|
},
|
|
4979
|
-
[`${componentCls}-content`]: { backgroundColor:
|
|
4987
|
+
[`${componentCls}-content`]: { backgroundColor: token.codeBgDark },
|
|
4980
4988
|
[`${componentCls}-line-numbers`]: {
|
|
4981
|
-
backgroundColor:
|
|
4982
|
-
borderRightColor:
|
|
4989
|
+
backgroundColor: token.codeBgDark,
|
|
4990
|
+
borderRightColor: token.codeBorderColorDark
|
|
4983
4991
|
},
|
|
4984
|
-
[`${componentCls}-line-number`]: { color:
|
|
4992
|
+
[`${componentCls}-line-number`]: { color: token.codeLineNumberColorDark },
|
|
4993
|
+
[`${componentCls}-code`]: { color: token.codeColorDark }
|
|
4985
4994
|
}
|
|
4986
4995
|
} };
|
|
4987
4996
|
};
|
|
4988
4997
|
var prepareComponentToken$10 = () => ({
|
|
4989
4998
|
codeFontFamily: "'Fira Code', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', 'Droid Sans Mono', 'Source Code Pro', monospace",
|
|
4990
|
-
codeFontSize: 14
|
|
4999
|
+
codeFontSize: 14,
|
|
5000
|
+
codeColor: "#393a34",
|
|
5001
|
+
codeColorDark: "#dbd7caee",
|
|
5002
|
+
codeBg: "#fafafa",
|
|
5003
|
+
codeBgDark: "#1e1e1e",
|
|
5004
|
+
codeHeaderBgDark: "#252526",
|
|
5005
|
+
codeBorderColorDark: "#3e3e42",
|
|
5006
|
+
codeLangColorDark: "#cccccc",
|
|
5007
|
+
codeLineNumberColorDark: "#858585",
|
|
5008
|
+
codeBtnColorDark: "#ffffff",
|
|
5009
|
+
codeBtnHoverBgDark: "#3e3e42"
|
|
4991
5010
|
});
|
|
4992
5011
|
var style_default$10 = genStyleHooks("CodeHighlighter", (token) => {
|
|
4993
5012
|
return [genCodeHighlighterStyle((0, _antdv_next_cssinjs_cssinjs_utils.mergeToken)(token, {}))];
|
|
@@ -5078,10 +5097,11 @@
|
|
|
5078
5097
|
const highlightedHtml = (0, vue.shallowRef)("");
|
|
5079
5098
|
const highlightCode = async () => {
|
|
5080
5099
|
try {
|
|
5081
|
-
|
|
5100
|
+
const html = await codeToHtml(props.content, {
|
|
5082
5101
|
lang: props.language,
|
|
5083
5102
|
theme: props.theme === "dark" ? "vitesse-dark" : "vitesse-light"
|
|
5084
5103
|
});
|
|
5104
|
+
highlightedHtml.value = html;
|
|
5085
5105
|
} catch (e) {
|
|
5086
5106
|
console.error("Failed to highlight code:", e);
|
|
5087
5107
|
highlightedHtml.value = `<pre><code>${escapeHtml(props.content)}</code></pre>`;
|
|
@@ -6906,7 +6926,8 @@
|
|
|
6906
6926
|
if (props.fileContentService) {
|
|
6907
6927
|
loadingContent.value = true;
|
|
6908
6928
|
try {
|
|
6909
|
-
|
|
6929
|
+
const content = await props.fileContentService.loadFileContent(filePath);
|
|
6930
|
+
fileContent.value = content;
|
|
6910
6931
|
} catch (error) {
|
|
6911
6932
|
fileContent.value = `// ${locale.value.loadError}: ${error instanceof Error ? error.message : "Unknown error"}`;
|
|
6912
6933
|
} finally {
|
|
@@ -7149,7 +7170,7 @@
|
|
|
7149
7170
|
}, prepareComponentToken$7);
|
|
7150
7171
|
//#endregion
|
|
7151
7172
|
//#region components/mermaid/Mermaid.tsx
|
|
7152
|
-
var RenderType =
|
|
7173
|
+
var RenderType = /*#__PURE__*/ function(RenderType) {
|
|
7153
7174
|
RenderType["Code"] = "code";
|
|
7154
7175
|
RenderType["Image"] = "image";
|
|
7155
7176
|
return RenderType;
|
|
@@ -8237,7 +8258,7 @@
|
|
|
8237
8258
|
});
|
|
8238
8259
|
//#endregion
|
|
8239
8260
|
//#region components/sender/components/SlotTextArea.tsx
|
|
8240
|
-
var SUPPORTED_INPUT_TYPES = new Set([
|
|
8261
|
+
var SUPPORTED_INPUT_TYPES = /* @__PURE__ */ new Set([
|
|
8241
8262
|
"input",
|
|
8242
8263
|
"select",
|
|
8243
8264
|
"custom",
|
|
@@ -8352,8 +8373,8 @@
|
|
|
8352
8373
|
if (nodeInfo.slotKey) {
|
|
8353
8374
|
if (nodeInfo.nodeType === "nbsp") return " ";
|
|
8354
8375
|
const config = nodeInfo.slotConfig;
|
|
8355
|
-
if (!config
|
|
8356
|
-
const rawValue = slotValues.value[nodeInfo.slotKey];
|
|
8376
|
+
if (!config) return element.innerText || "";
|
|
8377
|
+
const rawValue = config.type === "content" ? element.innerText || "" : slotValues.value[nodeInfo.slotKey];
|
|
8357
8378
|
return config.formatResult?.(rawValue) ?? stringifyValue(rawValue);
|
|
8358
8379
|
}
|
|
8359
8380
|
return element.innerText || "";
|
|
@@ -8564,7 +8585,8 @@
|
|
|
8564
8585
|
const setStartCursor = (preventScroll) => {
|
|
8565
8586
|
const editable = editableRef.value;
|
|
8566
8587
|
if (!editable) return;
|
|
8567
|
-
|
|
8588
|
+
const startIndex = skillDomRef.value ? 1 : 0;
|
|
8589
|
+
setCursorPosition(editable, startIndex, preventScroll);
|
|
8568
8590
|
};
|
|
8569
8591
|
const setEndCursor = (preventScroll) => {
|
|
8570
8592
|
const editable = editableRef.value;
|
|
@@ -9058,7 +9080,7 @@
|
|
|
9058
9080
|
"xmlns": "http://www.w3.org/2000/svg",
|
|
9059
9081
|
"class": props.class
|
|
9060
9082
|
}, [(0, vue.createVNode)("title", null, [contextLocale.value.speechRecording]), Array.from({ length: COUNT }).map((_, index) => {
|
|
9061
|
-
const x = index *
|
|
9083
|
+
const x = index * 286.66666666666663;
|
|
9062
9084
|
const yMin = SIZE / 2 - RECT_HEIGHT_MIN / 2;
|
|
9063
9085
|
const yMax = SIZE / 2 - RECT_HEIGHT_MAX / 2;
|
|
9064
9086
|
return (0, vue.createVNode)("rect", {
|
|
@@ -10685,7 +10707,11 @@
|
|
|
10685
10707
|
var genSuggestionStyle = (token) => {
|
|
10686
10708
|
const { componentCls, antCls } = token;
|
|
10687
10709
|
return { [componentCls]: {
|
|
10688
|
-
[`${antCls}-cascader-menus ${antCls}-cascader-menu`]: {
|
|
10710
|
+
[`${antCls}-cascader-menus ${antCls}-cascader-menu`]: {
|
|
10711
|
+
height: "auto",
|
|
10712
|
+
maxHeight: 256,
|
|
10713
|
+
overflowY: "auto"
|
|
10714
|
+
},
|
|
10689
10715
|
[`${componentCls}-item`]: {
|
|
10690
10716
|
"&-icon": { marginInlineEnd: token.paddingXXS },
|
|
10691
10717
|
"&-extra": { marginInlineStart: token.padding }
|
|
@@ -10761,8 +10787,6 @@
|
|
|
10761
10787
|
case "Escape":
|
|
10762
10788
|
onCancel();
|
|
10763
10789
|
event.preventDefault();
|
|
10764
|
-
break;
|
|
10765
|
-
default: break;
|
|
10766
10790
|
}
|
|
10767
10791
|
};
|
|
10768
10792
|
(0, vue.watch)([open, items], ([nextOpen, nextItems]) => {
|
|
@@ -11114,6 +11138,10 @@
|
|
|
11114
11138
|
blink: {
|
|
11115
11139
|
type: Boolean,
|
|
11116
11140
|
default: false
|
|
11141
|
+
},
|
|
11142
|
+
destroyOnHidden: {
|
|
11143
|
+
type: Boolean,
|
|
11144
|
+
default: true
|
|
11117
11145
|
}
|
|
11118
11146
|
},
|
|
11119
11147
|
emits: ["update:expanded", "expand"],
|
|
@@ -11174,6 +11202,17 @@
|
|
|
11174
11202
|
return rest;
|
|
11175
11203
|
});
|
|
11176
11204
|
const prefixCls = (0, vue.computed)(() => props.prefixCls);
|
|
11205
|
+
function renderContent() {
|
|
11206
|
+
const node = (0, vue.createVNode)("div", { "ref": contentRef }, [(0, vue.createVNode)("div", {
|
|
11207
|
+
"class": [
|
|
11208
|
+
`${prefixCls.value}-content`,
|
|
11209
|
+
contextConfig.value.classes?.content,
|
|
11210
|
+
props.classes?.content
|
|
11211
|
+
],
|
|
11212
|
+
"style": [contextConfig.value.styles?.content, props.styles?.content]
|
|
11213
|
+
}, [slots.default?.()])]);
|
|
11214
|
+
return (0, vue.withDirectives)(node, [[vue.vShow, mergedExpanded.value]]);
|
|
11215
|
+
}
|
|
11177
11216
|
expose({ get nativeElement() {
|
|
11178
11217
|
return rootRef.value;
|
|
11179
11218
|
} });
|
|
@@ -11213,20 +11252,14 @@
|
|
|
11213
11252
|
}, [(0, vue.createVNode)(_antdv_next_icons.RightOutlined, null, null)])
|
|
11214
11253
|
]), (0, vue.createVNode)(vue.Transition, {
|
|
11215
11254
|
"name": `${prefixCls.value}-collapse`,
|
|
11255
|
+
"persisted": !props.destroyOnHidden,
|
|
11216
11256
|
"onBeforeEnter": onBeforeEnter,
|
|
11217
11257
|
"onEnter": onEnter,
|
|
11218
11258
|
"onAfterEnter": onAfterEnter,
|
|
11219
11259
|
"onBeforeLeave": onBeforeLeave,
|
|
11220
11260
|
"onLeave": onLeave,
|
|
11221
11261
|
"onAfterLeave": onAfterLeave
|
|
11222
|
-
}, { default: () => [mergedExpanded.value ?
|
|
11223
|
-
"class": [
|
|
11224
|
-
`${prefixCls.value}-content`,
|
|
11225
|
-
contextConfig.value.classes?.content,
|
|
11226
|
-
props.classes?.content
|
|
11227
|
-
],
|
|
11228
|
-
"style": [contextConfig.value.styles?.content, props.styles?.content]
|
|
11229
|
-
}, [slots.default?.()])]) : null] })]);
|
|
11262
|
+
}, { default: () => [props.destroyOnHidden && !mergedExpanded.value ? null : renderContent()] })]);
|
|
11230
11263
|
}
|
|
11231
11264
|
});
|
|
11232
11265
|
//#endregion
|
|
@@ -11740,6 +11773,14 @@
|
|
|
11740
11773
|
originNode: item.footer
|
|
11741
11774
|
}) : item.footer;
|
|
11742
11775
|
const showContent = hasContent && (!collapsible || props.expanded);
|
|
11776
|
+
const destroyOnHidden = item.destroyOnHidden ?? true;
|
|
11777
|
+
const renderContent = () => {
|
|
11778
|
+
const node = (0, vue.createVNode)("div", null, [(0, vue.createVNode)("div", {
|
|
11779
|
+
"class": [`${cls}-content`, props.classes?.itemContent],
|
|
11780
|
+
"style": props.styles?.itemContent
|
|
11781
|
+
}, [(0, vue.createVNode)("div", { "class": `${cls}-content-box` }, [contentNode])])]);
|
|
11782
|
+
return (0, vue.withDirectives)(node, [[vue.vShow, showContent]]);
|
|
11783
|
+
};
|
|
11743
11784
|
return (0, vue.createVNode)("div", {
|
|
11744
11785
|
"class": [`${cls}`, props.classes?.item],
|
|
11745
11786
|
"style": props.styles?.item
|
|
@@ -11747,16 +11788,14 @@
|
|
|
11747
11788
|
renderHeader(contentNode),
|
|
11748
11789
|
hasContent && (0, vue.createVNode)(vue.Transition, {
|
|
11749
11790
|
"name": `${props.prefixCls}-collapse`,
|
|
11791
|
+
"persisted": !destroyOnHidden,
|
|
11750
11792
|
"onBeforeEnter": onBeforeEnter,
|
|
11751
11793
|
"onEnter": onEnter,
|
|
11752
11794
|
"onAfterEnter": onAfterEnter,
|
|
11753
11795
|
"onBeforeLeave": onBeforeLeave,
|
|
11754
11796
|
"onLeave": onLeave,
|
|
11755
11797
|
"onAfterLeave": onAfterLeave
|
|
11756
|
-
}, { default: () => [showContent ?
|
|
11757
|
-
"class": [`${cls}-content`, props.classes?.itemContent],
|
|
11758
|
-
"style": props.styles?.itemContent
|
|
11759
|
-
}, [(0, vue.createVNode)("div", { "class": `${cls}-content-box` }, [contentNode])])]) : null] }),
|
|
11798
|
+
}, { default: () => [destroyOnHidden && !showContent ? null : renderContent()] }),
|
|
11760
11799
|
hasRenderableNode(footerNode) && (0, vue.createVNode)("div", {
|
|
11761
11800
|
"class": [`${cls}-footer`, props.classes?.itemFooter],
|
|
11762
11801
|
"style": props.styles?.itemFooter
|
|
@@ -11850,7 +11889,7 @@
|
|
|
11850
11889
|
const ctx = contextConfig.value.classes ?? {};
|
|
11851
11890
|
const prop = props.classes ?? {};
|
|
11852
11891
|
const result = {};
|
|
11853
|
-
const keys = new Set([...Object.keys(ctx), ...Object.keys(prop)]);
|
|
11892
|
+
const keys = /* @__PURE__ */ new Set([...Object.keys(ctx), ...Object.keys(prop)]);
|
|
11854
11893
|
for (const k of keys) {
|
|
11855
11894
|
const vals = [ctx[k], prop[k]].filter(Boolean).join(" ");
|
|
11856
11895
|
if (vals) result[k] = vals;
|
|
@@ -11861,7 +11900,7 @@
|
|
|
11861
11900
|
const ctx = contextConfig.value.styles ?? {};
|
|
11862
11901
|
const prop = props.styles ?? {};
|
|
11863
11902
|
const result = {};
|
|
11864
|
-
const keys = new Set([...Object.keys(ctx), ...Object.keys(prop)]);
|
|
11903
|
+
const keys = /* @__PURE__ */ new Set([...Object.keys(ctx), ...Object.keys(prop)]);
|
|
11865
11904
|
for (const k of keys) result[k] = {
|
|
11866
11905
|
...ctx[k],
|
|
11867
11906
|
...prop[k]
|
|
@@ -12224,7 +12263,7 @@
|
|
|
12224
12263
|
},
|
|
12225
12264
|
setup(props, { slots }) {
|
|
12226
12265
|
const attrs = (0, vue.useAttrs)();
|
|
12227
|
-
|
|
12266
|
+
const xProviderConfig = (0, vue.computed)(() => {
|
|
12228
12267
|
return {
|
|
12229
12268
|
attachments: props.attachments,
|
|
12230
12269
|
actions: props.actions,
|
|
@@ -12241,7 +12280,8 @@
|
|
|
12241
12280
|
thoughtChain: props.thoughtChain,
|
|
12242
12281
|
welcome: props.welcome
|
|
12243
12282
|
};
|
|
12244
|
-
})
|
|
12283
|
+
});
|
|
12284
|
+
(0, vue.provide)(XProviderContextKey, xProviderConfig);
|
|
12245
12285
|
return () => (0, vue.createVNode)(antdv_next.ConfigProvider, (0, vue.mergeProps)(attrs, {
|
|
12246
12286
|
"theme": props.theme,
|
|
12247
12287
|
"locale": props.locale,
|
package/dist/mermaid/Mermaid.js
CHANGED
|
@@ -11,7 +11,7 @@ import { useConfig } from "antdv-next/config-provider/context";
|
|
|
11
11
|
import { Button, Segmented, Tooltip } from "antdv-next";
|
|
12
12
|
import { DownloadOutlined, ZoomInOutlined, ZoomOutOutlined } from "@antdv-next/icons";
|
|
13
13
|
//#region components/mermaid/Mermaid.tsx
|
|
14
|
-
var RenderType =
|
|
14
|
+
var RenderType = /*#__PURE__*/ function(RenderType) {
|
|
15
15
|
RenderType["Code"] = "code";
|
|
16
16
|
RenderType["Image"] = "image";
|
|
17
17
|
return RenderType;
|
package/dist/package.js
CHANGED
|
@@ -5,7 +5,7 @@ import { classNames } from "@v-c/util";
|
|
|
5
5
|
import { computed, createTextVNode, createVNode, defineComponent, nextTick, onBeforeUnmount, ref, render, watch } from "vue";
|
|
6
6
|
import { Dropdown, Input } from "antdv-next";
|
|
7
7
|
//#region components/sender/components/SlotTextArea.tsx
|
|
8
|
-
var SUPPORTED_INPUT_TYPES = new Set([
|
|
8
|
+
var SUPPORTED_INPUT_TYPES = /* @__PURE__ */ new Set([
|
|
9
9
|
"input",
|
|
10
10
|
"select",
|
|
11
11
|
"custom",
|
|
@@ -120,8 +120,8 @@ var SlotTextArea_default = /* @__PURE__ */ defineComponent({
|
|
|
120
120
|
if (nodeInfo.slotKey) {
|
|
121
121
|
if (nodeInfo.nodeType === "nbsp") return " ";
|
|
122
122
|
const config = nodeInfo.slotConfig;
|
|
123
|
-
if (!config
|
|
124
|
-
const rawValue = slotValues.value[nodeInfo.slotKey];
|
|
123
|
+
if (!config) return element.innerText || "";
|
|
124
|
+
const rawValue = config.type === "content" ? element.innerText || "" : slotValues.value[nodeInfo.slotKey];
|
|
125
125
|
return config.formatResult?.(rawValue) ?? stringifyValue(rawValue);
|
|
126
126
|
}
|
|
127
127
|
return element.innerText || "";
|
|
@@ -332,7 +332,8 @@ var SlotTextArea_default = /* @__PURE__ */ defineComponent({
|
|
|
332
332
|
const setStartCursor = (preventScroll) => {
|
|
333
333
|
const editable = editableRef.value;
|
|
334
334
|
if (!editable) return;
|
|
335
|
-
|
|
335
|
+
const startIndex = skillDomRef.value ? 1 : 0;
|
|
336
|
+
setCursorPosition(editable, startIndex, preventScroll);
|
|
336
337
|
};
|
|
337
338
|
const setEndCursor = (preventScroll) => {
|
|
338
339
|
const editable = editableRef.value;
|
|
@@ -23,7 +23,7 @@ var RecordingIcon_default = /* @__PURE__ */ defineComponent({
|
|
|
23
23
|
"xmlns": "http://www.w3.org/2000/svg",
|
|
24
24
|
"class": props.class
|
|
25
25
|
}, [createVNode("title", null, [contextLocale.value.speechRecording]), Array.from({ length: COUNT }).map((_, index) => {
|
|
26
|
-
const x = index *
|
|
26
|
+
const x = index * 286.66666666666663;
|
|
27
27
|
const yMin = SIZE / 2 - RECT_HEIGHT_MIN / 2;
|
|
28
28
|
const yMax = SIZE / 2 - RECT_HEIGHT_MAX / 2;
|
|
29
29
|
return createVNode("rect", {
|
|
@@ -21,7 +21,8 @@ function useSpeech(onSpeech, allowSpeech) {
|
|
|
21
21
|
};
|
|
22
22
|
permissionStatus = status;
|
|
23
23
|
}).catch((error) => {
|
|
24
|
-
|
|
24
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
25
|
+
warning(false, "Sender", `Browser does not support querying microphone permission. ${message}`);
|
|
25
26
|
});
|
|
26
27
|
});
|
|
27
28
|
onBeforeUnmount(() => {
|
|
@@ -4,7 +4,11 @@ import { mergeToken } from "@antdv-next/cssinjs/cssinjs-utils";
|
|
|
4
4
|
var genSuggestionStyle = (token) => {
|
|
5
5
|
const { componentCls, antCls } = token;
|
|
6
6
|
return { [componentCls]: {
|
|
7
|
-
[`${antCls}-cascader-menus ${antCls}-cascader-menu`]: {
|
|
7
|
+
[`${antCls}-cascader-menus ${antCls}-cascader-menu`]: {
|
|
8
|
+
height: "auto",
|
|
9
|
+
maxHeight: 256,
|
|
10
|
+
overflowY: "auto"
|
|
11
|
+
},
|
|
8
12
|
[`${componentCls}-item`]: {
|
|
9
13
|
"&-icon": { marginInlineEnd: token.paddingXXS },
|
|
10
14
|
"&-extra": { marginInlineStart: token.padding }
|